Instruction unlocking method, system and computer device
By generating and comparing encrypted data, we ensure that the unlocking time of the locking device is consistent with the instruction sending time, solving the problem of uncertain unlocking time in existing remote unlocking technology and improving the security of remote unlocking.
Patent Information
- Application Number
- CN202211579808.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-09
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2042-12-09
AI Technical Summary
The existing remote unlocking technology has security risks, because the actual execution time of the unlocking command may be delayed, resulting in uncertainty in the unlocking time of the locking device.
By acquiring the unlocking instructions and the instruction reception time, the generation code pre-saved in the terminal device and the locking device is used to generate the first encrypted data and the second encrypted data, and the locking device is unlocked only when the conditions match.
Ensure that the unlocking time of the locking device is consistent with the command sending time, prevent delayed unlocking, and improve the security of remote unlocking.
Smart Images

Figure CN115909563B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of unlocking technology, and in particular to a command unlocking method, system and computer device. Background Art
[0002] Lock devices are widely used in the security field, and common lock devices include door locks, car locks, etc. Among them, with the development of technology, door locks, car locks and other lock devices can be remotely unlocked by sending unlock commands remotely. However, during the remote unlocking process, since the unlocking command will be affected by the signal transmission, the actual unlocking time of the lock device will be much later than the sending time of the unlocking command, resulting in great security risks in the remote unlocking of the lock device. Summary of the invention
[0003] The purpose of this application is to overcome the shortcomings and deficiencies in the prior art and to provide a command unlocking method, system and computer device that can improve the security of remote unlocking.
[0004] A first aspect of an embodiment of the present application provides an instruction unlocking method, comprising:
[0005] Obtaining an unlocking instruction and an instruction receiving time; the unlocking instruction includes first encrypted data, the first encrypted data is obtained according to a first generated code pre-stored in a terminal device and an actual instruction sending time of the terminal device;
[0006] According to the second generated code and the instruction receiving time, a plurality of second encrypted data are obtained; the second generated code is pre-stored in the lock terminal device;
[0007] Each of the second encrypted data is compared with the first encrypted data, and if there is a second encrypted data that is consistent with the first encrypted data, the lock terminal device is unlocked.
[0008] A second aspect of the embodiments of the present application provides a command unlocking system, including: a terminal device, a lock terminal device and a cloud platform;
[0009] The terminal device is used to send an unlocking instruction, the unlocking instruction includes first encrypted data, and the first encrypted data is obtained according to a first generated code and the actual instruction sending time of the terminal device; the lock terminal device is used to obtain the unlocking instruction and the instruction receiving time, and obtain a plurality of second encrypted data according to a second generated code and the instruction receiving time, and compare each of the second encrypted data with the first encrypted data. If there is a second encrypted data that is consistent with the first encrypted data, the lock terminal device is unlocked;
[0010] The cloud platform is used to generate the first generated code and send it to the terminal device, which is then forwarded to the lock device through the terminal device to obtain the second generated code stored in the lock device.
[0011] A third aspect of an embodiment of the present application provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable by the processor, wherein the processor implements the steps of the instruction unlocking method described above when executing the computer program.
[0012] Compared with the related art, the present application obtains several second encrypted data according to the second generated code and the instruction receiving time, and then compares each second encrypted data with the first encrypted data of the unlocking instruction. When there is second encrypted data consistent with the first encrypted data, the lock-end device is unlocked. Since the first encrypted data is obtained by the first generated code and the actual instruction sending time of the terminal device, only when the second generated code is the same as the first generated code and the time values of the actual instruction sending time and the instruction receiving time are consistent, there will be second encrypted data consistent with the first encrypted data, and the operation of unlocking the lock-end device will be executed. Therefore, the embodiment of the present application can prevent the lock-end device from being unlocked late and improve the security of remote unlocking.
[0013] In order to provide a clearer understanding of the present application, the specific implementation of the present application will be described below in conjunction with the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] Figure 1 The present invention is a flowchart of an instruction unlocking method according to an embodiment of the present invention.
[0015] Figure 2 This is a flowchart of steps S21-S22 of the instruction unlocking method according to one embodiment of the present application.
[0016] Figure 3 A connection diagram of a command unlocking system according to an embodiment of the present application.
[0017] 100. Command unlocking system; 101. Terminal device; 102. Lock terminal device; 103. Cloud platform. DETAILED DESCRIPTION
[0018] In order to make the objectives, technical solutions and advantages of the present application more clear, the embodiments of the present application will be further described in detail below with reference to the accompanying drawings.
[0019] It should be clear that the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the embodiments of the present application.
[0020] When the following description relates to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. In the description of the present application, it should be understood that the terms "first", "second", "third", etc. are only used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence, nor can they be understood as indicating or implying relative importance. For those of ordinary skill in the art, the specific meanings of the above terms in the present application can be understood according to the specific circumstances. The singular forms of "a", "said" and "the" used in the present application and the appended claims are also intended to include the majority form, unless the context clearly indicates other meanings. The words "if" / "if" used herein can be interpreted as "at the time of" or "when" or "in response to determination".
[0021] In addition, in the description of this application, unless otherwise specified, "plurality" means two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects are in an "or" relationship.
[0022] The command unlocking method of the embodiment of the present application is applied to a lock terminal device. The lock terminal device can be set on a door body, including a fully automatic lock body, a main control system, a Wifi module, a Bluetooth module, etc., such as a smart door lock.
[0023] Among them, the fully automatic lock body is used to perform locking and unlocking operations, and can detect the status of components such as the oblique tongue, square tongue, and lock core to determine the current locking and unlocking status of the lock end device.
[0024] The Wifi module is used to exchange data with the terminal device and the cloud platform. The data exchange content of the Wifi module includes but is not limited to operation instructions, encrypted data, the status of the lock device's oblique tongue, square tongue, lock core and other components, as well as the lock status and unlock status of the lock device, so that the lock device can receive remote operation instructions through the Wifi module to achieve operations such as locking and unlocking.
[0025] The Bluetooth module is used to exchange data with the terminal device. The data exchange content of the Bluetooth module includes but is not limited to operation instructions, encrypted data, and lock terminal information of the lock terminal device.
[0026] Optionally, the lock end device also includes a human infrared sensor module, which is used to detect human pyroelectric infrared signals within a certain range (wavelength is about 8-12nm), and can unlock the lock end device according to the detection results, so that the lock end device can be unlocked according to remote commands and the results of human infrared detection. For example: when the human infrared sensor module detects human pyroelectric infrared signals in the direction of the room, the lock end device on the door body is unlocked, which is convenient for users to directly open the door body and enter and exit from the room without the need for additional unlocking operations.
[0027] See also Figure 1 , which is a flow chart of an instruction unlocking method according to an embodiment of the present application. The instruction unlocking method according to the present embodiment includes:
[0028] S1: Obtain an unlocking instruction and instruction receiving time; the unlocking instruction includes first encrypted data, the first encrypted data is obtained by a first generated code and the actual instruction sending time of the terminal device; the first generated code is pre-stored in the terminal device.
[0029] After the unlock command is issued by the terminal device, it is transmitted to the lock device via the cloud platform. Among them, the unlock command uses Ali ID2 hardware encryption, and provides two-way identity authentication services based on ID2 to prevent the device from being tampered with or counterfeited; ID2 has passed the CC EAL6+ certification, the highest international security level. Among them, ID2 is a trusted identity identification for IoT devices, with non-tamperable, non-forgeable, and globally unique security attributes. CC EAL6+ is a certification that includes vulnerability analysis and penetration testing, theoretical evaluations such as security policy model verification, functional assurance testing, and life cycle security evaluation.
[0030] A terminal device refers to an electronic device with a network connection module and a Bluetooth module, such as a smart phone, a tablet computer, a laptop computer, etc.
[0031] Optionally, the first generated code is a random code generated by the cloud platform and sent to the terminal device, or the first generated code is an association code generated by the cloud platform and sent to the terminal device; for example: when the terminal device and the lock device establish a binding relationship, the terminal device sends a random code application to the pan-tilt platform to obtain the random code generated by the cloud platform as the first generated code, or the terminal device sends information of the terminal device and / or the lock device to the cloud platform, the cloud platform generates the association code based on the information of the terminal device and / or the lock device and sends it to the terminal device, and then the terminal device stores the association code as the first generated code, and sends the association code to the lock device.
[0032] Optionally, the first generated code may also be a random code obtained by the lock device from the cloud platform when it is produced or registered. When the terminal device and the lock device establish a binding relationship, the lock device will generate a random code and send it to the terminal device, and the terminal device will store the random code as the first generated code.
[0033] The units of measurement for the instruction receiving time and the actual instruction sending time are the same, and both can be measured in minutes or seconds.
[0034] S2: obtaining a plurality of second encrypted data according to a second generated code and the instruction receiving time; the second generated code is pre-stored in the lock terminal device.
[0035] Optionally, the second generated code is a random code forwarded by the terminal device to the lock device, which is the same as the first generated code, or the second generated code is an association code forwarded by the terminal device to the lock device, which is the same as the first generated code; for example: when the terminal device and the lock device establish a binding relationship, the terminal device sends a random code application to the pan-tilt platform to obtain the random code generated by the cloud platform as the first generated code, and sends the random code to the lock device as the second generated code, or the terminal device sends information of the terminal device and / or the lock device to the cloud platform, the cloud platform generates an association code based on the information of the terminal device and / or the lock device and sends it to the terminal device, and then the terminal device stores the association code as the first generated code, and sends the association code to the lock device, and the lock device stores the association code as the second generated code.
[0036] Optionally, the second generated code is a random code obtained by the lock device from the cloud platform when the lock device is produced or registered, and the first generated code is a random code obtained by the terminal device from the lock device when the terminal device establishes a binding relationship with the lock device, which is the same as the second generated code.
[0037] The second encrypted data is encrypted according to the second generated code and the instruction receiving time, and the second encrypted data and the first encrypted data use the same encryption algorithm. Optionally, the second encrypted data can be obtained by performing encryption operation according to the second generated code and the instruction receiving time using the AES encryption algorithm or an encryption algorithm developed and edited by the manufacturer of the lock terminal device. The AES algorithm is an advanced encryption algorithm and a block encryption standard adopted by the U.S. federal government.
[0038] The number of second encrypted data is related to the measurement unit of the instruction receiving time and the actual instruction sending time. For example, if the number of second encrypted data makes the measurement unit of the receiving time and the actual instruction sending time minute, the number of second encrypted data is one; if the number of second encrypted data makes the measurement unit of the receiving time and the actual instruction sending time second, the number of second encrypted data is at least 2.
[0039] S3: Compare each of the second encrypted data with the first encrypted data, and if there is second encrypted data that is consistent with the first encrypted data, unlock the lock device.
[0040] Compared with the related art, the present application obtains several second encrypted data according to the second generated code and the instruction receiving time, and then compares each second encrypted data with the first encrypted data of the unlocking instruction. When there is second encrypted data consistent with the first encrypted data, the lock terminal device is unlocked. Since the first encrypted data is obtained by the first generated code and the actual instruction sending time of the terminal device, only when the second generated code is the same as the first generated code, and the time values of the actual instruction sending time and the instruction receiving time are consistent, there will be second encrypted data consistent with the first encrypted data, and the operation of unlocking the lock terminal device will be executed. Therefore, the situation of delayed unlocking of the lock terminal device can be prevented, and the security of remote unlocking can be improved.
[0041] See also Figure 2 In a feasible embodiment, the step S2: obtaining a plurality of second encrypted data according to the second generated code and the instruction receiving time, comprises:
[0042] S21: Obtaining a number of predicted instruction sending times according to a preset target time range and the instruction receiving time.
[0043] If the unit of measurement of the instruction receiving time and the actual instruction sending time is seconds, step S21 includes:
[0044] S2101: Taking the instruction receiving time as the end time node of the target time range, converting the target time range to obtain a plurality of time nodes.
[0045] Specifically, the number of seconds of each time node is different. For example, if the instruction receiving time is 10:20:32, several time nodes may be 10:20:31, 10:20:30, 10:20:29, etc. The range of the target time range or the number of converted time nodes may be set by the manufacturer or may be changed according to the change of the network signal or network speed of the lock terminal device.
[0046] S2102: Determine the end time node and a plurality of time nodes as the sending time of each of the predicted instructions.
[0047] S22: Encrypt each of the predicted instruction sending times with the second generated code to obtain a plurality of the second encrypted data.
[0048] In this embodiment, there will be a slight time difference between the instruction reception time and the actual instruction sending time due to data transmission. Therefore, a number of predicted instruction sending times are obtained through the preset target time range and the instruction reception time, and the corresponding number of second encrypted data are obtained in combination with the second generated code to prevent the lock-end device from being unable to obtain the second encrypted data corresponding to the first encrypted data due to a slight time difference in data transmission.
[0049] In a feasible embodiment, the preset target time range is obtained by the following steps, including:
[0050] S2111: Obtain the real-time signal strength level of the lock terminal device.
[0051] The real-time signal strength level refers to the signal strength level of the network connection between the network module of the lock terminal device and the router.
[0052] S2112: According to a preset mapping relationship between signal strength level and time range, determine the time range corresponding to the real-time signal strength level as the target time range. The mapping relationship between signal strength level and time range is: the higher the signal strength level, the smaller the corresponding time range, or the smaller the number of time nodes included in the corresponding time range.
[0053] In this embodiment, considering that the real-time signal strength level of the lock-end device will affect the time difference between the instruction reception time and the actual instruction sending time, the target time range is determined according to the real-time signal strength level of the lock-end device, which can prevent the time difference caused by the signal strength from causing the lock-end device to be unable to be unlocked smoothly. The limitation of the time range of the target time range can also prevent the lock-end device from being unlocked late after a long time that the user cannot predict.
[0054] In a feasible embodiment, the preset target time range is obtained by the following steps, including:
[0055] S2121: Obtain the cloud data download speed of the lock device.
[0056] The cloud data download speed refers to the real-time speed or average speed at which the lock-end device obtains data sent by the cloud server.
[0057] S2122: According to a preset mapping relationship between the cloud data download speed and the target time range, the time range corresponding to the cloud data download speed is determined as the target time range. The mapping relationship between the cloud data download speed and the target time range is that the faster the cloud data download speed, the smaller the corresponding time range, or the fewer time nodes the corresponding time range contains.
[0058] In this embodiment, considering that the cloud data download speed of the lock-end device will affect the time difference between the instruction reception time and the actual instruction sending time, the target time range is determined according to the cloud data download speed of the lock-end device, which can prevent the time difference caused by the data download speed from causing the lock-end device to be unable to be unlocked smoothly. The limitation of the time range of the target time range can also prevent the lock-end device from being unlocked after a long time that the user cannot predict.
[0059] In a feasible embodiment, the step of S2121: obtaining the cloud data download speed of the lock terminal device includes:
[0060] According to a preset download speed detection cycle or trigger condition, the lock terminal device is driven to send a speed measurement instruction to the cloud platform.
[0061] The speed test data packet sent by the cloud platform in response to the speed test instruction is downloaded, and the speed of downloading the speed test data packet is determined as the download speed.
[0062] Among them, the download speed detection cycle can be set by the user, and the cycle unit can be hours, days or weeks, etc.; or the download speed detection can be started when the trigger conditions are met, such as when the lock device is restarted, repaired, the network is reconnected, or an external trigger command is received, etc., the download speed detection can be started. The external trigger command can be sent directly to the lock device by the bound terminal device, or it can be sent to the lock device by the cloud platform.
[0063] Preferably, in order to reduce the memory load of the lock device, the lock device may delete the test data packet periodically.
[0064] In this embodiment, the lock terminal device detects the download speed by periodically sending a speed test instruction to the cloud platform to download a speed test data packet, which can maintain the accuracy of the cloud data download speed of the lock terminal device to obtain a more accurate target time range.
[0065] In a feasible embodiment, the instruction unlocking method further includes:
[0066] S4: According to a preset unlock detection cycle or trigger condition, the lock terminal device is driven to send an unlock detection instruction to the cloud platform.
[0067] S5: Obtain a virtual unlocking instruction and a virtual instruction receiving time issued by the cloud platform in response to the unlocking detection instruction; the virtual unlocking instruction includes third encrypted data, and the third encrypted data is obtained by a third random code and the virtual instruction sending time.
[0068] The encryption algorithm of the third encrypted data is the same as the encryption algorithm of the first encrypted data and the encryption algorithm of the second encrypted data. The third random code can be a random code generated by the lock end device itself, and sent to the cloud platform together with the unlock detection instruction as the third random code for the cloud platform to generate the third encrypted data.
[0069] The measurement units of the virtual instruction receiving time and the virtual instruction sending time are the same, and the measurement units of both can be refined to minutes or seconds.
[0070] S6: Obtain a plurality of fourth encrypted data according to the random code generated by the lock terminal device and the time when the virtual instruction is received.
[0071] The encryption algorithm of the fourth encrypted data is the same as the encryption algorithm of the third encrypted data.
[0072] S7: Compare each of the fourth encrypted data with the third encrypted data.
[0073] S8: If there is fourth encrypted data that is consistent with the third encrypted data, it is determined that the lock device is normal.
[0074] S9: If there is no fourth encrypted data that is consistent with the third encrypted data, it is determined that the lock device is abnormal, and an abnormal reminder is sent to the terminal device.
[0075] In this embodiment, a number of fourth encrypted data obtained by the lock-end device based on the random code generated by the lock-end device and the virtual instruction reception time are compared with the third encrypted data of the virtual unlocking instruction issued by the cloud platform in response to the unlocking detection instruction. It can be detected whether the encryption algorithm of the lock-end device is abnormal to determine the operating status of the lock-end device.
[0076] In a feasible embodiment, the virtual unlocking instruction further includes the time when the virtual instruction is sent;
[0077] The step S6: obtaining a plurality of fourth encrypted data according to the random code generated by the lock terminal device and the time when the virtual instruction is received comprises:
[0078] S61: Obtaining a plurality of predicted virtual instruction sending times according to a preset target time range and the virtual instruction receiving time.
[0079] S62: Encrypt each of the predicted virtual instruction sending times with a random code generated by the lock-end device to obtain a plurality of fourth encrypted data.
[0080] The step S9: if there is no fourth encrypted data that is consistent with the third encrypted data, determining that the lock device is abnormal, and sending an abnormality reminder to the terminal device includes:
[0081] If there is no fourth encrypted data that is consistent with the third encrypted data, the target time range is corrected according to the virtual instruction receiving time and the virtual instruction sending time.
[0082] Preferably, the revised target time range may also be added to the abnormal reminder and sent to the terminal device to inform the user of the range value of the revised target time range.
[0083] Among them, the target time range can be corrected according to the time difference between the virtual instruction receiving time and the virtual instruction sending time, so that the corrected target time range is greater than or equal to the time difference between the virtual instruction receiving time and the virtual instruction sending time, and one of the several predicted virtual instruction sending times obtained by the corrected target time range and the virtual instruction receiving time is the same as the time value of the virtual instruction sending time.
[0084] In this embodiment, the lock device corrects the target time range according to the virtual instruction reception time and the virtual instruction sending time, and gives priority to ensuring the unlocking priority of the lock device to prevent the lock device from being unable to be unlocked due to an abnormality of the lock device.
[0085] See also Figure 3 An embodiment of the present application further provides a command unlocking system 100, comprising: a terminal device, a lock terminal device and a cloud platform.
[0086] The terminal device is used to send an unlocking instruction, which includes first encrypted data, and the first encrypted data is obtained based on a first generated code and an actual instruction sending time of the terminal device; the lock-end device is used to obtain the unlocking instruction and the instruction receiving time, and obtains a plurality of second encrypted data based on a second generated code and the instruction receiving time, and compares each of the second encrypted data with the first encrypted data. If there is second encrypted data that is consistent with the first encrypted data, the lock-end device is unlocked.
[0087] The cloud platform is used to generate the first generated code and send it to the terminal device, which is then forwarded to the lock device through the terminal device to obtain the second generated code stored in the lock device.
[0088] A terminal device refers to an electronic device with a network connection module and a Bluetooth module, such as a smart phone, a tablet computer, a laptop computer, etc.
[0089] Lock terminal equipment refers to electronic lock equipment with data processing capabilities.
[0090] A cloud platform refers to an electronic platform that is installed on a cloud server and has data processing and data transmission capabilities.
[0091] After the unlock command is issued by the terminal device, it is transmitted to the lock device via the cloud platform. Among them, the unlock command uses Ali ID2 hardware encryption, and provides two-way identity authentication services based on ID2 to prevent the device from being tampered with or counterfeited; ID2 has passed the CC EAL6+ certification, the highest international security level. Among them, ID2 is a trusted identity identification for IoT devices, with non-tamperable, non-forgeable, and globally unique security attributes. CC EAL6+ is a certification that includes vulnerability analysis and penetration testing, theoretical evaluations such as security policy model verification, functional assurance testing, and life cycle security evaluation.
[0092] Among them, the first generated code is a random code generated by the cloud platform, or the first generated code is an associated code generated by the cloud platform based on the information of the terminal device and / or the lock device; for example: when the terminal device and the lock device establish a binding relationship, the terminal device sends a random code application to the pan-tilt platform to obtain the random code generated by the cloud platform as the first generated code, or the terminal device sends the information of the terminal device and / or the lock device to the cloud platform, the cloud platform generates an associated code based on the information of the terminal device and / or the lock device and sends it to the terminal device, and then the terminal device stores the associated code as the first generated code, and sends the associated code to the lock device.
[0093] The units of measurement for the instruction receiving time and the actual instruction sending time are the same, and both can be measured in minutes or seconds.
[0094] Among them, the second generated code is a random code generated by the cloud platform, or the second generated code is an associated code generated by the cloud platform based on the information of the terminal device and / or the lock device; for example: when the terminal device and the lock device establish a binding relationship, the terminal device sends a random code application to the pan-tilt platform to obtain the random code generated by the cloud platform as the first generated code, and sends the random code to the lock device as the second generated code, or the terminal device sends the information of the terminal device and / or the lock device to the cloud platform, the cloud platform generates an associated code based on the information of the terminal device and / or the lock device and sends it to the terminal device, and then the terminal device stores the associated code as the first generated code, and sends the associated code to the lock device, and the lock device stores the associated code as the second generated code.
[0095] The second encrypted data is encrypted according to the second generated code and the instruction receiving time, and the second encrypted data and the first encrypted data use the same encryption algorithm. Optionally, the second encrypted data can be obtained by performing encryption operation according to the second generated code and the instruction receiving time using the AES encryption algorithm or an encryption algorithm developed and edited by the manufacturer of the lock terminal device. The AES algorithm is an advanced encryption algorithm and a block encryption standard adopted by the U.S. federal government.
[0096] The number of second encrypted data is related to the measurement unit of the instruction receiving time and the actual instruction sending time. For example, if the number of second encrypted data makes the measurement unit of the receiving time and the actual instruction sending time minute, the number of second encrypted data is one; if the number of second encrypted data makes the measurement unit of the receiving time and the actual instruction sending time second, the number of second encrypted data is at least 2.
[0097] Compared with the related art, the present application obtains several second encrypted data according to the second generated code and the instruction receiving time, and then compares each second encrypted data with the first encrypted data of the unlocking instruction. When there is second encrypted data consistent with the first encrypted data, the lock terminal device is unlocked. Since the first encrypted data is obtained by the first generated code and the actual instruction sending time of the terminal device, only when the second generated code is the same as the first generated code, and the time values of the actual instruction sending time and the instruction receiving time are consistent, there will be second encrypted data consistent with the first encrypted data, and the operation of unlocking the lock terminal device will be executed. Therefore, the situation of delayed unlocking of the lock terminal device can be prevented, and the security of remote unlocking can be improved.
[0098] An embodiment of the present application further provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable by the processor, wherein the processor implements the steps of the instruction unlocking method described above when executing the computer program.
[0099] The device embodiments described above are merely illustrative, wherein the components described as separate parts may or may not be physically separated, and the parts displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present application. Ordinary technicians in this field can understand and implement it without creative work.
[0100] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0101] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing device to work in a specific way, so that the instructions stored in the computer-readable memory produce a product including an instruction device, which implements the function selected in the process. Figure 1 A process or multiple processes and / or boxes Figure 1 function selected in a box or multiple boxes.
[0102] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 steps for the function selected in a box or multiple boxes.
[0103] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0104] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0105] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0106] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0107] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.
Claims
1. A command unlocking method, characterized in that: include: Get the unlocking instruction and the time when the instruction was received; The unlocking instruction includes first encrypted data, which is obtained according to a first generated code pre-stored in the terminal device and an actual instruction sending time of the terminal device; According to the second generated code and the instruction receiving time, a plurality of second encrypted data are obtained; the second generated code is pre-stored in the lock terminal device; Compare each of the second encrypted data with the first encrypted data, and if there is second encrypted data that is consistent with the first encrypted data, unlock the lock device; According to a preset unlock detection cycle or trigger condition, the lock terminal device is driven to send an unlock detection instruction to the cloud platform; Acquire a virtual unlocking instruction and a virtual instruction receiving time issued by the cloud platform in response to the unlocking detection instruction; the virtual unlocking instruction includes third encrypted data, and the third encrypted data is obtained by a third random code and the virtual instruction sending time; The third random code is a random code generated by the lock end device itself, and is sent to the cloud platform together with the unlock detection instruction as the third random code; Obtaining a plurality of fourth encrypted data according to the random code generated by the lock terminal device and the time when the virtual instruction is received; comparing each of the fourth encrypted data with the third encrypted data; If there is fourth encrypted data that is consistent with the third encrypted data, it is determined that the lock device is normal; If there is no fourth encrypted data that is consistent with the third encrypted data, it is determined that the lock-end device is abnormal, and an abnormal reminder is sent to the terminal device.
2. The command unlocking method according to claim 1, characterized in that: The step of obtaining a plurality of second encrypted data according to the second generated code and the instruction receiving time comprises: According to the preset target time range and the instruction receiving time, a plurality of predicted instruction sending times are obtained; The sending time of each of the predicted instructions is encrypted with the second generated code to obtain a plurality of the second encrypted data.
3. The command unlocking method according to claim 2, characterized in that: The preset target time range is obtained by the following steps, including: Obtaining the real-time signal strength level of the lock terminal device; According to a preset mapping relationship between the signal strength level and the time range, the time range corresponding to the real-time signal strength level is determined as the target time range.
4. The command unlocking method according to claim 2, characterized in that: The preset target time range is obtained by the following steps, including: Obtaining the cloud data download speed of the lock terminal device; According to a preset mapping relationship between the cloud data download speed and the target time range, the time range corresponding to the cloud data download speed is determined as the target time range.
5. The command unlocking method according to claim 4, characterized in that: The step of obtaining the cloud data download speed of the lock terminal device includes: According to a preset download speed detection cycle or trigger condition, the lock terminal device is driven to send a speed measurement instruction to the cloud platform; The speed test data packet sent by the cloud platform in response to the speed test instruction is downloaded, and the speed of downloading the speed test data packet is determined as the download speed.
6. The command unlocking method according to claim 1, characterized in that: The virtual unlocking instruction also includes the time when the virtual instruction is sent; The step of obtaining a plurality of fourth encrypted data according to the random code generated by the lock terminal device and the virtual instruction receiving time includes: According to the preset target time range and the virtual instruction receiving time, a plurality of predicted virtual instruction sending times are obtained; Encrypting each of the predicted virtual instruction sending times with a random code generated by the lock terminal device to obtain a plurality of fourth encrypted data; If there is no fourth encrypted data that is consistent with the third encrypted data, the step of determining that the lock device is abnormal and sending an abnormality reminder to the terminal device includes: If there is no fourth encrypted data that is consistent with the third encrypted data, the target time range is corrected according to the virtual instruction receiving time and the virtual instruction sending time.
7. The instruction unlocking method according to any one of claims 1 to 6, characterized in that: The first generated code is a random code generated by the cloud platform and sent to the terminal device; the second generated code is a random code forwarded by the terminal device to the lock device, which is the same as the first generated code; Alternatively, the first generated code is an association code generated by the cloud platform and sent to the terminal device, and the second generated code is an association code forwarded by the terminal device to the lock device, which is the same as the first generated code; wherein the association code is a code generated by the cloud platform based on information of the terminal device and / or the lock device; Alternatively, the second generated code is a random code obtained by the lock device from the cloud platform when the lock device is produced or registered, and the first generated code is a random code obtained by the terminal device from the lock device when the terminal device establishes a binding relationship with the lock device, which is the same as the second generated code.
8. A command unlocking system, characterized in that: include: Terminal devices, lock devices and cloud platforms; The terminal device is used to send an unlocking instruction, the unlocking instruction includes first encrypted data, and the first encrypted data is obtained according to a first generated code and an actual instruction sending time of the terminal device; The lock-end device is used to obtain an unlocking instruction and an instruction receiving time, obtain a plurality of second encrypted data according to a second generated code and the instruction receiving time, compare each of the second encrypted data with the first encrypted data, and unlock the lock-end device if there is a second encrypted data that is consistent with the first encrypted data; The cloud platform is used to generate the first generated code and send it to the terminal device, and forward it to the lock device through the terminal device to obtain the second generated code stored in the lock device; The locking device is also used to perform the following steps: Sending unlock detection instructions to the cloud platform according to the preset unlock detection cycle or trigger conditions; Acquire a virtual unlocking instruction and a virtual instruction receiving time issued by the cloud platform in response to the unlocking detection instruction; the virtual unlocking instruction includes third encrypted data, and the third encrypted data is obtained by a third random code and the virtual instruction sending time; The third random code is a random code generated by the lock end device itself, and is sent to the cloud platform together with the unlock detection instruction as the third random code; Obtaining a plurality of fourth encrypted data according to the random code generated by the lock terminal device and the time when the virtual instruction is received; comparing each of the fourth encrypted data with the third encrypted data; If there is fourth encrypted data that is consistent with the third encrypted data, it is determined that the lock device is normal; If there is no fourth encrypted data that is consistent with the third encrypted data, it is determined that the lock-end device is abnormal, and an abnormal reminder is sent to the terminal device.
9. A computer device, characterized in that: The invention comprises a memory, a processor and a computer program stored in the memory and executable by the processor, wherein the processor implements the steps of the instruction unlocking method according to any one of claims 1 to 7 when executing the computer program.
Citation Information
Patent Citations
Unlocking method and device and electronic lock
CN106952378A