Intelligent card verification method and device based on intelligent door lock and related equipment
By acquiring and verifying the operation data of the smart card in the smart door lock, the problem of smart card being easily cracked or copied is solved, and the security and reliability of the card are improved.
Patent Information
- Application Number
- CN202311166991.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-08
- Publication Date
- 2025-03-11
AI Technical Summary
Smart cards are easily cracked by professional equipment or copied by hardware, resulting in information exposure and poses security risks.
By obtaining the pre-stored target operation data in the smart door lock and obtaining the corresponding data from the smart card, security verification is performed during unlocking to determine whether the card is copied.
Improves the security and reliability of smart cards to prevent information leakage and unauthorized access.
Smart Images

Figure CN119600706A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of smart home technology, and in particular to a smart card verification method, device and related equipment based on a smart door lock. Background Art
[0002] With the development of smart furniture products, the birth of smart door locks has brought a lot of convenience to people's lives. In daily life, people often use smart cards to unlock smart locks.
[0003] However, due to the inherent design defects of smart cards, smart cards can be easily cracked by professional equipment or the information in the card can be directly copied by hardware, resulting in the exposure of information in the smart card, which leads to security risks. Summary of the invention
[0004] Based on this, it is necessary to propose a smart card verification method based on smart door locks to address the technical problem that due to the inherent defects of smart cards, smart cards can be easily cracked by professional equipment or directly copied by hardware, resulting in the exposure of information in the smart cards, thereby causing security risks.
[0005] In a first aspect, a smart card verification method based on a smart door lock is provided, the method comprising:
[0006] When unlocking at the first time, obtaining pre-stored first target operation data from the smart door lock, and obtaining second target operation data from the smart card, wherein the first target operation data is the operation data generated when the smart door lock is unlocked at the second time, and the second target operation data is the operation data generated when the smart door lock is unlocked at the second time, and the second time is earlier than the first time;
[0007] The security of the smart card is verified according to the first target operation data and the second target operation data to obtain an operation verification result.
[0008] In a second aspect, a smart card verification device based on a smart door lock is provided, the device comprising:
[0009] A data acquisition module, used to acquire pre-stored first target operation data from the smart door lock when unlocking at the first time, and acquire second target operation data from the smart card, wherein the first target operation data is the operation data generated when the smart door lock is unlocked at the second time, and the second target operation data is the operation data generated when the smart door lock is unlocked at the second time, and the second time is earlier than the first time;
[0010] The data verification module is used to perform security verification on the smart card according to the first target operation data and the second target operation data to obtain an operation verification result.
[0011] In a third aspect, a smart door lock is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the smart card verification method based on the smart door lock when executing the computer program.
[0012] In a fourth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned smart card verification method based on a smart door lock are implemented.
[0013] The present application provides a smart card verification method, device and related equipment based on a smart door lock, by obtaining pre-stored first target operation data from the smart door lock when unlocking at the first time, and obtaining second target operation data from the smart card, wherein the first target operation data is the operation data generated when the smart door lock is unlocked at the second time, and the second target operation data is the operation data generated when the smart door lock is unlocked at the second time, and the second time is earlier than the first time; according to the first target operation data and the second target operation data, the smart card is security verified to obtain an operation verification result. In the present application, by storing the first target operation data in the smart door lock and the second target operation data in the smart card when unlocking at the second time, when unlocking at the first time, the smart card is security verified by comparing the first target operation data and the second target operation data corresponding to the second time to determine whether the smart card has been copied, thereby improving the security and reliability of the application of smart cards. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0015] in:
[0016] Figure 1 A schematic diagram of an application environment of a smart card authentication method based on a smart door lock in one embodiment;
[0017] Figure 2 The figure is a flow chart of a smart card verification method based on a smart door lock in one embodiment;
[0018] Figure 3 is a schematic block diagram of the structure of a smart card verification device based on a smart door lock in one embodiment;
[0019] Figure 4 A schematic block diagram of the structure of a smart door lock in one embodiment;
[0020] Figure 5 It is a structural schematic block diagram of a smart door lock in yet another embodiment. DETAILED DESCRIPTION
[0021] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0022] The smart card verification method based on the smart door lock provided by the embodiment of the present invention can be applied in Figure 1In the application environment, the target terminal 110 communicates with the smart door lock 120 through the network 130. When the smart door lock 120 is unlocked at the first time, the first target operation data stored in advance can be obtained from the smart door lock, and the second target operation data can be obtained from the smart card, wherein the first target operation data is the operation data generated when the smart door lock is unlocked at the second time, and the second target operation data is the operation data generated when the smart door lock is unlocked at the second time, and the second time is earlier than the first time; according to the first target operation data and the second target operation data, the smart card is security verified to obtain an operation verification result, and the operation verification result is returned to the target terminal 110. In the present invention, when the smart door lock is unlocked at the first time, the first target operation data stored in advance can be obtained from the smart door lock, and the second target operation data can be obtained from the smart card, wherein the first target operation data is the operation data generated when the smart door lock is unlocked at the second time, and the second target operation data is the operation data generated when the smart door lock is unlocked at the second time, and the second time is earlier than the first time; according to the first target operation data and the second target operation data, the smart card is security verified to obtain an operation verification result. In the present application, when unlocking at the second time, the first target operation data is stored in the smart door lock, and the second target operation data is stored in the smart card. When unlocking at the first time, the first target operation data and the second target operation data corresponding to the second time are compared to verify the security of the smart card to determine whether the smart card has been copied, thereby improving the security and reliability of the application of the smart card. Among them, the target terminal 110 can be, but is not limited to, various smart phones 110-1, tablet computers 110-2, and laptop computers 110-3. The present invention is described in detail below through specific embodiments.
[0023] See also Figure 2 As shown, Figure 2 The present invention provides a flow chart of a smart card verification method based on a smart door lock. This embodiment uses the method applied to a smart door lock as an example. The smart card verification method based on a smart door lock includes the following steps S100 to S200:
[0024] S100: When unlocking at the first time, obtain the pre-stored first target operation data from the smart door lock, and obtain the second target operation data from the smart card, wherein the first target operation data is the operation data generated when the smart door lock is unlocked at the second time, and the second target operation data is the operation data generated when the smart door lock is unlocked at the second time, and the second time is earlier than the first time.
[0025] Among them, the first time is the time when the smart door lock is unlocked this time, and the second time is the time when the smart door lock was unlocked last time. For example, assuming that the time when the smart door lock is unlocked this time is 10:10 on July 10, 2023, the first time is 10:10 on July 10, 2023. Assuming that the time when the smart door lock was unlocked last was 12:10 on July 10, 2023, the second time is 12:10 on July 10, 2023.
[0026] The first target operation data stored in the smart door lock includes characteristic data such as door lock identification, first operation time, first unlocking times, first recording location information, etc. Among them, the first operation time refers to the second time stored in the smart door lock when unlocking at the second time, the first unlocking times refers to the unlocking times stored in the smart door lock when unlocking at the second time (such as the 10th unlocking in July, the 1st unlocking on July 10), and the first recording location information refers to the storage address information of the second target operation data stored in the smart door lock and the storage address information of the first target operation data. The door lock identification can be data that uniquely identifies a smart door lock, such as the door lock name and door lock ID.
[0027] The second target operation data stored in the smart card includes characteristic data such as door lock identification, second operation time, second unlocking times, second recording location information, etc., wherein the second operation time refers to the second time stored in the smart card when unlocking at the second time, the second unlocking times refers to the unlocking times stored in the smart card when unlocking at the second time, and the second recording location information refers to the storage address information of the second target operation data stored in the smart card when unlocking at the second time and the storage address information of the first target operation data.
[0028] It can be understood that the second target operation data can be a null value.
[0029] S200: Perform security verification on the smart card according to the first target operation data and the second target operation data to obtain an operation verification result.
[0030] Optionally, the door lock identifier can be first obtained from the first target operation data, and the smart card can be verified based on the door lock identifier to see whether it is consistent with the door lock identifier in the second target operation data. If the two door lock identifiers are consistent, it means that the smart card matches the smart door lock, thereby performing security verification on the smart card. That is, the first target operation data and the second target operation data are compared for consistency to obtain a consistency comparison result indicating whether the smart card has been copied. If the two door lock identifiers are inconsistent, it means that the smart card does not match the smart door lock, and the smart door lock terminates the unlocking operation, and uses the comparison result of the door lock identifier and the consistency comparison result as the operation verification result.
[0031] The operation verification result may indicate whether the smart card has been copied. If the smart card has not been copied, the operation verification result is passed; if the smart card has been copied, the operation verification result is failed.
[0032] Among them, if the smart card has not been copied, the first target operation data corresponding to the smart door lock and the second target operation data corresponding to the smart card should be consistent. If the smart card is copied, the first target operation data corresponding to the smart door lock and the second target operation data corresponding to the smart card should be inconsistent, so as to verify the security of the smart card.
[0033] Optionally, determining whether the first target operation data and the second target operation data are encrypted data;
[0034] If the first target operation data and the second target operation data are encrypted data, the first target operation data and the second target operation data are decrypted respectively, and then based on a similarity algorithm, the similarity between the first target operation data and the second target operation data is calculated to obtain a similarity value;
[0035] If the first target operation data and the second target operation data are not encrypted data, similarity between the first target operation data and the second target operation data is calculated based on a similarity algorithm to obtain a similarity value.
[0036] According to the similarity value, the operation verification result is obtained.
[0037] Optionally, after obtaining the first target operation data, the memory in the smart door card can be searched for the existence of second target operation data corresponding to the first target operation data based on the first target operation data, thereby generating an operation verification result. If the operation verification result indicates existence, it is determined that the smart card has not been copied; if the operation verification result indicates non-existence, it is determined that the smart card has been copied.
[0038] In this embodiment, when unlocking at the first time, the first target operation data pre-stored is obtained from the smart door lock, and the second target operation data is obtained from the smart card, wherein the first target operation data is the operation data generated when the smart door lock is unlocked at the second time, and the second target operation data is the operation data generated when the smart door lock is unlocked at the second time, and the second time is earlier than the first time; according to the first target operation data and the second target operation data, the smart card is security verified to obtain an operation verification result. In this application, when unlocking at the second time, the first target operation data is stored in the smart door lock, and the second target operation data is stored in the smart card, and when unlocking at the first time, the first target operation data and the second target operation data corresponding to the second time are compared to perform security verification on the smart card to determine whether the smart card has been copied, thereby improving the security and reliability of the application of smart cards.
[0039] In some optional implementations of this embodiment, before step S100, that is, before obtaining the pre-stored first target operation data from the smart door lock, the method further includes the following steps S300 to S500:
[0040] S300: When unlocking the door at the second time, the operation data generated by the smart door lock during the unlocking process is used as the first target operation data and the second target operation data.
[0041] When unlocking at the second time, the operation data generated during the unlocking process, such as the recorded location information, operation time (ie, unlocking time), number of unlocking times, etc., are used as the first target operation data and the second target operation data.
[0042] S400: Storing the first target operation data into a memory in the smart door lock.
[0043] Optionally, storing the first target operation data in a memory in the smart door lock includes:
[0044] Separate the keyword and value in the first target key-value pair corresponding to the first target operation data to obtain the first target keyword (such as the first operation time) and the first target value (the first operation time, the first unlocking number, the first recording location information), wherein the first target keyword is the timestamp corresponding to the first operation time;
[0045] Establishing a first corresponding relationship between a first target keyword and a first target value;
[0046] The first target keyword, the first target value, and the first corresponding relationship are stored in a memory in the smart door lock.
[0047] Furthermore, when searching for the first target operation data, the first target keyword is queried, and according to the first corresponding relationship, the first target value is obtained from the memory in the smart door lock, that is, the first target operation data is obtained.
[0048] In this step, by separating the keywords and values in the first target key-value pair, the flexibility of generating timestamps is improved, the efficiency of data storage is improved, and it is also beneficial to quickly query the first target operation data corresponding to the timestamp when performing security verification on the smart card, thereby improving the verification efficiency of the smart card.
[0049] S500: Store the second target operation data into a sector in the smart card.
[0050] Optionally, storing the second target operation data in a sector in a smart card includes:
[0051] Separate the keyword and value in the second target key-value pair corresponding to the second target operation data to obtain the second target keyword (such as the second operation time) and the second target value (the second operation time, the second unlocking times, and the second recording location information), wherein the second target keyword is the timestamp of the second operation time;
[0052] Establishing a second corresponding relationship between a second target keyword and a second target value;
[0053] The second target keyword, the second target value, and the second corresponding relationship are stored in a sector in the smart card.
[0054] Furthermore, when searching for the second target operation data, the second target keyword is queried and, according to the second corresponding relationship, the second target value is obtained from the sector in the smart card, that is, the second target operation data is obtained.
[0055] In this step, by separating the keyword and value in the second target key-value pair, the flexibility of generating timestamp is improved, and it is also beneficial to quickly query the second target operation data corresponding to the timestamp when verifying the security of the smart card, thereby improving the verification efficiency of the smart card.
[0056] It should be noted here that if the smart card is not copied, the operation data generated during the unlocking process will be used as the first target operation data and the second target operation data, that is, the first target operation data and the second target operation data are consistent. If the smart card is copied, the second target operation data does not exist in the smart card, and the first target operation data corresponding to the second target operation data is stored in the smart door lock, so that when comparing the first target operation data and the second target operation data, data inconsistency occurs.
[0057] In this embodiment, the operation data generated when unlocking the door at the second time is used as the first target operation data and the second target operation data, and are stored in the memory in the smart door lock and the sector in the smart card respectively. Through this distributed storage method, the security of the data storage of both parties is guaranteed, which is beneficial to improve the security and reliability of the operation verification results when the security verification of the smart card is performed, thereby improving the security and reliability of the application of the smart card.
[0058] In some optional implementations of this embodiment, in step S300, when unlocking at the second time, the operation data generated by the smart door lock during the unlocking process is used as the first target operation data and the second target operation data, including the following steps S310 to S340:
[0059] S310: When unlocking the door at the second time, the operation data generated by the smart door lock during the unlocking process is used as the first initial operation data and the second initial operation data.
[0060] The first initial operation data includes characteristic data such as door lock identification, first initial operation time, first initial unlocking times, first initial recording location information, etc. The first initial operation time refers to the second time stored in the smart door lock when unlocking at the second time, the first initial unlocking times refers to the unlocking times stored in the smart door lock when unlocking at the second time, and the first recording location information refers to the storage address information of the second target operation data stored in the smart door lock when unlocking at the second time and the storage address information of the first target operation data.
[0061] The second initial operation data includes characteristic data such as door lock identification, second initial operation time, second initial unlocking times, second initial recording location information, etc., wherein the second initial operation time refers to the second time stored in the smart card when unlocking at the second time, the second unlocking times refers to the unlocking times stored in the smart card when unlocking at the second time, and the second initial recording location information refers to the storage address information of the second target operation data stored in the smart card when unlocking at the second time and the storage address information of the first target operation data.
[0062] S320: Using an encryption algorithm, encrypt the first initial operation data and the second initial operation data respectively to obtain first encrypted operation data corresponding to the first initial operation data and second encrypted operation data corresponding to the second initial operation data.
[0063] Among them, the encryption algorithm can be a hash algorithm, a symmetric encryption algorithm, an asymmetric encryption algorithm, etc., which is selected according to the actual application scenario. This application does not make specific limitations on the encryption algorithm.
[0064] S330: Using the first encrypted operation data as the first target operation data.
[0065] S340: Use the second encrypted operation data as second target operation data.
[0066] In this embodiment, the first initial operation data and the second initial operation data are encrypted by adopting an encryption algorithm to obtain the corresponding first encrypted operation data and the second encrypted operation data, so that the first Mijia operation data is used as the first target operation data, and the second encrypted operation data is used as the second target operation data, thereby ensuring the security of the data storage of both parties, so as to improve the security and reliability of the operation verification results when the security verification of the smart card is performed, thereby improving the security and reliability of the application of the smart card.
[0067] In some optional implementations of this embodiment, the second time includes at least one unlocking time, and step S100, when unlocking at the first time, obtains pre-stored first target operation data from the smart door lock, and obtains second target operation data from the smart card, including the following steps S110 to S120:
[0068] S110: When unlocking the smart door lock for the first time, obtain all operation data in the smart door lock, and splice each operation data in the smart door lock according to the unlocking time corresponding to each operation data in the smart door lock to obtain the first target operation data.
[0069] Among them, all first operation data refer to the operation data (such as door lock identification, operation time, number of unlocking, recorded location information and other unique characteristic data) generated each time the smart door lock is unlocked in a historical time period (such as month, week, etc.), and is stored in the memory in the smart door lock.
[0070] For example, all first operation data in the smart door lock within the past week starting from the first time are obtained, that is, the operation data corresponding to each unlocking time within the past week starting from the first time, and each first operation data is spliced according to the time corresponding to each first operation data to obtain the first target operation data.
[0071] S120: Acquire all operation data in the smart card, and concatenate the operation data in the smart card according to the unlocking time corresponding to each operation data in the smart card to obtain second target operation data.
[0072] Among them, all second operation data refer to the operation data (such as operation time, number of unlocking, recorded location information and other unique characteristic data) generated each time the smart door lock is unlocked in a historical time period (such as month, week, etc.), and is stored in the sector in the smart card.
[0073] For example, all second operation data in the past week starting from the first time in the smart card are obtained, and the second operation data are spliced according to the time corresponding to each second operation data to obtain the second target operation data.
[0074] In this embodiment, the first target operation data is obtained by acquiring all the first operation data and splicing them in chronological order, thereby the first target operation data includes all the first operation data connected in order in chronological order, and all the second operation data are acquired and spliced in chronological order to obtain the second target operation data, thereby the second target operation data includes all the second operation data connected in order in chronological order, thereby using all the second operation data in the smart card and all the first operation data in the smart door lock to perform security verification on the smart door card, thereby improving the security and reliability of the operation verification results, thereby improving the security and reliability of the application of the smart card.
[0075] In some optional implementations of this embodiment, after step S200, that is, after performing security verification on the smart card according to the first target operation data and the second target operation data to obtain an operation verification result, the method further includes the following steps S210 to S213:
[0076] S210: If the operation verification result is passed, the operation data generated when the first unlocking is obtained as the data to be stored.
[0077] Among them, if the operation verification result is passed, it means that the smart card has not been copied, and the operation data generated when unlocking for the first time may include the operation time, the number of unlocking times, and the recorded location information, wherein the recorded location information includes the storage address of the memory in the smart door lock and the storage address of the sector in the smart card.
[0078] S211: Randomly select a sector storing operation data from sectors of the smart card as a sector to be processed, and update the sector to be processed with the data to be stored.
[0079] The to-be-processed sector is updated with the to-be-stored data, that is, the operation data in the to-be-processed sector is deleted, and the to-be-stored data is stored in the to-be-processed sector.
[0080] S212: randomly obtaining a storage address from the memory as the target storage address, and using the data to be stored to update the operation data corresponding to the target storage address.
[0081] The storage address is a memory address, which is the number of a storage unit in the memory. Since there are a large number of storage units in the memory, the memory address is used to query the storage data of the storage unit corresponding to the memory address.
[0082] S213: Store the serial number of the to-be-processed sector in association with the target storage address in the memory.
[0083] Optionally, if the operation verification result is passed, the operation data generated when the first unlocking is obtained as the data to be stored, and the stored data detection is performed on each sector in the smart card;
[0084] If it is detected that all sectors in the smart card are full of operation data, the sector with the earliest storage time of the operation data is used as the target sector, and the operation data in the target sector is updated with the data to be stored;
[0085] If it is detected that the sectors in the smart card are not fully written with the operation data, the data to be stored is updated to the sectors that do not store the operation data.
[0086] In this embodiment, by randomly selecting a target storage address and a sector to be processed, and using the data to be stored to update the operation data corresponding to the target storage address and the operation data corresponding to the sector to be processed, the randomness of data storage is used, and the serial number of the sector to be processed and the target storage address are associated and stored to facilitate subsequent data query. This is beneficial to improving the security and reliability of the operation verification results when performing security verification on the smart door card, thereby improving the security and reliability of the application of the smart card.
[0087] In some optional implementations of this embodiment, after step S200, that is, after performing security verification on the smart card according to the first target operation data and the second target operation data to obtain an operation verification result, the method further includes the following steps S220 to S224:
[0088] S220: If the operation verification result is passed, obtain the pre-stored first encrypted unlocking data, and obtain the second encrypted unlocking data from the smart card.
[0089] The first encrypted unlocking data is a key pre-set and stored in the smart door lock, and the second encrypted unlocking data is a second encrypted unlocking data pre-set and stored in the smart card.
[0090] The first encrypted unlocking data and the second encrypted unlocking data may be hash values obtained by encrypting a password set by a user using a hash algorithm.
[0091] S221: Performing unlock password verification on the smart card according to the first encrypted unlock data and the second encrypted unlock data to obtain an unlock password verification result.
[0092] S222: If the unlock password verification result is passed, the smart door lock is controlled to unlock.
[0093] Among them, if the unlock password verification result is passed, it means that the second encrypted unlock data of the smart card is correct, so that an unlock instruction is generated, so that the smart door lock responds to the unlock instruction to unlock.
[0094] S223: If the unlock password verification result is failed, a door lock safety alarm message is generated according to the unlock password verification result.
[0095] Among them, if the unlocking password verification result is passed, it means that the second encrypted unlocking data of the smart card is incorrect, so that a door lock security alarm instruction is generated, so that the smart door lock generates a door lock security alarm information in response to the door lock security alarm instruction.
[0096] The door lock safety alarm information can be any one or more of sound information, text information, photoelectric information, etc.
[0097] S224: If the operation verification result is failed, a duplicate card alarm message is generated according to the first time and the second time.
[0098] The copy card alarm information may be any one or more of sound information, text information, photoelectric information, link information, etc.
[0099] In this embodiment, it is first determined whether the operation verification result of the smart card is passed. If the operation verification result is passed, the smart card key verification is performed. If the unlocking password verification result is passed, the smart door lock is controlled to unlock. Otherwise, a door lock security alarm message is generated. If the operation verification result fails, a copy card alarm message is generated to improve the security and reliability of the application of smart cards, thereby enhancing the security and reliability of smart door locks.
[0100] In some optional implementations of this embodiment, after step S224, that is, after generating a duplicate card alarm message according to the first time and the second time if the operation verification result is not passed, the method further includes the following steps S2240 to S2242:
[0101] S2240: Based on the copy card alarm information, an identity authentication instruction is sent to the target terminal, wherein the target terminal is used to: respond to the identity authentication instruction to guide the user to perform identity authentication, generate an identity authentication result, and if the identity authentication result is passed, send a card unlock password verification instruction to the smart door lock; if the identity authentication result is failed, send an alarm instruction to the smart door lock.
[0102] Among them, the target terminal can be a mobile phone, tablet, face recognition device or fingerprint authentication device, etc. The target terminal is connected to the smart door lock through a wired or wireless method, and the identity authentication can verify one or more of the user's fingerprint information, facial feature information, ID card information, etc.
[0103] S2241: In response to the card unlocking password verification instruction, the unlocking password of the smart card is verified, and the operation data in the smart door lock and the operation data in the smart card are initialized.
[0104] Optionally, in response to the card password verification instruction, unlock confirmation information is obtained, and the unlock confirmation information indicates whether the user is sure to unlock. If the unlock confirmation information indicates that the user is sure to unlock, the unlock password of the smart card is verified, otherwise, the unlocking is terminated.
[0105] S2242: In response to the alarm instruction, a door lock security alarm message is issued.
[0106] The door lock security alarm information can be one or more of sound information, text information, photoelectric information, etc.
[0107] In this embodiment, the duplicate card alarm information is sent to the target terminal to guide the user to perform identity authentication. If the identity authentication result is passed, it means that the user identity is normal, then the smart card is unlocked and the password is verified, and the operation data in the smart door lock and the operation data in the smart card are initialized, thereby improving the intelligence of the smart door lock. If the identity authentication result is failed, it means that the user identity is abnormal, then a door lock security alarm message is issued, thereby improving the security and reliability of the application of smart cards, as well as the security and reliability of the application of smart door locks.
[0108] In one application scenario, if the smart door lock corresponds to multiple smart cards, the memory in the smart door lock is divided into multiple storage areas, each storage area is composed of multiple continuous or discontinuous memory units, and the memory unit is used to store the first target operation data generated by the smart card after unlocking the smart door lock, and the storage area and the smart card correspond one to one. For example, when the smart card 1 unlocks the smart door lock at the second time, the operation data generated by the smart door lock 1 during the unlocking process is stored in the sector of the smart card 1 and the storage area corresponding to the smart card 1 in the smart door lock respectively. When unlocking at the first time, the first target operation data corresponding to the second time is obtained from the storage area in the smart door lock, and the second target operation data corresponding to the second time is obtained from the smart card 1. According to the first target operation data and the second target operation data, the security of the smart card 1 is verified to obtain the operation verification result.
[0109] In another application scenario, when the operation verification result is failed, after the smart door lock confirms that the smart card has been copied, it sends a password reset reminder message to the target terminal to remind the user to reset the password of the smart card so that the copied card will automatically become invalid.
[0110] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.
[0111] In one embodiment, a smart card verification device based on a smart door lock is provided, and the smart card verification device based on a smart door lock corresponds one-to-one to the smart card verification method based on a smart door lock in the above embodiment. Figure 3 As shown, the smart card verification device based on the smart door lock includes a data acquisition module 10 and a data verification module 20, and each functional module is described in detail as follows:
[0112] A data acquisition module is used to acquire pre-stored first target operation data from the smart door lock when unlocking the door for the first time, and to acquire second target operation data from the smart card, wherein the first target operation data is the operation data generated when the smart door lock is unlocked at the second time, and the second target operation data is the operation data generated when the smart door lock is unlocked at the second time, and the second time is earlier than the first time.
[0113] The data verification module is used to perform security verification on the smart card according to the first target operation data and the second target operation data to obtain an operation verification result.
[0114] In this embodiment, when unlocking at the first time, the first target operation data pre-stored is obtained from the smart door lock, and the second target operation data is obtained from the smart card, wherein the first target operation data is the operation data generated when the smart door lock is unlocked at the second time, and the second target operation data is the operation data generated when the smart door lock is unlocked at the second time, and the second time is earlier than the first time; according to the first target operation data and the second target operation data, the smart card is security verified to obtain an operation verification result. In this application, when unlocking at the second time, the first target operation data is stored in the smart door lock, and the second target operation data is stored in the smart card, and when unlocking at the first time, the first target operation data and the second target operation data corresponding to the second time are compared to perform security verification on the smart card to determine whether the smart card has been copied, thereby improving the security and reliability of the application of smart cards.
[0115] Optionally, before the data acquisition module 10 acquires pre-stored first target operation data from the smart door lock, the device further includes:
[0116] The operation data determination module is used to use the operation data generated by the smart door lock during the unlocking process as the first target operation data and the second target operation data when unlocking the door at the second time.
[0117] The first storage module is used to store the first target operation data into the memory in the smart door lock.
[0118] The second storage module is used to store the second target operation data into the sector in the smart card.
[0119] Optionally, when unlocking at the second time, the operation data determination module uses the operation data generated by the smart door lock in the unlocking process as the first target operation data and the second target operation data, including:
[0120] The initial operation data determination submodule is used to use the operation data generated by the smart door lock during the unlocking process as the first initial operation data and the second initial operation data when unlocking the door at the second time.
[0121] The encryption submodule is used to adopt an encryption algorithm to encrypt the first initial operation data and the second initial operation data respectively to obtain first encrypted operation data corresponding to the first initial operation data and second encrypted operation data corresponding to the second initial operation data.
[0122] The first operation data determination submodule is used to use the first encrypted operation data as the first target operation data.
[0123] The second operation data determination submodule is used to use the second encrypted operation data as the second target operation data.
[0124] Optionally, the data acquisition module 10 acquires pre-stored first target operation data from the smart door lock, and acquires second target operation data from the smart card, including:
[0125] The first data splicing submodule is used to obtain all operation data in the smart door lock when unlocking for the first time, and splice each operation data in the smart door lock according to the unlocking time corresponding to each operation data in the smart door lock to obtain the first target operation data. And
[0126] The second data splicing submodule is used to obtain all operation data in the smart card, and splice each operation data in the smart card according to the unlocking time corresponding to each operation data in the smart card to obtain second target operation data.
[0127] Optionally, after the data verification module 20 performs security verification on the smart card according to the first target operation data and the second target operation data to obtain an operation verification result, the device further includes:
[0128] The module for determining data to be stored is used to obtain the operation data generated when the first unlocking is performed as the data to be stored if the operation verification result is passed.
[0129] The to-be-processed sector determination module is used to randomly select a sector storing operation data from various sectors of the smart card as the to-be-processed sector, and update the to-be-processed sector with the to-be-stored data.
[0130] The target storage address determination module is used to randomly obtain a storage address from the memory as the target storage address, and use the data to be stored to update the operation data corresponding to the target storage address.
[0131] The associated storage module is used to associate the serial number of the sector to be processed with the target storage address and store them in the memory.
[0132] Optionally, after the data verification module 20 performs security verification on the smart card according to the first target operation data and the second target operation data to obtain an operation verification result, the device further includes:
[0133] The key acquisition module is used to acquire the pre-stored first encrypted unlocking data and acquire the second encrypted unlocking data from the smart card if the operation verification result is passed.
[0134] The unlocking password verification module is used to verify the unlocking password of the smart card according to the first encrypted unlocking data and the second encrypted unlocking data to obtain the unlocking password verification result.
[0135] The unlocking module is used to control the smart door lock to unlock if the unlocking password verification result is passed.
[0136] The first alarm information generating module is used to generate door lock safety alarm information according to the unlock password verification result if the unlock password verification result is failed.
[0137] The second alarm information generating module is used to generate a duplicate card alarm information according to the first time and the second time if the operation verification result is failed.
[0138] Optionally, after the second alarm information generating module generates a duplicate card alarm message according to the first time and the second time if the operation verification result is not passed, the device further includes:
[0139] The alarm information sending submodule is used to send an identity authentication instruction to the target terminal according to the copy card alarm information, wherein the target terminal is used to: respond to the identity authentication instruction to guide the user to perform identity authentication and generate an identity authentication result. If the identity authentication result is passed, a card unlock password verification instruction is sent to the smart door lock; if the identity authentication result is not passed, an alarm instruction is sent to the smart door lock.
[0140] The first instruction processing submodule is used to respond to the card unlocking password verification instruction, verify the unlocking password of the smart card, and initialize the operation data in the smart door lock and the operation data in the smart card.
[0141] The second instruction processing submodule is used to issue a door lock safety alarm message in response to the alarm instruction.
[0142] In one embodiment, a smart door lock is provided, and its internal structure diagram can be as follows: Figure 4 As shown. The smart door lock includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor of the smart door lock is used to provide computing and control capabilities. The memory of the smart door lock includes a non-volatile and / or volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the smart door lock is used to communicate with an external client through a network connection. When the computer program is executed by the processor, the functions or steps of a smart card verification method based on a smart door lock are implemented.
[0143] In one embodiment, another smart door lock is provided, and its internal structure diagram can be as follows: Figure 5 As shown. The smart door lock includes a processor, a memory, a network interface, a display screen and an input device connected through a system bus. Among them, the processor of the smart door lock is used to provide computing and control capabilities. The memory of the smart door lock includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the smart door lock is used to communicate with an external server through a network connection. When the computer program is executed by the processor, the functions or steps of a smart card verification method based on a smart door lock are implemented.
[0144] In one embodiment, a smart door lock is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program:
[0145] When unlocking at the first time, obtaining pre-stored first target operation data from the smart door lock, and obtaining second target operation data from the smart card, wherein the first target operation data is the operation data generated when the smart door lock is unlocked at the second time, and the second target operation data is the operation data generated when the smart door lock is unlocked at the second time, and the second time is earlier than the first time;
[0146] The security of the smart card is verified according to the first target operation data and the second target operation data to obtain an operation verification result.
[0147] In this embodiment, when unlocking at the first time, the first target operation data pre-stored is obtained from the smart door lock, and the second target operation data is obtained from the smart card, wherein the first target operation data is the operation data generated when the smart door lock is unlocked at the second time, and the second target operation data is the operation data generated when the smart door lock is unlocked at the second time, and the second time is earlier than the first time; according to the first target operation data and the second target operation data, the smart card is security verified to obtain an operation verification result. In this application, when unlocking at the second time, the first target operation data is stored in the smart door lock, and the second target operation data is stored in the smart card, and when unlocking at the first time, the first target operation data and the second target operation data corresponding to the second time are compared to perform security verification on the smart card to determine whether the smart card has been copied, thereby improving the security and reliability of the application of smart cards.
[0148] In one embodiment, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0149] When unlocking at the first time, the pre-stored first target operation data is obtained from the smart door lock, and the second target operation data is obtained from the smart card, wherein the first target operation data is the operation data generated when the smart door lock is unlocked at the second time, and the second target operation data is the operation data generated when the smart door lock is unlocked at the second time, and the second time is earlier than the first time.
[0150] The security of the smart card is verified according to the first target operation data and the second target operation data to obtain an operation verification result.
[0151] In this embodiment, when unlocking at the first time, the first target operation data pre-stored is obtained from the smart door lock, and the second target operation data is obtained from the smart card, wherein the first target operation data is the operation data generated when the smart door lock is unlocked at the second time, and the second target operation data is the operation data generated when the smart door lock is unlocked at the second time, and the second time is earlier than the first time; according to the first target operation data and the second target operation data, the smart card is security verified to obtain an operation verification result. In this application, when unlocking at the second time, the first target operation data is stored in the smart door lock, and the second target operation data is stored in the smart card, and when unlocking at the first time, the first target operation data and the second target operation data corresponding to the second time are compared to perform security verification on the smart card to determine whether the smart card has been copied, thereby improving the security and reliability of the application of smart cards.
[0152] It should be noted that the above functions or steps that can be implemented by the computer-readable storage medium or the smart door lock can be found in the aforementioned method embodiments. To avoid repetition, they will not be described one by one here.
[0153] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in the present application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0154] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0155] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention.
Claims
1. A smart card verification method based on a smart door lock, characterized in that: The method comprises: When unlocking at the first time, obtaining pre-stored first target operation data from the smart door lock, and obtaining second target operation data from the smart card, wherein the first target operation data is the operation data generated when the smart door lock is unlocked at the second time, and the second target operation data is the operation data generated when the smart door lock is unlocked at the second time, and the second time is earlier than the first time; The security of the smart card is verified according to the first target operation data and the second target operation data to obtain an operation verification result.
2. The smart card verification method based on smart door lock according to claim 1 is characterized in that: Before acquiring the pre-stored first target operation data from the smart door lock, the method further includes: When unlocking at the second time, using the operation data generated by the smart door lock during the unlocking process as the first target operation data and the second target operation data; Storing the first target operation data in a memory in the smart door lock; The second target operation data is stored in a sector in the smart card.
3. The smart card verification method based on smart door lock according to claim 2 is characterized in that: When unlocking at the second time, using the operation data generated by the smart door lock during the unlocking process as the first target operation data and the second target operation data, including: When unlocking at the second time, using the operation data generated by the smart door lock during the unlocking process as the first initial operation data and the second initial operation data; Using an encryption algorithm, encrypt the first initial operation data and the second initial operation data respectively to obtain first encrypted operation data corresponding to the first initial operation data and second encrypted operation data corresponding to the second initial operation data; using the first encrypted operation data as the first target operation data; The second encrypted operation data is used as the second target operation data.
4. The smart card verification method based on smart door lock according to claim 1 is characterized in that: The second time includes at least one unlocking time, and when unlocking at the first time, obtaining pre-stored first target operation data from the smart door lock, and obtaining second target operation data from the smart card, including: When unlocking at the first time, all operation data in the smart door lock are acquired, and according to the unlocking time corresponding to each operation data in the smart door lock, each operation data in the smart door lock is spliced to obtain the first target operation data; and All operation data in the smart card are acquired, and according to the unlocking time corresponding to each operation data in the smart card, each operation data in the smart card is spliced to obtain the second target operation data.
5. The smart card verification method based on smart door lock according to claim 1 is characterized in that: After performing security verification on the smart card according to the first target operation data and the second target operation data and obtaining an operation verification result, the method further includes: If the operation verification result is passed, obtaining the operation data generated when unlocking at the first time as the data to be stored; Randomly selecting a sector storing the operation data from the sectors of the smart card as a sector to be processed, and updating the sector to be processed with the data to be stored; Randomly acquiring a storage address from the memory as a target storage address, and using the data to be stored to update the operation data corresponding to the target storage address; The serial number of the to-be-processed sector is associated with the target storage address and stored in the memory.
6. The smart card verification method based on smart door lock according to claim 1 is characterized in that: After performing security verification on the smart card according to the first target operation data and the second target operation data and obtaining an operation verification result, the method further includes: If the operation verification result is passed, obtaining the pre-stored first encrypted unlocking data, and obtaining the second encrypted unlocking data from the smart card; According to the first encrypted unlocking data and the second encrypted unlocking data, the unlocking password of the smart card is verified to obtain an unlocking password verification result; If the unlock password verification result is passed, the smart door lock is controlled to unlock; If the unlock password verification result is failed, generating door lock security alarm information according to the unlock password verification result; If the operation verification result is failed, a duplicate card alarm message is generated according to the first time and the second time.
7. The smart card verification method based on smart door lock according to claim 6 is characterized in that: If the operation verification result is not passed, after generating a copy card alarm message according to the first time and the second time, the method further includes: According to the copy card alarm information, an identity authentication instruction is sent to the target terminal, wherein the target terminal is used to: in response to the identity authentication instruction, instruct the user to perform identity authentication, generate an identity authentication result, and if the identity authentication result is passed, send a card unlock password verification instruction to the smart door lock; if the identity authentication result is not passed, send an alarm instruction to the smart door lock; In response to the card unlocking password verification instruction, the unlocking password of the smart card is verified, and the operation data in the smart door lock and the operation data in the smart card are initialized; In response to the alarm instruction, a door lock security alarm message is issued.
8. A smart card verification device based on a smart door lock, characterized in that: The device comprises: A data acquisition module, used to acquire pre-stored first target operation data from the smart door lock when unlocking at the first time, and acquire second target operation data from the smart card, wherein the first target operation data is the operation data generated when the smart door lock is unlocked at the second time, and the second target operation data is the operation data generated when the smart door lock is unlocked at the second time, and the second time is earlier than the first time; The data verification module is used to perform security verification on the smart card according to the first target operation data and the second target operation data to obtain an operation verification result.
9. A smart door lock, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the smart card verification method based on the smart door lock as described in any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the smart card verification method based on a smart door lock as described in any one of claims 1 to 7 are implemented.