An intelligent control method, device, equipment, medium, product and system for a treatment mask
By performing feature point detection and defect analysis on user facial images, a facial mesh is constructed, and a personalized LED light control strategy is generated. This solves the problem that existing treatment masks cannot control the treatment according to the skin condition of different areas, thus improving treatment effectiveness and efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- 约安·阿别兰斯基
- Filing Date
- 2026-03-31
- Publication Date
- 2026-06-09
AI Technical Summary
Existing treatment masks cannot provide personalized control based on the skin condition of different areas of the user's face, resulting in poor treatment outcomes.
By acquiring user facial images, performing feature point detection and defect analysis, constructing a facial mesh, determining the defect detection results corresponding to each LED light, and generating personalized control strategies, adaptive treatment can be achieved for different skin conditions.
It enables personalized treatment control for different areas of the user's face, improving treatment effectiveness and efficiency.
Smart Images

Figure CN122164012A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of LED facial treatment or beauty technology, and in particular to an intelligent control method, device, equipment, medium, product and system for a treatment mask. Background Technology
[0002] Most existing treatment masks typically use a single color (such as red or blue) to illuminate the entire face. Existing treatment mask control methods usually allow users to choose between a few basic modes (anti-acne, anti-aging, etc.), and the individual LEDs on the treatment mask illuminate the entire face evenly with the same control parameters, regardless of where the blemishes are located or their severity. Summary of the Invention
[0003] The purpose of this application is to provide an intelligent control method, device, equipment, medium, product and system for a therapeutic mask, so as to achieve automatic control of adaptive treatment for different skin conditions in different areas of the user's face.
[0004] To achieve the above objectives, this application provides the following solution.
[0005] In a first aspect, this application provides an intelligent control method for a therapeutic mask, wherein the therapeutic mask has multiple LED lights distributed on it, and the intelligent control method includes: Obtain the user's facial image; Feature point detection is performed on the facial image to construct a facial mesh; Defect analysis is performed on the facial image to obtain multiple defect layers; each defect layer corresponds to a facial defect. Cross-calculation is performed on each defect layer and the facial mesh to determine the mesh cells affected by each type of defect, and multiple facial defect mesh images are obtained. Based on the mapping file representing the correspondence between each grid cell in the facial mesh and each LED light, multiple facial defect mesh images are mapped to each LED light to determine the defect detection result corresponding to each LED light; the defect detection result includes no defect, one defect, and multiple defects; it should be emphasized that the defect detection result also includes the type of one or more defects present; Based on the defect detection results for each LED, a control strategy is generated for each LED.
[0006] Secondly, this application provides an intelligent control device for a therapeutic mask, wherein the intelligent control device for the therapeutic mask applies the aforementioned intelligent control method for a therapeutic mask, and the intelligent control device for the therapeutic mask includes: The facial image acquisition module is used to acquire the user's facial image; A facial mesh construction module is used to detect feature points in the facial image and construct a facial mesh. The defect analysis module is used to perform defect analysis on the facial image to obtain multiple defect layers; each defect layer corresponds to a facial defect. The cross-calculation module is used to perform cross-calculation on each defect layer and the facial mesh respectively, determine the mesh cells affected by each defect, and obtain multiple facial defect mesh images; The mapping module is used to map multiple facial defect mesh images to each LED light according to a mapping file that characterizes the correspondence between each mesh unit in the facial mesh and each LED light, and to determine the defect detection result corresponding to each LED light; the defect detection result includes no defect, one defect, and multiple defects. The control strategy generation module is used to generate a control strategy for each LED based on the defect detection results corresponding to each LED.
[0007] Thirdly, this application provides a computer device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the above-described intelligent control method for the therapeutic mask.
[0008] Fourthly, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-described intelligent control method for the therapeutic mask.
[0009] Fifthly, this application provides a computer program product, including a computer program that, when executed by a processor, implements the above-described intelligent control method for the therapeutic mask.
[0010] Sixthly, this application provides an intelligent control system for a therapeutic mask, the intelligent control system comprising: a mobile application terminal and a web server terminal; The mobile application is connected to the controller of the treatment mask, and the mobile application is also connected to the web server; The mobile application is used to capture images of the user's face. The web server is used to generate a control strategy for each LED light on the treatment mask using the above-mentioned intelligent control method, and then sends the control strategy to the mobile application. The mobile application is also used to send the control strategy to the controller of the treatment mask, and to control each LED light on the treatment mask separately.
[0011] According to the specific embodiments provided in this application, this application has the following technical effects.
[0012] This application provides an intelligent control method, device, equipment, medium, product, and system for a therapeutic face mask. The application performs feature point detection on a user's facial image to construct a facial mesh, and analyzes the facial image for defects to obtain multiple defect layers. Then, it performs cross-calculation on each defect layer and the facial mesh to determine the mesh units affected by each type of defect, obtaining multiple facial defect mesh images. According to a mapping file, the multiple facial defect mesh images are mapped to various LED lights, determining the defect detection result for each LED light. Based on the defect detection result for each LED light, a control strategy for each LED light is generated. This application, by analyzing the user's facial image to generate defect layers for each type of defect, and generating control strategies for each LED light based on these defect layers, enables automatic control of adaptive treatment for different skin conditions in different areas of the user's face. Attached Figure Description
[0013] Figure 1 This is an application environment diagram of an intelligent control method for a therapeutic mask provided in one embodiment of this application.
[0014] Figure 2 This is a flowchart illustrating an intelligent control method for a therapeutic mask provided in one embodiment of this application.
[0015] Figure 3 A schematic diagram of 478 MediaPipe facial feature points and triangular mesh provided in an embodiment of this application.
[0016] Figure 4 This is a schematic diagram illustrating the process of modifying the initial index set for each grid cell according to an embodiment of this application.
[0017] Figure 5 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation
[0018] The present application will now be described in further detail with reference to the accompanying drawings and specific embodiments.
[0019] The intelligent control method for the treatment mask provided in this application embodiment can be applied to, for example... Figure 1In the application environment shown, the terminal communicates with the server via a network. A data storage system stores the data the server needs to process. This data storage system can be set up independently, integrated into the server, or located in the cloud or on another server. The terminal can send the user's facial image to the server. Upon receiving the user's facial image, the server performs defect analysis to obtain multiple defect layers. It then performs cross-calculation on each defect layer and the facial mesh to determine the mesh units affected by each defect, obtaining multiple facial defect mesh images. Based on a mapping file representing the correspondence between each mesh unit in the facial mesh and each LED light, the server maps the multiple facial defect mesh images to each LED light, determining the defect detection result for each LED light. Based on the defect detection result for each LED light, a control strategy for each LED light is generated. The server can then feed back the obtained control strategy to the terminal. Furthermore, in some embodiments, the intelligent control method for the treatment mask can also be implemented independently by the server or the terminal. For example, the terminal can directly process and analyze the user's facial image to generate a control strategy for each LED light, or the server can obtain the user's facial image from the data storage system and process and analyze it to generate a control strategy for each LED light.
[0020] The terminals can be, but are not limited to, various desktop computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, and smart in-vehicle systems. Portable wearable devices can include smartwatches, smart bracelets, and head-mounted devices. Servers can be implemented using independent servers, server clusters composed of multiple servers, or cloud servers.
[0021] In one exemplary embodiment, such as Figure 2 As shown, a smart control method for a therapeutic face mask is provided. This method is executed by a computer device, specifically by a terminal or server alone, or by both a terminal and a server. In this embodiment, the method is applied to... Figure 2 The following steps, 101-106, will be used as an example to illustrate the process of using a server in the example.
[0022] Step 101: Obtain the user's facial image.
[0023] Step 102: Perform feature point detection on the facial image to construct a facial mesh.
[0024] Step 103: Perform defect analysis on the facial image to obtain multiple defect layers; each defect layer corresponds to a facial defect.
[0025] Step 104: Perform cross-calculation on each defect layer and the facial mesh to determine the mesh cells affected by each defect and obtain multiple facial defect mesh images.
[0026] Step 105: Based on the mapping file that represents the correspondence between each grid cell in the facial mesh and each LED light, map multiple facial defect mesh images to each LED light, and determine the defect detection result corresponding to each LED light; the defect detection result includes no defect, one defect, and multiple defects.
[0027] Step 106: Generate a control strategy for each LED based on the defect detection results for each LED.
[0028] Implementing steps 101-106 above enables automatic control of adaptive treatment for different skin conditions in different areas of the user's face.
[0029] In another exemplary embodiment, step 102 described above can be replaced by steps 201-203.
[0030] Step 201: Use the MediaPipe detection method to detect feature points in the facial image to obtain multiple MediaPipe facial feature points; Step 202: Expand based on multiple MediaPipe facial feature points to generate multiple forehead feature points.
[0031] However, under normal circumstances, the feature points obtained in step 201 only sparsely cover part of the forehead area, which cannot meet the precise control requirements of the LED beauty mask to fully cover the forehead area. Therefore, it is necessary to expand on the feature points obtained in step 201 to generate multiple forehead feature points.
[0032] Step 203: Construct a facial mesh based on multiple MediaPipe facial feature points and multiple forehead feature points.
[0033] The facial mesh contains multiple mesh units, any of which can be: a mesh unit composed of MediaPipe facial feature points, or an extended mesh unit involving additional points on the forehead. The shape of each mesh unit can be a triangle (i.e., each mesh unit is formed by connecting three feature points), a rectangle (i.e., each mesh unit is formed by connecting four feature points), a custom shape (e.g., an irregular polygon), etc., which will not be elaborated here.
[0034] In another exemplary embodiment, step 202 described above can be implemented using interpolation.
[0035] In another exemplary embodiment, the specific implementation process of step 202 above includes: Let the initial value of the expansion number t be 0; Perform the expansion operation: Based on the preset offset, generate a new feature point based on the reference point of each t-th expansion to obtain the forehead feature point of the t-th expansion; where, when t=0, the reference point of the t-th expansion includes the MediaPipe facial feature point along the hairline; when t≠0, the reference point of the t-th expansion includes each forehead feature point obtained from the (t-1)-th expansion. Increment the value of t by 1, then return to perform the expansion operation until the generated forehead feature points cover the entire forehead area.
[0036] In another exemplary embodiment, a specific example is provided, using MediaPipe facial landmark detection providing 478 marker points (i.e., MediaPipe facial landmarks, indices 0-477) as an example, such as... Figure 3 As shown ( Figure 3 The 478 MediaPipe facial feature points and triangular meshes were displayed. Among the MediaPipe facial feature points, points 0-467 (468 points) are the standard face mesh, covering: facial contour (approximately 36 points), eyebrows (approximately 10 points per eyebrow), eyes (approximately 16 points per eye), nose (over 30 points), mouth / lips (approximately 20 points), forehead / cheek / chin (the rest of the mesh); points 468-477 (10 points) are iris detail points, added by the extended model. The left iris includes points 468-472 (468 is the center point, 469-472 are contour points), and the right iris includes points 473-477 (473 is the center point, 474-477 are contour points).
[0037] The extension technique of this application adds a new point after index 477 by calculating the relative position of the new point with the existing feature points.
[0038] In this embodiment, the addLandMark() function is used to expand and obtain new feature points (i.e., the aforementioned multiple forehead feature points). The parameters include: an array of feature points to be modified, an array of connectors for triangular mesh connections, a reference feature point index (from a reference point among the 478 points in the MediaPipe), x-offset, and y-offset values (normalized coordinates, typically between -0.04 and +0.04). The specific process is as follows: The forehead area is extended using MediaPipe facial feature points along the hairline as reference points. For example, MediaPipe facial feature points 103, 67, and 109 on the left side of the forehead, MediaPipe facial feature point 10 at the center of the top of the forehead, and MediaPipe facial feature points 338, 297, and 332 on the right side of the forehead. Figure 3 As shown.
[0039] The index of the forehead feature points in the first expansion operation is 478-484. The next expansion operation uses forehead feature points 478-484 as reference points for expansion, and so on, until the generated forehead feature points cover the entire forehead area.
[0040] After obtaining the forehead feature points, connectors are defined to form a triangular mesh. It's important to note that the connector definition process is directly related to the "connector array for triangular mesh connections" parameter of the `addLandMark()` function. The specific definition method is as follows: "Defining connectors" creates "connection rules" (i.e., connectors) to connect adjacent feature points and form a triangular mesh based on the positional relationship between the newly expanded forehead feature points (referred to as new feature points) and other feature points. Specifically, the positional relationship between the new feature point and adjacent feature points (including existing MediaPipe facial feature points and expanded forehead feature points) is first determined. Target adjacent feature points that are spatially close to the new feature point and can form triangular mesh units are selected. Then, the indices of the target feature points and the new feature points are paired to form specific connectors (i.e., edges of the triangular mesh). Finally, all defined connectors are sequentially stored in the "connector array for triangular mesh connections" passed to the `addLandMark()` function, providing data support for the subsequent construction of the complete triangular mesh.
[0041] In practice, you can define the corresponding connector after each expansion operation yields a batch of new feature points. Alternatively, you can define the corresponding connector for all the new feature points after all the expansion operations have been performed.
[0042] In another exemplary embodiment, MediaPipe coordinates are normalized coordinates, which is equivalent to "compressing" the size of the entire image to an absolute value between 0 and 1. For example, the normalized coordinate system to which the above-mentioned normalized coordinates belong uses the tip of the nose in the face image as the origin (0), the upward direction of the line connecting the tip of the nose to the midpoint between the two eyes as the positive Y-axis, and the direction perpendicular to the line to the right as the positive X-axis. The relative positions of feature points are mapped to a unified numerical range based on the entire face area to achieve normalization. For example, if the pixel position of a feature point is A, and the pixel position of the tip of the nose is the origin, the pixel distance L1 in the X-axis direction and the pixel distance L2 in the Y-axis direction between the feature point and the tip of the nose are divided by the farthest distance Lx and the farthest distance Ly from all feature points in the face image to the tip of the nose on the X-axis, respectively. The resulting ratio (L1 / Lx, L2 / Ly) is the normalized coordinate of the feature point. The normalized coordinate value only represents the relative position ratio and is independent of the actual pixel size of the image.
[0043] Correspondingly, the preset offset during the expansion process is also the offset of normalized coordinates. The offset value is determined through empirical testing and / or visual calibration. The offset is a small value, usually between -0.04 and +0.04. The Y offset amplitude depends on the required vertical distance. In the forehead expansion process of this application embodiment, the Y offset amplitude is used to be between -0.025 and -0.04. The X offset is used to compensate for facial curvature. Negative values are used on the left side and positive values are used on the right side. That is, negative Y indicates upward movement, positive Y indicates downward movement, negative X indicates leftward movement, and positive X indicates rightward movement.
[0044] In this embodiment, the preset offset is determined by iterative testing on different face shapes, as follows: Start with a small offset value, perform visual tests on multiple face images, and adjust until the new point naturally aligns with the facial contours.
[0045] In one example, the offset values used are -0.025, -0.032, and -0.04, where -0.04 is the Y-axis offset of MediaPipe facial feature point 10 at the center of the forehead, -0.032 is the Y-axis offset of MediaPipe facial feature points 109 and 338 located in the middle, and -0.025 is the Y-axis offset of MediaPipe facial feature points 103, 67, 297, and 332 located on the sides. A parabolic curve can be drawn based on the new point formed below the hairline by -0.025, -0.032, and -0.04.
[0046] In another exemplary embodiment, the above-described expansion process employs a layered approach. In this embodiment, when the forehead feature points of each layer are created, connectors can be used to connect the original points with the new points to form a continuous grid. The original point is either the previously created forehead feature point or a MediaPipe facial feature point selected along the hairline (the original point can also be understood as a set of adjacent feature points of the new point, including the original MediaPipe facial feature points and the expanded forehead feature points).
[0047] In another exemplary embodiment, the above-mentioned mapping file can be generated based on the facial mesh and the distribution of each LED light on the treatment mask obtained in the current treatment, or it can be a historically generated mapping file, or it can be predefined according to the mask design independently of the individual user. There are no restrictions here.
[0048] The following describes several ways to generate a mapping file based on the facial mesh obtained from the current treatment and the distribution of each LED light on the treatment mask.
[0049] In another exemplary embodiment (method 1), the specific process of "generating a mapping file based on the facial mesh obtained in the current treatment and the distribution of each LED light on the treatment mask" includes steps 301-302.
[0050] Step 301: Based on the facial mesh and the distribution of LEDs on the treatment mask, determine one or more LEDs corresponding to each mesh unit. It should be noted that, unless otherwise stated, the facial mesh in this method refers to the facial mesh acquired in the current treatment.
[0051] Step 302: Generate a mapping file based on the coordinates of each grid cell in the facial mesh and the index of one or more LEDs corresponding to each grid cell.
[0052] In another exemplary embodiment, step 301 described above can be replaced by steps 401-403.
[0053] Step 401: Transform the facial mesh and the LED light distribution map of the treatment mask to the same face coordinate system to obtain the coordinate-transformed facial mesh and the coordinate-transformed LED light distribution map; the LED light distribution map includes the position distribution of each LED light and the coverage distribution of each LED light.
[0054] The same face coordinate system can be the coordinate system of the face mesh itself, or it can be a separately constructed coordinate system; there are no restrictions here.
[0055] When using a separately constructed coordinate system (which can be called a third-party coordinate system), the facial mesh can be transformed to the separately constructed coordinate system based on the transformation relationship between the third-party coordinate system and the coordinate system of the facial mesh itself. Similarly, the coordinate transformation of the LED light distribution map can also be performed based on the transformation relationship between the third-party coordinate system and the coordinate system of the LED light distribution map itself.
[0056] When using the coordinate system of the facial grid itself (such as the aforementioned normalized coordinate system), only a coordinate transformation of the LED light distribution diagram is required.
[0057] For example, as mentioned above, the normalized coordinate system can take the tip of the nose as the origin, the line connecting the tip of the nose to the midpoint between the eyes as the positive direction of the Y-axis, and the direction perpendicular to this line to the right as the positive direction of the X-axis. When performing coordinate transformation, the positions of the tip of the nose, the eyes, or other positions in the facial grid and the LED light distribution map are aligned, and the transformation is performed using relative coordinates. The specific transformation steps are exemplified as follows: 1. Feature point calibration: In the normalized coordinate system of the facial mesh and the original coordinate system of the LED light distribution map, at least 3 coplanar reference feature points are calibrated, preferably the nose tip point (P0), the center point of the left eye (P1), and the center point of the right eye (P2). The nose tip point (P0), the center point of the left eye (P1), and the center point of the right eye (P2) form a plane, so they are called coplanar reference feature points.
[0058] 2. Reference point coordinate extraction: Extract the normalized coordinates of the coplanar reference feature points marked in the facial mesh, and extract the original pixel coordinates of the corresponding coplanar reference feature points in the LED light distribution map; Using the aforementioned three coplanar reference feature points, the normalized coordinates of the extracted facial mesh are designated as P0_grid (x0,y0), P1_grid (x1,y1), and P2_grid (x2,y2); the corresponding original pixel coordinates in the extracted LED distribution map are designated as P0_led (X0,Y0), P1_led (X1,Y1), and P2_led (X2,Y2). Different coordinates of the same coplanar reference feature point constitute a set of corresponding coordinates, namely: P0_grid (x0,y0) and P0_led (X0,Y0), P1_grid (x1,y1) and P1_led (X1,Y1), and P2_grid (x2,y2) and P2_led (X2,Y2) form three sets of corresponding coordinates.
[0059] 3. Transformation Matrix Calculation: Based on multiple sets of corresponding coordinates, calculate the transformation matrix H (Homography Matrix) from the original coordinate system of the LED light distribution map to the normalized coordinate system of the facial mesh. Matrix H contains translation, scaling, rotation, and affine transformation parameters, satisfying the formula: [x; y; 1] = H×[X; Y; 1]. Where (x,y) represents the normalized coordinates in the multiple sets of corresponding coordinates, and (X,Y) are the original pixel coordinates of the LED light distribution map in the multiple sets of corresponding coordinates. The transformation matrix H can be directly solved using the findHomography() function in computer vision libraries such as OpenCV, which will not be elaborated here.
[0060] 4. Coordinate Transformation Execution: Substitute the position coordinates and coverage boundary coordinates of all LEDs in the LED distribution map into the transformation matrix H for calculation. This will yield the normalized position coordinates of all LEDs in the normalized coordinate system of the facial grid and the normalized boundary coordinates of their coverage areas, thus completing the coordinate transformation of the LED distribution map.
[0061] It should be noted that a similar method can be used to transform the facial mesh to a third-party coordinate system and the LED light distribution map to a third-party coordinate system. That is, the transformation matrix is obtained based on the calibrated coplanar reference feature points, and then the facial mesh and LED light distribution map are transformed to a third-party coordinate system based on the transformation matrix. This will not be elaborated here.
[0062] Step 402: Based on the transformed facial mesh and the LED light distribution map after coordinate transformation, determine the LED lights covered by each mesh unit area, and the initial index set of each mesh unit; the initial index set of the mesh unit contains the indices of all LED lights covered by the mesh unit area.
[0063] Step 403: Correct the initial index set of each grid cell to obtain the index set of each grid cell; the index set of each grid cell satisfies the condition that the index sets of any two adjacent grid cells do not contain the index of the same LED.
[0064] Step 403 above is an optional step; in some embodiments, it may only include steps 401 and 402. Step 403 addresses the case where two adjacent grid cells contain the same LED, which may lead to the LED not being able to determine which defect to control. In this case, the grid cell ultimately corresponding to the same LED can be determined based on the comprehensive relative priority of the two adjacent grid cells (described later). This comprehensive relative priority is related to the type and number of defects contained in the two adjacent grid cells, and the radiation area of the LEDs occupied by the two adjacent grid cells.
[0065] In another exemplary embodiment, such as Figure 4 As shown, step 403 above can be implemented using the following process: Step A1: Set the value of i to 1; Step A2: Determine whether the initial index set of the target mesh cell and the initial index set of the i-th adjacent mesh cell have the same index, and obtain the first determination result; the target mesh cell is any mesh cell in the face mesh, and the i-th adjacent mesh cell is the i-th mesh cell adjacent to the target mesh cell; In this embodiment, the adjacent grids of the target grid cell can be numbered in a clockwise order. For example, the first grid cell is directly to the left of the target grid cell, the second is diagonally above to the left, the third is directly above, and the fourth is diagonally above to the right. Alternatively, they can be numbered in a counterclockwise, up-down-left-right order, or they can be left unnumbered. Those skilled in the art can design flexibly, as long as it can traverse each adjacent grid cell of the target grid cell. Step A3: If the first judgment result indicates yes, delete the index of the same LED from the initial index set of the target grid cell or the initial index set of the i-th adjacent grid cell; the same LED refers to the LED with the same index in the initial index set of the target grid cell and the initial index set of the i-th adjacent grid cell. Step A4: Increment the value of i by 1, and return to the step of "determining whether the initial index set of the target grid cell and the initial index set of the i-th adjacent grid cell have the same index and obtaining the first judgment result", until all adjacent grid cells of the target grid cell have been traversed.
[0066] In another exemplary embodiment, removing the index of the same LED from the initial index set of the target grid cell or the initial index set of the i-th adjacent grid cell specifically includes: 1. Based on the defect type and number of defects in the target mesh cell and the i-th adjacent mesh cell (determined according to step 104), determine the first relative priority of the target mesh cell and the i-th adjacent mesh cell; 2. Based on the area of the target grid cell and the i-th adjacent grid cell covered by the same LED light, determine the second relative priority of the target grid cell and the i-th adjacent grid cell; 3. By combining the first relative priority and the second relative priority, the combined relative priority of the target mesh cell and the i-th adjacent mesh cell is obtained; 4. When the overall relative priority characterization indicates that the priority of the target grid cell is higher than that of the i-th adjacent grid cell, the index of the same LED light is deleted from the initial index set of the i-th adjacent grid cell; otherwise, the index of the same LED light is deleted from the initial index set of the target grid cell.
[0067] For example, when the target grid cell contains more defects, has a higher priority than the i-th adjacent grid cell, or has a larger area covered by the same LED, the above-mentioned comprehensive relative priority indicates that the target grid cell has a higher priority than the i-th adjacent grid cell.
[0068] In other cases, the defect type, number of defects, and coverage area can be considered comprehensively.
[0069] For example, the formula for calculating the first relative priority is: ; in, The first relative priority between the target mesh cell and the i-th adjacent mesh cell. Indicates the range of target mesh cells. Indicates the first [cell] within the target grid cell range Such defects For the first Defect priority of each type of defect To be within the target grid cell range The number of defects; Indicates the range of the i-th adjacent grid cell. Represents the i-th adjacent grid cell range. Such defects For the first Defect priority of each type of defect For the range of the i-th adjacent grid cell, the first... The number of defects.
[0070] The formula for calculating the second relative priority is: ; in, The second relative priority between the target mesh cell and the i-th adjacent mesh cell. The area of the target grid cell covered by the same LED light. This is the area of the i-th adjacent grid cell covered by the same LED light.
[0071] Furthermore, the first and second relative priorities mentioned above are weighted and summed to form a comprehensive relative priority.
[0072] In this exemplary embodiment, when the overall relative priority is greater than 1, it means that the priority of the target mesh cell is higher than that of the i-th adjacent mesh cell; when the overall relative priority is less than or equal to 1, it means that the priority of the target mesh cell is not higher than that of the i-th adjacent mesh cell.
[0073] In another exemplary embodiment (method 2), the above-mentioned mapping file can be determined for a given face mask design before leaving the factory. This mapping file only needs to be set once per face mask model. The mapping file is independent of individual users. The specific process includes: Step B1: For a specific model of face mask, establish a standard normalized facial mesh.
[0074] This standardized facial mesh is constructed using MediaPipe's normalized standard coordinates to adapt to different facial sizes and shapes. The specific process is as follows: facial images of multiple faces adapted to this model of treatment mask are acquired, resulting in multiple facial images; feature point detection and expansion are performed on each facial image using MediaPipe detection and expansion methods to obtain multiple feature points corresponding to each facial image (refer to the aforementioned description); the coordinates of the feature points in each facial image are normalized, and the normalized coordinates corresponding to the same feature point in multiple facial images are standardized (e.g., mean calculation) to obtain the normalized standard coordinates of each feature point; connectors are defined for each feature point to obtain the aforementioned standardized facial mesh.
[0075] Step B2: Establish the mapping relationship between each grid cell of the standard normalized facial mesh and each LED light to obtain the mapping file.
[0076] The specific construction process can be similar to steps 301-302 above, except that the facial mesh in step 301 can be replaced with a standard normalized facial mesh.
[0077] In another exemplary embodiment, step 106 described above may be replaced by steps 501-502.
[0078] Step 501: When the defect detection result corresponding to the target LED light is that there is no defect, the control strategy of the target LED light is determined to be off.
[0079] Step 502: When the defect detection result of the target LED light is that there is one defect or multiple defects, the control strategy of the target LED light is determined to be: irradiation with target color and target power.
[0080] The target color is the color used to treat the target defect. The target defect is determined as follows: When the defect detection result indicates the presence of one defect, that defect is identified as the target defect. If the defect detection result indicates the presence of multiple defects, the target defect is selected from the multiple defects in the defect detection result based on user selection or the priority of different defects. For example, if the defect detection result for a certain LED contains three defects, denoted as defects 1-3, and the user selects defect 3, or if defect 3 has the highest priority, then defect 3 is identified as the target defect.
[0081] In one exemplary embodiment, each skin defect type has a pre-configured LED treatment color, as follows: Blue LED: Age spots, acne, dark circles; Red LED: for eye bags, firmness issues, and wrinkles; Purple LED: Pores, redness.
[0082] Based on the pre-configured relationship between skin defect types and LED light colors, the corresponding color can be determined for any defect.
[0083] In another exemplary embodiment, the priority of the aforementioned defects can be a fixed priority. Furthermore, the priority can also vary depending on the user's treatment history, and the defect priority for follow-up users can be adjusted based on past treatment courses and their effects.
[0084] In some exemplary embodiments of this application, the principle of defect priority adjustment may include: defects that show less improvement over multiple treatment sessions will have a higher priority, while defects that are close to complete resolution will have a lower priority. In this embodiment, less improvement and close to complete resolution can be determined by the severity score of the defect. For example, if the severity score of the defect is still high (i.e., still greater than the upper limit threshold) after multiple treatments, it is considered less improvement; if the severity score of the defect is lower than the lower limit threshold after multiple treatments, it is considered close to complete resolution.
[0085] In one example, the priority of any defect is determined (adjusted) as follows: ; in, Defect priority, As the basic priority of defects, The severity of the defect is scored. These are the improvement factors for the defects. The severity scores and improvement factors mentioned above are obtained based on a multi-task detection model, which will be discussed in more detail later in this paper. The basic priority is determined based on the impact of the defect itself on human senses, and can be specified by experts or determined through user surveys, which will not be elaborated here.
[0086] The target power mentioned above can be, for example, a base power or obtained by analyzing historical treatment records: For example, when a user receives their first treatment (at which time there are no historical treatment records) or when the user specifies the use of base power, the target power is set to a base power, which is a safe power that has been verified over a long period of time and will not cause harm to the face.
[0087] In some exemplary embodiments, all LED lights start at a default “gentle” power level (using base power in this embodiment), and the power is adjusted adaptively based on the user’s treatment history, skin sensitivity, and response to previous treatments to ensure that the treatment is personalized over time and the intensity is gradually adjusted according to the skin’s response to previous treatments, as follows.
[0088] Data collection: After each treatment session, obtain the treatment parameters used, user feedback, and skin analysis results before and after treatment; among them, treatment parameters include LED color, power level, and duration; user feedback includes comfort level and any skin reactions.
[0089] Sensitivity analysis: Compare the severity of skin problems before and after each treatment, track improvement factors for each type of defect, and monitor any adverse reactions reported by users (increased redness, irritation). For example, adverse reactions can be obtained from user feedback or by identifying post-treatment facial images and comparing them with pre-treatment facial images.
[0090] Adaptive algorithm: If improvement is slow, increase the power level in the next treatment; if the skin shows sensitivity (e.g., new redness, irritation), decrease the power or skip certain areas; if the defect is improving well, maintain the current settings.
[0091] Slow improvement refers to minimal change in the severity score of the defect across multiple treatments. For example, slow improvement can be determined by whether the severity score continuously decreases across multiple treatments (condition 1), or whether the decrease in severity score between two consecutive treatments exceeds a first threshold (condition 2). Those skilled in the art can design a system where slow improvement is defined as the failure to meet either condition 1 or condition 2. The value of the first threshold can be flexibly set by those skilled in the art, for example, 1, 1.5, 0.5, 0.1, etc., which will not be elaborated upon here.
[0092] Good improvement refers to a continuous decrease in the severity score of the defect during multiple treatments, with each decrease exceeding a certain threshold.
[0093] In another exemplary embodiment, a target power calculation method for the above-described adaptive algorithm is provided. This method obtains the target power by analyzing historical treatment records, specifically as follows: If the first treatment record is not present in the historical treatment records, the target power is calculated based on the historical treatment records; the first treatment record is a treatment record that targets the defect and has a significant therapeutic effect, and the formula is: ; ; in, To calculate power, Based on power, The number of consecutive treatments that have failed to achieve the desired effect for the target defect. This is the power adjustment factor, i.e., the preset unit power. For the target power, This is the upper limit for safe power.
[0094] If the first treatment record exists in the historical treatment records, the target power is determined based on the power used in the first treatment record, using the following formula: ; in, For the target power, For safe power limits, This refers to the power used in the first treatment record.
[0095] In this embodiment, poor results after multiple consecutive treatments constitute slow improvement, while significant efficacy means a marked reduction in the severity score of the target defect before and after a treatment (i.e., the difference in severity score before and after a treatment is greater than a set second threshold), and no adverse reactions occur after the treatment. The first and second thresholds can be the same or different. Those skilled in the art can flexibly set the value of the second threshold, such as 10, 7, 15, etc., which will not be elaborated here.
[0096] In another exemplary embodiment, the aforementioned safe power limit is determined in the following manner: If there is a second treatment record in the historical treatment record where the skin shows sensitivity, the preset unit power is reduced based on the power used in the second treatment record to obtain the safe power limit. When the second treatment record is not present in the historical treatment records, the preset safe power will be set as the upper limit of the safe power.
[0097] In another exemplary embodiment, an analysis report is also generated during the aforementioned defect analysis. This report includes a severity score for each defect, an estimated skin age, and an overall facial score, with the aim of tracking the evolution of facial defects. For users, this allows them to understand their current skin condition; simultaneously, the application also selects a handling plan for treatment conflicts based on historical data (when an area requires treatment for multiple defects, the defect priority and target power for different defects can be determined based on historical data, achieving adaptive acquisition of which defect to prioritize and what power to use).
[0098] In another exemplary embodiment, the continuous treatment effect and improvement factor of the target defect in the above embodiments are obtained based on the severity score of each defect after each treatment, as follows: Score Acquisition: After each treatment and / or before each treatment, obtain the severity score (for example, the score is on a scale of 0-100), estimated skin age, and overall facial health score for each defect in the analysis report.
[0099] Historical Comparison: The severity score of each defect after current treatment is compared with the severity score in a previous treatment record. The percentage improvement / deterioration for each defect (i.e., the improvement factor) is calculated, and the trend of the improvement factor over time (weeks / months) is tracked. For example, the formula for calculating the improvement factor is: ,in, To improve the factor, This represents a score indicating the severity of the defect after the current treatment. This is the severity score from the previous treatment record.
[0100] Treatment decision process: Identify the defect with the highest severity score and compare it with the previous treatment effect. If the defect is severe and does not respond well to previous treatment, increase its priority and adjust its power. If the defect improves significantly, decrease its priority and shift the treatment focus to other areas. The specific calculation formulas for target power and defect priority mentioned above can be used, which will not be elaborated here.
[0101] In another exemplary embodiment, step 103 above can be implemented using a facial defect detection model, or it can be implemented through remote AI skin analysis via a third-party API. The facial defect detection model can detect multiple defects simultaneously, or it can use a different facial defect detection model to analyze each defect separately. There is no limitation here. In this embodiment, we will take the example of using a different facial defect detection model to analyze each defect separately. In the subsequent system embodiments, we will take the example of calling a third-party API. The two are two optional implementation methods of skin analysis in this application, and they are not mutually conflicting technical solutions.
[0102] The facial defect detection model described above is obtained by training a multi-task detection model, and the detection results include a defect layer and a severity score.
[0103] In one example, the multi-task detection model described above includes a backbone network, a semantic segmentation network, and a regression network connected in sequence.
[0104] The backbone network is used to extract features from the facial image to obtain a feature map; The semantic segmentation network is used to perform semantic segmentation based on the feature map to obtain a defect layer. During the training phase, the training samples of the semantic segmentation network may, for example, include feature maps labeled with specific defect types and defect region masks (e.g., feature maps labeled with "acne scar region mask", "pigmentation region mask", and "wrinkle region mask"). During the inference phase, the trained semantic segmentation network can perform pixel-by-pixel category segmentation for preset defect types (such as acne scars, pigmentation, and wrinkles), and the output defect layer is a pixel-level mask map corresponding to the defect type, used to characterize the specific distribution area of the corresponding defect in the facial image.
[0105] The regression network is used to perform regression analysis on the defect layers to obtain severity scores. Specifically, during the training phase, the training samples of the regression network include, for example, defect layers (masks) and corresponding severity score labels for the defects (e.g., "acne scar area mask + acne scar severity score 85"). During the inference phase, the trained regression network can calculate the corresponding severity score for each defect layer.
[0106] In another exemplary embodiment, the backbone network described above is EfficientNet or MobileNet; the semantic segmentation network includes a feature pyramid and a decoder; and the regression network includes a global pooling layer and a fully connected layer.
[0107] It should be noted that the backbone network can perform two functions: 1. Task adaptation during the training phase: For example, the backbone network is not directly used after pre-training on general images (such as animals and landscapes), but is based on a dataset labeled with facial defects for transfer learning and fine-tuning. For example, EfficientNet is first used for general pre-training on the ImageNet dataset, and then the network weights are fine-tuned using facial images labeled with defects, so that the backbone network can learn and extract features related to acne marks, blemishes, and wrinkles (such as texture, color, and edge features), rather than irrelevant features such as background and hair.
[0108] 2. Feature map hierarchical adaptation: The backbone network outputs multi-scale feature maps, not single-scale feature maps. Shallow feature maps preserve edge and detail information, suitable for small defects such as fine lines and small blemishes; while deep feature maps preserve semantic and global features, suitable for large-area defects. These multi-scale feature maps can be directly input into the subsequent semantic segmentation network (Feature Pyramid Network) as the basis for segmenting the defect layer.
[0109] The semantic segmentation network connected to the backbone network has a feature pyramid used to fuse feature maps of different scales to improve the segmentation accuracy of small defects. The decoder can be used to upsample the fused feature maps to the original image size to output a pixel-level defect layer. The regression network connected to the semantic segmentation network uses a global pooling layer to reduce the dimensionality of the spatial features of the defective layer, and a fully connected layer to map the dimensionality-reduced features to a preset score range (such as 0-100 points), thereby outputting the corresponding severity score.
[0110] In another exemplary embodiment, in step 105 above, the facial defect mesh image represents the correspondence between the mesh cell index and the defect, and the mapping file represents the correspondence between the mesh cell index and the LED light index. Based on the facial defect mesh image and the mapping file, the correspondence between the LED light index and the defect can be determined, that is, the defect detection result corresponding to each LED light can be obtained.
[0111] In another exemplary embodiment, the cross calculation in step 104 above is a pixel-level cross calculation. Since the defect layer and the facial mesh are both obtained based on the same facial image, there is a pixel correspondence between them. This pixel-level cross calculation can map the defects onto the mesh cells of the facial mesh and determine the mesh cells affected by each defect.
[0112] Based on the same inventive concept, this application also provides an intelligent control device for a therapeutic mask to implement the intelligent control method for the therapeutic mask described above. The solution provided by this device is similar to the solution described in the above method; therefore, the specific limitations of one or more embodiments of the intelligent control device for a therapeutic mask provided below can be found in the limitations of the intelligent control method for the therapeutic mask described above, and will not be repeated here.
[0113] In one exemplary embodiment, a smart control device for a therapeutic face mask is provided, comprising: The facial image acquisition module is used to acquire the user's facial image; A facial mesh construction module is used to detect feature points in the facial image and construct a facial mesh. The defect analysis module is used to perform defect analysis on the facial image to obtain multiple defect layers; each defect layer corresponds to a facial defect. For example, different defect layers are semi-transparent images representing different defect distributions; The cross-calculation module is used to perform cross-calculation on each defect layer and the facial mesh respectively, determine the mesh cells affected by each defect, and obtain multiple facial defect mesh images; The mapping module is used to map multiple facial defect mesh images to each LED light according to a mapping file showing the correspondence between each mesh unit in the facial mesh and each LED light, and to determine the defect detection result corresponding to each LED light; the defect detection result includes no defect, one defect, and multiple defects. The control strategy generation module is used to generate a control strategy for each LED based on the defect detection results corresponding to each LED.
[0114] In one exemplary embodiment, a computer device is provided, which may be a server or a terminal, and its internal structure diagram may be as follows. Figure 5 As shown, this computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network connection. When the computer program is executed by the processor, it implements an intelligent control method for a therapeutic mask.
[0115] Those skilled in the art will understand that Figure 5 The structures shown are merely block diagrams of some structures related to the present application and do not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than shown in the figures, or combine certain components, or have different component arrangements. In an exemplary embodiment, a computer device is provided, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.
[0116] In one exemplary embodiment, a computer-readable storage medium is provided storing a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.
[0117] In one exemplary embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.
[0118] In one exemplary embodiment, an intelligent control system for a therapeutic mask is provided, the intelligent control system comprising: a mobile application and a web service; The mobile application is connected to the controller of the treatment mask, and the mobile application is also connected to the web server; The mobile application is used to capture images of the user's face. The web server is used to generate a control strategy for each LED light on the treatment mask using the above-mentioned intelligent control method, and then sends the control strategy to the mobile application. The mobile application is also used to send the control strategy to the controller of the treatment mask, and to control each LED light on the treatment mask separately.
[0119] In another exemplary embodiment, the mobile application is also used to create a user profile for the user to view historical treatment records; the historical treatment records include facial images used each time the treatment mask is controlled for treatment, multiple superimposed images, and analysis reports, the analysis reports including the severity scores of different facial defects of the user and the comprehensive score of the user's skin each time the treatment mask is controlled for treatment.
[0120] In another exemplary embodiment, the mobile application is also configured to provide options for the user to select the type of defect they wish to treat or to cancel the type of defect they wish to ignore.
[0121] The aforementioned mobile applications include, but are not limited to, various laptops, smartphones, tablets, and portable wearable devices, among which portable wearable devices may include smartwatches, smart bracelets, head-mounted devices, etc.
[0122] Taking a smartphone as an example of the aforementioned mobile application client, the smartphone runs a mobile application program that implements the functions of the mobile application client in the various system embodiments described above. For instance, this mobile application is implemented based on React Native.
[0123] In another exemplary implementation, the aforementioned web server contains an embedded web application, which is implemented based on React and loaded within the mobile application via WebView.
[0124] In another exemplary embodiment, the controller of the aforementioned treatment mask is connected to a mobile application via Bluetooth Low Energy (BLE).
[0125] For example, the aforementioned treatment mask is equipped with 111 LEDs of different types (red, blue, purple, and containing VR components). The 111 LEDs are distributed over areas including the forehead, cheeks, nose, and chin.
[0126] Each LED can be individually controlled: wavelength category (red / blue / violet) and intensity level.
[0127] In another exemplary implementation, the aforementioned web server calculates a personalized light therapy program by mapping facial defects to a single LED light, and sends the personalized light therapy program to a mobile application. The program is then transmitted to the treatment mask via BLE, enabling customized, zone-specific treatments to be performed directly at home.
[0128] The intelligent control system of the therapeutic mask in this application adopts a mobile application + web application architecture to achieve integrated control of AI analysis, geometric mapping, and BLE-driven LED control. The therapeutic mask exists as a standalone product; in this application, it is regarded as an actuator device controlled by the software system.
[0129] In another exemplary implementation, the intelligent control system of the aforementioned treatment mask operates as follows: Mobile app users capture facial images using their cameras and transmit them to the web server.
[0130] The web server performs facial analysis and derives a treatment strategy, which is then transmitted to the controller of the treatment mask to control the state of the mask's LED lights.
[0131] In another exemplary embodiment, the mobile application within the mobile application is the user terminal, including a user interface, file management, camera access, BLE communication, and data caching; This mobile application is used for: Establish user profiles (such as historical images, analysis reports, and treatment plans), and capture facial images via camera; Users can view: the original reference photo, and each overlay image superimposed on the original face. Based on the returned analysis report, users can select or deselect specific types of defects they wish to treat or ignore, etc.
[0132] In another exemplary embodiment, a web application within a web server receives images sent from a mobile device, performs AI analysis, generates an analysis report, and sends the analysis report to the mobile application. The user selects the area to be treated, and the selection information is transmitted to the web server. Based on the user's selection, the web server analyzes the information and generates a treatment strategy, which is then sent to the treatment mask. The controller of the treatment mask controls the state of the LEDs.
[0133] The web server calls an external AI skin analysis API to receive facial images from the mobile application or backend, and is responsible for analyzing facial blemishes (problems). The external AI skin analysis API returns: multiple semi-transparent images highlighting specific defects (these images contain the defect areas, corresponding to the defect layers mentioned above), and an analysis report containing severity scores and global metrics. This analysis report is presented in JSON format.
[0134] The web server is also used to formulate a treatment strategy based on the user's selections. Since every face is different, this embodiment uses MediaPipe to identify facial regions: eyes, forehead, lips, cheeks, etc. The results provided by the AI skin analysis API are then processed to match the regions detected by MediaPipe, thereby determining which LEDs need to be lit and in what mode. The formulated treatment strategy is then sent to the controller of the treatment mask via Bluetooth. An exemplary treatment strategy includes: activating which LEDs, using which mode, and setting the intensity.
[0135] In another exemplary embodiment, the above-described treatment mask includes a controller, an LED light, and a BLE chip.
[0136] The controller receives the treatment strategy and controls the status of the LED lights (LED number, mode, intensity, and treatment duration). An exemplary treatment mask contains 111 LED lights arranged in the shape of the mask to cover key facial areas.
[0137] In another exemplary embodiment, the treatment surface described above includes three main LED categories: blue, red, and purple (including VR coverage).
[0138] In another exemplary embodiment, the BLE chip described above includes a proprietary frame protocol for interacting with mobile applications: Header: 0x5A; Tail end: 0xA5; A checksum field used for integrity.
[0139] In another exemplary embodiment, the controller generates and reports treatment control commands, which, exemplary, include treatment start, treatment completion, etc.
[0140] The mobile application coordinates the entire process; the web server acts as a local "computing engine," driven by the mobile application, much like its internal API.
[0141] In another exemplary embodiment, the operation of the intelligent control system of the above-described treatment mask includes the following steps 601-608.
[0142] Step 601: Take a facial image using a smartphone application (i.e., a mobile user terminal); send the image to a web server; the web server calls an external AI skin analysis API to perform skin analysis.
[0143] Step 602: The web server receives a set of overlay images and a JSON dataset, where each overlay image corresponds to a type of facial defect, and the JSON dataset contains defect scores, estimated age, and overall facial scores.
[0144] Step 603: The web server detects facial feature points through MediaPipe and generates a triangular mesh containing additional forehead points.
[0145] Step 604: The Web server performs pixel-level cross-calculation on the defect overlay layer and the mesh triangles to determine which triangles are affected by which defects.
[0146] Step 605: The web server maps each triangle to one or more LED indices using a triangle-to-LED mapping file.
[0147] Step 606: Using a priority table defined by beauty experts, select the dominant defect for each LED and determine: LED color (e.g., red, blue, purple) and LED power level (automatically derived based on defect severity and density).
[0148] Step 607: Generate a complete treatment program (LED status + timing) and transmit the program to the controller of the treatment mask using the proprietary BLE protocol.
[0149] Step 608: The controller of the treatment mask controls the LED lights to perform the treatment and records the results for later review and comparison.
[0150] This procedure is performed in the beauty / wellness field and is not considered a medical diagnosis or treatment.
[0151] To protect user privacy, privacy-de-identifying processing can be performed on the user's facial image on the mobile client side. For example, only key target areas for identity recognition (such as the eye area, eyebrow area, and lip area) in the facial image can be weakened, while other facial areas (such as the nose area, forehead, cheeks, chin, and other skin areas) remain unprocessed. This preserves the texture, color, and location information related to skin defects such as blemishes, acne scars, wrinkles, redness, and uneven skin tone. The de-identified facial image cannot identify the user and does not affect subsequent facial feature point detection, facial mesh construction, and skin defect analysis.
[0152] The purpose of the aforementioned feature weakening process is to blur or reduce the noise of the fine texture / detail features of the target's key areas, thereby destroying the key detail information used for identity recognition, while preserving the overall outline and positional features of the target's key areas.
[0153] For example, the specific implementation steps of feature weakening are as follows: Step 1: Locate the key target area.
[0154] Lightweight face detection models for mobile clients (such as MTCNN and MediaPipe FaceDetection) can be used to accurately outline the eye region (iris + sclera), eyebrow region, lip region, etc. on the original facial image.
[0155] Step 2: Perform targeted blurring on the key target areas.
[0156] For example, for the eye area, a Gaussian blur algorithm (radius 3-5px) is used to process the iris / white of the eye, erasing pupil details while preserving the overall eye shape outline; for the eyebrow area, a mean blur algorithm is used to erase personalized details such as eyebrow thickness, density, and shape; for the lip area, a bilateral blur algorithm is used to process the lip area, erasing lip lines, lip color, and other details while preserving the overall lip shape outline. The aforementioned Gaussian blur algorithm, mean blur algorithm, and bilateral blur algorithm are all mature algorithms built into OpenCV, Android Bitmap API, and iOS Core Image framework; mobile devices can implement these algorithms simply by calling existing interfaces.
[0157] By taking the above two steps, a facial image after feature weakening can be obtained.
[0158] Mobile users can subsequently upload facial images with weakened features to the web server to avoid privacy leaks.
[0159] In another exemplary embodiment, a smartphone is used as the mobile application terminal, and the specific usage process of the above-mentioned intelligent control system for the therapeutic mask includes the following steps 701-705.
[0160] Step 701: The user logs into the mobile application, creates a user profile, and initializes the session. The user opens the mobile application on their smartphone; Users create or select personal profiles (e.g., storing basic information and history). Start a new scan / treatment session.
[0161] Step 702: Image Acquisition and Verification The app prompts the user to take a front-facing photo of their face; Image capture is performed using a smartphone camera. Application checks: Centering of the face in the image, sufficient lighting (no extreme darkness or overexposure), and reasonable pose (no obvious rotation or obstruction).
[0162] If the conditions are not met, the user will be prompted to take a new photo.
[0163] Step 703: The image is sent to the web server, which calls the external AI skin analysis API for AI-based skin analysis.
[0164] In this step, the verified image (i.e., the image obtained in step 702 above) is sent to a third-party AI skin analysis API. The AI processes the image and returns: A set of overlaid images (usually 9 images, i.e. the defect layer mentioned above, also known as the overlay layer), each image corresponding to a specific facial defect: for example, acne, wrinkles, redness, pores, pigmentation, uneven texture, etc. Each overlay acts like a transparent layer (mask), graphically displaying the defect area on the face; An analysis report includes: severity scores for each defect, estimated skin age, overall facial score, and other diagnostic information.
[0165] Step 704: The user views the analysis report and selects the treatment area. In the mobile application, the user can view: Original reference photograph; Each overlay image is superimposed on the original face. Users can select or deselect specific defect types they wish to treat or ignore; this selection acts as a filter for defects to be considered in subsequent treatment generation.
[0166] Step 705: The web server performs facial geometry mapping (MediaPipe + forehead attachment points) on the image captured by the user. The web application (in WebView) uses MediaPipe to detect facial feature points. A triangular mesh (facial topology) is generated from these feature points.
[0167] To ensure better forehead coverage, additional points are calculated, which are derived from existing MediaPipe feature points by offset. The offset is dynamic and automatically adjusts according to face size and shape, as MediaPipe feature points scale with the user's face.
[0168] The final mesh consists of: the standard MediaPipe triangle and extended triangles for the forehead additional points.
[0169] Step 706: Perform pixel-level cross-calculation between the overlay image returned by the external AI and the mesh triangles to determine which triangles are affected by which defects (defect-triangle association (pixel level)). Each overlay image is aligned with the facial mesh.
[0170] For each triangle in the mesh: check pixel by pixel (or by an equivalent rasterization method) where the triangle region intersects with the defective pixel: If the overlay shows a defect at that pixel, the triangle is marked as the corresponding defect type; If multiple layers overlap in the same area, the same triangle may be associated with multiple defects.
[0171] Step 707: Map each triangle to one or more LED indices using the triangle-to-LED mapping file.
[0172] Step 708: Using a priority table defined with beauty experts, select the dominant defect for each LED and determine the LED pattern selection. Multiple defects may affect the same LED area.
[0173] A priority table is defined in collaboration with beauty experts. For example, certain defects (such as inflammation and acne) may have a higher priority than others (such as fine lines), and certain defects may correspond to specific wavelengths (such as blue light, red light, or violet light).
[0174] For each LED: List all defects affecting its associated triangle. The system selects the dominant defect based on an expert-defined priority table. The LED color (blue, red, or purple) and power level are then selected accordingly.
[0175] In this step, the user does not need to manually control the power or color, as these parameters are derived by the algorithm.
[0176] Step 709: Generate a complete treatment strategy (LED status + timing) Once each LED has a defined mode (color + power) or is turned off, the system constructs a treatment program, which includes: LED configuration (each LED index: color, power level, on / off state); The treatment duration selected by the user (e.g., several predefined duration options); Optional additional parameters, such as: step-by-step mode (if needed), session metadata; Users must perform a scan; even in "manual" mode, the scan data is used. In manual mode, users can focus on a single defect type, resulting in a more uniform LED configuration, but still based on scan data.
[0177] Step 710: Transmit the treatment strategy to the treatment mask via Bluetooth.
[0178] The web server first sends the treatment strategy to the mobile application, which then uses Bluetooth Low Energy to connect to the treatment mask.
[0179] It uses a proprietary frame-based protocol, including: header byte: 0x5A, tail byte: 0xA5, a checksum for data integrity, and a payload describing the LED status and duration.
[0180] The treatment procedure is transmitted to the mask, which responds with a "treatment start" signal and sends a "treatment complete" signal when the procedure ends.
[0181] During execution, the controller internally handles timing and LED control.
[0182] The mobile application uses its own timer to display progress, which is synchronized with the session duration.
[0183] Step 711: After the treatment is completed, the recorded results will be stored on the mobile application.
[0184] After treatment, the mobile application records the session, including: the original facial scan image, the overlay image of the defects, the analysis report (including defect score, estimated age, global score), treatment date / time and duration.
[0185] Data is uploaded to a web server. Facial and defect images are uploaded to Azur storage, JSON reports and metadata are stored in CosmosDB, and a copy is temporarily cached on the device for fast access. In another exemplary embodiment, the data flow of the above process is as follows: Camera → Mobile App → AI API → Web App (Mapping) → Mobile App → Healing Mask (BLE); LED face mask → Mobile application (start / end notification) → Backend (Azure) for logging.
[0186] In another exemplary embodiment, the system described above further includes: an artificial intelligence analysis backend; The AI analysis backend is used to analyze historical treatment records to adjust the priority of defects and the treatment power of each defect. For specific methods, please refer to the above method embodiments, which will not be repeated here.
[0187] Compared to existing consumer-grade therapeutic masks and typical cosmetic phototherapy systems, this application has the following technical advantages.
[0188] 1. Automated, expert-free program generation. The system generates a fully personalized LED treatment program from a single, simple photograph, requiring no human expert intervention. AI and algorithmic mapping replace manual diagnosis and manual LED configuration.
[0189] 2. Localized LED activation. Instead of uniformly irradiating the entire face with a single color, the system only activates LEDs in the areas corresponding to defects, leaving unaffected areas off or in different modes. This allows for more targeted irradiation, reduces unnecessary light exposure, and may improve treatment efficiency.
[0190] 3. Simultaneous treatment of multiple defects. Different areas of the face can be treated simultaneously with different wavelengths and intensities, depending on the local defect condition.
[0191] 4. The combination of AI skin analysis, geometric mapping, and individual LED control in home devices enables clinic-level personalization, providing a level of customization typically only available in expensive clinical settings. Users can achieve this personalization at home using consumer devices.
[0192] 5. Automatic shape adaptation. Using MediaPipe and dynamically added points on the forehead, it can adapt to different facial shapes and sizes, accurately mapping defects to the mask LEDs even for non-standard faces, without requiring manual calibration by the user.
[0193] 6. Continuous improvement over time. Users can perform multiple scans on different dates, and each new scan generates a new procedure reflecting the current skin condition. The system inherently supports long-term progress tracking and iterative optimization of treatments.
[0194] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.
[0195] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM).
[0196] The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0197] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0198] This document uses specific examples to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. Furthermore, those skilled in the art will recognize that, based on the ideas of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A method for intelligent control of a therapeutic face mask, characterized in that, The treatment mask has multiple LED lights distributed on it, and the intelligent control method includes: Obtain the user's facial image; Feature point detection is performed on the facial image to construct a facial mesh; Defect analysis is performed on the facial image to obtain multiple defect layers; each defect layer corresponds to a facial defect. Cross-calculation is performed on each defect layer and the facial mesh to determine the mesh cells affected by each type of defect, and multiple facial defect mesh images are obtained. Based on the mapping file representing the correspondence between each grid cell in the facial mesh and each LED light, multiple facial defect mesh images are mapped to each LED light to determine the defect detection result corresponding to each LED light; the defect detection result includes no defect, one defect, and multiple defects. Based on the defect detection results for each LED, a control strategy is generated for each LED.
2. The intelligent control method for the therapeutic mask according to claim 1, characterized in that, The facial image is subjected to feature point detection to construct a facial mesh, specifically including: The facial image was subjected to feature point detection using the MediaPipe detection method to obtain multiple MediaPipe facial feature points. Multiple forehead feature points are generated by expanding upon multiple MediaPipe facial feature points. A facial mesh is constructed based on multiple MediaPipe facial feature points and multiple forehead feature points.
3. The intelligent control method for the therapeutic mask according to claim 2, characterized in that, Based on multiple MediaPipe facial feature points, multiple forehead feature points are generated by expanding upon them, specifically including: Based on multiple MediaPipe facial feature points, an interpolation method is used to expand and generate multiple forehead feature points.
4. The intelligent control method for the therapeutic mask according to claim 2, characterized in that, Based on multiple MediaPipe facial feature points, multiple forehead feature points are generated by expanding upon them, specifically including: Let the initial value of the expansion number t be 0; Perform the expansion operation: Based on the preset offset, generate a new feature point based on the reference point of each t-th expansion to obtain the forehead feature point of the t-th expansion; where, when t=0, the reference point of the t-th expansion includes the MediaPipe facial feature point along the hairline; when t≠0, the reference point of the t-th expansion includes each forehead feature point obtained from the (t-1)-th expansion. Increment the value of t by 1, then return to perform the expansion operation until the generated forehead feature points cover the entire forehead area.
5. The intelligent control method for the therapeutic mask according to claim 4, characterized in that, The preset offset is determined through iterative testing on different face shapes.
6. The intelligent control method for the therapeutic mask according to claim 1, characterized in that, The mapping file representing the correspondence between each mesh cell and each LED in the facial mesh is constructed in the following way: Based on the distribution of the facial mesh and the LEDs on the treatment mask, one or more LEDs corresponding to each mesh unit are determined; A mapping file is generated based on the coordinates of each grid cell and the index of one or more LEDs corresponding to that grid cell.
7. The intelligent control method for the therapeutic mask according to claim 6, characterized in that, Based on the distribution of the facial mesh and the LEDs on the treatment mask, one or more LEDs are determined for each mesh unit, specifically including: The facial mesh and the LED light distribution map of the treatment mask are transformed to the same facial coordinate system to obtain the coordinate-transformed facial mesh and the coordinate-transformed LED light distribution map; the LED light distribution map includes the position distribution of each LED light and the coverage distribution of each LED light; Based on the transformed facial mesh and the LED light distribution map after coordinate transformation, the LED lights covered by each mesh unit area are determined, and an initial index set for each mesh unit is defined. The initial index set of the mesh unit contains the indices of all LED lights covered by the mesh unit area. The initial index set of each grid cell is modified to obtain the index set of each grid cell; the index set of each grid cell satisfies the condition that the index sets of any two adjacent grid cells do not contain the index of the same LED.
8. The intelligent control method for the therapeutic mask according to claim 7, characterized in that, The initial index set for each grid cell is corrected to obtain the index set for each grid cell, specifically including: Let the value of i be 1; Determine whether the initial index set of the target mesh cell and the initial index set of the i-th adjacent mesh cell have the same index to obtain a first determination result; the target mesh cell is any mesh cell in the face mesh, and the i-th adjacent mesh cell is the i-th mesh cell adjacent to the target mesh cell; If the first determination result indicates that the index of the same LED is deleted from the initial index set of the target grid cell or the initial index set of the i-th adjacent grid cell; the same LED refers to the LED with the same index in the initial index set of the target grid cell and the initial index set of the i-th adjacent grid cell; Increment the value of i by 1, and return to the step of "determining whether the initial index set of the target grid cell and the initial index set of the i-th adjacent grid cell have the same index and obtaining the first judgment result", until all adjacent grid cells of the target grid cell have been traversed.
9. The intelligent control method for the therapeutic mask according to claim 8, characterized in that, Remove the index of the same LED from the initial index set of the target grid cell or the initial index set of the i-th adjacent grid cell, specifically including: Based on the defect type and number of defects in the target mesh cell and the i-th adjacent mesh cell, determine the first relative priority of the target mesh cell and the i-th adjacent mesh cell; Based on the area of the target grid cell and the i-th adjacent grid cell covered by the same LED light, determine the second relative priority of the target grid cell and the i-th adjacent grid cell; By combining the first relative priority and the second relative priority, the combined relative priority of the target mesh cell and the i-th adjacent mesh cell is obtained; When the overall relative priority indicates that the priority of the target grid cell is higher than that of the i-th adjacent grid cell, the index of the same LED is deleted from the initial index set of the i-th adjacent grid cell; otherwise, the index of the same LED is deleted from the initial index set of the target grid cell.
10. The intelligent control method for the therapeutic mask according to claim 1, characterized in that, Based on the defect detection results for each LED, a control strategy is generated for each LED, specifically including: When the defect detection result for the target LED light is that there is no defect, the control strategy for the target LED light is determined to be off. When the defect detection result of the target LED light is that there is one defect or multiple defects, the control strategy of the target LED light is determined to be: to illuminate with the target color and target power. The target color is the color of the target defect to be treated, and the target power is the base power or obtained by analyzing historical treatment records; The target defect is determined in the following manner: When the defect detection result indicates the existence of one defect, the defect present in the defect detection result is identified as the target defect. When the defect detection result indicates the existence of multiple defects, the target defect is selected from the multiple defects in the defect detection result according to the user's selection or the priority of different defects.
11. The intelligent control method for the therapeutic mask according to claim 10, characterized in that, The method for obtaining the target power by analyzing historical treatment records is as follows: If the first treatment record is not found in the historical treatment records, the target power is calculated based on the historical treatment records; the first treatment record is a treatment record that targets the target defect and has a significant therapeutic effect. If the first treatment record exists in the historical treatment records, the target power is determined based on the power used in the first treatment record.
12. The intelligent control method for the therapeutic mask according to claim 11, characterized in that, The formula for calculating the target power based on historical treatment records is as follows: ; ; in, To calculate power, Based on power, The number of consecutive treatments that have failed to achieve the desired effect for the target defect. This is the power adjustment factor, i.e., the preset unit power. For the target power, This is the upper limit for safe power.
13. The intelligent control method for the therapeutic mask according to claim 11, characterized in that, The formula for determining the target power based on the power used in the first treatment record is as follows: ; in, For the target power, For safe power limits, This refers to the power used in the first treatment record.
14. The intelligent control method for the therapeutic mask according to claim 12 or 13, characterized in that, The upper limit of safe power is determined in the following manner: If there is a second treatment record in the historical treatment record where the skin shows sensitivity, the preset unit power is reduced based on the power used in the second treatment record to obtain the safe power limit. When the second treatment record is not present in the historical treatment records, the preset safe power will be set as the upper limit of the safe power.
15. The intelligent control method for the therapeutic mask according to claim 10, characterized in that, The priority of different defects is determined as follows: ; in, Defect priority, As the basic priority of defects, The severity of the defect is scored. It is a defect improvement factor.
16. The intelligent control method for the therapeutic mask according to claim 1, characterized in that, Defect analysis is performed on the facial image to obtain multiple defect layers, specifically including: Each facial defect detection model is used to analyze the facial image to obtain the detection result for each defect. The facial defect detection model is obtained by training a multi-task detection model, and the detection result includes the defect layer and severity score of the defect to be detected.
17. The intelligent control method for the therapeutic mask according to claim 16, characterized in that, The facial defect detection model comprises a backbone network, a semantic segmentation network, and a regression network connected in sequence. The backbone network is used to extract features from the facial image to obtain a feature map; The semantic segmentation network is used to perform semantic segmentation based on the feature map to obtain a defect layer; The regression network is used to perform regression analysis on the defect layer to obtain a severity score.
18. The intelligent control method for the therapeutic mask according to claim 17, characterized in that, The backbone network is either EfficientNet or MobileNet; The semantic segmentation network includes a feature pyramid and a decoder; The regression network includes a global pooling layer and a fully connected layer.
19. An intelligent control device for a therapeutic face mask, characterized in that, The intelligent control device of the treatment mask applies the intelligent control method of the treatment mask according to any one of claims 1-18, and the intelligent control device of the treatment mask includes: The facial image acquisition module is used to acquire the user's facial image; A facial mesh construction module is used to detect feature points in the facial image and construct a facial mesh. The defect analysis module is used to perform defect analysis on the facial image to obtain multiple defect layers; each defect layer corresponds to a facial defect. The cross-calculation module is used to perform cross-calculation on each defect layer and the facial mesh respectively, determine the mesh cells affected by each defect, and obtain multiple facial defect mesh images; The mapping module is used to map multiple facial defect mesh images to each LED light according to a mapping file that characterizes the correspondence between each mesh unit in the facial mesh and each LED light, and to determine the defect detection result corresponding to each LED light; the defect detection result includes no defect, one defect, and multiple defects. The control strategy generation module is used to generate a control strategy for each LED based on the defect detection results corresponding to each LED.
20. A computer device, comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor executes the computer program to implement the intelligent control method for the therapeutic mask according to any one of claims 1-18.
21. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the intelligent control method for the therapeutic mask as described in any one of claims 1-18.
22. A computer program product, comprising a computer program, characterized in that, When executed by a processor, the computer program implements the intelligent control method for the therapeutic mask as described in any one of claims 1-18.
23. An intelligent control system for a therapeutic face mask, characterized in that, The intelligent control system includes: a mobile application terminal and a web server terminal; The mobile application is connected to the controller of the treatment mask, and the mobile application is also connected to the web server; The mobile application is used to capture images of the user's face. The web server is used to generate a control strategy for each LED light on the treatment mask using the intelligent control method according to any one of claims 1-18, and send the control strategy to the mobile application. The mobile application is also used to send the control strategy to the controller of the treatment mask, and to control each LED light on the treatment mask separately.
24. The intelligent control system for the therapeutic mask according to claim 23, characterized in that, The mobile application is also used to create user profiles for users to view historical treatment records. The historical treatment records include facial images, multiple superimposed images, and analysis reports used each time the treatment mask is controlled for treatment. The analysis reports include the severity scores of different facial defects and the overall score of the user's skin each time the treatment mask is controlled for treatment.
25. The intelligent control system for the therapeutic mask according to claim 23 or 24, characterized in that, The mobile application also provides options for users to select the type of defect they wish to treat or to cancel the type of defect they wish to ignore.