CN111144520A - IC card read-write method, device, storage medium and intelligent lock - Google Patents

IC card read-write method, device, storage medium and intelligent lock Download PDF

Info

Publication number
CN111144520A
CN111144520A CN201911256550.9A CN201911256550A CN111144520A CN 111144520 A CN111144520 A CN 111144520A CN 201911256550 A CN201911256550 A CN 201911256550A CN 111144520 A CN111144520 A CN 111144520A
Authority
CN
China
Prior art keywords
card
target
information
password
written
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201911256550.9A
Other languages
Chinese (zh)
Other versions
CN111144520B (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.)
Huizhou Topband Electronic Technology Co Ltd
Original Assignee
Huizhou Topband Electronic Technology 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 Huizhou Topband Electronic Technology Co Ltd filed Critical Huizhou Topband Electronic Technology Co Ltd
Priority to CN201911256550.9A priority Critical patent/CN111144520B/en
Publication of CN111144520A publication Critical patent/CN111144520A/en
Application granted granted Critical
Publication of CN111144520B publication Critical patent/CN111144520B/en
Active 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
    • G06K17/00Methods or arrangements for effecting co-operative working between equipments covered by two or more of main groups G06K1/00 - G06K15/00, e.g. automatic card files incorporating conveying and reading operations
    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07CTIME OR ATTENDANCE REGISTERS; REGISTERING OR INDICATING THE WORKING OF MACHINES; GENERATING RANDOM NUMBERS; VOTING OR LOTTERY APPARATUS; ARRANGEMENTS, SYSTEMS OR APPARATUS FOR CHECKING NOT PROVIDED FOR ELSEWHERE
    • G07C9/00Individual registration on entry or exit
    • G07C9/00174Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys

Abstract

The invention is suitable for the technical field of data processing, and provides an IC card reading and writing method, an IC card reading and writing device, a storage medium and an intelligent lock, wherein the method comprises the following steps: acquiring a target writing mode for the IC card; when reading the IC card to be written, acquiring and storing ID information of the IC card to be written; writing the password information determined according to the target writing mode into the IC card to be written, and storing the password information corresponding to the IC card to be written; when reading a target IC card, comparing the obtained ID information of the target IC card with each ID information prestored in the intelligent lock; when the comparison is the same, sending target password information corresponding to the target ID information to the target IC card so that the target IC card verifies the target password information and the written password information; and when a success value sent when the target IC card is successfully verified is received, controlling the intelligent lock to unlock. The IC card reading and writing method solves the problem of low safety performance of the IC card, so that the IC card is not easy to copy.

Description

IC card read-write method, device, storage medium and intelligent lock
Technical Field
The invention belongs to the technical field of data processing, and particularly relates to an IC card reading and writing method, an IC card reading and writing device, a storage medium and an intelligent lock.
Background
With the rapid development of economic technology, security and protection become an important social problem at present, and due to the sudden and rapid advance of network, communication and microelectronic technology, digital security management is increasingly favored by people due to the characteristics of intuition, convenience, rich content and the like. Particularly, for buildings such as office buildings and residential buildings with excessive pedestrian flow, the access control system can quickly identify registered users and non-registered users, ensure the entrance of normal users, and meanwhile prevent criminal acts in advance, so that the access control system becomes an indispensable building safety management mode.
In the existing access control system, an IC card needs to be read and written by a card reader, the card reader writes a password into the IC card, and then the IC card can be used. That is to say, before using, the IC card needs to be read and written by the card reader before use, and the operation is cumbersome and not beneficial to the user.
In addition, when the IC card performs read/write operations, the IC card is not sector encrypted when used, which may cause the IC card to be easily copied by others, and further cause the security performance of the IC card to be poor. Moreover, manufacturers can decrypt and copy the IC card through the original ID number of the IC card, further resulting in poor security of the IC card.
Disclosure of Invention
The invention provides an IC card reading and writing method, aiming at solving the problem that the existing IC card is easy to be copied and stolen by others.
The invention is realized in this way, a IC card read-write method, apply to the intellectual lock, the said IC card read-write method includes:
acquiring a target writing mode for the IC card;
when reading an IC card to be written, acquiring and storing ID information of the IC card to be written;
writing the password information determined according to the target writing mode into the IC card to be written, and storing the password information corresponding to the IC card to be written;
when reading a target IC card, comparing the obtained ID information of the target IC card with each ID information prestored in the intelligent lock;
when the ID information of the target IC card is the same as one piece of target ID information prestored in the intelligent lock, sending target password information corresponding to the target ID information to the target IC card so that the target IC card verifies the received target password information with the written password information;
and when a success value sent when the target IC card is successfully verified is received, controlling the intelligent lock to perform unlocking operation.
Further, the step of writing the password information determined according to the target writing mode into the IC card to be written includes:
when the IC card to be written is read to be a blank card, writing the password information determined according to the target writing mode into the IC card to be written;
when the password information stored in the IC card to be written is read, comparing the obtained ID information of the IC card to be written with each piece of ID information prestored in the intelligent lock;
when the ID information of the IC card to be written is the same as one piece of target ID information prestored in the intelligent lock, sending the password information corresponding to the target ID information to the IC card to be written so that the IC card to be written verifies the received password information with the written password information;
and when a success value sent when the verification of the IC card to be written is successful is received, writing the password information determined according to the target writing mode into the IC card to be written.
Furthermore, when the target writing mode is a first writing mode, a fixed password is used as password information of the IC card to be written;
when the target writing mode is a second writing mode, taking the unique sequence code of the controller in the intelligent lock as the password information of the IC card to be written;
and when the target writing mode is a third writing mode, taking a random password input by a user as the password information of the IC card to be written.
Furthermore, the IC card comprises an ID identification area and a plurality of sectors;
each sector is provided with a password checking area and a data storage area;
ID information is stored in the ID identification area;
password verification data are stored in the password verification area;
password data are stored in the data storage area.
Further, the step of writing the password information determined according to the target writing mode into the IC card to be written includes:
searching the position information of the target sector to be written in the IC card;
writing the password information determined according to the target writing mode into a password verification area in the target sector;
the step of sending the target password information corresponding to the target ID information to the target IC card includes:
when the ID information stored in the ID identification area in the target IC card is read to be the same as one of the pieces of target ID information pre-stored in the intelligent lock, the target password information corresponding to the target ID information is sent to the target IC card, so that the target IC card verifies the received target password information and the password information written in the password verification area.
Further, the step of writing the password information determined according to the target writing mode into the IC card to be written includes:
splitting a password in the password information determined according to the target writing mode into a plurality of sub-password segments;
writing each sub-password segment into a password verification area in each sector of the IC card to be written in sequence;
the step of sending the target password information corresponding to the target ID information to the target IC card includes:
when the ID information stored in the ID identification area in the target IC card is read to be the same as one of the pieces of target ID information prestored in the intelligent lock, sending a first sub-password segment in the target password information corresponding to the target ID information to the target IC card so that the target IC card verifies the received first sub-password segment and a first sub-password segment written into a password verification area in a first sector;
and when receiving a return value sent when the target IC card is successfully verified, sequentially sending other sub-password segments in the target password information to the target IC card so as to sequentially verify the target IC card.
The invention also provides an IC card read-write device, which is applied to the intelligent lock and comprises:
a first acquisition unit configured to acquire a target writing manner for the IC card;
the first storage unit is used for acquiring and storing the ID information of the IC card to be written when the IC card to be written is read;
the first writing unit is used for writing the password information determined according to the target writing mode into the IC card to be written and storing the password information corresponding to the IC card to be written;
the first comparison unit is used for comparing the acquired ID information of the target IC card with each piece of ID information prestored in the intelligent lock when the target IC card is read;
the first sending unit is used for sending target password information corresponding to the target ID information to the target IC card when the ID information of the target IC card is the same as one piece of target ID information prestored in the intelligent lock, so that the target IC card verifies the received target password information and the written password information;
and the first control unit is used for controlling the intelligent lock to unlock when receiving the success value sent when the target IC card is successfully verified.
Still further, the first writing unit includes:
the first writing module is used for writing the password information determined according to the target writing mode into the IC card to be written when the IC card to be written is read to be a blank card;
the first comparison module is used for comparing the acquired ID information of the IC card to be written with each piece of ID information prestored in the intelligent lock when the password information stored in the IC card to be written is read;
the first sending module is used for sending the password information corresponding to the target ID information to the IC card to be written when the ID information of the IC card to be written is the same as one piece of target ID information prestored in the intelligent lock, so that the IC card to be written verifies the received password information and the written password information;
and the second writing module is used for writing the password information determined according to the target writing mode into the IC card to be written when receiving the success value sent when the verification of the IC card to be written is successful.
The present invention also provides a storage medium storing a program that, when executed by a processor, implements the IC card read/write method as set forth in any one of the above.
The invention also provides an intelligent lock, which comprises a memory, a processor and a program which is stored on the memory and can run on the processor, wherein when the processor executes the program, the IC card reading and writing method is realized.
The intelligent lock has the advantages that the target writing mode of the IC card and the ID information of the IC card are directly obtained through the intelligent lock, under the condition that the ID information is identified to be the same as the ID information stored in the intelligent lock, the intelligent lock sends the password information corresponding to the ID information to the IC card, the IC card compares the password information with the password information written by the intelligent lock, and the intelligent lock is controlled to unlock under the condition that the password information is the same as the password information written by the intelligent lock, so that the situation that a manufacturer decrypts and copies the IC card according to the ID number of the IC card or copies the IC card according to the initial password of the IC card is avoided, and the safety performance of the IC card is improved. In addition, the IC card is directly read and written by the intelligent lock, so that the IC card does not need to be read and written by a card reader, the link of reading and writing the IC card by the card reader is omitted, and the IC card is convenient for a user to use.
Drawings
FIG. 1 is a flow chart of the IC card read/write method provided by the present invention;
FIG. 2 is a flowchart of a method for reading and writing an IC card according to the present invention;
FIG. 3 is a flowchart of a method for reading and writing an IC card according to the present invention;
FIG. 4 is a further flowchart of the IC card read/write method of the present invention;
FIG. 5 is a block diagram of an IC card reader/writer according to the present invention;
FIG. 6 is a schematic diagram of another module of the IC card read/write apparatus according to the present invention;
FIG. 7 is a schematic diagram of another module of the IC card reading/writing device according to the present invention;
fig. 8 is another block diagram of the IC card reading/writing apparatus according to the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
According to the invention, the target writing mode of the IC card and the ID information of the IC card are directly obtained by the intelligent lock, under the condition that the ID information is identified to be the same as the ID information stored by the intelligent lock, the intelligent lock sends the password information corresponding to the ID information to the IC card, the IC card compares the password information with the password information written by the intelligent lock, and the intelligent lock is controlled to unlock under the condition that the password information is the same as the password information written by the intelligent lock, so that the situation that a manufacturer decrypts and copies the IC card according to the ID number of the IC card or copies the IC card according to the initial password of the IC card is avoided, and the safety performance of the IC card is improved. In addition, the IC card is directly read and written by the intelligent lock, so that the IC card does not need to be read and written by a card reader, the link of reading and writing the IC card by the card reader is omitted, and the IC card is convenient for a user to use.
Example one
Fig. 1 is a schematic flow chart of a method for reading and writing an IC card according to a first embodiment of the present invention, and only a part related to the embodiment of the present invention is shown for convenience of description. The IC card reading and writing method comprises the following steps:
in step S11, a target writing method for the IC card is acquired.
The target writing method is a writing method of the password information of the IC card. For example, the password may be randomly set by the user, or may be an initial password of the IC card, or may be a password obtained by modifying an original password of the IC card by the user.
When a user needs to encrypt the IC card or modify the password of the IC card, the IC card can be directly encrypted or modified by the intelligent lock, namely, the intelligent lock can write the password into the IC card, so that the user does not need to make the IC card read the card by the card reader, the user can directly read and write by the intelligent lock, and then the step of reading and writing the IC card by the card reader is omitted, the operation is more convenient, and the user experience is improved.
Specifically, there are a plurality of writing methods for the IC card, so that the user can select different writing methods according to different situations, and the password written by the IC card is different in different writing methods. Therefore, the safety performance of the IC card is improved, and the situation that the IC card is easily embezzled is prevented. The specific writing mode of the IC card may be set according to different situations. The specific writing method of the IC card is not limited herein.
Further, the IC Card is an Integrated Circuit Card, which is also called an Integrated Circuit Card, and has the characteristics of small size, large storage capacity, high reliability and strong confidentiality. Thus, the IC card is convenient to carry and use by users.
Further, the IC card includes an ID identification area and a plurality of sectors. Wherein each sector is provided with a password checking area and a data storage area. The ID identification area stores ID information. Password verification data are stored in the password verification area. The data storage area stores cipher data.
In an embodiment of the present invention, the ID identification area can store ID information of the IC card, each sector is provided with a password verification area and a data storage area, the password verification area is used for storing password verification data, and the data storage area is used for storing password data, so that each sector not only has a function of storing a password, but also has a function of verifying a password, that is, when a password needs to be obtained, the password verification needs to be performed first, and thus the sector is encrypted, so that another person cannot directly obtain the password stored in the sector, and further, the security performance of the IC card is further improved.
In step S12, when the IC card to be written is read, the ID information of the IC card to be written is acquired and stored.
In this step, reading the IC card to be written means that the smart lock senses the IC card. For example, when a user attaches an IC card to a sensing area of a smart lock or places the IC card near the sensing area of the smart lock, the smart lock reads the IC card.
The sensing area of the intelligent lock refers to a certain area on the intelligent lock, and when the IC card is placed in the area, the intelligent lock can automatically read the IC card to perform identification and unlocking operations.
Each IC card has ID information, the ID information of each card is different, and under the condition that the IC card is read by the intelligent lock for the first time, the intelligent lock can acquire the ID information of the IC card and store the ID information into the intelligent lock, so the ID information can be stored in the intelligent lock, and under the condition that the IC card is identified next time, the intelligent lock can acquire the ID information of the IC card and then compare the ID information with the stored ID information. When the intelligent lock recognizes that the ID information is the same as the ID information stored in the intelligent lock, namely, the ID information is judged to be the same as the ID information stored in the intelligent lock, and when the ID information is judged to be the same, the intelligent lock performs unlocking operation.
For example, the ID information of the IC card read by the smart lock for the first time is 123456, the smart lock stores the ID information in the smart lock, the IC card is placed in the sensing area of the smart lock again, the smart lock reads the ID information of the IC card again, and the smart lock performs the unlocking operation only when the ID information obtained again is also 123456. If the reacquired ID information is not 123456, for example, if the reacquired ID information is 234567, the smart lock does not perform the unlocking operation.
And step S13, writing the password information determined according to the target writing mode into the IC card to be written, and storing the password information corresponding to the IC card to be written.
In the step, the intelligent lock can write the password information determined by the target writing mode into the IC card, so that the card writing step is completed, namely, the intelligent lock can complete card writing operation directly, the IC card does not need to be subjected to card writing operation through a card reader, and then the link of reading and writing the IC card through the card reader is omitted, so that the IC card is convenient for a user to use.
Further, while the smart lock writes the IC card, the password information corresponding to the IC card is stored in the smart lock, where the password information corresponding to the IC card refers to the password information determined by the target writing method, and as can be seen from the above description, the target writing method may be a password randomly set by the user, or an initial password of the IC card, or a password obtained by modifying an original password of the IC card by the user. That is, in the process of writing the card by the user through the smart lock, the smart lock writes the password set by the user into the IC card and stores the password into the smart lock, so that not only the ID information of the IC card but also the password of the IC card are identified when the smart lock reads the IC card, and the smart lock performs the unlocking operation only when the ID information and the password information stored in the smart lock are the same as those of the IC card, because there are many cases in the writing manner of the password information, the password information is difficult to be copied by others, that is, the password information is not obtained when the user does not inform others of the password, so that the smart lock cannot perform the unlocking operation when the password information is not copied by others, thus increasing the difficulty of stealing the IC card, the safety performance of the IC card is improved.
And step S14, when the target IC card is read, comparing the acquired ID information of the target IC card with each piece of ID information prestored in the intelligent lock.
In this step, when the smart lock reads the IC card, the ID information of the IC card is acquired, and then, as can be seen from the above, the ID information is stored in the smart lock, and at this time, the smart lock compares the acquired ID information of the IC with the ID information stored in the smart lock, and thus, it is determined whether or not the read IC card is recorded in the internal storage area of the smart lock.
And step S15, when the ID information of the target IC card is the same as one of the pre-stored target ID information of the intelligent lock, sending the target password information corresponding to the target ID information to the target IC card so that the target IC card verifies the received target password information and the written password information.
The process of comparing the target ID information refers to a process of acquiring the ID information of the IC card when the smart lock reads the IC card, and then comparing the ID information with the ID information stored in the smart lock itself.
In this step, the smart lock acquires the ID information of the identified IC card, and then compares the ID information with the ID information stored in the smart lock itself, and as can be seen from the above, the smart lock also stores the ID information of the IC card and the password information written in the IC card in the smart lock during the card writing process, that is, both the ID information and the password information of the IC card are stored in the smart lock, and in the case that the ID information acquired by the smart lock is the same as the ID information stored in the smart lock itself, the smart lock transmits the password information corresponding to the ID information to the IC card, and after the password information is acquired by the IC card, the password information is compared with the password information written in the IC card itself, and in the case that the password information is the same as the password information written in the IC card itself, the smart lock performs the unlocking operation, that is, in the case that the password information is different, the intelligent lock can not be unlocked, so that the writing-in mode of the password information is various, the password information corresponding to the writing-in mode is different, the password information can not be copied by other people under the condition that the password information is not leaked, the intelligent lock can not be unlocked under the condition that the password information is not copied by other people, and the safety performance of the IC card can be improved.
For example, suppose that the ID information of the IC card stored in the smart lock itself is 123456, and the password information corresponding to the ID information is 234567. The ID information of the first IC card is 123456, and the password information of the first IC card is 123456. The ID information of the second card is 234567, and the password information of the second card is 234567. The ID information of the third card is 123456, and the password information of the third card is 234567.
When a user places a first IC card in a sensing area or the vicinity of the sensing area of the smart lock, the smart lock acquires ID information of the first IC card and compares the ID information with ID information stored in the smart lock, the ID information of the first IC card is 123456 because the ID information stored in the smart lock is 123456, the ID information of the first IC card is also 123456, at the moment, the two ID information are the same, the smart lock sends password information corresponding to the ID information of 123456 to the IC card, and the password information is 234567 and the password information of the first IC card is 123456, so that the two password information are different. At this time, the smart lock does not perform the unlocking operation.
When a user places a second IC card in the sensing area or the vicinity of the sensing area of the intelligent lock, the intelligent lock acquires the ID information of the second IC card and compares the ID information with the ID information stored in the intelligent lock, the ID information stored in the intelligent lock is 123456, the ID information of the second IC card is also 234567, at the moment, the two ID information are different, and the intelligent lock cannot perform the step of sending the password information.
When a user places a third IC card in the sensing area or the vicinity of the sensing area of the intelligent lock, the intelligent lock acquires the ID information of the third IC card and compares the ID information with the ID information stored in the intelligent lock, the ID information stored in the intelligent lock is 123456, the ID information of the third IC card is also 123456, at the moment, the two ID information are the same, the intelligent lock sends the password information corresponding to the ID information of 123456 to the IC card, and the password information is 234567, the password information of the third IC card is 234567, and the two password information are the same. At this moment, the intelligent lock can perform unlocking operation.
Therefore, the first IC card and the second IC card can not enable the intelligent lock to be unlocked, and the third IC card can enable the intelligent lock to be unlocked. This can improve the security of the IC card.
In addition, as can be seen from the above description, there are various situations in which the target writing manner of the password information of the IC card is different, that is, the password information of each IC card is difficult to copy, that is, the password information cannot be obtained by others without the user informing others of the password, so that the smart lock cannot be unlocked without the others copying the password information, which increases the difficulty of stealing the IC card and improves the security of the IC card.
And step S16, when a success value sent when the target IC card is successfully verified is received, controlling the intelligent lock to unlock.
In this step, when the smart lock recognizes that the ID information of the IC card is the same as the ID information stored in the smart lock itself, the smart lock transmits the password information corresponding to the ID information to the IC card, and the IC card compares the password information with the password information written by the smart lock itself. And under the condition that the two password information are the same, the IC card can send a success value to the intelligent lock, and the intelligent lock carries out unlocking operation according to the success value. That is to say, the unlocking of the smart lock is realized by means of the success value, that is, the smart lock acquires the success value, the smart lock performs the unlocking operation, the smart lock does not acquire the success value, and the smart lock does not perform the unlocking operation.
In this step, the success value may be that the IC card returns an unlocking signal to the smart lock, and the smart lock performs an unlocking operation according to the unlocking signal. It will be appreciated that the form of the success value may be set according to different circumstances. The specific form of the success value is not limited herein. Only after the smart lock receives the success value, the unlocking operation can be performed.
In the embodiment of the invention, the target writing mode of the IC card and the ID information of the IC card are directly obtained through the intelligent lock, under the condition that the ID information is identified to be the same as the ID information stored in the intelligent lock by the intelligent lock, the intelligent lock sends the password information corresponding to the ID information to the IC card, the IC card compares the password information with the password information written by the IC card, and the intelligent lock is controlled to be unlocked under the condition that the password information is the same as the password information written by the IC card, so that the situation that a manufacturer decrypts and copies the IC card according to the ID number of the IC card or copies the IC card according to the initial password of the IC card is avoided, and the safety performance of the IC card is improved. In addition, the IC card is directly read and written by the intelligent lock, so that the IC card does not need to be read and written by a card reader, the link of reading and writing the IC card by the card reader is omitted, and the IC card is convenient for a user to use.
Example two
Fig. 2 is a schematic flow chart of a method for reading and writing an IC card according to a second embodiment of the present invention, and only the relevant portions of the embodiment of the present invention are shown for convenience of description. The second embodiment is substantially the same as the first embodiment, and the difference is that in this embodiment, step S13 includes:
step S131, when the read IC card to be written is a blank card, the password information determined according to the target writing mode is written into the IC card to be written.
The fact that the IC card is a blank card means that no password information is written in the IC card, and at this time, the IC card is defined as a blank card.
The IC card may be an IC card newly acquired by a user, and when the user needs to use the IC card, the user needs to write the IC card to store the password information in the blank card, so that the blank card can store the password information.
In a possible embodiment, the intelligent lock is provided with a password writing key, the key may be a physical key, or the intelligent lock is provided with a touch screen, and the touch screen is provided with the password writing key. Under the condition that the user places the blank card in the induction area of the intelligent lock, the user can write the card through writing in the password keys.
In another possible embodiment, the smart lock is further provided with a plurality of selection keys, for example, an input key, after a user presses or touches a write-in password key, the smart lock prompts the input key, the user can input password information to be set through the input key, after the password information is input, the smart lock acquires the password information and writes the password information into the IC card, and simultaneously the smart lock stores the password information into the smart lock, at this time, the password information written in the IC card is the password information input by the user, for example, the birthday of the user or other numbers with memorial significance, so that the setting of the password is more humanized, the user can select different numbers according to the selection of the user, that is, the security performance of the IC card is improved, and the experience of the user is also improved.
For another example, after the user presses or touches the write-in password key, the smart lock prompts the initial key, and after the user presses or touches the initial key, the smart lock writes the initial password information of the smart lock into the IC card.
For another example, after the user presses or touches the write-in password key, the smart lock prompts the serial key, and after the user presses or touches the serial key, the smart lock writes the unique serial code of the MCU (Microcontroller Unit, micro control Unit, or controller) of the smart lock into the IC card. In addition, the user does not need to want the password, so that the thinking time of the user is saved, and the user experience is improved. Further, the serial code of the controller is generally complex, and when other people want to know the password, the controller needs to be detached from the intelligent lock and cannot be directly acquired, so that the safety performance of the IC card can be improved.
Wherein, above-mentioned intelligent lock can point out input button, initial button, sequence code button can be the input button, initial button, the sequence code button that the touch-sensitive screen of intelligent lock shows, also can be the input button, initial button, the sequence code button that the intelligent lock passes through voice broadcast. And are not limited herein.
Further, in this embodiment, the process of writing the password information of the IC card is that, when the obtained IC card is a blank card, at this time, there is no password information in the IC card, so that the smart lock writes the password information determined by the target writing mode into the blank IC card to make the blank IC card write the password information therein, thereby implementing the process of writing the password, the user does not need to write the blank IC card into the password information through the card reader, the password information writing operation can be directly performed through the smart lock, the operation is simple, and the user experience is improved. Further, when the target writing mode is the first writing mode, the fixed password is used as password information to be written into the IC card; when the target writing mode is a second writing mode, the unique sequence code of the controller in the intelligent lock is used as the password information to be written into the IC card; and when the target writing mode is the third writing mode, taking the random password input by the user as the password information to be written into the IC card.
The target writing mode may be password information set by the user through the smart lock, or initial password information of the smart lock, or a unique serial code of an MCU (Microcontroller Unit, micro control Unit, or controller) of the smart lock, that is, the user may select different target writing modes according to the user's needs, so that the smart lock is more intelligent, and the user can use the smart lock more conveniently. For example, when the user does not want to set the password by himself, the user can select whether to use the initial password information of the smart lock itself or the unique serial code of the MCU of the smart lock itself as the password information of the IC card according to the option of the smart lock. The selection mode is multiple, and the user experience is improved. The user can select different target writing modes according to the self requirement, so that the intelligent lock is more intelligent, and the intelligent lock is convenient for the user to use. For example, when the user does not want to set the password by himself, the user can select whether to use the initial password information of the smart lock itself or the unique serial code of the MCU of the smart lock itself as the password information of the IC card according to the option of the smart lock. The selection mode is multiple, and the user experience is improved.
Step S132, when the password information stored in the IC card to be written is read, comparing the obtained ID information of the IC card to be written with each piece of ID information pre-stored in the intelligent lock.
In one possible example, when the smart lock reads the card, the ID information of the IC card is obtained first, and the ID information is compared with the ID information stored in the smart lock itself. In the case where the ID information is the same as the ID information stored by the smart lock itself, the smart lock may provide the user with two options.
For example, the smart lock is provided with an unlocking button, and when the smart lock recognizes that the ID information is the same as the ID information stored in the smart lock, the smart lock prompts whether an unlocking operation is required. When a user presses or touches an unlocking key, the intelligent lock sends the password information corresponding to the ID information to the IC card, and the IC card compares the password information with the password information stored in the IC card. And under the condition that the two password information are the same, the IC card sends a success value to the intelligent lock, and the intelligent lock performs unlocking operation under the condition that the intelligent lock obtains the success value.
For another example, the smart lock is provided with a change button, and when the smart lock recognizes that the ID information is the same as the ID information stored in the smart lock itself, the smart lock prompts whether a password change operation is required. When the user presses or touches the change key, the smart lock will enter the process of step S131, and it should be noted that, in the case of changing the password, the smart lock will change the original password in the IC card and change the password information corresponding to the ID information stored in the smart lock itself while writing the password information determined by the target writing method into the IC card to be written.
For example, the original password in the IC card is 123456, the original password information stored in the smart lock is also 123456, when the user needs to change the password, the user places the IC card in the sensing area of the smart lock, then selects the change key, after selecting the change key, the smart lock prompts to write the password key, after selecting to write the password key, the user prompts to input the key, and then the user inputs a new password 234567, at this time, the smart lock stores the new password information and replaces the original password information stored in the smart lock, and when the smart lock writes the new password information into the IC card, the smart lock replaces the original password information in the IC card. After the password replacement is completed, the password information written in the IC card is changed to 234567, and the password information stored in the smart lock is changed to 234567.
Step S133, when the ID information to be written into the IC card is the same as one of the target ID information pre-stored in the smart lock, sending the password information corresponding to the ID information to the IC card to be written into, so that the IC card to be written verifies the received password information and the written password information.
In this step, the smart lock compares the obtained ID information of the IC card with ID information stored in the smart lock itself, and if the two are the same, the smart lock sends password information corresponding to the ID information to the IC card, and after receiving the password information, the IC card compares the password information with the password information of the IC card itself, and if the two are the same, the smart lock determines that the IC card is an IC card corresponding to the smart lock, that is, the IC card can be used to unlock the smart lock or to modify the password information through the smart lock.
Further, the password information corresponding to the ID information means that, when the IC card writes a password through the smart lock, the smart lock acquires the ID information of the IC card and stores the ID information into the smart lock, and when the password information determined according to the target writing method is written into the IC card to be written, the smart lock stores the password information into the smart lock, and at this time, both the ID information and the password information are stored into the smart lock, and the password information corresponding to the ID information is the password information.
And step S134, writing the password information determined according to the target writing mode into the IC card to be written when the success value sent when the verification of the IC card to be written is successful is received.
In this step, the success value may be that the IC card returns a modification signal to the smart lock, and the smart lock performs a password modification operation on the IC card according to the modification signal. It will be appreciated that the form of the success value may be set according to different circumstances. The specific form of the success value is not limited herein. Only after the smart lock receives the success value, the unlocking operation can be performed.
Further, in this embodiment, the process of modifying the password information of the IC card is that, when the obtained IC card is not a blank card, at this time, the password information is stored in the IC card, the smart lock obtains the ID information of the IC card and compares the ID information with the ID information stored in the smart lock itself, and when it is recognized that the ID information is the same as the ID information stored in the smart lock itself, the smart lock sends the password information corresponding to the ID information to the IC card, so that the IC card compares the received password information with the written password information, and when it is recognized that the password information received by the IC card is the same as the written password information, the IC card returns a success value to the smart lock, and when the smart lock receives the success value, the password information determined by the target writing method is written into the IC card. That is, when the user needs to modify the password information, the IC card needs to be verified first, and when the verification is successful, the smart lock writes the IC card, and when the verification is unsuccessful, the smart lock does not write the IC card. For example, when a user needs to modify password information, the user needs to compare an IC card with a smart lock, the smart lock compares ID information of the IC card, after the comparison is successful, password information corresponding to the ID information is sent to the IC card, the IC card compares the acquired password information with password information of the IC card, when the comparison is successful, a success value is returned to the smart lock, when the smart lock receives the success value, different target writing methods are provided for the user, the user can select different target writing methods according to his or her own selection, after the target writing methods are completed, the smart lock writes the password information determined by the target writing methods into the IC card, and at this time, the password of the IC is a new password.
So set up, the user can directly carry out the operation that the password was write in and the password is revised through the intelligence lock, need not to accomplish above-mentioned operation through the card reader, and convenient and fast promotes user's experience.
EXAMPLE III
Please refer to fig. 3, which is a flowchart illustrating a method for reading and writing an IC card according to a third embodiment of the present invention, and for convenience of description, only the parts related to the embodiment of the present invention are shown. The third embodiment is substantially the same as the first embodiment, and the difference is that in this embodiment, the step S13 includes:
in step S135, the position information of the target sector to be written in the IC card is searched.
As can be seen from the first embodiment, the IC card includes a plurality of sectors, each sector is provided with a password verification area and a data storage area, each sector can store password information, and each sector stores different password information, so that it is necessary to first search the location information of the target sector in the IC card and then write the password information into the corresponding sector, instead of writing all the password information into different sectors.
Step S136, writing the password information determined according to the target writing mode into the password verification area in the target sector.
In this step, the password information determined by the target writing method is the target writing method in the first embodiment, that is, in the card writing process of the IC card, the password information is written into the target sector, that is, the target sector searched in the step S135, instead of randomly writing the password information into one sector. Therefore, the password information is convenient to store, and is not easy to be found by other people, so that the safety performance of the IC card is improved.
Step S15 includes:
step S151, when the ID information stored in the ID identification area in the target IC card is read to be the same as one of the target ID information in each piece of ID information pre-stored in the intelligent lock, the target password information corresponding to the target ID information is sent to the target IC card, so that the target IC card verifies the received target password information and the password information written in the password verification area.
In this step, the password verification area stores password information, which is password information written by the IC card, as can be seen from the first embodiment, after the IC card is read by the smart lock, ID information of the IC card is obtained, and then the ID information is compared with ID information stored by the smart lock itself, if the two are the same, the smart lock sends the password information corresponding to the ID information to the IC card, the IC card compares the obtained password information with the password information written by the IC card itself, and when the password information obtained by the IC card is the same as the password information written by the IC card itself, the IC card sends a success value to the smart lock, and after the smart lock obtains the success value, the unlocking operation is performed or the password operation is modified. The password verification area just stores the password information written by the IC card, so that the password information acquired by the IC card can be verified and compared in the password verification area.
In this embodiment, when the smart lock sends the password information determined by the target writing mode to the IC card, because the IC card has a plurality of sectors, at this time, the smart lock searches for the position information of the target sector in the IC card, and writes the password information determined by the target writing mode into the password verification area of the target sector when the position of the target sector is found, so that when another person wants to copy the password, the password information can be obtained only after the password is verified, thereby improving the security performance of the IC card. When the ID information is compared, the intelligent lock firstly acquires the ID information stored in the ID recognizer in the IC card, then the ID information is compared with the ID information stored in the intelligent lock, when the ID information stored in the ID recognizer in the IC card is the same as the ID information stored in the intelligent lock, the intelligent lock sends the target password information corresponding to the ID information to the IC card, so that the IC card verifies the received target password information and the password information stored in the password verification area, when the verification is successful, a success value is returned to the intelligent lock, and the intelligent lock performs unlocking operation or password modification operation according to the success value.
Example four
Please refer to fig. 4, which is a flowchart illustrating a method for reading and writing an IC card according to a fourth embodiment of the present invention, and for convenience of description, only the relevant portions of the embodiment of the present invention are shown. The fourth embodiment is substantially the same as the first embodiment, and the difference is that in this embodiment, the step S13 includes:
step S137, the password in the password information determined according to the target writing mode is split into a plurality of sub-password segments.
Splitting the password in the password information into a plurality of sub-password segments means that a complete password is split into a plurality of sub-password segments, and the combination of the plurality of sub-password segments is the complete password. In this way, it is possible to prevent the password information from being stored in one sector and easily acquired by others. Thereby improving the safety performance of the IC card.
For example, the password determined by the target writing mode is 123456, and at this time, the smart lock may split the password into a plurality of different sub-password segments, for example, into three sub-password segments, which are 12, 34, and 56, respectively. For another example, six sub-cipher segments may be split, which are 1, 2, 3, 4, 5, 6, respectively. The number of specific splits can be designed according to different situations. The specific number of sub-cryptographic segments is not limited herein.
Step S138, sequentially writing each sub-password segment into the password verification area in each sector of the IC card to be written.
In step S137, the smart lock splits the password in the password information determined by the target writing method into a plurality of sub-password segments. After the splitting is completed, the smart lock writes these sub-password fragments into the password verification area of each sector of the IC card. That is, the complete password information does not exist in one sector of the IC card, and one complete password information can be formed after combining the sectors to be written in the sub-password segments. Thus, the security performance of the IC is higher due to the dispersed arrangement, and other people are not easy to acquire the whole password information.
Step S15 includes:
step S152, when the ID information stored in the ID identification area in the read target IC card is the same as one of the pieces of target ID information pre-stored in the intelligent lock, the first sub-password segment in the target password information corresponding to the target ID information is sent to the target IC card, so that the target IC card verifies the received first sub-password segment with the first sub-password segment written into the password verification area in the first sector.
In this step, after the smart lock compares the IC card successfully, the smart lock splits the target password information corresponding to the target password information to form a plurality of sub-password segments, and then first sends the first sub-password segment to the IC card, and the IC card compares the first sub-password segment with the sub-password segment in the first sector of the IC card, and further unlocks the smart lock or modifies the password operation if the first sub-password segment is the same as the sub-password segment in the first sector of the IC card.
And step S153, when receiving the return value sent when the target IC card is successfully verified, sequentially sending other sub-password segments in the target password information to the target IC card so as to sequentially verify the target IC card.
In the step, after the sub-password segments in the first sector of the IC card are the same as the first sub-password segments, the IC card returns a success value to the smart lock, the smart lock sends the second sub-password segment to the IC card after obtaining the success value, the IC card compares the second sub-password segment with the sub-password segments in the second sector of the IC card, after the two are the same, the IC card continues to send the success value to the smart lock, the smart lock continues to send the third sub-password segment to the IC card after obtaining the success value, and the process is repeated until all the sub-password segments of the smart lock are completely compared with and identical to the sub-password segments of different sectors of the IC card, the third sub-password segment is sent to the smart lock again, and the smart lock performs an unlocking operation or a password modifying operation according to the success value.
In this embodiment, the smart lock first obtains the ID information stored in the ID identification area of the IC card, compares the obtained ID information stored in the ID identification area of the IC card with one of the target ID information pre-stored in the smart lock, and when it is recognized that the obtained ID information stored in the ID identification area of the IC card is the same as one of the target IDs of the ID information pre-stored in the smart lock, sends the first sub-password segment in the target password information corresponding to the target ID information to the target IC card, so that the target IC card verifies the received first sub-password segment with the first sub-password segment written in the password verification area of the first sector, and when it is recognized that the received first sub-password segment of the target IC card is the same as the first sub-password segment written in the password verification area of the first sector, the IC card returns the first success value to the smart lock, after receiving the first success value, the smart lock sends the second sub-password segment in the target password information corresponding to the target ID information to the target IC card, so that the target IC card verifies the received second sub-password segment with the second sub-password segment written in the password verification area in the second sector, when the second sub-password segment received by the target IC card is the same as the second sub-password segment written in the password verification area in the second sector, the IC card returns the second success value to the smart lock, after receiving the second success value, the smart lock sends the third sub-password segment to the IC card again, after returning the third success value, the IC card sends the fourth sub-password segment to the IC card again, and so on until the verification of all the sub-password segments in the target password information corresponding to the target ID information and all the verification areas in the IC card is completed, the unlocking operation can be carried out, so that the verification process is not easy to crack, the safety performance of the IC card is improved, and other people are not easy to copy the IC card.
EXAMPLE five
Fig. 5 is a schematic structural diagram of an IC card reading/writing apparatus according to a fifth embodiment of the present invention, and only the relevant portions of the embodiment of the present invention are shown for convenience of description. The IC card read/write apparatus 100 includes:
a first acquisition unit 10 for acquiring a target writing pattern for the IC card;
a first storage unit 20 configured to acquire and store ID information to be written into an IC card when the IC card to be written is read;
the first writing unit 30 is configured to write the password information determined according to the target writing mode into the IC card to be written, and store the password information corresponding to the IC card to be written;
the first comparison unit 40 is used for comparing the acquired ID information of the target IC card with each piece of ID information prestored in the intelligent lock when the target IC card is read;
a first sending unit 50, when the ID information of the target IC card is the same as one of the target ID information pre-stored in the smart lock, for the target IC card to verify the received target password information and the written password information;
and the first control unit 60 is configured to control the smart lock to perform an unlocking operation when receiving a success value sent when the verification of the target IC card is successful.
Further, when the target writing mode is a first writing mode, a fixed password is used as password information of the IC card to be written;
when the target writing mode is a second writing mode, taking the unique sequence code of the controller in the intelligent lock as the password information of the IC card to be written;
and when the target writing mode is a third writing mode, taking a random password input by a user as the password information of the IC card to be written.
Furthermore, the IC card comprises an ID identification area and a plurality of sectors;
each sector is provided with a password checking area and a data storage area;
ID information is stored in the ID identification area;
password verification data are stored in the password verification area;
password data are stored in the data storage area.
In the embodiment of the invention, the target writing mode of the IC card and the ID information of the IC card are directly obtained through the intelligent lock, under the condition that the ID information is identified to be the same as the ID information stored in the intelligent lock by the intelligent lock, the intelligent lock sends the password information corresponding to the ID information to the IC card, the IC card compares the password information with the password information written by the IC card, and the intelligent lock is controlled to be unlocked under the condition that the password information is the same as the password information written by the IC card, so that the situation that a manufacturer decrypts and copies the IC card according to the ID number of the IC card or copies the IC card according to the initial password of the IC card is avoided, and the safety performance of the IC card is improved. In addition, the IC card is directly read and written by the intelligent lock, so that the IC card does not need to be read and written by a card reader, the link of reading and writing the IC card by the card reader is omitted, and the IC card is convenient for a user to use.
Specifically, the IC card reading/writing apparatus 100 according to the fifth embodiment of the present invention has the same implementation principle and technical effect as the foregoing embodiment of the IC card reading/writing method, and for brief description, reference may be made to the corresponding contents in the foregoing first embodiment of the method for describing the fifth embodiment of the IC card reading/writing apparatus 100.
EXAMPLE six
Fig. 6 is a schematic structural diagram of an IC card reading/writing apparatus according to a sixth embodiment of the present invention, and only the relevant portions to the embodiment of the present invention are shown for convenience of description. In this embodiment, the first writing unit 30 of the IC card reading/writing apparatus includes:
the first writing module 301 is configured to write the password information determined according to the target writing mode into the IC card to be written when the IC card to be written is read as a blank card;
the first comparison module 302 is used for comparing the acquired ID information of the IC card to be written with each piece of ID information prestored in the intelligent lock when the password information stored in the IC card to be written is read;
the first sending module 303 is configured to send password information corresponding to the ID information to the IC card to be written when the ID information of the IC card to be written is the same as one of target ID information prestored in the smart lock, so that the IC card to be written checks the received password information and the written password information;
the second writing module 304 is configured to, when a success value sent when the IC card to be written is successfully verified is received, write the password information determined according to the target writing method into the IC card to be written.
Specifically, the IC card reading/writing apparatus 100 according to the sixth embodiment of the present invention has the same implementation principle and technical effect as the foregoing embodiment of the IC card reading/writing method, and for brief description, reference may be made to the corresponding contents in the foregoing embodiment of the method for the sixth embodiment of the IC card reading/writing apparatus 100.
EXAMPLE seven
Fig. 7 is a schematic structural diagram of an IC card reading/writing apparatus according to a seventh embodiment of the present invention, and only the relevant portions to the embodiment of the present invention are shown for convenience of description. In this embodiment, the first writing unit 30 of the IC card reading/writing apparatus includes:
a searching module 305, configured to search for location information of a target sector to be written in the IC card;
a third writing module 306, configured to write the password information determined according to the target writing method into a password verification area in the target sector;
the first transmission unit 50 includes:
a second sending module 501, configured to send target password information corresponding to the target ID information to the target IC card when the ID information stored in the ID identification area read into the target IC card is the same as one of the target ID information in each piece of ID information pre-stored in the smart lock, so that the target IC card verifies the received target password information with the password information written in the password verification area.
Specifically, the IC card reading/writing apparatus 100 according to the seventh embodiment of the present invention has the same implementation principle and technical effect as the foregoing embodiment of the IC card reading/writing method, and for brief description, reference may be made to the corresponding contents in the foregoing embodiment of the method for describing the seventh embodiment of the IC card reading/writing apparatus 100.
Example eight
Fig. 8 is a schematic structural diagram of an IC card reading/writing apparatus according to an eighth embodiment of the present invention, and only the relevant portions to the embodiment of the present invention are shown for convenience of description. In this embodiment, the first writing unit 30 of the IC card reading/writing apparatus includes:
a first splitting module 307, configured to split a password in the password information determined according to the target writing method into multiple sub-password segments;
a fourth writing module 308, configured to sequentially write each sub-password segment into a password verification area in each sector of the IC card to be written;
the first transmission unit 50 includes:
a third sending module 502, configured to send a first sub-password segment in the target password information corresponding to the target ID information to the target IC card when the ID information stored in the ID identification area read in the target IC card is the same as one of the target ID information pre-stored in the smart lock, so that the target IC card verifies the received first sub-password segment with the first sub-password segment written in the password verification area in the first sector;
and a fourth reading module 503, configured to, when receiving the return value sent when the verification of the target IC card is successful, send other sub-password segments in the target password information to the target IC card in sequence, so that the target IC card is verified in sequence.
Specifically, the IC card reading/writing apparatus 100 according to the eighth embodiment of the present invention has the same implementation principle and technical effect as the foregoing embodiment of the IC card reading/writing method, and for brief description, reference may be made to corresponding contents in the foregoing embodiment of the method for describing the eighth embodiment of the IC card reading/writing apparatus 100.
Example nine
The present invention also provides an embodiment of a storage medium storing a program that, when executed by a processor, implements the IC card read/write method according to any one of the above embodiments.
For the purposes of this description, a "storage medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the storage medium include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). In addition, the storage medium may even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in the storage medium.
In the embodiment of the invention, the target writing mode of the IC card and the ID information of the IC card are directly obtained through the intelligent lock, under the condition that the ID information is identified to be the same as the ID information stored in the intelligent lock by the intelligent lock, the intelligent lock sends the password information corresponding to the ID information to the IC card, the IC card compares the password information with the password information written by the IC card, and the intelligent lock is controlled to be unlocked under the condition that the password information is the same as the password information written by the IC card, so that the situation that a manufacturer decrypts and copies the IC card according to the ID number of the IC card or copies the IC card according to the initial password of the IC card is avoided, and the safety performance of the IC card is improved. In addition, the IC card is directly read and written by the intelligent lock, so that the IC card does not need to be read and written by a card reader, the link of reading and writing the IC card by the card reader is omitted, and the IC card is convenient for a user to use.
Example ten
The invention also provides an embodiment of a smart lock, which comprises a memory (for example, a nonvolatile storage medium), a processor and a program stored on the memory and capable of running on the processor, wherein when the processor executes the program, the IC card reading and writing method of any one of the above embodiments is implemented.
So configured, the memory may store a computer program. The computer program is executable by a processor to implement the IC card reading and writing method of any of the above embodiments. The processor can be used for providing calculation and control capability and supporting the work of the whole intelligent lock.
Wherein, the intelligent lock can be connected with the processor and the memory through a system bus.
In the embodiment of the invention, the target writing mode of the IC card and the ID information of the IC card are directly obtained through the intelligent lock, under the condition that the ID information is identified to be the same as the ID information stored in the intelligent lock by the intelligent lock, the intelligent lock sends the password information corresponding to the ID information to the IC card, the IC card compares the password information with the password information written by the IC card, and the intelligent lock is controlled to be unlocked under the condition that the password information is the same as the password information written by the IC card, so that the situation that a manufacturer decrypts and copies the IC card according to the ID number of the IC card or copies the IC card according to the initial password of the IC card is avoided, and the safety performance of the IC card is improved. In addition, the IC card is directly read and written by the intelligent lock, so that the IC card does not need to be read and written by a card reader, the link of reading and writing the IC card by the card reader is omitted, and the IC card is convenient for a user to use.
The present invention is not limited to the above preferred embodiments, and any modifications, equivalent substitutions and improvements made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. An IC card read-write method is applied to an intelligent lock, and is characterized by comprising the following steps:
acquiring a target writing mode for the IC card;
when reading an IC card to be written, acquiring and storing ID information of the IC card to be written;
writing the password information determined according to the target writing mode into the IC card to be written, and storing the password information corresponding to the IC card to be written;
when reading a target IC card, comparing the obtained ID information of the target IC card with each ID information prestored in the intelligent lock;
when the ID information of the target IC card is the same as one piece of target ID information prestored in the intelligent lock, sending target password information corresponding to the target ID information to the target IC card so that the target IC card verifies the received target password information with the written password information;
and when a success value sent when the target IC card is successfully verified is received, controlling the intelligent lock to perform unlocking operation.
2. The IC card read-write method according to claim 1, wherein the step of writing the password information determined according to the target writing method into the IC card to be written comprises:
when the IC card to be written is read to be a blank card, writing the password information determined according to the target writing mode into the IC card to be written;
when the password information stored in the IC card to be written is read, comparing the obtained ID information of the IC card to be written with each piece of ID information prestored in the intelligent lock;
when the ID information of the IC card to be written is the same as one piece of target ID information prestored in the intelligent lock, sending the password information corresponding to the target ID information to the IC card to be written so that the IC card to be written verifies the received password information with the written password information;
and when a success value sent when the verification of the IC card to be written is successful is received, writing the password information determined according to the target writing mode into the IC card to be written.
3. The IC card read-write method according to claim 1, wherein when the target write mode is a first write mode, a fixed password is used as the password information of the IC card to be written;
when the target writing mode is a second writing mode, taking the unique sequence code of the controller in the intelligent lock as the password information of the IC card to be written;
and when the target writing mode is a third writing mode, taking a random password input by a user as the password information of the IC card to be written.
4. The IC card read-write method according to claim 2, wherein the IC card includes an ID identification area and a plurality of sectors;
each sector is provided with a password checking area and a data storage area;
ID information is stored in the ID identification area;
password verification data are stored in the password verification area;
password data are stored in the data storage area.
5. The IC card read-write method according to claim 4, wherein the step of writing the password information determined according to the target writing method into the IC card to be written includes:
searching the position information of the target sector to be written in the IC card;
writing the password information determined according to the target writing mode into a password verification area in the target sector;
the step of sending the target password information corresponding to the target ID information to the target IC card includes:
when the ID information stored in the ID identification area in the target IC card is read to be the same as one of the pieces of target ID information pre-stored in the intelligent lock, the target password information corresponding to the target ID information is sent to the target IC card, so that the target IC card verifies the received target password information and the password information written in the password verification area.
6. The IC card read-write method according to claim 4, wherein the step of writing the password information determined according to the target writing method into the IC card to be written includes:
splitting a password in the password information determined according to the target writing mode into a plurality of sub-password segments;
writing each sub-password segment into a password verification area in each sector of the IC card to be written in sequence;
the step of sending the target password information corresponding to the target ID information to the target IC card includes:
when the ID information stored in the ID identification area in the target IC card is read to be the same as one of the pieces of target ID information prestored in the intelligent lock, sending a first sub-password segment in the target password information corresponding to the target ID information to the target IC card so that the target IC card verifies the received first sub-password segment and a first sub-password segment written into a password verification area in a first sector;
and when receiving a return value sent when the target IC card is successfully verified, sequentially sending other sub-password segments in the target password information to the target IC card so as to sequentially verify the target IC card.
7. An IC card read-write device is applied to an intelligent lock, and is characterized by comprising:
a first acquisition unit configured to acquire a target writing manner for the IC card;
the first storage unit is used for acquiring and storing the ID information of the IC card to be written when the IC card to be written is read;
the first writing unit is used for writing the password information determined according to the target writing mode into the IC card to be written and storing the password information corresponding to the IC card to be written;
the first comparison unit is used for comparing the acquired ID information of the target IC card with each piece of ID information prestored in the intelligent lock when the target IC card is read;
the first sending unit is used for sending target password information corresponding to the target ID information to the target IC card when the ID information of the target IC card is the same as one piece of target ID information prestored in the intelligent lock, so that the target IC card verifies the received target password information and the written password information;
and the first control unit is used for controlling the intelligent lock to unlock when receiving the success value sent when the target IC card is successfully verified.
8. The IC card read-write apparatus according to claim 7, wherein the first writing unit includes:
the first writing module is used for writing the password information determined according to the target writing mode into the IC card to be written when the IC card to be written is read to be a blank card;
the first comparison module is used for comparing the acquired ID information of the IC card to be written with each piece of ID information prestored in the intelligent lock when the password information stored in the IC card to be written is read;
the first sending module is used for sending the password information corresponding to the target ID information to the IC card to be written when the ID information of the IC card to be written is the same as one piece of target ID information prestored in the intelligent lock, so that the IC card to be written verifies the received password information and the written password information;
and the second writing module is used for writing the password information determined according to the target writing mode into the IC card to be written when receiving the success value sent when the verification of the IC card to be written is successful.
9. A storage medium storing a program that realizes the IC card read/write method according to any one of claims 1 to 6 when executed by a processor.
10. An intelligent lock, characterized in that the intelligent lock comprises a memory, a processor and a program stored on the memory and capable of running on the processor, and the processor executes the program to realize the IC card reading and writing method according to any one of claims 1 to 6.
CN201911256550.9A 2019-12-10 2019-12-10 IC card read-write method and device, storage medium and intelligent lock Active CN111144520B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911256550.9A CN111144520B (en) 2019-12-10 2019-12-10 IC card read-write method and device, storage medium and intelligent lock

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911256550.9A CN111144520B (en) 2019-12-10 2019-12-10 IC card read-write method and device, storage medium and intelligent lock

Publications (2)

Publication Number Publication Date
CN111144520A true CN111144520A (en) 2020-05-12
CN111144520B CN111144520B (en) 2023-09-29

Family

ID=70517879

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911256550.9A Active CN111144520B (en) 2019-12-10 2019-12-10 IC card read-write method and device, storage medium and intelligent lock

Country Status (1)

Country Link
CN (1) CN111144520B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112435373A (en) * 2020-11-24 2021-03-02 惠州拓邦电气技术有限公司 Electronic lock work control method and device and electronic lock
CN114360110A (en) * 2022-01-06 2022-04-15 广东汇泰龙科技股份有限公司 IC card encryption method, IC card verification method, device, equipment and medium
CN115471939A (en) * 2022-08-31 2022-12-13 广东好太太智能家居有限公司 IC card automatic encryption adding method, entrance guard equipment and readable medium
CN116645751A (en) * 2023-06-27 2023-08-25 深圳市亲邻科技有限公司 IC card information changing method and system

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06236324A (en) * 1993-02-08 1994-08-23 Toshiba Corp Information managing device
US6362868B1 (en) * 1997-07-15 2002-03-26 Silverbrook Research Pty Ltd. Print media roll and ink replaceable cartridge
WO2012159521A1 (en) * 2011-05-23 2012-11-29 中国移动通信有限公司 Method, system and apparatus for implementing over-the-air card writing
JP2013200711A (en) * 2012-03-26 2013-10-03 Kddi Corp Security lock method and terminal for multiple ic card modules
CN104318278A (en) * 2014-10-11 2015-01-28 广州日滨科技发展有限公司 IC (Integrated Circuit) card write-in method and system and IC card reading method and system
CN104809618A (en) * 2014-01-27 2015-07-29 上海高研明鉴信息技术有限公司 Radio frequency identification tag-based product anti-counterfeiting method
CN205091722U (en) * 2015-11-10 2016-03-16 佛山市汇泰龙智能科技有限公司 Receive response subassembly and induction system of touch signal and response card signal
CN109872426A (en) * 2019-02-18 2019-06-11 广州视声智能科技有限公司 IC card encryption and authentication method and system

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06236324A (en) * 1993-02-08 1994-08-23 Toshiba Corp Information managing device
US6362868B1 (en) * 1997-07-15 2002-03-26 Silverbrook Research Pty Ltd. Print media roll and ink replaceable cartridge
WO2012159521A1 (en) * 2011-05-23 2012-11-29 中国移动通信有限公司 Method, system and apparatus for implementing over-the-air card writing
JP2013200711A (en) * 2012-03-26 2013-10-03 Kddi Corp Security lock method and terminal for multiple ic card modules
CN104809618A (en) * 2014-01-27 2015-07-29 上海高研明鉴信息技术有限公司 Radio frequency identification tag-based product anti-counterfeiting method
CN104318278A (en) * 2014-10-11 2015-01-28 广州日滨科技发展有限公司 IC (Integrated Circuit) card write-in method and system and IC card reading method and system
CN205091722U (en) * 2015-11-10 2016-03-16 佛山市汇泰龙智能科技有限公司 Receive response subassembly and induction system of touch signal and response card signal
CN109872426A (en) * 2019-02-18 2019-06-11 广州视声智能科技有限公司 IC card encryption and authentication method and system

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112435373A (en) * 2020-11-24 2021-03-02 惠州拓邦电气技术有限公司 Electronic lock work control method and device and electronic lock
CN114360110A (en) * 2022-01-06 2022-04-15 广东汇泰龙科技股份有限公司 IC card encryption method, IC card verification method, device, equipment and medium
CN115471939A (en) * 2022-08-31 2022-12-13 广东好太太智能家居有限公司 IC card automatic encryption adding method, entrance guard equipment and readable medium
CN115471939B (en) * 2022-08-31 2024-02-09 广东好太太智能家居有限公司 IC card automatic encryption adding method, access control equipment and readable medium
CN116645751A (en) * 2023-06-27 2023-08-25 深圳市亲邻科技有限公司 IC card information changing method and system
CN116645751B (en) * 2023-06-27 2023-11-24 深圳市亲邻科技有限公司 IC card information changing method and system

Also Published As

Publication number Publication date
CN111144520B (en) 2023-09-29

Similar Documents

Publication Publication Date Title
CN111144520B (en) IC card read-write method and device, storage medium and intelligent lock
JP4728120B2 (en) System and method for protecting portable data
US20200082656A1 (en) Fingerprint recognition and nfc-based unlocking method and system using mobile terminal
CN110136306B (en) Vehicle key control method and system
EP3885205A1 (en) Car key control method and apparatus
US20070140533A1 (en) Input device with a fingerprint recognizing mechanism
US10444792B2 (en) Unlocking control system, method and wearable device using the same
US8719922B2 (en) Sensory association passcode
JP4977542B2 (en) Information retrieval display device
US7581114B2 (en) Image processing system, scanner, and terminal apparatus
CN105184133A (en) Authentication method and apparatus, and corresponding mobile terminal
EP1450235B1 (en) Memory device
CN110929302A (en) Data security encryption storage method and storage device
US10523669B2 (en) Server, IC card processing apparatus, and IC card processing system
JP2005208993A (en) User authentication system
CN110807186B (en) Method, device, equipment and storage medium for safe storage of storage equipment
CN111818376A (en) Password setting method, smart television, electronic equipment and readable storage medium
CN101303670B (en) Storage device and control method thereof
JP2009122833A (en) Application processor, application processing method, program thereof and embedded equipment
JP2007004698A (en) Electronic equipment with responsible person authentication function
JP4683880B2 (en) Authentication terminal device, authentication system, authentication method, and authentication program
CN111488620A (en) File processing method and device, mobile terminal and storage medium
CN112434273B (en) Database management method and device based on user verification
KR20110101271A (en) Method and device for securing data stored in a portable data managing device such as a usb device
CN115438374A (en) Data reading method, device, equipment, system and medium in storage equipment

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