US-12625930-B2 - Screen unlocking method and apparatus, and electronic device
Abstract
This application discloses a screen unlocking method and apparatus, and an electronic device, and pertains to the technical field of terminal devices. The screen unlocking method includes: obtaining a first position of a first hand in a case that a target interface is displayed on a screen of an electronic device, where the target interface includes the first hand; determining a first preset unlocking condition corresponding to the first position; receiving an unlocking input performed by a user; and unlocking the electronic device in response to the unlocking input in a case that the unlocking input matches the first preset unlocking condition.
Inventors
- Li Yin
Assignees
- VIVO MOBILE COMMUNICATION CO., LTD.
Dates
- Publication Date
- 20260512
- Application Date
- 20240110
- Priority Date
- 20210714
Claims (15)
- 1 . A screen unlocking method, comprising: obtaining a first position of a first hand when a target interface is displayed on a screen of an electronic device, wherein the target interface comprises the first hand; determining a first preset unlocking condition corresponding to the first position, wherein the first preset unlocking condition comprises a first preset track corresponding to the first position for unlocking the electronic device; receiving an unlocking input performed by a user; determining a moving track on the screen of the electronic device formed by the unlocking input from a moment the user touches the screen to a moment the user leaves the screen; and unlocking the electronic device in response to the unlocking input when the unlocking input moving track matches the first preset track.
- 2 . The screen unlocking method according to claim 1 , wherein the target interface comprises a watch face, and the first position is a position of the first hand in the watch face; and after obtaining the first position of the first hand, the method further comprises: determining an interval in which the first position is located, wherein the watch face comprises a plurality of intervals, the intervals correspond to different preset unlocking tracks, and the preset unlocking tracks comprise the first preset track.
- 3 . The screen unlocking method according to claim 1 , wherein the first hand comprises a first sub-hand and a second sub-hand, and the first position is a relative position between the first sub-hand and the second sub-hand; and determining the first preset unlocking condition corresponding to the first position comprises: determining an included angle between the first sub-hand and the second sub-hand according to the relative position between the first sub-hand and the second sub-hand; and determining the first preset track corresponding to the first position according to the included angle.
- 4 . The screen unlocking method according to claim 3 , wherein the included angle comprises a first included angle and a second included angle, and a sum of the first included angle and the second included angle is 360°; and after unlocking the electronic device, the method further comprises: displaying a first interface when the included angle is the first included angle; or displaying a second interface when the included angle is the second included angle, wherein the first preset unlocking condition comprises the first preset track and a second preset track, the first included angle corresponds to the first unlocking condition, and the second included angle corresponds to the second unlocking condition.
- 5 . The screen unlocking method according to claim 1 , wherein before unlocking the electronic device in response to the unlocking input when the moving track matches the first preset track, the method further comprises: obtaining input duration of the unlocking input; and keeping the electronic device in a locked state when the input duration is greater than preset duration; or detecting matching between the moving track and the first preset track when the input duration is less than or equal to the preset duration.
- 6 . An electronic device, comprising: a memory storing a computer program; and a processor coupled to the memory and configured to execute the computer program to perform operations comprising: obtaining a first position of a first hand when a target interface is displayed on a screen of the electronic device, wherein the target interface comprises the first hand; determining a first preset unlocking condition corresponding to the first position, wherein the first preset unlocking condition comprises a first preset track corresponding to the first position for unlocking the electronic device; receiving an unlocking input performed by a user; determining a moving track on the screen of the electronic device formed by the unlocking input from a moment the user touches the screen to a moment the user leaves the screen; and unlocking the electronic device in response to the unlocking input when the unlocking input moving track matches the first preset track.
- 7 . The electronic device according to claim 6 , wherein the target interface comprises a watch face, and the first position is a position of the first hand in the watch face; and after obtaining the first position of the first hand, the operations further comprise: determining an interval in which the first position is located, wherein the watch face comprises a plurality of intervals, the intervals correspond to different preset tracks, and the preset unlocking tracks comprise the first preset track.
- 8 . The electronic device according to claim 6 , wherein the first hand comprises a first sub-hand and a second sub-hand, and the first position is a relative position between the first sub-hand and the second sub-hand; and determining the first preset unlocking condition corresponding to the first position comprises: determining an included angle between the first sub-hand and the second sub-hand according to the relative position between the first sub-hand and the second sub-hand; and determining the first preset track corresponding to the first position according to the included angle.
- 9 . The electronic device according to claim 8 , wherein the included angle comprises a first included angle and a second included angle, and a sum of the first included angle and the second included angle is 360°; and after unlocking the electronic device, the operations further comprise: displaying a first interface when the included angle is the first included angle; or displaying a second interface when the included angle is the second included angle, wherein the first preset unlocking condition comprises the first preset track and a second preset track, the first included angle corresponds to the first unlocking condition, and the second included angle corresponds to the second unlocking condition.
- 10 . The electronic device according to claim 6 , wherein before unlocking the electronic device in response to the unlocking input when the moving track matches the first preset track, the operations further comprise: obtaining input duration of the unlocking input; and keeping the electronic device in a locked state when the input duration is greater than preset duration; or detecting matching between the moving track and the first preset track when the input duration is less than or equal to the preset duration.
- 11 . A non-transitory computer-readable storage medium, storing a computer program, wherein the computer program, when executed by a processor, causes the processor to perform operations comprising: obtaining a first position of a first hand when a target interface is displayed on a screen of an electronic device, wherein the target interface comprises the first hand; determining a first preset unlocking condition corresponding to the first position, wherein the first preset unlocking condition comprises a first preset track corresponding to the first position for unlocking the electronic device; receiving an unlocking input performed by a user; determining a moving track on the screen of the electronic device formed by the unlocking input from a moment the user touches the screen to a moment the user leaves the screen; and unlocking the electronic device in response to the unlocking input when the unlocking input moving track matches the first preset track.
- 12 . The non-transitory computer-readable storage medium according to claim 11 , wherein the target interface comprises a watch face, and the first position is a position of the first hand in the watch face; and after obtaining the first position of the first hand, the operations further comprise: determining an interval in which the first position is located, wherein the watch face comprises a plurality of intervals, the intervals correspond to different preset tracks, and the preset unlocking tracks comprise the first preset track.
- 13 . The non-transitory computer-readable storage medium according to claim 11 , wherein the first hand comprises a first sub-hand and a second sub-hand, and the first position is a relative position between the first sub-hand and the second sub-hand; and determining the first preset unlocking condition corresponding to the first position comprises: determining an included angle between the first sub-hand and the second sub-hand according to the relative position between the first sub-hand and the second sub-hand; and determining the first preset track corresponding to the first position according to the included angle.
- 14 . The non-transitory computer-readable storage medium according to claim 13 , wherein the included angle comprises a first included angle and a second included angle, and a sum of the first included angle and the second included angle is 360°; and after unlocking the electronic device, the operations further comprise: displaying a first interface when the included angle is the first included angle; or displaying a second interface when the included angle is the second included angle, wherein the first preset unlocking condition comprises the first preset track and a second preset track, the first included angle corresponds to the first unlocking condition, and the second included angle corresponds to the second unlocking condition.
- 15 . The non-transitory computer-readable storage medium according to claim 11 , wherein before unlocking the electronic device in response to the unlocking input when the moving track matches the first preset track, the operations further comprise: obtaining input duration of the unlocking input; and keeping the electronic device in a locked state when the input duration is greater than preset duration; or detecting matching between the moving track and the first preset track when the input duration is less than or equal to the preset duration.
Description
CROSS-REFERENCE TO RELATED APPLICATIONS This application is a continuation of International Application No. PCT/CN2022/105206, filed Jul. 12, 2022, which claims priority to Chinese Patent Application No. 202110795267.4, filed Jul. 14, 2021. The entire contents of each of the above-referenced applications are expressly incorporated herein by reference. TECHNICAL FIELD This application relates to the technical field of terminal devices, and specifically relates to a screen unlocking method and apparatus, and an electronic device. BACKGROUND With the popularity of wearable devices, smart watches have entered people's lives and are favored by users due to information processing capabilities and compliance with basic watch technology requirements. Currently, smart watches usually allow users to enter interfaces through sliding or double tapping. With the development of wearable devices, the amount of data stored inside is increasing, including some private data. Therefore, it is necessary to lock the device. The existing sliding unlocking method is relatively simple, affecting user experience. SUMMARY Embodiments of this application provide a screen unlocking method and apparatus, and an electronic device. According to a first aspect, a screen unlocking method is provided, including: obtaining a first position of a first hand in a case that a target interface is displayed on a screen of an electronic device, where the target interface includes the first hand;determining a first preset unlocking condition corresponding to the first position;receiving an unlocking input performed by a user; andunlocking the electronic device in response to the unlocking input in a case that the unlocking input matches the first preset unlocking condition. According to a second aspect, a screen unlocking apparatus is provided, including: a first obtaining module, configured to obtain a first position of a first hand in a case that a target interface is displayed on a screen of an electronic device, where the target interface includes the first hand;a first determining module, configured to determine a first preset unlocking condition corresponding to the first position;a receiving module, configured to receive an unlocking input performed by a user; anda first execution module, configured to unlock the electronic device in response to the unlocking input in a case that the unlocking input matches the first preset unlocking condition. According to a third aspect, an electronic device is provided. The electronic device includes a processor, a memory, and a program or an instruction that is stored in the memory and that can be run on the processor, and the program or the instruction is executed by the processor to implement the steps of the method according to the first aspect. According to a fourth aspect, a readable storage medium is provided. The readable storage medium stores a program or an instruction, and the program or the instruction is executed by a processor to implement the steps of the method according to the first aspect. According to a fifth aspect, an embodiment of this application provides a chip. The chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is configured to run a program or an instruction to implement the method according to the first aspect. According to a sixth aspect, an embodiment of this application provides a computer program product. The computer program product is executed by at least one processor to implement the method according to the first aspect. BRIEF DESCRIPTION OF DRAWINGS The accompanying drawings described herein are intended to provide a further understanding of the present application, and constitute a part of the present application. The illustrative embodiments of the present application and descriptions thereof are intended to describe the present application, and do not constitute limitations on the present application. In the accompanying drawings: FIG. 1 is a flowchart of a screen unlocking method according to an embodiment of this application; FIG. 2 is a schematic diagram of an interface of an electronic device according to an embodiment of this application; FIG. 3 is a schematic diagram of an unlocking track according to an embodiment of this application; FIG. 4 is a schematic diagram of an unlocking input according to an embodiment of this application; FIG. 5 is a schematic diagram of an interface of another electronic device according to an embodiment of this application; FIG. 6 is a schematic diagram of another unlocking track according to an embodiment of this application; FIG. 7 is a schematic diagram of an interface of an electronic device according to an embodiment of this application; FIG. 8 is a schematic diagram of an interface of another electronic device according to an embodiment of this application; FIG. 9 is a schematic diagram of another unlocking input according to an embodiment of