Terminal unlocking method and device, electronic equipment and storage medium
By acquiring the target image on the smart terminal and matching the color type and unlocking operations, the problem of low unlocking efficiency when using the shortcut camera is solved, and the effect of simplifying the unlocking process and improving efficiency is achieved.
Patent Information
- Application Number
- CN202411208193.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-30
- Publication Date
- 2025-01-14
AI Technical Summary
When using a shortcut camera, the unlocking efficiency of the smart terminal is low. It requires frequent exit from the shortcut camera and re-unlocking the home screen, which is cumbersome and inefficient.
The target image is obtained through the shortcut camera function, and the color type selection and unlocking operations are performed in the user interaction interface. The color type is used to match the preset matching results and unlocking operation methods to directly realize the unlocking of the smart terminal.
The process of exiting the shortcut camera function is simplified, the unlocking efficiency is improved when using the shortcut camera, the steps of traditional unlocking methods are reduced, and the operation efficiency is improved.
Smart Images

Figure CN119311179A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent terminals, and in particular to a terminal unlocking method, device, electronic equipment and storage medium. Background Art
[0002] With the popularity of smart terminal devices, the quick camera function has also emerged. The quick camera function is designed to provide users with a more convenient and fast camera experience. It is a function that quickly starts the camera application through specific operations (such as gestures, buttons, etc.). It allows users to take photos or videos directly without entering the main screen or camera application of the smart terminal. However, when the user uses the quick camera to take photos and wants to enter the main screen, they need to exit the quick camera and then re-enter the main screen through the unlocking operation. This operation is too cumbersome and inefficient. Therefore, how to provide a terminal unlocking method that can improve the unlocking efficiency when using the quick camera has become an urgent problem to be solved. Summary of the invention
[0003] The embodiment of the present invention provides a terminal unlocking method, which aims to solve the problem of low unlocking efficiency when using a quick camera in the prior art. When the smart terminal is in a locked screen state and the quick camera function is activated, the target image is obtained through the quick camera function, and the target image is directly displayed on the user interaction interface, so that the user can select the color type and unlock the operation in the user interaction interface, thereby obtaining the first matching result and the second matching result corresponding to the second, and then unlocking the smart terminal. Since the unlocking can be performed directly according to the target image, it simplifies the method of exiting the quick camera function and then performing the traditional unlocking, so the unlocking efficiency can be improved when using the quick camera.
[0004] In a first aspect, an embodiment of the present invention provides a terminal unlocking method, which is applied to a smart terminal, wherein the smart terminal is deployed with a quick camera function, and the smart terminal includes a user interaction interface, and the method includes the following steps:
[0005] When the screen is locked and it is detected that the quick camera function is activated, acquiring a target image based on the quick camera function;
[0006] Displaying the target image on the user interaction interface, and receiving color type selection data and unlocking operation mode for the target image on the user interaction interface;
[0007] Matching the color type selection data with the preset unlocking color type to obtain a first matching result, and matching the unlocking operation mode with the preset unlocking operation data to obtain a second matching result;
[0008] Based on the first matching result and the second matching result, determine whether to unlock the smart terminal.
[0009] Optionally, acquiring a target image based on the quick camera function includes:
[0010] Based on the shooting function key deployed in the quick camera function, acquiring the shot image;
[0011] Performing color detection on the captured image to obtain a first color detection result, wherein the first color detection result includes at least one color type;
[0012] When the first color detection result includes all color types corresponding to the preset unlocking color types, the captured image is determined as the target image.
[0013] Optionally, acquiring a target image based on the quick camera function further includes:
[0014] When the first color detection result does not include all color types corresponding to the preset unlocking color types, continuously adjusting the shooting angle through the quick camera function to obtain at least one preview image;
[0015] When the preview image includes all color types corresponding to the preset unlocking color types, the adjustment is stopped and the corresponding preview image is determined as the target image.
[0016] Optionally, the selection method corresponding to the color type selection data includes first click selection, each first click selection corresponds to a color type, and the receiving of the color type selection data for the target image on the user interaction interface includes:
[0017] When a user clicks and contacts the target image in the user interaction interface through a fingertip, determining a contact area between the fingertip and the target image;
[0018] Counting the number of pixels corresponding to each color type in the contact area;
[0019] Based on the quantity, a color type corresponding to the first click selection is determined.
[0020] Optionally, the selection method corresponding to the color type selection data includes second click selection, each second click selection corresponds to a color type, and the receiving of the color type selection data for the target image on the user interaction interface includes:
[0021] Amplifying the target image in the user interaction interface to obtain an amplified target image;
[0022] When the user clicks and contacts the enlarged target image in the user interaction interface through a fingertip, determining a contact area between the fingertip and the enlarged target image;
[0023] Counting the number of pixels corresponding to each color type in the contact area;
[0024] Based on the quantity, a color type corresponding to the second click selection is determined.
[0025] Optionally, the selection method corresponding to the color type selection data includes circle selection, and each circle selection corresponds to a color type. The receiving of the color type selection data for the target image on the user interaction interface includes:
[0026] When the user continuously contacts the target image in the user interaction interface through a fingertip, a movement trajectory of the fingertip is recorded to obtain a circled area;
[0027] Counting the number of pixels corresponding to each color type in the circled area;
[0028] Based on the quantity, a color type corresponding to the circle selection is determined.
[0029] Optionally, the color type selection data corresponds to at least one color type; and the receiving of an unlocking operation mode for the target image on the user interaction interface includes:
[0030] When the color type selection data is received, recording the user's click operation on the color type in the user interaction interface through a fingertip, the click operation including the click order, click duration, and click times;
[0031] Using a thread to monitor the click operation, obtaining at least one of the click sequence, the click duration, and the click number;
[0032] The unlocking operation mode is determined based on at least one of the click sequence, the click duration, and the click number.
[0033] In a second aspect, an embodiment of the present invention further provides a terminal unlocking device, the terminal unlocking device comprising:
[0034] An acquisition module, configured to acquire a target image based on the quick camera function when the screen is in a locked state and the quick camera function is detected to be activated;
[0035] A receiving module, used for displaying the target image on the user interaction interface, and receiving color type selection data and unlocking operation mode for the target image on the user interaction interface;
[0036] A matching module, used for matching the color type selection data with a preset unlocking color type to obtain a first matching result, and matching the unlocking operation mode with a preset unlocking operation data to obtain a second matching result;
[0037] A determination module is used to determine whether to unlock the smart terminal based on the first matching result and the second matching result.
[0038] In a third aspect, an embodiment of the present invention provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps in the terminal unlocking method provided in an embodiment of the present invention when executing the computer program.
[0039] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps in the terminal unlocking method provided in the embodiment of the invention are implemented.
[0040] In an embodiment of the present invention, when the smart terminal is in a locked screen state and the quick camera function is detected to be activated, a target image is obtained based on the quick camera function; the target image is displayed on the user interaction interface, and the color type selection data and unlocking operation mode of the target image in the user interaction interface are received; the color type selection data is matched with the preset unlocking color type to obtain a first matching result, and the unlocking operation mode is matched with the preset unlocking operation data to obtain a second matching result; based on the first matching result and the second matching result, it is determined whether to unlock the smart terminal. When the smart terminal is in a locked screen state and the quick camera function is activated, the target image is obtained through the quick camera function, and the target image is directly displayed on the user interaction interface, so that the user can select the color type and unlock the operation in the user interaction interface, thereby obtaining the first matching result and the second matching result corresponding to the second, and then unlocking the smart terminal. Since the unlocking can be performed directly according to the target image, it simplifies the method of exiting the quick camera function and then performing the traditional unlocking, so that the unlocking efficiency can be improved when using the quick camera. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0042] Figure 1is a flow chart of a terminal unlocking method provided by an embodiment of the present invention;
[0043] Figure 2 is a schematic structural diagram of a terminal unlocking device provided in an embodiment of the present invention;
[0044] Figure 3 It is a structural schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0045] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0046] like Figure 1 As shown, Figure 1 : is a flow chart of a terminal unlocking method provided by an embodiment of the present invention, including:
[0047] 101. When the screen is locked and it is detected that the quick camera function is activated, a target image is acquired based on the quick camera function.
[0048] In the embodiment of the present invention, the terminal unlocking method can be applied to a smart terminal, which can be any terminal device with a user interaction interface, a shooting function and a lock screen function, for example, a smart phone, a smart tablet, a smart watch, a portable computer, etc. The user interaction interface can be simply understood as the screen of a smart phone, a screen of a smart tablet, a screen of a smart watch, a screen of a portable computer, etc. The target image includes target color types corresponding to all preset unlocking color types, and the preset unlocking color type can be at least one color type pre-set by the user to unlock the smart terminal.
[0049] Specifically, colors of the same color may be considered as a category, colors of the same hue may be considered as a category, colors of the same saturation may be considered as a category, or colors of the same brightness may be considered as a category.
[0050] Alternatively, a hue range, saturation range and brightness range can be set based on the color, hue, saturation and brightness of the above-mentioned color. When there is a color identical to the above-mentioned color in the image and it is in the same hue range, the same saturation range and the same brightness range, the above-mentioned color can be determined as the target color type.
[0051] More specifically, when the above intervals are divided, the division granularity can be determined according to the above preset unlocking color types. Usually, there are multiple preset unlocking color types, and there are differences in color, hue, saturation and brightness between every two color types. Therefore, the hue difference, saturation difference and brightness difference between every two color types can be calculated. The smallest hue difference is used as the division granularity of the above hue interval, the smallest saturation difference is used as the division granularity of the above saturation interval, and the smallest brightness difference is used as the division granularity of the above brightness interval.
[0052] It should be noted that the above hue difference can be determined by calculating the relative positions of the two colors on the color wheel. The above color wheel can be a 360-degree circle, and each color corresponds to an angle. For example, red is usually located at 0 degrees or 360 degrees, green is approximately located at 120 degrees, and blue is approximately located at 240 degrees. For example, the hue difference between red and green is the angle difference between red and green on the color wheel, that is, 120 degrees.
[0053] The lock screen state can be understood as the above-mentioned smart terminal being in an unlocked state. In the unlocked state, the main interface of the above-mentioned smart terminal cannot be entered, but the quick camera function can still be entered through specific buttons or gestures. Therefore, when the above-mentioned smart terminal device is in the lock screen state and enters the quick camera function, it can wait for the user to press the shooting function key deployed in the quick camera function to control the acquisition camera deployed on the above-mentioned smart terminal device to acquire the captured image, and when the color types in the captured image include all the above-mentioned preset unlock color types, the above-mentioned captured image is determined as the target image.
[0054] Alternatively, when the captured image does not include all of the preset unlocking color types, a preview image can be obtained by adjusting the shooting angle of the acquisition camera, and a preview image including all of the preset unlocking color types can be determined as the target image among the preview images.
[0055] 102. Display the target image on the user interaction interface, and receive color type selection data and unlocking operation mode for the target image on the user interaction interface.
[0056] In an embodiment of the present invention, the color type selection data may be obtained by the user operating the target image in the user interaction interface. The color type selection data may be determined by the user clicking the target image in the user interaction interface. The unlocking operation mode may be achieved by interacting with the target image in any one or more combinations. For example, it may be an interactive mode such as clicking, long pressing, sliding, etc.
[0057] 103. Match the color type selection data with the preset unlocking color type to obtain a first matching result, and match the unlocking operation mode with the preset unlocking operation data to obtain a second matching result.
[0058] In an embodiment of the present invention, the preset unlocking operation data may be preset in any one or more ways of interacting with the target color type and stored in the form of data. For example, the unlocking operation data may include at least one of the click sequence data, click duration data, and click count data for the color type (or understood as the target color type) corresponding to the unlocking operation data. The unlocking operation mode includes the click sequence mode corresponding to the click sequence data, the click duration mode corresponding to the click duration data, and the click count mode corresponding to the click count data.
[0059] The color type selection data and the preset unlocking color type are also stored in the form of data, specifically, they can be stored in a cached manner. After obtaining the color type selection data, the color type selection data can be directly matched with the preset unlocking color type to obtain the above-mentioned first matching result, wherein the first matching result may include a matching degree (when the color type selection data includes and only includes all preset unlocking color types, the matching degree is 100%) and a non-preset unlocking color type corresponding to the color type selection data (when the matching degree is 100%, the non-preset unlocking color type is empty).
[0060] It should be noted that when recording the above unlocking operation mode, the data corresponding to the click sequence mode, the click duration mode, and the number of clicks on the same color type can be recorded equally, and the preset unlocking operation data can be at least one of the click sequence data, the click duration data, and the number of clicks on the same color type. Therefore, when matching, according to the data corresponding to the unlocking operation data (i.e., at least one of the click sequence data, the click duration data, and the number of clicks on the same color type), only the corresponding unlocking operation mode (i.e., at least one of the click sequence data, the click duration data, and the number of clicks on the same color type) can be extracted for matching, without matching all unlocking operation modes (i.e., all click sequence modes, number of clicks modes, and click duration modes) with the unlocking operation mode. This can improve the matching speed and thus improve the terminal unlocking efficiency.
[0061] For example, the preset unlock operation data may only include click sequence data, wherein the preset unlock operation data may specifically be to select the red category first and then the purple category, when the unlock operation mode is to click the red category first and then the purple category, or it may be a sliding mode, to touch the red category first and then slide to the purple category, the second matching result is a successful match. Otherwise, the second matching result is a failed match.
[0062] Alternatively, the preset unlocking operation data may only include click quantity data. The preset unlocking operation data may specifically be clicking on any color twice in a row and then clicking on another color once. For example, clicking on the red type twice in a row and clicking on the purple type once. When the unlocking operation method is to first click on the red type twice and then click on the purple type once, or first click on the purple type once and then click on the red type twice, the second matching result is a successful match.
[0063] Alternatively, the preset unlock operation data may only include click duration data, and the preset unlock operation data may specifically be clicking on any color type, and the click duration sequence is long press, long press, short press, and short press. When the unlock operation mode is long press on the red type, long press on the red type, short press on the red type, and short press on the red type, the second matching result is a successful match. Otherwise, the second matching result is a failed match.
[0064] Alternatively, the preset unlocking operation data may also include any combination of the above three unlocking methods: color sequence, number of clicks, and click duration. For example, the preset unlocking operation data may specifically be to click on the color categories in the order of first the red category and then the purple category, and during the clicking process, the red category is long pressed twice and the purple category is short pressed once. When the unlocking operation method is long pressing the red category, long pressing the red category, and short pressing the purple category, the second matching result is a successful match. Otherwise, the second matching result is a failed match.
[0065] It is understandable that the color type selection data may be the selection data when the user selects the color type to be used for unlocking in the target image of the user interaction interface. For example, when the color type selection data includes red and purple, and the preset unlocking color types also include red and purple, the first matching result is a successful match, otherwise the first matching result is a failed match.
[0066] It should be further explained that the matching between the color type selection data and the preset unlocking color type can also refer to the above intervals (ie, the above hue interval, saturation interval, and brightness interval).
[0067] For example, although the target color type obtained in the target image actually captured is green, the above-mentioned preset unlocking color types also include green, but there is a certain difference in the hue, brightness or saturation of the green in the two. Therefore, if the two greens are in the same hue range, the same saturation range and the same brightness range, the corresponding first matching result is still a successful match. On the contrary, if they are not in the same hue range, the same saturation range and the same brightness range, the corresponding first matching result is a failed match.
[0068] Alternatively, at least one of the hue range, saturation range, and brightness range may be used as a basis for determining the first matching result, so as to reduce the use of computing resources and improve matching efficiency.
[0069] 104. Determine whether to unlock the smart terminal based on the first matching result and the second matching result.
[0070] In an embodiment of the present invention, the first matching result may be a successful match or a failed match, and the second matching result may also be a successful match or a failed match. When both the first matching result and the second matching result are successful matches, the smart terminal may be unlocked. When at least one of the first matching result and the second matching result is a failed match, the smart terminal cannot be unlocked.
[0071] Alternatively, if it is understood in chronological order, when the color type selection data is obtained by the terminal unlocking method provided by the embodiment of the present invention, the color type selection data can be immediately matched with the preset unlocking color type to obtain the first matching result. When the first matching result is a successful match, the unlocking operation mode is matched with the preset unlocking operation data. Alternatively, when the first matching result is a failed match, it is not necessary to determine the second matching result. Instead, it is necessary to prompt the user that the first matching result is a failed match and the color type needs to be reselected to determine the new color type selection data.
[0072] In an embodiment of the present invention, when the smart terminal is in a locked screen state and the quick camera function is detected to be activated, a target image is obtained based on the quick camera function; the target image is displayed on the user interaction interface, and the color type selection data and unlocking operation mode of the target image in the user interaction interface are received; the color type selection data is matched with the preset unlocking color type to obtain a first matching result, and the unlocking operation mode is matched with the preset unlocking operation data to obtain a second matching result; based on the first matching result and the second matching result, it is determined whether to unlock the smart terminal. When the smart terminal is in a locked screen state and the quick camera function is activated, the target image is obtained through the quick camera function, and the target image is directly displayed on the user interaction interface, so that the user can select the color type and unlock the operation in the user interaction interface, thereby obtaining the first matching result and the second matching result corresponding to the second, and then unlocking the smart terminal. Since the unlocking can be performed directly according to the target image, it simplifies the method of exiting the quick camera function and then performing the traditional unlocking, so that the unlocking efficiency can be improved when using the quick camera.
[0073] It is understandable that in the specific implementation of the present application, data related to target images, captured images, preview images, etc. are involved. When the embodiments in the present application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data and the construction, training and use of related models need to comply with relevant laws, regulations and standards of relevant countries and regions.
[0074] It should be noted that the terminal unlocking method provided in the embodiment of the present invention can be applied to devices such as computers and servers that can perform terminal unlocking.
[0075] Optionally, in the step of acquiring the target image based on the quick camera function, the captured image can also be acquired based on the shooting function key deployed in the quick camera function; color detection is performed on the captured image to obtain a first color detection result, and the first color detection result includes at least one color type; when the first color detection result includes color types corresponding to all preset unlock color types, the captured image is determined as the target image.
[0076] In an embodiment of the present invention, the color detection can be implemented by color detection tools such as OpenCV library and Google ML Kit deployed in the smart terminal. Specifically, color detection can be performed on each pixel in the captured image to obtain a color detection result corresponding to each pixel, and the color detection result of each pixel is classified according to the hue range, saturation range, brightness range and color obtained by the above division granularity to obtain the color type corresponding to each pixel, and after deduplication of the color type corresponding to each pixel, the first color detection result is obtained.
[0077] It is understandable that the target image needs to meet all the color types required by the preset unlocking color types before it can be used to unlock the smart terminal. Therefore, when the first color detection result corresponding to the above-mentioned captured image includes the color types corresponding to all the preset unlocking color types, the corresponding color type can be determined as the target color type, and the captured image can be determined as the target image. When the above conditions are not met, the above-mentioned captured image cannot be used as a target image to unlock the smart terminal. At this time, the smart terminal can be unlocked by other methods or other captured images. For example, the shooting angle of the acquisition camera on the above-mentioned smart terminal can be changed, and other captured images can be obtained by reshooting to achieve the unlocking of the smart terminal.
[0078] Optionally, in the step of acquiring the target image based on the quick camera function, when the first color detection result does not include color types corresponding to all preset unlock color types, the shooting angle can be continuously adjusted through the quick camera function to obtain at least one preview image; until the preview image includes color types corresponding to all preset unlock color types, the adjustment is stopped and the corresponding preview image is determined as the target image.
[0079] In an embodiment of the present invention, since the target image needs to satisfy all color types required by the preset unlock color types, when the first color detection result does not include color types corresponding to all preset unlock color types, the shooting angle can be continuously adjusted through the quick camera function to obtain at least one preview image. Until any preview image includes color types corresponding to all preset unlock color types, the adjustment is stopped, the corresponding color type is determined as the target color type, and the corresponding preview image is determined as the target image.
[0080] Specifically, the above-mentioned angle adjustment can be implemented through any angle unit, for example, it can be an angle, radian, gradient, etc. Each angle adjustment can be to adjust one unit of angle, radian or gradient. Each time an adjustment is made, a preview image is collected. When a preview image of a color type corresponding to all preset unlocking color types is collected, the adjustment is stopped, and the corresponding preview image is determined as the target image, and the corresponding color type is determined as the target color type.
[0081] It is understandable that if when the angle adjustment reaches the upper limit (for example, 360°), there is still no preview image that meets all the preset unlock color types, it means that there is no color that meets the preset unlock color types within the current environment of the smart terminal. At this time, an alternative unlocking scheme can be enabled. For example, the captured image can be used as the target image and the target image can be displayed on the user interaction interface. The user can use the above-mentioned unlocking method of the number of clicks, that is, only need to click the same color in the target image to meet the preset alternative unlocking scheme (for example, the order of clicking the same color is long press, long press, short press).
[0082] Optionally, in the step of receiving color type selection data for the target image in the user interaction interface, the contact area between the fingertip and the target image can be determined when the user clicks and contacts the target image in the user interaction interface with the fingertip; the number of pixels corresponding to each color type in the contact area is counted; and based on the number, the color type corresponding to the first click selection is determined.
[0083] In the embodiment of the present invention, the selection method corresponding to the color type selection data includes first click selection, and each first click selection corresponds to a color type. The first click selection can be understood as direct selection, that is, direct selection without other preprocessing.
[0084] When the user touches the target image in the user interaction interface with his fingertips, a contact area is generated with the user interaction interface. The user interaction interface may be a capacitive touch screen. When the contact occurs, the contact area can be determined by analyzing the change and strength of the capacitive field. By counting the number of pixels corresponding to each color type in the contact area, the color type with the largest number of pixels is determined as the color type selected by the user in the current first click selection.
[0085] Optionally, in the step of receiving color type selection data for the target image in the user interaction interface, the target image can also be enlarged in the user interaction interface to obtain an enlarged target image; when the user clicks and contacts the enlarged target image in the user interaction interface with a fingertip, the contact area between the fingertip and the enlarged target image is determined; the number of pixels corresponding to each color type in the contact area is counted; and based on the number, the color type corresponding to the second click selection is determined.
[0086] In an embodiment of the present invention, the selection method corresponding to the color type selection data includes second click selection, and each second click selection corresponds to a color type. The second click selection can be understood as performing a preprocessing before performing a selection. The preprocessing can be an amplification process.
[0087] Specifically, after the target image is displayed on the user interaction interface, the target image can be magnified according to a preset magnification to obtain an enlarged target image. When the user clicks and contacts the enlarged target image in the user interaction interface through the fingertip, the contact area is determined by the change and intensity of the capacitance field. It can be understood that when the contact area is larger, the area of capacitance change is wider and the signal corresponding to the capacitance is stronger. And by counting the number of pixels corresponding to each color type in the above contact area, the color type with the largest number of pixels is determined as the color type selected by the user in the current second click selection.
[0088] Optionally, in the step of receiving color type selection data for the target image in the user interaction interface, when the user continuously contacts the target image in the user interaction interface with the fingertips, the movement trajectory of the fingertips can be recorded to obtain the circled area; the number of pixels corresponding to each color type in the circled area can be counted; and based on the number, the color type corresponding to the circled selection can be determined.
[0089] In the embodiment of the present invention, the selection method corresponding to the color type selection data includes circle selection, and each circle selection corresponds to a color type. The circle selection can be understood as defining an area through a sliding operation to achieve circle selection.
[0090] Specifically, when the user continuously contacts the target image in the user interaction interface with the fingertip, the movement trajectory of the user's fingertip can be recorded according to the change of the above-mentioned capacitance field to obtain the circled area. And by counting the number of pixels corresponding to each color type in the above-mentioned circled area, the color type with the largest number of pixels is determined as the color type selected by the user in the current circled selection.
[0091] Optionally, the color type selection data corresponds to at least one color type. In the step of receiving the unlocking operation method for the target image in the user interaction interface, when the color type selection data is received, the user's click operation on the color type in the user interaction interface through the fingertips is recorded, and the click operation includes the click order, click duration and number of clicks; the click operation is monitored by a thread to obtain at least one of the click order, click duration and number of clicks; and the unlocking operation method is determined based on at least one of the click order, click duration and number of clicks.
[0092] In an embodiment of the present invention, the click operation may include a click order, a click duration, and a click count for colors. The click order may be understood in the form of a sequence table, and the color types are recorded in the sequence table in sequence according to the click order. The click duration is used to determine whether the user performs a long press or a short press each time. When the click operation is completed, a click sequence table is obtained, and the number of clicks of each color type in the color type by the user is counted in the click sequence table.
[0093] It should be noted that, in the above-mentioned click sequence (which may correspond to the click sequence method in the above-mentioned text), click duration (which may correspond to the click duration method in the above-mentioned text) and click count (which may correspond to the click count method in the above-mentioned text), the click sequence corresponds to the click sequence data in the above-mentioned preset unlocking operation data, the click duration corresponds to the click duration data in the above-mentioned preset unlocking operation data, and the above-mentioned click count corresponds to the click count data in the above-mentioned preset unlocking operation data. After recording the above-mentioned click sequence, click duration and click count, the operation corresponding to the preset unlocking operation data can be selected from the above-mentioned click sequence, click duration and click count as the above-mentioned unlocking operation method.
[0094] For example, if the preset unlocking operation data only includes click sequence data and click duration data, the click sequence and click duration can be used as the unlocking operation mode, and the above-mentioned number of clicks can be directly eliminated to save cache space.
[0095] Specifically, the above record can be understood as recording the data obtained by the user through clicking in the user interface, including the click coordinates and the click time. While recording the above click coordinates and the click time, the monitoring task deployed in the thread is used to monitor the above click coordinates and the click time, so as to determine at least one of the click sequence, click duration and the number of clicks based on the click coordinates and the click time. For example, the number of clicks can be determined by the number of times the click coordinates are in the same color area from the beginning to the end of the click operation, or the click duration can be determined by the start time to the end time of each click from the beginning to the end of the click operation, or the click coordinates of each click can be arranged according to the click time from the beginning to the end of the click operation to obtain the above click sequence.
[0096] Therefore, the data actually corresponding to the above-mentioned click operation are the click coordinates and the click time, but the above-mentioned click coordinates and click time include the above-mentioned click order, click duration and number of clicks. Therefore, by utilizing the monitoring task deployed in the thread, at least one of the above-mentioned click order, click duration and number of clicks can be obtained from the above-mentioned click coordinates and click time, thereby determining the unlocking operation method for the target image in the user interaction interface.
[0097] It should be noted that the above-mentioned click sequence corresponds to a first monitoring task, the above-mentioned click duration corresponds to a second monitoring task, and the above-mentioned number of clicks also corresponds to a third monitoring task, that is, there can be at most three monitoring tasks, and the above-mentioned three monitoring tasks can be deployed in at least one thread. The specific deployment method can be determined according to the computing power of a thread. If the computing power of a thread can meet the three monitoring tasks, the above-mentioned three monitoring tasks can be deployed in one thread at the same time. If the computing power of a thread can only meet two monitoring tasks, two threads are required, and two monitoring tasks are deployed in one thread, and the remaining monitoring task is deployed in the other thread. If the computing power of a thread can only meet one monitoring task, each monitoring task requires a corresponding thread for deployment. If three threads are required, the three threads are parallel operations. If two threads are required, the two threads are parallel budgets. If only one thread is required, the above-mentioned one thread can be directly enabled.
[0098] like Figure 2 As shown, an embodiment of the present invention further provides a terminal unlocking device, comprising:
[0099] The acquisition module 201 is used to acquire a target image based on the quick camera function when the screen is in a locked state and it is detected that the quick camera function is activated;
[0100] The receiving module 202 is used to display the target image on the user interaction interface, and receive color type selection data and unlocking operation mode of the target image on the user interaction interface;
[0101] A matching module 203, configured to match the color type selection data with the preset unlocking color type to obtain a first matching result, and to match the unlocking operation mode with the preset unlocking operation data to obtain a second matching result;
[0102] The determination module 204 is configured to determine whether to unlock the smart terminal based on the first matching result and the second matching result.
[0103] Optionally, the acquisition module 201 includes:
[0104] An acquisition submodule, used for acquiring a captured image based on a capture function key deployed in the quick camera function;
[0105] A first detection submodule, configured to perform color detection on the captured image to obtain a first color detection result, wherein the first color detection result includes at least one color type;
[0106] The first determination submodule is configured to determine the captured image as the target image when the first color detection result includes color types corresponding to all the preset unlocking color types.
[0107] Optionally, the acquisition module 201 further includes:
[0108] an adjustment submodule, configured to, when the first color detection result does not include all color types corresponding to the preset unlocking color types, continuously adjust the shooting angle through the quick camera function to obtain at least one preview image;
[0109] The second determination submodule is configured to stop the adjustment and determine the corresponding preview image as the target image until the preview image includes all color types corresponding to the preset unlocking color types.
[0110] Optionally, the selection method corresponding to the color type selection data includes first click selection, each first click selection corresponds to a color type, and the receiving module 202 includes:
[0111] A first calculation submodule, configured to determine a contact area between a fingertip and the target image when a user clicks and contacts the target image in the user interaction interface through a fingertip;
[0112] A first statistical submodule, used for counting the number of pixels corresponding to each color type in the contact area;
[0113] A third determination submodule is configured to determine, based on the quantity, a color type corresponding to the first click selection.
[0114] Optionally, the selection method corresponding to the color type selection data includes a second click selection, each second click selection corresponds to a color type, and the receiving module 202 includes
[0115] A first magnification submodule, used for magnifying the target image in the user interaction interface to obtain a magnified target image;
[0116] A second calculation submodule is used to determine a contact area between the fingertip and the enlarged target image when the user clicks and contacts the enlarged target image in the user interaction interface through the fingertip;
[0117] A second statistical submodule is used to count the number of pixels corresponding to each color type in the contact area;
[0118] The fourth determination submodule is used to determine the color type corresponding to the second click selection based on the quantity.
[0119] Optionally, the selection method corresponding to the color type selection data includes circle selection, and each circle selection corresponds to a color type. The receiving module 202 includes
[0120] A first recording submodule, configured to record a movement track of a fingertip when the user continuously contacts the target image in the user interaction interface through the fingertip, and obtain a circled area;
[0121] A third statistical submodule is used to count the number of pixels corresponding to each color type in the circled area;
[0122] The fifth determination submodule is used to determine the color type corresponding to the circled selection based on the quantity.
[0123] Optionally, the color type selection data corresponds to at least one color type, and the receiving module 202 includes:
[0124] A second recording submodule is used to record, when receiving the color type selection data, a click operation of the user on the color type in the user interaction interface through a fingertip, wherein the click operation includes a click order, a click duration, and a click count;
[0125] A fourth statistics submodule, using a thread to monitor the click operation, and obtain at least one of the click sequence, the click duration, and the click number;
[0126] The sixth determination submodule is used to determine the unlocking operation mode based on at least one of the click sequence, the click duration, and the click number.
[0127] like Figure 3 As shown, an embodiment of the present invention further provides an electronic device, characterized in that it includes a processor, and the processor can execute any of the above-mentioned terminal unlocking methods.
[0128] Specifically, it includes a processor 301 and a memory 302, and a computer program for executing a terminal unlocking method that is stored in the memory 302 and can be run on the processor 301, wherein:
[0129] The processor 301 runs the computer program of the terminal unlocking method stored in the memory 302 and performs the following steps:
[0130] When the screen is locked and it is detected that the quick camera function is activated, acquiring a target image based on the quick camera function;
[0131] Displaying the target image on the user interaction interface, and receiving color type selection data and unlocking operation mode for the target image on the user interaction interface;
[0132] Matching the color type selection data with the preset unlocking color type to obtain a first matching result, and matching the unlocking operation mode with the preset unlocking operation data to obtain a second matching result;
[0133] Based on the first matching result and the second matching result, determine whether to unlock the smart terminal.
[0134] Optionally, the acquiring of the target image based on the quick camera function performed by the processor 301 includes:
[0135] Based on the shooting function key deployed in the quick camera function, acquiring the shot image;
[0136] Performing color detection on the captured image to obtain a first color detection result, wherein the first color detection result includes at least one color type;
[0137] When the first color detection result includes all color types corresponding to the preset unlocking color types, the captured image is determined as the target image.
[0138] Optionally, the acquiring of the target image based on the quick camera function performed by the processor 301 further includes:
[0139] When the first color detection result does not include all color types corresponding to the preset unlocking color types, continuously adjusting the shooting angle through the quick camera function to obtain at least one preview image;
[0140] When the preview image includes all color types corresponding to the preset unlocking color types, the adjustment is stopped and the corresponding preview image is determined as the target image.
[0141] Optionally, the selection method corresponding to the color type selection data includes first click selection, each first click selection corresponds to a color type, and the receiving of the color type selection data for the target image on the user interaction interface executed by the processor 301 includes:
[0142] When a user clicks and contacts the target image in the user interaction interface through a fingertip, determining a contact area between the fingertip and the target image;
[0143] Counting the number of pixels corresponding to each color type in the contact area;
[0144] Based on the quantity, a color type corresponding to the first click selection is determined.
[0145] Optionally, the selection method corresponding to the color type selection data includes second click selection, each second click selection corresponds to a color type, and the receiving of the color type selection data for the target image on the user interaction interface executed by the processor 301 includes:
[0146] Amplifying the target image in the user interaction interface to obtain an amplified target image;
[0147] When the user clicks and contacts the enlarged target image in the user interaction interface through a fingertip, determining a contact area between the fingertip and the enlarged target image;
[0148] Counting the number of pixels corresponding to each color type in the contact area;
[0149] Based on the quantity, a color type corresponding to the second click selection is determined.
[0150] Optionally, the selection method corresponding to the color type selection data includes circle selection, and each circle selection corresponds to a color type. The receiving of the color type selection data for the target image on the user interaction interface executed by the processor 301 includes:
[0151] When the user continuously contacts the target image in the user interaction interface through a fingertip, a movement trajectory of the fingertip is recorded to obtain a circled area;
[0152] Counting the number of pixels corresponding to each color type in the circled area;
[0153] Based on the quantity, a color type corresponding to the circle selection is determined.
[0154] Optionally, the color type selection data corresponds to at least one color type, and the receiving, by the processor 301, an unlocking operation mode of the target image on the user interaction interface includes:
[0155] When the color type selection data is received, recording the user's click operation on the color type in the user interaction interface through a fingertip, the click operation including the click order, click duration, and click times;
[0156] Using a thread to monitor the click operation, obtaining at least one of the click sequence, the click duration, and the click number;
[0157] The unlocking operation mode is determined based on at least one of the click sequence, the click duration, and the click number.
[0158] An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the various processes of the terminal unlocking method or the application-side terminal unlocking method provided in the embodiment of the present invention are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0159] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the above-mentioned computer program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the above-mentioned computer-readable storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.
[0160] The above disclosure is only the preferred embodiment of the present invention, which certainly cannot be used to limit the scope of the present invention. Therefore, equivalent changes made according to the claims of the present invention are still within the scope of the present invention.
Claims
1. A terminal unlocking method, applied to a smart terminal, wherein the smart terminal at least provides a quick camera function and a user interaction interface, characterized in that: The method comprises the following steps: When the smart terminal is in a locked screen state and detects that the quick camera function is activated, acquiring a target image based on the quick camera function; Displaying the target image on the user interaction interface, and receiving color type selection data and unlocking operation mode for the target image on the user interaction interface; Matching the color type selection data with the preset unlocking color type to obtain a first matching result, and matching the unlocking operation mode with the preset unlocking operation data to obtain a second matching result; Based on the first matching result and the second matching result, determine whether to unlock the smart terminal.
2. The terminal unlocking method according to claim 1, characterized in that: The acquiring of the target image based on the quick camera function comprises: Based on the shooting function key deployed in the quick camera function, acquiring the shot image; Performing color detection on the captured image to obtain a first color detection result, wherein the first color detection result includes at least one color type; When the first color detection result includes all color types corresponding to the preset unlocking color types, the captured image is determined as the target image.
3. The terminal unlocking method according to claim 2, characterized in that: The acquiring of the target image based on the quick camera function further includes: When the first color detection result does not include all color types corresponding to the preset unlocking color types, continuously adjusting the shooting angle through the quick camera function to obtain at least one preview image; When the preview image includes all color types corresponding to the preset unlocking color types, the adjustment is stopped and the corresponding preview image is determined as the target image.
4. The terminal unlocking method according to claim 1, characterized in that: The selection method corresponding to the color type selection data includes a first click selection, each of the first click selections corresponds to a color type, and the receiving of the color type selection data for the target image on the user interaction interface includes: When a user clicks and contacts the target image in the user interaction interface through a fingertip, determining a contact area between the fingertip and the target image; Counting the number of pixels corresponding to each color type in the contact area; Based on the quantity, a color type corresponding to the first click selection is determined.
5. The terminal unlocking method according to claim 1, characterized in that: The selection method corresponding to the color type selection data includes a second click selection, each second click selection corresponds to a color type, and the receiving of the color type selection data for the target image on the user interaction interface includes: Amplifying the target image in the user interaction interface to obtain an amplified target image; When the user clicks and contacts the enlarged target image in the user interaction interface through a fingertip, determining a contact area between the fingertip and the enlarged target image; Counting the number of pixels corresponding to each color type in the contact area; Based on the quantity, a color type corresponding to the second click selection is determined.
6. The terminal unlocking method according to claim 1, characterized in that: The color type selection data corresponding to the selection method includes circle selection, each circle selection corresponds to a color type, and the receiving of the color type selection data for the target image on the user interaction interface includes: When the user continuously contacts the target image in the user interaction interface through a fingertip, a movement trajectory of the fingertip is recorded to obtain a circled area; Counting the number of pixels corresponding to each color type in the circled area; Based on the quantity, a color type corresponding to the circle selection is determined.
7. The terminal unlocking method according to claim 1, characterized in that: The color type selection data corresponds to at least one color type, and the receiving of an unlocking operation mode for the target image on the user interaction interface includes: When the color type selection data is received, recording the user's click operation on the color type in the user interaction interface through a fingertip, the click operation including the click order, click duration, and click times; Using a thread to monitor the click operation, obtaining at least one of the click sequence, the click duration, and the click number; The unlocking operation mode is determined based on at least one of the click sequence, the click duration, and the click number.
8. A terminal unlocking device, characterized in that: The terminal unlocking device comprises: An acquisition module, configured to acquire a target image based on the quick camera function when the screen is in a locked state and the quick camera function is detected to be activated; A receiving module, used for displaying the target image on the user interaction interface, and receiving color type selection data and unlocking operation mode for the target image on the user interaction interface; A matching module, used for matching the color type selection data with the preset unlocking color type to obtain a first matching result, and matching the unlocking operation mode with the preset unlocking operation data to obtain a second matching result; A determination module is used to determine whether to unlock the smart terminal based on the first matching result and the second matching result.
9. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the steps in the terminal unlocking method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the terminal unlocking method according to any one of claims 1 to 7 are implemented.