Equipment unlocking method and device, equipment, chip, storage medium and product
By performing ultrasonic distance measurement between devices, the problem of insufficient measurement accuracy of unlocking distance between devices in the prior art is solved, and higher safety and accuracy are achieved, while reducing power consumption and delay.
Patent Information
- Application Number
- CN202411557881.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-01
- Publication Date
- 2025-03-11
AI Technical Summary
When existing equipment is close to unlocking technology, the distance is calculated through RSSI, the accuracy is poor, and the distance between safe unlocking cannot be accurately controlled, which poses a security risk.
By performing ultrasonic distance measurement between the first device and the second device, the distance value between them is determined, thereby controlling the unlock distance more accurately. This method triggers ultrasonic ranging when the device is in a stationary state to avoid unnecessary power consumption and delay.
Improves the safety and accuracy of device unlocking, reduces power consumption and delays, and avoids safety risks caused by inaccurate distance measurements.
Smart Images

Figure CN119598435A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to but is not limited to the field of terminal technology, and in particular to a device unlocking method, apparatus, device, chip, storage medium and product. Background Art
[0002] At present, some manufacturers have launched the function of unlocking by proximity (smart unlocking), which provides users with a convenient and safe way to unlock across devices. Among them, the function of unlocking by proximity can be roughly summarized into the following steps: 1) Device A (unlocking end) and device B (unlocked end) establish a Bluetooth / wifi connection; 2) Device A receives the message sent by device B and measures the received signal strength (Received Signal Strength Indicator, RSSI); 3) Calculate the distance between device A and device B based on RSSI; 4) Unlock device B if the distance is less than a certain threshold.
[0003] However, due to the multipath effects in the environment and the inconsistency of antennas of various types of devices, the distance calculated by RSSI has poor accuracy, and the distance for safe unlocking between devices cannot be accurately controlled, which poses certain security risks. Summary of the invention
[0004] The present application at least provides a device unlocking method, apparatus, device, chip, storage medium and product.
[0005] The technical solution of this application is implemented as follows:
[0006] In a first aspect, the present application provides a device unlocking method, which is applied to a first device, and the method includes: determining whether the first device and / or a second device to be unlocked is in a stationary state; based on whether the first device and / or the second device is in a stationary state, determining whether to trigger the first device and the second device to perform ultrasonic ranging; wherein the ultrasonic ranging is used to determine the distance value between the first device and the second device using ultrasonic waves to obtain a first ranging result; the first ranging result is used to determine whether to unlock the second device.
[0007] In a second aspect, an embodiment of the present application provides a device for unlocking a device, the device comprising: a first determination unit, used to determine whether the device and / or a second device to be unlocked is in a stationary state; a second determination unit, used to determine whether to trigger the device and the second device to perform ultrasonic ranging based on whether the device and / or the second device is in a stationary state; wherein the ultrasonic ranging is used to determine the distance value between the device and the second device using ultrasonic waves to obtain a first ranging result; the first ranging result is used to determine whether to unlock the second device.
[0008] In a third aspect, an embodiment of the present application provides an electronic device, comprising a memory and a processor; wherein the memory is used to store computer-executable instructions; and the processor is connected to the memory and is used to implement the method described in the first aspect by executing the computer-executable instructions.
[0009] In a fourth aspect, an embodiment of the present application provides a chip, which includes: a processor, configured to call and run a computer program from a memory, so that a device equipped with the chip executes the method described in the first aspect.
[0010] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by at least one processor, it implements the method described in the first aspect.
[0011] In a sixth aspect, an embodiment of the present application provides a computer program product, including a computer program or instructions, which, when executed by a processor, implements the method described in the first aspect.
[0012] In an embodiment of the present application, the first device may determine whether to trigger ultrasonic ranging based on the state of the first device and / or the second device, and then determine whether to unlock the second device based on the ultrasonic ranging result (the first ranging result). Among them, using ultrasonic ranging to determine the distance value between the first device and the second device can make the ranging more accurate, so that the unlocking distance can be controlled more accurately, thereby improving the security of device unlocking. In addition, judging whether to trigger ultrasonic ranging based on the state of the first device and / or the second device is conducive to avoiding the ultrasonic ranging from being triggered when it is not necessary, thereby avoiding unnecessary power consumption, and at the same time, it is conducive to avoiding the ultrasonic ranging from missing the trigger when it is necessary to trigger, thereby reducing the delay of device unlocking.
[0013] It should be understood that the above general description and the following detailed description are merely exemplary and explanatory, and are not intended to limit the technical solutions of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present application and are used together with the specification to illustrate the technical solution of the present application.
[0015] Figure 1 A schematic diagram of a device unlocking method provided in an embodiment of the present application;
[0016] Figure 2 A schematic diagram of a possible implementation flow of the device unlocking method provided in an embodiment of the present application;
[0017] Figure 3 A schematic diagram of the structure of a device unlocking apparatus provided in an embodiment of the present application;
[0018] Figure 4 A schematic diagram of a hardware entity of an electronic device in an embodiment of the present application. DETAILED DESCRIPTION
[0019] In order to enable a more detailed understanding of the features and technical contents of the embodiments of the present application, the implementation of the embodiments of the present application is described in detail below in conjunction with the accompanying drawings. The attached drawings are for reference only and are not used to limit the embodiments of the present application.
[0020] Unless otherwise defined, all technical and scientific terms used in the embodiments of the present application have the same meaning as those commonly understood by those skilled in the art of the present application. The terms used in the embodiments of the present application are only for the purpose of describing the embodiments of the present application and are not intended to limit the present application.
[0021] In the following description, reference is made to "some embodiments", which describe a subset of all possible embodiments, but it is understood that "some embodiments" may be the same subset or different subsets of all possible embodiments, and may be combined with each other without conflict. It should also be noted that the terms "first\second\third" involved in the embodiments of the present application are only used to distinguish similar objects and do not represent a specific ordering of the objects. It is understandable that "first\second\third" may be interchanged in a specific order or sequence where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.
[0022] It should be understood that the term "and / or" in the embodiments of the present application is only a description of the association relationship of the associated objects, indicating that there may be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.
[0023] At present, some manufacturers have launched the function of unlocking by proximity / smart unlocking, which provides users with a convenient and safe way to unlock across devices. For example, some manufacturers have launched the function of unlocking other electronic devices (such as PC) with watches. When the watch and the electronic device log in to the same account ID, if the watch in the unlocked state detects that the distance with the electronic device is less than a certain threshold, the electronic device can be automatically unlocked. For another example, some manufacturers provide a "smart unlocking" function for mobile phones / tablets (PADs). This function requires the mobile phone / tablet to be connected to a trusted Bluetooth device in advance. When the distance between the Bluetooth device and the mobile phone / tablet is less than a certain threshold, the user can automatically unlock the mobile phone / tablet without entering the lock screen password.
[0024] Although there are some differences in the cross-device unlocking methods provided by different manufacturers, the cross-device unlocking process of each manufacturer can be roughly summarized into the following steps: 1) Device A (unlocking end) and device B (unlocked end) establish a Bluetooth / wifi connection; 2) Device A receives the message sent by device B and measures RSSI; 3) Calculate the distance between device A and device B based on RSSI; 4) If the distance is less than a certain threshold, unlock device B.
[0025] However, due to the multipath effect in the environment and the inconsistency of antennas of various types of devices, the distance accuracy estimated by RSSI is poor. For example, according to actual measurements, in the process of unlocking a mobile phone or tablet with a watch launched by a certain manufacturer, it can be unlocked within 2 meters, and it cannot be unlocked beyond 6 meters, but it can be unlocked with a certain probability within 2 meters to 6 meters. In other words, RSSI can only roughly determine the distance range for device unlocking, and cannot accurately control the distance for safe unlocking between devices, which poses certain security risks.
[0026] In view of this, the embodiments of the present application provide a device unlocking method, apparatus, device, chip, storage medium and product. In this method, the first device can determine whether the first device and / or the second device to be unlocked is in a stationary state, and then determine whether to trigger the first device and the second device to perform ultrasonic ranging based on whether the first device and / or the second device is in a stationary state. The ultrasonic ranging is used to determine the distance value between the first device and the second device using ultrasonic waves to obtain a first ranging result, and the first ranging result is used to determine whether to unlock the second device.
[0027] That is to say, the first device can determine whether to trigger ultrasonic ranging based on the state of the first device and / or the second device (such as whether it is in a stationary state), and then determine whether to unlock the second device based on the ultrasonic ranging result (the first ranging result). According to the method of the embodiment of the present application, the distance value between the first device and the second device is determined by ultrasonic ranging, which can make the ranging more accurate, so that the unlocking distance can be controlled more accurately, thereby improving the security of device unlocking. In addition, judging whether to trigger ultrasonic ranging based on the state of the first device and / or the second device is conducive to avoiding the ultrasonic ranging from being triggered when it is not necessary, thereby avoiding unnecessary power consumption, and at the same time, it is conducive to avoiding the ultrasonic ranging from missing the trigger when it is necessary to trigger, thereby reducing the delay of device unlocking.
[0028] To facilitate understanding of the embodiments of the present application, the RSSI-based ranging principle is briefly introduced below.
[0029] In the RSSI-based ranging process, device A (unlocked end) sends a message at a certain transmission power, and device B (unlocking end) can receive the message and measure RSSI. The closer the distance between device A and device B, the greater the RSSI measured by device B. Therefore, a mapping table of RSSI and distance value can be established, so that the distance between device A and device B can be calculated based on RSSI.
[0030] The embodiments of the present application will be described in detail below with reference to the accompanying drawings.
[0031] This application embodiment provides a method for unlocking a device. Figure 1 As shown, the method may include:
[0032] S101: The first device determines whether the first device and / or the second device to be unlocked is in a stationary state.
[0033] In S101, the first device may determine whether the first device and / or the second device to be unlocked is in a stationary state, and then in subsequent S102, based on whether the first device and / or the second device is in a stationary state, determine whether to trigger the first device and the second device to perform ultrasonic ranging. Among them, "ultrasonic ranging" can also be referred to as "ultrasonic ranging".
[0034] In some embodiments, the first device determines whether the first device and / or the second device to be unlocked is in a stationary state, which may include: the first device determines whether the first device is in a stationary state based on data collected by an inertial measurement unit (IMU) of the first device; and / or, determines whether the second device is in a stationary state based on a second message from the second device, the second message being used to indicate whether the second device is in a stationary state.
[0035] For example, the first device may include an inertial measurement unit for collecting data related to the motion state of the first device. Thus, the first device can determine whether the first device is in a stationary state by reading the data collected by the inertial measurement unit.
[0036] For example, when the second device is not unlocked, it can send a second message to the first device to indicate whether the second device is in a stationary state. Thus, after receiving the second message from the second device, the first device can determine whether the second device is in a stationary state according to the indication of the second message.
[0037] As a possible implementation, the second device may determine whether the second device is in a stationary state based on data collected by an inertial measurement unit of the second device. Furthermore, the second device may indicate to the first device whether the second device is in a stationary state by sending a second message to the first device.
[0038] As a possible implementation, the second message may be a message sent periodically (such as a heartbeat packet). For example, after the first device and the second device log in to the same account and establish a communication connection (such as a Bluetooth connection), the second device to be unlocked may periodically send a second message to the first device to indicate whether the second device is in a stationary state.
[0039] As another possible implementation, the second message may be a message sent based on a request from the first device. For example, when the first device needs to know whether the second device is in a stationary state, the first device may send a request message to the second device to request the second device to indicate to the first device whether the second device is in a stationary state. Further, after receiving the request message, the second device may send a second message to the first device in response to the request message to indicate whether the second device is in a stationary state.
[0040] In some embodiments, the second message may also include, but is not limited to, at least one of the following information: identification (ID) information of the second device, and indication information of whether the second device is in an unlocked state (or locked state).
[0041] According to the method of this embodiment, the first device may first determine whether the first device and / or the second device is in a stationary state based on the inertial measurement unit and / or the second message, and then determine whether to trigger ultrasonic ranging based on whether the first device and / or the second device is in a stationary state. Since ultrasonic ranging consumes a lot of power, first using a method with a low power consumption (for example, a method based on the inertial measurement unit and / or the second message) to determine whether the first device and / or the second device is in a stationary state, and then deciding whether to trigger ultrasonic ranging, can reduce the power consumption during the device unlocking process to a certain extent.
[0042] In some embodiments, the first device may be, for example, a mobile phone, a watch or other electronic device; the second device may be, for example, a tablet computer / portable computer (PAD), a computer (such as a personal computer (PC)) or other electronic device.
[0043] S102, the first device determines whether to trigger the first device and the second device to perform ultrasonic ranging based on whether the first device and / or the second device are in a stationary state; wherein the ultrasonic ranging is used to determine the distance value between the first device and the second device using ultrasonic waves to obtain a first ranging result; the first ranging result is used to determine whether to unlock the second device.
[0044] In some embodiments, the first device determines whether to trigger the first device and the second device to perform ultrasonic ranging based on whether the first device and / or the second device are in a stationary state, which may include: the first device triggers the first device and the second device to perform ultrasonic ranging when the first device is in a stationary state; or triggers the first device and the second device to perform ultrasonic ranging when both the first device and the second device are in a stationary state.
[0045] In one example, when the first device is in a stationary state, the first device may trigger the first device and the second device to perform ultrasonic ranging. For example, if the first device determines that the first device is in a stationary state based on data collected by an inertial measurement unit, the first device and the second device may be triggered to perform ultrasonic ranging.
[0046] As a possible implementation, the second device may be a computer (such as a PC), a tablet computer (PAD), or other device that is relatively large or difficult to move. Considering that such devices are usually stationary for a short period of time, when the first device determines that the first device is stationary, it may be assumed that the second device is also stationary, that is, it may be considered that both the first device and the second device are stationary. In this case, since the distance between the first device and the second device does not change, the first device may trigger an ultrasonic ranging to determine the distance value between the first device and the second device.
[0047] In another example, when both the first device and the second device are in a stationary state, the first device may trigger the first device and the second device to perform ultrasonic ranging. For example, if the first device determines that the first device is in a stationary state based on data collected by the inertial measurement unit, and learns that the second device is also in a stationary state based on an indication of the second message, the first device and the second device may be triggered to perform ultrasonic ranging.
[0048] According to the method of this embodiment, the ultrasonic ranging can be triggered when the first device determines that it is in a stationary state, or it can be triggered when the first device determines that both the first device and the second device are in a stationary state. This is conducive to avoiding the ultrasonic ranging from being triggered when it is not necessary, thereby avoiding unnecessary power consumption, and is also conducive to avoiding the ultrasonic ranging from being missed when it is necessary, thereby reducing the delay of device unlocking.
[0049] In some embodiments, the first device determines whether to trigger the first device and the second device to perform ultrasonic ranging based on whether the first device and / or the second device are in a stationary state, which may include the following steps 11) to 13):
[0050] 11) When the first device and / or the second device is in a non-stationary state (moving state), the first device sends a first instruction to the second device, where the first instruction is used to instruct the second device to continuously send the first message.
[0051] In one example, when the first device is in a non-stationary state, the first device may send a first instruction to the second device. For example, if the first device determines that the first device is in a non-stationary state based on data collected by an inertial measurement unit, the first instruction may be sent to the second device to instruct the second device to continuously send the first message.
[0052] In another example, when the second device is in a non-stationary state, the first device may send a first instruction to the second device. For example, if the first device learns that the second device is in a non-stationary state based on an indication of the second message, the first instruction may be sent to the second device to instruct the second device to continuously send the first message.
[0053] In another example, when both the first device and the second device are in a non-stationary state, the first device may send a first instruction to the second device. For example, if the first device determines that the first device is in a non-stationary state based on data collected by the inertial measurement unit, and learns that the second device is also in a non-stationary state based on an indication of the second message, the first instruction may be sent to the second device to instruct the second device to continuously send the first message.
[0054] The second device continuously sends the first message, which can also be understood as the second device sending the first message at a certain frequency.
[0055] It should be noted that the frequency at which the second device sends the first message may be a pre-configured frequency or a dynamically configured frequency, and the embodiment of the present application does not impose any limitation on this.
[0056] In one possible manner, the frequency at which the second device sends the first message should be greater than a certain frequency threshold. That is, the second device should send the first message at a higher frequency, so that the first device can calculate the distance value between the first device and the second device more frequently based on the received signal strength of the first message, thereby improving the distance recognition accuracy.
[0057] It should also be noted that the message format of the first message can be a predefined message format, and the embodiment of the present application does not limit the message format of the first message.
[0058] 12) The first device receives the first message from the second device and measures the received signal strength of the first message.
[0059] After receiving the first instruction from the first device, the second device may continuously send the first message to the first device. Accordingly, the first device may receive the first message from the second device and measure the received signal strength of the first message. The received signal strength may reflect the distance between the first device and the second device. For example, a greater received signal strength indicates a closer distance between the first device and the second device, and a smaller received signal strength indicates a greater distance between the first device and the second device.
[0060] 13) The first device determines whether to trigger the first device and the second device to perform ultrasonic ranging based on the received signal strength.
[0061] According to the method of this embodiment, when the first device and / or the second device is in a non-stationary state (moving state), the first device can determine whether to trigger ultrasonic ranging by measuring the received signal strength of the first message. Since the power consumption of the ultrasonic ranging process is relatively high, while the power consumption of the received signal strength measurement process is relatively low, therefore, first determine whether the triggering condition of ultrasonic ranging is met based on the received signal strength, and only trigger the ultrasonic ranging when the triggering condition is met, which is conducive to reducing the power consumption during the device unlocking process.
[0062] In some embodiments, the first device determines whether to trigger the first device and the second device to perform ultrasonic ranging based on the received signal strength, which may include: when the received signal strength is greater than or equal to the first threshold, the first device triggers the first device and the second device to perform ultrasonic ranging; or when the second ranging result is less than or equal to the second threshold, the first device triggers the first device and the second device to perform ultrasonic ranging. The second ranging result is a distance value between the first device and the second device determined based on the received signal strength.
[0063] In one example, when the received signal strength is greater than or equal to a first threshold, the first device may trigger the first device and the second device to perform ultrasonic ranging.
[0064] It can be understood that when the received signal strength is greater than or equal to the first threshold, it indicates that the distance between the first device and the second device is relatively close, thus triggering the first device and the second device to perform ultrasonic ranging to determine whether the distance is reached to unlock the second device.
[0065] In another example, when the second ranging result is less than or equal to the second threshold, the first device may trigger the first device and the second device to perform ultrasonic ranging, wherein the second ranging result is a distance value between the first device and the second device determined based on the received signal strength.
[0066] For example, since a larger received signal strength indicates a closer distance between the first device and the second device, and a smaller received signal strength indicates a farther distance between the first device and the second device, a mapping table of received signal strength and distance value can be established, so that the first device can calculate the distance value between the first device and the second device (i.e., the second ranging result) based on the received signal strength. Furthermore, if the second ranging result is less than or equal to the second threshold (indicating that the distance between the first device and the second device is relatively close), the first device and the second device can be triggered to perform ultrasonic ranging to determine whether the distance that can unlock the second device has been reached.
[0067] According to the method of this embodiment, when the received signal strength indicates that the distance between the first device and the second device is relatively close, the first device and the second device may be triggered to perform ultrasonic ranging. It can be understood that when the received signal strength indicates that the distance between the first device and the second device is relatively close, it means that the distance between the first device and the second device is close to the safe distance that allows unlocking the second device, so the ultrasonic ranging may be triggered to more accurately obtain the distance value between the first device and the second device.
[0068] In some embodiments, the method may also include: when the received signal strength of the first device is less than a first threshold, or when the second ranging result is greater than a second threshold, starting a first timer; if the first timer times out, sending a second instruction to the second device, the second instruction being used to instruct the second device to stop sending the first message.
[0069] It can be understood that when the received signal strength is less than the first threshold, or when the second ranging result is greater than the second threshold, it indicates that the distance between the first device and the second device is far. Therefore, the first device can send a second instruction to the second device after a certain period of time to instruct the second device to stop sending the first message. In this way, the first device will stop measuring the received signal strength, thereby avoiding unnecessary power consumption.
[0070] In some embodiments, when the received signal strength is less than the first threshold, or when the second ranging result is greater than the second threshold, the first device may immediately send a second instruction to the second device. In this way, the first device may immediately stop measuring the received signal strength, further reducing power consumption.
[0071] It should be noted that in some scenarios, when the received signal strength is equal to the first threshold, or when the second ranging result is equal to the second threshold, the first device may not trigger ultrasonic ranging, but instead start the first timer and determine whether to send the second instruction based on whether the first timer has timed out, or immediately send the second instruction to the second device.
[0072] In some embodiments, when the first device triggers the first device and the second device to perform ultrasonic ranging, the method may further include the following steps 21) and 22):
[0073] 21) Using ultrasonic waves to determine the distance between the first device and the second device, and obtaining a first distance measurement result.
[0074] As a possible implementation, when the first device triggers the first device and the second device to perform ultrasonic ranging, the first device and the second device can play ultrasonic waves (sounds in the ultrasonic frequency band) respectively. Further, the first device can record and analyze the ultrasonic waves from the first device itself, and record the starting time of receiving the ultrasonic waves from the first device itself (recorded as t1); at the same time, the first device can also record and analyze the ultrasonic waves from the second device, and record the starting time of receiving the ultrasonic waves from the second device (recorded as t2). Similarly, the second device can record and analyze the ultrasonic waves from the second device itself, and record the starting time of receiving the ultrasonic waves from the second device itself (recorded as t3); at the same time, the second device can also record and analyze the ultrasonic waves from the first device, and record the starting time of receiving the ultrasonic waves from the first device (recorded as t4). Subsequently, the second device can carry the recorded t3 and t4 in the message and send it to the first device. After the first device obtains t3 and t4, it can calculate the distance value between the first device and the second device (that is, the first ranging result) according to t1, t2, t3 and t4.
[0075] According to the method of this embodiment, ultrasonic distance measurement is used to determine the distance value between the first device and the second device, which can make the distance measurement more accurate, thereby being able to control the unlocking distance more accurately.
[0076] 22) When the first ranging result is less than or equal to the third threshold, the first device sends a third instruction to the second device, and the third instruction is used to instruct the second device to switch to an unlocked state; when the first ranging result is greater than the third threshold, the first device starts a second timer; if the second timer times out, the first device stops performing ultrasonic ranging and sends a fourth instruction to the second device, and the fourth instruction is used to instruct the second device to stop performing ultrasonic ranging.
[0077] For example, if the first distance measurement result is less than or equal to the third threshold, it indicates that the distance between the first device and the second device is already within the safe distance that allows the second device to be unlocked, so the first device can send a third instruction to the second device to instruct the second device to switch to an unlocked state. Correspondingly, if the first distance measurement result is greater than the third threshold, it indicates that the distance between the first device and the second device does not reach the safe distance that allows the second device to be unlocked, so after a certain period of time, the first device can stop performing ultrasonic distance measurement, and instruct the second device to stop performing ultrasonic distance measurement by sending a fourth instruction to avoid unnecessary power consumption.
[0078] In some embodiments, when the first ranging result is greater than the third threshold, the first device may immediately stop performing ultrasonic ranging and send a fourth instruction to the second device to further reduce power consumption.
[0079] It should be noted that in some scenarios, when the first ranging result is equal to the third threshold, the first device may not send the third instruction to the second device, but instead start the second timer and determine whether to send the fourth instruction based on whether the second timer has timed out, or immediately send the fourth instruction to the second device.
[0080] In some embodiments, the third threshold is less than the second threshold, for example, the third threshold is 2 meters and the second threshold is 5 meters.
[0081] In some embodiments, before determining whether the first device and / or the second device to be unlocked is in a stationary state, the method may also include: when the first device and the second device are logged in to the same account, establishing a Bluetooth connection between the first device and the second device, and the Bluetooth connection is used for the first device and the second device to transmit instructions and / or messages.
[0082] That is to say, before executing S101 and S102, it is necessary to ensure that the first device and the second device have logged in to the same account. Then, when the first device and the second device have logged in to the same account, the first device can establish a Bluetooth connection with the second device to transmit instructions (such as the first instruction, the second instruction, the third instruction, the fourth instruction, etc.) and / or messages (such as the first message, the second message, etc.) between the first device and the second device. This is conducive to enhancing the security of message transmission and device unlocking.
[0083] In some embodiments, the above-mentioned Bluetooth connection can also be replaced by other connection methods, such as WiFi connection, 4G / 5G / 6G connection, etc.
[0084] According to the method of the embodiment of the present application, the first device can determine whether to trigger ultrasonic ranging based on the state of the first device and / or the second device (such as whether it is in a stationary state), and then determine whether to unlock the second device based on the ultrasonic ranging result (the first ranging result). Among them, using ultrasonic ranging to determine the distance value between the first device and the second device can make the ranging more accurate, so that the unlocking distance can be controlled more accurately, thereby improving the security of device unlocking. In addition, judging whether to trigger ultrasonic ranging based on the state of the first device and / or the second device is conducive to avoiding the ultrasonic ranging from being triggered when it is not necessary, thereby avoiding unnecessary power consumption, and at the same time, it is conducive to avoiding the ultrasonic ranging from missing the trigger when it is necessary to trigger, thereby reducing the delay of device unlocking.
[0085] To facilitate understanding of the embodiments of the present application, possible implementation schemes of the device unlocking method provided in the embodiments of the present application are introduced below.
[0086] Figure 2 A schematic diagram of a possible implementation flow of the device unlocking method provided in an embodiment of the present application.
[0087] The master device is the unlocking end device (corresponding to the aforementioned first device), and the slave device is the unlocked end device (corresponding to the aforementioned second device). Figure 2 As shown, the implementation process may include:
[0088] S201, the application module of the master device and the application module of the slave device log in to the same account.
[0089] S202, the application modules of the master device and the slave device send account information to the Bluetooth module.
[0090] After the application module of the master device completes the account login, the account information can be sent to the Bluetooth module of the master device; correspondingly, after the application module of the slave device completes the account login, the account information can be sent to the Bluetooth module of the slave device.
[0091] S203, the master device and the slave device establish a Bluetooth channel.
[0092] When the master device and the slave device log in to the same account, the master device can establish a Bluetooth channel with the slave device for message transmission between the master device and the slave device.
[0093] S204: The application module of the slave device determines whether the slave device is in a locked state.
[0094] In this step, the application module of the slave device can determine whether the slave device is in a locked state. If the judgment result is "yes", that is, the slave device is in a locked state, S205 is executed; if the judgment result is "no", that is, the slave device is not in a locked state (the slave device is in an unlocked state), the slave device is continuously monitored to determine whether it is in a locked state.
[0095] S205, the slave device sends a status indication message (corresponding to the aforementioned second message) to the master device.
[0096] Exemplarily, the status indication message may include an ID of the slave device and indication information of whether the slave device is in a locked state. In this way, after the master device receives the status indication message of the slave device, it can learn whether the slave device is in a locked state according to the status indication message.
[0097] In some embodiments, the status indication message may also include indication information of whether the slave device is in a stationary state. In this way, the master device may also learn whether the slave device is in a stationary state according to the status indication message. Among them, whether the slave device is in a stationary state may be determined by the IMU module of the slave device, and then, the slave device may carry the determination result of the IMU module in the status indication message to notify the master device.
[0098] In some embodiments, the status indication message may be a heartbeat packet sent periodically. That is, the slave device may periodically send a status indication message to the master device to notify the master device of the current status of the slave device.
[0099] As an implementation manner, the status indication message may be sent via the Bluetooth channel established in S203.
[0100] S206, the IMU module of the master device determines whether the master device is in a stationary state.
[0101] In this step, the IMU module of the master device can determine whether the master device is in a stationary state. If the judgment result is "yes", that is, the master device is in a stationary state, S207 can be executed to notify the slave device to perform ultrasonic ranging; if the judgment result is "no", that is, the master device is in a non-stationary state (moving state), S214 can be executed to notify the slave device to send messages on the Bluetooth channel at a higher frequency.
[0102] It is understandable that since the slave device is generally a computer (such as a PC), a tablet computer (PAD) or other large or difficult to move device, such devices are usually in a static state for a short period of time. Therefore, when the IMU module of the master device determines that the master device is in a static state, it can be considered that both the master device and the slave device are in a static state. In this case, since the distance between the master device and the slave device will not change, it is sufficient to perform ultrasonic ranging between the master device and the slave device once. In contrast, if the IMU module of the master device determines that the master device is in a non-static state, it can notify the slave device to send messages on the Bluetooth channel at a higher frequency so as to monitor the distance between the master device and the slave device more frequently.
[0103] In some embodiments, if the status indication message carries information indicating whether the slave device is in a stationary state, then the master device can also learn whether the slave device is in a stationary state based on the status indication message. In this case, if the status indication message indicates that the slave device is in a stationary state, and the IMU module of the master device determines that the master device is also in a stationary state, the master device can notify the slave device to perform an ultrasonic ranging. Relatively speaking, if at least one of the master device and the slave device is in a non-stationary state, the master device can notify the slave device to send messages on the Bluetooth channel at a higher frequency, so that the master device can obtain RSSI more frequently, thereby monitoring the distance between the master device and the slave device more frequently based on RSSI.
[0104] S207, the master device notifies the slave device to perform ultrasonic ranging.
[0105] As an implementation method, the notification (ultrasonic distance measurement instruction) may be sent via the Bluetooth channel established in S203.
[0106] S208, the master device and the slave device perform ultrasonic ranging.
[0107] After the master device notifies the slave device to perform ultrasonic ranging, the audio modules of the master device and the slave device can start playing ultrasonic waves. Furthermore, the audio module of the master device can record and analyze the ultrasonic waves from the master device itself, and record the starting time of receiving the ultrasonic waves from the master device itself (recorded as t1); at the same time, the audio module of the master device can record and analyze the ultrasonic waves from the slave device, and record the starting time of receiving the ultrasonic waves from the slave device (recorded as t2). Similarly, the audio module of the slave device can record and analyze the ultrasonic waves from the slave device itself, and record the starting time of receiving the ultrasonic waves from the slave device itself (recorded as t3); at the same time, the audio module of the slave device can record and analyze the ultrasonic waves from the master device, and record the starting time of receiving the ultrasonic waves from the master device (recorded as t4).
[0108] In this embodiment, the audio module may include a speaker and a microphone, wherein the speaker may be used to play ultrasonic waves, and the microphone may be used to record ultrasonic waves.
[0109] S209, the slave device sends the intermediate result of ultrasonic ranging to the master device.
[0110] In this step, the slave device may send the recorded t3 and t4 as the intermediate result of ultrasonic ranging to the master device, so that the master device calculates the distance between the master device and the slave device based on the intermediate result.
[0111] S210, the master device calculates the distance between the master and slave devices.
[0112] After the master device obtains t3 and t4, the distance between the master device and the slave device can be calculated based on t1, t2, t3 and t4.
[0113] S211, the master device determines whether the distance between the master and slave devices is less than a threshold a.
[0114] After the master device obtains the distance between the master device and the slave device through ultrasonic ranging, it can determine whether the distance is less than the threshold a. If the judgment result is "yes", that is, the distance between the master and the slave device is less than the threshold a, S212 is executed to notify the slave device to unlock; if the judgment result is "no", that is, the distance between the master and the slave device is greater than or equal to the threshold a, S213 is executed.
[0115] S212, the master device notifies the slave device to unlock.
[0116] As an implementation method, the notification (unlock instruction) can be sent via the Bluetooth channel established in S203. After receiving the notification (unlock instruction), the slave device can be switched to an unlocked state. The unlock instruction corresponds to the aforementioned third instruction.
[0117] S213, the IMU module of the master device determines whether the master device is in a stationary state.
[0118] If the distance between the master and slave devices is greater than or equal to the threshold a according to the ultrasonic ranging result, the IMU module of the master device can continue to determine whether the master device is in a stationary state. If the judgment result is "yes", that is, the master device is in a stationary state, S213 is executed again, that is, the master device continues to be monitored. If the judgment result is "no", that is, the master device is in a non-stationary state, S214 is executed to notify the slave device to send messages on the Bluetooth channel at a higher frequency.
[0119] S214, the master device notifies the slave device to send a message (such as a first message) on the Bluetooth channel at a higher frequency.
[0120] If the master device is in a non-stationary state, the slave device may be notified to send a message at a higher frequency in the Bluetooth channel. As an implementation method, the notification (high-frequency Bluetooth message sending instruction) may be sent through the Bluetooth channel established in S203. The high-frequency Bluetooth message sending instruction corresponds to the aforementioned first instruction.
[0121] In some embodiments, if the status indication message carries information indicating whether the slave device is in a stationary state, the master device can also learn whether the slave device is in a stationary state based on the status indication message. In this case, if the status indication message indicates that the slave device is in a non-stationary state, the master device can also notify the slave device to send messages in the Bluetooth channel at a higher frequency. That is, if at least one of the master device and the slave device is in a non-stationary state, the master device can notify the slave device to send messages in the Bluetooth channel at a higher frequency so as to monitor the distance between the master device and the slave device more frequently.
[0122] S215, the slave device sends a message (such as a first message) on the Bluetooth channel at a higher frequency.
[0123] After receiving the high-frequency Bluetooth message sending instruction from the master device, the slave device will send messages to the master device on the Bluetooth channel at a higher frequency. Correspondingly, the master device will receive the messages sent by the slave device at a higher frequency and measure the RSSI. In this way, the master device can calculate the distance between the master device and the slave device based on the RSSI more frequently, thereby improving the distance recognition accuracy.
[0124] S216, the master device receives the message sent by the slave device and measures RSSI.
[0125] The master device can receive the message sent by the slave device on the Bluetooth channel and measure the RSSI, and then calculate the distance between the master device and the slave device according to the RSSI.
[0126] S217, the master device determines whether the distance between the master and slave devices is less than a threshold value b.
[0127] After the master device calculates the distance between the master device and the slave device according to the RSSI, it can determine whether the distance is less than the threshold value b. If the judgment result is "yes", that is, the distance between the master and the slave device is less than the threshold value b, S220 and S221 are executed; if the judgment result is "no", that is, the distance between the master and the slave device is greater than or equal to the threshold value b, S218 is executed.
[0128] In some scenarios, since the distance between the master and slave devices is reflected by the size of the RSSI, "determining whether the distance between the master and slave devices is less than a threshold value b" can also be replaced by "determining whether the RSSI is greater than a threshold value c".
[0129] S218, the master device determines whether it has timed out.
[0130] If the judgment result in S217 is "No", that is, the distance between the master and slave devices is greater than or equal to the threshold value b, the master device can continue to perform ranging based on RSSI. At the same time, the master device can start the timer and determine whether the timer has timed out. If the judgment result is "Yes", that is, the timer has timed out, S219 is executed; if the judgment result is "No", that is, the timer has not timed out, S216 is executed again, that is, continue to receive the message sent by the slave device and measure RSSI.
[0131] S219, the master device notifies the slave device to stop sending messages (such as the first message) on the Bluetooth channel.
[0132] As an implementation method, the notification (stop sending high-frequency Bluetooth messages) can be sent through the Bluetooth path established in S203. After receiving the notification, the slave device can stop sending messages to the master device on the Bluetooth path (stop Bluetooth broadcasting), that is, stop performing RSSI-based ranging. The stop sending high-frequency Bluetooth messages instruction corresponds to the aforementioned second instruction.
[0133] S220, the master device notifies the slave device to perform ultrasonic ranging.
[0134] S221, the master device and the slave device perform ultrasonic ranging.
[0135] If the result of the determination in S217 is "yes", that is, the distance between the master and slave devices is less than the threshold value b, the master device may notify the slave device to perform ultrasonic distance measurement. Then, the master device and the slave device may start to perform ultrasonic distance measurement.
[0136] It can be understood that if the distance between the master and slave devices is less than the threshold value b, it means that the distance between the master and slave devices is relatively close. In this case, the master and slave devices can perform ultrasonic ranging to obtain the distance between the master and slave devices more accurately.
[0137] S222, the slave device sends the intermediate result of ultrasonic ranging to the master device.
[0138] In this step, the slave device may send the intermediate results ( t3 and t4 ) of the ultrasonic ranging to the master device, so that the master device calculates the distance between the master device and the slave device based on the intermediate results.
[0139] S223, the master device determines whether the distance between the master and slave devices is less than a threshold a.
[0140] After the master device obtains the distance between the master device and the slave device through ultrasonic ranging, it can determine whether the distance is less than the threshold a. If the judgment result is "yes", that is, the distance between the master and the slave device is less than the threshold a, S224 is executed to notify the slave device to unlock; if the judgment result is "no", that is, the distance between the master and the slave device is greater than or equal to the threshold a, S225 is executed.
[0141] S224, the master device notifies the slave device to unlock.
[0142] As an implementation method, the notification (unlocking instruction) can be sent via the Bluetooth channel established in S203. After receiving the notification (unlocking instruction), the slave device can be switched to an unlocked state and stop performing ultrasonic ranging.
[0143] S225, the master device determines whether it has timed out.
[0144] If the judgment result in S223 is "no", that is, the distance between the master and slave devices is greater than or equal to the threshold a, the master device can start the timer and determine whether the timer has timed out. If the judgment result is "yes", that is, the timer has timed out, S226 is executed.
[0145] S226, the master device notifies the slave device to stop performing ultrasonic ranging.
[0146] As an implementation method, the notification (stop ultrasonic distance measurement instruction) can be sent through the Bluetooth channel established in S203. After receiving the notification (stop ultrasonic distance measurement instruction), the slave device can stop executing ultrasonic distance measurement. The stop ultrasonic distance measurement instruction corresponds to the aforementioned fourth instruction.
[0147] The device unlocking method provided in the embodiment of the present application utilizes the precise ranging capability of ultrasound. When devices with the same account are seamlessly connected, precise control of the unlocking distance between devices is achieved by cooperating with Bluetooth RSSI and IMU static state recognition.
[0148] According to the above implementation process, the device unlocking method provided in the embodiment of the present application includes at least the following technical means:
[0149] 1) Establish a seamless Bluetooth connection between devices with the same account to establish a message transmission channel.
[0150] 2) Ultrasonic distance measurement between devices. The devices at both ends need to have speakers and microphones and be able to play, record and analyze sounds in the ultrasonic frequency band (ultrasound).
[0151] 3) Since the playback and recording of ultrasonic waves consume high power, it is necessary to develop a suitable strategy to trigger ultrasonic ranging in order to reduce the false trigger rate and missed trigger rate of ultrasonic ranging and reduce the trigger delay.
[0152] In the embodiment of the present application, a two-level ultrasonic ranging trigger strategy is provided:
[0153] Trigger strategy 1 (IMU trigger): If the IMU module detects that the master device is in a stationary state, an ultrasonic ranging is triggered; or, if the IMU module detects that the master device is in a stationary state and learns that the slave device is also in a stationary state, an ultrasonic ranging is triggered.
[0154] Trigger strategy 2 (RSSI trigger): If the master device is detected to be in motion (or, at least one of the master device and the slave device is detected to be in motion), high-frequency RSSI broadcast is triggered; if the RSSI is detected to be greater than or equal to a certain threshold, ultrasonic ranging is triggered.
[0155] Through the above technical means, the embodiments of the present application can achieve the following technical effects:
[0156] 1) The precise distance measurement capability of ultrasound is applied to the safe distance control of unlocking between devices, which improves the security of unlocking between devices.
[0157] 2) Using low-power methods such as IMU and Bluetooth RSSI to trigger ultrasonic ranging can reduce the power consumption of precise ranging to a certain extent.
[0158] 3) Messages are transmitted through a seamless connection channel (Bluetooth channel) established between devices with the same account, so that the signaling and results required for precise ranging can be transmitted securely.
[0159] The preferred embodiments of the present application are described in detail above in conjunction with the accompanying drawings. However, the present application is not limited to the specific details in the above embodiments. Within the technical concept of the present application, the technical solution of the present application can be subjected to a variety of simple modifications, and these simple modifications all belong to the protection scope of the present application. For example, the various specific technical features described in the above specific embodiments can be combined in any suitable manner without contradiction. In order to avoid unnecessary repetition, the present application will not further explain various possible combinations. For another example, the various different embodiments of the present application can also be arbitrarily combined, as long as they do not violate the idea of the present application, they should also be regarded as the contents disclosed in the present application. For another example, under the premise of no conflict, the various embodiments and / or the technical features in the various embodiments described in the present application can be arbitrarily combined with the prior art, and the technical solution obtained after the combination should also fall within the protection scope of the present application.
[0160] Based on the above embodiments, the embodiments of the present application provide a corresponding device unlocking device. The device includes the modules included, and the submodules included in each module, which can be implemented by a processor in a computer device with information processing capabilities; of course, it can also be implemented by a specific logic circuit; in the implementation process, the processor can be a central processing unit (CPU), a microprocessor (MPU), a digital signal processor (DSP) or a field programmable gate array (FPGA), etc.
[0161] The present application embodiment provides a device unlocking apparatus. Figure 3 As shown, the device unlocking apparatus 300 (hereinafter referred to as the apparatus 300) may include:
[0162] The first determination unit 301 is used to determine whether the apparatus 300 and / or the second device to be unlocked are in a stationary state; the second determination unit 302 is used to determine whether to trigger the apparatus 300 and the second device to perform ultrasonic ranging based on whether the apparatus 300 and / or the second device are in a stationary state; wherein the ultrasonic ranging is used to determine the distance value between the apparatus 300 and the second device using ultrasonic waves to obtain a first ranging result; and the first ranging result is used to determine whether to unlock the second device.
[0163] In some embodiments, the second determination unit 302 is specifically used to: when the device 300 is in a stationary state, trigger the device 300 and the second device to perform ultrasonic ranging; or, when the device 300 and the second device are both in a stationary state, trigger the device 300 and the second device to perform ultrasonic ranging.
[0164] In some embodiments, the second determination unit 302 includes: a sending subunit, used to send a first instruction to the second device when the device 300 and / or the second device is in a non-stationary state, the first instruction being used to instruct the second device to continuously send a first message; a receiving subunit, used to receive the first message from the second device and measure the received signal strength of the first message; and a determination subunit, used to determine whether to trigger the device 300 and the second device to perform ultrasonic ranging based on the received signal strength.
[0165] In some embodiments, the determination subunit is specifically used to: trigger the device 300 and the second device to perform ultrasonic ranging when the received signal strength is greater than or equal to a first threshold; or, trigger the device 300 and the second device to perform ultrasonic ranging when the second ranging result is less than or equal to a second threshold; the second ranging result is the distance between the device 300 and the second device determined based on the received signal strength.
[0166] In some embodiments, the apparatus 300 further includes: a first timing unit, configured to start a first timer when the received signal strength is less than a first threshold, or when the second ranging result is greater than a second threshold; and a first sending unit, configured to send a second instruction to the second device if the first timer times out, the second instruction being used to instruct the second device to stop sending the first message.
[0167] In some embodiments, the first determination unit 301 is specifically used to: determine whether the device 300 is in a stationary state based on data collected by the inertial measurement unit of the device 300; and / or determine whether the second device is in a stationary state based on a second message from the second device, the second message being used to indicate whether the second device is in a stationary state.
[0168] In some embodiments, the device 300 also includes: a third determination unit, which is used to use ultrasound to determine the distance between the device 300 and the second device to obtain a first ranging result when the device 300 and the second device are triggered to perform ultrasonic ranging; a second sending unit, which is used to send a third instruction to the second device when the first ranging result is less than or equal to a third threshold, and the third instruction is used to instruct the second device to switch to an unlocked state; a second timing unit, which is used to start a second timer when the first ranging result is greater than the third threshold; an execution unit, which is used to stop performing ultrasonic ranging if the second timer times out; and a third sending unit, which is used to send a fourth instruction to the second device when the second timer times out, and the fourth instruction is used to instruct the second device to stop performing ultrasonic ranging.
[0169] In some embodiments, the device 300 also includes: a connection establishment unit, which is used to establish a Bluetooth connection with the second device when the same account is logged in as the second device before determining whether the device 300 and / or the second device to be unlocked is in a stationary state, and the Bluetooth connection is used for the device 300 and the second device to transmit instructions and / or messages.
[0170] The description of the above device embodiment is similar to the description of the above method embodiment, and has similar beneficial effects as the method embodiment. In some embodiments, the functions or modules / units included in the device provided in the embodiment of the present application can be used to execute the method described in the above method embodiment. For technical details not disclosed in the device embodiment of the present application, please refer to the description of the method embodiment of the present application for understanding.
[0171] It should be noted that in the embodiment of the present application, if the above method is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the relevant technology can be embodied in the form of a software product, which is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a U disk, a mobile hard disk, a read-only memory (ROM), a disk or an optical disk. In this way, the embodiment of the present application is not limited to any specific hardware, software or firmware, or any combination of hardware, software, and firmware.
[0172] An embodiment of the present application also provides an electronic device, including a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and when the processor executes the program, some or all of the steps in the above method are implemented.
[0173] The embodiment of the present application further provides a chip, which includes: a processor, which is used to call and run a computer program from a memory, so that a device equipped with the chip executes some or all of the steps in the above method.
[0174] The embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, some or all of the steps in the above method are implemented. The computer-readable storage medium can be transient or non-transient.
[0175] An embodiment of the present application also provides a computer program, including a computer-readable code. When the computer-readable code runs in a device, a processor in the device executes part or all of the steps in the above method.
[0176] The present application also provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and when the computer program is read and executed by a computer, some or all of the steps in the above method are implemented. The computer program product can be implemented specifically by hardware, software, or a combination thereof. In some embodiments, the computer program product is specifically embodied as a computer storage medium, and in other embodiments, the computer program product is specifically embodied as a software product, such as a software development kit (SDK), etc.
[0177] It should be noted here that the description of the various embodiments above tends to emphasize the differences between the various embodiments, and the same or similar aspects can be referenced to each other. The description of the above device, chip, storage medium, computer program and computer program product embodiments is similar to the description of the above method embodiment, and has similar beneficial effects as the method embodiment. For technical details not disclosed in the embodiments of the device, chip, storage medium, computer program and computer program product of this application, please refer to the description of the method embodiment of this application for understanding.
[0178] The present application embodiment provides an electronic device. Figure 4 As shown, electronic device 400 (hereinafter referred to as device 400) includes a processor 410, and processor 410 can call and run a computer program from a memory to implement the method in the embodiment of the present application.
[0179] In some embodiments, Figure 4 As shown, the device 400 may further include a memory 420. The processor 410 may call and run a computer program from the memory 420 to implement the method in the embodiment of the present application. The memory 420 may be a separate device independent of the processor 410, or may be integrated in the processor 410.
[0180] In some embodiments, Figure 4 As shown, the device 400 may also include a transceiver 430, and the processor 410 may control the transceiver 430 to communicate with other devices, specifically, to send information or data to other devices, or to receive information or data sent by other devices. The transceiver 430 may include a transmitter and a receiver. The transceiver 430 may further include an antenna, and the number of antennas may be one or more.
[0181] It should be understood that "one embodiment", "an embodiment" or "some embodiments" mentioned throughout the specification means that specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, "in one embodiment", "in an embodiment" or "in some embodiments" appearing throughout the specification may not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in various embodiments of the present application, the size of the serial number of each step / process mentioned above does not mean the order of execution, and the execution order of each step / process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present application. The serial numbers of the embodiments of the present application mentioned above are for description only and do not represent the advantages and disadvantages of the embodiments.
[0182] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article 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, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0183] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the units or modules is only a logical function division. There may be other division methods in actual implementation, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored, or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.
[0184] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units; they may be located in one place or distributed on multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0185] In addition, all functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may be a separate unit, or two or more units may be integrated into one unit; the above-mentioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0186] A person skilled in the art can understand that all or part of the steps of implementing the above method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above method embodiment; and the aforementioned storage medium includes: mobile storage devices, read-only memories (ROM), magnetic disks or optical disks, etc., various media that can store program codes.
[0187] Alternatively, if the above-mentioned integrated unit of the present application is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can essentially or in other words, the part that contributes to the relevant technology can be embodied in the form of a software product, which is stored in a storage medium and includes a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROMs, magnetic disks, or optical disks.
[0188] The above is only an implementation method of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application.
Claims
1. A device unlocking method, characterized in that: Applied to a first device, the method includes: determining whether the first device and / or the second device to be unlocked is in a stationary state; Based on whether the first device and / or the second device is in a stationary state, determine whether to trigger the first device and the second device to perform ultrasonic ranging; wherein the ultrasonic ranging is used to determine the distance value between the first device and the second device using ultrasonic waves to obtain a first ranging result; the first ranging result is used to determine whether to unlock the second device.
2. The method according to claim 1, characterized in that The determining whether to trigger the first device and the second device to perform ultrasonic ranging based on whether the first device and / or the second device is in a stationary state includes: When the first device is in a stationary state, triggering the first device and the second device to perform ultrasonic ranging; or, When the first device and the second device are both in a stationary state, the first device and the second device are triggered to perform ultrasonic ranging.
3. The method according to claim 1, characterized in that The determining whether to trigger the first device and the second device to perform ultrasonic ranging based on whether the first device and / or the second device is in a stationary state includes: When the first device and / or the second device is in a non-static state, sending a first instruction to the second device, where the first instruction is used to instruct the second device to continuously send a first message; receiving the first message from the second device, and measuring a received signal strength of the first message; Determine whether to trigger the first device and the second device to perform ultrasonic ranging based on the received signal strength.
4. The method according to claim 3, characterized in that The determining whether to trigger the first device and the second device to perform ultrasonic ranging based on the received signal strength includes: When the received signal strength is greater than or equal to a first threshold, triggering the first device and the second device to perform ultrasonic ranging; or, When the second ranging result is less than or equal to a second threshold, the first device and the second device are triggered to perform ultrasonic ranging; the second ranging result is a distance value between the first device and the second device determined based on the received signal strength.
5. The method according to claim 4, characterized in that The method further comprises: When the received signal strength is less than the first threshold, or when the second ranging result is greater than the second threshold, starting a first timer; If the first timer times out, a second instruction is sent to the second device, where the second instruction is used to instruct the second device to stop sending the first message.
6. The method according to any one of claims 1 to 5, characterized in that The determining whether the first device and / or the second device to be unlocked is in a stationary state includes: determining whether the first device is in a stationary state based on data collected by an inertial measurement unit of the first device; and / or, Based on a second message from the second device, it is determined whether the second device is in a stationary state, where the second message is used to indicate whether the second device is in a stationary state.
7. The method according to any one of claims 1 to 5, characterized in that In the case of triggering the first device and the second device to perform ultrasonic ranging, the method further includes: Determine the distance between the first device and the second device using ultrasonic waves to obtain the first distance measurement result; When the first ranging result is less than or equal to a third threshold, sending a third instruction to the second device, where the third instruction is used to instruct the second device to switch to an unlocked state; When the first ranging result is greater than the third threshold, a second timer is started; if the second timer times out, ultrasonic ranging is stopped, and a fourth instruction is sent to the second device, where the fourth instruction is used to instruct the second device to stop ultrasonic ranging.
8. The method according to any one of claims 1 to 5, characterized in that Before determining whether the first device and / or the second device to be unlocked is in a stationary state, the method further includes: When the same account is logged in as the second device, a Bluetooth connection is established between the second device, and the Bluetooth connection is used for the first device and the second device to transmit instructions and / or messages.
9. A device unlocking apparatus, characterized in that: The device comprises: a first determining unit, configured to determine whether the apparatus and / or a second device to be unlocked is in a stationary state; A second determination unit is used to determine whether to trigger the device and the second device to perform ultrasonic ranging based on whether the device and / or the second device are in a stationary state; wherein the ultrasonic ranging is used to determine the distance value between the device and the second device using ultrasonic waves to obtain a first ranging result; and the first ranging result is used to determine whether to unlock the second device.
10. An electronic device, characterized in that: The device comprises: A memory for storing computer executable instructions; A processor, connected to the memory, configured to implement the method according to any one of claims 1 to 8 by executing the computer executable instructions.
11. A chip, characterized in that: The chip comprises: A processor, configured to call and run a computer program from a memory, so that a device equipped with the chip executes the method according to any one of claims 1 to 8.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by at least one processor, the method according to any one of claims 1 to 8 is implemented.
13. A computer program product comprising a computer program or instructions, characterized in that When the computer program or instruction is executed by a processor, the method according to any one of claims 1 to 8 is implemented.