High-frequency electromagnetic wave emission control method, device, equipment and storage medium
By obtaining the area image of the skin contact with the high-frequency electromagnetic wave radiation device in real time, using the user's skin detection model to extract the skin area type and damage level characteristics, and combining the electromagnetic wave frequency database to determine the repair frequency, the problem of ignoring skin differences in the existing technology is solved, and the precise skin repair of high-frequency electromagnetic wave radiation devices is achieved.
Patent Information
- Application Number
- CN202211364816.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-02
- Publication Date
- 2025-07-22
- Estimated Expiration
- 2042-11-02
AI Technical Summary
Existing high-frequency electromagnetic wave radiation equipment ignores the differences in different skin areas and damage levels during skin repair, resulting in poor functionality.
By obtaining the area image of the skin contact with the high-frequency electromagnetic wave radiation device in real time, using the user's skin detection model to extract the skin area type and damage level characteristics, and combining the electromagnetic wave frequency database to determine the targeted repair frequency for electromagnetic wave emission.
It realizes the precise adjustment of high-frequency electromagnetic wave frequency according to the skin area type and damage level, and improves the effect and functionality of skin repair.
Smart Images

Figure CN115634377B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to artificial intelligence technology, and particularly to a high-frequency electromagnetic wave radiation control method, device, equipment and storage medium. Background Art
[0002] A beauty instrument is a high-frequency electromagnetic wave radiation device, which mainly radiates high-frequency electromagnetic waves to the skin through high-frequency electromagnetic wave radiation control to stimulate the self-repair function of the skin and achieve the purpose of skin repair. However, the current high-frequency electromagnetic wave radiation control method ignores the differences in the tolerance of different skins to electromagnetic waves and can only emit high-frequency electromagnetic waves to the skin at a specific frequency, resulting in poor functionality of high-frequency electromagnetic wave radiation control. Summary of the Invention
[0003] The present invention provides a high-frequency electromagnetic wave radiation control method, device, electronic equipment and storage medium, and its main purpose is to improve the functionality of high-frequency electromagnetic wave radiation control.
[0004] When it is detected that the high-frequency electromagnetic wave radiation device touches the user's skin, the regional image of the user's skin touched by the high-frequency electromagnetic wave radiation device is obtained in real time;
[0005] Obtain a user skin detection model trained based on a pre-constructed skin image training set, wherein the user skin detection model includes a feature encoder, a skin region type decoder, and a skin damage level decoder, and the feature encoder is respectively connected in series with the skin region type decoder and the skin damage level decoder;
[0006] Use the user skin detection model to convert the regional image into an image matrix, and use the feature encoder to extract features from the image matrix to obtain a basic skin feature vector;
[0007] Use the first attention network in the skin region type decoder to extract skin region type features from the image matrix to obtain a first feature vector;
[0008] Use the second attention network in the skin damage level decoder to extract skin damage features from the image matrix to obtain a second feature vector;
[0009] Combine the first feature vector with the basic skin feature vector to obtain a regional feature vector, and combine the second feature vector with the basic skin feature vector to obtain a damage feature vector;
[0010] Classify the regional feature vector based on the skin region type decoder to obtain the skin region type, and classify the damage feature vector based on the skin damage level decoder to obtain the skin damage level;
[0011] Perform data analysis based on a preset electromagnetic wave frequency database to determine the repair frequency corresponding to the skin area type and the skin damage level;
[0012] Control the high-frequency electromagnetic wave emitting device to emit corresponding high-frequency electromagnetic waves to the user's skin according to the repair frequency.
[0013] Optionally, the performing data analysis based on a preset electromagnetic wave frequency database to determine the repair frequency corresponding to the skin area type and the skin damage level includes:
[0014] Construct a query command based on an SQL statement with the skin area class as the query condition;
[0015] Execute the query command to query the electromagnetic wave frequency range corresponding to the skin area type in the electromagnetic wave frequency database;
[0016] Obtain the damage weight corresponding to the skin damage level;
[0017] Perform weighted calculation using the damage weight, the left endpoint of the electromagnetic wave frequency range, and the range length to obtain the repair frequency.
[0018] Optionally, the extracting skin area type features from the image matrix using the first attention network in the skin area type decoder to obtain a first feature vector includes:
[0019] Perform global pooling on the image matrix using the fully connected layer in the first attention mechanism network to obtain a pooled skin feature vector;
[0020] Obtain the weights and biases of the fully connected layer in the first attention mechanism network, and calculate the type attention weights based on a preset activation function and the obtained weights and biases for the pooled skin feature vector;
[0021] Perform weighted calculation using the type attention weights and the image matrix to obtain the first feature vector.
[0022] Optionally, the converting the regional image into an image matrix using the user skin detection model includes:
[0023] Use the user skin detection model to obtain the pixel positions of each pixel point in the regional image;
[0024] Take the color feature values of each rgb color channel of each pixel point in the regional image as the elements at the same matrix position as the pixel position of the pixel point in a preset blank matrix to obtain a channel matrix of the rgb color channel;
[0025] Concatenate all the channel matrices in the preset rgb color channel order to obtain the image matrix.
[0026] Optionally, the feature extraction of the image matrix by using the feature encoder to obtain the basic skin feature vector includes:
[0027] Perform convolution pooling on the image matrix by using the feature encoder for a preset number of times to obtain a skin feature matrix;
[0028] Perform weighted calculation on each column in the skin feature matrix by using a pre-constructed weighting function to obtain a weighted skin feature matrix;
[0029] Perform dimensionality reduction on the weighted skin feature matrix to obtain the basic skin feature vector.
[0030] Optionally, the extraction of skin damage features from the image matrix by using the second attention network in the skin damage level decoder to obtain a second feature vector includes:
[0031] Perform average pooling on the image matrix by using the first pooling layer in the second attention mechanism network to obtain an average pooling skin feature vector;
[0032] Perform max pooling on the image matrix by using the second pooling layer in the second attention mechanism network to obtain a max pooling skin feature vector;
[0033] Perform non-linear activation on the average pooling skin feature vector by using a multi-layer perceptron to obtain a first activation feature vector;
[0034] Perform non-linear activation on the max pooling skin feature vector by using a multi-layer perceptron to obtain a second activation feature vector;
[0035] Fuse the first activation feature vector and the second activation feature vector to obtain a fused feature vector;
[0036] Perform normalization calculation on the fused feature vector by using a preset normalization function to obtain a damage attention weight;
[0037] Perform weighted calculation by using the damage attention weight and the image matrix to obtain the second feature vector.
[0038] Optionally, the classification of the region feature vector based on the skin region type decoder to obtain the skin region type includes:
[0039] Input the region feature vector into the softmax function in the skin region type decoder for calculation to obtain the first recognition probabilities of different preset region types;
[0040] Determine the region type corresponding to the maximum of the first recognition probabilities as the skin region type.
[0041] To solve the above problems, the present invention further provides a high-frequency electromagnetic wave emission control device, which includes:
[0042] A feature extraction module, configured to, when detecting that a high-frequency electromagnetic wave emission device comes into contact with a user's skin, obtain in real time a regional image of the user's skin contacted by the high-frequency electromagnetic wave emission device; obtain a user skin detection model trained based on a pre-constructed skin image training set, wherein the user skin detection model includes a feature encoder, a skin region type decoder, and a skin damage level decoder, and the feature encoder is respectively connected in series with the skin region type decoder and the skin damage level decoder; use the user skin detection model to convert the regional image into an image matrix, and use the feature encoder to extract features from the image matrix to obtain a basic skin feature vector; use a first attention network in the skin region type decoder to extract skin region type features from the image matrix to obtain a first feature vector; use a second attention network in the skin damage level decoder to extract skin damage features from the image matrix to obtain a second feature vector; combine the first feature vector with the basic skin feature vector to obtain a regional feature vector, and combine the second feature vector with the basic skin feature vector to obtain a damage feature vector;
[0043] A frequency calculation module, configured to classify the regional feature vector based on the skin region type decoder to obtain a skin region type, and classify the damage feature vector based on the skin damage level decoder to obtain a skin damage level; perform data analysis based on a preset electromagnetic wave frequency database to determine a repair frequency corresponding to the skin region type and the skin damage level;
[0044] An electromagnetic wave emission module, configured to control the high-frequency electromagnetic wave emission device to emit corresponding high-frequency electromagnetic waves to the user's skin according to the repair frequency.
[0045] To solve the above problems, the present invention further provides an electronic device, which includes:
[0046] A memory, storing at least one computer program; and
[0047] A processor, configured to execute the computer program stored in the memory to implement the above-mentioned high-frequency electromagnetic wave emission control method.
[0048] To solve the above problems, the present invention further provides a computer-readable storage medium, in which at least one computer program is stored, and the at least one computer program is executed by a processor in an electronic device to implement the high-frequency electromagnetic wave radiation control method described above.
[0049] In an embodiment of the present invention, the skin area type decoder is used to classify the area feature vector to obtain the skin area type, and the skin damage level decoder is used to classify the damage feature vector to obtain the skin damage level; data analysis is performed based on a preset electromagnetic wave frequency database to determine the repair frequency corresponding to the skin area type and the skin damage level; the high-frequency electromagnetic wave radiation device is controlled to emit corresponding high-frequency electromagnetic waves to the user's skin according to the repair frequency. By analyzing the area image of the user's skin contacted by the high-frequency electromagnetic wave radiation device, the skin area type and damage level of the user's skin contacted by the high-frequency electromagnetic wave radiation device are judged, and then corresponding high-frequency electromagnetic waves are emitted to the user's skin according to the skin area type and damage level, taking into account the differences in the tolerance of different areas and damaged skin to electromagnetic waves, better stimulating the skin to repair itself, and improving the functionality of high-frequency electromagnetic wave radiation control. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 It is a schematic flow chart of a high-frequency electromagnetic wave radiation control method provided by an embodiment of the present invention;
[0051] Figure 2 It is a schematic module diagram of a high-frequency electromagnetic wave radiation control device provided by an embodiment of the present invention;
[0052] Figure 3 It is a schematic internal structure diagram of an electronic device for implementing a high-frequency electromagnetic wave radiation control method provided by an embodiment of the present invention;
[0053] The realization, functional characteristics and advantages of the object of the present invention will be further described with reference to the embodiments and the accompanying drawings. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0054] It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0055] An embodiment of the present invention provides a method for controlling high-frequency electromagnetic wave radiation. The execution subject of the high-frequency electromagnetic wave radiation control method includes, but is not limited to, at least one of electronic devices such as a server, a terminal, etc. that can be configured to execute the method provided in the embodiments of the present application. In other words, the high-frequency electromagnetic wave radiation control method can be executed by software or hardware installed on a terminal device or a server device, and the software can be a blockchain platform. The server includes, but is not limited to: a single server, a server cluster, a cloud server, or a cloud server cluster, etc. The server can be an independent server or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, Content Delivery Network (CDN), and big data and artificial intelligence platforms.
[0056] Referring to Figure 1 the flowchart of the high-frequency electromagnetic wave radiation control method provided by an embodiment of the present invention shown in the figure, in the embodiment of the present invention, the high-frequency electromagnetic wave radiation control method includes:
[0057] S1. When it is detected that the high-frequency electromagnetic wave radiation device touches the user's skin, obtain the regional image of the user's skin touched by the high-frequency electromagnetic wave radiation device in real time;
[0058] In the embodiment of the present invention, the high-frequency electromagnetic wave radiation device can be a beauty instrument that can emit high-frequency electromagnetic waves to repair the user's skin.
[0059] Due to the differences in the tolerance of different skin regions to electromagnetic waves and the different skin damage levels, the repair frequencies of the high-frequency electromagnetic waves emitted by the beauty instrument are also different. Therefore, it is necessary to evaluate the skin region type and the corresponding skin damage level of the skin region touched by the beauty instrument, so as to achieve the purpose of different skin regions touched by the beauty instrument and perform targeted high-frequency electromagnetic wave emission. In the embodiment of the present invention, the evaluation is performed through the regional image of the user's skin touched by the beauty instrument, and the regional image can be obtained through an imaging tool carried by the high-frequency electromagnetic wave radiation device, such as: a macro camera, an infrared imaging sensor, an ultrasonic imaging sensor, etc. The embodiment of the present invention does not specifically limit the type of the imaging tool.
[0060] S2. Obtain a user skin detection model trained based on a pre-constructed skin image training set, where the user skin detection model includes a feature encoder, a skin region type decoder, and a skin damage level decoder, and the feature encoder is respectively connected in series with the skin region type decoder and the skin damage level decoder;
[0061] In the embodiment of the present invention, the user skin detection model is a multi-task processor trained using the skin image training set, which can identify the skin area type and skin damage level corresponding to the skin based on the skin image. By implementing two types of detection results through a single model, the speed of subsequent high-frequency electromagnetic wave repair frequency calculation is improved.
[0062] In the embodiment of the present invention, each skin image in the skin image training set is labeled with a skin area type label and a skin damage level label. Among them, the skin area type label is a mark for labeling the skin area type of the skin corresponding to the skin image, which can be: face, neck, body, etc.; the skin damage level label is a mark for labeling the skin damage degree of the skin corresponding to the skin image, which can be mild, moderate, severe, etc.
[0063] Furthermore, in the embodiment of the present invention, the user skin detection model includes a feature encoder, a skin area type decoder, and a skin damage level decoder. The feature encoder is respectively connected in series with the skin area type decoder and the skin damage level decoder. Among them, the feature encoder contains network parameters shared for skin area type recognition and skin damage level recognition, the skin area type decoder contains parameters unique to skin area type recognition, and the skin damage level decoder contains parameters unique to skin damage level recognition.
[0064] S3. Use the user skin detection model to convert the region image into an image matrix, and use the feature encoder to extract features from the image matrix to obtain a basic skin feature vector;
[0065] In the embodiment of the present invention, in order to better extract the features of the region image, the user skin detection model is used to convert the image into a vector form to obtain the image matrix.
[0066] Specifically, in the embodiment of the present invention, the use of the user skin detection model to convert the region image into an image matrix includes:
[0067] Convert the region image into a grayscale image;
[0068] Use the user skin detection model to combine the grayscale values of all pixels in each column of the grayscale image to obtain the image matrix.
[0069] Furthermore, in another embodiment of the present invention, the use of the user skin detection model to convert the region image into an image matrix includes:
[0070] Use the user skin detection model to obtain the pixel position of each pixel point in the region image;
[0071] Taking the color feature value corresponding to each RGB color channel of each pixel point in the regional image as the element at the matrix position in the preset blank matrix that is the same as the pixel position of the pixel point, to obtain the channel matrix of each RGB color channel;
[0072] For example: if the color feature value of the red channel of the pixel point in the first row and first column of the regional image is 5, then taking 5 as the element in the first row and first column of the blank matrix, that is, the element value in the first row and first column of the channel matrix of the red channel is 5.
[0073] Splicing all the channel matrices in the preset RGB color channel order to obtain the image matrix.
[0074] Since the RGB color channels include three types: red, green, and blue, therefore, in the present invention, the channel matrices corresponding to the three RGB color channels are spliced in the preset RGB color channel order, such as splicing in the channel order of red, green, and blue, to obtain the image matrix.
[0075] Further, in the embodiment of the present invention, the using the feature encoder to extract features from the image matrix to obtain the basic skin feature vector includes:
[0076] Step A: Using the feature encoder to perform convolution pooling on the image matrix for a preset number of times to obtain a skin feature matrix;
[0077] Specifically, in the embodiment of the present invention, the convolution pooling of the image matrix can be implemented by using the feature extraction network including a convolutional layer and a pooling layer in the feature encoder, wherein the convolutional layer and the pooling layer in the feature extraction network are connected in series in a preset order, and the total number of times of the convolutional layer and the pooling layer is the preset number of times.
[0078] Step B: Using a pre-constructed weighting function to perform weighted calculation on each column in the skin feature matrix to obtain a weighted skin feature matrix;
[0079]
[0080] Wherein, is the element in the th column of the skin feature matrix; N is the total number of columns in the skin feature matrix; is a multi-layer perceptron, and are the results output after the th column in the skin feature matrix is input into the multi-layer perceptron, r is the element in the weighted skin feature matrix, and e is a constant.
[0081] Step C: Perform a dimensionality reduction operation on the weighted skin feature matrix to obtain the basic skin feature vector.
[0082] Specifically, in the embodiments of the present invention, each column in the weighted skin feature matrix can be connected end to end in sequence according to the column order to obtain the basic skin feature vector.
[0083] In another embodiment of the present invention, the dimensionality reduction operation on the weighted skin feature matrix to obtain the basic skin feature vector includes:
[0084] Extract the elements of a preset type in each column of the weighted skin feature matrix to obtain the eigenvalue of this column;
[0085] Connect all the eigenvalues in the weighted skin feature matrix in the order of the corresponding columns to obtain the basic skin feature vector.
[0086] In the embodiments of the present invention, the preset type can be the maximum value, median, etc., and the embodiments of the present invention do not limit the preset type.
[0087] In another embodiment of the present invention, it is also possible to calculate based on all the elements in each column of the weighted skin feature matrix to obtain the eigenvalue of this column. For example, the average value of all the elements in each column of the weighted skin feature matrix can be calculated as the eigenvalue of this column.
[0088] S4. Use the first attention network in the skin area type decoder to extract the skin area type features from the image matrix to obtain the first feature vector;
[0089] Specifically, in the embodiments of the present invention, the use of the first attention network in the skin damage level decoder to extract the skin area type features from the image matrix to obtain the first feature vector includes:
[0090] Use the fully connected layer in the first attention mechanism network to perform global pooling on the image matrix to obtain the pooled skin feature vector;
[0091] Obtain the weights and biases of the fully connected layer in the first attention mechanism network, and calculate the pooled skin feature vector based on the preset activation function and the obtained weights and biases to obtain the type attention weights;
[0092] Use the type attention weights and the image matrix for weighted calculation to obtain the first feature vector.
[0093] Specifically, in the embodiments of the present invention, the product of the type attention weights and the image matrix is calculated to obtain the first feature vector.
[0094] S5. Use the second attention network in the skin damage level decoder to extract skin damage features from the image matrix to obtain a second feature vector;
[0095] Specifically, in the embodiment of the present invention, the use of the second attention network in the skin area level decoder to extract skin damage features from the image matrix to obtain a second feature vector includes:
[0096] Use the first pooling layer in the second attention mechanism network to perform average pooling on the image matrix to obtain an average pooled skin feature vector;
[0097] Use the second pooling layer in the second attention mechanism network to perform max pooling on the image matrix to obtain a max pooled skin feature vector;
[0098] Use a multi-layer perceptron to perform non-linear activation on the average pooled skin feature vector to obtain a first activation feature vector;
[0099] Specifically, in the embodiment of the present invention, the average pooled skin feature vector is input into a multi-layer perceptron to perform non-linear activation on the average pooled skin feature vector.
[0100] Use a multi-layer perceptron to perform non-linear activation on the max pooled skin feature vector to obtain a second activation feature vector;
[0101] Fuse the first activation feature vector and the second activation feature vector to obtain a fused feature vector;
[0102] Specifically, in the embodiment of the present invention, the first activation feature vector and the second activation feature vector can be added or concatenated to achieve fusion to obtain the fused feature vector.
[0103] Use a preset normalization function to perform normalization calculation on the fused feature vector to obtain a damage attention weight;
[0104] Specifically, the normalization function in the embodiment of the present invention can be a Sigmoid function, and the specific type of the normalization function in the embodiment of the present invention is not limited.
[0105] Use the damage attention weight and the image matrix to perform weighted calculation to obtain the second feature vector.
[0106] S6. Combine the first feature vector and the basic skin feature vector to obtain a region feature vector, and combine the second feature vector and the basic skin feature vector to obtain a damage feature vector;
[0107] In the embodiment of the present invention, the first feature vector and the basic skin feature vector are combined to obtain a region feature vector, including:
[0108] The first feature vector and the basic skin feature vector are connected end to end to obtain the region feature vector.
[0109] Similarly, in the embodiment of the present invention, the method of combining the second feature vector and the basic skin feature vector is similar to the method of combining the first feature vector and the basic skin feature vector, and will not be elaborated here.
[0110] S7. Classify the region feature vector based on the skin region type decoder to obtain the skin region type, and classify the damage feature vector based on the skin damage level decoder to obtain the skin damage level;
[0111] Specifically, in the embodiment of the present invention, classifying the region feature vector based on the skin region type decoder to obtain the skin region type includes:
[0112] Input the region feature vector into the softmax function in the skin region type decoder for calculation to obtain the first recognition probabilities of different preset region types;
[0113] Determine the region type corresponding to the maximum first recognition probability as the skin region type.
[0114] Further, in the embodiment of the present invention, classifying the damage feature vector based on the skin damage level decoder to obtain the skin damage level includes:
[0115] Input the damage feature vector into the softmax function in the skin damage level decoder for calculation to obtain the second recognition probabilities of different preset levels;
[0116] Determine the level corresponding to the maximum second recognition probability as the skin damage level.
[0117] S8. Perform data analysis based on a preset electromagnetic wave frequency database to determine the repair frequency corresponding to the skin region type and the skin damage level;
[0118] In the embodiment of the present invention, the electromagnetic wave frequency database contains electromagnetic wave frequency intervals corresponding to different skin region types. Each skin region type has its own corresponding electromagnetic wave frequency interval. Since the electromagnetic wave frequency interval is only the interval of high-frequency electromagnetic waves suitable for the skin of the corresponding skin region type and is still a range, it is necessary to further confirm which electromagnetic frequency in the electromagnetic wave frequency interval is the frequency of the high-frequency electromagnetic wave that the beauty device finally needs to emit.
[0119] Specifically, in the embodiments of the present invention, data analysis is performed based on a preset electromagnetic wave frequency database to determine the repair frequency corresponding to the skin area type and the skin damage level, including:
[0120] Construct a query command based on the SQL statement with the skin area type as the query condition;
[0121] Execute the query command to query the electromagnetic wave frequency range corresponding to the skin area type in the electromagnetic wave frequency database;
[0122] Obtain the damage weight corresponding to the skin damage level;
[0123] In the embodiments of the present invention, the damage weight is a preset real number with a value range in the interval [0, 1].
[0124] Perform weighted calculation using the damage weight, the left endpoint of the electromagnetic wave frequency range, and the range length to obtain the repair frequency.
[0125] Specifically, in the embodiments of the present invention, calculate the product of the range length and the damage weight to obtain a repair parameter; calculate the sum of the left endpoint and the repair parameter to obtain the repair frequency.
[0126] S9. Control the high-frequency electromagnetic wave emitting device to emit corresponding high-frequency electromagnetic waves to the user's skin according to the repair frequency.
[0127] In the embodiments of the present invention, the high-frequency electromagnetic wave emitting device can emit high-frequency electromagnetic waves of different frequencies. In the embodiments of the present invention, the high-frequency electromagnetic wave emitting device is used to emit high-frequency electromagnetic waves with a frequency of the repair frequency to the user's skin area until the high-frequency electromagnetic wave emitting device no longer contacts the user's skin, so as to realize the precise adjustment of high-frequency electromagnetic waves according to the area and skin damage of the skin contacted by the high-frequency electromagnetic wave emitting device, thereby improving the functionality of high-frequency electromagnetic wave emission control.
[0128] As Figure 2 shown, it is a functional module diagram of the high-frequency electromagnetic wave emission control device of the present invention.
[0129] The high-frequency electromagnetic wave emission control device 100 of the present invention can be installed in an electronic device. According to the functions achieved, the high-frequency electromagnetic wave emission control device may include an image segmentation module 101, an edge detection module 102, and a coordinate mapping module 103. The modules of the present invention can also be referred to as units, which refer to a series of computer program segments that can be executed by an electronic device processor and can complete fixed functions, and are stored in the memory of the electronic device.
[0130] In this embodiment, the functions of each module / unit are as follows:
[0131] The feature extraction module 101 is used to, when detecting that the high-frequency electromagnetic wave emitting device touches the user's skin, acquire the regional image of the user's skin touched by the high-frequency electromagnetic wave emitting device in real time; acquire a user skin detection model trained based on a pre-constructed skin image training set, where the user skin detection model includes a feature encoder, a skin region type decoder, and a skin damage level decoder, and the feature encoder is respectively connected in series with the skin region type decoder and the skin damage level decoder; use the user skin detection model to convert the regional image into an image matrix, and use the feature encoder to extract features from the image matrix to obtain a basic skin feature vector; use a first attention network in the skin region type decoder to extract skin region type features from the image matrix to obtain a first feature vector; use a second attention network in the skin damage level decoder to extract skin damage features from the image matrix to obtain a second feature vector; combine the first feature vector with the basic skin feature vector to obtain a regional feature vector, and combine the second feature vector with the basic skin feature vector to obtain a damage feature vector;
[0132] The frequency calculation module 102 is used to classify the regional feature vector based on the skin region type decoder to obtain a skin region type, and classify the damage feature vector based on the skin damage level decoder to obtain a skin damage level; perform data analysis based on a preset electromagnetic wave frequency database to determine a repair frequency corresponding to the skin region type and the skin damage level;
[0133] The electromagnetic wave emission module 103 is used to control the high-frequency electromagnetic wave emitting device to emit corresponding high-frequency electromagnetic waves to the user's skin according to the repair frequency.
[0134] Specifically, each module in the high-frequency electromagnetic wave emission control device 100 in the embodiment of the present invention adopts the same technical means as those Figure 1 described in the above-mentioned high-frequency electromagnetic wave emission control method, and can produce the same technical effects, which will not be elaborated here.
[0135] As Figure 3 shown, it is a schematic structural diagram of an electronic device for implementing the high-frequency electromagnetic wave emission control method of the present invention.
[0136] The electronic device may include a processor 10, a memory 11, a communication bus 12, and a communication interface 13, and may further include a computer program stored in the memory 11 and executable on the processor 10, such as a high-frequency electromagnetic wave emission control program.
[0137] Among them, the memory 11 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, mobile hard disk, multimedia card, card-type memory (such as SD or DX memory, etc.), magnetic memory, magnetic disk, optical disc, etc. In some embodiments, the memory 11 may be an internal storage unit of the electronic device, such as the mobile hard disk of the electronic device. In some other embodiments, the memory 11 may also be an external storage device of the electronic device, such as a plug-in mobile hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, etc. equipped on the electronic device. Further, the memory 11 may also include both an internal storage unit and an external storage device of the electronic device. The memory 11 can be used not only to store application software installed in the electronic device and various types of data, such as the code of the high-frequency electromagnetic wave radiation control program, etc., but also to temporarily store data that has been output or will be output.
[0138] In some embodiments, the processor 10 may be composed of integrated circuits. For example, it may be composed of a single packaged integrated circuit, or may be composed of multiple integrated circuits with the same or different functions packaged, including a combination of one or more Central Processing Units (CPUs), microprocessors, digital processing chips, graphics processors, and various control chips, etc. The processor 10 is the control core (Control Unit) of the electronic device, connecting various components of the entire electronic device through various interfaces and lines, and by running or executing programs or modules (such as the high-frequency electromagnetic wave radiation control program, etc.) stored in the memory 11, and calling the data stored in the memory 11, to execute various functions of the electronic device and process data.
[0139] The communication bus 12 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This bus can be divided into an address bus, a data bus, a control bus, etc. The communication bus 12 is set to realize the connection and communication between the memory 11 and at least one processor 10, etc. For the sake of representation, only a thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0140] Figure 3 Only the electronic device with components is shown. Those skilled in the art can understand thatFigure 3 The structure shown does not constitute a limitation on the electronic device, and may include fewer or more components than shown, or combine certain components, or have a different component arrangement.
[0141] For example, although not shown, the electronic device may further include a power source (such as a battery) for supplying power to each component. Preferably, the power source may be logically connected to the at least one processor 10 through a power management device, so as to implement functions such as charging management, discharging management, and power consumption management through the power management device. The power source may also include any components such as one or more DC or AC power sources, a recharge device, a power failure classification circuit, a power converter or inverter, a power status indicator, etc. The electronic device may also include a variety of sensors, a Bluetooth module, a Wi-Fi module, etc., which will not be elaborated here.
[0142] Optionally, the communication interface 13 may include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), and is generally used to establish a communication connection between this electronic device and other electronic devices.
[0143] Optionally, the communication interface 13 may further include a user interface. The user interface may be a display (Display), an input unit (such as a keyboard (Keyboard)). Optionally, the user interface may also be a standard wired interface or a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch liquid crystal display, and an OLED (Organic Light-Emitting Diode) toucher, etc. Among them, the display may also be appropriately referred to as a display screen or a display unit, and is used to display the information processed in the electronic device and to display a visual user interface.
[0144] It should be understood that the above embodiments are only for illustration purposes and are not limited by this structure in the scope of the patent application.
[0145] The high-frequency electromagnetic wave radiation control program stored in the memory 11 of the electronic device is a combination of multiple computer programs. When running in the processor 10, it can implement:
[0146] When it is detected that the high-frequency electromagnetic wave radiation device touches the user's skin, the regional image of the user's skin touched by the high-frequency electromagnetic wave radiation device is obtained in real time;
[0147] Obtain a user skin detection model trained based on a pre-constructed skin image training set. Among them, the user skin detection model includes a feature encoder, a skin region type decoder, and a skin damage level decoder, and the feature encoder is respectively connected in series with the skin region type decoder and the skin damage level decoder;
[0148] Use the user skin detection model to convert the regional image into an image matrix, and use the feature encoder to extract features from the image matrix to obtain a basic skin feature vector;
[0149] Use the first attention network in the skin region type decoder to extract skin region type features from the image matrix to obtain a first feature vector;
[0150] Use the second attention network in the skin damage level decoder to extract skin damage features from the image matrix to obtain a second feature vector;
[0151] Combine the first feature vector with the basic skin feature vector to obtain a regional feature vector, and combine the second feature vector with the basic skin feature vector to obtain a damage feature vector;
[0152] Classify the regional feature vector based on the skin region type decoder to obtain the skin region type, and classify the damage feature vector based on the skin damage level decoder to obtain the skin damage level;
[0153] Perform data analysis based on a preset electromagnetic wave frequency database to determine the repair frequency corresponding to the skin region type and the skin damage level;
[0154] Control the high-frequency electromagnetic wave emitting device to emit corresponding high-frequency electromagnetic waves to the user's skin according to the repair frequency.
[0155] Specifically, for the specific implementation method of the above computer program by the processor 10, reference can be made to Figure 1 the description of the relevant steps in the corresponding embodiment, which will not be elaborated here.
[0156] Furthermore, if the modules / units integrated in the electronic device are implemented in the form of software functional units and sold or used as independent tourism products, they can be stored in a computer-readable storage medium. The computer-readable medium can be non-volatile or volatile. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disc, computer memory, read-only memory (ROM, Read-Only Memory).
[0157] An embodiment of the present invention can also provide a computer-readable storage medium, and the readable storage medium stores a computer program, and when the computer program is executed by a processor of an electronic device, it can implement:
[0158] When it is detected that a high-frequency electromagnetic wave emitting device comes into contact with the user's skin, obtain in real time the regional image of the user's skin contacted by the high-frequency electromagnetic wave emitting device;
[0159] Obtain a user skin detection model trained based on a pre-constructed skin image training set, wherein the user skin detection model includes a feature encoder, a skin region type decoder, and a skin damage level decoder, and the feature encoder is respectively connected in series with the skin region type decoder and the skin damage level decoder;
[0160] Use the user skin detection model to convert the regional image into an image matrix, and use the feature encoder to perform feature extraction on the image matrix to obtain a basic skin feature vector;
[0161] Use the first attention network in the skin region type decoder to extract skin region type features from the image matrix to obtain a first feature vector;
[0162] Use the second attention network in the skin damage level decoder to extract skin damage features from the image matrix to obtain a second feature vector;
[0163] Combine the first feature vector with the basic skin feature vector to obtain a regional feature vector, and combine the second feature vector with the basic skin feature vector to obtain a damage feature vector;
[0164] Classify the regional feature vector based on the skin region type decoder to obtain the skin region type, and classify the damage feature vector based on the skin damage level decoder to obtain the skin damage level;
[0165] Perform data analysis based on a preset electromagnetic wave frequency database to determine the repair frequency corresponding to the skin region type and the skin damage level;
[0166] Control the high-frequency electromagnetic wave emitting device to emit corresponding high-frequency electromagnetic waves to the user's skin according to the repair frequency.
[0167] Furthermore, the computer-usable storage medium may mainly include a storage program area and a storage data area. Among them, the storage program area may store an operating system, application programs required for at least one function, etc.; the storage data area may store data created according to the use of blockchain nodes, etc.
[0168] In several embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.
[0169] The module described as a separation component may or may not be physically separated. The component shown as a module may or may not be a physical unit, that is, it may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0170] The embodiments of this application can acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is the theory, method, technology, and application system that uses a digital computer or a machine controlled by a digital computer to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use knowledge to obtain the best results.
[0171] In addition, in each embodiment of the present invention, the functional modules can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above integrated unit can be implemented in the form of hardware or in the form of a combination of hardware and software functional modules.
[0172] For those skilled in the art, it is obvious that the present invention is not limited to the details of the above exemplary embodiments, and without departing from the spirit or basic characteristics of the present invention, the present invention can be implemented in other specific forms.
[0173] Therefore, from any point of view, the embodiments should be regarded as exemplary and non-limiting. The scope of the present invention is defined by the appended claims rather than the above description. Therefore, all changes falling within the meaning and scope of the equivalent elements of the claims are intended to be included in the present invention. Any associated drawing marks in the claims should not be regarded as limiting the claimed rights.
[0174] In addition, it is obvious that the word "including" does not exclude other units or steps, and the singular does not exclude the plural. The multiple units or devices stated in the system claims can also be implemented by one unit or device through software or hardware. Words such as "second" are used to denote names and do not denote any particular order.
[0175] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not restrictive. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present invention can be modified or equivalently replaced without departing from the spirit and scope of the technical solutions of the present invention.
Claims
1. A high-frequency electromagnetic wave emission control device, characterized in that, The device includes: A feature extraction module, configured to, when detecting that a high-frequency electromagnetic wave emitting device touches the user's skin, acquire in real time an area image of the user's skin touched by the high-frequency electromagnetic wave emitting device; Obtain a user skin detection model trained based on a pre-constructed skin image training set, wherein the user skin detection model includes a feature encoder, a skin area type decoder, and a skin damage level decoder, and the feature encoder is respectively connected in series with the skin area type decoder and the skin damage level decoder; Use the user skin detection model to convert the area image into an image matrix, and use the feature encoder to perform feature extraction on the image matrix to obtain a basic skin feature vector; Use a first attention network in the skin area type decoder to extract skin area type features from the image matrix to obtain a first feature vector; Use a second attention network in the skin damage level decoder to extract skin damage features from the image matrix to obtain a second feature vector; Combine the first feature vector with the basic skin feature vector to obtain an area feature vector, and combine the second feature vector with the basic skin feature vector to obtain a damage feature vector; A frequency calculation module, configured to classify the area feature vector based on the skin area type decoder to obtain a skin area type, and classify the damage feature vector based on the skin damage level decoder to obtain a skin damage level; Perform data analysis based on a preset electromagnetic wave frequency database to determine a repair frequency corresponding to the skin area type and the skin damage level; An electromagnetic wave emission module, configured to control the high-frequency electromagnetic wave emitting device to emit corresponding high-frequency electromagnetic waves to the user's skin according to the repair frequency.
2. An electronic device, characterized in that, The electronic device includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, and when the computer program is executed by the at least one processor, the at least one processor is enabled to execute a high-frequency electromagnetic wave emission control method, including: When detecting that a high-frequency electromagnetic wave emitting device touches the user's skin, acquire in real time an area image of the user's skin touched by the high-frequency electromagnetic wave emitting device; Obtain a user skin detection model trained based on a pre-constructed skin image training set, wherein the user skin detection model includes a feature encoder, a skin area type decoder, and a skin damage level decoder, and the feature encoder is respectively connected in series with the skin area type decoder and the skin damage level decoder; Use the user skin detection model to convert the area image into an image matrix, and use the feature encoder to perform feature extraction on the image matrix to obtain a basic skin feature vector; Use a first attention network in the skin area type decoder to extract skin area type features from the image matrix to obtain a first feature vector; Extract skin damage features from the image matrix using the second attention network in the skin damage level decoder to obtain a second feature vector; Combine the first feature vector with the basic skin feature vector to obtain a regional feature vector, and combine the second feature vector with the basic skin feature vector to obtain a damage feature vector; Classify the regional feature vector based on the skin region type decoder to obtain the skin region type, and classify the damage feature vector based on the skin damage level decoder to obtain the skin damage level; Perform data analysis based on a preset electromagnetic wave frequency database to determine the repair frequency corresponding to the skin region type and the skin damage level; Control the high-frequency electromagnetic wave emitting device to emit corresponding high-frequency electromagnetic waves to the user's skin according to the repair frequency.
3. The electronic device according to claim 2, characterized in that, The performing data analysis based on a preset electromagnetic wave frequency database to determine the repair frequency corresponding to the skin region type and the skin damage level includes: Construct a query command based on an SQL statement using the skin region type as a query condition; Execute the query command to query the electromagnetic wave frequency range corresponding to the skin region type in the electromagnetic wave frequency database; Obtain the damage weight corresponding to the skin damage level; Perform weighted calculation using the damage weight, the left endpoint of the electromagnetic wave frequency range, and the range length to obtain the repair frequency.
4. The electronic device according to claim 2, characterized in that, The extracting skin region type features from the image matrix using the first attention network in the skin region type decoder to obtain a first feature vector includes: Perform global pooling on the image matrix using the fully connected layer in the first attention network to obtain a pooled skin feature vector; Obtain the weights and biases of the fully connected layer in the first attention network, and calculate the type attention weight based on a preset activation function and the obtained weights and biases for the pooled skin feature vector; Perform weighted calculation using the type attention weight and the image matrix to obtain the first feature vector.
5. The electronic device according to claim 2, characterized in that, The converting the regional image into an image matrix using the user skin detection model includes: Obtain the pixel position of each pixel point in the regional image using the user skin detection model; Use the color feature value of each RGB color channel of each pixel point in the regional image as an element at the same matrix position as the pixel position of the pixel point in a preset blank matrix to obtain a channel matrix for the RGB color channel; Concatenate all the channel matrices in the preset RGB color channel order to obtain the image matrix.
6. The electronic device according to claim 2, characterized in that, The extracting basic skin feature vectors from the image matrix using the feature encoder includes: Perform convolution pooling on the image matrix a preset number of times using the feature encoder to obtain a skin feature matrix; Perform weighted calculation on each column in the skin feature matrix using a pre-constructed weighting function to obtain a weighted skin feature matrix; perform a dimensionality reduction operation on the weighted skin feature matrix to obtain the basic skin feature vector.
7. The electronic device according to claim 2, characterized in that, Extracting skin damage features from the image matrix by using the second attention network in the skin damage level decoder to obtain a second feature vector, including: Performing average pooling on the image matrix by using the first pooling layer in the second attention network to obtain an average pooled skin feature vector; Performing max pooling on the image matrix by using the second pooling layer in the second attention network to obtain a max pooled skin feature vector; Performing non-linear activation on the average pooled skin feature vector by using a multi-layer perceptron to obtain a first activation feature vector; Performing non-linear activation on the max pooled skin feature vector by using a multi-layer perceptron to obtain a second activation feature vector; Fusing the first activation feature vector and the second activation feature vector to obtain a fused feature vector; Performing normalization calculation on the fused feature vector by using a preset normalization function to obtain a damage attention weight; Performing weighted calculation by using the damage attention weight and the image matrix to obtain the second feature vector.
8. The electronic device according to any one of claims 2 to 7, characterized in that Classifying the region feature vector based on the skin region type decoder to obtain a skin region type, including: Inputting the region feature vector into the softmax function in the skin region type decoder for calculation to obtain first recognition probabilities of different preset region types; Determining the region type corresponding to the largest first recognition probability as the skin region type.
9. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor of an electronic device, the steps in the high-frequency electromagnetic wave radiation control method according to any one of claims 2 to 8 are implemented.
Citation Information
Patent Citations
Systems and methods for adaptive skin treatment
CN107427227A
Intelligent skin care method, device and equipment and storage medium
CN113610844A