CN113535247B - Screen locking and unlocking method and system - Google Patents

Screen locking and unlocking method and system Download PDF

Info

Publication number
CN113535247B
CN113535247B CN202110661365.9A CN202110661365A CN113535247B CN 113535247 B CN113535247 B CN 113535247B CN 202110661365 A CN202110661365 A CN 202110661365A CN 113535247 B CN113535247 B CN 113535247B
Authority
CN
China
Prior art keywords
electronic device
wearable device
distance
screen
user
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110661365.9A
Other languages
Chinese (zh)
Other versions
CN113535247A (en
Inventor
王亚
吴新显
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Honor Device Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202110661365.9A priority Critical patent/CN113535247B/en
Publication of CN113535247A publication Critical patent/CN113535247A/en
Priority to PCT/CN2022/093913 priority patent/WO2022262519A1/en
Application granted granted Critical
Publication of CN113535247B publication Critical patent/CN113535247B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4418Suspend and resume; Hibernate and awake
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/016Input arrangements with force or tactile feedback as computer generated output to the user
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication

Abstract

The embodiment of the application discloses a method and a system for locking and unlocking a screen, relates to the field of electronic equipment, and solves the problems that a computer cannot automatically lock or unlock the screen, and cannot provide convenient screen locking and unlocking experience for a user. The specific scheme is as follows: the electronic device calculates the distance between the electronic device and the wearable device, acquires the motion data of the user in the wearable device, and then performs screen locking or screen unlocking operation according to the motion data and the distance between the wearable device and the electronic device.

Description

Screen locking and unlocking method and system
Technical Field
The embodiment of the application relates to the field of electronic equipment, in particular to a method and a system for locking and unlocking a screen.
Background
In the process of using the computer by the user, the computer is generally provided with a function of locking the screen in order to protect the privacy and data security of the user. Under the condition that the computer starts the function of locking the screen, the user can lock the screen of the computer before leaving the computer, so as to prevent the computer of other people operating the user from peeping the privacy of the user or stealing data. When the user returns to the front of the computer, the screen can be unlocked in a preset verification mode to continue using the computer.
Currently, the mode of locking the screen by the user is manual locking, for example, the user can manually lock the screen by a set shortcut key. The user unlocking screen is also manually unlocked, that is, the user verifies through a preset verification mode to unlock the screen, for example, the preset verification mode may be password verification, the user may manually input a password to enable the computer to verify the password input by the user, and after the verification is passed, the computer may unlock the screen for the user to continue using the computer.
However, in the process of using the computer by the user, the computer cannot automatically lock or unlock the screen, and cannot provide convenient screen locking and unlocking experience for the user.
Disclosure of Invention
The embodiment of the application provides a method and a system for locking and unlocking a screen, and solves the problems that a computer cannot automatically lock or unlock the screen, and cannot provide convenient screen locking and unlocking experience for a user.
In order to achieve the above purpose, the embodiment of the present application adopts the following technical solutions:
in a first aspect, an embodiment of the present application provides a method for locking and unlocking a screen, which is applicable to a screen locking and unlocking system, where the screen locking and unlocking system includes an electronic device and a wearable device, and the method includes: the method comprises the steps that under the condition that a screen of the electronic equipment is locked and short-distance wireless communication connection is not conducted with the wearable equipment, the electronic equipment sends a broadcast signal; the wearable device receives a broadcast signal sent by the electronic device, and determines the distance between the wearable device and the electronic device according to the signal intensity of the broadcast signal; when the wearable device determines that the distance between the wearable device and the electronic device is a first preset distance, the wearable device records first step data of a current user; when the wearable device determines that the distance between the wearable device and the electronic device is a second preset distance, the wearable device records second step data of the current user; the second preset distance is smaller than the first preset distance; when the wearable device determines that the second step data is larger than the first step data, the wearable device establishes short-distance wireless communication connection with the electronic device according to the broadcast signal sent by the electronic device; the electronic equipment receives a short-distance wireless communication signal sent by the wearable equipment, and determines the distance between the electronic equipment and the wearable equipment according to the signal strength of the short-distance wireless communication signal; when the electronic device determines that the distance between the electronic device and the wearable device is smaller than or equal to a first threshold value, the electronic device acquires first motion data of a user from the wearable device; the second preset distance is greater than the first threshold value; and when the electronic equipment determines that the first motion data of the user is increased compared with the motion data of the user obtained last time and the increased value is greater than or equal to the preset value, carrying out screen unlocking operation.
By adopting the method, when the electronic equipment is in the screen locking state, the electronic equipment can automatically unlock the screen when the user wears the wearable equipment and returns to the front of the electronic equipment. Therefore, more convenient screen locking and unlocking experience is provided for a user. Moreover, the electronic device can judge whether the user wears the wearable device to move according to the acquired motion data of the user, so that the situation that the electronic device misjudges to lock or unlock the screen when the user does not wear the wearable device but the wearable device is translated is avoided, and the reliability of the electronic device in realizing automatic screen locking or unlocking through the method is improved.
In one possible implementation, the method further comprises: the method comprises the steps that when the screen of the electronic equipment is unlocked and the electronic equipment is in short-distance wireless communication connection with the wearable equipment, the electronic equipment receives a short-distance wireless communication signal sent by the wearable equipment and determines the distance between the electronic equipment and the wearable equipment according to the signal strength of the short-distance wireless communication signal; when the electronic device determines that the distance between the electronic device and the wearable device is larger than or equal to a second threshold value, the electronic device acquires second motion data of the user from the wearable device; when the electronic equipment determines that the obtained second motion data of the user is increased compared with the motion data of the user obtained last time and the increased value is greater than or equal to a preset value, performing screen locking operation; the wearable device receives a short-distance wireless communication signal sent by the electronic device, and determines the distance between the wearable device and the electronic device according to the signal strength of the short-distance wireless communication signal; when the wearable device determines that the distance between the wearable device and the electronic device is a third preset distance, the wearable device records third step data of the current user; when the wearable device determines that the distance between the wearable device and the electronic device is a fourth preset distance, the wearable device records fourth step data of the current user; the fourth preset distance is greater than the third preset distance and a second threshold value; and when the wearable device determines that the fourth step number data is larger than the third step number data, the wearable device and the electronic device are disconnected from the short-range wireless communication connection.
Thus, when the electronic device is in the screen unlocking state, the electronic device can automatically perform screen locking when the user wears the wearable device and leaves the electronic device. Thereby providing a more convenient screen locking and unlocking experience for the user. Moreover, the electronic device can judge whether the user wears the wearable device to move according to the acquired motion data of the user, so that the situation that the electronic device misjudges to lock or unlock the screen when the user does not wear the wearable device but the wearable device is translated is avoided, and the reliability of the electronic device in realizing automatic screen locking or unlocking through the method is improved.
In another possible implementation manner, when the electronic device determines that the first motion data of the user is increased compared to the motion data of the user obtained last time, and the increased value is greater than or equal to a preset value, a screen unlocking operation is performed, and then the method further includes: the electronic device sends first indication information used for indicating that a screen is unlocked to the wearable device; the wearable device receives the first indication information and displays a first interface used for indicating that the screen of the user electronic device is unlocked.
Therefore, after the electronic device performs screen unlocking or locking operation, the wearable device can prompt the user.
In another possible implementation manner, when the electronic device determines that the first motion data of the user is increased compared to the motion data of the user obtained last time, and the increased value is greater than or equal to a preset value, a screen unlocking operation is performed, and then the method further includes: the electronic device sends first indication information used for indicating that a screen is unlocked to the wearable device; and the wearable device receives the first indication information and performs vibration feedback.
Therefore, after the electronic device performs screen unlocking or locking operation, the wearable device can prompt a user.
In another possible implementation manner, the screen unlocking operation is performed, and includes: the electronic equipment starts a camera to detect whether a non-verified user exists in front of the electronic equipment, wherein the non-verified user is a user which is not verified in login information of the electronic equipment; and if not, the electronic equipment performs screen unlocking operation.
Therefore, when the screen of the electronic equipment is unlocked, the privacy of the unlocked user is prevented from being seen by the non-verified user through detection of the non-verified user.
In another possible implementation manner, when the electronic device determines that the acquired second motion data of the user is increased compared to the motion data of the user acquired last time and the increased value is greater than or equal to the preset value, a screen locking operation is performed, and then the method further includes: the electronic device sends second indication information used for indicating that the screen is locked to the wearable device; and the wearable device receives the second indication information and displays a second interface for indicating that the electronic device of the user is locked on the screen.
Therefore, after the electronic device performs screen unlocking or locking operation, the wearable device can prompt the user.
In another possible implementation manner, when the electronic device determines that the acquired second motion data of the user is increased compared to the motion data of the user acquired last time and the increased value is greater than or equal to the preset value, a screen locking operation is performed, and then the method further includes: the electronic device sends second indication information used for indicating that the screen is locked to the wearable device; and the wearable device receives the second indication information and performs vibration feedback.
Therefore, after the electronic device performs screen unlocking or locking operation, the wearable device can prompt the user.
In another possible implementation, the short-range wireless communication connection is a bluetooth connection.
In another possible implementation manner, the first preset distance is equal to the fourth preset distance and is 10 meters, the second preset distance is equal to the third preset distance and is 5 meters, the first threshold value is 1 meter, and the second threshold value is 3 meters.
In another possible implementation, the exercise data is the number of exercise steps, and the preset value is 50 steps.
In a second aspect, embodiments of the present application provide a screen locking and unlocking system, which may include an electronic device and a wearable device. The electronic device is used for sending a broadcast signal under the condition that a screen is locked and short-distance wireless communication connection is not carried out with the wearable device; when short-distance wireless communication connection is established with the wearable device, receiving a short-distance wireless communication signal sent by the wearable device, and determining the distance between the electronic device and the wearable device according to the signal strength of the short-distance wireless communication signal; when the distance between the electronic device and the wearable device is determined to be smaller than or equal to a first threshold value, acquiring first motion data of a user from the wearable device; the second preset distance is greater than the first threshold value; when the fact that the first motion data of the user is increased compared with the motion data of the user obtained last time is determined, and the increased value is larger than or equal to a preset value, carrying out screen unlocking operation;
the wearable device is used for receiving the broadcast signal sent by the electronic device and determining the distance between the wearable device and the electronic device according to the signal intensity of the broadcast signal; when the distance between the wearable device and the electronic device is determined to be a first preset distance, recording first step data of a current user; when the distance between the wearable device and the electronic device is determined to be a second preset distance, recording second step data of the current user; wherein the second preset distance is smaller than the first preset distance; and when the second step number data is larger than the first step number data, establishing short-distance wireless communication connection with the electronic equipment according to the broadcast signal sent by the electronic equipment.
In a possible implementation manner, the electronic device is further configured to receive a short-range wireless communication signal sent by the wearable device when the screen is unlocked and the short-range wireless communication connection is made with the wearable device, and determine a distance between the electronic device and the wearable device according to the signal strength of the short-range wireless communication signal; when the distance between the electronic device and the wearable device is determined to be larger than or equal to a second threshold value, acquiring second motion data of the user from the wearable device; when the acquired second motion data of the user is determined to be increased compared with the motion data of the user acquired last time, and the increased value is greater than or equal to a preset value, performing screen locking operation;
the wearable device is also used for receiving the short-distance wireless communication signal sent by the electronic device and determining the distance between the wearable device and the electronic device according to the signal strength of the short-distance wireless communication signal; when the distance between the wearable device and the electronic device is determined to be a third preset distance, recording third step data of the current user; when the distance between the wearable device and the electronic device is determined to be a fourth preset distance, recording fourth step data of the current user; the fourth preset distance is greater than the third preset distance and a second threshold value; and when the fourth step number data is determined to be larger than the third step number data, disconnecting the short-distance wireless communication connection with the electronic equipment.
In another possible implementation manner, the electronic device is further configured to send, to the wearable device, first indication information for indicating that the screen is unlocked; the wearable device is further used for receiving the first indication information and displaying a first interface used for indicating that the electronic device of the user is unlocked on the screen.
In another possible implementation manner, the electronic device is further configured to send, to the wearable device, first indication information for indicating that the screen is unlocked; the wearable device is further used for receiving the first indication information and performing vibration feedback.
In another possible implementation manner, the electronic device is specifically configured to turn on a camera by the electronic device to detect whether a non-authenticated user exists in front of the electronic device, where the non-authenticated user is an unverified user in login information of the electronic device; and if not, the electronic equipment carries out screen unlocking operation.
In another possible implementation manner, the electronic device is further configured to send second indication information indicating that the screen is locked to the wearable device; the wearable device is further used for receiving second indication information and displaying a second interface used for indicating that the electronic device of the user is locked on the screen.
In another possible implementation manner, the electronic device is further configured to send second indication information indicating that the screen is locked to the wearable device; and the wearable device is also used for receiving the second indication information and carrying out vibration feedback.
In another possible implementation, the short-range wireless communication connection is a bluetooth connection.
In another possible implementation manner, the first preset distance is equal to the fourth preset distance and is 10 meters, the second preset distance is equal to the third preset distance and is 5 meters, the first threshold is 1 meter, and the second threshold is 3 meters.
In another possible implementation, the exercise data is the number of exercise steps, and the preset value is 50 steps.
In a third aspect, an embodiment of the present application provides an electronic device, including: a processor, a memory for storing instructions executable by the processor. The processor is configured to execute the above instructions to enable the electronic device to implement the functions of the electronic device in the method for locking and unlocking the screen according to any one of the first aspect.
In a fourth aspect, an embodiment of the present application provides a wearable device, including: a processor, a memory for storing instructions executable by the processor. The processor is configured to execute the above instructions, so that the wearable device implements the functions of the wearable device in the method for screen locking and unlocking according to any one of the first aspect.
It should be understood that, for the beneficial effects of the second aspect to the fourth aspect, reference may be made to the relevant description in the first aspect, and details are not described herein again.
Drawings
Fig. 1 is a scene schematic diagram when a method for locking and unlocking a screen is applied according to an embodiment of the present application;
fig. 2 is a schematic view of a scene when another method for locking and unlocking a screen is applied according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure;
fig. 4 is a schematic flowchart of a method for locking and unlocking a screen according to an embodiment of the present application;
FIG. 5 is a schematic view of a scene in which another method for locking and unlocking a screen provided in the embodiment of the present application is applied;
fig. 6 is a schematic view of a scene when another method for locking and unlocking a screen provided in the embodiment of the present application is applied;
fig. 7 is a schematic interface diagram of a wearable device when a method for locking and unlocking a screen is applied according to an embodiment of the present application;
FIG. 8 is a schematic view of a scene in which another method for locking and unlocking a screen provided in the embodiment of the present application is applied;
fig. 9 is a schematic interface diagram of a wearable device when another screen locking and unlocking method provided in the embodiment of the present application is applied.
Detailed Description
With the emphasis of a user on personal privacy and data security, many electronic devices with a display function are provided with a screen locking function, so that the user can conveniently lock the screen of the electronic device when leaving the electronic device to prevent the electronic device operated by others from peeping the user privacy or stealing data.
For example, in the case of an electronic device being a computer, the computer is generally provided with a function of locking a screen in order to protect the privacy of a user during the use of the computer. Under the condition that the computer has the function of locking the screen, the user can lock the screen of the computer before leaving the computer, so that the user privacy or user data can be prevented from being peeped by the computer operated by other people.
The user can lock the screen of the computer in a manual locking mode. For example, the user may manually lock the screen by a set shortcut key. For example, a combination key Win + L can be set as a shortcut key to lock the screen of the computer, and when a user needs to leave the computer, the screen can be locked by pressing the combination key Win + L. Or, the user can also set the computer to automatically lock the screen. For example, a user can set a screen locking time in a computer system setting, and when the non-operation time of the user exceeds the screen locking time set by the user, the computer can automatically lock the screen.
After the computer screen is locked, the user can unlock the screen through a preset verification mode so as to continue using the computer. For example, the preset authentication manner may be password authentication, and the user may set a password for screen unlocking when the function of locking the screen is turned on. When the user needs to unlock the screen, the user can manually input the password so that the computer can verify the password input by the user, and when the password is verified, the computer can unlock the screen to return to the interface before the screen is locked so that the user can continue to use the computer. For another example, the preset authentication manner may be fingerprint authentication, and the user may set fingerprint information for unlocking the screen when the function of locking the screen is turned on. When a user needs to unlock the screen, the user can touch the identification area of the fingerprint identification module by a finger (for example, the user touches the identification area of the fingerprint identification module on the power key of the computer by the finger) so that the computer collects fingerprint information of the user and verifies the fingerprint information. When the fingerprint verification is passed, the computer can unlock the screen to return to the interface before the screen is locked, so that the user can continue to use the computer. For another example, the preset verification mode may be face verification, and the user may set face information for unlocking the screen when the function of locking the screen is turned on. When the user needs to unlock the screen, the face of the user can face the camera of the computer, so that the computer can collect the face information of the user and verify the face information. When the face verification passes, the computer can unlock the screen to return to the interface before the screen is locked, so that the user can continue to use the computer.
From the above, it can be seen that, during the process of using an electronic device (such as a computer) by a user, the screen of the electronic device needs to be locked and unlocked manually. The electronic device cannot automatically lock or unlock the screen, and cannot provide convenient screen locking and unlocking experience for the user.
In order to solve the above problem, embodiments of the present application provide a method for locking and unlocking a screen, where the method can be applied to a scenario where a screen of an electronic device is locked (or referred to as a locked electronic device) when a user wears a wearable device far away from the electronic device, and a screen of the electronic device is unlocked (or referred to as an unlocked electronic device) when the user wears the wearable device close to the electronic device. For example, taking the electronic device as a computer and the wearable device as a smart watch as an example, as shown in (a) of fig. 1, the computer is currently in a screen-unlocked state, and when the user wears the smart watch and is far away from the electronic device, as shown in (b) of fig. 1, the computer performs screen locking to prevent others from operating the electronic device to peep the privacy of the user or steal user data. Alternatively, as shown in fig. 2 (a), the computer is currently in the screen-locked state, and when the user wears the smart watch and approaches the electronic device, as shown in fig. 2 (b), the electronic device performs screen unlocking to allow the user to continue using the computer. The method can comprise the following steps: the electronic device calculates the distance between the electronic device and the wearable device, acquires the motion data of the user in the wearable device, and then performs screen locking or screen unlocking operation according to the motion data and the distance between the wearable device and the electronic device.
Thus, when the electronic device is in the screen unlocking state, the electronic device can automatically perform screen locking when the user wears the wearable device and leaves the electronic device. When the electronic device is in the screen locking state, the electronic device can automatically perform screen unlocking when the user wears the wearable device and returns to the front of the electronic device. Thereby providing a more convenient screen locking and unlocking experience for the user. Moreover, the electronic device can judge whether the user wears the wearable device to move according to the acquired motion data of the user, so that the situation that the electronic device misjudges to lock or unlock the screen when the user does not wear the wearable device but the wearable device is translated is avoided, and the reliability of the electronic device in realizing automatic screen locking or unlocking through the method is improved.
Hereinafter, a method for locking and unlocking a screen provided by an embodiment of the present application will be described with reference to the accompanying drawings.
In this embodiment, the wearable device may be a smart band, a smart watch, smart glasses, or the like. The electronic device can be a mobile phone, a tablet computer, a handheld computer, a PC, a cellular phone, a Personal Digital Assistant (PDA), a vehicle-mounted computer (such as a vehicle-mounted computer), an intelligent screen, a game machine, an intelligent television box and the like. The embodiment of the present application is not particularly limited to the specific device form of the electronic device.
Exemplarily, taking an electronic device as a mobile phone as an example, fig. 3 shows a schematic structural diagram of the electronic device provided in the embodiment of the present application. That is, the electronic device shown in fig. 3 may be a mobile phone, for example.
As shown in fig. 3, the electronic device may include a processor 310, an external memory interface 320, an internal memory 321, a Universal Serial Bus (USB) interface 330, a charging management module 340, a power management module 341, a battery 342, an antenna 1, an antenna 2, a mobile communication module 350, a wireless communication module 360, an audio module 370, a speaker 370A, a receiver 370B, a microphone 370C, an earphone interface 370D, a sensor module 380, a button 390, a motor 391, an indicator 392, a camera 393, a display 394, and a Subscriber Identification Module (SIM) card interface 395, and the like. The sensor module 380 may include a pressure sensor 380A, a gyroscope sensor 380B, an air pressure sensor 380C, a magnetic sensor 380D, an acceleration sensor 380E, a distance sensor 380F, a proximity light sensor 380G, a fingerprint sensor 380H, a temperature sensor 380J, a touch sensor 380K, an ambient light sensor 380L, a bone conduction sensor 380M, and the like.
It is to be understood that the illustrated structure of the present embodiment does not constitute a specific limitation to the electronic device. In other embodiments, an electronic device may include more or fewer components than shown, or some components may be combined, some components may be split, or a different arrangement of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
Processor 310 may include one or more processing units, such as: the processor 310 may include an Application Processor (AP), a modem processor, a Graphics Processing Unit (GPU), an Image Signal Processor (ISP), a controller, a memory, a video codec, a Digital Signal Processor (DSP), a baseband processor, and/or a neural-Network Processing Unit (NPU), etc. The different processing units may be separate devices or may be integrated into one or more processors.
The controller may be a neural center and a command center of the electronic device. The controller can generate an operation control signal according to the instruction operation code and the timing signal to complete the control of instruction fetching and instruction execution.
A memory may also be provided in the processor 310 for storing instructions and data. In some embodiments, the memory in the processor 310 is a cache memory. The memory may hold instructions or data that have just been used or recycled by the processor 310. If the processor 310 needs to reuse the instruction or data, it can be called directly from the memory. Avoiding repeated accesses reduces the latency of the processor 310, thereby increasing the efficiency of the system.
In some embodiments, processor 310 may include one or more interfaces. The interface may include an integrated circuit (I2C) interface, an integrated circuit built-in audio (I2S) interface, a Pulse Code Modulation (PCM) interface, a universal asynchronous receiver/transmitter (UART) interface, a Mobile Industry Processor Interface (MIPI), a general-purpose input/output (GPIO) interface, a Subscriber Identity Module (SIM) interface, and/or a Universal Serial Bus (USB) interface, etc.
The wireless communication function of the electronic device may be implemented by the antenna 1, the antenna 2, the mobile communication module 350, the wireless communication module 360, the modem processor, the baseband processor, and the like.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in an electronic device may be used to cover a single or multiple communication bands. Different antennas can also be multiplexed to improve the utilization of the antennas. For example: the antenna 1 may be multiplexed as a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
The mobile communication module 350 may provide a solution including 2G/3G/4G/5G wireless communication applied to the electronic device. The mobile communication module 350 may include at least one filter, a switch, a power amplifier, a Low Noise Amplifier (LNA), and the like. The mobile communication module 350 may receive the electromagnetic wave from the antenna 1, filter, amplify, etc. the received electromagnetic wave, and transmit the filtered electromagnetic wave to the modem processor for demodulation. The mobile communication module 350 may also amplify the signal modulated by the modem processor, and convert the signal into electromagnetic wave through the antenna 1 to radiate the electromagnetic wave. In some embodiments, at least some of the functional modules of the mobile communication module 350 may be disposed in the processor 310. In some embodiments, at least some of the functional modules of the mobile communication module 350 may be disposed in the same device as at least some of the modules of the processor 310.
The wireless communication module 360 may provide solutions for wireless communication applied to electronic devices, including Wireless Local Area Networks (WLANs) (e.g., wireless fidelity (Wi-Fi) networks), bluetooth (BT), global Navigation Satellite System (GNSS), frequency Modulation (FM), near Field Communication (NFC), infrared (IR), and the like. The wireless communication module 360 may be one or more devices integrating at least one communication processing module. The wireless communication module 360 receives electromagnetic waves via the antenna 2, performs frequency modulation and filtering processing on electromagnetic wave signals, and transmits the processed signals to the processor 310. The wireless communication module 360 may also receive a signal to be transmitted from the processor 310, frequency-modulate and amplify the signal, and convert the signal into electromagnetic waves via the antenna 2 to radiate the electromagnetic waves.
In some embodiments, antenna 1 of the electronic device is coupled to the mobile communication module 350 and antenna 2 is coupled to the wireless communication module 360 so that the electronic device can communicate with the network and other devices through wireless communication techniques. The wireless communication technology may include global system for mobile communications (GSM), general Packet Radio Service (GPRS), code division multiple access (code division multiple access, CDMA), wideband Code Division Multiple Access (WCDMA), time-division code division multiple access (time-division code division multiple access, TD-SCDMA), long Term Evolution (LTE), BT, GNSS, WLAN, NFC, FM, and/or IR technologies, etc. The GNSS may include a Global Positioning System (GPS), a global navigation satellite system (GLONASS), a beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS), and/or a Satellite Based Augmentation System (SBAS).
The electronic device implements display functions via the GPU, the display 394, and the application processor, among other things. The GPU is a microprocessor for image processing, coupled to a display screen 394 and an application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 310 may include one or more GPUs that execute program instructions to generate or alter display information.
The display screen 394 is used to display images, video, and the like. The display screen 394 includes a display panel. The display panel may adopt a Liquid Crystal Display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (active-matrix organic light-emitting diode, AMOLED), a flexible light-emitting diode (FLED), a miniature, a Micro-oeld, a quantum dot light-emitting diode (QLED), and the like. In some embodiments, the electronic device may include 1 or N display screens 394, N being a positive integer greater than 1.
The electronic device may implement the shooting function through the ISP, camera 393, video codec, GPU, display 394, application processor, etc. In some embodiments, the electronic device may include 1 or N cameras 393, N being a positive integer greater than 1.
The NPU is a neural-network (NN) computing processor that processes input information quickly by using a biological neural network structure, for example, by using a transfer mode between neurons of a human brain, and can also learn by itself continuously. The NPU can realize applications such as intelligent cognition of electronic equipment, for example: image recognition, face recognition, speech recognition, text understanding, and the like.
The internal memory 321 may be used to store computer-executable program code, which includes instructions. The processor 310 executes various functional applications of the electronic device and data processing by executing instructions stored in the internal memory 321. The internal memory 321 may include a program storage area and a data storage area. The storage program area may store an operating system, an application program (such as a sound playing function, an image playing function, etc.) required by at least one function, and the like. The data storage area can store data (such as audio data, phone book and the like) created in the using process of the electronic device. In addition, the internal memory 321 may include a high-speed random access memory, and may further include a nonvolatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (UFS), and the like.
The electronic device may implement audio functions through the audio module 370, the speaker 370A, the receiver 370B, the microphone 370C, the headphone interface 370D, and the application processor. Such as music playing, recording, etc.
Of course, it should be understood that fig. 3 is only an exemplary illustration of the electronic device in the form of a mobile phone. If the electronic device is a tablet computer, a handheld computer, a PC, a PDA, a vehicle (e.g., a car computer), a smart screen, a game machine, a smart tv box, or other device forms, the structure of the electronic device may include less structures than those shown in fig. 3, or may include more structures than those shown in fig. 3, which is not limited herein.
The methods in the following embodiments may be implemented in an electronic device having the above hardware structure. The embodiments of the present application will be described below by way of example with reference to the accompanying drawings.
In the embodiment of the application, a user can set the function of unlocking the screen locking and unlocking method provided by the embodiment of the application in the system setting of the electronic device. Of course, in some other embodiments, the above function may be turned on by default, and does not need to be turned on manually by the user.
Continue to use electronic equipment as the computer, wearable equipment is intelligent wrist-watch as the example. Fig. 4 shows a flowchart of a method for locking and unlocking a screen according to an embodiment of the present application. As shown in fig. 4, the method of screen locking and unlocking may include the following S401-S404.
S401, establishing short-distance wireless communication connection between the computer and the intelligent watch.
The short-distance wireless communication connection established between the computer and the smart watch can be a bluetooth connection, a WiFi connection and the like, and is not limited here. For example, the computer can pair and connect through the bluetooth with the intelligent wrist-watch, realizes the information interaction between computer and the intelligent wrist-watch.
S402, the computer determines the distance between the computer and the intelligent watch according to the received signal strength of the short-distance wireless communication signal of the intelligent watch.
As an example, when the smart watch and the computer communicate with each other through a short-range wireless communication signal, the computer may calculate and determine a distance between the computer and the smart watch according to a Received Signal Strength Indication (RSSI) value of the short-range wireless communication signal transmitted by the smart watch. For example, taking the example of communication connection between the computer and the smart watch through bluetooth, the distance between the computer and the smart watch can be calculated through the following formula:
d=10 (abs(RSSI)-A)/(10n)
wherein abs (RSSI) is the absolute value of RSSI, a is the RSSI at a distance of 1 meter between the transmitting end (e.g., smart watch) and the receiving end (e.g., computer), and n is the environmental attenuation factor. In the embodiment of the present application, the values of a and n are preset fixed values, and may be obtained according to experimental tests or empirical values, which is not limited herein.
Optionally, the computer may perform S402 if it is determined that it is logged in with the smart watch with the account. Therefore, the computer can verify the safety of the intelligent watch so as to prevent other users from locking or unlocking the screen after the intelligent watch is connected with the computer of the user.
When the computer determines that the distance between the computer and the smart watch is smaller than the first threshold value or larger than the second threshold value, the computer may perform the following S403. Optionally, in some other embodiments, if the distance between the computer and the smart watch is equal to the first threshold or equal to the second threshold, the computer may also perform the following step S403. The first threshold value and the second threshold value can be set according to actual conditions, so that the distance between the computer and the intelligent watch can be indicated to be closer to the computer when the distance is smaller than the first threshold value (namely, the intelligent watch is near the computer), and the distance between the computer and the intelligent watch can be indicated to be farther from the computer when the distance is larger than the second threshold value (namely, the intelligent watch is far away from the computer, or the intelligent watch is not near the computer). For example, the first threshold may be set to 1 meter, the second threshold to 3 meters, and so on. That is, when the distance between the computer and the smart watch determined by the computer is less than 1 meter, it indicates that the smart watch is near the computer, and when the distance between the computer and the smart watch determined by the computer is greater than 3 meters, it indicates that the smart watch is far away from the computer.
S403, the computer obtains motion data of the user in the intelligent watch.
As an example, the computer may obtain the exercise data of the user in the smart watch by sending a request for obtaining the exercise data to the smart watch, and the smart watch may send the exercise data of the user to the computer after receiving the request sent by the computer. Of course, in some other possible embodiments, the computer may also obtain the exercise data of the user in other manners, for example, the computer directly queries the smart watch to obtain the exercise data, and the like.
The motion data of the user may include parameters related to the motion of the user, such as the number of motion steps, the step frequency, the walking distance, and the like of the user. The computer can judge whether the user wears the sports watch to move according to the acquired sports data of the user. So as to be convenient for executing the corresponding screen locking or unlocking operation subsequently according to the distance between the computer and the intelligent watch determined in the step S402.
S404, the computer performs screen locking or screen unlocking operation according to the motion data and the distance between the computer and the intelligent watch.
In some possible embodiments, whether screen locking or screen unlocking is required or not can be judged according to the motion data and the distance between the computer and the intelligent watch, and corresponding operation is executed. That is, when the distance between the computer and the smart watch is greater than the second threshold, it indicates that the smart watch is away from the computer. Then, the computer can determine whether the user wears the smart watch to move by combining with whether the acquired motion data of the user changes so as to further determine whether screen locking is needed. When the distance between the computer and the intelligent watch is smaller than a first threshold value, the intelligent watch is near the computer. Then, the computer can determine whether the user wears the smart watch to move by combining with whether the acquired motion data of the user changes or not so as to further determine whether the screen needs to be unlocked or not.
For example, taking the exercise data as the exercise steps of the user, when the distance between the computer and the smart watch determined by the computer is greater than the second threshold, it indicates that the smart watch is far away from the computer. At this time, if the obtained exercise step number of the user is increased compared with the exercise step number of the user obtained last time by the computer (that is, when the computer determines that the distance between the computer and the smart watch is smaller than the first threshold value, the exercise step number of the user obtained by the computer is greater than or equal to a preset value (or referred to as a third threshold value), it is indicated that the distance between the smart watch and the computer is greater than the second threshold value because the user wears the smart watch and moves to a position far away from the computer. At this time, if the computer is in the state of screen unlocking, the computer can execute the operation of screen locking. That is, under the condition that the computer is in the screen unlocking state, when the computer determines that the distance between the computer and the smart watch is greater than the second threshold, the computer may obtain the exercise step number of the user, and if the exercise step number of the user is increased by at least a preset value compared with the exercise step number obtained last time, the computer may perform the screen locking operation. So, can avoid the user not to wear intelligent wrist-watch and place intelligent wrist-watch when keeping away from the position normal use computer of computer (if, place when charging in the position of keeping away from the computer), the computer only just carries out the screen locking operation according to its distance between the intelligent wrist-watch far away and influences the condition that the user normally used.
And when the distance between the computer and the intelligent watch is smaller than a first threshold value, the intelligent watch is near the computer. At this time, if the obtained exercise step number of the user is increased compared with the exercise step number of the user obtained last time by the computer (that is, when the computer determines that the distance between the computer and the smart watch is greater than the second threshold value, the exercise step number of the user obtained by the computer is greater than or equal to a preset value (or referred to as a third threshold value), it is indicated that the distance between the smart watch and the computer is smaller than the first threshold value because the user wears the smart watch and moves to a position near the computer. At this time, if the computer is in the state of screen locking, the computer can execute the operation of screen unlocking. That is, under the condition that the computer is in the screen-locked state, when the computer determines that the distance between the computer and the smart watch is smaller than the first threshold, the computer may acquire the exercise step number of the user, and if the exercise step number of the user is increased by at least a preset value compared with the exercise step number acquired last time, the computer may perform the screen-unlocking operation. Therefore, the situation that the computer screen is unlocked mistakenly due to the fact that the computer only executes screen unlocking operation according to the fact that the distance between the computer and the intelligent watch is short when the user does not wear the intelligent watch to place the intelligent watch at the position near the computer to manually lock the computer screen can be avoided. That is, as shown in fig. 5, when the user does not wear the smart watch and places the smart watch at a position near the computer, and then manually locks the computer screen, the computer will not unlock the screen.
It should be noted that the preset value in the above example may be set according to an empirical value, for example, the preset value in the above example is set to 50 steps, or may be set according to an average value of the number of moving steps when most users (for example, all test users) move a distance corresponding to a difference value between the second threshold and the first threshold, and the like, which is not limited herein.
Optionally, in this embodiment of the application, based on the method shown in fig. 4, after S402, the computer may further obtain biometric data of the user in the smart watch, so as to determine whether the user wears the watch according to the biometric data. For example, taking the biometric data as the heart rate data, when the computer determines the distance between the computer and the smart watch, and the distance is smaller than the first threshold or larger than the second threshold, the computer may obtain the heart rate data of the user in the smart watch, and when the heart rate data of the user is zero, it indicates that the user does not wear the smart watch, and at this time, the computer may not perform S403 and S404, that is, at this time, the computer does not perform automatic screen locking or unlocking. When the heart rate data of the user is not zero, the user wears the smart watch, and at the moment, the computer can execute the operations of S403 and S404 again to lock or unlock the screen. Therefore, the problem that when a user does not wear the intelligent watch, other users move the intelligent watch to lock or unlock the automatic screen of the computer to cause interference and cause misjudgment of the computer can be avoided.
Alternatively, in this embodiment of the application, based on the method shown in fig. 4, the determination of the distance between the computer and the smart watch in S402 may be a real-time calculation determination (i.e., a real-time detection of the distance between the computer and the smart watch). When the distance between the smart watch and the computer is detected to be the first distance, the computer may determine that the smart watch is close to the computer, and when the distance between the smart watch and the computer is detected to be the first threshold (i.e., the first threshold in the above example), the computer performs steps S403 and S404. Wherein the first distance is greater than a first threshold. When the distance between the smart watch and the computer is detected to be the second distance, the computer may determine that the smart watch is far away from the computer, and when the distance between the smart watch and the computer is detected to be the second threshold (i.e., the second threshold in the above example), the computer performs steps S403 and S404. Therefore, whether the intelligent watch moves or not can be further determined according to the detected distance change between the intelligent watch and the computer, and the misjudgment condition that the computer locks or unlocks the screen only according to the fact that the distance between the intelligent watch and the computer is far or near when the intelligent watch is far away from or near the computer but not moved is avoided.
In this embodiment, based on the foregoing embodiment, after determining the distance between the electronic device and the wearable device, the electronic device may further directly acquire the motion data of the user in the wearable device without determining the size relationship between the distance and the first threshold and the second threshold, and then perform screen locking according to that the distance between the electronic device and the wearable device is greater than the second threshold and the motion data is changed compared with the motion data acquired last time, and perform screen unlocking according to that the distance between the electronic device and the wearable device is smaller than the first threshold and the motion data is changed compared with the motion data acquired last time.
Optionally, in this embodiment of the application, before the electronic device performs a corresponding screen locking or screen unlocking operation according to the distance between the electronic device and the wearable device and the acquired motion data of the user, the wearable device may further determine whether to establish a communication connection with the electronic device according to the distance between the electronic device and the electronic device, so that the subsequent electronic device acquires the motion data of the user from the wearable device for performing the screen locking or screen unlocking operation.
For example, based on the method shown in fig. 4, in the case that the screen of the electronic device is locked, the wearable device may record the current number of steps (or referred to as a first number of steps) when determining that the distance to the electronic device is a first preset distance, and then record the current number of steps (or referred to as a second number of steps) when determining that the distance to the electronic device is a second preset distance (where the second preset distance is smaller than the first preset distance and is greater than the first threshold in the foregoing embodiment), and if the current number of steps is greater than the first number of steps, that is, when the wearable device determines that the distance to the electronic device is the second preset distance, the number of steps of the user is increased, the wearable device may establish a connection with the electronic device, so that the electronic device may subsequently acquire the motion data of the user. In the case that the screen of the electronic device is unlocked, the wearable device may record the current number of steps (or referred to as the third number of steps) when determining that the distance between the wearable device and the electronic device is the third preset distance, and then record the current number of steps (or referred to as the fourth number of steps) when determining that the distance between the wearable device and the electronic device is the fourth preset distance (where the fourth preset distance is greater than the third preset distance and the second threshold in the foregoing embodiment), and if the fourth number of steps is greater than the third number of steps, that is, when the wearable device determines that the distance between the wearable device and the electronic device is the fourth preset distance, the number of steps of the user increases, the wearable device may disconnect from the electronic device, and the electronic device may start broadcasting. It should be noted that the first preset distance, the second preset distance, the third preset distance, and the fourth preset distance may be set according to actual situations. For example, the first preset distance and the fourth preset distance may be equal and both set to 10 meters, the second preset distance and the third preset distance may be equal and both set to 5 meters, and so on.
For example, taking an electronic device as a computer, a wearable device as a smart watch, and a bluetooth connection between the electronic device and the wearable device as an example, another method for locking and unlocking a screen provided in the embodiment of the present application may include the following S601-S6015.
In the case of the computer screen lock, the computer may perform screen unlocking according to the screen locking and unlocking method, for example, the following S601-S608 may be performed.
S601, under the condition that the computer screen is locked, the computer sends a broadcast signal.
S602, the intelligent watch receives the broadcast signal sent by the computer, and determines the distance between the intelligent watch and the computer according to the signal intensity of the broadcast signal.
Illustratively, the signal strength of the broadcast signal may be represented by RSSI. Accordingly, the distance between the smart watch and the computer may be calculated according to the RSSI of the broadcast signal (refer to the description of the related embodiment in S402 in the method shown in fig. 4, which is not described herein again).
And S603, when the intelligent watch determines that the distance between the intelligent watch and the computer is the first preset distance, the intelligent watch records the step data (or called as the first step data) of the current user.
For example, taking the first preset distance as 10 meters as an example, as shown in fig. 6 (a), the distance between the smart watch and the computer is 10 meters, and at this time, the smart watch may record the step number data of the current user.
And S604, when the intelligent watch determines that the distance between the intelligent watch and the computer is the second preset distance, the intelligent watch records the step data (or called as second step data) of the current user.
For example, taking the second preset distance as 5 meters as an example, as shown in (b) of fig. 6, the smart watch approaches the computer, and the distance between the smart watch and the computer is 5 meters, at this time, the smart watch may record the step data of the current user.
And S605, when the intelligent watch determines that the second step data is larger than the first step data, the intelligent watch establishes communication connection (or called short-distance wireless communication connection) with the computer according to the broadcast signal sent by the computer.
For example, as shown in fig. 6 (b), when the smart watch determines that the second step data is greater than the first step data, the smart watch may establish a communication connection with the computer at a second predetermined distance (e.g., 5 meters) from the computer.
S606, the computer receives the short-distance wireless communication signal sent by the intelligent watch, and the distance between the computer and the intelligent watch is determined according to the signal intensity of the short-distance wireless communication signal.
For example, the signal strength of the short-range wireless communication signal may be represented by RSSI, and accordingly, the distance between the computer and the smart watch may be calculated according to the RSSI of the short-range wireless communication signal (refer to the description of the related embodiment in S402 in the method shown in fig. 4, which is not described herein again).
S607, when the computer determines that the distance between the computer and the smart watch is less than or equal to the first threshold (i.e. the first threshold in the method shown in fig. 4), the computer obtains the first exercise data of the user from the smart watch.
For example, taking the first threshold as 1 meter as an example, as shown in (c) of fig. 6, the smart watch continues to approach the computer, and the distance between the computer and the smart watch is 1 meter, at which time the computer may obtain the first exercise data of the user from the smart watch.
Specifically, the related description in S403 of the method shown in fig. 4 can be referred to for the computer to obtain the motion data (e.g., the first motion data) of the user, which is not repeated herein.
And S608, when the computer determines that the first motion data (such as the number of motion steps) of the user is increased compared with the motion data (such as the number of motion steps) of the user obtained last time, and the increased value is greater than or equal to a preset value, performing screen unlocking operation.
The specific implementation of the operation of unlocking the screen by the computer according to the acquired motion data of the user and the distance between the computer and the smart watch may refer to the related description in S404 in the method shown in fig. 4, which is not described herein again.
For example, as shown in fig. 6 (c), when the computer determines that the first exercise data (e.g., exercise step number) of the user is increased compared to the last acquired exercise data (e.g., exercise step number) of the user and the increased value is greater than or equal to a preset value (e.g., when the exercise data is the exercise step number, the preset value is 50 steps), the computer may perform a screen unlocking operation, i.e., unlock the screen.
Optionally, in this embodiment of the application, after S608, the computer may further send an indication that the screen is unlocked (e.g., the first indication) to the smart watch, and when the smart watch receives the indication, the smart watch may display a prompt interface (or referred to as the first interface) for instructing the user to unlock the screen. For example, the first interface may be as shown in fig. 7, and the first interface may include a prompt of "the computer is unlocked". Or, when the smart watch receives the indication information, vibration feedback can be performed.
Optionally, in this embodiment of the application, when the computer performs the screen unlocking operation in S608, the computer may further turn on the camera to detect whether there is another user (i.e., a non-authenticated user in the login information in the computer) before the computer, and if there is a non-authenticated user, the computer does not perform the unlocking operation. That is, when the computer starts the camera to detect whether a non-verified user exists before the computer, if not, the computer performs screen unlocking operation.
Under the condition that the computer screen is unlocked and short-distance wireless communication connection is established with the smart watch, the computer can perform screen locking according to the screen locking and unlocking method, for example, the following S609-S6015 can be performed.
S609, in a case that the computer screen is unlocked (for example, as shown in (c) of fig. 6), the computer receives the short-distance wireless communication signal sent by the smart watch, and determines a distance between the computer and the smart watch according to a signal strength of the short-distance wireless communication signal.
For example, the signal strength of the short-range wireless communication signal may be represented by RSSI, and accordingly, the distance between the computer and the smart watch may be calculated according to the RSSI of the short-range wireless communication signal (for example, refer to the description of the related embodiment in S402 in the method shown in fig. 4, which is not repeated herein).
S6010, when the computer determines that the distance between the computer and the smart watch is greater than or equal to the second threshold (i.e., the second threshold in the method shown in fig. 4), the computer acquires second motion data of the user from the smart watch.
For example, taking the second threshold as 3 meters as an example, as shown in (a) of fig. 8, the smart watch moves away from the computer, and when the distance between the computer and the smart watch is 3 meters, the computer may obtain the second motion data of the user from the smart watch.
For the specific reference to the related description in S403 of the method shown in fig. 4, the computer may obtain the motion data (e.g., the second motion data) of the user, which is not described herein again.
S6011, when the computer determines that the obtained second motion data (such as the number of motion steps) of the user is increased compared with the last obtained motion data (such as the number of motion steps) of the user, and the increased value is greater than or equal to a preset value, performing a screen locking operation.
The specific implementation of the operation of unlocking the screen by the computer according to the acquired motion data of the user and the distance between the computer and the smart watch may refer to the related description in S404 in the method shown in fig. 4, which is not described herein again.
For example, as shown in fig. 8 (a), when the computer determines that the second exercise data (e.g., exercise step number) of the user is increased compared to the last exercise data (e.g., the first exercise data acquired in S607) of the user and the increased value is greater than or equal to the preset value (e.g., the preset value is 50 steps when the exercise data is the exercise step number), the computer may perform a screen lock operation, i.e., the computer locks the screen.
Optionally, in this embodiment of the application, after S6011, the computer may further send an indication that the screen is locked (e.g., a second indication) to the smart watch, and when the smart watch receives the indication, the smart watch may display a prompt interface (or referred to as a second interface) for indicating that the screen of the computer is locked. For example, the second interface may be as shown in fig. 9, and the second interface may include a prompt of "computer locked". Or, when the smart watch receives the indication information, vibration feedback can be performed.
S6012, the intelligent watch receives the short-distance wireless communication signal sent by the computer, and the distance between the intelligent watch and the computer is determined according to the signal intensity of the short-distance wireless communication signal.
For example, the signal strength of the short-range wireless communication signal may be represented by RSSI, and accordingly, the distance between the smart watch and the computer may be calculated according to the RSSI of the short-range wireless communication signal (for example, refer to the description of the related embodiment in S402 in the method shown in fig. 4, which is not repeated herein).
S6013, when the smart watch determines that the distance between the smart watch and the computer is the third preset distance, the smart watch records step data (or called as third step data) of the current user.
For example, taking the third preset distance equal to the second preset distance as 5 meters as an example, as shown in (b) in fig. 8, the smart watch moves away from the computer, and the distance between the smart watch and the computer is 5 meters, at this time, the smart watch may record the step number data of the current user.
S6014, when the smart watch determines that the distance between the smart watch and the computer is a fourth preset distance, the smart watch records step data (or fourth step data) of the current user.
For example, taking the fourth preset distance equal to the first preset distance of 10 meters as an example, as shown in (c) of fig. 8, the smart watch continues to move away from the computer, and the distance between the smart watch and the computer is 10 meters, at this time, the smart watch may record the step data of the current user.
S6015, when the smart watch determines that the fourth step data is larger than the third step data, the smart watch is disconnected from the computer in a communication mode (or called short-distance wireless communication connection).
For example, as shown in fig. 8 (c), when the smart watch determines that the fourth step data is greater than the third step data, the smart watch may disconnect from the computer in communication at a fourth preset distance (e.g., 10 meters) from the computer.
By adopting the method in the above embodiment, when the electronic device is in the screen unlocking state, the electronic device can automatically perform screen locking when the user wears the wearable device and leaves the electronic device. When the electronic device is in the screen locking state, the electronic device can automatically perform screen unlocking when the user wears the wearable device and returns to the front of the electronic device. Thereby providing a more convenient screen locking and unlocking experience for the user. Moreover, the electronic device can judge whether the user wears the wearable device to move according to the acquired motion data of the user, so that the situation that the electronic device misjudges to lock or unlock the screen when the user does not wear the wearable device but the wearable device is translated is avoided, and the reliability of the electronic device in realizing automatic screen locking or unlocking through the method is improved.
Corresponding to the method in the foregoing embodiment, the embodiment of the present application further provides a screen locking and unlocking system. The system may include an electronic device and a wearable device. The electronic device is used for sending a broadcast signal under the condition that a screen is locked and short-distance wireless communication connection is not carried out with the wearable device; when short-distance wireless communication connection is established with the wearable device, receiving a short-distance wireless communication signal sent by the wearable device, and determining the distance between the electronic device and the wearable device according to the signal strength of the short-distance wireless communication signal; when the distance between the electronic device and the wearable device is determined to be smaller than or equal to a first threshold value, acquiring first motion data of a user from the wearable device; wherein the second preset distance is greater than the first threshold; when the fact that the first motion data of the user is increased compared with the motion data of the user obtained last time is determined, and the increased value is larger than or equal to a preset value, carrying out screen unlocking operation;
the wearable device is used for receiving the broadcast signal sent by the electronic device and determining the distance between the wearable device and the electronic device according to the signal intensity of the broadcast signal; when the distance between the wearable device and the electronic device is determined to be a first preset distance, recording first step data of a current user; when the distance between the wearable device and the electronic device is determined to be a second preset distance, recording second step data of the current user; wherein the second preset distance is smaller than the first preset distance; and when the second step number data is larger than the first step number data, establishing short-distance wireless communication connection with the electronic equipment according to the broadcast signal sent by the electronic equipment.
In a possible implementation manner, the electronic device is further configured to receive a short-range wireless communication signal sent by the wearable device and determine a distance between the electronic device and the wearable device according to signal strength of the short-range wireless communication signal, when the screen is unlocked and the wearable device is in short-range wireless communication connection; when the distance between the electronic device and the wearable device is determined to be larger than or equal to a second threshold value, acquiring second motion data of the user from the wearable device; when the acquired second motion data of the user is determined to be increased compared with the motion data of the user acquired last time, and the increased value is greater than or equal to a preset value, performing screen locking operation;
the wearable device is also used for receiving the short-distance wireless communication signal sent by the electronic device and determining the distance between the wearable device and the electronic device according to the signal strength of the short-distance wireless communication signal; when the distance between the wearable device and the electronic device is determined to be a third preset distance, recording third step data of the current user; when the distance between the wearable device and the electronic device is determined to be a fourth preset distance, recording fourth step data of the current user; the fourth preset distance is greater than the third preset distance and a second threshold value; and when the fourth step number data is determined to be larger than the third step number data, disconnecting the short-distance wireless communication connection with the electronic equipment.
In another possible implementation manner, the electronic device is further configured to send, to the wearable device, first indication information for indicating that the screen is unlocked; the wearable device is further used for receiving the first indication information and displaying a first interface used for indicating that the electronic device of the user is unlocked on the screen.
In another possible implementation manner, the electronic device is further configured to send, to the wearable device, first indication information for indicating that the screen is unlocked; the wearable device is further used for receiving the first indication information and performing vibration feedback.
In another possible implementation manner, the electronic device is specifically configured to turn on a camera by the electronic device to detect whether a non-authenticated user exists in front of the electronic device, where the non-authenticated user is an unverified user in login information of the electronic device; and if not, the electronic equipment performs screen unlocking operation.
In another possible implementation manner, the electronic device is further configured to send second indication information indicating that the screen is locked to the wearable device; and the wearable device is also used for receiving second indication information and displaying a second interface for indicating that the electronic equipment of the user is locked on the screen.
In another possible implementation manner, the electronic device is further configured to send second indication information used for indicating that the screen is locked to the wearable device; and the wearable device is also used for receiving the second indication information and carrying out vibration feedback.
In another possible implementation, the short-range wireless communication connection is a bluetooth connection.
In another possible implementation manner, the first preset distance is equal to the fourth preset distance and is 10 meters, the second preset distance is equal to the third preset distance and is 5 meters, the first threshold is 1 meter, and the second threshold is 3 meters.
In another possible implementation, the exercise data is the number of exercise steps, and the preset value is 50 steps.
An embodiment of the present application further provides an electronic device, including: a processor, a memory for storing instructions executable by the processor. The processor is configured to execute the instructions to enable the electronic device to realize the functions of the electronic device in the screen locking and unlocking method.
An embodiment of the present application further provides a wearable device, including: a processor, a memory for storing instructions executable by the processor. The processor is configured to execute the above instructions to enable the wearable device to implement the functions of the wearable device in the above methods for locking and unlocking the screen.
The above description is only an embodiment of the present application, but the scope of the present application is not limited thereto, and any changes or substitutions within the technical scope of the present disclosure 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.

Claims (20)

1. A method for locking and unlocking a screen, which is applied to a screen locking and unlocking system, wherein the screen locking and unlocking system comprises an electronic device and a wearable device, and the method comprises the following steps:
the electronic equipment transmits a broadcast signal under the condition that the screen of the electronic equipment is locked and short-distance wireless communication connection is not carried out with the wearable equipment;
the wearable device receives the broadcast signal sent by the electronic device, and determines the distance between the wearable device and the electronic device according to the signal strength of the broadcast signal;
when the wearable device determines that the distance between the wearable device and the electronic device is a first preset distance, the wearable device records first step data of a current user;
when the wearable device determines that the distance between the wearable device and the electronic device is a second preset distance, the wearable device records second step data of the current user; wherein the second preset distance is smaller than the first preset distance;
when the wearable device determines that the second step number data is larger than the first step number data, the wearable device establishes a short-range wireless communication connection with the electronic device according to the broadcast signal sent by the electronic device;
the electronic equipment receives a short-range wireless communication signal sent by the wearable equipment, and determines the distance between the electronic equipment and the wearable equipment according to the signal strength of the short-range wireless communication signal;
when the electronic device determines that the distance between the electronic device and the wearable device is smaller than or equal to a first threshold value, the electronic device acquires first motion data of a user from the wearable device; wherein the second preset distance is greater than the first threshold;
when the electronic equipment determines that the first motion data of the user is increased compared with the third motion data and the increased value is greater than or equal to a preset value, performing screen unlocking operation; wherein the third motion data is: when the distance between the electronic device and the wearable device is larger than a second threshold, the electronic device obtains the motion data of the user from the wearable device; the second threshold is greater than the first threshold.
2. The method of claim 1, further comprising:
the method comprises the steps that when the screen of the electronic equipment is unlocked and the electronic equipment is in short-distance wireless communication connection with the wearable equipment, the electronic equipment receives a short-distance wireless communication signal sent by the wearable equipment and determines the distance between the electronic equipment and the wearable equipment according to the signal strength of the short-distance wireless communication signal;
when the electronic device determines that the distance between the electronic device and the wearable device is greater than or equal to a second threshold, the electronic device acquires second motion data of the user from the wearable device;
when the electronic equipment determines that the second motion data of the obtained user is increased compared with fourth motion data and the increased value is greater than or equal to the preset value, performing screen locking operation; wherein the fourth motion data is: when the distance between the electronic device and the wearable device is smaller than the first threshold, the electronic device acquires motion data of the user from the wearable device;
the wearable device receives a short-range wireless communication signal sent by the electronic device, and determines the distance between the wearable device and the electronic device according to the signal strength of the short-range wireless communication signal;
when the wearable device determines that the distance between the wearable device and the electronic device is a third preset distance, the wearable device records third step data of a current user;
when the wearable device determines that the distance between the wearable device and the electronic device is a fourth preset distance, the wearable device records fourth step data of the current user; wherein the fourth preset distance is greater than the third preset distance and the second threshold;
and when the wearable device determines that the fourth step data is greater than the third step data, the wearable device and the electronic device are disconnected from short-range wireless communication connection.
3. The method according to claim 1, wherein after the screen unlocking operation is performed when the electronic device determines that the first motion data of the user is increased compared with the third motion data and the increased value is greater than or equal to a preset value, the method further comprises:
the electronic device sends first indication information used for indicating that a screen is unlocked to the wearable device;
and the wearable device receives the first indication information and displays a first interface for indicating that the electronic device is unlocked on the screen.
4. The method according to claim 1 or 3, wherein after the screen unlocking operation is performed when the electronic device determines that the first motion data of the user is increased compared with the third motion data and the increased value is greater than or equal to a preset value, the method further comprises:
the electronic device sends first indication information used for indicating that a screen is unlocked to the wearable device;
and the wearable device receives the first indication information and carries out vibration feedback.
5. The method of claim 1, wherein the performing a screen unlock operation comprises:
the electronic equipment starts a camera to detect whether a non-authenticated user exists in front of the electronic equipment, wherein the non-authenticated user is an unverified user in login information of the electronic equipment;
and if not, the electronic equipment performs screen unlocking operation.
6. The method according to claim 2, wherein when the electronic device determines that the acquired second motion data of the user is increased compared to fourth motion data and the increased value is greater than or equal to the preset value, a screen locking operation is performed, and then the method further comprises:
the electronic device sends second indication information used for indicating that a screen is locked to the wearable device;
and the wearable device receives the second indication information and displays a second interface for indicating that the electronic device is locked by the screen of the user.
7. The method according to claim 2 or 6, wherein when the electronic device determines that the acquired second motion data of the user is increased compared with fourth motion data and the increased value is greater than or equal to the preset value, a screen locking operation is performed, and then the method further comprises:
the electronic device sends second indication information used for indicating that a screen is locked to the wearable device;
and the wearable device receives the second indication information and performs vibration feedback.
8. A method according to claim 1 or 2, characterized in that the short range wireless communication connection is a bluetooth connection.
9. The method according to claim 2, wherein the first predetermined distance is equal to the fourth predetermined distance being 10 meters, the second predetermined distance is equal to the third predetermined distance being 5 meters, the first threshold value is 1 meter, and the second threshold value is 3 meters.
10. The method of claim 2, wherein the exercise data is exercise step number and the predetermined value is 50 steps.
11. A screen locking and unlocking system is characterized by comprising an electronic device and a wearable device;
the electronic equipment is used for sending a broadcast signal under the condition that a screen is locked and short-distance wireless communication connection is not carried out with the wearable equipment; when short-range wireless communication connection is established with the wearable device, receiving a short-range wireless communication signal sent by the wearable device, and determining the distance between the electronic device and the wearable device according to the signal strength of the short-range wireless communication signal; when the distance between the electronic device and the wearable device is determined to be smaller than or equal to a first threshold value, acquiring first motion data of a user from the wearable device; when it is determined that the first motion data of the user is increased compared with the third motion data and the increased value is greater than or equal to a preset value, performing screen unlocking operation; wherein the third motion data is: when the distance between the electronic device and the wearable device is larger than a second threshold, the electronic device obtains the motion data of the user from the wearable device; the second threshold is greater than the first threshold;
the wearable device is configured to receive the broadcast signal sent by the electronic device, and determine a distance between the wearable device and the electronic device according to signal strength of the broadcast signal; when the distance between the wearable device and the electronic device is determined to be a first preset distance, recording first step data of a current user; when the distance between the wearable device and the electronic device is determined to be a second preset distance, recording second step data of the current user; the second preset distance is smaller than the first preset distance, and the second preset distance is larger than the first threshold; and when the second step number data is determined to be larger than the first step number data, establishing short-distance wireless communication connection with the electronic equipment according to the broadcast signal sent by the electronic equipment.
12. The screen locking and unlocking system according to claim 11,
the electronic device is further configured to receive a short-range wireless communication signal sent by the wearable device and determine a distance between the electronic device and the wearable device according to signal strength of the short-range wireless communication signal, when the screen is unlocked and the wearable device is in short-range wireless communication connection with the wearable device; when the distance between the electronic device and the wearable device is determined to be larger than or equal to a second threshold value, acquiring second motion data of the user from the wearable device; when the second motion data of the acquired user is determined to be increased compared with the fourth motion data, and the increased value is greater than or equal to the preset value, performing screen locking operation; wherein the fourth motion data is: when the distance between the electronic device and the wearable device is smaller than the first threshold, the electronic device acquires motion data of the user from the wearable device;
the wearable device is further configured to receive a short-range wireless communication signal sent by the electronic device, and determine a distance between the wearable device and the electronic device according to the signal strength of the short-range wireless communication signal; when the distance between the wearable device and the electronic device is determined to be a third preset distance, recording third step data of the current user; when the distance between the wearable device and the electronic device is determined to be a fourth preset distance, recording fourth step data of the current user; wherein the fourth preset distance is greater than the third preset distance and the second threshold; and when the fourth step number data is determined to be larger than the third step number data, disconnecting short-distance wireless communication connection with the electronic equipment.
13. The screen locking and unlocking system according to claim 11, wherein the electronic device is further configured to send first indication information indicating that the screen is unlocked to the wearable device; the wearable device is further configured to receive the first indication information and display a first interface for indicating that the electronic device is unlocked on the screen of the user.
14. The screen locking and unlocking system according to claim 11 or 13, wherein the electronic device is further configured to send first indication information indicating that the screen is unlocked to the wearable device; the wearable device is further configured to receive the first indication information and perform vibration feedback.
15. The screen locking and unlocking system according to claim 11, wherein the electronic device is specifically configured to turn on a camera by the electronic device to detect whether a non-authenticated user exists in front of the electronic device, where the non-authenticated user is an unauthenticated user in login information of the electronic device; and if not, the electronic equipment performs screen unlocking operation.
16. The screen locking and unlocking system according to claim 12, wherein the electronic device is further configured to send second indication information indicating that the screen is locked to the wearable device; the wearable device is further configured to receive the second indication information and display a second interface for indicating that the electronic device is screen-locked by the user.
17. The screen locking and unlocking system according to claim 12 or 16, wherein the electronic device is further configured to send second indication information indicating that the screen is locked to the wearable device; the wearable device is further configured to receive the second indication information and perform vibration feedback.
18. The screen locking and unlocking system of claim 11 or 12 wherein the short range wireless communication connection is a bluetooth connection.
19. The screen locking and unlocking system of claim 12 wherein said first predetermined distance is equal to said fourth predetermined distance being 10 meters, said second predetermined distance is equal to said third predetermined distance being 5 meters, said first threshold value being 1 meter and said second threshold value being 3 meters.
20. The screen locking and unlocking system of claim 12 wherein said motion data is a number of motion steps and said preset value is 50 steps.
CN202110661365.9A 2021-06-15 2021-06-15 Screen locking and unlocking method and system Active CN113535247B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202110661365.9A CN113535247B (en) 2021-06-15 2021-06-15 Screen locking and unlocking method and system
PCT/CN2022/093913 WO2022262519A1 (en) 2021-06-15 2022-05-19 Screen locking method and system, and screen unlocking method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110661365.9A CN113535247B (en) 2021-06-15 2021-06-15 Screen locking and unlocking method and system

Publications (2)

Publication Number Publication Date
CN113535247A CN113535247A (en) 2021-10-22
CN113535247B true CN113535247B (en) 2022-10-14

Family

ID=78096074

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110661365.9A Active CN113535247B (en) 2021-06-15 2021-06-15 Screen locking and unlocking method and system

Country Status (2)

Country Link
CN (1) CN113535247B (en)
WO (1) WO2022262519A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113111399A (en) * 2021-04-21 2021-07-13 广东科学技术职业学院 Intelligent screen protection method and system applied to computer
CN113535247B (en) * 2021-06-15 2022-10-14 荣耀终端有限公司 Screen locking and unlocking method and system
CN116049790A (en) * 2022-06-28 2023-05-02 荣耀终端有限公司 Unlocking method and device and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103647587A (en) * 2013-12-30 2014-03-19 华为终端有限公司 Method and system for unlocking mobile terminal, mobile terminal and wearable electronic device
CN104615240A (en) * 2014-12-30 2015-05-13 小米科技有限责任公司 Terminal unlocking method and device
CN105872255A (en) * 2016-05-31 2016-08-17 努比亚技术有限公司 Device and method for achieving rapid unlocking
CN111695104A (en) * 2020-06-05 2020-09-22 北京百瑞互联技术有限公司 System and method for automatically locking and unlocking computer screen
CN112306614A (en) * 2020-11-05 2021-02-02 Oppo广东移动通信有限公司 Screen control method and device, electronic equipment, user equipment and readable medium

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20150017098A (en) * 2013-08-06 2015-02-16 삼성전자주식회사 An electronic device with touch screen and operating method thereof
CN104090710A (en) * 2014-06-25 2014-10-08 广东欧珀移动通信有限公司 Intelligent terminal unlocking method and intelligent terminal
CN104462914B (en) * 2014-11-14 2018-03-27 广东欧珀移动通信有限公司 A kind of unlocking screen method and terminal
CN106899745A (en) * 2015-12-18 2017-06-27 小米科技有限责任公司 Unlocking method, device and terminal
CN113535247B (en) * 2021-06-15 2022-10-14 荣耀终端有限公司 Screen locking and unlocking method and system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103647587A (en) * 2013-12-30 2014-03-19 华为终端有限公司 Method and system for unlocking mobile terminal, mobile terminal and wearable electronic device
CN104615240A (en) * 2014-12-30 2015-05-13 小米科技有限责任公司 Terminal unlocking method and device
CN105872255A (en) * 2016-05-31 2016-08-17 努比亚技术有限公司 Device and method for achieving rapid unlocking
CN111695104A (en) * 2020-06-05 2020-09-22 北京百瑞互联技术有限公司 System and method for automatically locking and unlocking computer screen
CN112306614A (en) * 2020-11-05 2021-02-02 Oppo广东移动通信有限公司 Screen control method and device, electronic equipment, user equipment and readable medium

Also Published As

Publication number Publication date
WO2022262519A1 (en) 2022-12-22
CN113535247A (en) 2021-10-22

Similar Documents

Publication Publication Date Title
CN113535247B (en) Screen locking and unlocking method and system
CN113225690B (en) Bluetooth connection method, system and electronic equipment
WO2021023032A1 (en) Device unlocking method and system, and related device
CN111742361B (en) Method for updating wake-up voice of voice assistant by terminal and terminal
CN109992189B (en) Screen control method, electronic device and storage medium
CN112585599A (en) Voice recognition method, wearable device and electronic device
EP3917182A1 (en) Automatic routing method for se, and electronic device
WO2021017988A1 (en) Multi-mode identity identification method and device
CN113581127A (en) Service processing method and device
CN113343193A (en) Identity verification method and device and electronic equipment
WO2022247571A1 (en) Method for switching virtual card, and electronic device
CN113196236A (en) Cross-device authentication method and electronic device
CN113553600A (en) Resource acquisition method, system, server and storage medium
CN113365274A (en) Network access method and electronic equipment
CN113242349B (en) Data transmission method, electronic equipment and storage medium
CN114812381B (en) Positioning method of electronic equipment and electronic equipment
CN116956311A (en) Asynchronous authorization method, system, electronic device and computer readable storage medium
CN116340913A (en) Login method, electronic equipment and computer readable storage medium
CN115599596B (en) Data processing method, electronic device, system and storage medium
WO2023116414A1 (en) Multi-screen unlocking method and electronic device
CN116074359A (en) Distribution network method and electronic equipment
CN113129636B (en) Vehicle information pushing method and device, user account server and user equipment
CN116801248A (en) Account management method, electronic device and computer readable storage medium
CN115250452A (en) Unlocking method and related equipment
CN114500725A (en) Target content transmission method, master device, slave device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant