Disclosure of Invention
The embodiment of the invention provides an unlocking method, electronic equipment and a computer readable storage medium, which can automatically adjust the automatic unlocking safety distance of the electronic equipment under different use scenes and reduce the safety risk of leakage of user privacy.
In order to achieve the above purpose, the embodiment of the present invention adopts the following technical scheme:
In a first aspect, an embodiment of the present invention provides an unlocking method, including: when the first electronic equipment and the second electronic equipment are in a connection state, the first electronic equipment acquires the equipment type of the second electronic equipment; 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; and when the actual distance between the first electronic device and the second electronic device is smaller than the unlocking distance, the first electronic device automatically unlocks. Therefore, the first electronic device can adjust the unlocking distance of the automatic unlocking according to the device type of the second electronic device connected with the first electronic device under different use scenes, and the problem of potential safety hazards of user privacy leakage caused by the fact that the unlocking distance is set too far is avoided.
In one possible design method, the first electronic device determines an unlocking distance between the first electronic device and the second electronic device according to a 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 value as an 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 value as an unlocking distance between the first electronic device and the second electronic device, the second threshold value is larger than the first threshold value, and the mobility of the first type electronic device is higher than that of the second type electronic device.
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 weaker mobility, the unlocking distance between the first electronic device and the second electronic device may be properly relaxed, and when the first electronic device to be unlocked is an electronic device with stronger mobility, the unlocking distance between the first electronic device and the second electronic device may be properly shortened. That is, 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, so that the trouble that a user needs to unlock frequently and manually when carrying the first electronic device nearby the second electronic device with weak mobility is avoided, and meanwhile, the risk of information leakage caused by overlarge unlocking distance when the first electronic device is connected with the second electronic device with strong mobility is reduced.
In one 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, the method further includes: the method comprises the steps that a first electronic device obtains a target position where the first electronic device is located; the first electronic device adjusts the unlocking distance according to the target position.
In one 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 equipment 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 that of the first electronic device in the second preset area.
In this way, according to the target position of the master 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 under different application scenes, so that the first electronic device can realize automatic unlocking in a relatively safe environment, and the trouble that a user frequently executes unlocking operation is avoided; and the locking state is kept in an environment with larger safety risk, so that a user without the operation authority of the first electronic equipment is prevented from using the first electronic equipment, and the information safety in the first electronic equipment is improved.
In one possible design method, the unlocking distance is used to indicate a preset target signal strength; when the actual distance between the first electronic device and the second electronic device is smaller than the unlocking distance, the first electronic device automatically unlocks, and the method comprises the following steps: the method comprises the steps that a first electronic device obtains real-time signal intensity with a second electronic device; and when the real-time signal strength is greater than the target signal strength, the first electronic equipment is automatically unlocked.
In a second aspect, an embodiment of the present invention provides an unlocking method, including: when the first electronic equipment and the second electronic equipment are in a connection state, the first electronic equipment acquires a target position where the first electronic equipment is located; the first electronic device determines an unlocking distance between the first electronic device and the second electronic device according to the target position; and when the actual distance between the first electronic device and the second electronic device is smaller than the unlocking distance, the first electronic device automatically unlocks.
In one possible design method, the first electronic device determines an unlocking distance between the first electronic device and the second electronic device according to 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 an 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 a second preset value as an unlocking distance between the first electronic device and the second electronic device, wherein the security level of the first electronic device in the first preset area is higher than that of the first electronic device in the second preset area, and the first preset value is larger than the second preset value.
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 properly widened, 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 properly shortened. Therefore, the unlocking distance between the first electronic equipment and the second electronic equipment can be adaptively adjusted according to the position of the first electronic equipment, the trouble that a user frequently and manually unlocks the electronic equipment in a place with a higher security level is avoided, and meanwhile the risk that the electronic equipment is leaked due to automatic unlocking in a place with a lower security level is reduced.
In one possible design method, the unlocking distance is used to indicate a preset target signal strength; when the actual distance between the first electronic device and the second electronic device is smaller than the unlocking distance, the first electronic device automatically unlocks, and the method comprises the following steps: the method comprises the steps that a first electronic device obtains real-time signal intensity with a second electronic device; and when the real-time signal strength is greater than the target signal strength, the first electronic equipment is automatically unlocked.
In a third aspect, an embodiment of the present invention provides an electronic device, including: an acquisition unit configured to: when the electronic equipment and another electronic equipment are in a connection state, acquiring the equipment type of the other electronic equipment; a determining unit configured to: determining an unlocking distance between the electronic equipment and the other electronic equipment according to the equipment type of the other electronic equipment; an unlocking unit for: and when the actual distance between the electronic equipment and the other electronic equipment is smaller than the unlocking distance, automatically unlocking.
In one possible design method, the determining unit is specifically configured to: when the device type of the other electronic device is the first type, determining a first threshold value as an unlocking distance between the electronic device and the other electronic device; and when the equipment type of the other electronic equipment is a second type, determining a second threshold value as an unlocking distance between the electronic equipment and the other electronic equipment, wherein the second threshold value is larger than the first threshold value, and the mobility of the electronic equipment of the first type is higher than that of the electronic equipment of the second type.
In one possible design method, the electronic device further includes an adjusting unit, and the acquiring unit is further configured to: acquiring a target position of the electronic equipment; the adjusting unit is used for: and adjusting the unlocking distance according to the target position.
In one possible design method, the adjusting unit is specifically configured to: when the target position is located in a first preset area, increasing the unlocking distance; and when the target position is positioned in a second preset area, reducing the unlocking distance, wherein the security level of the electronic equipment in the first preset area is higher than that of the electronic equipment in the second preset area.
In one possible design method, the unlocking distance is used to indicate a preset target signal strength; the acquisition unit is further configured to: acquiring the real-time signal intensity between the electronic device and the other electronic device; the unlocking unit is specifically used for: and when the real-time signal strength is greater than the target signal strength, automatically unlocking.
In a fourth aspect, an embodiment of the present invention provides an electronic device, including: an acquisition unit configured to: when the electronic equipment and another electronic equipment are in a connection state, acquiring a target position of the electronic equipment; a determining unit configured to: determining an unlocking distance between the electronic equipment and the other electronic equipment according to the target position; an unlocking unit for: and when the actual distance between the electronic equipment and the other electronic equipment is smaller than the unlocking distance, automatically unlocking.
In one possible design method, the determining unit is specifically configured to: when the target position is located in a first preset area, determining a first preset value as an unlocking distance between the electronic equipment and the other electronic equipment; when the target position is located in a second preset area, determining a second preset value as an unlocking distance between the electronic equipment and the other electronic equipment, wherein the security level of the electronic equipment in the first preset area is higher than that of the electronic equipment in the second preset area, and the first preset value is larger than the second preset value.
In one possible design method, the unlocking distance is used to indicate a preset target signal strength; the acquisition unit is further configured to: acquiring the real-time signal intensity between the electronic device and the other electronic device; the unlocking unit is specifically used for: and when the real-time signal strength is greater than the target signal strength, automatically unlocking.
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, including: a processor, a memory, a bus, and a communication interface; the memory is used for storing computer execution instructions, the processor is connected with the memory through the bus, and when the electronic equipment runs, the processor executes the computer execution instructions stored in the memory so as to enable the electronic equipment to execute any unlocking method.
In a sixth aspect, embodiments of the present invention provide a computer-readable storage medium having instructions stored therein that, when executed on any one of the above-described electronic devices, cause the electronic device to perform any one of the above-described unlocking methods.
In a seventh aspect, embodiments of the present invention provide a computer program product comprising instructions that, when run on any of the above-described electronic devices, cause the electronic devices to perform any of the above-described unlocking methods.
In the embodiment of the present invention, the names of the electronic devices are not limited to the devices themselves, and in actual implementation, the devices may appear under other names. Insofar as the function of the respective devices is similar to that of the embodiments of the present invention, it is within the scope of the claims of the present invention and the equivalents thereof.
In addition, the technical effects of any one of the design manners of the second aspect to the seventh aspect may be referred to as the technical effects of the different design manners of the first aspect, which are not described herein.
Detailed Description
The terms "first" and "second" are used below for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include one or more such feature. In the description of the embodiments of the present invention, unless otherwise indicated, the meaning of "a plurality" is two or more.
The embodiment of the present invention provides an unlocking method, as shown in fig. 1, after a master device (for example, a first electronic device 21) establishes a communication connection with a slave device (for example, a second electronic device 22), the first electronic device may automatically adjust an unlocking distance between the first electronic device 21 and the second electronic device 22 according to a device type of the second electronic device 22 and/or parameters such as a geographic location where the first electronic device 21 is located. For example, when the device type of the second electronic device 22 is a wearable device such as a watch, since the user will wear the second electronic device 22 with his/her body, the unlocking distance between the first electronic device 21 and the second electronic device 22 may be set to be close to 1 meter, so that when the actual distance between the first electronic device 21 and the second electronic device 22 is less than 1 meter, i.e. the first electronic device 21 is within the controllable distance of the user, the first electronic device 21 is triggered to be automatically unlocked, thereby reducing the security risk that the privacy of the user is compromised.
For another example, when the first electronic device 21 is located at a user residence, since the security level of the first electronic device 21 is generally higher when the first electronic device 21 is located at the user residence, the unlocking distance between the first electronic device 21 and the second electronic device 22 may be set to be longer, for example, 10 meters, so that when the user walks with the first electronic device 21 at home, the first electronic device 21 can be automatically unlocked to be in an unlocking state as long as the actual distance between the first electronic device 21 and the second electronic device 22 is less than 10 meters, and the user does not need to frequently trigger the unlocking operation.
It can be seen that in the embodiment of the invention, the first electronic device can adjust the unlocking distance of automatic unlocking according to parameters such as device type and/or geographic position under different use scenes, so that the potential safety hazard of user privacy leakage caused by too far unlocking distance is avoided, and the problem of frequent unlocking caused by too near unlocking distance is avoided, and the information safety is ensured while the user experience is improved.
The unlocking method provided by the embodiment of the invention can be applied to any electronic equipment such as a mobile phone, a wearable device, an AR (augmented reality) \VR (virtual reality) device, a tablet personal computer, a notebook computer, a UMPC (ultra mobile personal computer), a netbook, a PDA (personal digital assistant) and the like, and the embodiment of the invention is not limited in any way.
As shown in fig. 2, the electronic device in the embodiment of the present application may be a mobile phone 100. The following describes embodiments of the mobile phone 100. It should be understood that the illustrated handset 100 is only one example of an electronic device, and that the handset 100 may have more or fewer components than shown in the figures, may combine two or more components, or may have a different configuration of components.
As shown in fig. 2, the mobile phone 100 may specifically include: processor 101, radio Frequency (RF) circuitry 102, memory 103, touch screen 104, bluetooth device 105, one or more sensors 106, wi-Fi device 107, positioning device 108, audio circuitry 109, peripheral interface 110, power system 111, and the like. The components may communicate via one or more communication buses or signal lines (not shown in fig. 2). Those skilled in the art will appreciate that the hardware configuration shown in fig. 2 is not limiting of the handset, and that the handset 100 may include more or fewer components than shown, or may combine certain components, or a different arrangement of components.
The various components of the handset 100 are described in detail below in conjunction with fig. 2:
the processor 101 is a control center of the mobile phone 100, connects various parts of the mobile phone 100 using various interfaces and lines, and performs various functions of the mobile phone 100 and processes data by running or executing an application program (hereinafter, may be abbreviated as App) stored in the memory 103, and calling data stored in the memory 103. In some embodiments, processor 101 may include one or more processing units; for example, the processor 101 may be a kylin 960 chip manufactured by Hua technology Co., ltd.
The radio frequency circuit 102 may be used for receiving and transmitting wireless signals during a message or call. Specifically, the rf circuit 102 may receive downlink data of the base station and then process the downlink data for the processor 101; in addition, data relating to uplink is transmitted to the base station. Typically, the radio frequency circuitry includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, the radio frequency circuitry 102 may also communicate with other devices via wireless communications. The wireless communication may use any communication standard or protocol including, but not limited to, 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, and the like.
The memory 103 is used to store application programs and data, and the processor 101 executes various functions and data processing of the mobile phone 100 by running the application programs and data stored in the memory 103. The memory 103 mainly includes a storage program area and a storage data area, wherein the storage program area can store an operating system, an application program (such as a sound playing function, an image playing function, etc.) required by at least one function; the storage data area may store data (such as audio data, phonebooks, etc.) created according to the use of the handset 100. In addition, memory 103 may include high-speed random access memory, and may also include nonvolatile memory, such as magnetic disk storage devices, flash memory devices, or other volatile solid state memory devices, among others. The memory 103 may store various operating systems, for example, iOS operating systems developed by apple corporation, android operating systems developed by google corporation, and the like.
The touch screen 104 may include a touch pad 104-1 and a display 104-2. The touch pad 104-1 may collect touch events on or near the user of the mobile phone 100 (e.g., the user's operation on the touch pad 104-1 or near the touch pad 104-1 using any suitable object such as a finger, a stylus, etc.), and send the collected touch information to other devices such as the processor 101. Although in fig. 2 the touch pad 104-1 and the display 104-2 are shown as two separate components to implement the input and output functions of the mobile phone 100, in some embodiments the touch pad 104-1 may be integrated with the display 104-2 to implement the input and output functions of the mobile phone 100. It is understood that the touch screen 104 is formed by stacking multiple layers of materials, only the touch pad (layer) and the display screen (layer) are shown in the embodiment of the present application, and other layers are not described in the embodiment of the present application. In addition, in other embodiments of the present application, the touch pad 104-1 may cover the display 104-2, and the size of the touch pad 104-1 is larger than that of the display 104-2, so that the display 104-2 is covered under the touch pad 104-1 entirely, or the touch pad 104-1 may be configured on the front surface of the mobile phone 100 in a full panel manner, that is, the touch of the user on the front surface of the mobile phone 100 can be perceived by the mobile phone, so that the full touch experience on the front surface of the mobile phone can be realized. In other embodiments, the touch pad 104-1 is configured on the front of the mobile phone 100 in a full-face mode, and the display screen 104-2 is also configured on the front of the mobile phone 100 in a full-face mode, so that a frame-free structure can be realized on the front of the mobile phone.
In the embodiment of the present application, the mobile phone 100 may also have a fingerprint recognition function. For example, the fingerprint identifier 112 may be configured on the back side of the mobile phone 100 (e.g., below the rear camera) or the fingerprint identifier 112 may be configured on the front side of the mobile phone 100 (e.g., below the touch screen 104). For another example, the fingerprint sensing device 112 may be configured in the touch screen 104 to perform the fingerprint recognition function, i.e., the fingerprint sensing device 112 may be integrated with the touch screen 104 to perform the fingerprint recognition function of the mobile phone 100. In this case, the fingerprint acquisition device 112 is disposed in the touch screen 104, may be part of the touch screen 104, or may be otherwise disposed in the touch screen 104. The primary component of the fingerprint acquisition device 112 in embodiments of the present application is a fingerprint sensor that may employ any type of sensing technology, including but not limited to optical, capacitive, piezoelectric, or ultrasonic sensing technologies, and the like.
In an embodiment of the present application, the mobile phone 100 may further include a bluetooth device 105 for enabling data exchange between the mobile phone 100 and other short-range electronic devices (e.g., mobile phone, smart watch, etc.). The Bluetooth device in the embodiment of the application can be an integrated circuit or a Bluetooth chip and the like.
Wi-Fi device 107 is used for providing network access for mobile phone 100 according to Wi-Fi related standard protocol, mobile phone 100 can access to Wi-Fi access point through Wi-Fi device 107, thereby helping user to send and receive e-mail, browse web page and access streaming media, etc., and it provides wireless broadband Internet access for user. In other embodiments, the Wi-Fi device 107 can also act as a Wi-Fi wireless access point, and can provide Wi-Fi network access to other electronic devices.
The handset 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 that may adjust the brightness of the display of the touch screen 104 according to the brightness of ambient light, and a proximity sensor that may turn off the power of the display when the mobile phone 100 moves to the ear. As one of the motion sensors, the accelerometer sensor can detect the acceleration in all directions (generally three axes), and can detect the gravity and direction when stationary, and can be used for applications of recognizing the gesture of a mobile phone (such as horizontal and vertical screen switching, related games, magnetometer gesture calibration), vibration recognition related functions (such as pedometer and knocking), and the like; other sensors such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc. that may be configured with the mobile phone 100 are not described herein.
Positioning device 108 is configured to provide a geographic location for handset 100. It is understood that the positioning device 108 may be a receiver of a Global Positioning System (GPS) or a positioning system such as a Beidou satellite navigation system, russian GLONASS, etc. After receiving the geographic position sent by the positioning system, the positioning device 108 sends the information to the processor 101 for processing, or sends the information to the memory 103 for storage. In other embodiments, the positioning device 108 may also be a receiver of an assisted global satellite positioning system (AGPS) that assists the positioning device 108 in performing ranging and positioning services by acting as an assistance server, in which case the assistance server provides positioning assistance by communicating with the positioning device 108 (i.e., GPS receiver) of an electronic device, such as the handset 100, via a wireless communication network. In other embodiments, the positioning device 108 may also be Wi-Fi access point based positioning technology. Because each Wi-Fi access point has a globally unique MAC address, the electronic equipment can scan and collect broadcast signals of surrounding Wi-Fi access points under the condition of starting Wi-Fi, so that the MAC address broadcasted by the Wi-Fi access point can be obtained; the electronic device sends the data (such as MAC address) capable of indicating Wi-Fi access points to the location server through the wireless communication network, the location server retrieves the geographic location of each Wi-Fi access point, and combines the intensity of Wi-Fi broadcast signals to calculate the geographic location of the electronic device and send the geographic location to the positioning device 108 of the electronic device.
The audio circuit 109, speaker 113, microphone 114 may provide an audio interface between the user and the handset 100. The audio circuit 109 may transmit the received electrical signal converted from audio data to the speaker 113, and convert the electrical signal into a sound signal by the speaker 113 and output the sound signal; on the other hand, the microphone 114 converts the collected sound signals into electrical signals, which are received by the audio circuit 109 and converted into audio data, which are output to the RF circuit 102 for transmission to, for example, another cellular phone, or to the memory 103 for further processing.
The peripheral interface 110 is used to provide various interfaces for external input/output devices (e.g., keyboard, mouse, external display, external memory, user identification module card, etc.). For example, a Universal Serial Bus (USB) interface, and a Subscriber Identity Module (SIM) card provided by a telecommunications carrier via metal contacts on a card slot of the SIM card. Peripheral interface 110 may be used to couple the external input/output peripherals described above to processor 101 and memory 103.
The mobile phone 100 may further include a power supply device 111 (such as a battery and a power management chip) for supplying power to each component, and the battery may be logically connected to the processor 101 through the power management chip, so that functions of managing charging, discharging, power consumption management, and the like are implemented through the power supply device 111.
Although not shown in fig. 2, the mobile phone 100 may further 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 herein.
In the following, a specific embodiment will be described in detail to provide an unlocking method according to an embodiment of the present invention, as shown in fig. 3, including:
301. the first electronic device establishes a connection with the second electronic device.
Specifically, the first electronic device may establish communication connection with the second electronic device through any wireless communication manner, for example, the wireless communication manner may be specifically a bluetooth, infrared, Z-Wave, zigBee (ZigBee), wi-Fi, or NFC manner, which is not limited in the embodiment of the present invention.
Taking bluetooth connection as an example, a master control device (i.e., a first electronic device) initiating connection may discover peripheral bluetooth devices (i.e., a second electronic device) through paging (page), and after the first electronic device discovers the second electronic device, a bluetooth physical link (Asynchronous Connectionless Link, ACL) may be established through a pairing (paring) process, so as to implement communication connection between the first electronic device and the second electronic device.
Further, the first electronic device may further respond to the operation of the user and add the second electronic device as a trusted device of the first electronic device, so that when the subsequent first electronic device detects the bluetooth signal of the second electronic device again, bluetooth connection may be directly established with the second electronic device.
302. The first electronic device obtains a target position where the first electronic device is located.
Optionally, the first electronic device may acquire the target position where the current first electronic device is located through any positioning device, for example, the positioning device may specifically be a receiver of a Global Positioning System (GPS) or a positioning system such as a beidou satellite navigation system, russian GLONASS, or the like; or the positioning device may also be a receiver of an Assisted Global Positioning System (AGPS); or the positioning device may be a Wi-Fi access point-based positioning technology, which is not limited in any way by the embodiment of the present invention.
Or the first electronic device can also determine the current target position of the first electronic device according to the current connected Wi-Fi or IP address. For example, user a sets the name of Wi-Fi in the home to "abc", then when detecting that the first electronic device is connected to a wireless local area network named "abc", the first electronic device may determine that the target location where it is located is user a's home.
Or the first electronic equipment can intelligently learn the current target position of the first electronic equipment according to the past use habit or work and rest habit of the user. For example, the user may be at home at about 8-10 a.m., then if the current time is about 8 a.m., the first electronic device may determine that the target location is at the user's home; for another example, the user goes out 8a day and goes to the company about 8a day and 30 a day, then if the current time is 8a day and 10 a day, the first electronic device may determine that the target location is in a public place on the way to work.
303. And the first electronic device determines the unlocking distance between the first electronic device and the second electronic device according to the target position.
Specifically, one or more preset areas may be preset in the first electronic device, where each preset area has a corresponding security level. For example, as shown in table 1, the user Tom of the first electronic device sets the home of Tom as a preset area with the highest security level, sets the home and company of the friend Amy as a preset area with a general security level, and sets public places such as fast food restaurants as a preset area with the lowest security level. Of course, the security level of each preset area may be determined by the first electronic device after machine learning according to the data such as the usage habit of the user, which is not limited in the embodiment of the present invention.
TABLE 1
| Preset area |
Security level |
| Tom's family |
High height |
| Amy family, co |
In general |
| * Fast food restaurant |
Low and low |
Then, in step 403, when the target location is located in the first preset area, for example, tom's home, since the security level corresponding to the target location is the highest level, that is, when the first electronic device is located in Tom's home, the first electronic device is relatively in a relatively safe state. Therefore, as shown in (a) of fig. 4, the first electronic device may use the first preset value with a larger 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 may be triggered to automatically unlock.
Accordingly, when the target location is located in the second preset area, for example, a fast food restaurant, since the security level corresponding to the target location 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 smaller than the security level at Tom's home, and at this time, the security risk of the first electronic device is greater. Therefore, as shown in (b) of fig. 4, the first electronic device may use a second preset value smaller than the first preset value as the unlock 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.
In addition, if the target position obtained in step 303 does not belong to any preset area, the unlocking distance between the first electronic device and the second electronic device may be set to the value of the unlocking distance when the security level is the lowest, so as to ensure the security of the electronic device.
Of course, the corresponding relationship between different preset areas and corresponding unlocking distances can also be directly set in the first electronic device, for example, when the first electronic device is located at Tom, the corresponding unlocking distance is 10 meters; when the first electronic device is located at home of Amy, the corresponding unlocking distance is 5 meters. Thus, after the target position is obtained, the first electronic device can directly judge the corresponding unlocking distance according to the corresponding relation.
It should be noted that, the corresponding relationship between the preset area and the security level and/or the corresponding relationship between the preset area unlock distance may be set in the first electronic device in a form of a table (e.g. table 1), or may be set in the first electronic device in any other form, which is not limited in the embodiment of the present invention.
It can be seen that, in the embodiment of the present invention, when the first electronic device to be unlocked is in the area with a higher security level, the unlocking distance between the first electronic device and the second electronic device may be properly relaxed, and when the first electronic device to be unlocked is in the area with a lower security level, the unlocking distance between the first electronic device and the second electronic device may be properly shortened. That is, the unlocking distance between the first electronic device and the second electronic device can be adaptively adjusted according to the position of the first electronic device, so that the trouble that a user frequently and manually unlocks the electronic device in a place with a higher security level is avoided, and meanwhile, the risk that information leakage is caused by automatic unlocking of the electronic device in a place with a lower security level is reduced.
304. And when the actual distance between the first electronic equipment and the second electronic equipment is smaller than the unlocking distance, the first electronic equipment is automatically unlocked.
For example, the first electronic device may determine the magnitude relation between the above-mentioned unlock distances according to the signal strength, e.g., RSSI (RECEIVED SIGNAL STRENGTH Indication), with the second electronic device.
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 intensity between the first electronic device and the second electronic device is the target signal intensity. When the first electronic equipment and the second electronic equipment are in a connection state, if the first electronic equipment detects that the real-time signal intensity between the first electronic equipment and the second electronic equipment is larger than the target signal intensity, the fact that the actual distance between the first electronic equipment and the second electronic equipment is smaller than 5 meters at the moment is indicated, and then the first electronic equipment is triggered to be automatically unlocked.
Of course, a corresponding distance sensor may be disposed on the first electronic device, and when the distance sensor detects that the actual distance between the first electronic device and the second electronic device is smaller than the unlocking distance, the first electronic device is triggered to be automatically unlocked.
Specifically, when the actual distance between the first electronic device and the second electronic device is smaller than the unlocking distance, the second electronic device may send authentication information to the first electronic device, where the authentication information may be information unique to each electronic device authenticated by the first electronic device and used for performing identity authentication, for example, a MAC (MEDIA ACCESS Control ) address, or an equipment identifier of each authenticated electronic device, or a preset and stored password, fingerprint, or the like.
Then, after receiving the authentication information, the first electronic device may compare the authentication information with one or more pre-stored authorization authentication information, and after confirming that the authentication information is the pre-stored authorization authentication information, it indicates that the identity of the second electronic device passes the authentication, where the first electronic device may reduce its local management authority, for example, unlock a screen of the first electronic device, unlock an operation authority of one or more applications in the first electronic device, and so on.
In one possible design, as shown in fig. 5 (a), after the first electronic device unlocks the screen, a prompt box may prompt the user that the screen is unlocked. Or as shown in (b) of fig. 5, after the first electronic device unlocks the screen, the user may directly enter the operation interface of the first electronic device, so as to perform corresponding operation on the first electronic device. Still further or as shown in (c) of fig. 5, when the first electronic device may 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 may wake up the screen of the first electronic device through clicking or sliding, and further perform a corresponding operation on the first electronic device.
Of course, those skilled in the art may also set other ways to reduce the local management authority of the first electronic device, which is not limited in any way by the embodiment of the present invention. For example, when the actual distance between the first electronic device and the second electronic device is smaller than the unlocking distance, the fingerprint of the user may still be acquired when the first electronic device is unlocked, but compared to a scenario when the actual distance between the first electronic device and the second electronic device is larger than the unlocking distance, the first electronic device may acquire only a portion of the fingerprint of the user and authenticate the identity of the user according to the acquired portion of the fingerprint, thereby improving the speed of fingerprint unlocking.
In one possible design method, as shown in fig. 6, the unlocking method provided in the embodiment of the present invention includes:
401. the first electronic device establishes a connection with the second electronic device.
The specific manner in which the first electronic device and the second electronic device establish connection may refer to the description related to step 301, and thus will not be described herein.
402. The first electronic device obtains a device type of the second electronic device.
Taking bluetooth connection as an example, identifiers of different device types are set in the bluetooth protocol. For example, the microphone is identified as 1040, the camera is identified as 1072, the wearable earphone is identified as 1028, and the blood pressure device is identified as 230.
Then, after the first electronic device establishes a connection with the second electronic device through the bluetooth protocol, the first electronic device may call the related function to obtain the device type of the second electronic device, for example, send a request for obtaining the device type to the second electronic device through the GETDEVICECLASS () function, and then, the second electronic device returns the identifier of the device type to the first electronic device. Thus, the first electronic device can determine the device type of the second electronic device according to the identifier returned by the second electronic device.
403. And 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.
For example, the unlocking distance between the first electronic device and the second electronic device may be set according to the mobility of the second electronic device. The electronic device with high mobility refers to a device that a user can carry with him or be worn on his body, for example, a wearable watch, wearable glasses, and a wearable bracelet; accordingly, the electronic device with weaker mobility refers to a device where the electronic device is located in a relatively fixed position and generally cannot move along with the movement of the user, for example, a bluetooth speaker, a bluetooth printer, etc., which is not limited in any way by the embodiment of the present invention.
For electronic devices with high mobility, the electronic devices generally move along with the movement of the user, that is, the location of the electronic devices can be generally regarded as the location of the user. Therefore, when the device type of the second electronic device is such an electronic device with relatively high mobility, as shown in (a) of fig. 7, the first threshold value with relatively small value may be used as the unlocking distance, for example, the unlocking distance is set to 1 meter, so that the first electronic device may be triggered to be automatically unlocked only when the first electronic device is within the operable range of the user, thereby improving the security of the first electronic device when the first electronic device is automatically unlocked.
Accordingly, for electronic devices with relatively low mobility, such electronic devices are typically not movable with the movement of the user due to their relatively fixed locations. Therefore, when the device type of the second electronic device is such an electronic device with weaker mobility, as shown in (b) in fig. 7, the second threshold value with a larger value may be used as the unlocking distance, for example, the unlocking distance is set to be 15 meters, so when the first electronic device and the second electronic device are connected, and the user carries the first electronic device to move near the second electronic device, as long as the real-time distance between the first electronic device and the second electronic device is not more than 15 meters, the first electronic device can be automatically unlocked and is in the unlocking state, and when the user uses the first electronic device, the trouble of frequent unlocking can be avoided, and the user experience is improved.
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 weaker mobility, the unlocking distance between the first electronic device and the second electronic device may be properly relaxed, and when the first electronic device to be unlocked is an electronic device with stronger mobility, the unlocking distance between the first electronic device and the second electronic device may be properly shortened. That is, 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, so that the trouble that a user needs to unlock frequently and manually when carrying the first electronic device nearby the second electronic device with weak mobility is avoided, and meanwhile, the risk of information leakage caused by overlarge unlocking distance when the first electronic device is connected with the second electronic device with strong mobility is reduced.
404. And when the actual distance between the first electronic equipment and the second electronic equipment is smaller than the unlocking distance, the first electronic equipment is automatically unlocked.
The specific method for automatically unlocking the first electronic device may be referred to the description of step 304, and thus will not be repeated here.
In addition, the first electronic device may further determine the unlocking distance by combining the device type of the second electronic device and the target position where the first electronic device is located, and as shown in fig. 8, an exemplary unlocking method provided by an embodiment of the present invention includes:
501. the first electronic device establishes a connection with the second electronic device.
502. The first electronic device obtains a device type of the second electronic device.
The specific method for establishing connection between the first electronic device and the second electronic device may refer to the related description in step 301, and the specific method for obtaining the device type of the second electronic device by the first electronic device may refer to the related description in step 402, which is not described herein again.
503. The first electronic device determines whether the device type of the second electronic device is a more mobile device type.
For example, when the second electronic device is a wearable device such as a smart watch, smart glasses, smart wristband, or bluetooth headset, the second electronic device may be determined to be of a device type with higher mobility.
Correspondingly, when the second electronic device is provided with additional Bluetooth sound equipment, vehicle-mounted equipment or a desktop computer, the device type with weak mobility, namely the device type with weak mobility.
When it is determined that the second electronic device is a device type with higher mobility, the first electronic device may continue to perform the following steps 504-506; when it is determined that the second electronic device is of a less mobile device type, the first electronic device may continue to perform steps 507-509 described below.
504. When the second electronic equipment is of a device type with stronger mobility, the first electronic equipment sets the unlocking distance between the second electronic equipment and the second electronic equipment as a first threshold value.
In step 504, when the second electronic device is of a device type with stronger mobility, the first electronic device may use the preset unlocking distance with the smallest value as the first threshold. For example, the first electronic device presets 3 unlocking distances, namely: 1 meter, 5 meters, and 10 meters, then, when the unlocking distance is the device type with stronger mobility from the second electronic device, the first electronic device may unlock the distance: 1 meter is set as the first threshold.
Therefore, when the user A moves near the first electronic device with the second electronic device, if the real-time distance between the first electronic device and the second electronic device is smaller than 1 meter, the first electronic device is still in the operable range of the user A, so that the first electronic device can be triggered to be automatically unlocked, and the user A can conveniently operate the first electronic device. Once the real-time distance between the first electronic device and the second electronic device is detected to be greater than or equal to 1 meter, the first electronic device is not triggered to be automatically unlocked, and at the moment, the first electronic device is not in the operable range of the user A, but the first electronic device is in a locking state, so that a user without the operation authority of the first electronic device cannot operate the first electronic device, and the information security in the first electronic device is improved.
505. The first electronic device obtains the current target position.
506. The first electronic device adjusts the first threshold according to the target position.
In steps 505-506, the first electronic device may further obtain a current target location, and adjust the first threshold according to a security level of the first electronic device at the target location. The method for the first electronic device to acquire the current target position of the first electronic device may be referred to the description of step 302, and thus will not be described herein.
The first electronic device obtains a first preset area with the highest security level at the current target location, for example, a home of the user a. Then, the first electronic device may increase the value of the first threshold by a few degrees, for example, adjust the current unlocking distance of 1 meter to the unlocking distance of 10 meters. Therefore, when the user A connects the first electronic equipment and the second electronic equipment in the home, the first electronic equipment can be automatically unlocked when the real-time distance between the first electronic equipment and the second electronic equipment is smaller than 10 meters, so that the first electronic equipment can ensure the information security of the first electronic equipment and avoid the trouble that the user frequently executes unlocking operation.
For another example, the first electronic device obtains a second preset area, where the current target location is a security level, for example, in the company of the user a. Then, since the security level of the target location is between the highest level and the lowest level, the first electronic device may also increase the value of the first threshold appropriately, but the magnitude of the increase of the first threshold should be smaller than the magnitude of the increase when the first electronic device is located in the home of the user a. For example, the first electronic device may adjust the current unlocking distance of 1 meter to an unlocking distance of 5 meters. Therefore, when the company connects the first electronic equipment and the second electronic equipment, the user A indicates that the first electronic equipment is in a relatively safe environment when the real-time distance between the first electronic equipment and the second electronic equipment is smaller than 5 meters, so that the first electronic equipment can be triggered to automatically unlock, and the trouble that the user frequently executes unlocking operation is avoided; when the real-time distance between the first electronic device and the second electronic device is greater than or equal to 5 meters, the safety risk of the environment where the first electronic device is located is increased, at the moment, the first electronic device is not triggered to be automatically unlocked, and a user without the operation authority of the first electronic device is prevented from using the first electronic device, so that the information safety in the first electronic device is improved.
For another example, the first electronic device obtains a third preset area with the lowest security level at the current target location, for example, in a fast food restaurant, that is, the security risk of the environment where the current first electronic device is located is higher. Then, since the first threshold is already set to the unlocking distance with the smallest value in step 504, the first electronic device may still maintain the first threshold at this time. That is, 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, so that the user A can operate the first electronic device conveniently. Once the real-time distance between the first electronic equipment and the second electronic equipment is detected to be greater than or equal to 1 meter, the first electronic equipment is not triggered to be automatically unlocked, and the first electronic equipment is prevented from being operated by a user without the operation authority of the first electronic equipment, so that the information security in the first electronic equipment is improved.
507. When the second electronic equipment is of a type with weaker mobility, the first electronic equipment sets the unlocking distance between the second electronic equipment and the second electronic equipment to be a second threshold value, and the second threshold value is larger than the first threshold value.
In step 507, when the second electronic device is of a device type with weaker mobility, the first electronic device may use the preset unlocking distance with the maximum value as the second threshold. For example, the first electronic device may unlock the distance: 10 meters is set as the second threshold. Or when the first electronic device and the second electronic device are in a connection state, the first electronic device can be triggered to be automatically unlocked, namely, the second threshold value is the maximum connection distance when the first electronic device and the second electronic device are kept in the connection state.
In this way, when the user A moves near the second electronic device with the first electronic device, the first electronic device can be automatically unlocked within 10 meters from the second electronic device, and the trouble that the user needs to frequently unlock the first electronic device due to the fact that the second electronic device cannot move is reduced. When the first electronic device is 10 meters away from the second electronic device, the safety risk of the environment where the first electronic device is located is considered to be high, so that the first electronic device is not triggered to be automatically unlocked, and the information safety of the first electronic device is ensured.
508. The first electronic device obtains the current target position.
509. The first electronic device adjusts the second threshold according to the target position.
In steps 508-509, the first electronic device may further obtain a current target location, and adjust the second threshold according to a security level of the first electronic device at the target location.
For example, 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 the user a. Then, since the second threshold value is already set to the unlocking distance with the maximum value in step 507, the first electronic device may still maintain the second threshold value at this time. That is, 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, so that the user A can operate the first electronic device conveniently. Once the real-time distance between the first electronic equipment and the second electronic equipment is detected to be more than or equal to 10 meters, the first electronic equipment is not triggered to be automatically unlocked, and the first electronic equipment is prevented from being operated by a user without the operation authority of the first electronic equipment, so that the information security in the first electronic equipment is improved.
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, in the company of the user a. Then, the first electronic device may decrease the value of the second threshold to any value between the first threshold and the second threshold. For example, the current unlocking distance of 10 meters is adjusted to an unlocking distance of 5 meters. Therefore, when the company connects the first electronic equipment and the second electronic equipment, the user A indicates that the first electronic equipment is in a relatively safe environment when the real-time distance between the first electronic equipment and the second electronic equipment is smaller than 5 meters, so that the first electronic equipment can be triggered to automatically unlock, and the trouble that the user frequently executes unlocking operation is avoided; when the real-time distance between the first electronic device and the second electronic device is greater than or equal to 5 meters, the safety risk of the first electronic device in the company is increased, and at the moment, the first electronic device is not triggered to be automatically unlocked, so that a user without the operation authority of the first electronic device is prevented from using the first electronic device, and the information safety in the first electronic device is improved.
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, in a fast food restaurant, that is, the security risk of the current environment where the first electronic device is located is higher. Then, the first electronic device may 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 the unlocking distance of 1 meter. In this way, when the user A connects the first electronic device and the second electronic device in the fast food restaurant, the first electronic device is 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 avoid that the user without the operation authority of the first electronic device uses the first electronic device, the first electronic device is not triggered to be automatically unlocked.
It can be seen that, according to the unlocking method provided by the embodiment of the invention, different unlocking distances can be set for the first electronic device under different application scenes according to the target position of the master 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 realize automatic unlocking in a relatively safe environment, and the trouble that a user frequently executes unlocking operation is avoided; and the locking state is kept in an environment with larger safety risk, so that a user without the operation authority of the first electronic equipment is prevented from using the first electronic equipment, and the information safety in the first electronic equipment is improved.
In addition, the first electronic device also provides a setting interface of the automatic unlocking function for a user. As shown in fig. 9, the user may manually turn on the function of unlocking the first electronic device through the second electronic device; for another example, the user may 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 may manually set the unlocking distance, and for different application scenarios, the user may also set the unlocking distance in each application scenario, which is not limited in the embodiment of the present invention.
It will be appreciated that the electronic device or the like may include hardware structures and/or software modules that perform the functions described above. Those of skill in the art will readily appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as hardware or combinations of hardware and computer software. Whether a function is implemented as hardware or computer software driven hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the embodiments of the present invention.
The embodiment of the invention can divide the functional modules of the electronic device and the like according to the method example, for example, each functional module can be divided corresponding to each function, and two or more functions can be integrated in one processing module. The integrated modules may be implemented in hardware or in software functional modules. It should be noted that, in the embodiment of the present invention, the division of the modules is schematic, which is merely a logic function division, and other division manners may be implemented in actual implementation.
Fig. 10 shows a possible structural diagram of the electronic device (for example, the first electronic device or the second electronic device described above) involved in the above-described embodiment in the case where respective functional modules are divided with corresponding respective functions, the electronic device including: an acquisition unit 1101, a determination unit 1102, an unlocking unit 1103, an adjustment unit 1104, and a communication unit 1105.
The obtaining unit 1101 is configured to support the electronic device to perform the process 302 in fig. 3, the process 402 in fig. 6, and the processes 502, 505, and 508 in fig. 8; the determining unit 1102 is configured to support the electronic device to perform the process 303 in fig. 3, the process 403 in fig. 6, and the processes 503, 504, and 507 in fig. 8; the unlocking unit 1103 is configured to support the electronic device to perform the process 304 in fig. 3, and the process 404 in fig. 6; the adjustment unit 1104 is used to support the electronic device to perform the processes 506 and 509 in fig. 8; the communication unit 1105 is used to support the electronic device to perform the process 301 in fig. 3, the process 401 in fig. 6, and the process 501 in fig. 8. All relevant contents of each step related to the above method embodiment may be cited to the functional description of the corresponding functional module, which is not described herein.
In case of an integrated unit, fig. 11 shows a schematic diagram of one possible structure of the electronic device (e.g., the first electronic device or the second electronic device) involved in the above-described embodiment. The electronic device includes: a processing module 1302 and a communication module 1303. The processing module 1302 is configured to control and manage actions of the electronic device. The communication module 1303 is configured to support communication between the UE and other network entities. The electronic device may also include a memory module 1301 for storing program codes and data for the electronic device.
The processing module 1302 may be a Processor or controller, such as a central processing unit (Central Processing Unit, CPU), a general purpose Processor, a digital signal Processor (DIGITAL SIGNAL Processor, DSP), an Application-specific integrated Circuit (ASIC), a field programmable gate array (Field Programmable GATE ARRAY, FPGA) or other programmable logic device, transistor logic device, hardware component, or any combination thereof. Which may implement or perform the various exemplary logic blocks, modules and circuits described in connection with this disclosure. The processor may also be a combination that performs the function of a computation, e.g., a combination comprising one or more microprocessors, a combination of a DSP and a microprocessor, and the like. The communication module 1303 may be a transceiver, a transceiver circuit, a communication interface, or the like. The memory module 1301 may be a memory.
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 may be the mobile phone 100 shown in fig. 2.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using a software program, may be present in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, produces a flow or function in accordance with embodiments of the present invention, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another, for example, by wired (e.g., coaxial cable, optical fiber, digital Subscriber Line (DSL)), or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid state disk Solid STATE DISK (SSD)), etc.
The foregoing is merely illustrative of specific embodiments of the present application, and the scope of the present application is not limited thereto, but any changes or substitutions within the technical scope of the present application should be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.