CN109920102B - Bluetooth keyless entry intelligent lock method, device, equipment and storage medium - Google Patents
Bluetooth keyless entry intelligent lock method, device, equipment and storage medium Download PDFInfo
- Publication number
- CN109920102B CN109920102B CN201910106509.7A CN201910106509A CN109920102B CN 109920102 B CN109920102 B CN 109920102B CN 201910106509 A CN201910106509 A CN 201910106509A CN 109920102 B CN109920102 B CN 109920102B
- Authority
- CN
- China
- Prior art keywords
- data
- judging
- time
- aes decryption
- judging whether
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 61
- 238000012545 processing Methods 0.000 claims abstract description 86
- 230000004044 response Effects 0.000 claims abstract description 33
- 238000012795 verification Methods 0.000 claims abstract description 13
- 230000008569 process Effects 0.000 claims description 15
- 238000012217 deletion Methods 0.000 claims description 13
- 230000037430 deletion Effects 0.000 claims description 13
- 238000004891 communication Methods 0.000 claims description 2
- 238000013459 approach Methods 0.000 abstract description 5
- 238000012986 modification Methods 0.000 abstract description 5
- 230000004048 modification Effects 0.000 abstract description 5
- 238000004590 computer program Methods 0.000 description 7
- 230000006870 function Effects 0.000 description 4
- 238000010586 diagram Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000008878 coupling Effects 0.000 description 1
- 238000010168 coupling process Methods 0.000 description 1
- 238000005859 coupling reaction Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
Classifications
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D30/00—Reducing energy consumption in communication networks
- Y02D30/70—Reducing energy consumption in communication networks in wireless communication networks
Landscapes
- Lock And Its Accessories (AREA)
Abstract
The invention discloses a Bluetooth keyless entry intelligent lock method, device, equipment and storage medium, which comprises the steps of broadcasting scanning, receiving a response data packet obtained by the broadcasting scanning, judging the format requirement of the response data packet, AES decryption processing, MD5 verification, judging the validity of data time, judging the validity of data and key matching processing. According to the invention, the data broadcast by the nearby Bluetooth BLE is received, the data is decrypted, the data is verified against modification, and the key matching is performed after the legitimacy of the data is compared, so that the automatic unlocking is realized. When a user approaches to the door lock, the Bluetooth device carried by the user can be automatically identified and matched in a short distance, unlocking and locking are automatically realized, verification operation on the door lock is not needed, the use is flexible, the operation is simple, and the application crowd range is wide.
Description
Technical Field
The invention relates to the field of door locks, in particular to a Bluetooth keyless entry intelligent lock method, a Bluetooth keyless entry intelligent lock device, bluetooth keyless entry equipment and a Bluetooth keyless entry storage medium.
Background
Currently, the unlocking modes of the existing door lock generally comprise modes such as a key, a door card, a password, fingerprints, face recognition and the like. However, these methods all require the user to draw a key, swipe a door card, press a fingerprint, input a password, or wake up a door lock to perform operations such as face recognition. When the user holds the articles with both hands, the user needs to put down the articles and unlock the locks again, the operation is troublesome, and the time for entering and exiting the door is wasted. Moreover, the unlocking difficulty of the verification modes is relatively high for the blind, the specific position of the door lock needs to be confirmed, the unlocking can be performed, and the user experience is affected.
Disclosure of Invention
In order to solve the problems, the invention aims to provide an intelligent lock method, device, equipment and storage medium for Bluetooth keyless entry, which can automatically identify and match Bluetooth equipment carried by a user in a short distance, automatically realize unlocking and locking, are flexible to use, are simple to operate and are suitable for various crowds.
The invention solves the problems by adopting the following technical scheme:
the invention provides an intelligent lock method for Bluetooth keyless entry, which comprises the following steps:
performing broadcast scanning;
receiving a response data packet obtained by broadcast scanning;
judging whether the obtained response data packet meets the format requirement, and if so, performing AES decryption processing;
performing MD5 verification on the data subjected to AES decryption;
judging whether the time of the data is valid or not, and judging the validity of the data when the time is valid;
judging the validity of the data, and performing key matching processing after the data is legal;
the key matching process includes: judging whether an MAC address consistent with the data after AES decryption processing exists in the MAC addresses prestored in the system, and outputting an unlocking signal when the consistent MAC address exists.
Further, the determining whether the time of the data is valid includes:
judging whether the time difference between the time stamp of the data subjected to the AES decryption processing and the system time is within a preset time difference range, if so, considering that the time is valid, and if not, considering that the time is invalid.
Further, the preset time difference range is three minutes.
Further, after the data is legal, the method further comprises the following steps:
judging the class of the instruction bit of the data after AES decryption processing, and executing the step key matching processing when the class of the instruction bit is a comparison instruction; when the category of the command bit is the input command, executing key input processing; when the category of the instruction bit is a deleting instruction, executing key deleting processing;
the key entry process includes: judging whether an MAC address consistent with the data after the AES decryption processing exists in the MAC addresses prestored in the system, if so, failing to enter the data, and if not, entering the MAC address of the data after the AES decryption processing, and prompting successful entering the data;
the key deletion process includes: judging whether the MAC addresses which are pre-stored in the system are consistent with the data after the AES decryption processing exist or not, deleting the corresponding MAC addresses in the pre-stored system when the consistent MAC addresses exist, prompting successful deletion, and failing to delete when the consistent MAC addresses do not exist.
Further, in the key matching process, after the consistent MAC address exists, the method further includes the steps of:
judging whether the lock is in an unlocking state or a locking state currently, updating the automatic locking time when the lock is in the unlocking state, and outputting an unlocking signal when the lock is in the locking state.
In a second aspect of the present invention, there is provided a bluetooth keyless entry device comprising the following elements:
a broadcast scanning unit for performing broadcast scanning;
a response data packet receiving unit for receiving a response data packet obtained by broadcast scanning;
the format judging unit is used for judging whether the obtained response data packet meets the format requirement;
an AES decryption unit for performing AES decryption processing;
the MD5 checking unit is used for performing MD5 checking on the data subjected to AES decryption processing;
the data time validity judging unit is used for judging whether the time of the data is valid or not, and judging the validity of the data when the time is valid;
the data validity judging unit is used for judging the validity of the data and carrying out key matching processing after the data is legal;
the key matching processing unit is used for judging whether the MAC address consistent with the data after the AES decryption processing exists in the MAC addresses prestored in the system, and outputting an unlocking signal when the consistent MAC address exists.
Further, the method also comprises the following units:
the data instruction bit type judging unit is used for judging the type of the instruction bit of the data subjected to the AES decryption processing, and executing the step key matching processing when the type of the instruction bit is a comparison instruction; when the category of the command bit is the input command, executing key input processing; when the category of the instruction bit is a deleting instruction, executing key deleting processing;
the key input processing unit is used for judging whether an MAC address consistent with the data after the AES decryption processing exists in the MAC addresses prestored in the system, if so, inputting cannot be performed, and input failure is prompted, and if not, inputting the MAC address of the data after the AES decryption processing, and prompting that input is successful;
the key deleting processing unit is used for judging whether the MAC address which is consistent with the data after the AES decryption processing exists in the MAC addresses which are prestored in the system, deleting the corresponding MAC address which is prestored in the system when the consistent MAC address exists, prompting that the deletion is successful, and failing to delete when the consistent MAC address does not exist.
Further, the method also comprises the following units:
and the lock body state judging unit is used for judging whether the lock body is in an unlocking state or a locking state currently, updating the automatic locking time when the lock body is in the unlocking state, and outputting an unlocking signal when the lock body is in the locking state.
In a third aspect of the invention, a bluetooth keyless entry device is provided, comprising at least one control processor and a memory for communication connection with the at least one control processor; the memory stores instructions executable by the at least one control processor to enable the at least one control processor to perform a bluetooth keyless entry smart lock method as described above.
In a fourth aspect, the present invention provides a computer readable storage medium having stored thereon computer executable instructions for causing a computer to perform a bluetooth keyless entry smart lock method as described above.
In a fifth aspect of the invention, the invention also provides a computer program product comprising a computer program stored on a computer readable storage medium, the computer program comprising program instructions which, when executed by a computer, cause the computer to perform a bluetooth keyless entry smart lock method as described above.
One of the above technical solutions has the following advantages or beneficial effects:
the invention provides a Bluetooth keyless entry intelligent lock method, device, equipment and storage medium, which comprise the steps of broadcasting scanning, receiving a response data packet obtained by the broadcasting scanning, judging the format requirement of the response data packet, performing AES decryption processing, MD5 verification, judging the validity of data time, judging the validity of data and performing key matching processing. According to the invention, the data broadcast by the nearby Bluetooth BLE is received, the data is decrypted, the data is verified against modification, and the key matching is performed after the legitimacy of the data is compared, so that the automatic unlocking is realized. When a user approaches to the door lock, bluetooth equipment carried by the user can be automatically identified and matched in a short distance, unlocking and locking are automatically realized, verification operation on the door lock is not needed, the door lock is flexible to use, the operation is simple, the applicable crowd range is wide, and the door lock is applicable to old people, children and disabled people. In addition, the broadcast data is subjected to AES encryption and MD5 checksum timeliness judgment, so that the data is prevented from being cracked, illegally modified and copied to carry out replay attack, and the security is high.
Drawings
The invention is further described below with reference to the drawings and examples.
FIG. 1 is a basic method flow diagram of a Bluetooth keyless entry smart lock method according to one embodiment of the present invention;
FIG. 2 is a flowchart of a specific method of a Bluetooth keyless entry smart lock method according to an embodiment of the present invention;
fig. 3 is a flowchart of a method related to a bluetooth device according to an embodiment of the present invention.
Detailed Description
Currently, the unlocking modes of the existing door lock generally comprise modes such as a key, a door card, a password, fingerprints, face recognition and the like. However, these methods all require the user to draw a key, swipe a door card, press a fingerprint, input a password, or wake up a door lock to perform operations such as face recognition. When the user holds the articles with both hands, the user needs to put down the articles and unlock the locks again, the operation is troublesome, and the time for entering and exiting the door is wasted. Moreover, the unlocking difficulty of the verification modes is relatively high for the blind, the specific position of the door lock needs to be confirmed, the unlocking can be performed, and the user experience is affected.
Based on the method, the data is decrypted by receiving the data broadcasted by the nearby Bluetooth BLE, and the data is verified against modification and compared with the legitimacy in the data and then is subjected to key matching, so that automatic unlocking is realized. When a user approaches to the door lock, bluetooth equipment carried by the user can be automatically identified and matched in a short distance, unlocking and locking are automatically realized, verification operation on the door lock is not needed, the door lock is flexible to use, the operation is simple, the applicable crowd range is wide, and the door lock is applicable to old people, children and disabled people. In addition, the broadcast data is subjected to AES encryption and MD5 checksum timeliness judgment, so that the data is prevented from being cracked, illegally modified and copied to carry out replay attack, and the security is high.
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.
It should be noted that, if not in conflict, the features of the embodiments of the present invention may be combined with each other, which is within the protection scope of the present invention. In addition, while functional block division is performed in a device diagram and logical order is shown in a flowchart, in some cases, the steps shown or described may be performed in a different order than the block division in the device, or in the flowchart.
Referring to fig. 1-3, in one embodiment of the first aspect of the present invention, there is provided a bluetooth keyless entry smart lock method, comprising the steps of:
s1: performing broadcast scanning; the broadcasting scanning is continuously carried out on the surrounding environment, and when a user carries a Bluetooth function mobile phone or a key ring made of BLE Bluetooth, the mobile phone can be scanned within the range of 1-2 meters close to the door lock system.
S2: receiving a response data packet obtained by broadcast scanning; when a user carries a Bluetooth function mobile phone or a key ring made of BLE Bluetooth and approaches to a door lock, the door lock system senses a Bluetooth device signal carried by the user and acquires a corresponding data packet. Wherein the data distribution in the response packet is as follows in table 1:
byte 1 | Byte 2 | Byte 3 | Byte 4 | ………… | Nth byte |
Total length of | 0xFF | XX | XX | XX | XX |
TABLE 1
S3: judging whether the obtained response data packet meets the format requirement, executing the step S4 when the response data packet meets the format requirement, otherwise, returning to execute the step S1; according to the data distribution condition of the response data packet in the table 1, the invention can prove that the response data packet accords with the format requirement by judging whether the data in the 2 nd byte in the response data packet is 0xFF preset by the system or not and when the data in the 2 nd byte in the response data packet is 0 xFF; when the data in the 2 nd byte of the response data packet is not 0xFF, the response data packet is proved to be not in accordance with the format requirement.
S4: AES decryption processing is carried out on the response data packet; since the received response packet is replay-attacked by illegal modification and copying in order to prevent the data from being hacked, AES encryption processing is performed in advance. Therefore, after the response data packet is received, AES decryption processing is required for the response data packet, and after the data packet in table 1 is subjected to AES decryption processing based on the response data packet meeting the format requirement, table 2 can be obtained as follows:
byte 1 | Byte 2 | 3 rd to 7 th byte | 8 th to 13 th byte | 14 th to 15 th byte | 16 th to 23 rd byte |
Total length of | 0xFF | Time stamp | MAC address | Instruction bits | MD5 |
TABLE 2
S5: performing MD5 verification on the data subjected to AES decryption; since the 16 th to 23 th bytes in the table 2 after the decryption process are used for storing the MD5 data, when the MD5 verification is performed, the MD5 data in the 16 th to 23 th bytes may be directly verified.
S6: judging whether the time of the data is effective, executing the step S7 when the time is effective, otherwise, returning to execute the step S1; the invention can judge whether the time difference between the time stamp of the data after the AES decryption processing and the system time is in the preset time difference range, and considers the time to be effective when the time difference is in the preset time difference range, and considers the time to be ineffective when the time difference is not in the preset time difference range. For example, since the 3 rd to 7 th bytes in table 2 after the decryption process are used to store the time stamp data, when judging whether the time of the data is valid, the time stamp data in the 3 rd to 7 th bytes may be directly compared and judged. Secondly, the preset time difference range in the invention is three minutes, namely whether the time difference between the time stamp and the local system is within three minutes or not can be judged, the time of the data is considered to be valid when the time difference is within three minutes, and the time of the data is considered to be invalid when the time difference is not within three minutes.
S7: judging whether the data is legal, executing the step S9 when the data is legal, otherwise, returning to the step S1; finally, the validity of the data needs to be judged.
S9: carrying out key matching processing on the data; wherein step S9 comprises the following substeps S9-1 to S9-5, in particular:
s9-1: the current mode is a normal mode, and step S9-2 is executed;
s9-2: judging whether an MAC address consistent with the data after AES decryption processing exists in the MAC addresses prestored in the system, executing the step S9-3 when the consistent MAC address exists, otherwise executing the step S12; since the 8 th to 13 th bytes in the table 2 after decryption processing are used for storing the MAC addresses, when judging whether the MAC addresses consistent with the data after AES decryption processing exist in the MAC addresses pre-stored in the system, the comparison and verification are directly performed on the MAC addresses in the 8 th to 13 th bytes.
S9-3: judging whether the vehicle is in an unlocking state or a locking state currently, executing the step S9-4 when the vehicle is in the unlocking state, and executing the step S9-5 when the vehicle is in the locking state;
s9-4: updating the automatic locking time;
s9-5: outputting an unlocking signal and prompting successful unlocking;
s12: and prompting failure.
According to the invention, the data broadcast by the nearby Bluetooth BLE is received, the data is decrypted, the data is verified against modification, and the key matching is performed after the legitimacy of the data is compared, so that the automatic unlocking is realized. When a user approaches to the door lock, bluetooth equipment carried by the user can be automatically identified and matched in a short distance, unlocking and locking are automatically realized, verification operation on the door lock is not needed, the door lock is flexible to use, the operation is simple, the applicable crowd range is wide, and the door lock is applicable to old people, children and disabled people. In addition, the broadcast data is subjected to AES encryption and MD5 checksum timeliness judgment, so that the data is prevented from being cracked, illegally modified and copied to carry out replay attack, and the security is high.
Further, based on the above embodiment, another embodiment of the present invention provides a method for intelligent lock with bluetooth keyless entry, wherein after the validity of the data is judged, the method further includes the following steps:
s8: judging the category of the instruction bit of the data after the AES decryption processing, and executing the step key matching processing when the category of the instruction bit is a comparison instruction, namely executing the step S9; when the category of the command bit is the input command, executing the key input process, namely executing the step S10; when the class of the instruction bit is the deletion instruction, executing the key deletion process, namely executing step S11;
the step S10 of performing key entry processing includes:
s10-1: the current mode is an input setting mode, and the step S10-2 is executed;
s10-2: judging whether an MAC address consistent with the data after AES decryption processing exists in the MAC addresses prestored in the system, executing the step S12 when the consistent MAC address exists, and executing the step 10-3 when the consistent MAC address does not exist;
s10-3: and recording the MAC address of the data subjected to AES decryption processing, and prompting successful recording.
The step S11 of performing the key deletion process includes:
s11-1: the current mode is a deletion setting mode, and step S11-2 is executed;
s11-2: judging whether an MAC address consistent with the data after AES decryption processing exists in the MAC addresses prestored in the system, executing the step S11-3 when the consistent MAC address exists, and executing the step S12 when the consistent MAC address does not exist;
s11-3: deleting the corresponding MAC address in the system pre-storage and prompting the successful deletion.
Aiming at the intelligent lock method for Bluetooth keyless entry, at one end of a user carrying Bluetooth equipment, namely a Bluetooth function mobile phone or a key ring manufactured by BLE Bluetooth, the intelligent lock method has a corresponding flow method, and comprises the following specific steps:
p1: timing 1s broadcasting;
p2: judging a current module, wherein the current module comprises three modes of encryption, input and deletion;
p3: generating MD5 from the data and combining the data; the MD5 is generated from the time stamp, the MAC address, and the unlock instruction data, and the data after MD5 generation is shown in table 3:
byte 1 | Byte 2 | 3 rd to 7 th byte | 8 th to 13 th byte | 14 th to 15 th byte | 16 th to 23 rd byte |
Total length of | 0xFF | Time stamp | MAC address | Instruction bits | MD5 |
TABLE 3 Table 3
P4: performing AES encryption processing; the data in table 3 is encrypted, and the encrypted data is shown in table 4:
byte 1 | Byte 2 | Byte 3 | Byte 4 | ………… | Nth byte |
Total length of | 0xFF | XX | XX | XX | XX |
TABLE 4 Table 4
P5: updating broadcast data and scanning response packet data;
p6: broadcasting;
p7: go to sleep.
An embodiment of the second aspect of the present invention provides a bluetooth keyless entry device, including:
a broadcast scanning unit for performing broadcast scanning;
a response data packet receiving unit for receiving a response data packet obtained by broadcast scanning;
the format judging unit is used for judging whether the obtained response data packet meets the format requirement;
an AES decryption unit for performing AES decryption processing;
the MD5 checking unit is used for performing MD5 checking on the data subjected to AES decryption processing;
the data time validity judging unit is used for judging whether the time of the data is valid or not, and judging the validity of the data when the time is valid;
the data validity judging unit is used for judging the validity of the data and carrying out key matching processing after the data is legal;
the key matching processing unit is used for judging whether the MAC address consistent with the data after the AES decryption processing exists in the MAC addresses prestored in the system, and outputting an unlocking signal when the consistent MAC address exists.
Further, based on the above embodiment, another embodiment of the present invention provides a bluetooth keyless entry device, further including:
the data instruction bit type judging unit is used for judging the type of the instruction bit of the data subjected to the AES decryption processing, and executing the step key matching processing when the type of the instruction bit is a comparison instruction; when the category of the command bit is the input command, executing key input processing; when the category of the instruction bit is a deleting instruction, executing key deleting processing;
the key input processing unit is used for judging whether an MAC address consistent with the data after the AES decryption processing exists in the MAC addresses prestored in the system, if so, inputting cannot be performed, and input failure is prompted, and if not, inputting the MAC address of the data after the AES decryption processing, and prompting that input is successful;
the key deleting processing unit is used for judging whether the MAC address which is consistent with the data after the AES decryption processing exists in the MAC addresses which are prestored in the system, deleting the corresponding MAC address which is prestored in the system when the consistent MAC address exists, prompting that the deletion is successful, and failing to delete when the consistent MAC address does not exist.
Further, based on the above embodiment, another embodiment of the present invention provides a bluetooth keyless entry device, further including:
and the lock body state judging unit is used for judging whether the lock body is in an unlocking state or a locking state currently, updating the automatic locking time when the lock body is in the unlocking state, and outputting an unlocking signal when the lock body is in the locking state.
It should be noted that, since a bluetooth keyless entry device in this embodiment and a bluetooth keyless entry smart lock method described above are based on the same inventive concept, the corresponding content in the method embodiment is also applicable to the device embodiment, and will not be described in detail herein.
An embodiment of the third aspect of the present invention provides a bluetooth keyless entry device comprising at least one control processor and a memory for communicatively coupling with the at least one control processor; the memory stores instructions executable by the at least one control processor to enable the at least one control processor to perform a bluetooth keyless entry smart lock method as described above.
The memory is used as a non-transitory computer readable storage medium and can be used for storing non-transitory software programs, non-transitory computer executable programs and modules, such as program instructions/modules corresponding to a bluetooth keyless entry intelligent lock method in the embodiment of the invention. The control processor executes various functional applications and data processing of a Bluetooth keyless entry device by running non-transitory software programs, instructions and modules stored in the memory, namely, the intelligent lock method for Bluetooth keyless entry in the method embodiment is realized.
The memory may include a memory program area and a memory data area, wherein the memory program area may store an operating system, at least one application program required for a function; the storage data area may store data created from the use of a bluetooth keyless entry device, etc. In addition, the memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory may optionally include memory remotely located relative to the control processor, the remote memory being connectable to the bluetooth keyless entry device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The one or more modules are stored in the memory and when executed by the one or more control processors perform a bluetooth keyless entry smart lock method in the method embodiments described above.
In a fourth aspect, the present invention provides a computer-readable storage medium storing computer-executable instructions that are executed by one or more control processors to cause the one or more control processors to perform a bluetooth keyless entry smart lock method in the method embodiment.
The above described embodiments of the apparatus are only illustrative, wherein the units described as separate components may or may not be physically separate, i.e. may be located in one place, or may be distributed over a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
From the above description of embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented in software plus a general purpose hardware platform. Those skilled in the art will appreciate that all or part of the processes implementing the methods of the above embodiments may be implemented by a computer program for instructing relevant hardware, where the program may be stored in a computer readable storage medium, and where the program, when executed, may include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a read-only memory, a random access memory, or the like.
In one embodiment of the fifth aspect of the present invention, there is also provided a computer program product comprising a computer program stored on a computer readable storage medium, the computer program comprising program instructions which, when executed by a computer, cause the computer to perform a bluetooth keyless entry smart lock method as described above.
The present invention is not limited to the above embodiments, but is merely preferred embodiments of the present invention, and the present invention should be construed as being limited to the above embodiments as long as the technical effects of the present invention are achieved by the same means.
Claims (6)
1. The intelligent lock method for Bluetooth keyless entry is characterized by comprising the following steps:
performing broadcast scanning;
receiving a response data packet obtained by broadcast scanning;
judging whether the obtained response data packet meets the format requirement, and if so, performing AES decryption processing;
performing MD5 verification on the data subjected to AES decryption;
judging whether the time of the data is valid or not, and judging the validity of the data when the time is valid;
judging the validity of the data, and performing key matching processing after the data is legal;
the key matching process includes: judging whether an MAC address consistent with the data after AES decryption processing exists in MAC addresses prestored in a system, and outputting an unlocking signal when the consistent MAC address exists;
wherein, the judging whether the time of the data is valid comprises:
judging whether the time difference between the time stamp of the data subjected to AES decryption processing and the system time is within a preset time difference range, if so, considering that the time is valid, and if not, considering that the time is invalid;
wherein, after the data is legal, the method further comprises the following steps:
judging the class of the instruction bit of the data after AES decryption processing, and executing the key matching processing when the class of the instruction bit is a comparison instruction; when the category of the command bit is the input command, executing key input processing; when the category of the instruction bit is a deleting instruction, executing key deleting processing;
the key entry process includes: judging whether an MAC address consistent with the data after the AES decryption processing exists in the MAC addresses prestored in the system, if so, failing to enter the data, and if not, entering the MAC address of the data after the AES decryption processing, and prompting successful entering the data;
the key deletion process includes: judging whether the MAC addresses which are pre-stored in the system are consistent with the data after the AES decryption processing exist or not, deleting the corresponding MAC addresses in the pre-stored system when the consistent MAC addresses exist, prompting successful deletion, and failing to delete when the consistent MAC addresses do not exist.
2. The intelligent lock method according to claim 1, wherein, in the key matching process, after the existence of the consistent MAC address, further comprising the steps of:
judging whether the lock is in an unlocking state or a locking state currently, updating the automatic locking time when the lock is in the unlocking state, and outputting an unlocking signal when the lock is in the locking state.
3. A bluetooth keyless entry device comprising the following elements:
a broadcast scanning unit for performing broadcast scanning;
a response data packet receiving unit for receiving a response data packet obtained by broadcast scanning;
the format judging unit is used for judging whether the obtained response data packet meets the format requirement;
an AES decryption unit for performing AES decryption processing;
the MD5 checking unit is used for performing MD5 checking on the data subjected to AES decryption processing;
the data time validity judging unit is used for judging whether the time of the data is valid or not, and judging the validity of the data when the time is valid;
the data validity judging unit is used for judging the validity of the data and carrying out key matching processing after the data is legal;
the key matching processing unit is used for judging whether an MAC address consistent with the data after AES decryption processing exists in MAC addresses prestored in the system, and outputting an unlocking signal when the consistent MAC address exists;
the data time validity judging unit is further used for judging whether the time difference between the time stamp of the data subjected to AES decryption processing and the system time is within a preset time difference range, wherein the time is considered to be valid when the time difference is within the preset time difference range, and the time is considered to be invalid when the time difference is not within the preset time difference range;
the data instruction bit type judging unit is used for judging the type of the instruction bit of the data subjected to the AES decryption processing, and when the type of the instruction bit is a comparison instruction, the key matching processing is executed; when the category of the command bit is the input command, executing key input processing; when the category of the instruction bit is a deleting instruction, executing key deleting processing;
the key input processing unit is used for judging whether an MAC address consistent with the data after the AES decryption processing exists in the MAC addresses prestored in the system, if so, inputting cannot be performed, and input failure is prompted, and if not, inputting the MAC address of the data after the AES decryption processing, and prompting that input is successful;
the key deleting processing unit is used for judging whether the MAC address which is consistent with the data after the AES decryption processing exists in the MAC addresses which are prestored in the system, deleting the corresponding MAC address which is prestored in the system when the consistent MAC address exists, prompting that the deletion is successful, and failing to delete when the consistent MAC address does not exist.
4. A bluetooth keyless entry device according to claim 3, further comprising the following elements:
and the lock body state judging unit is used for judging whether the lock body is in an unlocking state or a locking state currently, updating the automatic locking time when the lock body is in the unlocking state, and outputting an unlocking signal when the lock body is in the locking state.
5. A bluetooth keyless entry device, characterized by: comprising at least one control processor and a memory for communication connection with the at least one control processor; the memory stores instructions executable by the at least one control processor to enable the at least one control processor to perform a bluetooth keyless entry smart lock method according to claim 1 or 2.
6. A computer-readable storage medium, characterized by: the computer readable storage medium stores computer executable instructions for causing a computer to perform a bluetooth keyless entry smart lock method according to claim 1 or 2.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910106509.7A CN109920102B (en) | 2019-02-02 | 2019-02-02 | Bluetooth keyless entry intelligent lock method, device, equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910106509.7A CN109920102B (en) | 2019-02-02 | 2019-02-02 | Bluetooth keyless entry intelligent lock method, device, equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109920102A CN109920102A (en) | 2019-06-21 |
CN109920102B true CN109920102B (en) | 2023-12-12 |
Family
ID=66961322
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910106509.7A Active CN109920102B (en) | 2019-02-02 | 2019-02-02 | Bluetooth keyless entry intelligent lock method, device, equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109920102B (en) |
Families Citing this family (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110246258A (en) * | 2019-07-05 | 2019-09-17 | 武汉慧联无限科技有限公司 | A kind of door opening method, device, equipment and the readable medium of control of bluetooth access system |
CN110435789A (en) * | 2019-08-13 | 2019-11-12 | 山东爱德邦智能科技有限公司 | A kind of lock control method, device, equipment and the storage medium of bicycle |
CN110971315B (en) * | 2019-12-06 | 2022-02-11 | 广东汇泰龙科技股份有限公司 | Method and system for detecting communication signal between CPU (Central processing Unit) induction card and intelligent lock |
CN111340987A (en) * | 2020-03-02 | 2020-06-26 | 深圳晒尔科技有限公司 | Internet of things door lock communication method, device and system and computer storage medium |
CN112634493B (en) * | 2020-12-11 | 2022-07-01 | 青岛海信智慧生活科技股份有限公司 | Intelligent door lock, terminal equipment, control method of intelligent door lock and storage medium |
CN115701158B (en) * | 2022-10-28 | 2024-06-18 | 重庆长安汽车股份有限公司 | Method and device for realizing Bluetooth entity key RKE (key-operated key) vehicle control function |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104670159A (en) * | 2015-03-20 | 2015-06-03 | 云丁网络技术(北京)有限公司 | Intelligent lock system and Bluetooth key configuration method thereof |
WO2017076269A1 (en) * | 2015-11-03 | 2017-05-11 | 国民技术股份有限公司 | Smart device, and method and apparatus for establishing bluetooth connection between devices therefor |
CN106934884A (en) * | 2017-01-19 | 2017-07-07 | 云丁网络技术(北京)有限公司 | A kind of method and its system of the intelligent door lock auto-unlocking based on mobile device |
CN107816257A (en) * | 2017-11-22 | 2018-03-20 | 深圳欧米智能科技有限公司 | The method for unlocking and bluetooth intelligent wireless lock of a kind of bluetooth intelligent wireless lock |
CN209447239U (en) * | 2019-02-02 | 2019-09-27 | 江门市新会区博上科技有限公司 | A kind of blue-tooth intelligence lock circuit, application system, lockset and its door body |
-
2019
- 2019-02-02 CN CN201910106509.7A patent/CN109920102B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104670159A (en) * | 2015-03-20 | 2015-06-03 | 云丁网络技术(北京)有限公司 | Intelligent lock system and Bluetooth key configuration method thereof |
WO2017076269A1 (en) * | 2015-11-03 | 2017-05-11 | 国民技术股份有限公司 | Smart device, and method and apparatus for establishing bluetooth connection between devices therefor |
CN106934884A (en) * | 2017-01-19 | 2017-07-07 | 云丁网络技术(北京)有限公司 | A kind of method and its system of the intelligent door lock auto-unlocking based on mobile device |
CN107816257A (en) * | 2017-11-22 | 2018-03-20 | 深圳欧米智能科技有限公司 | The method for unlocking and bluetooth intelligent wireless lock of a kind of bluetooth intelligent wireless lock |
CN209447239U (en) * | 2019-02-02 | 2019-09-27 | 江门市新会区博上科技有限公司 | A kind of blue-tooth intelligence lock circuit, application system, lockset and its door body |
Also Published As
Publication number | Publication date |
---|---|
CN109920102A (en) | 2019-06-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109920102B (en) | Bluetooth keyless entry intelligent lock method, device, equipment and storage medium | |
KR102422326B1 (en) | Control system and control mehtod for vehicle | |
CN110719173B (en) | Information processing method and device | |
CN112669491B (en) | Vehicle digital key distribution management method and device | |
CN112398824B (en) | Authority verification method, storage medium and electronic equipment | |
CN111209558B (en) | Internet of things equipment identity authentication method and system based on block chain | |
CN109714769B (en) | Information binding method, device, equipment and storage medium | |
CN105516948A (en) | Device control method and device control unit | |
WO2018133675A1 (en) | Key update method, device and system | |
CN106411505A (en) | Bidirectional authentication method of mobile radio frequency identification and mobile radio frequency identification system | |
WO2016070611A1 (en) | Method for processing data, server and terminal | |
CN109003368B (en) | Bluetooth access control system offline password updating method and Bluetooth access control system | |
US20160094545A1 (en) | Nfc device, software installation method, software uninstallation method, computer program and article of manufacture | |
CN108768941B (en) | Method and device for remotely unlocking safety equipment | |
CN105701896A (en) | Fingerprint authorization unlocking method and device and terminals | |
WO2024007993A1 (en) | Software upgrade method, and device and storage medium | |
CN113378119A (en) | Software authorization method, device, equipment and storage medium | |
CN110298947B (en) | Unlocking method and electronic lock | |
CN110598469A (en) | Information processing method and device and computer storage medium | |
CN111080856A (en) | Bluetooth entrance guard unlocking method | |
CN110349316A (en) | A kind of visitor's access control system and control method | |
CN107818255B (en) | Method for enhancing system security based on fingerprint identification encryption | |
CN111600701B (en) | Private key storage method, device and storage medium based on blockchain | |
US11192524B2 (en) | Secure proximity key | |
CN112241633B (en) | Bidirectional authentication implementation method and system for non-contact smart card |
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 |