Unlocking method, electronic device and computer-readable storage medium

By dynamically adjusting the automatic unlocking distance between the mobile phone and the device, the privacy leakage and frequent unlocking problems caused by Bluetooth automatic unlocking are solved, and information security and user experience are improved.

CN115988133BActive Publication Date: 2024-11-15HUAWEI TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202211540444.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2017-06-02
Publication Date
2024-11-15
Estimated Expiration
2037-06-02

AI Technical Summary

Technical Problem

In Bluetooth communication mode, when mobile phones and bracelets are automatically unlocked, the unlocking distance is too far and may lead to the security risk of user privacy leakage, and automatic unlocking in different scenarios leads to the trouble of frequent manual unlocking of users.

Method used

By acquiring the device type and target position of the connected device, dynamically adjusting the automatic unlocking distance, determining the unlocking distance based on the device's mobility and security level, ensuring automatic unlocking in a safe environment and remaining locked in an unsafe environment.

Benefits of technology

It effectively reduces the risk of user privacy leakage, reduces the frequent operations of users manually unlocking in a secure environment, and improves information security in an unsafe environment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115988133B_ABST
    Figure CN115988133B_ABST
Patent Text Reader

Abstract

An unlocking method, an electronic device, and a computer-readable storage medium, which relate to the field of communication technology, can automatically adjust the safe distance for automatic unlocking of an electronic device in different usage scenarios, and reduce the security risk of user privacy being leaked. The method includes: when a first electronic device and a second electronic device are in a connected state, the first electronic device obtains the device type of the second electronic device; the first electronic device determines the unlocking distance between the first electronic device and the second electronic device according to the device type of the second electronic device; when the actual distance between the first electronic device and the second electronic device is less than the unlocking distance, the first electronic device automatically unlocks.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present invention relate to the field of communication technology, and in particular, to an unlocking method, an electronic device, and a computer-readable storage medium. Background Art

[0002] Currently, mobile phones can be automatically unlocked by connecting to Bluetooth devices such as smart watches, headphones or speakers. For example, when a user's mobile phone and a wristband are connected via Bluetooth protocol, the user can add the wristband as a trusted device on the mobile phone. Then, when the mobile phone and the wristband are connected, the mobile phone can be automatically unlocked, thus eliminating the inconvenience of users frequently manually unlocking their mobile phones.

[0003] However, in the Bluetooth communication mode, the maximum connection distance between the bracelet and the mobile phone when they are connected may reach 10-15 meters. That is to say, when the user wears the bracelet 15 meters away from his mobile phone, the mobile phone will automatically unlock, but at this time the mobile phone may not be within the user's visible or controllable distance (for example, 2 meters), which will undoubtedly increase the security risk of leakage of important information in the mobile phone. Summary of the invention

[0004] Embodiments of the present invention provide an unlocking method, an electronic device, and a computer-readable storage medium, which can automatically adjust the safety distance for automatic unlocking of an electronic device in different usage scenarios, thereby reducing the security risk of user privacy being leaked.

[0005] To achieve the above object, the embodiments of the present invention adopt the following technical solutions:

[0006] In the first aspect, an embodiment of the present invention provides an unlocking method, including: when a first electronic device and a second electronic device are in a connected state, the first electronic device obtains the device type of the second electronic device; the first electronic device determines the unlocking distance between the first electronic device and the second electronic device according to the device type of the second electronic device; when the actual distance between the first electronic device and the second electronic device is less than the unlocking distance, the first electronic device automatically unlocks. In this way, the first electronic device can adjust its unlocking distance for automatic unlocking in different usage scenarios according to the device type of the second electronic device connected to it, avoiding the security risk of user privacy leakage due to the unlocking distance being set too far.

[0007] In a possible design method, the first electronic device determines the unlocking distance between the first electronic device and the second electronic device according to the device type of the second electronic device, including: when the device type of the second electronic device is the first type, the first electronic device determines a first threshold as the unlocking distance between the first electronic device and the second electronic device; when the device type of the second electronic device is the second type, the first electronic device determines a second threshold as the unlocking distance between the first electronic device and the second electronic device, the second threshold is greater than the first threshold, and the mobility of the first type of electronic device is higher than the mobility of the second type of electronic device.

[0008] It can be seen that in the embodiment of the present invention, when the first electronic device to be unlocked is an electronic device with low mobility, the unlocking distance between the first electronic device and the second electronic device can be appropriately relaxed, and when the first electronic device to be unlocked is an electronic device with high mobility, the unlocking distance between the first electronic device and the second electronic device can be appropriately shortened. In other words, the unlocking distance between the first electronic device and the second electronic device can be adaptively adjusted according to the device type of the first electronic device, eliminating the trouble of frequent manual unlocking when the user carries the first electronic device near the second electronic device with low mobility, and at the same time reducing the risk of information leakage caused by excessive unlocking distance when the first electronic device is connected to the second electronic device with high mobility.

[0009] In a possible design method, after the first electronic device determines the unlocking distance between the first electronic device and the second electronic device according to the device type of the second electronic device, it also includes: the first electronic device obtains the target position of the first electronic device; and the first electronic device adjusts the unlocking distance according to the target position.

[0010] In a possible design method, the first electronic device adjusts the unlocking distance according to the target position, including: when the target position is located in a first preset area, the first electronic device increases the unlocking distance; when the target position is located in a second preset area, the first electronic device reduces the unlocking distance, wherein the security level of the first electronic device in the first preset area is higher than the security level of the first electronic device in the second preset area.

[0011] In this way, according to the target location of the main control device (i.e., the first electronic device) and the device type of the slave device (i.e., the second electronic device), different unlocking distances can be set for the first electronic device in different application scenarios, so that the first electronic device can be automatically unlocked in a relatively safe environment, eliminating the trouble of users frequently performing unlocking operations; and maintaining a locked state in an environment with greater security risks, preventing users who do not have the operating authority of the first electronic device from using the first electronic device, thereby improving the information security in the first electronic device.

[0012] In a possible design method, the unlocking distance is used to indicate a preset target signal strength; wherein, when the actual distance between the first electronic device and the second electronic device is less than the unlocking distance, the first electronic device is automatically unlocked, including: the first electronic device obtains the real-time signal strength between the first electronic device and the second electronic device; when the real-time signal strength is greater than the target signal strength, the first electronic device is automatically unlocked.

[0013] In a second aspect, an embodiment of the present invention provides an unlocking method, comprising: when a first electronic device is in a connected state with a second electronic device, the first electronic device obtains a target position of the first electronic device; the first electronic device determines an unlocking distance between the first electronic device and the second electronic device based on the target position; when the actual distance between the first electronic device and the second electronic device is less than the unlocking distance, the first electronic device is automatically unlocked.

[0014] In a possible design method, the first electronic device determines the unlocking distance between the first electronic device and the second electronic device based on the target position, including: when the target position is located in a first preset area, the first electronic device determines a first preset value as the unlocking distance between the first electronic device and the second electronic device; when the target position is located in a second preset area, the first electronic device determines the second preset value as the unlocking distance between the first electronic device and the second electronic device, wherein a security level of the first electronic device in the first preset area is higher than a security level of the first electronic device in the second preset area, and the first preset value is greater than the second preset value.

[0015] That is, when the first electronic device to be unlocked is in an area with a higher security level, the unlocking distance between the first electronic device and the second electronic device can be appropriately relaxed, and when the first electronic device to be unlocked is in an area with a lower security level, the unlocking distance between the first electronic device and the second electronic device can be appropriately shortened. In this way, the unlocking distance between the first electronic device and the second electronic device can be adaptively adjusted according to the location of the first electronic device, eliminating the trouble of users frequently manually unlocking electronic devices in places with a higher security level, while reducing the risk of information leakage caused by automatic unlocking of electronic devices in places with a lower security level.

[0016] In a possible design method, the unlocking distance is used to indicate a preset target signal strength; wherein, when the actual distance between the first electronic device and the second electronic device is less than the unlocking distance, the first electronic device is automatically unlocked, including: the first electronic device obtains the real-time signal strength between the first electronic device and the second electronic device; when the real-time signal strength is greater than the target signal strength, the first electronic device is automatically unlocked.

[0017] In a third aspect, an embodiment of the present invention provides an electronic device, comprising: an acquisition unit, used to: when the electronic device is in a connected state, acquire the device type of the other electronic device; a determination unit, used to: determine the unlocking distance between the electronic device and the other electronic device according to the device type of the other electronic device; an unlocking unit, used to: automatically unlock when the actual distance between the electronic device and the other electronic device is less than the unlocking distance.

[0018] In a possible design method, the determination unit is specifically used to: when the device type of the above-mentioned other electronic device is a first type, determine the first threshold as the unlocking distance between the electronic device and the above-mentioned other electronic device; when the device type of the above-mentioned other electronic device is a second type, determine the second threshold as the unlocking distance between the electronic device and the above-mentioned other electronic device, the second threshold is greater than the first threshold, and the mobility of the first type of electronic device is higher than the mobility of the second type of electronic device.

[0019] In a possible design method, the electronic device further includes an adjustment unit, and the acquisition unit is further used to: acquire a target position of the electronic device; and the adjustment unit is used to: adjust the unlocking distance according to the target position.

[0020] In a possible design method, the adjustment unit is specifically used to: increase the unlocking distance when the target position is located in a first preset area; and reduce the unlocking distance when the target position is located in a second preset area, wherein the security level of the electronic device in the first preset area is higher than the security level of the electronic device in the second preset area.

[0021] In a possible design method, the unlocking distance is used to indicate a preset target signal strength; the acquisition unit is also used to: obtain the real-time signal strength between the above-mentioned another electronic device; the unlocking unit is specifically used to: automatically unlock when the real-time signal strength is greater than the target signal strength.

[0022] In a fourth aspect, an embodiment of the present invention provides an electronic device, comprising: an acquisition unit, used to acquire a target position of the electronic device when the electronic device is in a connected state with another electronic device; a determination unit, used to determine an unlocking distance between the electronic device and the other electronic device according to the target position; and an unlocking unit, used to automatically unlock the device when the actual distance between the electronic device and the other electronic device is less than the unlocking distance.

[0023] In a possible design method, the determination unit is specifically used to: when the target position is located in a first preset area, determine the first preset value as the unlocking distance between the electronic device and the above-mentioned another electronic device; when the target position is located in a second preset area, determine the second preset value as the unlocking distance between the electronic device and the above-mentioned another electronic device, wherein the security level of the electronic device in the first preset area is higher than the security level of the electronic device in the second preset area, and the first preset value is greater than the second preset value.

[0024] In a possible design method, the unlocking distance is used to indicate a preset target signal strength; the acquisition unit is also used to: obtain the real-time signal strength between the above-mentioned another electronic device; the unlocking unit is specifically used to: automatically unlock when the real-time signal strength is greater than the target signal strength.

[0025] In a fifth aspect, an embodiment of the present invention provides an electronic device, for example, the first electronic device or the second electronic device mentioned above, which includes: a processor, a memory, a bus and a communication interface; the memory is used to store computer execution instructions, and the processor is connected to the memory through the bus. When the electronic device is running, the processor executes the computer execution instructions stored in the memory so that the electronic device executes any one of the above unlocking methods.

[0026] In a sixth aspect, an embodiment of the present invention provides a computer-readable storage medium, in which instructions are stored. When the instructions are executed on any of the above-mentioned electronic devices, the electronic device executes any of the above-mentioned unlocking methods.

[0027] In a seventh aspect, an embodiment of the present invention provides a computer program product comprising instructions, which, when executed on any of the above-mentioned electronic devices, enables the electronic device to execute any of the above-mentioned unlocking methods.

[0028] In the embodiments of the present invention, the names of the above electronic devices do not limit the devices themselves. In actual implementation, these devices may appear with other names. As long as the functions of each device are similar to the embodiments of the present invention, they fall within the scope of the claims of the present invention and their equivalent technologies.

[0029] In addition, the technical effects brought about by any design method in the second to seventh aspects can refer to the technical effects brought about by the different design methods in the above-mentioned first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] Figure 1 An application scenario diagram of an unlocking method provided by an embodiment of the present invention Figure 1 ;

[0031] Figure 2A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention Figure 1 ;

[0032] Figure 3 An interactive schematic diagram of an unlocking method provided by an embodiment of the present invention Figure 1 ;

[0033] Figure 4 An application scenario diagram of an unlocking method provided by an embodiment of the present invention Figure 2 ;

[0034] Figure 5 An application scenario diagram of an unlocking method provided by an embodiment of the present invention Figure 3 ;

[0035] Figure 6 An interactive schematic diagram of an unlocking method provided by an embodiment of the present invention Figure 2 ;

[0036] Figure 7 An application scenario diagram of an unlocking method provided by an embodiment of the present invention Figure 4 ;

[0037] Figure 8 A flowchart of an unlocking method provided by an embodiment of the present invention;

[0038] Fig. 9 An application scenario diagram of an unlocking method provided by an embodiment of the present invention Figure 5 ;

[0039] Fig.10 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention Figure 2 ;

[0040] Fig.11 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention Figure 3 . DETAILED DESCRIPTION

[0041] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present invention, unless otherwise specified, "plurality" means two or more.

[0042] An embodiment of the present invention provides an unlocking method, such as Figure 1As shown, after the master device (e.g., the first electronic device 21) and its slave device (e.g., the second electronic device 22) establish a communication connection, the first electronic device can automatically adjust the unlocking distance between the first electronic device 21 and the second electronic device 22 according to the device type of the second electronic device 22 and / or the parameters such as the geographical location of the first electronic device 21. For example, when the device type of the second electronic device 22 is a wearable device such as a watch, since the user usually wears the second electronic device 22, the unlocking distance between the first electronic device 21 and the second electronic device 22 can be set to be closer, for example, 1 meter. In this way, when the actual distance between the first electronic device 21 and the second electronic device 22 is less than 1 meter, that is, the first electronic device 21 is within the controllable distance of the user, the first electronic device 21 will be triggered to automatically unlock, thereby reducing the security risk of user privacy leakage.

[0043] For another example, when the first electronic device 21 is located at the user's residence, since the security level of the first electronic device 21 is generally higher when it is located at the user's residence, the first electronic device 21 can set the unlocking distance between the first electronic device 21 and the second electronic device 22 to be farther, for example, 10 meters. In this way, when the user carries the first electronic device 21 around at home, as long as the actual distance between the first electronic device 21 and the second electronic device 22 is less than 10 meters, the first electronic device 21 can be automatically unlocked and be in an unlocked state, and the user does not need to frequently trigger the unlocking operation.

[0044] It can be seen that in an embodiment of the present invention, the first electronic device can adjust its unlocking distance for automatic unlocking in different usage scenarios according to parameters such as device type and / or geographic location, thereby avoiding the security risk of user privacy leakage due to the unlocking distance being set too far, and the problem of user frequent unlocking due to the unlocking distance being set too close, thereby improving user experience while ensuring information security.

[0045] The above unlocking method provided in the embodiment of the present invention can be applied to any electronic device such as mobile phones, wearable devices, AR (augmented reality) \ VR (virtual reality) devices, tablet computers, laptops, UMPCs (ultra mobile personal computers), netbooks, PDAs (personal digital assistants), etc., and the embodiment of the present invention does not impose any restrictions on this.

[0046] like Figure 2 As shown, the electronic device in the embodiment of the present application may be a mobile phone 100. The embodiment is described in detail below by taking the mobile phone 100 as an example. It should be understood that the mobile phone 100 shown in the figure is only an example of an electronic device, and the mobile phone 100 may have more or fewer components than those shown in the figure, may combine two or more components, or may have different component configurations.

[0047] like Figure 2 As shown, the mobile phone 100 may specifically include: a processor 101, a radio frequency (RF) circuit 102, a memory 103, a touch screen 104, a Bluetooth device 105, one or more sensors 106, a Wi-Fi device 107, a positioning device 108, an audio circuit 109, a peripheral interface 110, and a power system 111. These components can be connected through one or more communication buses or signal lines ( Figure 2 Those skilled in the art will appreciate that Figure 2 The hardware structure shown in the figure does not constitute a limitation on the mobile phone. The mobile phone 100 may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0048] Combine the following Figure 2 The various components of the mobile phone 100 are introduced in detail:

[0049] The processor 101 is the control center of the mobile phone 100, and uses various interfaces and lines to connect various parts of the mobile phone 100, and executes various functions of the mobile phone 100 and processes data by running or executing applications (hereinafter referred to as Apps) stored in the memory 103, and calling data stored in the memory 103. In some embodiments, the processor 101 may include one or more processing units; for example, the processor 101 may be a Kirin 960 chip manufactured by Huawei Technologies Co., Ltd.

[0050] The radio frequency circuit 102 can be used for receiving and sending wireless signals during the process of sending and receiving information or making calls. In particular, the radio frequency circuit 102 can receive the downlink data of the base station and send it to the processor 101 for processing; in addition, the uplink data is sent to the base station. Generally, the radio frequency circuit includes but is not limited to an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, etc. In addition, the radio frequency circuit 102 can also communicate with other devices through wireless communication. The wireless communication can use any communication standard or protocol, including but not limited to the global system for mobile communications, general packet radio service, code division multiple access, wideband code division multiple access, long term evolution, email, short message service, etc.

[0051] The memory 103 is used to store applications and data. The processor 101 executes various functions and data processing of the mobile phone 100 by running the applications and data stored in the memory 103. The memory 103 mainly includes a program storage area and a data storage area, wherein the program storage area can store an operating system and an application required for at least one function (such as a sound playback function, an image playback function, etc.); the data storage area can store data created when using the mobile phone 100 (such as audio data, a phone book, etc.). In addition, the memory 103 may include a high-speed random access memory, and may also include a non-volatile memory, such as a disk storage device, a flash memory device or other volatile solid-state storage device. The memory 103 can store various operating systems, such as the iOS operating system developed by Apple and the Android operating system developed by Google.

[0052] The touch screen 104 may include a touch panel 104-1 and a display 104-2. The touch panel 104-1 may collect touch events on or near the user of the mobile phone 100 (for example, the user uses a finger, a stylus, or any other suitable object on or near the touch panel 104-1) and send the collected touch information to other devices such as the processor 101. Figure 2 In the embodiment, the touch panel 104-1 and the display screen 104-2 are used as two independent components to realize the input and output functions of the mobile phone 100, but in some embodiments, the touch panel 104-1 and the display screen 104-2 can be integrated to realize the input and output functions of the mobile phone 100. It can be understood that the touch screen 104 is formed by stacking multiple layers of materials. In the embodiment of the present application, only the touch panel (layer) and the display screen (layer) are shown, and other layers are not recorded in the embodiment of the present application. In addition, in some other embodiments of the present application, the touch panel 104-1 can be covered on the display 104-2, and the size of the touch panel 104-1 is larger than the size of the display screen 104-2, so that the display screen 104-2 is completely covered under the touch panel 104-1, or the above-mentioned touch panel 104-1 can be configured on the front of the mobile phone 100 in the form of a full panel, that is, the user's touch on the front of the mobile phone 100 can be sensed by the mobile phone, so that the full touch experience on the front of the mobile phone can be achieved. In some other embodiments, the touch panel 104-1 is configured in the form of a full panel on the front of the mobile phone 100, and the display screen 104-2 can also be configured in the form of a full panel on the front of the mobile phone 100, so that a borderless structure can be achieved on the front of the mobile phone.

[0053] In the embodiment of the present application, the mobile phone 100 may also have a fingerprint recognition function. For example, a fingerprint recognition device 112 may be configured on the back of the mobile phone 100 (e.g., below the rear camera), or on the front of the mobile phone 100 (e.g., below the touch screen 104). For another example, a fingerprint acquisition device 112 may be configured in the touch screen 104 to implement the fingerprint recognition function, that is, the fingerprint acquisition device 112 may be integrated with the touch screen 104 to implement the fingerprint recognition function of the mobile phone 100. In this case, the fingerprint acquisition device 112 is configured in the touch screen 104, may be a part of the touch screen 104, or may be configured in the touch screen 104 in other ways. The main component of the fingerprint acquisition device 112 in the embodiment of the present application is a fingerprint sensor, which may use any type of sensing technology, including but not limited to optical, capacitive, piezoelectric or ultrasonic sensing technology.

[0054] In the embodiment of the present application, the mobile phone 100 may further include a Bluetooth device 105 for implementing data exchange between the mobile phone 100 and other short-range electronic devices (such as mobile phones, smart watches, etc.). The Bluetooth device in the embodiment of the present application may be an integrated circuit or a Bluetooth chip.

[0055] The Wi-Fi device 107 is used to provide the mobile phone 100 with network access that complies with the Wi-Fi related standard protocols. The mobile phone 100 can access the Wi-Fi access point through the Wi-Fi device 107, thereby helping the user to send and receive emails, browse web pages, and access streaming media, etc. It provides the user with wireless broadband Internet access. In some other embodiments, the Wi-Fi device 107 can also be used as a Wi-Fi wireless access point to provide Wi-Fi network access for other electronic devices.

[0056] The mobile phone 100 may also include at least one sensor 106, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display of the touch screen 104 according to the brightness of the ambient light, and the proximity sensor may turn off the power of the display when the mobile phone 100 is moved to the ear. As a type of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally three axes), and can detect the magnitude and direction of gravity when stationary, and can be used for applications that identify the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for other sensors that can also be configured in the mobile phone 100, such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., they will not be repeated here.

[0057] The positioning device 108 is used to provide the geographical location for the mobile phone 100. It is understandable that the positioning device 108 can specifically be a receiver of a global positioning system (GPS) or a Beidou satellite navigation system, a Russian GLONASS or other positioning system. After receiving the geographical location sent by the above positioning system, the positioning device 108 sends the information to the processor 101 for processing, or sends it to the memory 103 for storage. In some other embodiments, the positioning device 108 can also be a receiver of an assisted global satellite positioning system (AGPS). The AGPS system assists the positioning device 108 in completing the ranging and positioning services by acting as an auxiliary server. In this case, the auxiliary positioning server communicates with the positioning device 108 (i.e., GPS receiver) of the electronic device such as the mobile phone 100 through a wireless communication network to provide positioning assistance. In some other embodiments, the positioning device 108 can also be a positioning technology based on a Wi-Fi access point. Since each Wi-Fi access point has a globally unique MAC address, the electronic device can scan and collect the broadcast signals of the surrounding Wi-Fi access points when Wi-Fi is turned on, so it can obtain the MAC address broadcast by the Wi-Fi access point; the electronic device sends these data that can identify the Wi-Fi access point (such as the MAC address) to the location server through the wireless communication network, and the location server retrieves the geographical location of each Wi-Fi access point, and calculates the geographical location of the electronic device based on the strength of the Wi-Fi broadcast signal and sends it to the positioning device 108 of the electronic device.

[0058] The audio circuit 109, the speaker 113, and the microphone 114 can provide an audio interface between the user and the mobile phone 100. The audio circuit 109 can transmit the received audio data to the speaker 113 after converting the received audio data into an electrical signal, which is converted into a sound signal for output by the speaker 113; on the other hand, the microphone 114 converts the collected sound signal into an electrical signal, which is received by the audio circuit 109 and converted into audio data, and then the audio data is output to the RF circuit 102 to be sent to, for example, another mobile phone, or the audio data is output to the memory 103 for further processing.

[0059] The peripheral interface 110 is used to provide various interfaces for external input / output devices (such as keyboard, mouse, external display, external memory, user identification module card, etc.). For example, it is connected to the mouse through a universal serial bus (USB) interface, and is connected to the user identification module card (SIM) card provided by the telecommunications operator through the metal contacts on the user identification module card slot. The peripheral interface 110 can be used to couple the above-mentioned external input / output peripheral devices to the processor 101 and the memory 103.

[0060] The mobile phone 100 may also include a power supply device 111 (such as a battery and a power management chip) for supplying power to various components. The battery may be logically connected to the processor 101 via the power management chip, thereby managing functions such as charging, discharging, and power consumption through the power supply device 111.

[0061] although Figure 2 Not shown, the mobile phone 100 may also include a camera (front camera and / or rear camera), a flash, a micro-projection device, a near field communication (NFC) device, etc., which will not be described in detail here.

[0062] In the following, an unlocking method provided by an embodiment of the present invention will be described in detail in combination with a specific embodiment. Figure 3 As shown, including:

[0063] 301. A first electronic device establishes a connection with a second electronic device.

[0064] Specifically, the first electronic device can establish a communication connection with the second electronic device through any wireless communication method. For example, the wireless communication method can be Bluetooth, infrared, Z-Wave, ZigBee (Purple Bee Protocol), Wi-Fi or NFC, etc. The embodiments of the present invention do not impose any restrictions on this.

[0065] Taking Bluetooth connection as an example, the main control device that initiates the connection (i.e., the first electronic device) can discover the surrounding Bluetooth devices (i.e., the second electronic device) through paging. When the first electronic device discovers the second electronic device, it can establish a Bluetooth physical link (Asynchronous Connectionless Link, ACL) through the pairing process, thereby realizing the communication connection between the first electronic device and the second electronic device.

[0066] Furthermore, the first electronic device can also respond to the user's operation to add the second electronic device as a trusted device of the first electronic device, so that when the first electronic device detects the Bluetooth signal of the second electronic device again, it can directly establish a Bluetooth connection with the second electronic device.

[0067] 302. The first electronic device obtains its target location.

[0068] Optionally, the first electronic device can obtain the target position of the current first electronic device through any positioning device. For example, the positioning device can specifically be a receiver of the global positioning system (GPS) or Beidou satellite navigation system, Russia's GLONASS and other positioning systems; or, the positioning device can also be a receiver of an assisted global satellite positioning system (AGPS); or, the positioning device can also be a positioning technology based on a Wi-Fi access point, and the embodiments of the present invention do not impose any restrictions on this.

[0069] Alternatively, the first electronic device may also determine the target location of the current first electronic device based on the currently connected Wi-Fi or IP address. For example, user A sets the name of the home Wi-Fi to "abc", then when the first electronic device is detected to be connected to the wireless local area network named "abc", the first electronic device may determine that its target location is user A's home.

[0070] Alternatively, the first electronic device can also intelligently learn the target location of the current first electronic device based on the user's previous usage habits or work and rest habits. For example, the user is at home around 8-10 pm every night, so if the current time is 8:30 pm, the first electronic device can determine that its target location is the user's home; for another example, the user goes out at 8 am every morning and arrives at the company around 8:30 am, so if the current time is 8:10 am, the first electronic device can determine that its target location is a public place on the way to work.

[0071] 303. The first electronic device determines an unlocking distance between the first electronic device and the second electronic device according to the target position.

[0072] Specifically, one or more preset areas may be pre-set in the first electronic device, and each preset area has a corresponding security level. For example, as shown in Table 1, Tom, the user of the first electronic device, sets Tom's home as the preset area with the highest security level, sets his friend Amy's home and company as preset areas with a general security level, and sets public places such as fast food restaurants as preset areas with the lowest security level. Of course, the security level of each preset area may also be determined by the first electronic device after machine learning based on data such as the user's usage habits, and the embodiment of the present invention does not impose any restrictions on this.

[0073] Table 1

[0074] Preset Area Security Level Tom's Home high Amy's home and company generally **Fast food restaurants Low

[0075] Then, in step 403, when the target location is located in the first preset area, for example, Tom's home, the corresponding security level is the highest level, that is, when the first electronic device is located in Tom's home, the first electronic device is relatively safe. Figure 4 As shown in (a), the first electronic device can use a larger first preset value as the unlocking distance between the first electronic device and the second electronic device, for example, the first preset value is 10 meters. That is, when the actual distance between the first electronic device and the second electronic device is less than 10 meters, the first electronic device can be triggered to automatically unlock.

[0076] Accordingly, when the target location is located in the second preset area, for example, a fast food restaurant, the corresponding security level is the lowest level, that is, when the first electronic device is located in the fast food restaurant, the security level of the first electronic device is lower than that in Tom's home, and the security risk of the first electronic device is relatively high. Figure 4 As shown in (b) of FIG. 1 , the first electronic device may use a second preset value that is smaller than the first preset value as the unlocking distance between the first electronic device and the second electronic device, for example, the second preset value is 1 meter. That is, when the actual distance between the first electronic device and the second electronic device is less than 1 meter, the first electronic device may be triggered to automatically unlock.

[0077] In addition, if the target location obtained in step 303 does not belong to any of the above preset areas, then the unlocking distance between the first electronic device and the second electronic device can be set to the value of the unlocking distance when the security level is the lowest to ensure the security of the electronic devices.

[0078] Of course, the first electronic device can also directly set the corresponding relationship between different preset areas and corresponding unlocking distances. For example, when the first electronic device is located at Tom's home, the corresponding unlocking distance is 10 meters; when the first electronic device is located at Amy's home, the corresponding unlocking distance is 5 meters. In this way, after obtaining the above target location, the first electronic device can directly determine the corresponding unlocking distance according to the corresponding relationship.

[0079] It should be noted that the correspondence between the above-mentioned preset areas and security levels, and / or the correspondence between the unlocking distances of the preset areas, can be set in the first electronic device in the form of a table (such as Table 1), or in any other form, and the embodiments of the present invention do not impose any restrictions on this.

[0080] It can be seen that in the embodiment of the present invention, when the first electronic device to be unlocked is in an area with a higher security level, the unlocking distance between the first electronic device and the second electronic device can be appropriately relaxed, and when the first electronic device to be unlocked is in an area with a lower security level, the unlocking distance between the first electronic device and the second electronic device can be appropriately shortened. In other words, the unlocking distance between the first electronic device and the second electronic device can be adaptively adjusted according to the location of the first electronic device, eliminating the trouble of users frequently manually unlocking electronic devices in places with a higher security level, while reducing the risk of information leakage caused by automatic unlocking of electronic devices in places with a lower security level.

[0081] 304. When the actual distance between the first electronic device and the second electronic device is less than the unlocking distance, the first electronic device is automatically unlocked.

[0082] For example, the first electronic device may determine the relationship between the actual distance between the first electronic device and the second electronic device and the unlocking distance based on the signal strength between the first electronic device and the second electronic device, for example, RSSI (Received Signal Strength Indication).

[0083] For example, the unlocking distance is 5 meters, and when the distance between the first electronic device and the second electronic device is 5 meters, the signal strength between the two is the target signal strength. Then, when the first electronic device and the second electronic device are in a connected state, if the first electronic device detects that the real-time signal strength between the two is greater than the target signal strength, it means that the actual distance between the first electronic device and the second electronic device is less than 5 meters, thereby triggering the first electronic device to automatically unlock.

[0084] Of course, a corresponding distance sensor may also be provided on the first electronic device. Then, when the distance sensor detects that the actual distance between the first electronic device and the second electronic device is less than the unlocking distance, the first electronic device is triggered to automatically unlock.

[0085] Specifically, when the actual distance between the first electronic device and the second electronic device is less than the above-mentioned unlocking distance, the second electronic device can send authentication information to the first electronic device. The authentication information can be information unique to each electronic device authenticated by the first electronic device for identity authentication, such as a MAC (Media Access Control) address, or a device identifier of each authenticated electronic device, or a pre-set and stored password, fingerprint, etc.

[0086] Then, after the first electronic device receives the authentication information, it can compare the authentication information with one or more pre-stored authorization authentication information. When it is confirmed that the authentication information is the pre-stored authorization authentication information, it means that the identity of the second electronic device has passed the authentication. At this time, the first electronic device can reduce its local management authority, for example, unlock the screen of the first electronic device, unlock the operating authority of one or more applications in the first electronic device, etc. The embodiments of the present invention do not impose any restrictions on this.

[0087] In one possible design, Figure 5 As shown in (a) of FIG. 1 , after the first electronic device unlocks the screen, a prompt box may be used to prompt the user that the screen has been unlocked. Alternatively, Figure 5 As shown in (b) of FIG. 1 , after the first electronic device unlocks the screen, the user can directly enter the operation interface of the first electronic device to facilitate the user to perform corresponding operations on the first electronic device. Alternatively, as shown in FIG. Figure 5 As shown in (c) in FIG. 1 , when the first electronic device can unlock the screen in the background, the first electronic device may still be in a black screen state after unlocking. At this time, the user can wake up the screen of the first electronic device by single-clicking or sliding, and then perform corresponding operations on the first electronic device.

[0088] Of course, those skilled in the art may also set other ways to reduce the local management authority of the first electronic device, and the embodiments of the present invention do not impose any restrictions on this. For example, when the actual distance between the first electronic device and the second electronic device is less than the unlocking distance, the user's fingerprint may still be collected when the first electronic device is unlocked. However, compared with the scenario where the actual distance between the first electronic device and the second electronic device is greater than the unlocking distance, the first electronic device may only collect a portion of the user's fingerprint, and authenticate the user's identity based on the collected fingerprint, thereby increasing the speed of fingerprint unlocking.

[0089] In one possible design approach, Figure 6 As shown, the unlocking method provided by the embodiment of the present invention includes:

[0090] 401. A first electronic device establishes a connection with a second electronic device.

[0091] The specific manner of establishing the connection between the first electronic device and the second electronic device can be referred to the relevant description in step 301, so it will not be repeated here.

[0092] 402. The first electronic device obtains a device type of the second electronic device.

[0093] Taking Bluetooth connection as an example, the Bluetooth protocol sets identifiers for different device types, for example, the identifier of a microphone is 1040, the identifier of a camera is 1072, the identifier of a wearable headset is 1028, and the identifier of a blood pressure monitor is 230.

[0094] Then, when the first electronic device and the second electronic device establish a connection through the Bluetooth protocol, the first electronic device can call a related function to obtain the device type of the second electronic device, for example, by sending a request to obtain the device type to the second electronic device through the getDeviceClass() function, and then the second electronic device returns the identifier of its own device type to the first electronic device. In this way, the first electronic device can determine the device type of the second electronic device based on the identifier returned by the second electronic device.

[0095] 403. The first electronic device determines an unlocking distance between the first electronic device and the second electronic device according to the device type of the second electronic device.

[0096] For example, the unlocking distance between the first electronic device and the second electronic device can be set according to the mobility of the second electronic device. Among them, the electronic device with strong mobility refers to the device that the user can carry with him or wear on the user, such as wearable watches, wearable glasses, and wearable bracelets, etc.; correspondingly, the electronic device with weak mobility refers to the device that is relatively fixed in position and usually cannot move with the movement of the user, such as Bluetooth speakers, Bluetooth printers, etc., and the embodiments of the present invention do not impose any restrictions on this.

[0097] For highly mobile electronic devices, since such electronic devices generally move with the movement of the user, the location of such electronic devices can generally be regarded as the location of the user. Therefore, when the device type of the second electronic device is such a highly mobile electronic device, such as Figure 7 As shown in (a), a first threshold with a smaller value can be used as the unlocking distance. For example, the unlocking distance is set to 1 meter. In this way, it can be ensured that the first electronic device is automatically unlocked only when it is within the user's operating range, thereby improving the security of the first electronic device when it is automatically unlocked.

[0098] Accordingly, for electronic devices with low mobility, since such electronic devices are located in relatively fixed positions, they usually cannot move with the movement of the user. Therefore, when the device type of the second electronic device is such an electronic device with low mobility, such as Figure 7As shown in (b) in the figure, a second threshold with a larger value can be used as the unlocking distance. For example, the unlocking distance is set to 15 meters. In this way, after the first electronic device establishes a connection with the second electronic device, when the user moves the first electronic device near the second electronic device, as long as the real-time distance between the two does not exceed 15 meters, the first electronic device can be automatically unlocked and be in an unlocked state. Therefore, the user can avoid the trouble of frequent unlocking when using the first electronic device, thereby improving the user experience.

[0099] It can be seen that in the embodiment of the present invention, when the first electronic device to be unlocked is an electronic device with low mobility, the unlocking distance between the first electronic device and the second electronic device can be appropriately relaxed, and when the first electronic device to be unlocked is an electronic device with high mobility, the unlocking distance between the first electronic device and the second electronic device can be appropriately shortened. In other words, the unlocking distance between the first electronic device and the second electronic device can be adaptively adjusted according to the device type of the first electronic device, eliminating the trouble of frequent manual unlocking when the user carries the first electronic device near the second electronic device with low mobility, and at the same time reducing the risk of information leakage caused by excessive unlocking distance when the first electronic device is connected to the second electronic device with high mobility.

[0100] 404. When the actual distance between the first electronic device and the second electronic device is less than the unlocking distance, the first electronic device is automatically unlocked.

[0101] The specific method of automatically unlocking the first electronic device can be found in the related description of the above step 304, so it will not be repeated here.

[0102] In addition, the first electronic device may also determine the unlocking distance in combination with the device type of the second electronic device and the target location of the first electronic device. For example, Figure 8 As shown, the unlocking method provided by the embodiment of the present invention includes:

[0103] 501. A first electronic device establishes a connection with a second electronic device.

[0104] 502. The first electronic device obtains a device type of the second electronic device.

[0105] The specific method for the first electronic device to establish a connection with the second electronic device can refer to the relevant description in step 301, and the specific method for the first electronic device to obtain the device type of the second electronic device can refer to the relevant description in step 402, so it will not be repeated here.

[0106] 503. The first electronic device determines whether the device type of the second electronic device is a device type with strong mobility.

[0107] Exemplarily, when the second electronic device is a wearable device such as a smart watch, smart glasses, a smart bracelet, or a Bluetooth headset, it can be determined that the second electronic device is a device type with strong mobility.

[0108] Correspondingly, when the second electronic device is an additional Bluetooth speaker, a vehicle-mounted device or a desktop computer, it is a device type with low mobility, that is, a device type with relatively weak mobility.

[0109] When it is determined that the second electronic device is a device type with strong mobility, the first electronic device may continue to execute the following steps 504-506; when it is determined that the second electronic device is a device type with weak mobility, the first electronic device may continue to execute the following steps 507-509.

[0110] 504. When the second electronic device is a device type with strong mobility, the first electronic device sets the unlocking distance between itself and the second electronic device to a first threshold.

[0111] In step 504, when the second electronic device is a device type with strong mobility, the first electronic device can use the preset minimum unlocking distance as the first threshold. For example, the first electronic device presets three unlocking distances, namely: 1 meter, 5 meters and 10 meters. Then, when the second electronic device is a device type with strong mobility, the first electronic device can set the unlocking distance: 1 meter as the first threshold.

[0112] In this way, when user A carries the second electronic device and moves near the first electronic device, if the real-time distance between the first electronic device and the second electronic device is less than 1 meter, the first electronic device is still within the operable range of user A, and therefore, the first electronic device can be triggered to automatically unlock, making it convenient for user A to operate the first electronic device. Once it is detected that the real-time distance between the first electronic device and the second electronic device is greater than or equal to 1 meter, the first electronic device will not be triggered to automatically unlock. At this time, the first electronic device is no longer within the operable range of user A, but because the first electronic device is in a locked state, users who do not have the operation authority of the first electronic device cannot operate the first electronic device, thereby improving the information security in the first electronic device.

[0113] 505. The first electronic device obtains its current target location.

[0114] 506. The first electronic device adjusts the first threshold according to the target position.

[0115] In steps 505-506, the first electronic device may further obtain its current target location and adjust the first threshold according to the security level of the first electronic device at the target location. The method for the first electronic device to obtain its current target location can be found in the description of step 302 above, so it will not be repeated here.

[0116] Exemplarily, the first electronic device obtains that the current target location is the first preset area with the highest security level, for example, the home of user A. Then, the first electronic device can increase the value of the above-mentioned first threshold, for example, adjust the current unlocking distance of 1 meter to the unlocking distance of 10 meters. In this way, when user A connects the first electronic device and the second electronic device at home, when the real-time distance between the two is less than 10 meters, the first electronic device can be automatically unlocked, so that the first electronic device can ensure its information security while avoiding the trouble of the user frequently performing unlocking operations.

[0117] For another example, the first electronic device obtains that the current target location is a second preset area with a general security level, for example, in the company of user A. Then, since the security level of the target location is between the highest level and the lowest level, the first electronic device can appropriately increase the value of the above-mentioned first threshold, but the increase in the first threshold at this time should be less than the increase when the above-mentioned first electronic device is located in the home of user A. For example, the first electronic device can adjust the current unlocking distance of 1 meter to an unlocking distance of 5 meters. In this way, when user A connects the first electronic device and the second electronic device in the company, when the real-time distance between the two is less than 5 meters, it means that the first electronic device is in a relatively safe environment, so the first electronic device can be triggered to automatically unlock, eliminating the trouble of the user frequently performing unlocking operations; when the real-time distance between the two is greater than or equal to 5 meters, it means that the security risk of the environment where the first electronic device is located increases. At this time, the first electronic device will not be triggered to automatically unlock, avoiding users who do not have the operating authority of the first electronic device from using the first electronic device, thereby improving the information security in the first electronic device.

[0118] For another example, the first electronic device obtains that the current target location is the third preset area with the lowest security level, for example, a fast food restaurant, that is, the current security risk of the first electronic device is relatively high. Then, since the above-mentioned first threshold has been set to the unlocking distance with the smallest value in step 504, the first electronic device can still maintain the first threshold at this time. In other words, when the real-time distance between the first electronic device and the second electronic device is less than 1 meter, the first electronic device can be triggered to automatically unlock, which is convenient for user A to operate the first electronic device. Once it is detected that the real-time distance between the first electronic device and the second electronic device is greater than or equal to 1 meter, the first electronic device will not be triggered to automatically unlock, so as to prevent users who do not have the operating authority of the first electronic device from operating the first electronic device, thereby improving the information security in the first electronic device.

[0119] 507. When the second electronic device is a device type with relatively low mobility, the first electronic device sets the unlocking distance between itself and the second electronic device to a second threshold value, where the second threshold value is greater than the first threshold value.

[0120] In step 507, when the second electronic device is a device type with low mobility, the first electronic device can use the preset maximum unlocking distance as the second threshold. For example, the first electronic device can set the unlocking distance: 10 meters as the second threshold. Alternatively, it can also be set that when the first electronic device and the second electronic device are in a connected state, the first electronic device can be triggered to automatically unlock, that is, the second threshold is the maximum connection distance when the first electronic device and the second electronic device are connected.

[0121] In this way, when user A carries the first electronic device and moves near the second electronic device, the first electronic device can be automatically unlocked within 10 meters of the second electronic device, reducing the trouble of the user frequently unlocking the first electronic device due to the immobility of the second electronic device. When the first electronic device is more than 10 meters away from the second electronic device, it can be considered that the security risk of the current environment of the first electronic device is high, so the first electronic device will not be triggered to automatically unlock, so as to ensure the information security of the first electronic device.

[0122] 508. The first electronic device obtains its current target location.

[0123] 509. The first electronic device adjusts the second threshold according to the target position.

[0124] In steps 508-509, the first electronic device may further obtain its current target location, and adjust the second threshold according to the security level of the first electronic device at the target location.

[0125] Exemplarily, if the first electronic device obtains that the current target location is the first preset area with the highest security level, for example, the home of user A. Then, since the second threshold has been set to the unlocking distance with the largest value in step 507, the first electronic device can still maintain the second threshold at this time. That is to say, when the real-time distance between the first electronic device and the second electronic device is less than 10 meters, the first electronic device can be triggered to automatically unlock, which is convenient for user A to operate the first electronic device. Once it is detected that the real-time distance between the first electronic device and the second electronic device is greater than or equal to 10 meters, the first electronic device will not be triggered to automatically unlock, so as to prevent users who do not have the operating authority of the first electronic device from operating the first electronic device, thereby improving the information security in the first electronic device.

[0126] For another example, if the first electronic device obtains that the current target location is a second preset area with a general security level, for example, inside the company of user A. Then, the first electronic device can reduce the value of the above-mentioned second threshold to any value between the above-mentioned first threshold and the second threshold. For example, the current unlocking distance of 10 meters is adjusted to an unlocking distance of 5 meters. In this way, when user A connects the first electronic device and the second electronic device in the company, when the real-time distance between the two is less than 5 meters, it means that the first electronic device is in a relatively safe environment. Therefore, the first electronic device can be triggered to automatically unlock, eliminating the trouble of the user frequently performing unlocking operations; when the real-time distance between the two is greater than or equal to 5 meters, it means that the security risk of the first electronic device in the company increases. At this time, the first electronic device will not be triggered to automatically unlock, preventing users who do not have the operating authority of the first electronic device from using the first electronic device, thereby improving the information security in the first electronic device.

[0127] For another example, if the first electronic device obtains that the current target location is the third preset area with the lowest security level, for example, a fast food restaurant, that is, the current security risk of the first electronic device is high. Then, the first electronic device can adjust the value of the second threshold to the unlocking distance with the smallest value, for example, adjust the current unlocking distance of 10 meters to an unlocking distance of 1 meter. In this way, when user A connects the first electronic device and the second electronic device in the fast food restaurant, the first electronic device will be triggered to automatically unlock only when the real-time distance between the first electronic device and the second electronic device is less than 1 meter; otherwise, in order to prevent users who do not have the operation authority of the first electronic device from using the first electronic device, the first electronic device will not be triggered to automatically unlock.

[0128] It can be seen that the unlocking method provided in the embodiment of the present invention can set different unlocking distances for the first electronic device in different application scenarios according to the target position of the main control device (i.e., the first electronic device) and the device type of the slave device (i.e., the second electronic device), so that the first electronic device can be automatically unlocked in a relatively safe environment, eliminating the trouble of users frequently performing unlocking operations; and maintaining a locked state in an environment with greater security risks, preventing users who do not have the operating authority of the first electronic device from using the first electronic device, thereby improving the information security in the first electronic device.

[0129] In addition, the first electronic device also provides the user with a setting interface for the automatic unlocking function. Fig. 9 As shown, the user can manually enable the function of unlocking the first electronic device through the second electronic device; for another example, the user can add one or more electronic devices for unlocking the first electronic device; for another example, for different electronic devices added by the user, the user can manually set their unlocking distances, and for different application scenarios, the user can also set the unlocking distance in each application scenario. The embodiments of the present invention do not impose any restrictions on this.

[0130] It is understandable that, in order to realize the above functions, the above-mentioned electronic devices, etc. include hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the embodiments of the present invention can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware 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 to exceed the scope of the embodiments of the present invention.

[0131] The embodiment of the present invention can divide the functional modules of the above-mentioned electronic device etc. according to the above-mentioned method example. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one processing module. The above-mentioned integrated module can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present invention is schematic and is only a logical function division. There may be other division methods in actual implementation.

[0132] In the case of dividing each functional module into corresponding functional modules, Fig.10A possible structural diagram of an electronic device involved in the above embodiment (for example, the above first electronic device or the second electronic device) is shown, and the electronic device includes: an acquisition unit 1101, a determination unit 1102, an unlocking unit 1103, an adjustment unit 1104 and a communication unit 1105.

[0133] The acquisition unit 1101 is used to support the electronic device to execute Figure 3 In process 302, Figure 6 In the process 402, Figure 8 502, 505 and 508 in the determination unit 1102 is used to support the electronic device to execute Figure 3 In process 303, Figure 6 In the process 403, Figure 8 The unlocking unit 1103 is used to support the electronic device to execute Figure 3 In process 304, Figure 6 The adjustment unit 1104 is used to support the electronic device to perform Figure 8 The communication unit 1105 is used to support the electronic device to execute Figure 3 In process 301, Figure 6 The process 401 and Figure 8 The process 501 in the above method embodiment. All relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module, which will not be repeated here.

[0134] In the case of an integrated unit, Fig.11 A possible structural diagram of an electronic device (e.g., the first electronic device or the second electronic device) involved in the above embodiment is shown. The electronic device includes: a processing module 1302 and a communication module 1303. The processing module 1302 is used to control and manage the actions of the electronic device. The communication module 1303 is used to support the communication between the UE and other network entities. The electronic device may also include a storage module 1301 for storing program codes and data of the electronic device.

[0135] Among them, the processing module 1302 can be a processor or a controller, for example, a central processing unit (CPU), a general processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. It can implement or execute various exemplary logic boxes, modules and circuits described in conjunction with the disclosure of the present invention. The processor can also be a combination that implements a computing function, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and the like. The communication module 1303 can be a transceiver, a transceiver circuit or a communication interface, etc. The storage module 1301 can be a memory.

[0136] When the processing module 1302 is a processor, the communication module 1303 is an RF transceiver circuit, and the storage module 1301 is a memory, the electronic device provided in the embodiment of the present invention can be Figure 2 A mobile phone 100 is shown.

[0137] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using a software program, it can appear in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD) or a semiconductor medium (e.g., a solid-state hard disk Solid State Disk (SSD)), etc.

[0138] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application shall be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

Claims

1. An unlocking method, characterized in that: include: A first electronic device is connected to a second electronic device, the type of the second electronic device is the first type, and when the actual distance between the first electronic device and the second electronic device is less than a first threshold, the first electronic device is automatically unlocked according to the authentication method, and the first threshold is the unlocking distance between the first electronic device and the second electronic device; or The first electronic device is connected to a third electronic device, the type of the third electronic device is the second type, and when the actual distance between the first electronic device and the third electronic device is less than a second threshold, the first electronic device is automatically unlocked according to the authentication method, and the second threshold is the unlocking distance between the first electronic device and the third electronic device; The second threshold is greater than the first threshold, the mobility of the second electronic device is higher than the mobility of the third electronic device, and the authentication method is used to authenticate a user identity.

2. The method according to claim 1, characterized in that: The authentication method includes a user's fingerprint.

3. The method according to claim 2, characterized in that The fingerprint includes a partial fingerprint of the user.

4. The method according to any one of claims 1 to 3, characterized in that The method further comprises: The first electronic device acquires a target location where the first electronic device is located; The first electronic device adjusts the unlocking distance according to the target position.

5. The method according to claim 4, characterized in that The first electronic device adjusting the unlocking distance according to the target position includes: When the target position is located in a first preset area, the first electronic device increases the unlocking distance; When the target position is located in a second preset area, the first electronic device reduces the unlocking distance, wherein a security level of the first electronic device in the first preset area is higher than a security level of the first electronic device in the second preset area.

6. The method according to any one of claims 1 to 3, characterized in that The unlocking distance is used to indicate the preset target signal strength; When the actual distance between the first electronic device and the second electronic device is less than the unlocking distance, the first electronic device is automatically unlocked according to the authentication method, including: The first electronic device acquires the real-time signal strength between the first electronic device and the second electronic device; When the real-time signal strength is greater than the target signal strength, the first electronic device is automatically unlocked according to the authentication method.

7. The method according to claim 4, characterized in that The unlocking distance is used to indicate the preset target signal strength; When the actual distance between the first electronic device and the second electronic device is less than the unlocking distance, the first electronic device is automatically unlocked according to the authentication method, including: The first electronic device acquires the real-time signal strength between the first electronic device and the second electronic device; When the real-time signal strength is greater than the target signal strength, the first electronic device is automatically unlocked according to the authentication method.

8. The method according to claim 5, characterized in that The unlocking distance is used to indicate the preset target signal strength; When the actual distance between the first electronic device and the second electronic device is less than the unlocking distance, the first electronic device is automatically unlocked according to the authentication method, including: The first electronic device acquires the real-time signal strength between the first electronic device and the second electronic device; When the real-time signal strength is greater than the target signal strength, the first electronic device is automatically unlocked according to the authentication method.

9. The method according to any one of claims 1 to 3, characterized in that: The unlocking distance is used to indicate the preset target signal strength; When the actual distance between the first electronic device and the third electronic device is less than the unlocking distance, the first electronic device is automatically unlocked according to the authentication method, including: The first electronic device acquires the real-time signal strength between the first electronic device and the third electronic device; When the real-time signal strength is greater than the target signal strength, the first electronic device is automatically unlocked according to the authentication method.

10. The method according to claim 4, characterized in that The unlocking distance is used to indicate the preset target signal strength; When the actual distance between the first electronic device and the third electronic device is less than the unlocking distance, the first electronic device is automatically unlocked according to the authentication method, including: The first electronic device acquires the real-time signal strength between the first electronic device and the third electronic device; When the real-time signal strength is greater than the target signal strength, the first electronic device is automatically unlocked according to the authentication method.

11. The method according to claim 5, characterized in that The unlocking distance is used to indicate the preset target signal strength; When the actual distance between the first electronic device and the third electronic device is less than the unlocking distance, the first electronic device is automatically unlocked according to the authentication method, including: The first electronic device acquires the real-time signal strength between the first electronic device and the third electronic device; When the real-time signal strength is greater than the target signal strength, the first electronic device is automatically unlocked according to the authentication method.

12. An electronic device, characterized in that: include: an acquiring unit, configured to acquire a type of a second electronic device connected to the electronic device, the type of the second electronic device being the first type, and to acquire a type of a third electronic device connected to the electronic device, the type of the third electronic device being the second type; a determining unit, configured to determine an unlocking distance between the electronic device and the second electronic device as a first threshold, and to determine an unlocking distance between the electronic device and the third electronic device as a second threshold; an unlocking unit, configured to automatically unlock the electronic device according to the authentication method when the actual distance between the electronic device and the second electronic device is less than the first threshold, and to automatically unlock the electronic device according to the authentication method when the actual distance between the electronic device and the third electronic device is less than the second threshold; The second threshold is greater than the first threshold, the mobility of the second electronic device is higher than the mobility of the third electronic device, and the authentication method is used to authenticate the identity of the user.

13. The electronic device according to claim 12, characterized in that: The authentication method includes a user's fingerprint.

14. The electronic device according to claim 13, characterized in that: The fingerprint includes a partial fingerprint of the user.

15. The electronic device according to any one of claims 12 to 14, characterized in that: The electronic device further comprises an adjustment unit, The acquisition unit is further used to acquire the target position of the electronic device; The adjustment unit is used to adjust the unlocking distance according to the target position.

16. The electronic device according to claim 15, characterized in that: The adjustment unit is specifically used for: When the target position is located in a first preset area, the unlocking distance is increased; when the target position is located in a second preset area, the unlocking distance is reduced, wherein the security level of the electronic device in the first preset area is higher than the security level of the electronic device in the second preset area.

17. The electronic device according to any one of claims 12 to 14, characterized in that: The unlocking distance is used to indicate the preset target signal strength; The acquisition unit is further used to acquire the real-time signal strength between the second electronic device and the second electronic device; The unlocking unit is further configured to automatically unlock the device according to an authentication method when the real-time signal strength is greater than the target signal strength.

18. The electronic device according to claim 15, characterized in that: The unlocking distance is used to indicate the preset target signal strength; The acquisition unit is further used to acquire the real-time signal strength between the second electronic device and the second electronic device; The unlocking unit is further configured to automatically unlock the device according to an authentication method when the real-time signal strength is greater than the target signal strength.

19. The electronic device according to claim 16, characterized in that: The unlocking distance is used to indicate the preset target signal strength; The acquisition unit is further used to acquire the real-time signal strength between the second electronic device and the second electronic device; The unlocking unit is further configured to automatically unlock the device according to an authentication method when the real-time signal strength is greater than the target signal strength.

20. The electronic device according to any one of claims 12 to 14, characterized in that: The unlocking distance is used to indicate the preset target signal strength; The acquisition unit is further used to acquire the real-time signal strength between the third electronic device and the third electronic device; The unlocking unit is further configured to automatically unlock the device according to an authentication method when the real-time signal strength is greater than the target signal strength.

21. The electronic device according to claim 15, characterized in that: The unlocking distance is used to indicate the preset target signal strength; The acquisition unit is further used to acquire the real-time signal strength between the third electronic device and the third electronic device; The unlocking unit is further configured to automatically unlock the device according to an authentication method when the real-time signal strength is greater than the target signal strength.

22. The electronic device according to claim 16, characterized in that: The unlocking distance is used to indicate the preset target signal strength; The acquisition unit is further used to acquire the real-time signal strength between the third electronic device and the third electronic device; The unlocking unit is further configured to automatically unlock the device according to an authentication method when the real-time signal strength is greater than the target signal strength.

23. An electronic device, characterized in that: include: Processors, memories, buses, and communication interfaces; The memory is used to store computer-executable instructions, and the processor is connected to the memory via the bus. When the electronic device is running, the processor executes the computer-executable instructions stored in the memory, so that the electronic device executes the unlocking method as described in any one of claims 1-11.

24. A computer-readable storage medium having instructions stored therein, characterized in that: When the instruction is executed on an electronic device, the electronic device executes the unlocking method as claimed in any one of claims 1 to 11.

Citation Information

Patent Citations

  • Method and system for unlocking mobile terminal, mobile terminal and wearable electronic device

    CN103647587A

  • Intelligent terminal unlocking method and intelligent terminal

    CN104090710A

  • Method and system for automatic short-distance unlocking of mobile terminal

    CN104092817A

  • Wireless sound equipment

    CN104717582A

  • Device and method for achieving rapid unlocking

    CN105872255A