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

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

Info

Publication number
CN111144520B
CN111144520B CN201911256550.9A CN201911256550A CN111144520B CN 111144520 B CN111144520 B CN 111144520B CN 201911256550 A CN201911256550 A CN 201911256550A CN 111144520 B CN111144520 B CN 111144520B
Authority
CN
China
Prior art keywords
card
target
password
information
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.)
Active
Application number
CN201911256550.9A
Other languages
Chinese (zh)
Other versions
CN111144520A (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

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 applicable to the technical field of data processing, and provides an IC card read-write method, an IC card read-write device, a storage medium and an intelligent lock, wherein the method comprises the following steps: acquiring a target writing mode for an IC card; when the IC card to be written is read, 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 the target IC card is read, comparing the acquired ID information of the target IC card with each piece of ID information stored in advance by the intelligent lock; when the comparison is the same, the target password information corresponding to the target ID information is sent to the target IC card, so that the target IC card checks the target password information with the written password information; and when a success value sent when the verification of the target IC card is successful is received, controlling the intelligent lock to unlock. The IC card read-write 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 and 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 read-write method, an IC card read-write device, a storage medium and an intelligent lock.
Background
With the rapid development of economic technology, security protection becomes an important social problem at present, and digital security management is increasingly favored by people due to the sudden rapid progress of network, communication and microelectronic technologies and the characteristics of intuitiveness, convenience, rich content and the like. Particularly, for buildings such as office buildings and residential buildings with excessive daily entrance and exit flows, the access control system can rapidly identify registered users and unregistered users, ensure the entrance of normal users, and prevent criminals from happening, 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 through a card reader, the card reader writes a password into the IC card, and then the IC card can be used. That is, before the IC card is used, the IC card can be used after the reading and writing operations are performed through the card reader, so that the operation is complicated, and the IC card is not beneficial to users.
In addition, when the IC card performs read-write operation, the use of the IC card does not perform sector encryption, so that the IC card is easily copied by others, and the security performance of the IC card is poor. And, the manufacturer can decrypt and copy the IC card through the original ID number of the IC card, further resulting in poor security performance of the IC card.
Disclosure of Invention
The invention provides an IC card read-write method, which aims to solve the problem that the existing IC card is easy to copy and misappropriate by others.
The invention is realized in such a way that an IC card read-write method is applied to an intelligent lock, and the IC card read-write method comprises the following steps:
acquiring a target writing mode for an IC card;
when an IC card to be written is read, 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 the target IC card is read, comparing the acquired ID information of the target IC card with each piece of ID information stored in advance by the intelligent lock;
when the ID information of the target IC card is identical to one of the target ID information stored in advance by 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 checks the received target password information with the written password information;
and when a success value sent when the target IC card is successfully checked is received, controlling the intelligent lock to unlock.
Still further, the step of writing the password information determined according to the target writing manner into the IC card to be written includes:
When the IC card to be written is read as 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 is stored in the IC card to be written is read, comparing the acquired ID information of the IC card to be written with each piece of ID information stored in advance by the intelligent lock;
when the ID information of the IC card to be written is identical to one of the target ID information stored in advance by 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 checks the received password information with the written password information;
and when receiving a success value sent when the verification of the IC card to be written is successful, writing the password information determined according to the target writing mode into the IC card to be written.
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 the random password input by the user as the password information of the IC card to be written.
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;
the password verification area stores password verification data;
the data storage area stores password data.
Still further, the step of writing the password information determined according to the target writing manner into the IC card to be written includes:
searching the position information of the target sector in the IC card to be written;
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 and compared with one of the ID information stored in advance 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 checks the received target password information with the password information in the written password checking area.
Still further, the step of writing the password information determined according to the target writing manner into the IC card to be written includes:
splitting the password in the password information determined according to the target writing mode into a plurality of sub-password fragments;
sequentially writing each sub-password fragment into a password verification area in each sector of the IC card to be written;
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 and compared with one of the pre-stored ID information of each ID information of the intelligent lock, a first sub-password fragment in the target password information corresponding to the target ID information is sent to the target IC card, so that the target IC card checks the received first sub-password fragment with the first sub-password fragment in the password check area in the written first sector;
and when receiving a return value sent when the verification of the target IC card is successful, sequentially sending other sub-password fragments in the target password information to the target IC card so as to enable the target IC card to perform the sequential verification.
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 write pattern for an IC card;
a first storage unit for acquiring and storing ID information of an 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 pre-stored ID information of the intelligent lock when the target IC card is read;
a first sending unit, configured to send target password information corresponding to the target ID information to the target IC card when the ID information of the target IC card is identical to one of the target ID information stored in advance in the smart lock, so that the target IC card verifies the received target password information with the written password information;
and the first control unit is used for controlling the intelligent lock to unlock when receiving a success value sent when the target IC card is successfully checked.
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 as a blank card;
the first comparison module is used for comparing the acquired ID information to be written into the IC card with each piece of pre-stored ID information of the intelligent lock when the password information is stored in the IC card to be written into the IC card;
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 of the target ID information stored in advance by the intelligent lock, so that the IC card to be written checks the received password information with 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 which, when executed by a processor, implements the IC card read-write method according to any one of the above.
The invention also provides an intelligent lock, which comprises a memory, a processor and a program stored on the memory and capable of running on the processor, wherein the processor realizes the IC card read-write method according to any one of the above when executing the program.
The method 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, when the intelligent lock recognizes that the ID information is identical to the ID information stored by the intelligent lock, the intelligent lock can send 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 unlock only when the password information is identical to 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 intelligent lock is used for directly performing read-write operation on the IC card, so that the IC card does not need to be subjected to read-write operation through a card reader, the link of performing read-write operation on the IC card through the card reader is omitted, and a user can use the IC card conveniently.
Drawings
FIG. 1 is a flow chart of the IC card read-write method provided by the invention;
fig. 2 is a flowchart of an IC card read-write method according to the present invention;
FIG. 3 is a flow chart of the IC card read/write method provided by the invention;
fig. 4 is a further flowchart of the IC card read-write method provided by the present invention;
FIG. 5 is a schematic diagram of an IC card read-write device according to the present invention;
FIG. 6 is a schematic diagram of another module of the IC card read-write device provided by the invention;
FIG. 7 is a schematic diagram of another module of the IC card read-write device provided by the invention;
fig. 8 is another schematic diagram of a module of the IC card read-write device provided by the present invention.
Detailed Description
The present invention will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present invention more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
According to the invention, the target writing mode of the IC card and the ID information of the IC card are directly acquired through the intelligent lock, when the intelligent lock recognizes that the ID information is identical to the ID information stored by the intelligent lock, the intelligent lock can send 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 unlock only when the password information is identical to 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 intelligent lock is used for directly performing read-write operation on the IC card, so that the IC card does not need to be subjected to read-write operation through a card reader, the link of performing read-write operation on the IC card through the card reader is omitted, and a user can use the IC card conveniently.
Example 1
Referring to fig. 1, a flow chart of an IC card read/write method according to a first embodiment of the present invention is shown, for convenience of explanation, only the portions related to the embodiment of the present invention are shown. The IC card reading and writing method comprises the following steps:
step S11, a target writing method for the IC card is acquired.
The target writing method refers to a writing method of password information of the IC card. For example, the password may be a password set randomly by the user, or an initial password of the IC card, or may be a password after the user modifies the original password of the IC card.
When a user needs to encrypt the IC card or modify the password of the IC card, the IC can be directly encrypted or the password is modified through the intelligent lock, that is, the intelligent lock can write the password into the IC card, so that the user does not need to make the IC card read through a card reader, and can directly read and write through the intelligent lock, the step of reading and writing the IC card through the card reader is omitted, the operation is more convenient, and the user experience is improved.
Specifically, the writing modes of the IC card are multiple, so that the user can select different writing modes according to different situations, and passwords written by the IC card are different in different writing modes. Thus, the safety performance of the IC card is improved, and the condition that the IC card is easy to be stolen and swiped is prevented. The specific writing mode of the IC card can be set according to different situations. The specific writing manner of the IC card is not limited here.
Further, the IC card is Integrated Circuit Card, also called as 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 convenient for users to use.
Further, the IC card includes an ID recognition area and a plurality of sectors. Wherein each sector is provided with a password verification area and a data storage area. The ID identification area stores ID information. The password verification area stores password verification data. The data storage area stores password data.
In one embodiment of the 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 has the function of storing passwords and also has the function of password verification, that is, when the passwords need to be acquired, the passwords need to be firstly verified, and thus the sectors are encrypted, so that other people cannot directly acquire the passwords stored in the sectors, and further, the security performance of the IC card is higher.
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 refers to a case where the IC card is sensed in the smart lock. For example, when a user attaches an IC card to or places an 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 under the condition that 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 is provided with an ID information, the ID information of each card is different, under the condition that the intelligent lock reads the IC card 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 is stored in the intelligent lock, 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 with the ID information stored in the intelligent lock. When the intelligent lock recognizes that the ID information is identical to the ID information stored by the intelligent lock, namely, the ID information is judged to be identical to the ID information stored by the intelligent lock, and when the ID information is judged to be identical, the intelligent lock can perform 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 into 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 if the ID information obtained again is 123456. In the case where the re-acquired ID information is not 123456, for example, in the case where the re-acquired 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, that is, the intelligent lock can directly complete the card writing operation, the IC card does not need to be subjected to the card writing operation through the card reader, the link of reading and writing the IC card through the card reader is omitted, and the IC card is convenient for a user to use.
Further, when the intelligent lock performs card writing operation on the IC card, the password information corresponding to the IC card is stored in the intelligent lock, where the password information corresponding to the IC card refers to the password information determined by the target writing mode, and according to the foregoing, the target writing mode may be a password set randomly by a user, or an initial password of the IC card, or a password after the user modifies the original password of the IC card. That is, in the process that the user writes the card through the intelligent lock, the intelligent lock writes the password set by the user into the IC card and stores the password into the intelligent lock, so that when the intelligent lock reads the IC card, the intelligent lock can identify the ID information of the IC card and can identify the password of the IC card, and when the ID information and the password information stored in the intelligent lock are identical to the ID information and the password information of the IC card, the intelligent lock can perform unlocking operation, and because the writing mode of the password information has various conditions, the password information is difficult to be copied by others, that is, when the user does not inform the password to others, the password information is not obtained, and when the password information is not copied by others, the intelligent lock cannot perform unlocking operation, so that the difficulty of using the IC card is increased, and the safety performance of the IC card is improved.
And S14, when the target IC card is read, comparing the acquired ID information of the target IC card with each piece of pre-stored ID information of 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 smart lock stores the ID information, and at this time, the smart lock compares the acquired ID information of the IC with the ID information stored in the smart lock, so as to determine whether the read IC card is recorded in the internal storage area of the smart lock.
And S15, when the ID information of the target IC card is identical to one of the target ID information stored in advance by the intelligent lock, sending target password information corresponding to the target ID information to the target IC card, so that the target IC card can verify the received target password information with 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 IC card is read by the smart lock, and then comparing the ID information with the ID information stored in the smart lock itself.
In this step, the smart lock will acquire the ID information of the identified IC card, then compare the ID information with the ID information stored in the smart lock itself, from the above, it can be known that the smart lock will store the ID information of the IC card and the password information written into the IC card in the smart lock during the card writing process, that is, the ID information of the IC card and the password information will both be stored into the smart lock, in the case that the ID information acquired by the smart lock is the same as the ID information stored by the smart lock itself, the smart lock will send the password information corresponding to the ID information to the IC card, after the IC card acquires the password information, will compare the password information with the password information written by the IC card itself, in the case that the password information is the same as the password information written by the IC card itself, the smart lock will not perform the unlocking operation, that is, in the case that the password information is different, the manner of writing the password information will not be multiple, in the case that the password information is not identical in the writing manner, in the manner will not copy the other, in the case that the password information will not be copied, the security information will not be able to be copied, and the performance of the IC card can not be improved.
For example, suppose that the IC card stored in the smart lock itself has ID information of 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 or near the sensing area of the intelligent lock, the intelligent lock can acquire ID information of the first IC card and compare the ID information with ID information stored by the intelligent lock, and because the ID information stored by the intelligent lock is 123456, the ID information of the first IC card is also 123456, at the moment, the two ID information are identical, the intelligent lock can send password information corresponding to the ID information of 123456 to the IC card, and because the password information is 234567, the password information of the first IC card is 123456, and the two password information are different. At this time, the intelligent lock does not perform an unlocking operation.
When a user places a second IC card in or near the sensing area of the intelligent lock, the intelligent lock can acquire ID information of the second IC card and compare the ID information with ID information stored by the intelligent lock, and because the ID information stored by the intelligent lock is 123456, the ID information of the second IC card is 234567, at the moment, the two ID information are different, and the intelligent lock cannot send password information.
When a user places a third IC card in or near the sensing area of the intelligent lock, the intelligent lock can acquire ID information of the third IC card and compare the ID information with ID information stored by the intelligent lock, and because the ID information stored by the intelligent lock is 123456, the ID information of the third IC card is 123456, at the moment, the two ID information are identical, the intelligent lock can send password information corresponding to the ID information of 123456 to the IC card, because the password information is 234567, and the password information of the third IC card is 234567, and the two password information are identical. At this time, the smart lock performs an unlocking operation.
From the above, neither the first IC card nor the second IC card can cause the smart lock to perform the unlocking operation, but the third IC card can cause the smart lock to perform the unlocking operation. Thus, the security performance of the IC card can be improved.
In addition, the above-mentioned target writing mode of the password information of the IC card has various situations, namely, the password information of each IC card is different and is difficult to copy by others, that is, under the condition that the user does not inform other people of the password, the password information other people cannot acquire the password information, so, under the condition that the password information is not copied by other people, the intelligent lock cannot be unlocked, thus increasing the difficulty of stealing the IC card and improving the security performance of the IC card.
And S16, when a success value sent when the verification of the target IC card is successful 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 identical to 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 in itself. 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 performs unlocking operation according to the success value. That is, the unlocking of the intelligent lock is realized by means of the success value, that is, the intelligent lock acquires the success value, the intelligent lock performs unlocking operation, the intelligent lock does not acquire the success value, and the intelligent lock does not perform unlocking operation.
In this step, the success value may be that the IC card returns an unlock signal to the smart lock, and the smart lock performs the unlock operation according to the unlock signal. It will be appreciated that the form of the success value may be set according to different circumstances. The specific form of success value is not limited herein. The intelligent lock can be unlocked only after receiving the success value.
In the embodiment of the invention, the target writing mode of the IC card and the ID information of the IC card are directly acquired through the intelligent lock, when the intelligent lock recognizes that the ID information is identical to the ID information stored by the intelligent lock, the intelligent lock can send 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 unlock only when the password information is identical to the password information written by the IC card, thereby avoiding the situation that manufacturers decrypt and copy the IC card according to the ID number of the IC card or copy the IC card according to the initial password of the IC card, and improving the safety performance of the IC card. In addition, the intelligent lock is used for directly performing read-write operation on the IC card, so that the IC card does not need to be subjected to read-write operation through a card reader, the link of performing read-write operation on the IC card through the card reader is omitted, and a user can use the IC card conveniently.
Example two
Fig. 2 is a schematic flow chart of an IC card read/write method according to a second embodiment of the present invention, and for convenience of explanation, only the portions related to the embodiment of the present invention are shown. The second embodiment is substantially the same as the first embodiment, except that in this embodiment, step S13 includes:
Step S131, when the IC card to be written is read as a blank card, the password information determined according to the target writing mode is written into the IC card to be written.
The IC card is a blank card, which means that no password information is written in the IC card, and the IC card is defined as a blank card at this time.
The IC card may be an IC card newly acquired by a user, and when the user needs to use the IC card, a card writing operation needs to be performed on the IC card to store the password information into the blank card, so that the blank card can store the password information.
In one possible embodiment, the smart lock is provided with a writing password button, and the button can be a physical button or a touch screen, and the touch screen is provided with the writing password button. Under the condition that a user places a blank card in a sensing area of the intelligent lock, the user can write the card through a password writing key.
In another possible embodiment, the smart lock is further provided with a plurality of selection keys, for example, an input key, after the user presses or touches the writing password key, the smart lock prompts the input key, the user can input the password information to be set through the input key, after the password information is input, the smart lock can acquire the password information and write the password information into the IC card, and meanwhile, the smart lock can store the password information into the smart lock, at the moment, the password information written into the IC card is the password information input by the user, for example, the birthday of the user or other memorial digits, so that the setting of the password is more humanized, the user can select different digits according to the selection of the user, namely, the security performance of the IC card is improved, and the experience of the user is also improved.
For example, after the initial key is pressed or touched by the user, the intelligent lock prompts the initial key, after the user presses or touches the initial key, the intelligent lock writes the initial password information of the intelligent lock into the IC card, at this time, because the password information is the initial password of the intelligent lock, the intelligent lock does not need to store the password information, at this time, the password information written in the IC card is the initial password information of the intelligent lock, so that the user does not need to think about what password should be set, thereby saving the time for the user to think and improving the experience of the user.
For another example, after the user presses or touches the writing password button, the smart lock prompts the sequence code button, and after the user presses or touches the sequence code button, the smart lock writes the unique sequence code of the MCU (Microcontroller Unit, micro control unit or controller) of the smart lock itself into the IC card, at this time, since the password information is the unique sequence code of the MCU of the smart lock itself, the smart lock does not need to perform the step of storing the password information. In addition, the user does not need to want to go to the password, so that the time for thinking 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 obtained, so that the security performance of the IC card can be improved.
The intelligent lock can prompt an input key, an initial key and a sequence code key which can be displayed by a touch screen of the intelligent lock, or can be input key, initial key and sequence code key of the intelligent lock through voice broadcasting. 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, no password information is in the IC card, so the smart lock writes the password information determined by the target writing mode into the blank IC card, so that the password information is written into the blank IC card, thereby implementing the process of writing the password, the user does not need to write the password information through the card reader in the blank IC card, and can directly write the password information through the smart lock, so that 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 the password information of the IC card to be written; when the target writing mode is the 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; when the target writing mode is the third writing mode, the random password input by the user is used as the password information of the IC card to be written.
The target writing mode can be password information set by a user through the intelligent lock, initial password information of the intelligent lock, or unique serial codes of an MCU (Microcontroller Unit, a micro control unit or a controller) of the intelligent lock, namely, the user can select different target writing modes according to the self requirements, so that the intelligent lock is more intelligent, and the user can use the intelligent lock conveniently. For example, when the user is reluctant 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 modes are multiple, and the user experience is improved. The user can select different target writing modes according to own needs, so that the intelligent lock is more intelligent, and the user can use the intelligent lock conveniently. For example, when the user is reluctant 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 modes are multiple, and the user experience is improved.
Step S132, when the password information is stored in the IC card to be written, the acquired ID information of the IC card to be written is compared with each piece of pre-stored ID information of the intelligent lock.
In one possible example, when the smart lock reads the card, the ID information of the IC card is first acquired, 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 two options to the user.
For example, an unlocking key is arranged on the intelligent lock, and the intelligent lock prompts whether unlocking operation is needed or not under the condition that the intelligent lock recognizes that the ID information is identical to the ID information stored by the intelligent lock. When the user presses or touches the unlocking key, the intelligent lock can send the password information corresponding to the ID information to the IC card, and the IC card can compare the password information with the password information stored by the IC card. Under the condition that the two password information are the same, the IC card can send a success value to the intelligent lock, and under the condition that the intelligent lock obtains the success value, unlocking operation is carried out.
For another example, a change button is arranged on the intelligent lock, and the intelligent lock prompts whether password change operation is needed or not under the condition that the intelligent lock recognizes that the ID information is the same as the ID information stored by the intelligent lock. When the user presses or touches the change button, the smart lock will enter the process of step S131, and it should be noted that, under the condition of changing the password, the smart lock writes the password information determined by the target writing mode into the IC card to be written, and at the same time, replaces the original password in the IC card and replaces the password information corresponding to the ID information stored by the smart lock itself.
For example, the original password in the IC card is 123456, the original stored password information in the smart lock is 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 the write password key, after selecting the write password key, the user prompts the input key, then the user inputs a new password 234567, at this time, the smart lock stores the new password information and replaces the password information with the original stored password information in the smart lock, and the smart lock writes the new password information into the IC card and 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 intelligent lock is changed to 234567.
And step S133, when the ID information of the IC card to be written is identical to one of the target ID information stored in advance by the intelligent lock, sending the password information corresponding to the ID information to the IC card to be written, so that the IC card to be written checks the received password information with the written password information.
In the step, the intelligent lock compares the acquired ID information of the IC card with the ID information stored by the intelligent lock, and under the same condition, 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 of the intelligent lock after receiving the password information, and under the same condition, the intelligent lock judges that the IC card is the IC card corresponding to the intelligent lock, namely the IC card can be used for enabling the intelligent lock to unlock or modifying the password information through the intelligent lock.
Further, the password information corresponding to the ID information refers to that when the IC card writes a password through the smart lock, the smart lock obtains 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 mode is written into the IC card to be written, the smart lock stores the password information into the smart lock, 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.
Step S134, when receiving the success value sent when the verification of the IC card to be written is successful, the password information determined according to the target writing mode is written into the IC card to be written.
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 success value is not limited herein. The intelligent lock can be unlocked only after receiving the success value.
Further, in this embodiment, when the obtained IC card is not a blank card, the process of modifying the password information of the IC card is that, at this time, the IC card stores the password information, 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 identified that the ID information is identical to 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 identified that the password information received by the IC card is identical to 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 mode is written into the IC card. That is, when the user needs to modify the password information, the IC card needs to be checked first, and when the check is successful, the intelligent lock performs the writing operation on the IC card, and when the check is unsuccessful, the intelligent lock does not perform the writing operation on the IC card. For example, when the user needs to modify the password information, the user needs to compare the IC card with the intelligent lock, the intelligent lock compares the ID information of the IC card, after the comparison is successful, the password information corresponding to the ID information is sent to the IC card, the IC card compares the obtained password information with the own password information, when the comparison is successful, a success value is returned to the intelligent lock, when the intelligent lock receives the success value, different target writing modes are provided for the user, the user can select different target writing modes according to the user's own choice, after the target writing mode is completed, the intelligent lock writes the password information determined by the target writing mode 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 of password write-in and password modification through intelligent lock, need not to accomplish above-mentioned operation through the card reader, convenient and fast promotes user's experience.
Example III
Referring to fig. 3, a flow chart of an IC card read/write method according to a third embodiment of the present invention is shown, for convenience of explanation, only the portions related to the embodiment of the present invention are shown. The third embodiment is substantially the same as the first embodiment, except that in this embodiment, step S13 includes:
step S135, the location information of the target sector to be written in the IC card is searched.
As can be seen from the above 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 the password information stored in each sector is different, so that it is necessary to 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, the password information determined according to the target writing mode is written into the password verification area in the target sector.
In this step, the password information determined in the target writing method is the target writing method in the first embodiment, that is, in the process of writing 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. Thus, firstly, the storage of the password information is convenient, and secondly, the password information is not easy to be found by other people, so that the safety performance of the IC card is improved.
Step S15 includes:
and step S151, when the ID information stored in the ID identification area in the target IC card is read and compared with one of the ID information stored in advance 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 checks the received target password information with the password information in the written password checking area.
In this step, the password verification area stores password information, which is the password information written by the IC card, and as known from the above embodiment, after the IC card is read by the smart lock, the ID information of the IC card is obtained, and then the ID information is compared with the ID information stored by the smart lock itself, where under the same condition, the smart lock sends the password information corresponding to the ID information to the IC card, and 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 smart lock performs an unlocking operation or modifies the password operation. The password verification area 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 manner to the IC card, since the number of sectors in the IC card is plural, at this time, the smart lock will find the location information of the target sector in the IC card, and when the location of the target sector is found, the password information determined by the target writing manner is written into the password verification area of the target sector, so, when another person wants to copy the password, the password information can be obtained after the password is verified, so that the security performance of the IC card is improved. When the ID information is compared, the intelligent lock can firstly acquire the ID information stored in the ID identifier in the IC card and then compare the ID information with the ID information stored in the intelligent lock, when the ID information stored in the ID identifier in the IC card is identical with the ID information stored in the intelligent lock, the intelligent lock can only send the target password information corresponding to the ID information to the IC card, so that the IC card checks the received target password information with the password information stored in the password checking area, and returns a success value to the intelligent lock when the verification is successful, and the intelligent lock performs unlocking operation or password modifying operation according to the success value.
Example IV
Referring to fig. 4, a flow chart of an IC card read/write method according to a fourth embodiment of the present invention is shown, for convenience of explanation, only the portions related to the embodiment of the present invention are shown. The fourth embodiment is substantially the same as the first embodiment, except that in this embodiment, 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 fragments.
The splitting of the password into a plurality of sub-password fragments in the password information refers to splitting a complete password into a plurality of sub-password fragments, and the combination of the plurality of sub-password fragments is the complete password. Thus, it is possible to prevent the password information from being stored in one sector entirely, which may result in the password information being easily acquired by another person. And further improves the safety performance of the IC card.
For example, the password determined by the target writing method is 123456, and at this time, the smart lock splits the password into a plurality of different sub-password fragments, for example, three sub-password fragments, which are 12, 34, and 56, respectively. For another example, six sub-code segments may be split, with the six sub-code segments being 1, 2, 3, 4, 5, 6, respectively. The number of specific splits may be designed according to different circumstances. The specific number of sub-crypto segments is not limited herein.
Step S138, each sub-password fragment is sequentially written into a password verification area in each sector of the IC card to be written.
As can be seen from the above step S137, the smart lock splits the password in the password information determined by the target writing method into a plurality of sub-password fragments. After the splitting is completed, the smart lock writes these sub-password fragments to the password verification area of each sector of the IC card. That is, there is no complete password information in one sector of the IC card, and one complete password information can be formed after the sectors to which the sub-password pieces are written are combined. Therefore, the security performance of the IC is higher due to the scattered arrangement, and the whole password information is not easy to obtain by other people.
Step S15 includes:
in step S152, when the ID information stored in the ID identification area of the target IC card is read and compared with one of the ID information stored in advance in the smart lock, the first sub-password fragment in the target password information corresponding to the target ID information is sent to the target IC card, so that the target IC card checks the received first sub-password fragment with the first sub-password fragment in the password check area in the written first sector.
In the step, after the intelligent lock compares the IC card and the comparison is successful, the intelligent lock splits the target password information corresponding to the target information so that the password information is formed into a plurality of sub-password fragments, then the first sub-password fragment is sent to the IC card, the IC card compares the first sub-password fragment with the sub-password fragment in the first sector of the IC card, and under the same condition, the intelligent lock is further unlocked or the password is modified.
And step 153, when receiving the return value sent when the verification of the target IC card is successful, sequentially sending other sub-password fragments in the target password information to the target IC card so as to enable the target IC card to perform the sequential verification.
In this step, after comparing the first sector of the IC card with the first sub-code segment, the IC card returns a success value to the smart lock, after the smart lock acquires the success value, the IC card transmits the second sub-code segment to the IC card, after comparing the second sub-code segment with the second sector of the IC card, the IC card continues to transmit the success value to the smart lock, after acquiring the success value, the smart lock continues to transmit the third sub-code segment to the IC card, and the smart lock loops so until all the sub-code segments of the smart lock are compared with the sub-code segments of different sectors of the IC card and are all the same, and then transmits the success value to the smart lock again, and the smart lock performs the unlocking operation or the password modifying operation according to the success value.
In this embodiment, the smart lock will first acquire the ID information stored in the ID identification area of the IC card, and compare the acquired ID information stored in the ID identification area of the IC card with one of the ID information stored in advance in the smart lock, when the ID information stored in the ID identification area of the IC card is identified as the same as one of the ID information stored in advance in the smart lock, the first codon code fragment in the target code information corresponding to the target ID information is transmitted to the target IC card, so that the target IC card checks the received first codon code fragment with the first codon code fragment in the written first sector, when the first codon code fragment received by the target IC card is identified as the first codon code fragment in the written first sector, the IC card will return to the smart lock, after the smart lock receives the first successful value, the second codon fragment in the target code information corresponding to the target ID information is transmitted to the target IC card, the second codon fragment is transmitted to the second IC card, and the second code fragment is again transmitted to the second sector after the second successful value is received, the second code fragment is again transmitted to the second IC card, and the second code fragment is again checked, after the second code fragment is again transmitted to the second code fragment is successfully received to the second code fragment in the written first sector, the unlocking operation is not carried out until all the sub-password fragments in the target password information corresponding to the target ID information are verified with the password verification areas of all the sectors in the IC card, 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
Referring to fig. 5, a schematic structural diagram of an IC card read-write device according to a fifth embodiment of the present invention is shown, for convenience of explanation, only the portions related to the embodiment of the present invention are shown. The IC card read/write apparatus 100 includes:
a first acquisition unit 10 for acquiring a target write pattern to an IC card;
a first storage unit 20 for acquiring and storing ID information of an IC card to be written when the IC card to be written is read;
a first writing unit 30, configured to write the password information determined according to the target writing manner into the IC card to be written, and store the password information corresponding to the IC card to be written;
a first comparing unit 40 for comparing the acquired ID information of the target IC card with each ID information stored in advance by the smart lock when the target IC card is read;
a first transmitting unit 50 for causing the target IC card to verify the received target password information with the written password information when the ID information of the target IC card is identical to one of the target ID information stored in advance by the smart lock;
the first control unit 60 is configured to control the smart lock to perform an unlocking operation when a success value sent when the verification of the target IC card is successful is received.
Further, when the target writing mode is a first writing mode, taking a fixed password 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 the random password input by the user as the password information of the IC card to be written.
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;
the password verification area stores password verification data;
the data storage area stores password data.
In the embodiment of the invention, the target writing mode of the IC card and the ID information of the IC card are directly acquired through the intelligent lock, when the intelligent lock recognizes that the ID information is identical to the ID information stored by the intelligent lock, the intelligent lock can send 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 unlock only when the password information is identical to the password information written by the IC card, thereby avoiding the situation that manufacturers decrypt and copy the IC card according to the ID number of the IC card or copy the IC card according to the initial password of the IC card, and improving the safety performance of the IC card. In addition, the intelligent lock is used for directly performing read-write operation on the IC card, so that the IC card does not need to be subjected to read-write operation through a card reader, the link of performing read-write operation on the IC card through the card reader is omitted, and a user can use the IC card conveniently.
Specifically, the implementation principle and the technical effects of the IC card read-write device 100 according to the fifth embodiment of the present invention are the same as those of the foregoing embodiment of the IC card read-write method, and for brevity, reference may be made to the corresponding contents of the foregoing embodiment of the method for brevity.
Example six
Referring to fig. 6, a schematic structural diagram of an IC card read-write device according to a sixth embodiment of the present invention is shown, for convenience of explanation, only the portions related to the embodiment of the present invention are shown. In the present embodiment, the first writing unit 30 of the IC card reading/writing device includes:
the first writing module 301 is configured to write, when it is read that the IC card to be written is a blank card, the password information determined according to the target writing mode into the IC card to be written;
the first comparing module 302 is configured to compare the obtained ID information to be written into the IC card with each ID information stored in advance in the smart lock when the password information is stored in the IC card to be written into is read;
a first sending module 303, configured to send, when the ID information of the IC card to be written is the same as one of the target ID information stored in advance in the smart lock, the password information corresponding to the 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;
The second writing module 304 is configured to, when receiving a success value sent when the verification of the IC card to be written is successful, write the password information determined according to the target writing mode into the IC card to be written.
Specifically, the implementation principle and the technical effects of the IC card read-write device 100 according to the sixth embodiment of the present invention are the same as those of the foregoing embodiment of the IC card read-write method, and for brevity, reference may be made to the corresponding contents of the foregoing method embodiment for the details of the sixth embodiment of the IC card read-write device 100.
Example seven
Referring to fig. 7, a schematic structural diagram of an IC card read-write device according to a seventh embodiment of the present invention is shown, for convenience of explanation, only the portions related to the embodiment of the present invention are shown. In the present embodiment, the first writing unit 30 of the IC card reading/writing device includes:
a searching module 305, configured to search for location information of a target sector to be written into the IC card;
a third writing module 306, configured to write the password information determined according to the target writing manner into a password verification area in the target sector;
the first transmitting unit 50 includes:
and a second sending module 501, configured to send, when the ID information stored in the ID identification area in the target IC card is read and compared with one of the ID information stored in advance in the smart lock, target password information corresponding to the target ID information to the target IC card, so that the target IC card checks the received target password information with the password information written in the password checking area.
Specifically, the implementation principle and the technical effects of the IC card read-write device 100 according to the seventh embodiment of the present invention are the same as those of the foregoing embodiment of the IC card read-write method, and for brevity, reference may be made to the corresponding contents of the foregoing method embodiment for the description of the seventh embodiment of the IC card read-write device 100.
Example eight
Referring to fig. 8, a schematic structural diagram of an IC card read-write device according to an eighth embodiment of the present invention is shown, for convenience of explanation, only the portions related to the embodiment of the present invention are shown. In the present embodiment, the first writing unit 30 of the IC card reading/writing device includes:
a first splitting module 307, configured to split a password in the password information determined according to the target writing manner into a plurality of sub-password fragments;
a fourth writing module 308, configured to sequentially write each sub-password fragment into a password verification area in each sector of the IC card to be written;
the first transmitting unit 50 includes:
a third sending module 502, configured to send a first sub-password fragment in target password information corresponding to target ID information to the target IC card when the ID information stored in the ID identification area in the read target IC card is the same as one of the ID information stored in advance in the smart lock, so that the target IC card checks the received first sub-password fragment with the first sub-password fragment in the password check area in the written first sector;
And a fourth reading module 503, configured to sequentially send other sub-password fragments in the target password information to the target IC card when receiving the return value sent when the target IC card is successfully verified, so that the target IC card performs sequential verification.
Specifically, the IC card read/write device 100 according to the eighth embodiment of the present invention has the same implementation principle and technical effects as those of the foregoing embodiment of the IC card read/write method, and for brevity, reference may be made to the corresponding contents of the foregoing method embodiment where the eighth embodiment of the IC card read/write device 100 is not mentioned.
Example nine
The present invention also provides an embodiment of a storage medium storing a program which, when executed by a processor, implements the IC card read-write method of 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 other suitable medium on which the program can be 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 acquired through the intelligent lock, when the intelligent lock recognizes that the ID information is identical to the ID information stored by the intelligent lock, the intelligent lock can send 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 unlock only when the password information is identical to the password information written by the IC card, thereby avoiding the situation that manufacturers decrypt and copy the IC card according to the ID number of the IC card or copy the IC card according to the initial password of the IC card, and improving the safety performance of the IC card. In addition, the intelligent lock is used for directly performing read-write operation on the IC card, so that the IC card does not need to be subjected to read-write operation through a card reader, the link of performing read-write operation on the IC card through the card reader is omitted, and a user can use the IC card conveniently.
Examples ten
The invention also provides an embodiment of the intelligent lock, which comprises a memory (such as a nonvolatile storage medium), a processor and a program stored on the memory and capable of running on the processor, wherein the processor realizes the IC card read-write method according to any one of the embodiments when executing the program.
So configured, the memory may store a computer program. The computer program is executable by a processor to implement the IC card read-write method of any of the above embodiments. The processor may be used to provide computing and control capabilities to support the operation of the entire smart lock.
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 acquired through the intelligent lock, when the intelligent lock recognizes that the ID information is identical to the ID information stored by the intelligent lock, the intelligent lock can send 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 unlock only when the password information is identical to the password information written by the IC card, thereby avoiding the situation that manufacturers decrypt and copy the IC card according to the ID number of the IC card or copy the IC card according to the initial password of the IC card, and improving the safety performance of the IC card. In addition, the intelligent lock is used for directly performing read-write operation on the IC card, so that the IC card does not need to be subjected to read-write operation through a card reader, the link of performing read-write operation on the IC card through the card reader is omitted, and a user can use the IC card conveniently.
The foregoing description of the preferred embodiments of the invention is not intended to be limiting, but rather is intended to cover all modifications, equivalents, and alternatives falling within the spirit and principles of the invention.

Claims (8)

1. The IC card read-write method is applied to the intelligent lock and is characterized by comprising the following steps of:
acquiring a target writing mode for an IC card;
when an IC card to be written is read, 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 the target IC card is read, comparing the acquired ID information of the target IC card with each piece of ID information stored in advance by the intelligent lock;
when the ID information of the target IC card is identical to one of the target ID information stored in advance by 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 checks the received target password information with the written password information;
when a success value sent when the target IC card is successfully checked is received, controlling the intelligent lock to unlock;
The IC card comprises 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; the password verification area stores password verification data; the data storage area stores password data;
the step of writing the password information determined according to the target writing mode into the IC card to be written comprises the following steps: splitting the password in the password information determined according to the target writing mode into a plurality of sub-password fragments; sequentially writing each sub-password fragment into a password verification area in each sector of the IC card to be written; 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 and compared with one of the pre-stored ID information of each ID information of the intelligent lock, a first sub-password fragment in the target password information corresponding to the target ID information is sent to the target IC card, so that the target IC card checks the received first sub-password fragment with the first sub-password fragment in the password check area in the written first sector; and when receiving a return value sent when the verification of the target IC card is successful, sequentially sending other sub-password fragments in the target password information to the target IC card so as to enable the target IC card to perform the sequential verification.
2. The IC card reading/writing 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 includes:
when the IC card to be written is read as 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 is stored in the IC card to be written is read, comparing the acquired ID information of the IC card to be written with each piece of ID information stored in advance by the intelligent lock;
when the ID information of the IC card to be written is identical to one of the target ID information stored in advance by 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 checks the received password information with the written password information;
and when receiving a success value sent when the verification of the IC card to be written is successful, 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 the random password input by the user as the password information of the IC card to be written.
4. The IC card reading/writing 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 includes:
searching the position information of the target sector in the IC card to be written;
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 and compared with one of the ID information stored in advance 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 checks the received target password information with the password information in the written password checking area.
5. An IC card read-write device, applied to an intelligent lock, characterized in that the IC card read-write device includes:
a first acquisition unit configured to acquire a target write pattern for an IC card;
a first storage unit for acquiring and storing ID information of an 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 pre-stored ID information of the intelligent lock when the target IC card is read;
a first sending unit, configured to send target password information corresponding to the target ID information to the target IC card when the ID information of the target IC card is identical to one of the target ID information stored in advance in the smart lock, so that the target IC card verifies the received target password information with the written password information;
the first control unit is used for controlling the intelligent lock to unlock when a success value sent when the target IC card is successfully checked is received;
The IC card comprises 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; the password verification area stores password verification data; the data storage area stores password data;
the first writing unit includes: the first splitting module is used for splitting the password in the password information determined according to the target writing mode into a plurality of sub-password fragments; the fourth writing module is used for sequentially writing each sub-password fragment into a password verification area in each sector of the IC card to be written; the first transmitting unit includes: a third sending module, configured to send a first sub-password fragment in target password information corresponding to target ID information to the target IC card when the ID information stored in the ID identification area in the read target IC card is the same as one of the ID information stored in advance in the smart lock, so that the target IC card checks the received first sub-password fragment with the first sub-password fragment in the password check area in the written first sector; and the fourth reading module is used for sequentially sending other sub-password fragments in the target password information to the target IC card when receiving the return value sent when the target IC card is successfully checked, so that the target IC card is sequentially checked.
6. The IC card read-write apparatus according to claim 5, wherein the first write 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 as a blank card;
the first comparison module is used for comparing the acquired ID information to be written into the IC card with each piece of pre-stored ID information of the intelligent lock when the password information is stored in the IC card to be written into the IC card;
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 of the target ID information stored in advance by the intelligent lock, so that the IC card to be written checks the received password information with 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.
7. A storage medium storing a program which, when executed by a processor, implements the IC card read-write method according to any one of claims 1 to 4.
8. An intelligent lock, characterized in that it comprises a memory, a processor and a program stored on the memory and executable on the processor, said processor implementing the IC card read-write method according to any one of claims 1 to 4 when executing said program.
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 CN111144520A (en) 2020-05-12
CN111144520B true 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)

Families Citing this family (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
CN115471939B (en) * 2022-08-31 2024-02-09 广东好太太智能家居有限公司 IC card automatic encryption adding method, access control equipment and readable medium
CN116645751B (en) * 2023-06-27 2023-11-24 深圳市亲邻科技有限公司 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

Also Published As

Publication number Publication date
CN111144520A (en) 2020-05-12

Similar Documents

Publication Publication Date Title
CN111144520B (en) IC card read-write method and device, storage medium and intelligent lock
TWI417732B (en) Memory device with near field communications, method of communicating wireless network settings between devices, and universal serial bus flash drive related therewith
US20200082656A1 (en) Fingerprint recognition and nfc-based unlocking method and system using mobile terminal
US9098440B2 (en) Secure compact flash
US11516212B2 (en) Multi-functional authentication apparatus and operating method for the same
JPH0259987A (en) Portable electronic device
US10444792B2 (en) Unlocking control system, method and wearable device using the same
JP4977542B2 (en) Information retrieval display device
US20200019324A1 (en) Card activation device and methods for authenticating and activating a data storage device by using a card activation device
CN105184133A (en) Authentication method and apparatus, and corresponding mobile terminal
CN110929302A (en) Data security encryption storage method and storage device
US10523669B2 (en) Server, IC card processing apparatus, and IC card processing system
JP4993114B2 (en) Shared management method for portable storage device and portable storage device
CN101271507B (en) File hiding method, system and device based on USB equipment
CN111818376A (en) Password setting method, smart television, electronic equipment and readable storage medium
US20230214474A1 (en) Portable electronic device and ic card
JP2006351015A (en) Storage and method for protecting stored data thereof
JP5076820B2 (en) Application processing apparatus, application processing method, program thereof, and embedded device
CN110807186A (en) Method, device, equipment and storage medium for safe storage of storage equipment
JP2002116840A (en) Security system
CN101303670B (en) Storage device and control method thereof
KR20070109488A (en) The mouse of finger drive ring with nand flash memory
US20070181697A1 (en) Method of a USB interface device with a discrimination function
JP4516038B2 (en) Information processing apparatus and wireless input device authentication method
US6826667B2 (en) Buffer assisted data storage method and system with built-in fingerprint recognition function

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