Fingerprint unlocking method, electronic equipment and computer readable storage medium

By maintaining display brightness and color consistency through pixel value adjustments, the method improves user experience during optical fingerprint unlocking.

CN119249391AActive Publication Date: 2025-01-03HONOR DEVICE CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202410314278.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-03-18
Publication Date
2025-01-03
Estimated Expiration
2044-03-18

AI Technical Summary

Technical Problem

The change in display brightness and color during optical fingerprint unlocking due to mode transitions affects user experience.

Method used

A method that maintains display brightness and color consistency by using mapping relationships to adjust pixel brightness and color values during fingerprint unlocking, ensuring no perceptible changes occur.

Benefits of technology

Prevents noticeable changes in display brightness and color during fingerprint unlocking, enhancing user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119249391A_ABST
    Figure CN119249391A_ABST
Patent Text Reader

Abstract

The invention provides a fingerprint unlocking method, electronic equipment and a computer readable storage medium. The fingerprint unlocking method comprises the steps of obtaining a first display brightness value of a first frame in response to a fingerprint unlocking instruction; and determining a second color value of the first pixel point in the second frame according to a first mapping relationship corresponding to the first display brightness value, so that the second color value is the same as the first color value of the first pixel point in the first frame. The first pixel point is any pixel point of a display screen of the electronic equipment; the second brightness of the first pixel point in the second frame is equal to the first brightness of the first pixel point in the first frame; the first mapping relation corresponding to the first display brightness value represents the mapping relation between the brightness and the color value of the pixel point; displaying a second frame of image according to the second color value, and collecting a fingerprint image; and performing fingerprint unlocking according to the fingerprint image. Therefore, the brightness and the color of the display screen of the electronic equipment do not change in the fingerprint unlocking process, and the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of terminals, and in particular to a fingerprint unlocking method, an electronic device and a computer-readable storage medium. Background Art

[0002] The principle of optical fingerprint unlocking is to illuminate the fingerprint in the identification area through the light source under the display screen of the electronic device, perform fingerprint recognition, and achieve unlocking. The brightness adjustment mode of the electronic device for the display screen is divided into pulse width modulation (PWM) mode and direct current (DC) mode. In order to achieve optical fingerprint unlocking, the brightness adjustment mode of the electronic device needs to be adjusted to DC mode. When the electronic device performs optical fingerprint unlocking, if the dimming mode of the electronic device is switched from PWM mode to DC mode, the display brightness value (DBV) and grayscale value of the electronic device will change. The changes in DBV and grayscale value will cause the color of the display to change, resulting in the color of the display changing before and after the optical fingerprint unlocking, affecting the user experience. Summary of the invention

[0003] The present application provides a fingerprint unlocking method, an electronic device and a computer-readable storage medium, which solve the problem in the prior art that the color of the electronic device changes before and after fingerprint unlocking.

[0004] In order to achieve the above objectives, this application adopts the following technical solutions:

[0005] In a first aspect, a fingerprint unlocking method is provided, which is applied to an electronic device, comprising:

[0006] In response to a fingerprint unlocking instruction, obtain a first display brightness value of a first frame; determine a second color value of a first pixel in a second frame according to a first mapping relationship corresponding to the first display brightness value, so that the second color value is the same as the first color value of the first pixel in the first frame; the first pixel is any pixel of a display screen of the electronic device; the second frame is the next frame of the first frame, and the second brightness of the first pixel in the second frame is equal to the first brightness of the first pixel in the first frame; the first mapping relationship corresponding to the first display brightness value represents a mapping relationship between the brightness of a pixel and a color value; display an image of the second frame according to the second color value, and collect a fingerprint image; the image of the second frame includes indication information, and the indication information is used to indicate that the electronic device is performing fingerprint unlocking; and fingerprint unlocking is performed according to the fingerprint image.

[0007] In the above embodiment, when fingerprint unlocking is performed, for the first pixel of the display screen, the second color value of the first pixel in the second frame is determined according to the first mapping relationship corresponding to the first display brightness value of the first frame. Since the first mapping relationship corresponding to the first display brightness value represents the mapping relationship between the brightness and color value of the pixel, the first brightness of the first pixel in the first frame is equal to the brightness of the first pixel in the second frame. Therefore, the second color value calculated according to the first mapping relationship corresponding to the first display brightness value is the same as the first color value of the first pixel in the first frame. The moment of the first frame is the moment when the fingerprint unlocking instruction is received, and the moment of the second frame is the moment when the electronic device displays the indication information to collect the fingerprint image and recognize the fingerprint image. Therefore, displaying the image of the second frame according to the second color value can prevent the brightness and color of the display screen of the electronic device from changing during the fingerprint unlocking process, thereby improving the user experience.

[0008] In one embodiment, the first color value is determined according to the first brightness and the first mapping relationship corresponding to the first display brightness value. For example, when the electronic device enters the lock screen state, the DBV of the display screen is determined, and the color value of each pixel is determined according to the first mapping relationship corresponding to the DBV. Afterwards, the first color value of the first pixel in the first frame is determined according to the first mapping relationship corresponding to the first display brightness value of the first frame. By determining the color values ​​of the first frame and the second frame according to the brightness of the pixel, the colors of the first frame and the second frame can be made the same.

[0009] In one embodiment, the first color value is determined according to the first grayscale value of the first pixel in the first frame, the first display brightness value, and a second mapping relationship; the second mapping relationship represents a mapping relationship between display brightness value, grayscale value, and color value; in the case of the same brightness, the color value determined according to the second mapping relationship is the same as the color value determined according to the first mapping relationship corresponding to the first display brightness value. The first mapping relationship corresponding to the first display brightness is obtained based on the second mapping relationship and the first display brightness, so that in the case of unchanged brightness of the pixel, the color value determined according to the second mapping relationship is the same as the color value determined according to the first mapping relationship corresponding to the first display brightness.

[0010] In one embodiment, after performing fingerprint unlocking according to the fingerprint image, the method further includes:

[0011] Determine a third color value of the first pixel in the third frame according to the second mapping relationship, the third display brightness value of the third frame, and the third grayscale value of the first pixel in the third frame;

[0012] The image of the third frame is displayed according to the third display brightness value, the third grayscale value, and the third color value, and the time interval between the third frame and the second frame is a preset time length.

[0013] In the above embodiment, the image of the third frame is the image displayed on the display screen after unlocking, which is in a normal display state. In the normal display state, switching to determine the color value of the pixel point according to the second mapping relationship can make the display screen present a better display effect.

[0014] In one embodiment, the previous frame of the image of the third frame includes the indication information, and the image of the third frame does not include the indication information. For example, the indication information is a fingerprint light spot, and the third frame is the moment when the fingerprint light spot is extinguished. From the third frame on, the display screen displays the image in full screen, so from the third frame on, the color value of the pixel point is determined according to the second mapping relationship, which can ensure a better display effect of the display screen.

[0015] In one embodiment, determining the second color value of the first pixel in the second frame according to the first mapping relationship corresponding to the first display brightness value includes:

[0016] If the first display brightness value is less than a preset display brightness value, the second color value is determined according to a first mapping relationship corresponding to the first display brightness value, so that the colors of the first frame and the second frame can be consistent when the display brightness value changes.

[0017] The method further comprises:

[0018] If the first display brightness value is greater than or equal to the preset display brightness value, the display brightness value of the display screen will not change when unlocking, and the second color value is determined according to the second mapping relationship, and no sudden color change will occur when unlocking.

[0019] In one embodiment, the method further comprises:

[0020] Generate a plurality of first correspondences, wherein the first correspondences are correspondences between brightness and display brightness values ​​and grayscale values;

[0021] Determine a second correspondence between a plurality of reference brightnesses and the plurality of color values ​​according to the plurality of grayscale values ​​and the plurality of color values ​​corresponding to the first display brightness value in the second mapping relationship;

[0022] Taking the second corresponding relationship as a reference, determining a third corresponding relationship between brightness and color value in each of the first corresponding relationships;

[0023] A first mapping relationship corresponding to the first display brightness value is generated according to the plurality of third corresponding relationships.

[0024] In the above embodiment, the reference brightness is determined by the first display brightness value and each grayscale value in the second mapping relationship, and the first mapping relationship corresponding to the first display brightness value is generated based on the color value corresponding to the reference brightness. This allows the color values ​​determined by the first mapping relationship and the second mapping relationship corresponding to the first display brightness value to be the same when the brightness of the display screen is the first display brightness value and the brightness of the pixel point remains unchanged.

[0025] In one embodiment, determining the second color value of the first pixel in the second frame according to the first mapping relationship corresponding to the first display brightness value includes:

[0026] The second brightness of the first pixel is determined according to the first display brightness value and the first grayscale value; the second color value is determined according to the second brightness and the first mapping relationship corresponding to the first display brightness value. The first mapping relationship corresponding to the first display brightness value can be directly queried according to the brightness of each pixel to determine the color value of each pixel.

[0027] In one embodiment, displaying the image of the second frame according to the second color value includes:

[0028] According to the first display brightness value, the first grayscale value, and the second display brightness value, determine the second grayscale value of the first pixel in the second frame, the second display brightness value is the display brightness value required for collecting the fingerprint image, and the first display brightness value is less than the second display brightness value; according to the second display brightness value, the second grayscale value, and the second color value, display the image of the second frame. Exemplarily, according to the second display brightness value, the grayscale value of each pixel, and the color value, control the brightness and color of the OLED corresponding to each pixel to display the image of the second frame.

[0029] In a second aspect, a fingerprint unlocking device is provided, which is applied to an electronic device, including:

[0030] An acquisition module, configured to acquire a first display brightness value of a first frame in response to a fingerprint unlocking instruction;

[0031] A determination module, configured to determine a second color value of a first pixel in a second frame according to a first mapping relationship corresponding to the first display brightness value, so that the second color value is the same as the first color value of the first pixel in the first frame; the first pixel is any pixel of a display screen of the electronic device; the second frame is a next frame of the first frame, and the second brightness of the first pixel in the second frame is equal to the first brightness of the first pixel in the first frame; the first mapping relationship corresponding to the first display brightness value represents a mapping relationship between brightness of a pixel and a color value;

[0032] A display module, used to display the image of the second frame according to the second color value, and to collect a fingerprint image; the image of the second frame includes indication information, and the indication information is used to indicate that the electronic device is performing fingerprint unlocking;

[0033] The unlocking module is used to perform fingerprint unlocking according to the fingerprint image.

[0034] In one embodiment, the first color value is determined according to a first mapping relationship between the first brightness and the first display brightness value.

[0035] In one embodiment, the first color value is determined according to the first grayscale value of the first pixel in the first frame, the first display brightness value, and a second mapping relationship; the second mapping relationship represents a mapping relationship between display brightness value, grayscale value and color value; when the brightness is the same, the color value determined according to the second mapping relationship is the same as the color value determined according to the first mapping relationship corresponding to the first display brightness value.

[0036] In one embodiment, the determination module is further configured to:

[0037] Determine a third color value of the first pixel in the third frame according to the second mapping relationship, the third display brightness value of the third frame, and the third grayscale value of the first pixel in the third frame;

[0038] The image of the third frame is displayed according to the third display brightness value, the third grayscale value, and the third color value, and the time interval between the third frame and the second frame is a preset time length.

[0039] In one embodiment, the previous frame of image of the third frame includes the indication information, and the image of the third frame does not include the indication information.

[0040] In one embodiment, the determination module is specifically used for:

[0041] If the first display brightness value is less than a preset display brightness value, determining the second color value according to a first mapping relationship corresponding to the first display brightness value;

[0042] The method further comprises:

[0043] If the first display brightness value is greater than or equal to the preset display brightness value, the second color value is determined according to the second mapping relationship.

[0044] In one embodiment, the determination module is further configured to:

[0045] Generate a plurality of first correspondences, wherein the first correspondences are correspondences between brightness and display brightness values ​​and grayscale values;

[0046] Determine a second correspondence between a plurality of reference brightnesses and the plurality of color values ​​according to the plurality of grayscale values ​​and the plurality of color values ​​corresponding to the first display brightness value in the second mapping relationship;

[0047] Taking the second corresponding relationship as a reference, determining a third corresponding relationship between brightness and color value in each of the first corresponding relationships;

[0048] A first mapping relationship corresponding to the first display brightness value is generated according to the plurality of third corresponding relationships.

[0049] In one embodiment, the determination module is specifically used for:

[0050] Determine the second brightness of the first pixel according to the first display brightness value and the first grayscale value;

[0051] The second color value is determined according to a first mapping relationship between the second brightness and the first display brightness value.

[0052] In one embodiment, the display module is specifically used for:

[0053] Determine a second grayscale value of the first pixel in the second frame according to the first display brightness value, the first grayscale value, and the second display brightness value, wherein the second display brightness value is a display brightness value required for collecting the fingerprint image, and the first display brightness value is less than the second display brightness value;

[0054] The image of the second frame is displayed according to the second display brightness value, the second grayscale value, and the second color value.

[0055] In a third aspect, an electronic device is provided, comprising a processor, wherein the processor is used to execute a computer program stored in a memory to implement the fingerprint unlocking method as described in the first aspect above.

[0056] In a fourth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the fingerprint unlocking method as described in the first aspect above is implemented.

[0057] In a fifth aspect, a chip is provided, comprising a processor, wherein the processor is coupled to a memory, and the processor executes a computer program or instruction stored in the memory to implement the fingerprint unlocking method as described in the first aspect above.

[0058] In a sixth aspect, a computer program product is provided. When the computer program product is run on an electronic device, the electronic device executes the fingerprint unlocking method described in the first aspect.

[0059] It can be understood that the beneficial effects of the second to sixth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0060] Figure 1 A fingerprint unlocking scenario diagram provided in an embodiment of the present application;

[0061] Figure 2 A schematic diagram of a gamma curve provided in an embodiment of the present application;

[0062] Figure 3 A schematic diagram of a mapping relationship of different gamma curves provided in an embodiment of the present application;

[0063] Figure 4 A schematic diagram of a correspondence relationship between different DBVs and grayscale value adjustment ratios provided in an embodiment of the present application;

[0064] Figure 5 A schematic diagram of the corresponding relationship between DBV, grayscale value and color coordinates provided in an embodiment of the present application;

[0065] Figure 6 A schematic diagram of the fingerprint unlocking method provided in the embodiment of the present application;

[0066] Figure 7 A schematic diagram of a first corresponding relationship provided in an embodiment of the present application;

[0067] Figure 8 A schematic diagram of a first mapping relationship provided in an embodiment of the present application;

[0068] Fig. 9 A schematic diagram of a display screen provided in an embodiment of the present application displaying an image of a second frame;

[0069] Fig.10 A schematic diagram of determining the color of each frame image according to the second mapping relationship provided in an embodiment of the present application;

[0070] Fig.11 A schematic diagram of determining the color of each frame image according to a first mapping relationship and a second mapping relationship provided in an embodiment of the present application;

[0071] Fig.12 A software architecture diagram of an electronic device provided in an embodiment of the present application;

[0072] Fig.13 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0073] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.

[0074] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.

[0075] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0076] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.

[0077] In addition, in the description of the present application, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.

[0078] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0079] For example, the electronic device described in the embodiments of the present application may be a mobile phone, a tablet computer, a handheld computer, a personal digital assistant (PDA), an augmented reality (AR) / virtual reality (VR) device, a media player, a wearable device, or other device that can be held / operated with one hand. The embodiments of the present application do not impose any special restrictions on the specific form / type of the electronic device. The above-mentioned electronic devices include but are not limited to devices equipped with Devices running Harmony OS or other operating systems.

[0080] The fingerprint unlocking method provided in the embodiment of the present application is applied to the scenario of fingerprint unlocking, and the fingerprint unlocking method is optical fingerprint unlocking.

[0081] like Figure 1 As shown, the principle of optical fingerprint unlocking is as follows. When the electronic device detects that the user places a finger on the fingerprint recognition area 11 on the display screen, the light source under the display screen emits light and illuminates the fingerprint recognition area. After that, the electronic device obtains a fingerprint image based on the light reflected by the fingerprint recognition area. If the fingerprint image is consistent with the pre-stored unlock image, the unlocking is successful. If the fingerprint image is inconsistent with the unlocking image, the unlocking fails.

[0082] In order to obtain a fingerprint image, during the fingerprint image acquisition process (ie, the process of the light source irradiating the fingerprint recognition area and receiving the light reflected by the fingerprint recognition area), the light source in the fingerprint recognition area must emit light stably.

[0083] In an embodiment of the present application, the display screen of the electronic device is an organic light-emitting diode (OLED) display screen, and the display screen includes a plurality of pixels. The electronic device adjusts the brightness of the display screen by controlling the brightness of the OLED corresponding to each pixel.

[0084] The brightness adjustment modes of the electronic device for OLED include DC mode and PWM mode. The DC mode is a way to adjust the brightness by adjusting the size of the input voltage. The PWM mode is a way to adjust the brightness by adjusting the duty cycle of the pulse width modulation signal. The pulse width modulation signal alternates between high level and low level in one cycle. For example, when the pulse width modulation signal is at a high level, the OLED does not emit light, and when the pulse width modulation signal is at a low level, the OLED emits light. Therefore, in the PWM mode, the OLED does not emit light continuously, and the display screen is in a state of alternating light and dark.

[0085] The brightness adjustment mode of the OLED corresponding to all pixels of the display screen is consistent. Therefore, when the brightness adjustment mode is PWM mode, the light emission of the OLED in the fingerprint recognition area is unstable and an accurate fingerprint image cannot be obtained. In order to obtain an accurate fingerprint image, the brightness adjustment mode of the electronic device for the OLED must be DC dimming mode.

[0086] DBV represents the brightness level of the display screen, which can be expressed as a numerical value. For example, DBV is any value between 0 and 4095. One frame of image corresponds to one DBV. When the grayscale value of each pixel remains unchanged, the larger the DBV, the brighter the display screen. For example, Figure 2 The DBV curve is a schematic diagram. The horizontal axis represents DBV, and the vertical axis represents the brightness corresponding to DBV under a white screen, and the unit is nit. That is, the curve represents the maximum brightness corresponding to different DBVs.

[0087] When DBV is less than the preset display brightness value, the brightness adjustment mode is the PWM mode, and when DBV is greater than or equal to the preset display brightness value, the brightness adjustment mode is the DC mode.

[0088] If the electronic device detects a fingerprint unlocking instruction when the DBV of the display screen is less than the preset display brightness value, it is necessary to adjust the DBV of the display screen to the preset display brightness value in the next frame after the fingerprint unlocking is detected, that is, switch the brightness adjustment mode to DC mode, so that the fingerprint image can be collected.

[0089] Adjusting the DBV of the display screen to a preset display brightness value refers to determining the brightness of the OLED corresponding to each pixel point according to a color correction curve (gamma curve) corresponding to the preset display brightness value.

[0090] The gamma curve represents the correspondence between the grayscale value of a pixel and the brightness of the pixel (i.e., the brightness of the OLED corresponding to the pixel). For any pixel, the brightness of the pixel can be determined based on the grayscale value of the pixel and the gamma curve. By controlling the input voltage or current of the OLED corresponding to the pixel, the pixel can reach the corresponding brightness.

[0091] Different DBVs correspond to different gamma curves. For any pixel, when the grayscale value remains unchanged, the larger the DBV, the brighter the pixel. The grayscale value represents the brightness level of the pixel. For any pixel, different colors from black to white correspond to different grayscale values. For example, the grayscale value is any value between 0 and 255. The larger the grayscale value, the closer the color of the pixel is to white, and the higher the brightness of the pixel; the smaller the grayscale value, the closer the color of the pixel is to black, and the lower the brightness of the pixel.

[0092] During the fingerprint unlocking process, in order to prevent the user from noticing the change in the brightness of the display screen, the brightness of each pixel needs to be kept constant. The constant brightness of each pixel means that the input voltage or current of each pixel remains constant, which also means that the absolute brightness of the display screen remains constant. If the electronic device detects a fingerprint unlocking instruction when the DBV of the display screen is less than the preset display brightness value, the DBV of the display screen needs to be adjusted to the preset display brightness value in the next frame after the fingerprint unlocking is detected, that is, the DBV of the next frame needs to be increased so that the DBV of the next frame is the preset display brightness value.

[0093] For any pixel, the brightness of the pixel is determined by the DBV and grayscale value of the display screen. When the DBV of the next frame increases, in order to keep the brightness of the pixel unchanged, the grayscale value of the pixel needs to be reduced in the next frame.

[0094] For example, Figure 3 As shown, when the DBV of the display screen is 800, the corresponding gamma curve is curve 31, and when the DBV of the display screen is 1000, the corresponding gamma curve is curve 32. If the preset display brightness value is 1000, and the electronic device detects a fingerprint unlocking command when the DBV of the display screen is 800, then the DBV of the display screen needs to be switched to 1000 in the next frame after the fingerprint unlocking command is detected, that is, the brightness of each pixel needs to be adjusted according to the gamma curve corresponding to the DBV of 1000. For one of the pixels, when the fingerprint unlocking command is detected (DBV is 800), the grayscale value is L255, then corresponding to point A, the brightness value of the pixel is 30nit. In the next frame (DBV is 1000), in order to keep the brightness value of the pixel at 30nit, the corresponding point B has a brightness value of 30nit and a grayscale value of L150.

[0095] That is, for one of the pixels, when a fingerprint unlocking command is detected, the DBV is 800 and the grayscale value is 255. In order to keep the brightness of the pixel unchanged during fingerprint unlocking, the DBV of the next frame is 1000 and the grayscale value is 150.

[0096] Point A and point B are two points on different gamma curves, and the brightness of the pixels corresponding to point A and point B is equal, then there is a mapping relationship between point A and point B. Similarly, two points with equal brightness of pixels on two gamma curves are two points with a mapping relationship. For any pixel point, according to the DBV and grayscale value of the display when the fingerprint unlocking command is detected, the grayscale value of the pixel point in the next frame can be obtained according to the mapping relationship.

[0097] Exemplarily, when a fingerprint unlocking instruction is detected, the electronic device obtains the DBV of the display screen when the fingerprint unlocking instruction is detected (first frame), the grayscale value of each pixel when the fingerprint unlocking instruction is detected (first frame), and the preset display brightness value. For any pixel, according to formula 1: (L1 / 255) 2.2 *D1=(L2 / 255) 2.2 *D2 can calculate the grayscale value of the pixel in the next frame (second frame) where the fingerprint unlocking command is detected. Wherein, L1 represents the grayscale value of the pixel in the first frame, D1 represents the brightness value of the display screen corresponding to the DBV of the first frame, L2 represents the grayscale value of the pixel in the second frame, and D2 represents the brightness value of the display screen corresponding to the preset display brightness value. Wherein, DBV is the brightness level, and the value of DBV is determined according to the maximum brightness value and the minimum brightness value of the display screen, as well as the number of divided levels. Therefore, each DBV corresponds to the brightness value of a display screen, and the unit of the brightness value of the display screen corresponding to DBV is nit.

[0098] In one embodiment, the grayscale adjustment ratio corresponding to the mapping between different DBVs and preset display brightness values ​​(i.e., keeping the brightness of the pixel unchanged when switching from different DBVs to preset display brightness values) is stored in advance. Figure 4 As shown, for each decimal DBV (first column data), the corresponding hexadecimal DBV (second column data) is set, the hexadecimal value corresponding to the preset display brightness value is 3E8 (third column data), and for each DBV, the adjustment ratio of the grayscale value corresponding to the preset display brightness value is calculated (fourth column data). The electronic device can store the adjustment ratio corresponding to each decimal DBV, and can also store the adjustment ratio corresponding to each hexadecimal DBV.

[0099] When the electronic device detects a fingerprint unlocking command, it searches for the adjustment ratio corresponding to the DBV of the display screen when the fingerprint unlocking command is detected, and determines the grayscale value of each pixel in the second frame based on the grayscale value of each pixel in the first frame.

[0100] Therefore, if the DBV of the display screen is less than the preset display brightness value and the electronic device detects a fingerprint unlocking command, in order to keep the brightness of each pixel of the fingerprint unchanged, it is necessary to adjust the DBV of the display screen and the grayscale value of each pixel, that is, before and after fingerprint unlocking, the DBV of the display screen and the grayscale value of the pixel will change.

[0101] Some displays (such as 8T1C displays) may emit green at low brightness, blue at high brightness, and red at high temperature when displaying images. To solve the above problems, the mapping relationship between DBV, grayscale and color coordinates can be set.

[0102] For example, Figure 5 As shown in the figure, the brightness values ​​of the display screen corresponding to DBV (expressed in DBV) are 2nit, 10nit, 30nit, 75nit, 380nit, and 800nit, respectively, and the grayscale values ​​are L31 and below, L47, L63, L79, L127, and L255, respectively. x and w y Respectively represent two values ​​of color coordinates (CIE).

[0103] For any pixel in each frame, the color coordinates corresponding to the pixel can be directly obtained by querying the pre-stored mapping relationship based on DBV and grayscale value, or by querying the mapping relationship and using the interpolation algorithm, the color coordinates corresponding to the pixel can be obtained.

[0104] Before and after fingerprint unlocking, the DBV of the display screen and the grayscale value of the pixel will change, and the corresponding color coordinates will also change. For example, for one pixel, the DBV of the first frame is 2nit, the grayscale value of the pixel is L127, and the corresponding color coordinates are (0.295, 0.310). The DBV of the second frame is 75nit, the grayscale value of the pixel is L24, and the corresponding color coordinates are (0.285, 0.295). Therefore, before and after fingerprint unlocking, the color coordinates of the pixel point have changed. The color coordinates of the pixel point determine the color of the pixel point. When the color coordinates of the pixel point change, the color of the pixel point will change, which will cause the color of the display screen to change. For example, according to the change in the color coordinates, it is determined that the color of the display screen appears to be purple.

[0105] To this end, the present application provides a fingerprint unlocking method, when a fingerprint unlocking instruction is detected, the first display brightness value of the first frame is obtained, and the second color value of the first pixel in the second frame is determined according to the first mapping relationship corresponding to the first display brightness value. The first mapping relationship corresponding to the first display brightness value represents the mapping relationship between the brightness and color value of the pixel, and the second brightness of the first pixel in the second frame is equal to the first brightness of the first pixel in the first frame. Therefore, when the second brightness is equal to the first brightness, the second color value determined according to the first mapping relationship corresponding to the first display brightness value can be the same as the first color value of the first pixel in the first frame. For all pixels of the display screen, the above method is used to determine the color value of the pixel in the second frame, and the image of the second frame is displayed according to the color values ​​of all pixels in the second frame, and the fingerprint image is collected. The fingerprint unlocking is performed according to the fingerprint image, so that the brightness and color of the first frame and the second frame will not change, so that the user will not notice the color change when performing fingerprint unlocking, thereby improving the user experience.

[0106] The fingerprint unlocking method provided in the embodiment of the present application is described in detail below.

[0107] like Figure 6 As shown, the fingerprint unlocking method provided in one embodiment of the present application includes the following steps.

[0108] S601: In response to a fingerprint unlocking instruction, obtaining a first display brightness value of a first frame.

[0109] Specifically, the fingerprint unlocking instruction is an operation of touching or clicking the fingerprint recognition area with a finger, and the moment when the fingerprint unlocking instruction is detected is the moment of the first frame. The first display brightness value of the first frame is the DBV of the first frame. At the moment of the first frame, the display screen can be in a black screen state, and the display screen can also display the image of the first frame. The image of the first frame can be an image of the electronic device in the screen-off state pre-set by the user. Among them, in the black screen state, the DBV of the display screen is 0, and the grayscale value may not be 0. When the display screen displays the image of the first frame, the DBV of the display screen is not 0.

[0110] S602: Determine a second color value of a first pixel in a second frame according to a first mapping relationship corresponding to the first display brightness value, so that the second color value is the same as the first color value of the first pixel in the first frame; the first pixel is any pixel on the display screen of the electronic device; the second frame is a next frame of the first frame, and the second brightness of the first pixel in the second frame is equal to the first brightness of the first pixel in the first frame; the first mapping relationship corresponding to the first display brightness value represents a mapping relationship between the brightness of a pixel and a color value.

[0111] Specifically, the first mapping relationships corresponding to different display brightness values ​​are different, and the first mapping relationship corresponding to each display brightness value represents the mapping relationship between the brightness of the pixel and the color value, and the color value of the pixel represents the color value of the three channels of red (R), green (G), and blue (B). The first mapping relationship may include a correspondence between multiple brightnesses and multiple color values, one brightness corresponds to one color value, and the first mapping relationship may also include a correspondence between multiple brightnesses and multiple color coordinates, one brightness corresponds to one color coordinate. Among them, the color coordinate includes a horizontal coordinate and a vertical coordinate, and the horizontal coordinate and the vertical coordinate represent the red component and the green component respectively, and the color value can be determined according to the color coordinate. The first mapping relationship may also include a correspondence between multiple brightness ranges and multiple color values, one brightness range corresponds to one color value, and the first mapping relationship may also include a correspondence between multiple brightness ranges and multiple color coordinates, and one brightness range corresponds to one color coordinate.

[0112] In one embodiment, taking the first mapping relationship corresponding to the first display brightness value as an example, the first mapping relationship is generated by the following method.

[0113] First, multiple first correspondences are generated, where the first correspondences are correspondences between brightness and display brightness value and grayscale value. When the display brightness value and grayscale value are known, the corresponding brightness can be calculated according to formula 1. For example, Figure 7 As shown in the figure, the DBVs are 2nit, 10nit, 30nit, 75nit, 380nit, and 800nit respectively, and the grayscale values ​​are L1, L3, L7, L15, L31, L47, L63, L79, L95, L111, L127, and L255 respectively. According to formula 1, the brightness under different combinations of DBV and grayscale values ​​can be calculated.

[0114] Afterwards, according to the plurality of grayscale values ​​and the plurality of color values ​​corresponding to the first display brightness value in the second mapping relationship, a second corresponding relationship between the plurality of reference brightnesses and the plurality of color values ​​is determined.

[0115] For example, the second mapping relationship is Figure 5 As shown, different combinations of DBV and grayscale values ​​correspond to different color coordinates. Taking the first display brightness value of 2nit as an example, 2nit combined with each grayscale value can obtain a brightness, and the multiple brightnesses obtained by combining 2nit with each grayscale value are used as reference brightness. When DBV is the first display brightness value, for any grayscale value, it corresponds to a reference brightness and also corresponds to a color coordinate, then the corresponding relationship between the reference brightness and the color coordinate can be established, and for all grayscale values, the corresponding relationship between multiple reference brightness and multiple color coordinates can be established, and the corresponding relationship between multiple reference brightness and multiple color coordinates is the second corresponding relationship.

[0116] After obtaining multiple first correspondences and second correspondences, the third correspondence between brightness and color value in each first correspondence is determined based on the second correspondence, and the first mapping relationship corresponding to the first display brightness value is generated according to the multiple third correspondences.

[0117] For example, the first display brightness value is 2nit, and the second correspondence is the correspondence between multiple brightnesses and multiple color coordinates when DBV is 2nit, and the brightness is the reference brightness. For each brightness in the first correspondence, the correspondence between the brightness and the color value is determined based on the relationship between the brightness and the reference brightness. For example, for any brightness, if the brightness is equal to one of the reference brightnesses, the color coordinates corresponding to the reference brightness are the color coordinates corresponding to the brightness. If there is no reference brightness equal to the brightness, the color coordinates corresponding to the brightness are obtained by interpolation based on at least two reference brightnesses adjacent to the brightness. The brightness in each first correspondence (for example Figure 7 The correspondence between each brightness) and the color value in is the third correspondence.

[0118] In one embodiment, the color value corresponding to each brightness range is determined according to the color value corresponding to the reference brightness, and the multiple color values ​​corresponding to the multiple brightness ranges are used as the first mapping relationship corresponding to the first display brightness value, and one brightness range corresponds to one color value. Figure 8 As shown, according to the corresponding relationship between the reference brightness and the color value, the brightness range LV is determined to be LV≤0.005, 0.005<LV≤0.025, 0.025<LV≤0.8, 0.8<LV≤3.5, 3.5<LV≤16, LV>16, w x and w y Respectively represent two values ​​of color coordinates (CIE), and each brightness range corresponds to a color coordinate.

[0119] For each display brightness value except the first display brightness value, the corresponding first mapping relationship is obtained by adopting the same method as the first display brightness value, so that the first mapping relationships corresponding to all display brightness values ​​can be obtained.

[0120] In one embodiment, the electronic device pre-stores the first mapping relationship corresponding to all display brightness values. When a fingerprint unlocking instruction is detected, the electronic device queries the first mapping relationship corresponding to the first display brightness value according to the first display brightness value of the first frame.

[0121] In another embodiment, each display brightness value in the first corresponding relationship corresponds to a brightness interval, for example, the brightness interval corresponding to 2nit is between 0 and 2nit, and the brightness interval corresponding to 10nit is between 2nit and 10nit. The first mapping relationship corresponding to different display brightness values ​​is the first mapping relationship corresponding to different brightness intervals. The electronic device pre-stores the first mapping relationship corresponding to different display brightness intervals, and the electronic device queries the first mapping relationship corresponding to the brightness interval where the first display brightness value is located according to the first display brightness value, which is the first mapping relationship corresponding to the first display brightness value.

[0122] For the first pixel, the electronic device can determine the second color value of the first pixel in the second frame according to the first mapping relationship corresponding to the first display brightness value and the second brightness of the first pixel in the second frame. Since the first brightness of the first pixel in the first frame is equal to the second brightness of the first pixel in the second frame, the electronic device can determine the first brightness according to the first display brightness value and the first grayscale value, and use the first brightness as the second brightness. The electronic device can also determine the second brightness according to the second display brightness value and the second grayscale value.

[0123] In one embodiment, the first color value of the first pixel in the first frame is determined according to the second mapping relationship. Specifically, the first color value of the first frame can be determined according to the first grayscale value, the first display brightness value and the second mapping relationship of the first pixel in the first frame.

[0124] In the case where the first display brightness value is less than the preset display brightness value, in order to realize the acquisition of the fingerprint image in the second frame, the second display brightness value needs to be greater than or equal to the preset display brightness value. In order to ensure that the user does not perceive the brightness change of the display screen, it is necessary to keep the first brightness of the first pixel in the first frame and the second brightness of the first pixel in the second frame the same. In the case where the second display brightness value is greater than the first display brightness value, the second grayscale value of the first pixel in the second frame is less than the grayscale value of the first pixel in the first frame. That is, the first display brightness value and the second display brightness value are different, and the first grayscale value and the second grayscale value are different.

[0125] If the first color value and the second color value of the first pixel are determined according to the second mapping relationship, the first color value and the second color value of the first pixel will be different.

[0126] The second mapping relationship represents the mapping relationship between the color value of the pixel and the display brightness value and the grayscale value. In the second mapping relationship, there are multiple combinations and color values ​​corresponding to each combination, and each combination is a combination of a display brightness value and a grayscale value. The brightness corresponding to different combinations can be equal, and the color values ​​corresponding to different combinations are different. Since the first mapping relationship represents the mapping relationship between the color value of the pixel and the brightness, in the first mapping relationship, for any brightness, there are multiple combinations in the second mapping relationship whose corresponding brightness is equal to the brightness, and the color values ​​corresponding to the multiple combinations are different. Therefore, if only one first mapping relationship is set, the color values ​​in the first mapping relationship and the second mapping relationship cannot be unified. If the first color value of the first pixel is determined according to the second mapping relationship, and the second color value of the first pixel is determined according to the first mapping relationship, the first color value and the second color value will be different.

[0127] Therefore, it is necessary to set the first mapping relationships corresponding to different display brightness values ​​so that there is a first mapping relationship that is unified with the color value in the second mapping relationship.

[0128] According to the generation process of the first mapping relationship corresponding to the first display brightness value, it can be known that for any reference brightness, the reference brightness is obtained according to one of the combinations in the second mapping relationship, and the combination is the first display brightness value and a grayscale value, and the color value corresponding to the reference brightness is the color value corresponding to the combination. Therefore, when DBV is the first display brightness value, the grayscale value of the first pixel is within one of the grayscale ranges, or the grayscale value of the first pixel is one of the grayscale values ​​(first grayscale value), the brightness of the first pixel is one of the reference brightness, and the color value corresponding to the reference brightness is the same as the color value corresponding to the first display brightness value and the first grayscale value. Therefore, when DBV is the first display brightness value, the color value determined according to the brightness of the first pixel is the same as the color value determined according to the first display brightness value and the first grayscale value of the first pixel. The color value determined according to the brightness of the first pixel is the color value determined according to the first mapping relationship corresponding to the first display brightness, and the color value determined according to the first display brightness value and the first grayscale value is the color value determined according to the second mapping relationship. Therefore, when DBV is the first display brightness value, the color value of the first pixel obtained according to the second mapping relationship is the same as the color value obtained according to the first mapping relationship corresponding to the first display brightness value.

[0129] In the first frame, the electronic device determines the first color value of the first pixel according to the second mapping relationship, and in the second frame, the electronic device determines the second color value of the first pixel according to the first mapping relationship corresponding to the first display brightness value, which is equivalent to that the first color value and the second color value are both determined according to the first mapping relationship corresponding to the first display brightness value. Since the first brightness of the first pixel and the second brightness of the second pixel are equal, the first mapping relationship corresponding to the first display brightness value represents the correspondence between brightness and color value, so the first color value and the second color value can be made the same.

[0130] In one embodiment, a second mapping relationship is stored in the electronic device, and the electronic device determines the color value of each pixel according to the second mapping relationship. In the first frame, the electronic device detects a fingerprint unlocking instruction. In the first frame, the electronic device still determines the color value of each pixel according to the second mapping relationship. At the same time, the electronic device responds to the fingerprint unlocking instruction, searches for the first mapping relationship corresponding to the first display brightness value according to the first display brightness value of the first frame, and then determines the color value of each pixel in the second frame according to the first mapping relationship corresponding to the first display brightness value. Exemplarily, one pixel corresponds to three channels (ie, R, G, B), each channel corresponds to an OLED, and when the display screen of the electronic device detects the fingerprint unlocking instruction, the first mapping relationship corresponding to the first display brightness value is sent to the display driver chip through the display driver module of the display screen, and the display driver chip is used to adjust the input current or voltage of the three channels corresponding to each pixel according to the first mapping relationship corresponding to the first display brightness value, thereby adjusting the color of each pixel.

[0131] In another embodiment, the first color value of the first pixel in the first frame is determined according to the first brightness and the first mapping relationship corresponding to the first display brightness value. For example, when the electronic device enters the lock screen state, the DBV of the display screen is determined, and the color value of each pixel is determined according to the first mapping relationship corresponding to the DBV. Afterwards, when the DBV of the display screen changes, the color value of each pixel is determined according to the first mapping relationship corresponding to the changed DBV. Before the fingerprint unlocking is detected, the DBV of the display screen is the first display brightness value, and the color value of each pixel is determined according to the first mapping relationship corresponding to the first display brightness value. It can be understood that when the electronic device enters the lock screen state, the first mapping relationship corresponding to the DBV of the previous frame can be determined according to the DBV of the previous frame, and the color value of the current frame can be determined according to the first mapping relationship corresponding to the DBV of the previous frame. Since the DBVs of adjacent frames are equal or the DBVs of adjacent frames change slightly when the electronic device enters the lock screen state, determining the color value of the current frame according to the first mapping relationship corresponding to the DBV of the previous frame will not cause a significant change in the color of the display screen.

[0132] Therefore, before and after fingerprint unlocking, the electronic device determines the color of each pixel according to the first mapping relationship corresponding to the first display brightness value. For the first pixel, since the first brightness and the second brightness are equal, the first color value and the second color value are the same. Therefore, the brightness of each pixel in the first frame is equal to the brightness in the second frame, and the color value in the first frame is equal to the color value in the second frame. Therefore, before and after fingerprint unlocking, the brightness and color of the display screen will not change.

[0133] S603: Displaying the image of the second frame according to the second color value, and collecting a fingerprint image; the image of the second frame includes indication information, and the indication information is used to indicate that the electronic device is performing fingerprint unlocking.

[0134] Specifically, for all pixels of the display screen, the corresponding color value is determined by the method of determining the second color value of the first pixel, and the electronic device displays the second frame image according to the color values ​​of all pixels. The second frame image is the image displayed by the electronic device when collecting fingerprints, and the indication information included in the second frame image can be a preset pattern or text. For example, when the display screen of the electronic device displays the first frame image, a fingerprint unlocking operation is detected, and the second frame image is as follows: Fig. 9 As shown, the fingerprint recognition area 91 displays indication information 92, which is a fingerprint light spot. The fingerprint light spot is a luminous pattern, which is used to prompt the user that the electronic device is undergoing fingerprint unlocking.

[0135] When the display screen displays the image of the second frame, the electronic device obtains the fingerprint image according to the reflected light of the fingerprint recognition area.

[0136] In one embodiment, when the electronic device detects a fingerprint unlocking instruction, if the first display brightness value is less than the preset display brightness value, the second display brightness value required for collecting the fingerprint image is determined, and the second display brightness value is greater than or equal to the preset display brightness value, and the second display brightness value is the DBV of the second frame. For the first pixel, the electronic device can determine the second grayscale value of the first pixel in the second frame based on the first display brightness value, the first grayscale value, and the second display brightness value. Afterwards, the electronic device displays the image of the second frame based on the second display brightness value, the second grayscale value, and the second color value. Exemplarily, the electronic device determines the current or voltage of the three channels corresponding to the first pixel based on the second display brightness value, the second grayscale value, and the second color value, and controls the OLED of the corresponding channel to emit light based on the current or voltage.

[0137] S404: Perform fingerprint unlocking according to the fingerprint image.

[0138] Specifically, if the fingerprint image is consistent with the pre-stored unlock image, the unlock is successful. If the fingerprint image is inconsistent with the unlock image, the unlock fails.

[0139] In one embodiment, after the display screen displays the image of the second frame, the color values ​​of the pixels of each frame within the preset duration are determined according to the first mapping relationship corresponding to the first display brightness value. After the preset duration, the display screen displays the image of the third frame. For the first pixel, the third color value of the first pixel in the third frame is determined according to the second mapping relationship. Specifically, the electronic device determines the third color value according to the second mapping relationship, the third display brightness value of the third frame, and the third grayscale value of the first pixel in the third frame. Among them, the third display brightness value may be the same as the second display brightness value, or may be different from the second display brightness value. For all pixels in the third frame, the color value is determined by the same method as the first pixel. After obtaining the color values ​​of all pixels in the third frame, the electronic device displays the image of the third frame according to the third display brightness value, the color values ​​of all pixels, and the grayscale values ​​of all pixels.

[0140] When the display screen displays the image of the second frame, the electronic device is unlocked successfully. After the preset time, the display screen is in a normal display state. The DBV of each frame image is greater than the preset display brightness value, and there is no mapping between different gamma curves. The electronic device determines the third color value of the third frame according to the second mapping relationship, which can ensure the optimal display effect of the display screen.

[0141] In one embodiment, the indication information (e.g., fingerprint spot) is displayed in the image of the second frame, and the indication information is displayed on the display screen for a preset time period starting from the second frame until the previous frame of the third frame, and the indication information is no longer displayed in the image of the third frame starting from the third frame (e.g., the fingerprint spot is extinguished). That is, the electronic device enters the unlocked state starting from the third frame. In the unlocked state, the display screen can display the desktop of the electronic device, or display the page of the application on the electronic device. In the unlocked state, the color value of each frame image is determined according to the second mapping relationship, so as to ensure the optimal display effect of the display screen.

[0142] For example, Fig.10 As shown, t1 represents the time of the first frame, t2 represents the time of the second frame, and t3 represents the time of the third frame. The electronic device detects the fingerprint unlocking operation at time t1, displays the fingerprint spot at time t2, collects the fingerprint image for fingerprint recognition, and turns off the fingerprint spot at time t3. If the color value of each pixel in the first frame, the second frame, and the third frame is determined according to the second mapping relationship, the color of the second frame will be inconsistent with the color of the first frame and the color of the third frame. For example, the color of the second frame is purple.

[0143] like Fig.11 As shown, if the color value of each pixel in the first frame is determined according to the second mapping relationship, when the fingerprint unlocking instruction is detected, the color value of each pixel in the second frame is determined according to the first mapping relationship corresponding to the first display brightness value, and the color value of each pixel in each frame between the second frame and the third frame is determined according to the first mapping relationship corresponding to the first display brightness value. The color of the display screen can be kept unchanged when fingerprint unlocking (when the fingerprint spot is displayed). Starting from the third frame, the fingerprint spot is extinguished, and the color value of each pixel in the third frame is re-determined according to the second mapping relationship, which can improve the display effect of the display screen.

[0144] In one embodiment, after the electronic device obtains the first display brightness value of the first frame, it determines whether the first display brightness value is less than the preset display brightness value. If the first display brightness value is less than the preset display brightness value, it means that the DBV of the display screen needs to be increased when performing fingerprint unlocking, that is, the second display brightness value is greater than the first display brightness value, and the grayscale value of each pixel needs to be reduced at the same time, which will cause the color of the display screen to change. In this case, for the first pixel, the electronic device determines the second color value of the first pixel according to the first mapping relationship corresponding to the first display brightness value, so that the first color value and the second color value are the same. If the first display brightness value is greater than the preset display brightness value, it means that the DBV of the display screen does not need to be increased when performing fingerprint unlocking, and the grayscale value of each pixel does not need to be adjusted, and the second display brightness value is equal to the first display brightness value. In this case, for the first pixel, the electronic device can determine the second color value according to the second mapping relationship, thereby improving the display effect of the display screen.

[0145] In the above embodiment, the color value of the pixel in the second frame is determined according to the first mapping relationship corresponding to the first display brightness value of the first frame. Since the first mapping relationship corresponding to the first display brightness value represents the mapping relationship between the brightness and color value of the pixel, the brightness of each pixel remains unchanged in the first frame and the second frame. Therefore, the color value of the pixel calculated according to the first mapping relationship corresponding to the first display brightness value remains unchanged in the first frame and the second frame. The moment of the first frame is the moment when the fingerprint unlocking instruction is received, and the moment of the second frame is the moment when the electronic device displays the instruction information to collect the fingerprint image and recognize the fingerprint image. Therefore, when performing fingerprint unlocking, the brightness and color of the display interface of the electronic device during the fingerprint unlocking process will not change, thereby improving the user experience.

[0146] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0147] The software system of the electronic device may adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present invention takes the Android system of the layered architecture as an example to exemplify the software structure of the electronic device.

[0148] Fig.12 It is a software architecture diagram of the electronic device provided in the embodiment of the present application.

[0149] The layered architecture divides the software into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom: the application layer, the application framework layer, the Android runtime and system library, and the kernel layer.

[0150] The application layer can include a series of application packages.

[0151] like Fig.12 As shown, the application package may include camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message and other applications.

[0152] The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. The application framework layer includes some predefined functions.

[0153] like Fig.12As shown, the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, and the like.

[0154] The window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc.

[0155] Content providers are used to store and retrieve data and make it accessible to applications. The data may include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.

[0156] The view system includes visual controls, such as controls for displaying text, controls for displaying images, etc. The view system can be used to build applications. A display interface can be composed of one or more views. For example, a display interface including a text notification icon can include a view for displaying text and a view for displaying images.

[0157] The phone manager is used to provide communication functions of the electronic device 100, such as management of call status (including connecting, hanging up, etc.).

[0158] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.

[0159] The notification manager enables applications to display notification information in the status bar. It can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as notifications of applications running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message is displayed in the status bar, a prompt sound is emitted, an electronic device vibrates, an indicator light flashes, etc.

[0160] Android Runtime includes core libraries and virtual machines. Android runtime is responsible for scheduling and management of the Android system.

[0161] The core library consists of two parts: one part is the function that needs to be called by the Java language, and the other part is the Android core library.

[0162] The application layer and the application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.

[0163] The system library may include multiple functional modules, such as surface manager, media library, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.

[0164] The surface manager is used to manage the display subsystem and provide the fusion of 2D and 3D layers for multiple applications.

[0165] The media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.

[0166] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.

[0167] A 2D graphics engine is a drawing engine for 2D drawings.

[0168] The kernel layer is the layer between hardware and software. The kernel layer includes at least display driver, display driver, camera driver, audio driver, and sensor driver.

[0169] The following is based on Fig.12 The software architecture diagram shown provides an exemplary description of the process of the unlocking method provided in the embodiment of the present application.

[0170] The display screen receives a touch operation and sends the touch operation to the display screen driver. When the display screen driver determines that the touch operation is an unlock operation, it sends information about the detected unlock operation to the display driver. The display driver determines the second display brightness value and the grayscale value of each pixel of the second frame based on the first display brightness value and the grayscale value of each pixel of the first frame, and sends the first mapping relationship corresponding to the first display brightness value, the second display brightness value and the grayscale value of each pixel to the display driver chip. The display driver chip determines the color value of each pixel based on the first mapping relationship corresponding to the first display brightness value, and drives the corresponding OLED to emit light based on the color value, grayscale value and second display brightness value of each pixel, thereby displaying the image of the second frame.

[0171] Fig.13 A schematic structural diagram of an electronic device 100 is shown.

[0172] The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0173] It is to be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or separate some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0174] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.

[0175] The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.

[0176] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0177] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present invention is only a schematic illustration and does not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.

[0178] The electronic device 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.

[0179] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.

[0180] The internal memory 121 can be used to store computer executable program codes, which include instructions. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc. The processor 110 executes various functional applications and data processing of the electronic device 100 by running instructions stored in the internal memory 121, and / or instructions stored in a memory provided in the processor.

[0181] The pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A can be set on the display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. The capacitive pressure sensor can be a parallel plate including at least two conductive materials. When a force acts on the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 100 determines the intensity of the pressure according to the change in capacitance. When a touch operation acts on the display screen 194, the electronic device 100 detects the touch operation intensity according to the pressure sensor 180A. The electronic device 100 can also calculate the touch position according to the detection signal of the pressure sensor 180A. In some embodiments, touch operations acting on the same touch position but with different touch operation intensities can correspond to different operation instructions. For example: when a touch operation with a touch operation intensity less than the first pressure threshold acts on the short message application icon, an instruction to view the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, an instruction to create a new short message is executed.

[0182] The fingerprint sensor 180H is used to collect fingerprints. The electronic device 100 can use the collected fingerprint characteristics to implement fingerprint unlocking, access application locks, fingerprint photography, fingerprint call answering, etc.

[0183] The touch sensor 180K is also called a "touch control device". The touch sensor 180K can be set on the display screen 194. The touch sensor 180K and the display screen 194 form a touch screen, also called a "touch control screen". The touch sensor 180K is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor 180K can also be set on the surface of the electronic device 100, which is different from the position of the display screen 194.

[0184] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of the present application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.

[0185] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0186] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0187] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may at least include: any entity or device that can carry the computer program code to the camera / electronic device, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium. For example, a USB flash drive, a mobile hard disk, a disk or an optical disk.

[0188] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0189] In the embodiments provided in the present application, it should be understood that the disclosed devices / network equipment and methods can be implemented in other ways. For example, the device / network equipment embodiments described above are merely schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0190] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0191] Finally, it should be noted that the above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A fingerprint unlocking method, applied to an electronic device, characterized in that: include: In response to the fingerprint unlocking instruction, obtaining a first display brightness value of the first frame; Determine, according to a first mapping relationship corresponding to the first display brightness value, a second color value of the first pixel in the second frame, so that the second color value is the same as the first color value of the first pixel in the first frame; The first pixel is any pixel of the display screen of the electronic device; the second frame is a next frame of the first frame, and the second brightness of the first pixel in the second frame is equal to the first brightness of the first pixel in the first frame; the first mapping relationship corresponding to the first display brightness value represents a mapping relationship between the brightness of the pixel and the color value; Displaying the image of the second frame according to the second color value, and collecting a fingerprint image; the image of the second frame includes indication information, and the indication information is used to indicate that the electronic device is performing fingerprint unlocking; Fingerprint unlocking is performed according to the fingerprint image.

2. The method according to claim 1, characterized in that The first color value is determined according to a first mapping relationship corresponding to the first brightness and the first display brightness value.

3. The method according to claim 1, characterized in that The first color value is determined according to the first grayscale value of the first pixel in the first frame, the first display brightness value, and a second mapping relationship; the second mapping relationship represents a mapping relationship between display brightness value, grayscale value and color value; when the brightness is the same, the color value determined according to the second mapping relationship is the same as the color value determined according to the first mapping relationship corresponding to the first display brightness value.

4. The method according to claim 3, characterized in that After performing fingerprint unlocking according to the fingerprint image, the method further includes: Determine a third color value of the first pixel in the third frame according to the second mapping relationship, the third display brightness value of the third frame, and the third grayscale value of the first pixel in the third frame; The image of the third frame is displayed according to the third display brightness value, the third grayscale value, and the third color value, and the time interval between the third frame and the second frame is a preset time length.

5. The method according to claim 4, characterized in that The previous frame image of the third frame image includes the indication information, and the third frame image does not include the indication information.

6. The method according to claim 3, characterized in that The determining, according to a first mapping relationship corresponding to the first display brightness value, a second color value of the first pixel in the second frame includes: If the first display brightness value is less than a preset display brightness value, determining the second color value according to a first mapping relationship corresponding to the first display brightness value; The method further comprises: If the first display brightness value is greater than or equal to the preset display brightness value, the second color value is determined according to the second mapping relationship.

7. The method according to claim 3, characterized in that The method further comprises: Generate a plurality of first correspondences, wherein the first correspondences are correspondences between brightness and display brightness values ​​and grayscale values; Determine a second correspondence between a plurality of reference brightnesses and the plurality of color values ​​according to the plurality of grayscale values ​​and the plurality of color values ​​corresponding to the first display brightness value in the second mapping relationship; Taking the second corresponding relationship as a reference, determining a third corresponding relationship between brightness and color value in each of the first corresponding relationships; A first mapping relationship corresponding to the first display brightness value is generated according to the plurality of third corresponding relationships.

8. The method according to any one of claims 3 to 7, characterized in that: The determining, according to a first mapping relationship corresponding to the first display brightness value, a second color value of the first pixel in the second frame includes: Determine the second brightness of the first pixel according to the first display brightness value and the first grayscale value; The second color value is determined according to a first mapping relationship between the second brightness and the first display brightness value.

9. The method according to claim 8, characterized in that The step of displaying the image of the second frame according to the second color value comprises: Determine a second grayscale value of the first pixel in the second frame according to the first display brightness value, the first grayscale value, and the second display brightness value, wherein the second display brightness value is a display brightness value required for collecting the fingerprint image, and the first display brightness value is less than the second display brightness value; The image of the second frame is displayed according to the second display brightness value, the second grayscale value, and the second color value.

10. An electronic device, characterized in that: The method comprises a processor configured to execute a computer program stored in a memory to implement the method according to any one of claims 1 to 9.

11. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 9 is implemented.

Citation Information

Patent Citations

  • Content display method and device, electronic equipment and storage medium

    CN110138977A

  • Brightness adjusting method and electronic equipment

    CN116048368A

  • Under-screen fingerprint pattern brightness determination method and device, electronic equipment and medium

    CN116665253A

  • Image processing method and electronic equipment

    CN116668838A