A facial skin state recognition method and device, an electronic device, and a storage device

By loading a camera component and rendering the camera image in the terminal application, determining the facial image conformity and prompting the user to make adjustments, the problem of existing skin analysis software being unable to intelligently identify facial positions is solved, thus improving the success rate and efficiency of skin analysis.

CN115171188BActive Publication Date: 2026-04-07RAJAX NETWORK &TECHNOLOGY (SHANGHAI) CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-07
Publication Date
2026-04-07

AI Technical Summary

Technical Problem

Existing skin analysis software cannot intelligently identify the user's facial position when capturing facial images, resulting in a low skin analysis success rate and the inability to remind users to adjust shooting parameters in real time.

Method used

By loading the camera component corresponding to the terminal application, the camera image is rendered on the application page to capture facial images. The camera component is then used to determine whether the image meets the recognition criteria. If it does not meet the criteria, an operation prompt message is output to guide the user to adjust the shooting parameters until the criteria are met.

Benefits of technology

It improves the efficiency of facial skin condition recognition, reduces the skin measurement failure rate, enables real-time facial image conformity prompts, and improves the success rate of shooting.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115171188B_ABST
    Figure CN115171188B_ABST
Patent Text Reader

Abstract

This application discloses a facial skin condition recognition method, apparatus, electronic device, and storage device. The method includes: in response to detecting a trigger operation to enable facial skin condition recognition, loading a camera component corresponding to the terminal application for facial recognition; rendering a camera view for capturing facial images on the application page of the terminal application; capturing a first facial image of the user through the camera view; using the camera component to determine whether the first facial image meets the facial skin condition recognition conditions; if not, outputting an operation prompt message to prompt the user to perform a specified operation; capturing a second facial image of the user after performing the specified operation through the camera view; and using the camera component to determine whether the second facial image meets the facial skin condition recognition conditions; if so, recognizing the user's facial skin condition using the second facial image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, specifically to a method, apparatus, electronic device, and storage device for facial skin condition recognition. Background Technology

[0002] With the rapid development of internet technology, the medical aesthetics industry has also developed rapidly. In recent years, as users' pursuit of beauty has increased, a series of beauty software has emerged, among which skin analysis software is a popular choice.

[0003] Currently, most skin analysis software on the market suffers from the following drawbacks when taking facial photos: the software uses the system's built-in native camera, which cannot be customized, cannot intelligently recognize the user's facial position, and cannot provide real-time prompts for adjustments when the user's facial position is unsuitable, such as suggesting whether the shooting distance should be greater or less. This significantly reduces the success rate of skin analysis. Therefore, how to capture facial images that accurately reflect the user's skin condition and improve skin analysis efficiency has become an urgent problem to be solved. Summary of the Invention

[0004] This application provides a facial skin condition recognition method that can capture facial images that match the user's facial skin condition, greatly reducing the failure rate of skin measurement and improving the efficiency of skin condition recognition.

[0005] This application provides a facial skin condition recognition method, comprising: in response to detecting a trigger operation to enable facial skin condition recognition, loading a camera component for facial recognition corresponding to the terminal application; rendering a camera image for capturing a facial image on the application page of the terminal application; and capturing a first facial image of the user through the camera image;

[0006] Using the camera component, it is determined whether the first facial image meets the recognition conditions for facial skin condition. If it does not meet the conditions, an operation prompt message is output to prompt the user to perform a specified operation. The second facial image after the user performs the specified operation is captured through the camera screen. Using the camera component, it is determined whether the second facial image meets the recognition conditions for facial skin condition. If it does, the user's facial skin condition is recognized using the second facial image.

[0007] Optionally, loading the camera component for facial recognition corresponding to the terminal application includes:

[0008] Send a first request message to the server to request the facial recognition model corresponding to the terminal application;

[0009] Obtain the facial recognition model corresponding to the terminal application returned by the server;

[0010] Obtain facial recognition parameters;

[0011] The camera component is obtained based on the facial recognition model and the facial recognition parameters.

[0012] Optionally, the facial recognition parameters are pre-configured;

[0013] Configure the facial recognition parameters as follows:

[0014] The identification conditions for obtaining the facial skin condition;

[0015] Obtain the operation prompt information;

[0016] The facial recognition parameters are generated based on the facial skin condition recognition conditions and the operation prompts.

[0017] Optionally, the facial skin condition recognition criteria are generated in the following manner:

[0018] Obtain information on facial image capture issues;

[0019] Obtain the parameter thresholds for the facial image capture problem to be valid;

[0020] Based on the facial image capture problem information and the parameter thresholds for the facial image capture problem to be valid, the recognition conditions for the facial skin state are generated.

[0021] Optionally, obtaining the camera component based on the facial recognition model and the facial recognition parameters includes: inputting the facial recognition parameters into the facial recognition model to obtain a facial recognition model with the facial recognition parameters, which serves as the camera component.

[0022] Optionally, the facial recognition model includes rendering parameters for rendering the camera image;

[0023] The step of rendering the camera image used to capture facial images on the application page of the terminal application includes:

[0024] The rendering parameters are obtained from the facial recognition model;

[0025] The camera image is rendered based on the rendering parameters.

[0026] Optionally, the method further includes: detecting operations on the terminal application by the operation monitoring component of the terminal application;

[0027] The method of loading the camera component for facial recognition corresponding to the terminal application in response to detecting a trigger operation that enables facial skin condition recognition further includes:

[0028] In response to detecting a trigger operation that enables facial skin state recognition, the operation monitoring component passes camera component loading parameters, which represent loading the camera component, to the same-layer rendering component of the terminal application.

[0029] The same-layer rendering component will send the facial recognition model request parameters and the identifier parameters of the terminal application to the interaction component of the terminal application.

[0030] The interactive component generates the first request message based on the facial recognition model request parameters and the identifier parameters of the terminal application;

[0031] Sending a first request message to the server to request the facial recognition model corresponding to the terminal application includes: the interaction component sending the first request message to the server.

[0032] Optionally, obtaining the facial recognition model corresponding to the terminal application returned by the server includes: obtaining the facial recognition model corresponding to the terminal application returned by the server by the interaction component;

[0033] The loading of the camera component corresponding to the terminal application for facial recognition also includes: the interaction component sending the facial recognition model to the rendering component at the same layer;

[0034] The process of obtaining facial recognition parameters includes: obtaining facial recognition parameters from the same-layer rendering component;

[0035] The step of obtaining the camera component based on the facial recognition model and the facial recognition parameters includes: the same-layer rendering component obtaining the camera component based on the facial recognition model and the facial recognition parameters;

[0036] The rendering of the camera image for capturing facial images on the application page of the terminal application includes: the same-layer rendering component rendering the camera image for capturing facial images on the application page of the terminal application.

[0037] Optionally, the same-layer rendering component sends a facial recognition model request parameter for requesting to obtain the facial recognition model corresponding to the terminal application and the identifier parameter of the terminal application to the interaction component of the terminal application, including: the same-layer rendering component sends a facial recognition model acquisition parameter for requesting to obtain the facial recognition model corresponding to the terminal application, the identifier parameter of the terminal application, and a rendering request parameter for requesting to obtain the rendering parameters for rendering the camera image to the interaction component of the terminal application;

[0038] The interactive component generates the first request message based on the facial recognition model request parameters, the terminal application's identifier parameters, and the rendering request parameters;

[0039] The method further includes: the interactive component obtaining the rendering parameters provided by the server, and the interactive component passing the rendering parameters to the rendering component at the same layer;

[0040] The step of rendering the camera image used to capture facial images on the application page of the terminal application includes:

[0041] The same-layer rendering component renders the camera image according to the rendering parameters.

[0042] Optionally, determining whether the first facial image meets the recognition criteria for facial skin condition using the camera component includes:

[0043] Using the camera component, determine whether the facial integrity in the first facial image reaches a preset facial integrity threshold;

[0044] Alternatively, the camera component can be used to determine whether the number of faces in the first facial image exceeds a preset threshold for the number of faces.

[0045] Alternatively, the camera component can be used to determine whether the facial angle in the first facial image is within a preset facial angle range.

[0046] Alternatively, the camera component can be used to determine whether the facial size data in the first facial image is within a preset facial size threshold range.

[0047] Alternatively, the camera component can be used to determine whether the background environment data in the first facial image is within a preset background environment data threshold range.

[0048] Optionally, if the condition is not met, an operation prompt message is output to prompt the user to perform the specified operation, including:

[0049] If the facial integrity in the first facial image does not reach the preset facial region integrity threshold, an operation prompt message is output to prompt the user to align the face with the image capture frame.

[0050] Alternatively, if the number of faces in the first facial image exceeds a preset face number threshold, an operation prompt message is output to prompt the user to align the face corresponding to the face number threshold with the image capture frame.

[0051] Alternatively, if the facial angle in the first facial image is not within the preset facial angle range, an operation prompt message is output to prompt the user to adjust the facial angle.

[0052] Alternatively, if the facial size data in the first facial image is not within a preset facial size threshold range, an operation prompt message is output to prompt the user to adjust the distance between the face and the terminal application.

[0053] Alternatively, if the background environment data in the first facial image is not within the preset background environment data threshold range, an operation prompt message is output to prompt the user to adjust the background environment.

[0054] Optionally, the step of recognizing the user's facial skin condition using the second facial image includes:

[0055] Send the second facial image to the server;

[0056] Obtain the facial skin state data of the user based on the second facial image recognition returned by the server.

[0057] Optionally, sending the second facial image to the server includes: in response to detecting the user's confirmation operation on the second facial image, sending the second facial image to the server.

[0058] Optionally, the step of recognizing the user's facial skin condition using the second facial image includes: using a facial skin condition recognition model to perform facial skin condition recognition on the second facial image, obtaining the user's facial skin condition data, and displaying the user's facial skin condition data.

[0059] Optional, also includes:

[0060] Send a second request message to the server to request the facial skin state recognition model;

[0061] Obtain the facial skin state recognition model returned by the server.

[0062] Optional, also includes:

[0063] Capture a third facial image of the user using the camera feed;

[0064] Determine whether the third facial image meets the facial skin condition recognition criteria. If so, use the facial skin condition recognition model to perform facial skin condition recognition on the third facial image to obtain updated facial skin condition data of the user, and display the updated facial skin condition data of the user.

[0065] Optional, also includes:

[0066] If the facial skin condition data obtained by recognizing the user's facial skin condition using the second facial image does not match the normal skin data, a query message is displayed asking whether to re-identify the indicator items in the facial skin condition data that do not match the normal skin data.

[0067] In response to the detection of a confirmation operation for the query information, a third request message is sent to the server to request updated facial recognition parameters. The third request message includes an identifier of an indicator item in the facial skin state data that does not match the normal skin data.

[0068] Obtain the updated facial recognition parameters returned by the server in response to the third request message. The updated facial recognition parameters are generated by the server for indicator items in the facial skin state data that do not match the normal skin data.

[0069] The step of obtaining the camera component based on the facial recognition model and the facial recognition parameters includes: obtaining the updated camera component based on the facial recognition model and the updated facial recognition parameters.

[0070] Optional, also includes:

[0071] The camera captures a fourth facial image of the user.

[0072] Using the updated camera component, it is determined whether the fourth facial image meets the recognition conditions for identifying indicators in the facial skin state data that do not match the normal skin data. If so, the fourth facial image is used to identify the indicators in the facial skin state data that do not match the normal skin data.

[0073] Optional, also includes:

[0074] The same-layer rendering component of the terminal application determines whether the facial skin state data matches the normal skin data;

[0075] If the same-layer rendering component determines that the facial skin state data does not match the normal skin data, it passes an inquiry parameter to the display component of the terminal application to ask whether to re-identify the indicator items in the facial skin state data that do not match the normal skin data.

[0076] The display component generates the query information based on the query parameters;

[0077] The display of the query information used to ask whether to re-identify the indicator items in the facial skin condition data that do not match the normal skin data includes: the display component displaying the query information;

[0078] Optional, also includes:

[0079] The display component calls the operation monitoring component of the terminal application to detect the operation in response to the query information;

[0080] In response to detecting a confirmation operation for the query information, a third request message is sent to the server to request updated facial recognition parameters, including:

[0081] In response to detecting a confirmation operation for the query information, the operation monitoring component passes confirmation operation parameters to the same-layer rendering component to indicate that the confirmation operation has been detected.

[0082] The same-layer rendering component transmits to the interaction component of the terminal application the identifier parameter of the facial skin state data that does not match the normal skin data and the facial recognition update parameter for requesting the updated facial recognition parameters.

[0083] The interactive component generates the third request message based on the indicator item identification parameter and the facial recognition update parameter;

[0084] Sending a third request message to the server to request updated facial recognition parameters includes: the interaction component sending the third request message to the server.

[0085] Optionally, obtaining the updated facial recognition parameters returned by the server in response to the third request message includes: obtaining the updated facial recognition parameters returned by the server in response to the third request message by the interaction component;

[0086] The method further includes: the interactive component passing the updated facial recognition parameters to the same-layer rendering component;

[0087] The step of obtaining the updated camera component based on the facial recognition model and the updated facial recognition parameters includes: the same-layer rendering component obtaining the updated camera component based on the facial recognition model and the updated facial recognition parameters.

[0088] Optionally, the application page is an HTML5 page;

[0089] Loading the camera component for facial recognition corresponding to the terminal application includes loading the camera component on an HTML5 page.

[0090] Optionally, loading the camera component on the HTML5 page includes: invoking the camera component through a camera component call interface set for the HTML5 specification.

[0091] This application also provides a facial skin condition recognition method, applied on a server side. The method includes: obtaining a first request message sent by a terminal application requesting to obtain a facial recognition model corresponding to the terminal application; sending the facial recognition model corresponding to the terminal application to the terminal application in response to the first request message; obtaining a facial image sent by the terminal application that meets the facial skin condition recognition conditions, wherein a camera component generated according to the facial recognition model determines whether the facial image meets the facial skin condition recognition conditions; performing facial skin condition recognition on the facial image to obtain facial skin condition data; and sending the facial skin condition data to the terminal application.

[0092] Optionally, the first request message sent by the terminal application to request the acquisition of the facial recognition model corresponding to the terminal application includes:

[0093] A first request message sent by the interaction component of the terminal application to request the facial recognition model corresponding to the terminal application is obtained, wherein the first request message is generated in the following manner:

[0094] Operations to the terminal application are detected by the operation monitoring component of the terminal application;

[0095] In response to detecting a trigger operation that enables facial skin state recognition, the operation monitoring component passes camera component loading parameters, which represent loading the camera component, to the same-layer rendering component of the terminal application.

[0096] The same-layer rendering component will send the facial recognition model request parameters and the identifier parameters of the terminal application to the interaction component of the terminal application.

[0097] The interactive component generates the first request message based on the facial recognition model request parameters and the identifier parameters of the terminal application.

[0098] Optionally, sending the facial recognition model corresponding to the terminal application to the terminal application in response to the first request message includes: sending the facial recognition model corresponding to the terminal application to the interaction component of the terminal application in response to the first request message.

[0099] Optionally, the camera component is generated in the following manner:

[0100] The interactive component sends the facial recognition model to the same-layer rendering component;

[0101] The same-layer rendering component obtains facial recognition parameters;

[0102] The same-layer rendering component generates the camera component based on the facial recognition model and the facial recognition parameters.

[0103] Optionally, the same-layer rendering component sends a facial recognition model request parameter for requesting to obtain the facial recognition model corresponding to the terminal application and the identifier parameter of the terminal application to the interaction component of the terminal application, including: the same-layer rendering component sends a facial recognition model acquisition parameter for requesting to obtain the facial recognition model corresponding to the terminal application, the identifier parameter of the terminal application, and a rendering request parameter for requesting to obtain the rendering parameters for rendering the camera image to the interaction component of the terminal application;

[0104] The interactive component generates the first request message based on the facial recognition model request parameters, the terminal application's identifier parameters, and the rendering request parameters;

[0105] The method further includes: providing the rendering parameters to the interactive component, and the interactive component passing the rendering parameters to the rendering component at the same layer;

[0106] The same-layer rendering component renders the camera image according to the rendering parameters.

[0107] Optional, also includes:

[0108] Obtain the identification information of the terminal application from the first request message;

[0109] Based on the pre-established correspondence between terminal application identification information and facial recognition models, the facial recognition model corresponding to the terminal application is obtained.

[0110] Optionally, it may also include: obtaining a facial skin condition recognition model;

[0111] The step of performing facial skin condition recognition on the facial image to obtain facial skin condition data includes: using the facial skin condition recognition model to perform facial skin condition recognition on the facial image to obtain facial skin condition data.

[0112] Optional, also includes:

[0113] If the facial skin condition data obtained by recognizing the user's facial skin condition using the second facial image does not match the normal skin data, then an inquiry message is obtained to ask whether to re-identify the indicator items in the facial skin condition data that do not match the normal skin data.

[0114] The query message used to ask whether to re-identify the indicator items in the facial skin condition data that do not match the normal skin data is sent to the terminal application;

[0115] The terminal application sends a third request message to request updated facial recognition parameters, the third request message including an identifier of an indicator item in the facial skin state data that does not match the normal skin data;

[0116] In response to the third request message, the updated facial recognition parameters are sent to the terminal application. The updated facial recognition parameters are generated for the indicator items in the facial skin state data that do not match the normal skin data.

[0117] Based on the facial recognition model and the updated facial recognition parameters, an updated camera component is generated.

[0118] Optional, also includes:

[0119] Obtain the user's fourth facial image sent by the terminal application;

[0120] Using the updated camera component, it is determined whether the fourth facial image meets the recognition conditions for identifying indicators in the facial skin state data that do not match the normal skin data. If so, the fourth facial image is used to identify the indicators in the facial skin state data that do not match the normal skin data.

[0121] Optional, also includes:

[0122] The same-layer rendering component of the terminal application determines whether the facial skin state data matches the normal skin data;

[0123] If the same-layer rendering component determines that the facial skin state data does not match the normal skin data, it passes an inquiry parameter to the display component of the terminal application to ask whether to re-identify the indicator items in the facial skin state data that do not match the normal skin data.

[0124] The display component generates the query information based on the query parameters;

[0125] The display of the query information used to inquire whether to re-identify the indicator items in the facial skin condition data that do not match the normal skin data includes: the display component displaying the query information.

[0126] Optional, also includes:

[0127] The display component calls the operation monitoring component of the terminal application to detect the operation in response to the query information;

[0128] The third request message sent by the terminal application to request updated facial recognition parameters includes:

[0129] In response to detecting a confirmation operation for the query information, the operation monitoring component passes confirmation operation parameters to the same-layer rendering component to indicate that the confirmation operation has been detected.

[0130] The same-layer rendering component transmits to the interaction component of the terminal application the identifier parameter of the facial skin state data that does not match the normal skin data and the facial recognition update parameter for requesting the updated facial recognition parameters.

[0131] The interactive component generates the third request message based on the indicator item identification parameter and the facial recognition update parameter;

[0132] In response to detecting a confirmation operation for the query information, the operation monitoring component passes confirmation operation parameters to the same-layer rendering component to indicate that the confirmation operation has been detected.

[0133] The same-layer rendering component transmits to the interaction component of the terminal application the identifier parameter of the facial skin state data that does not match the normal skin data and the facial recognition update parameter for requesting the updated facial recognition parameters.

[0134] The interactive component generates the third request message based on the indicator item identification parameter and the facial recognition update parameter;

[0135] The process of obtaining the third request message sent by the terminal application to request updated facial recognition parameters includes: obtaining the third request message sent by the interaction component.

[0136] Optional, also includes:

[0137] Sending the updated facial recognition parameters to the terminal application in response to the third request message includes: sending the updated facial recognition parameters to the interaction component in response to the third request message;

[0138] The method further includes: the interactive component passing the updated facial recognition parameters to the same-layer rendering component;

[0139] The step of generating an updated camera component based on the facial recognition model and the updated facial recognition parameters includes: the same-layer rendering component generating the updated camera component based on the facial recognition model and the updated facial recognition parameters.

[0140] This application also provides a facial skin condition recognition method, applied on a server side, the method comprising: obtaining a second request message sent by a terminal application for requesting to obtain a facial skin condition recognition model; sending the facial skin condition recognition model to the terminal application in response to the second request message; obtaining facial skin condition data of the user sent by the terminal application, wherein the user's facial skin condition data is obtained by performing facial skin condition recognition on facial images that meet the facial skin condition recognition conditions using the facial skin condition recognition model; and storing the user's facial skin condition data.

[0141] Optional, also includes:

[0142] Obtain the user's user information from the second request message;

[0143] Based on the user information, obtain the user's profile information;

[0144] Based on the user's profile information, the baseline facial skin condition recognition model is adjusted to obtain an adjusted facial skin condition recognition model. The adjusted facial skin condition recognition model is used to identify the user's facial skin condition in conjunction with the user's profile information.

[0145] Sending the facial skin condition recognition model to the terminal application includes: sending the adjusted facial skin condition recognition model to the terminal application.

[0146] This application also provides a facial skin condition recognition device for use in a terminal application. The device includes: a loading unit, configured to load a camera component for facial recognition corresponding to the terminal application in response to a trigger operation that activates facial skin condition recognition; a rendering unit, configured to render a camera image for capturing facial images on the application page of the terminal application; a capturing unit, configured to capture a first facial image of the user through the camera image; a judging unit, configured to use the camera component to judge whether the first facial image meets the facial skin condition recognition conditions, and if not, output an operation prompt message to prompt the user to perform a specified operation, and capture a second facial image of the user after performing the specified operation through the camera image; and a recognition unit, configured to use the camera component to judge whether the second facial image meets the facial skin condition recognition conditions, and if so, recognize the user's facial skin condition using the second facial image.

[0147] This application also provides a facial skin condition recognition device applied to a server. The device includes: a first request message acquisition unit, configured to acquire a first request message sent by a terminal application requesting to obtain a facial recognition model corresponding to the terminal application; a facial recognition model sending unit, configured to send the facial recognition model corresponding to the terminal application to the terminal application in response to the first request message; a facial image judgment unit, configured to acquire a facial image sent by the terminal application that meets the facial skin condition recognition conditions, wherein a camera component generated according to the facial recognition model determines whether the facial image meets the facial skin condition recognition conditions; a facial skin condition data acquisition unit, configured to perform facial skin condition recognition on the facial image to obtain facial skin condition data; and a facial skin condition data sending unit, configured to send the facial skin condition data to the terminal application.

[0148] This application also provides a facial skin condition recognition device applied to a server. The device includes: a second request message acquisition unit, configured to acquire a second request message sent by a terminal application requesting to obtain a facial skin condition recognition model; a facial skin condition recognition model sending unit, configured to send the facial skin condition recognition model to the terminal application in response to the second request message; a facial skin condition data acquisition unit, configured to acquire facial skin condition data of the user sent by the terminal application, wherein the user's facial skin condition data is obtained by performing facial skin condition recognition on facial images that meet the facial skin condition recognition conditions using the facial skin condition recognition model; and a facial skin condition data storage unit, configured to store the user's facial skin condition data.

[0149] This application also provides an electronic device, including: a processor; and a memory for storing a computer program, wherein the device, when powered on and running the computer program through the processor, performs the above-described method.

[0150] This application also provides a storage device that stores a computer program, which is executed by a processor to perform the above-described method.

[0151] Compared with the prior art, this application has the following advantages:

[0152] This application provides a facial skin condition recognition method, comprising: in response to detecting a trigger operation to enable facial skin condition recognition, loading a camera component for facial recognition corresponding to the terminal application; rendering a camera image for capturing facial images on the application page of the terminal application; capturing a first facial image of the user through the camera image; using the camera component to determine whether the first facial image meets the facial skin condition recognition conditions, and if not, outputting an operation prompt message to prompt the user to perform a specified operation; capturing a second facial image of the user after performing the specified operation through the camera image; using the camera component to determine whether the second facial image meets the facial skin condition recognition conditions, and if so, recognizing the user's facial skin condition using the second facial image.

[0153] The facial skin condition recognition method described in this application does not invoke the system camera when taking a photo. Instead, after loading the camera component corresponding to the terminal application for facial recognition, it uses same-layer rendering technology to render the camera image used to capture the facial image on the application page of the terminal application, making the interface of the camera component more dynamic. By using the camera component, it determines whether the first facial image meets the facial skin condition recognition conditions. If it does not meet the conditions, it outputs operation prompts to prompt the user to perform a specified operation, realizing real-time operation prompts to indicate whether the user's face is outside the frame. Therefore, compared to invoking the system camera, which can only take pictures, the facial skin condition recognition method described in this application invokes the camera component for facial recognition, which can identify whether the face meets the conditions and provide real-time reminders on whether the facial image meets the facial skin condition recognition conditions. This enables the capture of facial images that meet the user's facial skin condition recognition conditions, greatly reducing the failure rate of skin measurement and improving the efficiency of skin condition recognition. Attached Figure Description

[0154] Figure 1 This is a schematic diagram illustrating an application scenario of a facial skin condition recognition method provided in the first embodiment of this application;

[0155] Figure 2This is a flowchart of a facial skin condition recognition method provided in the first embodiment of this application;

[0156] Figure 3 This is a flowchart of a facial skin condition recognition method provided in the second embodiment of this application;

[0157] Figure 4 This is a flowchart of a facial skin condition recognition method provided in the third embodiment of this application;

[0158] Figure 5 This is a schematic diagram of a facial skin condition recognition device provided in the fourth embodiment of this application;

[0159] Figure 6 This is a schematic diagram of a facial skin condition recognition device provided in the fifth embodiment of this application;

[0160] Figure 7 This is a schematic diagram of a facial skin condition recognition device provided in the sixth embodiment of this application;

[0161] Figure 8 This is a schematic diagram of an electronic device provided in the seventh embodiment of this application. Detailed Implementation

[0162] Many specific details are set forth in the following description to provide a full understanding of this application. However, this application can be implemented in many other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of this application; therefore, this application is not limited to the specific embodiments disclosed below.

[0163] First, to enable those skilled in the art to better understand the solution of this application, the specific application scenarios of the embodiments of the facial skin condition recognition method provided in this application will be described in detail below. For example... Figure 1 As shown, it is a schematic diagram of an application scenario for a facial skin condition recognition method provided in the first embodiment of this application.

[0164] In its implementation, the facial skin condition recognition method described in this application involves the following steps: First, the user opens an application capable of facial skin condition recognition on their terminal device. Then, the user clicks a trigger button to enable facial skin condition recognition on the application interface. After detecting this trigger operation, the terminal application loads its corresponding camera component for facial recognition. This camera component includes functions for previewing photos, opening the photo album, and rotating the lens.

[0165] Next, the camera view used to capture facial images is rendered on the application page of the terminal application. After rendering, an image capture frame with animation effects appears on the application page of the terminal application. The first facial image of the user is captured through the camera view, that is, by clicking the shooting button, the image capture frame can capture the first facial image of the user. Using the camera component, it is determined whether the first facial image meets the recognition conditions of facial skin condition, such as whether the user's face is within the image capture frame, whether the shooting light and shooting angle are appropriate, etc. If it does not meet the conditions, an operation prompt message is output to prompt the user to perform a specified operation. The second facial image after the user performs the specified operation is captured through the camera view. For example, if the user's face is not within the image capture frame when taking the picture, the user operation prompt area on the application interface will display the operation prompt message "Please place your face within the image capture frame"; or, for example, if the light is too dark when the user takes the picture, the user operation prompt area on the application interface will display the operation prompt message "The light is too dark". The user will make adaptive adjustments to the light according to the operation prompt message. At this time, the second facial image after the user performs the specified operation can be captured through the camera view.

[0166] Finally, using the camera component, it is determined whether the second facial image meets the recognition conditions for facial skin condition. If so, the second facial image is used to identify the user's facial skin condition. After the user performs the specified operation according to the prompts, and the user's facial image meets the recognition conditions for facial skin condition, the facial skin condition display area on the application interface will display the recognition result of the facial skin condition for the current facial image. For example, facial skin condition display area 1 on the application interface may show enlarged pores, while facial skin condition display area 2 may show severe dark circles, etc.

[0167] The above describes the entire process of the facial skin condition recognition method. In response to a trigger operation that activates facial skin condition recognition, the camera component corresponding to the terminal application for facial recognition is loaded. A camera view for capturing facial images is rendered on the application page of the terminal application. A first facial image of the user is captured using the camera view. The camera component is used to determine whether the first facial image meets the facial skin condition recognition criteria. If not, an operation prompt message is output to prompt the user to perform a specified operation. A second facial image is captured using the camera view after the user performs the specified operation. The camera component is then used to determine whether the second facial image meets the facial skin condition recognition criteria. If it does, the user's facial skin condition is recognized using the second facial image.

[0168] This application embodiment does not invoke the system camera when taking a photo. Instead, after loading the camera component corresponding to the terminal application for facial recognition, it uses same-layer rendering technology to render the camera image used to capture the facial image on the application page of the terminal application, making the interface of the camera component more dynamic. By using the camera component, it determines whether the first facial image meets the recognition conditions for facial skin condition. If it does not meet the conditions, it outputs operation prompts to prompt the user to perform a specified operation, realizing real-time operation prompts to indicate whether the user's face is outside the frame. Therefore, compared to invoking the system camera, which can only take pictures, the facial skin condition recognition method of this application invokes the camera component for facial recognition, which can identify whether the face meets the conditions and provide real-time reminders on whether the facial image meets the facial skin condition recognition conditions. This enables the capture of facial images that meet the user's facial skin condition recognition conditions, greatly reducing the failure rate of skin measurement and improving the efficiency of skin condition recognition.

[0169] It should be noted that, in this embodiment, the terminal mainly refers to the mobile terminal device used by the user, such as a mobile phone or tablet computer; of course, it can also be the computer device used by the user; the terminal application can be an APP on the terminal or a web page.

[0170] The present application will be described in detail below with reference to several embodiments and accompanying drawings.

[0171] First Embodiment

[0172] The first embodiment of this application provides a method for facial skin condition recognition, which is described below in conjunction with... Figure 2 This method for recognizing facial skin condition is described in detail.

[0173] Step S201: In response to the detection of a trigger operation that enables facial skin condition recognition, load the camera component for facial recognition corresponding to the terminal application;

[0174] In the first embodiment of this application, a facial skin condition recognition method is specifically described in detail using an APP as the terminal application. When the terminal application is a web page, the facial skin condition recognition method is similar to that when the terminal application is an APP, and will not be described in detail here.

[0175] When the terminal application is an app, in response to a trigger operation that detects the user's activation of facial skin condition recognition, the app loads the camera component corresponding to the terminal application for facial recognition. This camera component can be an augmented reality camera or an artificial intelligence camera. Loading the camera component for facial recognition includes: sending a first request message to a server to request the acquisition of a facial recognition model corresponding to the terminal application; obtaining the facial recognition model returned by the server; obtaining facial recognition parameters; and obtaining the camera component based on the facial recognition model and the facial recognition parameters.

[0176] The following details the loading process of the camera component used for facial recognition in the terminal application.

[0177] Step 1: Send a first request message to the server to request the facial recognition model corresponding to the terminal application.

[0178] In this embodiment of the application, the method further includes: detecting operations on the terminal application by an operation monitoring component of the terminal application, wherein the operation monitoring component is used to detect operations on the terminal application. Correspondingly, the step of loading the camera component for facial recognition corresponding to the terminal application in response to detecting a trigger operation to enable facial skin state recognition specifically includes: first, after detecting the trigger operation to enable facial skin state recognition, the operation monitoring component passes camera component loading parameters indicating the loading of the camera component to the same-layer rendering component of the terminal application; then, the same-layer rendering component sends facial recognition model request parameters for requesting to obtain the facial recognition model corresponding to the terminal application and the identifier parameters of the terminal application to the interaction component of the terminal application; finally, the interaction component generates the first request message based on the facial recognition model request parameters and the identifier parameters of the terminal application. Therefore, sending the first request message for requesting to obtain the facial recognition model corresponding to the terminal application to the server is specifically done by the interaction component sending the first request message to the server.

[0179] Step 2: Obtain the facial recognition model corresponding to the terminal application returned by the server.

[0180] Obtaining the facial recognition model corresponding to the terminal application returned by the server includes: obtaining the facial recognition model corresponding to the terminal application returned by the server through the interaction component. Since the terminal application sends a first request message to the server requesting to obtain the facial recognition model corresponding to the terminal application through the interaction component, obtaining the facial recognition model corresponding to the terminal application returned by the server is also done through the interaction component within the terminal application; that is, the facial recognition model corresponding to the terminal application returned by the server is obtained by the interaction component.

[0181] Step 3: Obtain facial recognition parameters.

[0182] The loading of the camera component corresponding to the terminal application for facial recognition also includes: the interaction component sending the facial recognition model to the same-layer rendering component; obtaining facial recognition parameters includes: obtaining facial recognition parameters by the same-layer rendering component.

[0183] Step 4: Obtain the camera component based on the facial recognition model and the facial recognition parameters.

[0184] The step of obtaining the camera component based on the facial recognition model and the facial recognition parameters includes: the in-layer rendering component obtaining the camera component based on the facial recognition model and the facial recognition parameters. Since the facial recognition parameters are obtained through the in-layer rendering component, and the facial recognition model is sent to the in-layer rendering component by the interaction component, obtaining the camera component based on the facial recognition model and the facial recognition parameters in this step is essentially the in-layer rendering component obtaining the camera component based on the facial recognition model and the facial recognition parameters.

[0185] In this embodiment of the application, rendering the camera image for capturing facial images on the application page of the terminal application includes: rendering the camera image for capturing facial images on the application page of the terminal application by the same-layer rendering component. Therefore, rendering the camera image for capturing facial images on the application page of the terminal application is essentially rendering the camera image for capturing facial images on the application page of the terminal application by the same-layer rendering component.

[0186] In this embodiment of the application, the same-layer rendering component sends a facial recognition model request parameter for requesting to obtain the facial recognition model corresponding to the terminal application and the identifier parameter of the terminal application to the interaction component of the terminal application, including: the same-layer rendering component sends a facial recognition model acquisition parameter for requesting to obtain the facial recognition model corresponding to the terminal application, the identifier parameter of the terminal application, and a rendering request parameter for requesting to obtain rendering parameters for rendering the camera image to the interaction component of the terminal application; the interaction component generates the first request message based on the facial recognition model request parameter, the identifier parameter of the terminal application, and the rendering request parameter.

[0187] In this embodiment of the application, the facial skin state recognition method further includes: the interaction component obtaining the rendering parameters provided by the server, and the interaction component passing the rendering parameters to the same-layer rendering component; the rendering of the camera image for capturing facial images on the application page of the terminal application includes: the same-layer rendering component rendering the camera image according to the rendering parameters.

[0188] It should be noted that the facial recognition model includes either an XNN model or an MNN model. Different terminal applications use different facial recognition models. For example, terminal application A uses an XNN model, while terminal application B uses an MNN model. Since different terminals use different facial recognition models, the methods for calling the facial recognition model also differ. Similarly, the facial recognition parameters required for different facial recognition models are also different. Therefore, in this embodiment, differentiated calling is needed based on the differences between terminals to adapt to multiple terminal apps and smooth out the differences between terminals.

[0189] The above describes the calling process of the camera component. The step of obtaining the camera component based on the face recognition model and the face recognition parameters includes: passing the face recognition parameters into the face recognition model to obtain a face recognition model with the face recognition parameters, which serves as the camera component.

[0190] It should be noted that the facial recognition parameters are pre-configured; and the facial recognition parameters are configured as follows: obtaining the recognition conditions for the facial skin condition; obtaining the operation prompt information; and generating the facial recognition parameters based on the recognition conditions for the facial skin condition and the operation prompt information. The operation prompt information can be voice, text, or graphic prompts.

[0191] The facial skin condition recognition conditions are generated as follows: obtaining facial image capture problem information; obtaining parameter thresholds for the facial image capture problem to be valid; and generating the facial skin condition recognition conditions based on the facial image capture problem information and the parameter thresholds for the facial image capture problem to be valid.

[0192] It should be further explained that facial image capture problem information refers to the problem information generated during the facial image capture process due to the gap between the current facial image and the facial image that meets the recognition conditions of facial skin condition. For example, when capturing a user's facial image, if the user does not place the complete face in the image capture frame, the facial image capture problem information is that the face is not found or the face is incomplete.

[0193] The threshold parameters for determining whether facial image capture is valid can be set as follows: To address whether a face has been found and whether it is fully represented within the image capture frame, 198 points on the face can be randomly selected. If the number of points captured by the camera is less than 150, it indicates that the user's face is incomplete within the image capture frame; if the number of points captured by the camera is less than 10, it indicates that the user's face has not been recognized within the image capture frame. To address whether the user's facial rotation angle is too large, prompts can be added in three directions: roll, yaw, and pitch. Pitch (tilt angle - rotation around the X-axis), yaw (yaw angle - rotation around the Y-axis), and roll (roll angle - rotation around the Z-axis) correspond to tilting the head up, tilting the head down, and turning the head, respectively. When the yaw angle of facial rotation is greater than 30 degrees, it indicates that the horizontal rotation angle of the face is too large, i.e., the tilting angle is too large. When the pitch angle of facial rotation is greater than 30 degrees, it indicates that the vertical rotation angle of the face is too large, i.e., the tilting angle is too large. When the roll angle of the face is greater than 30 degrees, it indicates that the angle of the face turning is too large. Regarding the question of whether the face is looking straight at the camera, you can also add prompts in the above three directions. When the yaw angle, pitch angle, and roll angle of the face are all greater than 30 degrees, it indicates that the face is not looking straight at the camera.

[0194] After the camera component for facial recognition corresponding to the terminal application is loaded, the next step is to render the camera image for capturing facial images on the application page of the terminal application.

[0195] Step S202: Render the camera image used to capture facial images on the application page of the terminal application;

[0196] It should be noted that the application page is an HTML (HyperText Markup Language) 5 page, or H5 page for short; loading the camera component for facial recognition corresponding to the terminal application includes: loading the camera component on the HTML5 page. Loading the camera component on the HTML5 page includes: calling the camera component through a camera component call interface defined for the HTML5 specification.

[0197] The above steps involve integrating a camera component into an HTML5 page and implementing customized visual animation effects on top of the camera. Specifically, integrating a camera component into an HTML5 page means using in-layer rendering technology to embed the augmented reality or artificial intelligence camera page into the HTML5 page, and then rendering the camera view used to capture facial images on the application's page.

[0198] Therefore, after loading the camera component for facial recognition corresponding to the terminal application, a camera view for capturing facial images will be rendered on the application page of the terminal application. Through same-layer rendering technology, the camera style and functions can be customized to achieve cool animation effects. Simultaneously, this visual animation customization function can be adapted to multiple platforms; that is, each platform can reuse a single set of code, smoothing out platform differences. In this embodiment, smoothing out platform differences specifically includes: on the one hand, differentiated packaging based on the facial recognition models and interface parameters of different platforms; on the other hand, receiving different input methods based on the same-layer rendering technology of different platforms, and performing unified output.

[0199] It should be noted that the facial recognition model includes rendering parameters for rendering the camera image; rendering the camera image for capturing facial images on the application page of the terminal application includes: obtaining the rendering parameters from the facial recognition model; and rendering the camera image according to the rendering parameters. The rendering parameters include the style of the camera image, the position and layout of the image capture frame, and the font size and color in the image, etc.

[0200] Step S203: Capture the user's first facial image through the camera view;

[0201] This step involves taking a picture of the user's face, capturing the user's first facial image through the camera's view.

[0202] Step S204: Using the camera component, determine whether the first facial image meets the recognition conditions for facial skin condition. If it does not meet the conditions, output operation prompt information to prompt the user to perform a specified operation. Capture the second facial image after the user performs the specified operation through the camera screen.

[0203] It should be noted that, using the camera component, it is determined whether the first facial image meets the recognition conditions for facial skin condition. If it does, the process proceeds directly to step S205, that is, the user's facial skin condition can be directly recognized using the first facial image.

[0204] After capturing a first facial image of the user through the camera view, the camera component is used to determine whether the first facial image meets the recognition conditions for facial skin condition, including: using the camera component to determine whether the facial integrity in the first facial image reaches a preset facial integrity threshold; or, using the camera component to determine whether the number of faces in the first facial image exceeds a preset face number threshold; or, using the camera component to determine whether the facial angle in the first facial image is within a preset facial angle range; or, using the camera component to determine whether the facial size data in the first facial image is within a preset facial size threshold range; or, using the camera component to determine whether the background environment data in the first facial image is within a preset background environment data threshold range.

[0205] Specifically, the camera component is used to determine whether the facial completeness in the first facial image reaches a preset facial completeness threshold, such as whether a face can be found and whether the face is complete; the camera component is used to determine whether the number of faces in the first facial image exceeds a preset face number threshold, such as whether multiple faces are detected and whether the multiple faces are of similar size; the camera component is used to determine whether the facial angle in the first facial image is within a preset facial angle range, such as whether the facial rotation angle is too large or whether the face is looking straight at the camera; the camera component is used to determine whether the facial size data in the first facial image is within a preset facial size threshold range, such as whether the face is too large or too small; it should be noted that when the camera component captures multiple faces, the largest and smallest faces are used as references; the camera component is used to determine whether the background environment data in the first facial image is within a preset background environment data threshold range, such as whether the light is too bright or too dark.

[0206] Using the camera component, it is determined whether the first facial image meets the recognition conditions for facial skin condition. If it does not meet the conditions, an operation prompt message is output to prompt the user to perform a specified operation. The second facial image after the user performs the specified operation is captured through the camera screen.

[0207] Similarly, if the condition is not met, an operation prompt message is output to prompt the user to perform a specified operation, including: if the facial integrity in the first facial image does not reach a preset facial region integrity threshold, an operation prompt message is output to prompt the user to align the face with the image capture frame; or, if the number of faces in the first facial image exceeds a preset face number threshold, an operation prompt message is output to prompt the user to align the face corresponding to the face number threshold with the image capture frame; or, if the facial angle in the first facial image is not within a preset facial angle range, an operation prompt message is output to prompt the user to adjust the facial angle; or, if the facial size data in the first facial image is not within a preset facial size threshold range, an operation prompt message is output to prompt the user to adjust the distance between the face and the center of the terminal application; or, if the background environment data in the first facial image is not within a preset background environment data threshold range, an operation prompt message is output to prompt the user to adjust the background environment.

[0208] Using the above example, if the facial completeness in the first facial image does not reach a preset facial region completeness threshold, an operation prompt message is output to guide the user to align the face with the image capture frame. For example, if no face is found or the face is incomplete, the operation prompt message "Please align your face with the prompt frame" is output. If the number of faces in the first facial image exceeds a preset face number threshold, an operation prompt message is output to guide the user to align the face corresponding to the face number threshold with the image capture frame. For example, if multiple faces are detected and the sizes of the multiple faces are similar, the operation prompt message "Only one face can be measured at a time" is output. If the facial angle in the first facial image is not within a preset facial angle range, an operation prompt message is output to guide the user to adjust the facial angle. For example, if the facial rotation angle is too large, the operation prompt message "Adjust facial angle" is output. The system outputs an operation prompt message: "Please face the camera directly." If the user is not looking directly at the camera, the system outputs the same prompt message. If the facial size data in the first facial image is not within a preset facial size threshold range, the system outputs an operation prompt message to prompt the user to adjust the distance between the face and the center of the terminal application. For example, if the face is too large, the system outputs the prompt message: "Please move closer." If the face is too small, the system outputs the prompt message: "Please move further away." If the background environment data in the first facial image is not within a preset background environment data threshold range, the system outputs an operation prompt message to prompt the user to adjust the background environment. For example, if the light is too dim, the system outputs the prompt message: "The light is too dim" or "Please brighten the light." If the light is too bright, the system outputs the prompt message: "The light is too bright" or "Please dim the light." Then, the system captures a second facial image after the user performs the specified operation through the camera screen.

[0209] The facial skin condition recognition method described in this application provides real-time prompts to the user regarding whether their face is within the image capture frame, whether the user's face is too far from the frame, and whether the angle between the user's face and the frame is too large. These prompts are delivered via voice, text, or graphics, enabling the user to follow the instructions. This real-time feedback on whether the user's face is outside the frame adds an engaging interactive element to the facial skin condition recognition process, enhancing the user experience. Furthermore, the user's ability to follow the prompts ensures that the camera captures facial images that meet the recognition criteria, significantly reducing the failure rate and improving the efficiency of skin condition recognition.

[0210] Step S205: Using the camera component, determine whether the second facial image meets the recognition conditions for facial skin condition. If so, use the second facial image to recognize the user's facial skin condition.

[0211] This step involves capturing a second facial image of the user through the camera after the user performs a specified operation, and then using the camera component again to determine whether the second facial image meets the recognition conditions for facial skin condition. If it does not meet the conditions, the above step S204 is repeated; if it does, the user's facial skin condition is identified using the second facial image.

[0212] It should be noted that the step of recognizing the user's facial skin condition using the second facial image includes: sending the second facial image to the server; and obtaining facial skin condition data of the user recognized from the second facial image returned by the server. The facial skin condition data includes skin color, skin age, skin texture, and skin roughness. Skin color includes melanin, acne scars, dark circles, and the presence or absence of eye bags, etc.; skin texture includes forehead wrinkles, crow's feet, fine lines around the eyes, nasolabial folds, etc.; skin roughness includes pore size, the number of acne pimples, etc. The facial skin condition data also includes whether the user has single or double eyelids, etc.

[0213] Sending the second facial image to the server includes: in response to detecting the user's confirmation operation regarding the second facial image, sending the second facial image to the server. The user's confirmation operation regarding the second facial image refers to the user clicking the camera button on the app's interface. After the user takes a photo, the terminal application sends the user's second facial image to the server for facial skin condition recognition.

[0214] In the first embodiment of this application, the step of recognizing the user's facial skin condition using the second facial image includes: using a facial skin condition recognition model to perform facial skin condition recognition on the second facial image, obtaining the user's facial skin condition data, and displaying the user's facial skin condition data.

[0215] The facial skin state recognition method described in the first embodiment of this application further includes: sending a second request message to a server to request obtaining a facial skin state recognition model; and obtaining the facial skin state recognition model returned by the server.

[0216] The above describes the process of facial skin condition recognition. Specifically, after the terminal application sends a facial image that meets the facial skin condition recognition criteria to the server, the terminal application sends a second request message to the server to request a facial skin condition recognition model. Then, the terminal application obtains the facial skin condition recognition model returned by the server. After obtaining the facial skin condition recognition model, the terminal application uses the facial skin condition recognition model to perform facial skin condition recognition on the facial image that meets the facial skin condition recognition criteria, thereby obtaining the user's facial skin condition data. Finally, the user's facial skin condition data is displayed on the terminal application interface.

[0217] The facial skin condition recognition method described in the first embodiment of this application further includes: capturing a third facial image of the user through the camera image; determining whether the third facial image meets the facial skin condition recognition conditions; if so, using the facial skin condition recognition model to perform facial skin condition recognition on the third facial image to obtain updated facial skin condition data of the user, and displaying the updated facial skin condition data of the user.

[0218] It's important to note that when capturing a third facial image of the user through the camera, if this image meets the criteria for facial skin condition recognition, the returned facial skin condition data will differ depending on changes in the user's distance from the camera and the angle between them. For example, some subtle skin condition data in the user's facial image may not be displayed when the user is far from the camera, but will be recognized when the user is closer. Therefore, when the user is in a suitable position, the recognized facial skin condition data is more accurate. In this case, updated facial skin condition data can be obtained. Furthermore, the updated facial skin condition data can be used to correct and supplement the previously obtained facial skin condition data, resulting in the displayed data being the updated version of the user's facial skin condition.

[0219] In this embodiment of the application, the method further includes: if the facial skin condition data obtained by recognizing the user's facial skin condition using the second facial image does not match the normal skin data, then displaying a query message to ask whether to re-recognize the indicator items in the facial skin condition data that do not match the normal skin data.

[0220] It should be noted that the normal skin data is obtained based on the user's historical skin measurement records. If the facial skin condition data obtained by recognizing the user's facial skin condition using the second facial image recognition does not match the normal skin data, it indicates a deviation in the recognition results of certain indicators in the facial skin condition data. In this case, the terminal application will display a query asking whether to re-recognize the indicators in the facial skin condition data that do not match the normal skin data. For example, if the normal skin data shows double eyelids, while the facial skin condition data obtained by recognizing the user's facial skin condition using the second facial image recognition shows single eyelids, the terminal application interface will display a query asking whether to re-recognize the eyes.

[0221] In this embodiment, after detecting a confirmation operation for the query information, the terminal application first sends a third request message to the server to request updated facial recognition parameters. The third request message includes identifiers of indicators in the facial skin state data that do not match the normal skin data. Since the facial skin state data obtained by recognizing the user's facial skin state using the second facial image does not match the normal skin data, the user chooses to re-identify based on the mismatched indicators. At this time, the terminal application sends a third request message to the server to request updated facial recognition parameters, and the third request message includes identifiers of indicators of mismatched facial skin state data, such as an identifier for the eyes.

[0222] Then, after the terminal application sends a third request message to the server to request updated facial recognition parameters, it will receive the updated facial recognition parameters returned by the server in response to the third request message. The updated facial recognition parameters are generated by the server for the indicator items in the facial skin state data that do not match the normal skin data.

[0223] Finally, obtaining the camera component based on the facial recognition model and the facial recognition parameters includes: obtaining the updated camera component based on the facial recognition model and the updated facial recognition parameters.

[0224] In this embodiment of the application, after obtaining the updated camera component, the method further includes: capturing a fourth facial image of the user through the camera view. Using the updated camera component, it is determined whether the fourth facial image meets the identification conditions for identifying indicators in the facial skin state data that do not match the normal skin data. If so, the fourth facial image is used to identify the indicators in the facial skin state data that do not match the normal skin data.

[0225] It should be noted that after capturing the user's fourth facial image through the camera, the updated camera components can be used to determine whether the fourth facial image meets the recognition conditions for identifying indicators in the facial skin condition data that do not match the normal skin data. If it does meet the conditions, the fourth facial image is used to identify the indicators in the facial skin condition data that do not match the normal skin data.

[0226] In this embodiment, the in-layer rendering component of the terminal application determines whether the facial skin state data matches the normal skin data. Specifically: First, if the in-layer rendering component determines that the facial skin state data does not match the normal skin data, it sends a query parameter to the display component of the terminal application to inquire whether to re-identify the indicator items in the facial skin state data that do not match the normal skin data. Then, the display component generates the query information based on the query parameter.

[0227] The display of the query information used to inquire whether to re-identify the indicator items in the facial skin condition data that do not match the normal skin data includes: the display component displaying the query information.

[0228] In this embodiment, the display component detects operations on the query information by invoking the operation monitoring component of the terminal application. Therefore, the step of sending a third request message to the server to request updated facial recognition parameters in response to the detected confirmation operation on the query information specifically involves: first, the operation monitoring component, in response to the detected confirmation operation on the query information, passing confirmation operation parameters indicating the detection of the confirmation operation to the same-layer rendering component; then, the same-layer rendering component passing an indicator parameter indicating that the facial skin state data does not match the normal skin data and facial recognition update parameters for requesting updated facial recognition parameters to the interaction component of the terminal application; finally, the interaction component generates the third request message based on the indicator parameter and the facial recognition update parameters.

[0229] Therefore, in this embodiment of the application, sending a third request message to the server to request updated facial recognition parameters includes: the interaction component sending the third request message to the server. Obtaining the updated facial recognition parameters returned by the server in response to the third request message includes: the interaction component obtaining the updated facial recognition parameters returned by the server in response to the third request message.

[0230] After obtaining the updated facial recognition parameters returned by the server in response to the third request message, the interaction component passes the updated facial recognition parameters to the rendering component at the same layer. Therefore, obtaining the updated camera component based on the facial recognition model and the updated facial recognition parameters is specifically achieved by the rendering component at the same layer obtaining the updated camera component based on the facial recognition model and the updated facial recognition parameters.

[0231] This application provides a facial skin condition recognition method, comprising: in response to detecting a trigger operation to enable facial skin condition recognition, loading a camera component for facial recognition corresponding to the terminal application; rendering a camera image for capturing facial images on the application page of the terminal application; capturing a first facial image of the user through the camera image; using the camera component to determine whether the first facial image meets the facial skin condition recognition conditions, and if not, outputting an operation prompt message to prompt the user to perform a specified operation; capturing a second facial image of the user after performing the specified operation through the camera image; using the camera component to determine whether the second facial image meets the facial skin condition recognition conditions, and if so, recognizing the user's facial skin condition using the second facial image.

[0232] The facial skin condition recognition method described in this application does not invoke the system camera when taking a photo. Instead, after loading the camera component corresponding to the terminal application for facial recognition, it uses same-layer rendering technology to render the camera image used to capture the facial image on the application page of the terminal application, making the interface of the camera component more dynamic. By using the camera component, it determines whether the first facial image meets the facial skin condition recognition conditions. If it does not meet the conditions, it outputs operation prompts to prompt the user to perform a specified operation, realizing real-time operation prompts to indicate whether the user's face is outside the frame. Therefore, compared to invoking the system camera, which can only take pictures, the facial skin condition recognition method described in this application invokes the camera component for facial recognition, which can identify whether the face meets the conditions and provide real-time reminders on whether the facial image meets the facial skin condition recognition conditions. This enables the capture of facial images that meet the user's facial skin condition recognition conditions, greatly reducing the failure rate of skin measurement and improving the efficiency of skin condition recognition.

[0233] Second Embodiment

[0234] In the first embodiment described above, a facial skin condition recognition method is provided for application in a terminal application. Correspondingly, in the second embodiment of this application, a facial skin condition recognition method is provided for application in a server. The parts of this embodiment that are the same as those in the first embodiment will not be repeated here. Please refer to the corresponding parts in the first embodiment.

[0235] Please refer to Figure 3 The flowchart below shows a facial skin condition recognition method provided in the second embodiment of this application.

[0236] Step S301: Obtain a first request message sent by the terminal application to request the facial recognition model corresponding to the terminal application;

[0237] This step is the process by which the server obtains the first request message sent by the terminal application, which is used to request the facial recognition model corresponding to the terminal application.

[0238] Step S301: In response to the first request message, send the facial recognition model corresponding to the terminal application to the terminal application;

[0239] This step involves the server sending the facial recognition model corresponding to the terminal application to the terminal application based on the first request message sent by the terminal application. It should be noted that the facial recognition model includes an XNN model or an MNN model; different terminal applications use different facial recognition models, and therefore the facial recognition model sent by the server to the terminal application will also be different.

[0240] Step S302: Obtain a facial image that meets the facial skin condition recognition conditions sent by the terminal application, wherein the camera component generated according to the facial recognition model determines whether the facial image meets the facial skin condition recognition conditions.

[0241] This step is the process by which the server obtains a facial image that meets the recognition criteria for facial skin condition.

[0242] Step S303: Perform facial skin condition recognition on the facial image to obtain facial skin condition data;

[0243] This step is the process by which the server obtains facial skin condition data.

[0244] Step S304: Send the facial skin status data to the terminal application.

[0245] This step involves the server sending the facial skin condition data to the terminal application.

[0246] The second embodiment of this application further includes: obtaining the identification information of the terminal application from the first request message; and obtaining the facial recognition model corresponding to the terminal application based on a pre-established correspondence between the terminal application identification information and the facial recognition model. In practical applications, by pre-establishing a correspondence between the terminal application identification information and the facial recognition model, once the identification of the terminal application is obtained, the identification information of the terminal application can be used as index information to quickly find the facial recognition model matching the terminal application.

[0247] The second embodiment of this application further includes: obtaining a facial skin condition recognition model; the step of performing facial skin condition recognition on the facial image to obtain facial skin condition data includes: using the facial skin condition recognition model to perform facial skin condition recognition on the facial image to obtain facial skin condition data.

[0248] Third Embodiment

[0249] In the first embodiment described above, a facial skin condition recognition method is provided for use in a terminal application. Correspondingly, in the third embodiment of this application, a facial skin condition recognition method is provided for use in a server. The parts of this embodiment that are the same as those in the first embodiment will not be repeated here. Please refer to the corresponding parts in the first embodiment.

[0250] Please refer to Figure 4 The above is a flowchart of a facial skin condition recognition method provided in the third embodiment of this application.

[0251] Step S401: Obtain the second request message sent by the terminal application to request the facial skin state recognition model;

[0252] This step is the process by which the server obtains the second request message sent by the terminal application, which is used to request the facial skin state recognition model.

[0253] Step S402: In response to the second request message, send the facial skin state recognition model to the terminal application;

[0254] This step involves the server sending the facial skin condition recognition model to the terminal application based on the second request message sent by the terminal application.

[0255] Step S403: Obtain the user's facial skin state data sent by the terminal application. The user's facial skin state data is obtained by using the facial skin state recognition model to perform facial skin state recognition on facial images that meet the facial skin state recognition conditions.

[0256] This step is the process by which the server obtains the user's facial skin condition data.

[0257] Step S404: Store the user's facial skin condition data.

[0258] This step involves the server storing the user's facial skin condition data.

[0259] The third embodiment of this application further includes: obtaining user information of the user from the second request message; and obtaining user profile information based on the user information.

[0260] It should be noted that, in practical applications, the user profile information is information authorized by the user.

[0261] Based on the user's profile information, the baseline facial skin condition recognition model is adjusted to obtain an adjusted facial skin condition recognition model. The adjusted facial skin condition recognition model is used to identify the user's facial skin condition in conjunction with the user's profile information.

[0262] Sending the facial skin condition recognition model to the terminal application includes: sending the adjusted facial skin condition recognition model to the terminal application.

[0263] It should be noted that in practical applications, the user profile information can be related to the user's lifestyle habits. For example, if a user doesn't sleep on time, their profile will show more pronounced dark circles under their eyes. The user profile information can also be related to the user's activity level; for example, if a user engages in a lot of outdoor activities and sun exposure, their profile will show darker skin. Therefore, this application can adjust the baseline facial skin condition recognition model based on the user's profile information to obtain an adjusted facial skin condition recognition model. After adjusting the model according to the user's lifestyle habits, it can more accurately identify the user's facial skin condition.

[0264] Fourth embodiment

[0265] In the first embodiment described above, a facial skin condition recognition method is provided. Correspondingly, the fourth embodiment of this application provides a facial skin condition recognition device. Since the device embodiment is basically similar to the first method embodiment, it is described simply; relevant details can be found in the description of the method embodiment. The device embodiments described below are merely illustrative.

[0266] Please refer to Figure 5 This is a schematic diagram of a facial skin condition recognition device provided in the fourth embodiment of this application.

[0267] This facial skin condition recognition device, used in terminal applications, includes:

[0268] The loading unit 501 is used to load the camera component for facial recognition corresponding to the terminal application in response to a trigger operation that detects the activation of facial skin condition recognition.

[0269] The rendering unit 502 is used to render a camera image for capturing facial images on the application page of the terminal application.

[0270] The capture unit 503 is used to capture a first facial image of the user through the camera screen;

[0271] The judgment unit 504 is used to use the camera component to determine whether the first facial image meets the recognition conditions of facial skin condition. If it does not meet the conditions, it outputs operation prompt information to prompt the user to perform a specified operation. The camera image is used to capture the second facial image after the user performs the specified operation.

[0272] The recognition unit 505 is used to determine whether the second facial image meets the recognition conditions for facial skin condition using the camera component. If it does, the second facial image is used to recognize the user's facial skin condition.

[0273] Fifth embodiment

[0274] In the second embodiment described above, a facial skin condition recognition method is provided. Correspondingly, the fifth embodiment of this application provides a facial skin condition recognition device. Since the device embodiment is basically similar to the second method embodiment, the description is relatively simple; relevant details can be found in the description of the method embodiment. The device embodiments described below are merely illustrative.

[0275] Please refer to Figure 6 This is a schematic diagram of a facial skin condition recognition device provided in the fifth embodiment of this application.

[0276] This facial skin condition recognition device, used on a server-side application, includes:

[0277] The first request message obtaining unit 601 is used to obtain a first request message sent by the terminal application for requesting to obtain the facial recognition model corresponding to the terminal application.

[0278] The face recognition model sending unit 602 is used to send the face recognition model corresponding to the terminal application to the terminal application in response to the first request message;

[0279] The facial image judgment unit 603 is used to obtain a facial image sent by the terminal application that meets the recognition conditions of facial skin condition, wherein the camera component generated according to the facial recognition model determines whether the facial image meets the recognition conditions of facial skin condition.

[0280] The facial skin condition data acquisition unit 604 is used to perform facial skin condition recognition on the facial image and obtain facial skin condition data.

[0281] The facial skin status data sending unit 605 is used to send the facial skin status data to the terminal application.

[0282] Sixth Embodiment

[0283] In the third embodiment described above, a facial skin condition recognition method is provided. Correspondingly, the sixth embodiment of this application provides a facial skin condition recognition device. Since the device embodiment is basically similar to the third method embodiment, it is described simply; relevant details can be found in the description of the method embodiment. The device embodiments described below are merely illustrative.

[0284] Please refer to Figure 7 This is a schematic diagram of a facial skin condition recognition device provided in the sixth embodiment of this application.

[0285] This facial skin condition recognition device, used on a server-side application, includes:

[0286] The second request message obtaining unit 701 is used to obtain a second request message sent by the terminal application for requesting to obtain a facial skin state recognition model;

[0287] The facial skin condition recognition model sending unit 702 is used to send the facial skin condition recognition model to the terminal application in response to the second request message;

[0288] The facial skin state data acquisition unit 703 is used to acquire the user's facial skin state data sent by the terminal application. The user's facial skin state data is obtained by using the facial skin state recognition model to perform facial skin state recognition on facial images that meet the facial skin state recognition conditions.

[0289] The facial skin condition data storage unit 704 is used to store the user's facial skin condition data.

[0290] Seventh Embodiment

[0291] Corresponding to the method embodiments provided in this application, the seventh embodiment of this application also provides an electronic device. Since the seventh embodiment is substantially similar to the method embodiments provided in this application, it is described simply; relevant details can be found in the descriptions of the method embodiments provided in this application. The seventh embodiment described below is merely illustrative.

[0292] Figure 8 This is a schematic diagram of an electronic device provided in an embodiment of this application.

[0293] The electronic device includes: a processor 801;

[0294] And a memory 802 for storing a computer program, which, when the device is powered on and runs the computer program through the processor, executes any one of the methods described.

[0295] It should be noted that the detailed description of the electronic device provided in the seventh embodiment of this application can be found in the relevant description of the above-described method embodiments provided in this application, and will not be repeated here.

[0296] Eighth embodiment

[0297] Corresponding to the method embodiments provided in this application, the eighth embodiment of this application also provides a storage device. Since the eighth embodiment is substantially similar to the method embodiments provided in this application, it is described simply; relevant details can be found in the descriptions of the method embodiments provided in this application. The eighth embodiment described below is merely illustrative.

[0298] The storage device stores a computer program that is executed by a processor to perform the methods provided in the above embodiments of this application.

[0299] It should be noted that the detailed description of the storage device provided in the eighth embodiment of this application can be found in the relevant description of the above-described method embodiments provided in this application, and will not be repeated here.

[0300] Although this application discloses preferred embodiments as described above, it is not intended to limit this application. Any person skilled in the art can make possible changes and modifications without departing from the spirit and scope of this application. Therefore, the scope of protection of this application should be determined by the scope defined in the claims of this application.

[0301] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0302] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0303] 1. Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include non-transitory computer-readable media, such as modulated data signals and carrier waves.

[0304] 2. Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

Claims

1. A method for recognizing facial skin condition, characterized in that, Applied to terminal applications, the method includes: In response to a trigger operation that detects the activation of facial skin condition recognition, the camera component for facial recognition corresponding to the terminal application is loaded, including: sending a first request message to the server to request the acquisition of the facial recognition model corresponding to the terminal application; acquiring the facial recognition model corresponding to the terminal application returned by the server; acquiring facial recognition parameters; and acquiring the camera component based on the facial recognition model and the facial recognition parameters. The camera view used to capture facial images is rendered on the application page of the terminal application; The camera captures the user's first facial image. Using the camera component, it is determined whether the first facial image meets the recognition conditions for facial skin condition. If it does not meet the conditions, an operation prompt message is output to prompt the user to perform a specified operation. The second facial image after the user performs the specified operation is captured through the camera screen. Using the camera component, it is determined whether the second facial image meets the recognition conditions for facial skin condition. If so, the user's facial skin condition is recognized using the second facial image.

2. The facial skin condition recognition method according to claim 1, characterized in that, The facial recognition parameters are pre-configured; Configure the facial recognition parameters as follows: The identification conditions for obtaining the facial skin condition; Obtain the operation prompt information; The facial recognition parameters are generated based on the facial skin condition recognition conditions and the operation prompts.

3. The facial skin condition recognition method according to claim 2, characterized in that, The criteria for identifying the facial skin condition are generated in the following manner: Obtain information about facial image capture issues; Obtain the parameter thresholds for the facial image capture problem to be valid; Based on the facial image capture problem information and the parameter thresholds for the facial image capture problem to be valid, the recognition conditions for the facial skin state are generated.

4. The facial skin condition recognition method according to claim 1, characterized in that, The step of obtaining the camera component based on the facial recognition model and the facial recognition parameters includes: inputting the facial recognition parameters into the facial recognition model to obtain a facial recognition model with the facial recognition parameters, which serves as the camera component.

5. The facial skin condition recognition method according to claim 1, characterized in that, The facial recognition model includes rendering parameters for rendering the camera image; The step of rendering the camera image used to capture facial images on the application page of the terminal application includes: The rendering parameters are obtained from the facial recognition model; The camera image is rendered based on the rendering parameters.

6. The facial skin condition recognition method according to claim 1, characterized in that, The method further includes: detecting operations on the terminal application by the operation monitoring component of the terminal application; The method of loading the camera component for facial recognition corresponding to the terminal application in response to detecting a trigger operation that enables facial skin condition recognition further includes: In response to detecting a trigger operation that enables facial skin state recognition, the operation monitoring component passes camera component loading parameters, which represent loading the camera component, to the same-layer rendering component of the terminal application. The same-layer rendering component will send the facial recognition model request parameters and the identifier parameters of the terminal application to the interaction component of the terminal application. The interactive component generates the first request message based on the facial recognition model request parameters and the identifier parameters of the terminal application. Sending a first request message to the server to request the facial recognition model corresponding to the terminal application includes: the interaction component sending the first request message to the server.

7. The facial skin condition recognition method according to claim 6, characterized in that, The step of obtaining the facial recognition model corresponding to the terminal application returned by the server includes: obtaining the facial recognition model corresponding to the terminal application returned by the server by the interaction component; The loading of the camera component corresponding to the terminal application for facial recognition also includes: the interaction component sending the facial recognition model to the rendering component at the same layer; The process of obtaining facial recognition parameters includes: obtaining facial recognition parameters from the same-layer rendering component; The step of obtaining the camera component based on the facial recognition model and the facial recognition parameters includes: the same-layer rendering component obtaining the camera component based on the facial recognition model and the facial recognition parameters; The rendering of the camera image for capturing facial images on the application page of the terminal application includes: the same-layer rendering component rendering the camera image for capturing facial images on the application page of the terminal application.

8. The facial skin condition recognition method according to claim 6, characterized in that, The same-layer rendering component sends a facial recognition model request parameter and an identifier parameter of the terminal application to the interaction component of the terminal application, which are used to request the facial recognition model corresponding to the terminal application. This includes: the same-layer rendering component sends a facial recognition model acquisition parameter, an identifier parameter of the terminal application, and a rendering request parameter for requesting the rendering parameters for the camera image to the interaction component of the terminal application. The interactive component generates the first request message based on the facial recognition model request parameters, the terminal application's identifier parameters, and the rendering request parameters; The method further includes: the interactive component obtaining the rendering parameters provided by the server, and the interactive component passing the rendering parameters to the rendering component at the same layer; The step of rendering the camera image used to capture facial images on the application page of the terminal application includes: The same-layer rendering component renders the camera image according to the rendering parameters.

9. The facial skin condition recognition method according to claim 1, characterized in that, The step of using the camera component to determine whether the first facial image meets the recognition criteria for facial skin condition includes: Using the camera component, determine whether the facial integrity in the first facial image reaches a preset facial integrity threshold; Alternatively, the camera component can be used to determine whether the number of faces in the first facial image exceeds a preset threshold for the number of faces. Alternatively, the camera component can be used to determine whether the facial angle in the first facial image is within a preset facial angle range. Alternatively, the camera component can be used to determine whether the facial size data in the first facial image is within a preset facial size threshold range. Alternatively, the camera component can be used to determine whether the background environment data in the first facial image is within a preset background environment data threshold range.

10. The facial skin condition recognition method according to claim 9, characterized in that, If the condition is not met, an operation prompt message will be output to prompt the user to perform the specified operation, including: If the facial integrity in the first facial image does not reach the preset facial region integrity threshold, an operation prompt message is output to prompt the user to align the face with the image capture frame. Alternatively, if the number of faces in the first facial image exceeds a preset face number threshold, an operation prompt message is output to prompt the user to align the face corresponding to the face number threshold with the image capture frame. Alternatively, if the facial angle in the first facial image is not within the preset facial angle range, an operation prompt message is output to prompt the user to adjust the facial angle. Alternatively, if the facial size data in the first facial image is not within a preset facial size threshold range, an operation prompt message is output to prompt the user to adjust the distance between the face and the terminal application. Alternatively, if the background environment data in the first facial image is not within the preset background environment data threshold range, an operation prompt message is output to prompt the user to adjust the background environment.

11. The facial skin condition recognition method according to claim 1, characterized in that, The step of identifying the user's facial skin condition using the second facial image includes: Send the second facial image to the server; Obtain the facial skin state data of the user based on the second facial image recognition returned by the server.

12. The facial skin condition recognition method according to claim 11, characterized in that, Sending the second facial image to the server includes: in response to detecting the user's confirmation operation on the second facial image, sending the second facial image to the server.

13. The facial skin condition recognition method according to claim 1, characterized in that, The step of recognizing the user's facial skin condition using the second facial image includes: using a facial skin condition recognition model to perform facial skin condition recognition on the second facial image, obtaining the user's facial skin condition data, and displaying the user's facial skin condition data.

14. The facial skin condition recognition method according to claim 13, characterized in that, Also includes: Send a second request message to the server to request the facial skin state recognition model; Obtain the facial skin state recognition model returned by the server.

15. The facial skin condition recognition method according to claim 13, characterized in that, Also includes: Capture a third facial image of the user using the camera feed; Determine whether the third facial image meets the facial skin condition recognition criteria. If so, use the facial skin condition recognition model to perform facial skin condition recognition on the third facial image to obtain updated facial skin condition data of the user, and display the updated facial skin condition data of the user.

16. The facial skin condition recognition method according to claim 1, characterized in that, Also includes: If the facial skin condition data obtained by recognizing the user's facial skin condition using the second facial image does not match the normal skin data, a query message is displayed asking whether to re-identify the indicator items in the facial skin condition data that do not match the normal skin data. In response to the detection of a confirmation operation for the query information, a third request message is sent to the server to request updated facial recognition parameters. The third request message includes an identifier of an indicator item in the facial skin state data that does not match the normal skin data. Obtain the updated facial recognition parameters returned by the server in response to the third request message. The updated facial recognition parameters are generated by the server for indicator items in the facial skin state data that do not match the normal skin data. The step of obtaining the camera component based on the facial recognition model and the facial recognition parameters includes: obtaining the updated camera component based on the facial recognition model and the updated facial recognition parameters.

17. The facial skin condition recognition method according to claim 16, characterized in that, Also includes: The camera captures a fourth facial image of the user. Using the updated camera component, it is determined whether the fourth facial image meets the recognition conditions for identifying indicators in the facial skin state data that do not match the normal skin data. If so, the fourth facial image is used to identify the indicators in the facial skin state data that do not match the normal skin data.

18. The facial skin condition recognition method according to claim 16, characterized in that, Also includes: The same-layer rendering component of the terminal application determines whether the facial skin state data matches the normal skin data; If the same-layer rendering component determines that the facial skin state data does not match the normal skin data, it passes an inquiry parameter to the display component of the terminal application to ask whether to re-identify the indicator items in the facial skin state data that do not match the normal skin data. The display component generates the query information based on the query parameters; The display of the query information used to inquire whether to re-identify the indicator items in the facial skin condition data that do not match the normal skin data includes: the display component displaying the query information.

19. The facial skin condition recognition method according to claim 18, characterized in that, Also includes: The display component calls the operation monitoring component of the terminal application to detect the operation in response to the query information; In response to detecting a confirmation operation for the query information, a third request message is sent to the server to request updated facial recognition parameters, including: In response to detecting a confirmation operation for the query information, the operation monitoring component passes confirmation operation parameters to the same-layer rendering component to indicate that the confirmation operation has been detected. The same-layer rendering component transmits to the interaction component of the terminal application the identifier parameter of the facial skin state data that does not match the normal skin data and the facial recognition update parameter for requesting the updated facial recognition parameters. The interactive component generates the third request message based on the indicator item identification parameter and the facial recognition update parameter; Sending a third request message to the server to request updated facial recognition parameters includes: the interaction component sending the third request message to the server.

20. The facial skin condition recognition method according to claim 19, characterized in that, The step of obtaining the updated facial recognition parameters returned by the server in response to the third request message includes: obtaining the updated facial recognition parameters returned by the server in response to the third request message by the interaction component; The method further includes: the interactive component passing the updated facial recognition parameters to the same-layer rendering component; The step of obtaining the updated camera component based on the facial recognition model and the updated facial recognition parameters includes: the same-layer rendering component obtaining the updated camera component based on the facial recognition model and the updated facial recognition parameters.

21. The facial skin condition recognition method according to claim 1, characterized in that, The application page is an HTML5 page; Loading the camera component for facial recognition corresponding to the terminal application includes loading the camera component on an HTML5 page.

22. The method according to claim 21, characterized in that, Loading the camera component on the HTML5 page includes: calling the camera component through the camera component call interface set for the HTML5 specification.

23. A method for recognizing facial skin condition, characterized in that, Applied to the server side, the method includes: Obtain a first request message sent by the terminal application to request the facial recognition model corresponding to the terminal application; In response to the first request message, the facial recognition model corresponding to the terminal application is sent to the terminal application; A facial image that meets the facial skin condition recognition criteria sent by the terminal application is obtained. The camera component, generated based on the facial recognition model, determines whether the facial image meets the facial skin condition recognition criteria. The camera component is generated as follows: the interaction component sends the facial recognition model to the same-layer rendering component; the same-layer rendering component obtains facial recognition parameters; and the same-layer rendering component generates the camera component based on the facial recognition model and the facial recognition parameters. Facial skin condition recognition is performed on the facial image to obtain facial skin condition data; The facial skin condition data is sent to the terminal application.

24. The facial skin condition recognition method according to claim 23, characterized in that, The first request message sent by the terminal application to request the facial recognition model corresponding to the terminal application includes: A first request message sent by the interaction component of the terminal application to request the facial recognition model corresponding to the terminal application is obtained, wherein the first request message is generated in the following manner: Operations to the terminal application are detected by the operation monitoring component of the terminal application; In response to detecting a trigger operation that enables facial skin state recognition, the operation monitoring component passes camera component loading parameters, which represent loading the camera component, to the same-layer rendering component of the terminal application. The same-layer rendering component will send the facial recognition model request parameters and the identifier parameters of the terminal application to the interaction component of the terminal application. The interactive component generates the first request message based on the facial recognition model request parameters and the identifier parameters of the terminal application.

25. The facial skin condition recognition method according to claim 24, characterized in that, Sending the facial recognition model corresponding to the terminal application to the terminal application in response to the first request message includes: sending the facial recognition model corresponding to the terminal application to the interaction component of the terminal application in response to the first request message.

26. The facial skin condition recognition method according to claim 24, characterized in that, The same-layer rendering component sends a facial recognition model request parameter and an identifier parameter of the terminal application to the interaction component of the terminal application, which are used to request the facial recognition model corresponding to the terminal application. This includes: the same-layer rendering component sends a facial recognition model acquisition parameter, an identifier parameter of the terminal application, and a rendering request parameter for requesting the rendering parameters of the camera image to the interaction component of the terminal application. The interactive component generates the first request message based on the facial recognition model request parameters, the terminal application's identifier parameters, and the rendering request parameters; The method further includes: providing the rendering parameters to the interactive component, and the interactive component passing the rendering parameters to the rendering component at the same layer; The same-layer rendering component renders the camera image according to the rendering parameters.

27. The facial skin condition recognition method according to claim 23, characterized in that, Also includes: Obtain the identification information of the terminal application from the first request message; Based on the pre-established correspondence between terminal application identification information and facial recognition models, the facial recognition model corresponding to the terminal application is obtained.

28. The facial skin condition recognition method according to claim 23, characterized in that, Also includes: Obtain a facial skin condition recognition model; The step of performing facial skin condition recognition on the facial image to obtain facial skin condition data includes: using the facial skin condition recognition model to perform facial skin condition recognition on the facial image to obtain facial skin condition data.

29. The facial skin condition recognition method according to claim 23, characterized in that, Also includes: If the facial skin condition data obtained by recognizing the user's facial skin condition using the facial image does not match the normal skin condition data, then an inquiry message is obtained to ask whether to re-identify the indicator items in the facial skin condition data that do not match the normal skin condition data. The query message used to ask whether to re-identify the indicator items in the facial skin condition data that do not match the normal skin data is sent to the terminal application; The terminal application sends a third request message to request updated facial recognition parameters, the third request message including an identifier of an indicator item in the facial skin state data that does not match the normal skin data; In response to the third request message, the updated facial recognition parameters are sent to the terminal application. The updated facial recognition parameters are generated for the indicator items in the facial skin state data that do not match the normal skin data. Based on the facial recognition model and the updated facial recognition parameters, an updated camera component is generated.

30. The facial skin condition recognition method according to claim 29, characterized in that, Also includes: Obtain the user's fourth facial image sent by the terminal application; Using the updated camera component, it is determined whether the fourth facial image meets the recognition conditions for identifying indicators in the facial skin state data that do not match the normal skin data. If so, the fourth facial image is used to identify the indicators in the facial skin state data that do not match the normal skin data.

31. The facial skin condition recognition method according to claim 29, characterized in that, Also includes: The same-layer rendering component of the terminal application determines whether the facial skin state data matches the normal skin data; If the same-layer rendering component determines that the facial skin state data does not match the normal skin data, it passes an inquiry parameter to the display component of the terminal application to ask whether to re-identify the indicator items in the facial skin state data that do not match the normal skin data. The display component generates the query information based on the query parameters; The display of the query information used to inquire whether to re-identify the indicator items in the facial skin condition data that do not match the normal skin data includes: the display component displaying the query information.

32. The facial skin condition recognition method according to claim 31, characterized in that, Also includes: The display component calls the operation monitoring component of the terminal application to detect the operation in response to the query information; The third request message sent by the terminal application to request updated facial recognition parameters includes: In response to detecting a confirmation operation for the query information, the operation monitoring component passes confirmation operation parameters to the same-layer rendering component to indicate that the confirmation operation has been detected. The same-layer rendering component transmits to the interaction component of the terminal application the identifier parameter of the facial skin state data that does not match the normal skin data and the facial recognition update parameter for requesting the updated facial recognition parameters. The interactive component generates the third request message based on the indicator item identification parameter and the facial recognition update parameter; In response to detecting a confirmation operation for the query information, the operation monitoring component passes confirmation operation parameters to the same-layer rendering component to indicate that the confirmation operation has been detected. The same-layer rendering component transmits to the interaction component of the terminal application the identifier parameter of the facial skin state data that does not match the normal skin data and the facial recognition update parameter for requesting the updated facial recognition parameters. The interactive component generates the third request message based on the indicator item identification parameter and the facial recognition update parameter; The process of obtaining the third request message sent by the terminal application to request updated facial recognition parameters includes: obtaining the third request message sent by the interaction component.

33. The facial skin condition recognition method according to claim 32, characterized in that, Also includes: Sending the updated facial recognition parameters to the terminal application in response to the third request message includes: sending the updated facial recognition parameters to the interaction component in response to the third request message; The method further includes: the interactive component passing the updated facial recognition parameters to the same-layer rendering component; The step of generating an updated camera component based on the facial recognition model and the updated facial recognition parameters includes: the same-layer rendering component generating the updated camera component based on the facial recognition model and the updated facial recognition parameters.

34. A method for recognizing facial skin condition, characterized in that, Applied to the server side, the method includes: Obtain the second request message sent by the terminal application to request the facial skin condition recognition model; In response to the second request message, the facial skin condition recognition model is sent to the terminal application; The user's facial skin condition data sent by the terminal application is obtained by using the facial skin condition recognition model to perform facial skin condition recognition on facial images that meet the facial skin condition recognition conditions. Store the user's facial skin condition data; The user information of the user is obtained from the second request message; the user profile information is obtained based on the user information; the baseline facial skin condition recognition model is adjusted based on the user profile information to obtain an adjusted facial skin condition recognition model, which is used to identify the user's facial skin condition in combination with the user's profile information. Sending the facial skin condition recognition model to the terminal application includes: sending the adjusted facial skin condition recognition model to the terminal application.

35. A facial skin condition recognition device, characterized in that, For use in terminal applications, the device includes: A loading unit, configured to load a camera component for facial recognition corresponding to the terminal application in response to a trigger operation that detects the activation of facial skin condition recognition, includes: sending a first request message to a server to request the acquisition of a facial recognition model corresponding to the terminal application; acquiring the facial recognition model corresponding to the terminal application returned by the server; acquiring facial recognition parameters; and acquiring the camera component based on the facial recognition model and the facial recognition parameters. A rendering unit is used to render a camera image for capturing facial images on the application page of the terminal application. A capture unit is used to capture a first facial image of the user through the camera view; The judgment unit is used to use the camera component to determine whether the first facial image meets the recognition conditions of facial skin condition. If it does not meet the conditions, it outputs operation prompt information to prompt the user to perform a specified operation. The camera image is used to capture the second facial image after the user performs the specified operation. The recognition unit is used to determine whether the second facial image meets the recognition conditions for facial skin condition using the camera component. If it does, the second facial image is used to recognize the user's facial skin condition.

36. A facial skin condition recognition device, characterized in that, Applied to the server side, the device includes: The first request message obtaining unit is used to obtain a first request message sent by the terminal application for requesting to obtain the facial recognition model corresponding to the terminal application; A facial recognition model sending unit is used to send the facial recognition model corresponding to the terminal application to the terminal application in response to the first request message; A facial image determination unit is used to obtain a facial image sent by the terminal application that meets the recognition conditions for facial skin condition. The facial image is determined by a camera component generated based on the facial recognition model to determine whether it meets the facial skin condition recognition conditions. The camera component is generated as follows: the interaction component sends the facial recognition model to a rendering component at the same layer; the rendering component at the same layer obtains facial recognition parameters; and the rendering component at the same layer generates the camera component based on the facial recognition model and the facial recognition parameters. A facial skin condition data acquisition unit is used to perform facial skin condition recognition on the facial image and obtain facial skin condition data. A facial skin condition data sending unit is used to send the facial skin condition data to the terminal application.

37. A facial skin condition recognition device, characterized in that, Applied to the server side, the device includes: The second request message obtaining unit is used to obtain a second request message sent by the terminal application for requesting to obtain a facial skin state recognition model; A facial skin condition recognition model sending unit is used to send the facial skin condition recognition model to the terminal application in response to the second request message; The facial skin condition data acquisition unit is used to acquire the facial skin condition data of the user sent by the terminal application. The facial skin condition data of the user is obtained by using the facial skin condition recognition model to perform facial skin condition recognition on facial images that meet the facial skin condition recognition conditions. A facial skin condition data storage unit is used to store the user's facial skin condition data; The user information of the user is obtained from the second request message; the user profile information is obtained based on the user information; the baseline facial skin condition recognition model is adjusted based on the user profile information to obtain an adjusted facial skin condition recognition model, which is used to identify the user's facial skin condition in combination with the user's profile information. Sending the facial skin condition recognition model to the terminal application includes: sending the adjusted facial skin condition recognition model to the terminal application.

38. An electronic device, characterized in that, include: processor; as well as A memory for storing a computer program, which, when powered on and run by the processor, executes the method according to any one of claims 1-34.

39. A storage device, characterized in that, The storage device stores a computer program that is executed by a processor to perform the method according to any one of claims 1-34.

Citation Information

Patent Citations

  • Security authentication method and device based on face recognition, and server

    CN109951437A

  • Human face skin type detection method and device, storage medium and computer equipment

    CN113191322A

  • Method for analyzing skin surface and apparatus therefor

    KR1020160007754A