Method for unlocking electronic device and electronic device

By sending information between electronic devices and using the collective identification and key information for verification, the problem of cumbersome unlocking methods in the prior art is solved, a fast and secure unlocking process is achieved, and user experience and efficiency are improved.

CN114547580BActive Publication Date: 2025-08-15HUAWEI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202011350028.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-11-26
Publication Date
2025-08-15
Estimated Expiration
2040-11-26

AI Technical Summary

Technical Problem

The unlocking method of existing electronic devices relies on users to enter passwords, which are cumbersome to operate, inefficient and poor user experience.

Method used

The first electronic device sends information to the second electronic device, and uses the collective identification and key information to perform verification. If the verification is successful, it will switch to the unlocking state to achieve rapid unlocking between the electronic devices.

Benefits of technology

Improve unlocking efficiency, reduce software and hardware requirements for electronic devices, reduce storage space usage, and improve user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114547580B_ABST
    Figure CN114547580B_ABST
Patent Text Reader

Abstract

The present application provides a method for unlocking an electronic device and an electronic device, relating to the field of terminal technology, wherein the method includes a first electronic device in a locked state sending a first message to a second electronic device, the first electronic device receiving a second message fed back by the second electronic device based on the first message, the first electronic device verifying the second message based on the first key information corresponding to the first set identifier, and if the first electronic device determines that the second message verification is successful, the first electronic device switches from the locked state to the unlocked state, wherein the first set identifier is used to identify a set of electronic devices, and the first electronic device and the second electronic device are any two electronic devices in the set of electronic devices. The technical solution provided by the present application can improve the efficiency of unlocking electronic devices and the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of terminal technology, and in particular to a method for unlocking an electronic device and the electronic device. Background Art

[0002] Nowadays, electronic devices have become an indispensable part of users' lives, such as mobile phones, computers, and smart home devices. These electronic devices can generally include unlocked and locked states. When the electronic device is in the locked state, the user can be restricted or prohibited from using certain functions.

[0003] In the prior art, electronic devices may include input devices such as keyboards, through which users can enter passwords. When the electronic device is in a locked state and receives a password entered by the user via the input device, the password can be compared with a stored password. If the password matches the stored password, the electronic device can be switched to an unlocked state.

[0004] It can be seen that the current unlocking method mainly relies on the user to enter a password. The operation is cumbersome, inefficient, and provides a poor user experience. Summary of the Invention

[0005] In view of this, the present application provides a method for unlocking an electronic device and an electronic device to improve the efficiency of unlocking the electronic device and the user experience.

[0006] To achieve the above objectives, in a first aspect, an embodiment of the present application provides a method for unlocking an electronic device, comprising:

[0007] The first electronic device in a locked state sends first information to the second electronic device;

[0008] receiving, by the first electronic device, second information fed back by the second electronic device based on the first information;

[0009] The first electronic device verifies the second information based on the first key information corresponding to the first set identifier;

[0010] If the first electronic device determines that the second information verification is successful, the first electronic device switches from the locked state to the unlocked state, wherein the first set identifier is used to identify a set of electronic devices, and the first electronic device and the second electronic device are any two electronic devices in the set of electronic devices.

[0011] Among them, the first electronic device may be an electronic device that can be in a locked state or an unlocked state, including computers, mobile phones, wearable devices (such as smart glasses, smart watches and smart bracelets, etc.), smart locks (such as door locks and car locks, etc.) and smart home devices (such as smart refrigerators, smart washing machines, smart water heaters, etc.), etc. The second electronic device can be any electronic device with communication function. In some embodiments, the second electronic device can be an electronic device that is superior to the first electronic device in terms of at least one of the complexity and security of the unlocking method, such as the second electronic device can be unlocked by fingerprint, while the first electronic device can only be unlocked by entering a password. In some embodiments, the second electronic device can be (or can be configured to be) an electronic device that does not need to enter a locked state. In some embodiments, the second electronic device can be an electronic device that is frequently used by users, such as a mobile phone, a wearable device, etc.

[0012] The first information is used by the first electronic device to obtain the second information from the second electronic device, thereby triggering the second electronic device to unlock the first electronic device. The second information is used by the first electronic device to switch from a locked state to an unlocked state upon successful verification. In some embodiments, the first information can also be used to notify the second electronic device that the first electronic device is currently locked.

[0013] The first information may include a character string generated by the first electronic device.

[0014] The first set identifier corresponds to the set of electronic devices in which the first electronic device and the second electronic device are located. The set of electronic devices can be a trust ring, that is, the electronic devices in the set of electronic devices can obtain and use the key information corresponding to the first set identifier. In some embodiments, the key information corresponding to the first set identifier includes first key information for decryption and second key information for encryption, wherein the first key information can correspond to the second key information. In some embodiments, the first key information and the second key information can be the same. In some embodiments, the first key information can include a first public key, and the second key information can include a first private key. Then, when the information is encrypted by the first private key, the information is signed. Similarly, the first public key can be used to verify the signature of the information carrying the signature. When the information carrying the signature is decrypted by the first public key, the signature of the information is verified.

[0015] In some embodiments, the first electronic device in a locked state may prompt the user to bring another electronic device, such as a second electronic device, close to the first electronic device, so as to quickly unlock the first electronic device.

[0016] In an embodiment of the present application, if the first electronic device is in a locked state, it can send a first message to the second electronic device and receive a second message fed back by the second electronic device based on the first information. The first electronic device can also verify the second information based on the first key information corresponding to the first set identifier. Since the first set identifier can identify the electronic device set where the first electronic device is located, if the second information verification is successful, it can be determined that the second electronic device and the first electronic device belong to the same electronic device set, and the second electronic device is trustworthy, so the first electronic device can switch from a locked state to an unlocked state. That is, one electronic device can quickly unlock another electronic device in the same electronic set without having to rely on the user to perform tedious unlocking operations through input devices such as keyboards or buttons to unlock, thereby improving unlocking efficiency and user experience. And as long as the electronic devices in the same electronic device set store the first key information, they can be completely unlocked, reducing the storage space occupied.

[0017] Optionally, the first key information includes a first public key, and the first electronic device verifies the second information based on the first key information corresponding to the first set identifier, including:

[0018] The first electronic device performs signature verification on the second information based on the first public key;

[0019] The first electronic device determining that the second information is successfully verified includes:

[0020] If the first electronic device determines that the signature verification of the second information passes, and the second information after the signature verification is identical to the first information, the first electronic device determines that the verification of the second information is successful.

[0021] If the first electronic device successfully decrypts the second information using the first key information, it can be determined that the second information originates from an electronic device within the same trust ring. Therefore, it can be determined that the second information has been successfully verified and the device is switched to an unlocked state. In some embodiments, the first electronic device can also compare the decrypted second information with the first information. If the decrypted second information is identical to the first information, it indicates that the second information is fed back in response to the first information currently sent by the first electronic device. The first electronic device can then determine that the second information has been successfully verified and switch to an unlocked state if the second information is successfully decrypted and the decrypted second information is identical to the first information, thereby ensuring the timeliness and reliability of the unlocking and reducing the possibility of misinterpretation of the lock.

[0022] Among them, if the first key information includes the first public key, the first electronic device decrypts the second information based on the first key information, that is, performs signature verification on the second information, and if the decryption of the second information is successful, the signature verification of the second information is passed.

[0023] Optionally, the first information includes a random number, and the second information after decryption (or through signature verification) includes the random number.

[0024] Optionally, before the first electronic device verifies the second information based on the first key information corresponding to the first set identifier, the method further includes:

[0025] The first electronic device obtains the first key information from a server based on the first set identifier.

[0026] Of course, the first electronic device may also obtain second key information corresponding to the first key information from the server based on the first set identifier, such as the first private key corresponding to the first public key.

[0027] Optionally, the method further includes:

[0028] If the first electronic device does not receive the second information within the first preset time period after sending the first information, or if the first electronic device receives the second information within the first preset time period after sending the first information but determines that the second information verification fails, the first electronic device will send the first information to the second electronic device again. In other words, when the first electronic device is in a locked state, it can periodically send the same first information until it successfully switches to an unlocked state based on the first information, thereby facilitating other electronic devices such as the second electronic device to receive the first information in a timely manner when they are close to the first electronic device, thereby improving unlocking efficiency.

[0029] Optionally, if the first electronic device does not receive the second information within a first preset time period after sending the first information, or the first electronic device determines that the second information verification has failed, but switches to an unlocked state based on other strategies, when it enters the locked state again (that is, any second information that has been successfully verified before has not used the first information in the verification process), the first electronic device can generate the eighth information in a similar manner to the generation of the first information, and send the eighth information to the second electronic device, or it can send the first information again (that is, continue to use the first information until the first information is used for a second information verification and the verification is successful).

[0030] For example, when the first electronic device is in a locked state, it may broadcast a random number 153246. If the first electronic device fails to switch to an unlocked state based on the random number 153246 within 30 seconds after broadcasting the random number, including if the second information is not received or if the second information is received but the random number included in the second information is not 153246, the first electronic device may continue to broadcast the random number 153246. If the first electronic device successfully switches to an unlocked state based on the random number 153246 within 30 seconds after broadcasting the random number, the first electronic device may regenerate and broadcast a new random number the next time it enters a locked state. If the first electronic device successfully switches to an unlocked state within 30 seconds after broadcasting the random number, but the unlocking is not achieved by the random number 153246, for example, if the user unlocks the device using a fingerprint, the first electronic device may continue to broadcast the random number 153246 or regenerate and broadcast a new random number the next time it enters a locked state.

[0031] Optionally, after the first electronic device switches from the locked state to the unlocked state, the method further includes:

[0032] The first electronic device sends third information to the second electronic device;

[0033] If the first electronic device fails to receive the fourth information fed back by the second electronic device based on the third information within the second preset time period, or if the first electronic device receives the fourth information within the second preset time period but fails to successfully verify the fourth information based on the first key information, the first electronic device switches from the unlocked state to the locked state.

[0034] If the first electronic device fails to receive the fourth information fed back by the second electronic device based on the third information within the second preset time period, it is possible that the second electronic device has moved beyond the first distance threshold of the first electronic device, or the second electronic device has entered a locked state. In this case, the first electronic device can be switched to a locked state in a timely manner to ensure the security of the first electronic device. If the first electronic device receives the fourth information within the second preset time period but fails to successfully verify the fourth information based on the first key information, it is possible that the fourth information was mistakenly sent by the second electronic device. Therefore, the first electronic device can also be switched to a locked state. It can be seen that the user can unlock the first electronic device by bringing the second electronic device close to the first electronic device in the same trust ring. By keeping the distance between the first electronic device and the second electronic device less than or equal to the first distance threshold, the first electronic device is kept unlocked. Therefore, whether unlocking or locking the first electronic device, it is not necessary to rely on tedious user operations, which improves the efficiency of controlling the electronic device, reduces the software and hardware requirements of the electronic device, and reduces the cost of the electronic device.

[0035] Optionally, the first electronic device is provided with a first antenna, the transmission power of the first antenna is less than or equal to a first power threshold, the first power threshold makes the longest transmission distance of the first antenna a first distance threshold, and the first antenna is used by the first electronic device to send messages to the second electronic device.

[0036] For example, the first electronic device may transmit at least one of the first information and the third information through the first antenna.

[0037] Optionally, the transmission power of the first antenna may be lower than that of other antennas in the first electronic device.

[0038] Optionally, when the first electronic device determines that the second information verification is successful, it can also determine whether the device identifier of the second electronic device is a preset device identifier. If so, it switches to an unlocked state; otherwise, it remains locked. In other words, by pre-setting a preset device identifier, the first electronic device can only be unlocked by a designated electronic device, further improving the security of unlocking.

[0039] Optionally, when the first electronic device determines that the second information verification is successful and switches to the unlocked state, it can display the device identification of the second electronic device to the user, thereby prompting the user which electronic device is currently unlocked.

[0040] Optionally, the method further includes:

[0041] The first electronic device receives fifth information sent by the third electronic device;

[0042] The first electronic device generates sixth information based on the fifth information and second key information corresponding to the first set identifier;

[0043] The first electronic device sends the sixth information to the third electronic device, and the sixth information is used by the third device to switch from the locked state to the unlocked state when it is determined that the verification of the sixth information is successful.

[0044] The first electronic device may send the sixth information based on the first antenna.

[0045] Optionally, the second key information includes a first private key, and the first electronic device generates sixth information based on the fifth information and the second key information corresponding to the first set identifier, including:

[0046] The first electronic device signs the fifth information based on the first private key to obtain the sixth information carrying the signature.

[0047] The first electronic device can encrypt the fifth information using the second key information to obtain the encrypted sixth information. When the second key information includes the first private key, the first electronic device encrypts the fifth information based on the second key information, i.e., signs the fifth information based on the second key information, and the resulting sixth information carries the signature (of the first electronic device).

[0048] Optionally, before the first electronic device generates sixth information based on the fifth information and second key information corresponding to the first set identifier, the method further includes:

[0049] If the first electronic device determines that it is currently in the unlocked state, the first electronic device generates the sixth information based on the fifth information and the second key information.

[0050] Among them, since when the first electronic device is in an unlocked state, it can be said that the first electronic device has authenticated the user or has been unlocked by another electronic device that has authenticated the user, for example, the unlock password entered by the user is correct. Therefore, the first electronic device can generate the sixth information when it receives the fifth information and determines that the first electronic device is currently in an unlocked state, so that the first electronic device can only unlock the third electronic device through subsequent steps when it is in an unlocked state, thereby further improving the security of the third electronic device.

[0051] Optionally, the first set identifier includes a user identifier.

[0052] If the user ID is logged into an electronic device, then the electronic device belongs to the trust circle corresponding to the user ID. For example, if a user logs into three devices—a mobile phone, a wristband, and a laptop—with one user ID, then all three devices belong to the trust circle corresponding to the user ID. When the laptop is locked, it can be unlocked by bringing the phone or wristband close to it.

[0053] In a second aspect, an embodiment of the present application provides a method for unlocking an electronic device, comprising:

[0054] The second electronic device receives the first information sent by the first electronic device in a locked state;

[0055] The second electronic device generates second information based on the first information and second key information corresponding to the first set identifier;

[0056] The second electronic device sends the second information to the first electronic device;

[0057] The first set identifier is used to identify a set of electronic devices, the first electronic device and the second electronic device are any two electronic devices in the set of electronic devices, and the second information is used by the first electronic device to switch from the locked state to the unlocked state when it is determined that the second information verification is successful.

[0058] Optionally, the second key information includes a first private key, and the second electronic device generates second information based on the first information and the second key information corresponding to the first set identifier, including:

[0059] The second electronic device signs the first information based on the first private key to obtain the second information carrying the signature.

[0060] The second electronic device can encrypt the first information using the second key information to obtain encrypted second information. When the second key information includes the first private key, the second electronic device encrypts the first information based on the second key information, i.e., signs the first information based on the second key information. The result is second information that carries the signature (of the second electronic device).

[0061] Optionally, the second electronic device generates second information based on the first information and second key information corresponding to the first set identifier, including:

[0062] If the second electronic device is currently in the unlocked state, the second electronic device generates the second information based on the first information and the second key information.

[0063] Optionally, before the second electronic device generates second information based on the first information and second key information corresponding to the first set identifier, the method further includes:

[0064] The second electronic device obtains the second key information from the server based on the first set identifier.

[0065] Optionally, the second electronic device is provided with a first antenna, the transmission power of the first antenna is less than or equal to a first power threshold, the first power threshold makes the longest transmission distance of the first antenna a first distance threshold, and the first antenna is used by the second electronic device to send messages to the first electronic device.

[0066] In combination with the above-mentioned first and second aspects, in the method for unlocking an electronic device provided in an embodiment of the present application, as long as the first electronic device or the second electronic device must send a message to the other party through the first antenna in at least one step of the interaction process between the first electronic device and the second electronic device, it can be ensured that the first electronic device can only be unlocked or locked by the second electronic device within the first distance threshold. For example, in the aforementioned embodiment, as long as at least one of the first information and the second information is sent through the first antenna, the first electronic device can be unlocked by the second electronic device only when the distance between the first electronic device and the second electronic device is less than or equal to the first distance threshold. Similarly, as long as at least one of the third information and the fourth information is sent through the first antenna, the first electronic device can be kept in an unlocked state only when the distance between the first electronic device and the second electronic device is less than the first distance threshold. It should be noted that if the first electronic device (second electronic device) does not need to send a message through the first antenna, the first electronic device (second electronic device) may not include the first antenna.

[0067] In a third aspect, an embodiment of the present application provides a device for unlocking an electronic device, which can be used to implement the method described in any one of the first aspect and / or any one of the second aspect above.

[0068] In a fourth aspect, an embodiment of the present application provides an electronic device comprising: a memory and a processor, the memory being used to store a computer program; and the processor being used to execute the method described in any one of the first aspect and / or any one of the second aspect above when calling the computer program.

[0069] In a fifth aspect, an embodiment of the present application provides a chip system, which includes a processor, the processor is coupled to a memory, and the processor executes a computer program stored in the memory to implement the method described in any one of the first aspects and / or any one of the second aspects above.

[0070] The chip system may be a single chip or a chip module composed of multiple chips.

[0071] In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the method described in any one of the first aspects and / or any one of the second aspects is implemented.

[0072] In a seventh aspect, an embodiment of the present application provides a computer program product. When the computer program product is run on an electronic device, the electronic device executes the method described in any one of the first aspect and / or any one of the second aspect above.

[0073] It can be understood that the beneficial effects of the second to seventh aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0074] Figure 1 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;

[0075] Figure 2 A schematic structural diagram of an antenna provided in an embodiment of the present application;

[0076] Figure 3 A schematic structural diagram of another antenna provided in an embodiment of the present application;

[0077] Figure 4 A schematic structural diagram of another antenna provided in an embodiment of the present application;

[0078] Figure 5 A schematic diagram of a communication scenario provided in an embodiment of the present application;

[0079] Figure 6 A schematic diagram of a scenario of a method for unlocking an electronic device provided in an embodiment of the present application;

[0080] Figure 7 A flowchart of an authorization method provided in an embodiment of the present application;

[0081] Figure 8 A schematic diagram of a display interface provided in an embodiment of the present application;

[0082] Figure 9 A flowchart of a method for unlocking an electronic device provided in an embodiment of the present application;

[0083] Figure 10 A schematic diagram of a display interface provided in an embodiment of the present application;

[0084] Figure 11 A schematic diagram of a display interface provided in an embodiment of the present application;

[0085] Figure 12 A schematic diagram of the structure of another electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0086] The method for unlocking an electronic device provided in the embodiments of the present application can be applied to electronic devices such as mobile phones, tablet computers, wearable devices, in-vehicle devices, augmented reality (AR) / virtual reality (VR) devices, laptops, ultra-mobile personal computers (UMPCs), netbooks, personal digital assistants (PDAs), smart home devices, and electronic locks. The embodiments of the present application do not impose any restrictions on the specific types of electronic devices.

[0087] Please refer to Figure 1 , Figure 1 1 is a schematic diagram of the structure of an example electronic device 100 provided in an embodiment of the present application. The electronic device 100 may include a processor 110, a memory 120, a communication module 130, an antenna 160, and the like. Optionally, the electronic device 100 may also include a display screen 140, which may display images or videos in a human-computer interaction interface. Optionally, the electronic device 100 may also include peripheral devices 150, such as a mouse, keyboard, speaker, microphone, and the like.

[0088] The processor 110 may include one or more processing units, and the memory 120 is used to store program codes and data. In the embodiment of the present application, the processor 110 may execute computer-executable instructions stored in the memory 120 to control and manage the actions of the electronic device 100.

[0089] The communication module 130 can be used for communication between various internal modules of the electronic device 100, or communication between the electronic device 100 and other external electronic devices. For example, if the electronic device 100 communicates with other electronic devices via a wired connection, the communication module 130 may include an interface, such as a USB interface. The USB interface may be an interface that complies with USB standard specifications, specifically a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface can be used to connect a charger to charge the electronic device 100, and can also be used to transmit data between the electronic device 200 and peripheral devices. It can also be used to connect headphones to play audio through the headphones. The interface can also be used to connect other electronic devices, such as AR devices.

[0090] Alternatively, the communication module 130 may include audio devices, radio frequency circuits, Bluetooth chips, wireless fidelity (Wi-Fi) chips, near-field communication technology (NFC), BT and Zigbee modules, etc., and can realize the interaction between the electronic device 100 and other electronic devices in a variety of different ways.

[0091] Antenna 160 can be used to transmit and receive electromagnetic signals. Antenna 160 may include one or more antennas. In some embodiments, antenna 160 can be divided into a first antenna 161 (i.e., an ultra-short-range antenna, also known as a weak antenna or dummy antenna) and a second antenna 162 (i.e., a normal antenna, also known as a strong antenna or true antenna). The transmit power of wireless signals transmitted by first antenna 161 can be less than or equal to a first power threshold, where the first power threshold sets the maximum transmission distance of the first antenna to a first distance threshold. The transmit power of wireless signals transmitted by second antenna 162 can be greater than the first power threshold and less than or equal to a second power threshold, where the second power threshold sets the maximum transmission distance of the second antenna to a second distance threshold, where the first distance threshold can be less than the second distance threshold. The processor 110 can control switching between the second antenna 162 and the first antenna 161. The second antenna 162 and the first antenna 161 implement network communication with other devices via the communication module 130 on the electronic device 100. In one example, the second antenna 162 and the first antenna 161 can be two different antennas.

[0092] Furthermore, the communication module 130 can convert the electromagnetic waves received from the first antenna 161 or the second antenna 162 into signals and send the signals to the processor 110 for processing, or the communication module 130 can receive the signals to be sent from the processor and convert them into electromagnetic waves for radiation via the first antenna 161 or the second antenna 162.

[0093] When the electronic device 100 uses the second antenna 162, if the distance between the electronic device 100 and another device is less than or equal to the second distance threshold, the other device can receive the signal transmitted by the electronic device 100 via the second antenna 162, thereby enabling communication between the other device and the electronic device 100. When the electronic device 100 uses the first antenna 161, if the distance between the electronic device 100 and another device is less than or equal to the first distance threshold, the other device can receive the signal transmitted by the electronic device 100 via the first antenna 161, thereby enabling communication between the other device and the electronic device 100. Similarly, other devices may also be provided with the second antenna 162 or the first antenna 161. When the other device uses the second antenna 162, if the distance between the electronic device 100 and another device is less than or equal to the second distance threshold, the electronic device 100 can receive the signal transmitted by the other device via the second antenna 162. When the other device uses the first antenna 161, if the distance between the electronic device 100 and another device is less than or equal to the first distance threshold, the electronic device 100 can receive the signal transmitted by the other device via the first antenna 161. It can be seen that if any one of the electronic device 100 and the other device is equipped with the first antenna 161 (i.e., a weak antenna), and the other device is equipped with the first antenna 161 (i.e., a true antenna) or the second antenna 162, then as long as the distance between the electronic device 100 and the other device is less than or equal to the first distance threshold, the electronic device 100 and the other device can receive and send signals to each other.

[0094] In other embodiments, the second antenna 162 and the first antenna 161 may share a portion of the wiring, for example Figure 2-Figure 4 Description of the illustrated embodiment.

[0095] The electronic device 100 of the embodiment of the present application realizes ultra-short distance communication through the first antenna 161. The dual antennas (first antenna 161 and second antenna 162) in the electronic device 100 of the embodiment of the present application can be switched by a radio frequency switch. Figure 2-Figure 4 The first antenna 161 is shown in the dotted box) and is placed in the shielding cover or the first antenna 161 is placed in the chip. Figure 2-Figure 4 Schematic diagrams of the structures of three types of first antennas 161 are shown.

[0096] The purpose of the first antenna 161 in the embodiment of the present application is to reduce the transmission distance as much as possible. The principle of constructing the first antenna 161 can be:

[0097] (1) Reduce the length of the antenna, thereby reducing the electromagnetic waves radiated into the air; (2) Reduce the radiation efficiency, and convert part of the electromagnetic wave radiation into heat energy through resistance and consume it; (3) Reduce the return loss, and reflect part of the RF energy back into the chip, etc.

[0098] The first antenna 161 can be specifically implemented as follows:

[0099] (1) Shorten the antenna; (2) Disconnect a point in the true antenna path, or ground it through a resistor, inductor, or capacitor; (3) Use a shielding cover, etc.

[0100] It should be understood that the specific implementations (1) and (2) of the first antenna can be implemented on a PCB board or inside a chip.

[0101] It should also be understood that the function of the above-mentioned shielding cover is to block the path of electromagnetic waves radiated by the antenna to the receiver, so as to achieve the purpose of weakening the radiation.

[0102] It should also be understood that shortening the antenna means that the first antenna 161 is shorter than the second antenna 162 . Figure 2-Figure 4 The structures of the three first antennas 161 are shown in FIG. Figures 2 to 4 As shown in the dashed box in . Figure 2-Figure 4 The second antenna 162 is structured to connect a filter circuit 210 (e.g., a π-type circuit), a matching circuit 220 (e.g., a π-type circuit), and an antenna body 230 outside the matching circuit 220 (e.g., the antenna body can be a metal trace) through a radio frequency input / output (RFIO) pin. Figure 2 The antenna a shown in the dotted box, Figure 3 Antenna b shown in the dotted box and Figure 4 The antenna c shown in the dotted box is the first antenna 161. The lengths of antennas a, b, and c are different, but all are shorter than the second antenna 162. The filter circuit is used to prevent interference, and the matching circuit 220 is used to match the second antenna 162.

[0103] For example, Figure 2As shown, the first antenna 161 (antenna a) can be directly disconnected using the radio frequency input / output (RFIO) pin of the Wi-Fi chip 250 in the shielding cover 240. The first antenna 161 can be composed of the RFIO pin, a trace, and the first switch of a two-way switch (the first switch is not connected to any device). The two-way switch refers to the switch between RFIO and the filter circuit, through which the RFIO pin can be connected or disconnected from the filter circuit 210; the first switch is the switch shown in 2B that is connected to the RFIO pin and disconnected from the filter circuit 210. It should be understood that the two-way switch in the embodiment of the present application can be a single-pole double-throw switch.

[0104] For example, Figure 3 As shown, the first antenna 161 (antenna b) can be connected to the ground through the RFIO of the Wi-Fi chip 250 in the shielding cover 240 through a matching device (e.g., a resistor). The first antenna 161 can be composed of an RFIO pin, a trace, a first switch of a two-way switch (the first switch is connected to the resistor), and a resistor. Grounding the resistor can convert a portion of the electromagnetic wave radiation into heat energy and consume it, thereby reducing the radiation efficiency of the first antenna 161. The two-way switch refers to a switch between the RFIO pin and the resistor and the filter circuit. Through this switch, the RFIO pin can be connected to the resistor and disconnected from the filter circuit 210, or the RFIO pin can be disconnected from the resistor and connected to the filter circuit 210. The first switch is a switch connected to the resistor and disconnected from the filter circuit.

[0105] For example, Figure 4 As shown, the first antenna 161 (antenna c) can use the RFIO pin of the Wi-Fi chip 250 inside the shielding cover 240 to pass through the chip matching filter circuit 220 and then connect to a matching device (e.g., a resistor) to ground. The first antenna 161 can be composed of the RFIO pin, the wiring, the filter circuit 210, the first switch of the two-way switch (the first switch is connected to the resistor), and the resistor. By connecting the resistor to the ground, a portion of the electromagnetic wave radiation can be converted into heat energy and consumed, thereby reducing the radiation efficiency of the first antenna 161. Among them, the two-way switch refers to the switch between the filter circuit 210 and the resistor inside the shielding cover 240 and the matching circuit 220 outside the shielding cover 240. Through this switch, the filter circuit 210 inside the shielding cover 240 can be connected to the resistor and disconnected from the matching circuit 220 outside the shielding cover, or the filter circuit 210 inside the shielding cover 240 can be disconnected from the resistor and connected to the matching circuit 220 outside the shielding cover 240. The first switch is a switch that connects the filter circuit 210 inside the shielding cover 240 and the resistor.

[0106] It should be understood that the above Figures 2 to 3 The second antenna 162 in the embodiment may be composed of an RFIO pin, a trace, a second switch of the two-way switch, a filter circuit 210, a matching circuit 220, and an antenna body 230 connected to the matching circuit 220. The second switch is a switch connecting the RFIO pin and the filter circuit 210.

[0107] above Figure 4 The second antenna 162 in the embodiment may be composed of an RFIO pin, a filter circuit 210, a trace, a second switch of the two-way switch, a matching circuit 220, and an antenna body 230 connected to the outside of the matching circuit 220. The second switch is a switch that connects the filter circuit 210 in the shielding case 240 and the matching circuit 220 outside the shielding case 240.

[0108] It should be understood that the above Figure 1 The communication module 130 shown may be Figures 2 to 4 The Wi-Fi chip 250 described in.

[0109] The above different first antenna structures, combined with different transmit power (Tx power) settings of the Wi-Fi chip 250 , can meet different ultra-short-range communication requirements (eg, from 10 cm to 2 m).

[0110] Illustratively, Table 1 shows the communication distances of several different first antenna structures in combination with different transmission powers.

[0111] Table 1

[0112]

[0113] Due to the characteristics of the physical devices in the chip, the difference between the maximum transmission power and the minimum transmission power of the antenna is related. If the minimum transmission power of the electronic device 100 is reduced to a very low level, the maximum transmission power will also be reduced, which will not meet the distance requirements for normal operation. In the embodiment of the present application, due to the different structures of different electronic devices 100 and different safety performance requirements for the electronic devices 100, the manufacturer of the electronic device 100 can adopt different first antenna structures and transmission powers to ensure the communication distance of the electronic device 100. For example, for different smart air conditioner manufacturers, the thickness of their smart air conditioner casings may be different. Then, under the same first antenna structure and the same transmission power, the communication distance at which the smart air conditioner can be discovered may also be different. Different electronic device 100 manufacturers can test the safe distance at which the electronic device 100 can be discovered based on the structure of their smart device itself, the structure of the first antenna and a certain transmission power.

[0114] Combined with the above example, take the second distance threshold as 5 meters and the first distance threshold as 0.3 meters as an example. When the electronic device 100 uses the second antenna (i.e., a strong antenna), if the distance between the electronic device 100 and other devices is less than the second distance threshold (e.g., the other devices are located Figure 5 1), the electronic device 100 can communicate with other devices; when the electronic device 100 uses the first antenna (ie, the weak antenna), if the distance between the electronic device 100 and the other device is less than the first distance threshold (such as the other device is located at Figure 5 As shown in position 2), the electronic device 100 can communicate with other devices.

[0115] It should be understood that, except Figure 1 The embodiments of the present application do not specifically limit the structure of the electronic device 100 except for the various components or modules listed in the figure. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine or separate certain components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0116] In order to facilitate understanding of the technical solutions in the embodiments of the present application, the application scenarios of the embodiments of the present application are first introduced below.

[0117] Please refer to Figure 6 , is a schematic diagram of a scenario of a method for unlocking an electronic device provided in an embodiment of the present application. In this scenario, a first electronic device 610, a second electronic device 620, and a third electronic device 630 are included.

[0118] The first electronic device 610 can be an electronic device that can be in a locked state or unlocked state, including computers, mobile phones, wearable devices (such as smart glasses, smart watches and smart bracelets, etc.), smart locks (such as door locks and car locks, etc.) and smart home devices (such as smart refrigerators, smart washing machines, smart water heaters, etc.). In order to prevent or restrict use by others other than legitimate users, certain functions can be restricted or prohibited when the first electronic device 610 is in a locked state. For example, when a computer is in a locked state, only unlocking, shutting down and restarting can be performed; when a mobile phone is in a locked state, only taking photos and making emergency calls can be performed; when a smart washing machine or smart water heater is in a locked state, it will no longer respond to pressing operations on certain buttons.

[0119] In some embodiments, when the first electronic device 610 is in a locked state, the user can submit a password to the first electronic device 610. Accordingly, the first electronic device 610 can switch to an unlocked state if it determines that the password submitted by the user is correct. Alternatively, the user can press a specific key, and the first electronic device 610 can switch to an unlocked state upon detecting the pressing operation of the specific key.

[0120] It can be seen that in the above unlocking method, on the one hand, the user is required to enter a password or press a button, which is a relatively complicated operation, resulting in low unlocking efficiency and user experience; on the other hand, it also places relatively high requirements on the hardware and software of the electronic device. For example, the electronic device needs to include a keyboard or buttons, otherwise it cannot be unlocked, which increases the cost of the electronic device.

[0121] In order to solve or partially solve the above technical problems, the present application provides a method for unlocking an electronic device. Since for the same user or user group, the user or the user group may have multiple electronic devices, these electronic devices can correspond to the same set identifier (such as the same account), as a set of electronic devices, the user or the user group can be authenticated by any electronic device in the set of electronic devices, then for the electronic device, the other electronic device and the user in the same set of electronic devices can be trusted, that is, a set of electronic devices can be used as a trust ring. Therefore, the first electronic device 610 in a locked state can be unlocked by another second electronic device 620 in the same electronic device set as the first electronic device 610.

[0122] The second electronic device 620 can be any electronic device with a communication function. In some embodiments, the second electronic device 620 can be an electronic device that is superior to the first electronic device 610 in terms of at least one of the complexity and security of the unlocking method. For example, the second electronic device 620 can be unlocked by fingerprint, while the first electronic device 610 can only be unlocked by entering a password. In some embodiments, the second electronic device can be an electronic device that is frequently used by the user, such as a mobile phone, a wearable device, and the like. In some embodiments, the second electronic device 620 can be (or can be configured to be) an electronic device that does not need to enter a locked state. In some embodiments, the second electronic device 620 can be an electronic device that is currently in an unlocked state.

[0123] At least one of the first electronic device 610 and the second electronic device 620 may be provided with Figures 1-4 The first antenna 161 shown in FIG. 1 and the first electronic device 610 and the second electronic device 620 may also be provided with a Figure 1 A second antenna 162 is shown.

[0124] In the method for unlocking an electronic device provided in an embodiment of the present application, the first electronic device 610, the second electronic device 620, and the third electronic device 630 may belong to the same electronic device set and correspond to the same set identifier, such as the same user identifier. Taking the first electronic device 610 and the second electronic device 620 as an example, if the first electronic device 610 is in a locked state, the first information may be sent to the second electronic device 620. When the second electronic device 620 receives the first information, it may generate the second information based on the second key information corresponding to the set identifier and the first information, and feed the second information back to the first electronic device 610. Then, if the first electronic device 610 receives the second information and successfully verifies the second information based on the first key information corresponding to the set identifier, it can be determined that the second electronic device 620 and the first electronic device 610 belong to the same electronic device set, and the second electronic device 620 is trustworthy, so the first electronic device 610 can switch from a locked state to an unlocked state. That is, one electronic device can be used to quickly unlock another electronic device in the same electronic device set, without having to rely on the user to perform tedious unlocking operations through input devices such as keyboards or buttons to unlock, thereby improving unlocking efficiency and user experience, reducing the software and hardware requirements of the electronic device, and reducing the cost of the electronic device. It can be understood that in the embodiments of the present application, the electronic device, on the basis of supporting the method for unlocking the electronic device provided in the embodiments of the present application, can restrict or prohibit the user from unlocking through input devices such as keyboards or buttons. Of course, it can also support the user to unlock through input devices such as keyboards or buttons at the same time. The specific method used to unlock and lock the electronic device can be determined by pre-setting.

[0125] Similarly, the second electronic device 620 can also perform similar operations as the first electronic device 610 to unlock the third electronic device 630. In other words, the same electronic device can be used to unlock other electronic devices and can also be unlocked by other electronic devices.

[0126] In some embodiments, the scenario may further include a server 640. The server 640 may be used to provide the first electronic device 610, the second electronic device 620, and the third electronic device 630 with necessary information related to unlocking (such as key information), thereby further increasing the security of the unlocking method. In some embodiments, the server 640 may generate and provide key information (such as a key pair including a public key and a private key) to the first electronic device 610, the second electronic device 620, and the third device 630. In some embodiments, the server 640 may store a collection identifier of an electronic device set (i.e., a trust ring) and key information corresponding to the collection identifier. The server 640 may provide the key information to any electronic device in the trust ring, thereby authorizing any electronic device in the trust ring to unlock other electronic devices in the trust ring through the method for unlocking an electronic device provided in an embodiment of the present application.

[0127] The following specific embodiments are used to describe the technical solution of the present application in detail. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.

[0128] In some embodiments, if an electronic device needs to allow another electronic device to unlock or lock the electronic device, the electronic device may first authorize the other electronic device, and then the other electronic device may be used to unlock or lock the electronic device.

[0129] Please refer to Figure 7 , is a flowchart of an authorization method provided in an embodiment of the present application. It should be noted that this method does not Figure 7 The specific order described below is for limitation only. It should be understood that in other embodiments, the order of some steps in the method can be interchanged according to actual needs, or some steps can be omitted or deleted. The method includes the following steps:

[0130] S701: The first electronic device sends seventh information to the server, where the seventh information includes a first set identifier.

[0131] The user can log in to the first electronic device through the first collective identifier. If the first electronic device obtains the first collective identifier submitted by the user, it can send the seventh information to the server. The seventh information can be used to authorize other electronic devices corresponding to the first collective identifier (i.e., other electronic devices in the same trust ring) to unlock or lock the first electronic device.

[0132] The first set identifier is used to identify a set of electronic devices, i.e., a trust ring. In some embodiments, the first set identifier may include a user identifier (e.g., an account number). If the user identifier is logged into an electronic device, then the electronic device belongs to the trust ring corresponding to the user identifier. Of course, in actual applications, the first set identifier may also include other information that can distinguish different sets of electronic devices.

[0133] In some embodiments, in order to facilitate the user to determine whether to authorize other devices to unlock or lock the first electronic device and improve security, the first electronic device can display authorization prompt information to the user. If a confirmation operation of the user is received based on the authorization prompt information, the seventh information is sent to the server.

[0134] For example, the first electronic device may display an authorization prompt interface such as Figure 8 As shown. Figure 8 The pop-up window includes a prompt to the user. The top of the pop-up window displays the current user's account "ADS001". The bottom of the pop-up window displays key information such as "Are you sure to enable quick unlock / lock?" and information explaining the key information, such as "*This operation will authorize other devices to unlock or lock this device*." It also displays two buttons, "Yes" and "No." If the first electronic device receives a user click operation based on the "Yes" button, it sends the seventh information to the server. If the first electronic device receives a click operation based on the "No" button or the close button in the upper right corner, it does not send the seventh information to the server.

[0135] S702: The server obtains key information corresponding to the first set identifier.

[0136] If the server receives the first set identifier, it can obtain the key information corresponding to the first set identifier. Since the key information corresponds to the set identifier, and the set identifier can be used to identify a trust ring, the key information can be used to subsequently identify whether an electronic device is an electronic device in the trust ring.

[0137] The key information may include at least one of first key information and second key information. The first key information and the second key information may correspond to each other, with the first key information being used to decrypt data and the second key information being used to encrypt data. If an electronic device can decrypt data sent from another electronic device using the first key information, then the other electronic device has encrypted the data using the second key information corresponding to the first key information. In other words, the other electronic device and the electronic device are in the same trust ring.

[0138] In some embodiments, the first key information may be a first public key, and the second key information may be a first private key corresponding to the first public key. In some embodiments, the first key information and the second key information may be the same. In some embodiments, the first key information may include the first public key, and the second key information may include the first private key. In this case, when information is encrypted using the first private key, the information is signed. Similarly, the first public key can be used to verify the signature of information carrying the signature. When the first public key is used to decrypt the signed information, the signature of the information is verified.

[0139] In some embodiments, the server may obtain the key information corresponding to the first set identifier from the stored correspondence between the set identifier and the key information.

[0140] For example, the first set identifier carried by the seventh information received by the server is ADS001. From the correspondence between the set identifier and the key information shown in Table 2 below, the corresponding key information including public key 1 and private key 1 is obtained.

[0141] Table 2

[0142] Collection ID Key information ADS001 Public key 1, private key 1 CPS002 Public key 2, private key 2 0011001 Public key 3, private key 3 … …

[0143] It should be noted that the server may obtain at least one set identifier and key information corresponding to each set identifier in advance, and then store each set identifier and key information corresponding to each set identifier in the correspondence between the set identifier and the key identifier.

[0144] Taking the first set identifier as an example, upon first receiving the first set identifier, the server may generate key information corresponding to the first combination identifier and store the first set identifier and the generated key information in a corresponding manner. Subsequently, if the server receives the seventh information sent by the first electronic device, it may obtain the key information corresponding to the first set identifier based on the first set identifier carried in the seventh information.

[0145] In some embodiments, the server may store device identifications of multiple electronic devices corresponding to the collective identification, wherein the device identification may be used to identify the electronic device and may include a character or a string of characters.

[0146] S703: The server sends key information corresponding to the first set identifier to the first electronic device.

[0147] If the first electronic device receives the key information, it can store the key information. In some embodiments, the first electronic device can store the first set identifier and the key information corresponding to the first set identifier in a corresponding manner, so as to facilitate subsequent rapid acquisition of the key information.

[0148] Through the above S701-S703, the first electronic device obtains the key information corresponding to the first set identifier from the server based on the first set identifier, and the key information can be used to identify whether a certain electronic device is an electronic device in the trust ring corresponding to the key information. Then, in subsequent steps, the first electronic device can unlock / lock other electronic devices in the same trust ring based on the key information, or be unlocked / locked by other electronic devices in the same trust ring.

[0149] It should be noted that, in actual applications, the first electronic device may also obtain the key information corresponding to the first set identifier in other ways. For example, in some embodiments, the first electronic device may negotiate with the second electronic device in the same trust ring to determine the key information.

[0150] The second electronic device may also join a trust ring and obtain key information in the same or similar manner as the first electronic device.

[0151] It should also be noted that for any electronic device, as long as the electronic device obtains the collective identification (that is, joins the trust ring corresponding to the collective identification), it can unlock or lock other electronic devices in the same trust ring in the following manner. If the electronic device also obtains user authorization to unlock or lock the electronic device through other devices, then the electronic device can also be unlocked or locked by other electronic devices in the same trust ring in the following manner. And it can be understood that the above-mentioned collective identification or user authorization, once obtained, is valid multiple times, unless the electronic device exits the trust ring (for example, the user exits the user identification currently logged in to the electronic device), or the user authorization reaches the preset validity period, or the user cancels the user authorization.

[0152] Please refer to Figure 9 , is a flow chart of a method for unlocking an electronic device provided in an embodiment of the present application. It should be noted that this method does not Figure 9 The specific order described below is for limitation only. It should be understood that in other embodiments, the order of some steps in the method can be interchanged according to actual needs, or some steps can be omitted or deleted. The method includes the following steps:

[0153] S901: If the first electronic device is in a locked state, send first information to the second electronic device.

[0154] When the first electronic device is in a locked state, the first electronic device may send a first message to the second electronic device, and the first message may be used to trigger the second electronic device to unlock the first electronic device. In some embodiments, the first message may also be used to notify the second electronic device that the first electronic device is currently in a locked state.

[0155] The first information may include a character string generated by the first electronic device. For example, the first information may be a random number generated by the first electronic device using a preset random number generation method.

[0156] In some embodiments, since there may be multiple electronic devices in the same trust ring, and these electronic devices may all belong to the same user or user group, and the efficiency and security of data transmission between electronic devices with similar distances are relatively high, the first electronic device can send the first information to the second electronic device through the first antenna with a smaller transmission distance mentioned above, thereby only triggering the second electronic device within the first distance threshold to unlock the first electronic device, so as to improve the security of unlocking the first electronic device.

[0157] The first electronic device may broadcast the first information via the first antenna. If the distance between the second electronic device and the first electronic device is less than or equal to a first distance threshold, the second electronic device may receive the first information.

[0158] In some embodiments, the first electronic device in a locked state may prompt the user to bring another electronic device, such as a second electronic device, close to the first electronic device, so as to quickly unlock the first electronic device.

[0159] For example, the display interface of the first electronic device when it is in a locked state may be as follows: Figure 10 As shown. Figure 10 In the embodiment of the present invention, the first electronic device is in a locked state, and its display interface only displays the date, time, battery level and unlocking related information. The unlocking related information includes a locked icon, a prompt message "Please bring other devices in the trust ring closer to unlock" and a "Click to unlock with password" button. When the user brings another electronic device in the same trust ring closer to the first electronic device, the first electronic device can be unlocked by the method of unlocking the electronic device provided in the embodiment of the present application. When the first electronic device receives a click operation from the user based on the "Click to unlock with password" button, it can display a password input interface to receive the password entered by the user, and then determine whether to unlock based on whether the password verification result is correct.

[0160] Of course, in actual applications, the first electronic device may also send the first information to the second electronic device through the second antenna, or the first electronic device may send the first information to the second electronic device through a server.

[0161] S902: The second electronic device generates second information based on the first information and second key information corresponding to the first set identifier.

[0162] If the second electronic device receives the first message, it can encrypt the first message using the second key information to obtain the encrypted second message. When the second key information includes the first private key, the second electronic device encrypts the first message based on the second key information, i.e., signs the first message based on the second key information, resulting in the second message carrying the signature.

[0163] It should be noted that, in actual applications, the second electronic device may also generate the second information based on the first information and the second key information in other ways. For example, the second electronic device may determine the hash value of the first information and then encrypt the hash value of the first information using the second key information to obtain the second information. It is understandable that the embodiments of the present application do not limit the specific method of generating the second information based on the first information and the second key information corresponding to the first set identifier.

[0164] In some embodiments, since when the second electronic device is in an unlocked state, it can be said that the second electronic device has authenticated the user, such as the unlock password entered by the user is correct, the second electronic device can generate second information when it receives the first information and determines that the second electronic device is currently in an unlocked state, so that the second electronic device can only unlock the first electronic device through subsequent steps when it is in an unlocked state, further improving the security of the first electronic device.

[0165] S903: The second electronic device sends second information to the first electronic device.

[0166] In some embodiments, the second electronic device can send the second information to the first electronic device via the aforementioned first antenna, so that the first electronic device can only receive the second information when the distance between the second electronic device and the first electronic device is less than or equal to the first distance threshold. Of course, in actual applications, the second electronic device can also send the second information to the first electronic device via the second antenna, or the second electronic device can send the second information to the first electronic device via a server.

[0167] In some embodiments, the second electronic device may send a device identification of the second electronic device to the first electronic device, so that the first electronic device determines the source of the second information, that is, determines which electronic device unlocked the first electronic device.

[0168] S904: The first electronic device verifies the second information based on the first key information corresponding to the first set identifier.

[0169] As can be seen from the foregoing, the key information corresponding to the first set identifier includes the first key information and the second key information. Therefore, if the first electronic device can decrypt the second information using the first key information, it can be determined that the second information originated from an electronic device within the same trust ring, that is, the electronic device is trustworthy. Furthermore, if the first key information includes the first public key corresponding to the first private key, the first electronic device decrypts the second information based on the first key information, that is, performs signature verification on the second information.

[0170] S905: If the first electronic device successfully verifies the second information, it switches from a locked state to an unlocked state.

[0171] If the first electronic device successfully decrypts the second information, it can be determined that the second information comes from an electronic device in the same trust ring, so it can be determined that the second information is successfully verified, thereby switching to the unlocked state. Among them, if the first key information includes the first public key, then if the first electronic device successfully decrypts the second information, it means that the signature verification of the second information is passed. In some embodiments, the first electronic device can also compare the decrypted (or signature verified) second information with the first information. If the decrypted second information is the same as the first information, it means that the second information is fed back for the first information currently sent by the first electronic device. Then, the first electronic device can determine that the second information verification is successful when the second information is successfully decrypted and the decrypted second information is determined to be the same as the first information, and switch to the unlocked state, thereby ensuring the timeliness and reliability of the unlocking and reducing the possibility of misinterpretation of the lock. For example, it is understandable that if the first electronic device broadcasts the first information at a certain moment, and then the first electronic device receives the second information from the second electronic device and successfully switches to the unlocked state, the first information loses its effectiveness, and the fourth electronic device also sends the second information to the first electronic device dozens of days after that moment. Obviously, the second information sent by the fourth electronic device has already missed the opportunity when the first electronic device needs to be unlocked, so the first electronic device naturally does not need to judge whether it needs to switch to the unlocked state based on the second information sent by the fourth electronic device. For another example, the first electronic device and the fourth electronic device both broadcast the first information at a certain moment, and the second electronic device generates the second information for the first information sent by the fourth electronic device, but mistakenly sends the second information to the first electronic device. Then, although the first electronic device can also decrypt the second information, the decrypted second information is different from the first information, so the first electronic device can continue to remain in the locked state.

[0172] Of course, if the first electronic device fails to decrypt the second information or the decrypted second information is different from the first information, it can be determined that the second information verification has failed and the locked state continues.

[0173] In some embodiments, if the first electronic device does not receive the second information within a first preset time period after sending the first information, or if the first electronic device receives the second information within a first preset time period after sending the first information but determines that the second information verification fails, the first electronic device may send the first information to the second electronic device again. In other words, when the first electronic device is in a locked state, the same first information may be periodically sent until it is successfully switched to an unlocked state based on the first information, thereby facilitating the second electronic device and other electronic devices to receive the first information in a timely manner when they are close to the first electronic device, thereby improving unlocking efficiency.

[0174] The first preset duration can be obtained by presetting, for example, the first preset duration can be 30 seconds or 1 minute. Of course, in practical applications, the first preset duration can also be other durations, and the embodiment of the present application does not specifically limit the size of the first preset duration.

[0175] In some embodiments, if the first electronic device does not receive the second information within the first preset time period after sending the first information, or the first electronic device receives the second information within the first preset time period after sending the first information but determines that the second information verification fails, but switches to the unlocked state based on other strategies, when entering the locked state again (that is, any second information that has been successfully verified before has not used the first information in the verification process), the first electronic device can generate the eighth information in a similar manner to the generation of the first information, and send the eighth information to the second electronic device, or it can send the first information again (that is, continue to use the first information until the first information is used for a second information verification and the verification is successful).

[0176] For example, when the first electronic device is in a locked state, it may broadcast a random number 153246. If the first electronic device fails to switch to an unlocked state based on the random number 153246 within 30 seconds after broadcasting the random number, including if the second information is not received or if the second information is received but the random number included in the second information is not 153246, the first electronic device may continue to broadcast the random number 153246. If the first electronic device successfully switches to an unlocked state based on the random number 153246 within 30 seconds after broadcasting the random number, the first electronic device may regenerate and broadcast a new random number the next time it enters a locked state. If the first electronic device successfully switches to an unlocked state within 30 seconds after broadcasting the random number, but the unlocking is not achieved by the random number 153246, for example, if the user unlocks the device using a fingerprint, the first electronic device may continue to broadcast the random number 153246 or regenerate and broadcast a new random number the next time it enters a locked state.

[0177] In some embodiments, when the first electronic device determines that the second information verification is successful and switches to the unlocked state, it can display the device identification of the second electronic device to the user, thereby prompting the user which electronic device is currently unlocked.

[0178] For example, the display interface of the first electronic device when determining that the second information verification is successful and switching to the unlocked state may be as follows: Figure 11 As shown. Figure 11 In the example, the first electronic device displays an unlock icon and prompt information such as "Unlocked, from: My phone A30", thereby prompting the user that the first electronic device is unlocked by my phone A30.

[0179] In some embodiments, when the first electronic device determines that the second information verification is successful, it can also determine whether the device identifier of the second electronic device is a preset device identifier. If so, it switches to an unlocked state; otherwise, it remains locked. In other words, by pre-setting a preset device identifier, the first electronic device can only be unlocked by a designated electronic device, further improving the security of unlocking.

[0180] S906: The first electronic device sends third information to the second electronic device.

[0181] As can be seen from the foregoing, the first electronic device can rely on the second electronic device to switch from the locked state to the unlocked state. Similarly, the first electronic device can also rely on the second electronic device to switch from the unlocked state to the locked state.

[0182] Among them, the way in which the first electronic device generates the third information can be the same as or similar to the way in which it generates the first information, and the way in which the first electronic device sends the third information can be the same as or similar to the way in which it sends the first information. The embodiments of this application will not go into details about this.

[0183] For example, the first information may be a random number 153246, and the third information may be another different random number 486547.

[0184] S907, if the first electronic device fails to receive the fourth information fed back by the second electronic device based on the third information within the second preset time period, or the first electronic device receives the fourth information within the second preset time period but fails to successfully verify the fourth information based on the first key information, the first electronic device switches from the unlocked state to the locked state.

[0185] If the first electronic device fails to receive the fourth information fed back by the second electronic device based on the third information within the second preset time period, it is possible that the second electronic device has moved beyond the first distance threshold of the first electronic device, or the second electronic device has entered a locked state. In this case, the first electronic device can be promptly switched to a locked state to ensure the security of the first electronic device. If the first electronic device receives the fourth information within the second preset time period but fails to successfully verify the fourth information based on the first key information, it is possible that the fourth information was mistakenly sent by the second electronic device. Therefore, the first electronic device can also be switched to a locked state. It can be seen that the user can unlock the first electronic device by bringing the second electronic device close to the first electronic device in the same trust ring. By keeping the distance between the first and second electronic devices less than or equal to the first distance threshold, the first electronic device is kept unlocked. Therefore, whether unlocking or locking the first electronic device, it is not necessary to rely on tedious user operations, which improves the efficiency of controlling the electronic device and the user experience, and also reduces the software and hardware requirements of the electronic device, thereby reducing the cost of the electronic device.

[0186] In addition, in some embodiments, S906 and S907 may be omitted, that is, after the first electronic device switches from the locked state to the unlocked state based on the method for unlocking an electronic device provided in the embodiments of the present application, the first electronic device may switch to the locked state in other ways. For example, the first electronic device may switch to the locked state when the lock button receives a click operation from the user.

[0187] It can be understood that in the method for unlocking an electronic device provided in the embodiment of the present application, as long as the first electronic device or the second electronic device must send a message to each other through the first antenna in at least one step of the interaction process between the first electronic device and the second electronic device, it can be ensured that the first electronic device can only be unlocked or locked by the second electronic device within the first distance threshold. For example, in the aforementioned embodiment, at least one of the first information in S901 and the second information in S903 is sent through the first antenna, so that the first electronic device can only be unlocked by the second electronic device when the distance between the first electronic device and the second electronic device is less than or equal to the first distance threshold. Similarly, in S906 and S907, as long as at least one of the third information and the fourth information is sent through the first antenna, the first electronic device can only be kept in an unlocked state if the distance between the first electronic device and the second electronic device is less than the first distance threshold. It should be noted that if the first electronic device (second electronic device) does not need to send a message through the first antenna, the first electronic device (second electronic device) may not include the first antenna.

[0188] In the above embodiment, it is described how the first electronic device enters the unlocked state or the locked state through the second electronic device. Similarly, the first electronic device can also perform the operations performed by the aforementioned second electronic device, and the third electronic device can perform the operations performed by the aforementioned first electronic device, thereby making the third electronic device enter the unlocked state or the locked state.

[0189] In some embodiments, a third device in a locked state may send fifth information to a first electronic device. The first electronic device may receive the fifth information sent by the third electronic device and generate sixth information based on the fifth information and the second key information corresponding to the first set identifier. The first electronic device may then send the sixth information to the third electronic device. If the third device successfully verifies the sixth information based on the first key information corresponding to the first set identifier, the third device switches from a locked state to an unlocked state.

[0190] In some embodiments, the first electronic device may sign the fifth information based on the first private key to obtain sixth information carrying the signature.

[0191] In some embodiments, if the first electronic device determines that it is currently in an unlocked state, the first electronic device generates sixth information based on the fifth information and the second key information.

[0192] In an embodiment of the present application, if the first electronic device is in a locked state, it can send a first message to the second electronic device and receive a second message fed back by the second electronic device based on the first information. The first electronic device can also verify the second information based on the first key information corresponding to the first set identifier. Since the first set identifier can identify the electronic device set where the first electronic device is located, if the second information verification is successful, it can be determined that the second electronic device and the first electronic device belong to the electronic device set, and the second electronic device can be trusted, so the first electronic device can switch from a locked state to an unlocked state. That is, one electronic device can be used to quickly unlock another electronic device in the same electronic set, without having to rely on the user to perform tedious unlocking operations through input devices such as keyboards or buttons to unlock, thereby improving unlocking efficiency and user experience.

[0193] Based on the same inventive concept, an embodiment of the present application further provides an electronic device 1200 , which may be the first electronic device, the second electronic device, or the third electronic device mentioned above. Figure 12 This is a structural diagram of an electronic device 1200 provided in an embodiment of the present application, as shown in FIG. Figure 12 As shown, the electronic device provided by this embodiment includes: a memory 1210 and a processor 1220, the memory 1210 is used to store computer programs; the processor 1220 is used to execute the method described in the above method embodiment when calling the computer program.

[0194] The electronic device provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effects are similar, which will not be repeated here.

[0195] Based on the same inventive concept, an embodiment of the present application further provides a chip system, which includes a processor coupled to a memory, and executes a computer program stored in the memory to implement the method described in the above method embodiment.

[0196] The chip system may be a single chip or a chip module composed of multiple chips.

[0197] An embodiment of the present application further provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the method described in the above method embodiment is implemented.

[0198] An embodiment of the present application further provides a computer program product. When the computer program product is run on an electronic device, the electronic device implements the method described in the above method embodiment when executing the computer program product.

[0199] If the above-mentioned integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application can implement all or part of the processes in the above-mentioned embodiment method by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, it can implement the steps of each of the above-mentioned method embodiments. The computer program includes computer program code, which can be in source code form, object code form, executable file, or some intermediate form. The computer-readable storage medium can at least include: any entity or device capable of carrying computer program code to the camera / terminal device, recording medium, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal, and software distribution medium. For example, a USB flash drive, mobile hard drive, magnetic disk, or optical disk. In some jurisdictions, based on legislation and patent practice, computer-readable media cannot be electric carrier signals or telecommunication signals.

[0200] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant description of other embodiments.

[0201] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0202] In the embodiments provided in this application, it should be understood that the disclosed devices / equipment and methods can be implemented in other ways. For example, the device / equipment embodiments described above are merely schematic. For example, the division of the modules or units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0203] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or collections thereof.

[0204] It will also be understood that the term "and / or" used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.

[0205] As used in this specification and the appended claims, the term "if" can be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]," depending on the context.

[0206] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.

[0207] References to "one embodiment" or "some embodiments" in this specification mean that a particular feature, structure, or characteristic described in conjunction with that embodiment is included in one or more embodiments of the present application. Thus, phrases such as "in one embodiment," "in some embodiments," "in other embodiments," and "in other embodiments" appearing in various places in this specification do not necessarily refer to the same embodiment, but rather mean "one or more but not all embodiments," unless otherwise specifically emphasized. The terms "including," "comprising," "having," and variations thereof all mean "including but not limited to," unless otherwise specifically emphasized.

[0208] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some or all of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for unlocking an electronic device, characterized in that: include: The first electronic device in a locked state sends first information to the second electronic device; receiving, by the first electronic device, second information fed back by the second electronic device based on the first information; The first electronic device verifies the second information based on the first key information corresponding to the first set identifier; If the first electronic device determines that the second information verification is successful, the first electronic device switches from the locked state to the unlocked state, wherein the first set identifier is used to identify a set of electronic devices, the first electronic device and the second electronic device are any two electronic devices in the set of electronic devices, at least one of the first electronic device and the second electronic device is provided with a first antenna and a second antenna, the transmission power of the first antenna is less than or equal to a first power threshold, the first power threshold makes the longest transmission distance of the first antenna a first distance threshold, the transmission power of the second antenna is greater than the first power threshold and less than or equal to the second power threshold, the second power threshold makes the longest transmission distance of the second antenna a second distance threshold, the first distance threshold is less than the second distance threshold, and at least one of the first information and the second information is sent via the first antenna.

2. The method according to claim 1, characterized in that The first key information includes a first public key, and the first electronic device verifies the second information based on the first key information corresponding to the first set identifier, including: The first electronic device performs signature verification on the second information based on the first public key; The first electronic device determining that the second information is successfully verified includes: If the first electronic device determines that the signature verification of the second information passes, and the second information that passes the signature verification is identical to the first information, the first electronic device determines that the verification of the second information is successful.

3. The method according to claim 2, characterized in that The first information includes a random number, and the second information verified by the signature includes the random number.

4. The method according to any one of claims 1 to 3, characterized in that: Before the first electronic device verifies the second information based on the first key information corresponding to the first set identifier, the method further includes: The first electronic device obtains the first key information from a server based on the first set identifier.

5. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: If the first electronic device does not receive the second information within the first preset time after sending the first information, or if the first electronic device receives the second information within the first preset time after sending the first information but determines that the verification of the second information fails, the first electronic device sends the first information to the second electronic device again.

6. The method according to claim 4, characterized in that The method further comprises: If the first electronic device does not receive the second information within the first preset time after sending the first information, or if the first electronic device receives the second information within the first preset time after sending the first information but determines that the verification of the second information fails, the first electronic device sends the first information to the second electronic device again.

7. The method according to any one of claims 1 to 3, characterized in that: After the first electronic device switches from the locked state to the unlocked state, the method further includes: The first electronic device sends third information to the second electronic device; If the first electronic device fails to receive the fourth information fed back by the second electronic device based on the third information within the second preset time period, or if the first electronic device receives the fourth information within the second preset time period but fails to successfully verify the fourth information based on the first key information, the first electronic device switches from the unlocked state to the locked state.

8. The method according to claim 5, characterized in that After the first electronic device switches from the locked state to the unlocked state, the method further includes: The first electronic device sends third information to the second electronic device; If the first electronic device fails to receive the fourth information fed back by the second electronic device based on the third information within the second preset time period, or if the first electronic device receives the fourth information within the second preset time period but fails to successfully verify the fourth information based on the first key information, the first electronic device switches from the unlocked state to the locked state.

9. The method according to claim 6, characterized in that After the first electronic device switches from the locked state to the unlocked state, the method further includes: The first electronic device sends third information to the second electronic device; If the first electronic device fails to receive the fourth information fed back by the second electronic device based on the third information within the second preset time period, or if the first electronic device receives the fourth information within the second preset time period but fails to successfully verify the fourth information based on the first key information, the first electronic device switches from the unlocked state to the locked state.

10. The method according to any one of claims 1 to 3, claim 6, claim 8 or claim 9, characterized in that: The first electronic device includes a computer or a smart home device, and the second electronic device includes a mobile phone or a wearable device.

11. The method according to any one of claims 1 to 3, claim 6, claim 8 or claim 9, characterized in that: The first set identifier includes a user identifier.

12. A method for unlocking an electronic device, characterized in that: include: The second electronic device receives the first information sent by the first electronic device in a locked state; The second electronic device generates second information based on the first information and second key information corresponding to the first set identifier; The second electronic device sends the second information to the first electronic device; The first set identifier is used to identify a set of electronic devices, the first electronic device and the second electronic device are any two electronic devices in the set of electronic devices, the second information is used for the first electronic device to switch from the locked state to the unlocked state when it is determined that the second information verification is successful, at least one of the first electronic device and the second electronic device is provided with a first antenna and a second antenna, the transmission power of the first antenna is less than or equal to a first power threshold, the first power threshold makes the longest transmission distance of the first antenna a first distance threshold, the transmission power of the second antenna is greater than the first power threshold and less than or equal to the second power threshold, the second power threshold makes the longest transmission distance of the second antenna a second distance threshold, the first distance threshold is less than the second distance threshold, and at least one of the first information and the second information is sent via the first antenna.

13. The method according to claim 12, characterized in that The second key information includes the first private key, and the second electronic device generates second information based on the first information and the second key information corresponding to the first set identifier, including: The second electronic device signs the first information based on the first private key to obtain the second information carrying the signature.

14. The method according to claim 12 or 13, characterized in that The second electronic device generates second information based on the first information and second key information corresponding to the first set identifier, including: If the second electronic device is currently in the unlocked state, the second electronic device generates the second information based on the first information and the second key information.

15. The method according to claim 12 or 13, characterized in that Before the second electronic device generates second information based on the first information and second key information corresponding to the first set identifier, the method further includes: The second electronic device obtains the second key information from the server based on the first set identifier.

16. The method according to claim 14, characterized in that Before the second electronic device generates second information based on the first information and second key information corresponding to the first set identifier, the method further includes: The second electronic device obtains the second key information from the server based on the first set identifier.

17. An electronic device, characterized in that: include: A memory and a processor, the memory being used to store a computer program; the processor being used to execute the method according to any one of claims 1 to 11 or any one of claims 12 to 16 when calling the computer program.

18. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 11 or any one of claims 12 to 16 is implemented.

Citation Information

Patent Citations

  • Method of using one device to unlock another device

    CN110334503A

  • Equipment unlocking method and device, equipment and storage medium

    CN111966991A