Disclosure of Invention
In order to solve the above technical problems, the present invention provides a method for identifying an operation mode of a facial massager, comprising the following steps:
s1, generating a facial skin picture of a user by an image pickup system, and identifying a characteristic value of a skin state by an image analysis module;
S2, collecting various sensing data sets of the facial massager in different operation modes, and respectively clustering the various sensing data sets to form a mode mapping list;
S3, inputting the characteristic value of the skin state into a pattern recognition neural network model, and outputting optimal values of multiple types of sensing data;
And S4, inquiring the operation modes corresponding to the optimal values of the multi-class sensing data according to the mode mapping list, and identifying the optimal operation mode.
Further, the step S2 includes:
s21, setting a maximum area radius and a point threshold value for each type of sensing data set respectively;
S22, traversing all data in the sensing data set, and marking all data as clustering core points or contour points according to the maximum area radius and the point threshold;
S23, dividing the sensing data set according to the marking result to generate a plurality of final divided areas and data point sets in the areas.
Further, the method comprises the steps of performing preliminary segmentation on a sensing data set according to a marking result of the step S22 to obtain a plurality of preliminary segmentation areas, taking the average value from the clustering core points of all the preliminary segmentation areas to the maximum length of each contained point in the area as a cut-off length, determining boundary area point sets of every two preliminary segmentation areas based on the cut-off length, taking the average value of local densities of sub-point sets in all the boundary area point sets as a density critical value, and generating a plurality of final segmentation areas.
Further, in the step S3, the characteristic value { tx 1…txi …txn } of the skin state is input to the pattern recognition neural network model, n represents the number of the characteristic values of the skin state, and the output value of each neuron in the hidden layer of the pattern recognition neural network model is calculated:
;
;
Wherein s j represents the output intermediate value of the jth neuron of the hidden layer, The threshold value of the j-th neuron of the hidden layer is represented, b j represents the output value of the j-th neuron of the hidden layer, j=1, 2.
Further, in the step S3, the hidden layer output sequence { b 1,…bj ,…bp } is input to the output layer of the pattern recognition neural network model, and then the output of each neuron in the output layer is:
;
;
Where s k represents the output median of the kth neuron of the output layer, Representing the threshold value of the kth neuron of the output layer, y k represents the output value of the kth neuron of the output layer, p connection weights of the kth neuron of the output layer are { v k1…vkj …vkp }, k=1, 2.
Further, in the step S4, according to the overlapping condition of the data range of each type of sensing data and the data range of each type of sensing data in the pattern mapping list, a priority value F (c m) of each type of sensing data is determined:
;
wherein c m is the data range of the m-th type of sensing data in the mode mapping list, N is the number of the remaining sensing data types except the m-th type of sensing data and the sensing data types with determined priorities, and the function The number of data overlapping the data ranges c h and c m of the h-th and m-th sensing data, and D (c m) represents the difference between the maximum value and the minimum value in the data range of the m-th sensing data.
Further, in the step S4, in the step S22, if one data has at least Z data in the area with the maximum area radius R, the data is marked as a cluster core point, if one data has no other data in the area with the maximum area radius R, the data is marked as a noise point, and deleted, and if one data is located in the area with the maximum area radius R of the cluster core point, the data is marked as an inclusion point.
Further, the sensing data of the force sensor of the massage head also comprises sensing data of massage force, speed and frequency.
Further, the characteristic values of the skin state include erythema index, texture parameter, moisture content of the horny layer, and skin oil content.
Compared with the prior art, the invention has the following beneficial technical effects:
the method comprises the steps of generating a facial skin picture of a user through an image analysis module, identifying characteristic values of skin states of the user through the image analysis module, collecting various sensing data sets of the facial massager in different operation modes, clustering the various sensing data sets to form a mode mapping list, inputting the characteristic values of the skin states into a mode identification neural network model, outputting optimal values of various sensing data, inquiring the operation mode corresponding to the optimal values of the various sensing data according to the mode mapping list, and identifying the optimal operation mode. Compared with the massage method of the face massager in the prior art, the massage mode analysis process is quicker, the identified final massage mode corresponds to the skin state of the user accurately, and the massage operation mode of the face massager can be automatically identified according to the skin state of the user so as to achieve the optimal massage effect.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present application more apparent, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments of the present application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
In the drawings of the specific embodiments of the present invention, in order to better and more clearly describe the working principle of each element in the system, the connection relationship of each part in the device is represented, but only the relative positional relationship between each element is clearly distinguished, and the limitations on the signal transmission direction, connection sequence and the size, size and shape of each part in the element or structure cannot be constructed.
Example 1
Fig. 1 is a flow chart of a method for identifying an operation mode of the facial massager, which comprises the following steps:
S1, identifying a characteristic value of the skin state through an image analysis module according to a user facial skin picture generated by the image pickup system.
A large number of facial skin pictures of the user are collected, which should cover different skin types, conditions. The collected user facial skin pictures are subjected to standardized processing including clipping, scaling, rotation correction and the like, so that all pictures are ensured to have uniform formats and sizes.
And extracting characteristic values of the skin state from the skin picture after the standardized treatment, wherein the characteristic values comprise erythema index, texture parameters and the like.
In the preferred embodiment, the skin state can also be detected by combining a skin detector, the oil secretion state of the skin surface is detected, and the distribution state of the moisture of the stratum corneum at different depths is accurately analyzed by a microscope, so that the characteristic values of the moisture content of the stratum corneum, the skin oil content and the like are obtained.
In a preferred embodiment, other skin information (e.g., skin texture, age, sex, etc.) should be combined as other characteristic values of skin condition in addition to erythema index, texture parameters, stratum corneum moisture content, and skin oil content.
S2, collecting various sensing data sets of the face massager in different operation modes, and clustering the various sensing data sets respectively to form a mode mapping list.
The various sensing data include sensing data of force sensors for massaging the head, sensing data of posture sensors, and the like. The sensing data of the force sensor for massaging the head also comprises sensing data such as massage force, speed, frequency and the like.
And collecting various sensing data under different operation modes to form corresponding type sensing data sets, such as a massage frequency data set, a massage force data set and the like, and respectively performing cluster analysis on the various sensing data sets to form a mode mapping list.
As shown in fig. 2, clustering each type of sensing data set specifically includes the following steps:
s21, setting a maximum area radius R and a point threshold Z for each type of sensing data set.
S22, traversing all data in the sensing data set, and marking all data as clustering core points or contour points.
If a data has at least Z data in the area with the maximum area radius of R, the data is marked as a clustering core point, if a data has no other data in the area with the maximum area radius of R, the data is marked as a noise point and deleted, and if a data is in the area with the maximum area radius of R, the data can be contained by the clustering core point and marked as a containing point.
S23, dividing the sensing data set according to the marking result to generate a plurality of final divided areas and data point sets in the areas.
The method comprises the steps of performing primary segmentation on a sensing data set according to a marking result of the step S22 to obtain a plurality of primary segmentation areas, taking the average value from a clustering core point of all the primary segmentation areas to the maximum length of each containing point in the area as a cutoff length, determining a boundary area point set of each two primary segmentation areas based on the cutoff length, and generating a plurality of final segmentation areas by taking the average value of local densities of sub-point sets in all the boundary area point sets as a density critical value if the length between the containing point of one primary segmentation area and the containing point of the other primary segmentation area in the two primary segmentation areas is smaller than the cutoff length.
The method specifically comprises the following steps:
Step 231, performing preliminary segmentation on the sensing data set according to the labeling result to obtain a plurality of preliminary segmentation regions, and taking the average value of the maximum lengths from the clustering core points of all the preliminary segmentation regions to each of the inclusion points in the inclusion point set in the clustering core points and the regions as the length to be truncated :
;
Of the M preliminary segmentation areas,The maximum length from the clustering core point of the preliminary segmentation region B to each containing point J in the preliminary segmentation region.
Step 232, determining a boundary region point set of each two preliminary divided regions based on the cutoff length, wherein if the length between the containing point of one of the two preliminary divided regions and the containing point of the other preliminary divided region is smaller than the cutoff length, the two containing points belong to the boundary region point sets of the two preliminary divided regions.
Let the boundary region point set L mn be:
;
wherein I, J are respectively two containing points belonging to the preliminary divided region B m,Bn, when the length between the two containing points is smaller than the cut-off length When the two contained points are considered to be the boundary region point set belonging to the preliminary divided region B m,Bn.
Step 233, taking the average value of the local densities of the sub-point sets in all the boundary area point sets as a density critical value.
Local density comprising point IThe method comprises the following steps:
;
Wherein d IJ is the length of the containing point I and other containing points J in the sub-point set, K is the number of other containing points in the sub-point set, Is the cut-off length.
The average value of the local densities of all the sub-point sets of all the boundary area point sets is calculated as a density critical value.
And 234, taking the data points of the sub-point set with the local density smaller than the density critical value in the boundary area point set as discrete points, for each discrete point, finding out the cluster core point closest to the length of the discrete point from M cluster core points, and adding the discrete point into the partition area to which the cluster core point belongs, thereby generating M final partition areas.
S24, clustering the sensing data sets of other categories sequentially according to the steps to obtain a plurality of final segmentation areas and data point sets in the areas under the sensing data sets of each category, and marking different operation modes for the data point sets in each final segmentation area.
Finally, the data point sets belonging to the same mode of the various sensing data sets are imported to the same column in the mode mapping list, as shown in fig. 3, for example, in the sensing data set formed by the sensing data type a, the data subset with the numerical range of [ a 1,A2 ] belongs to the first operation mode, the data subset with the numerical range of [ a 3,A4 ] belongs to the second operation mode, the data subset with the numerical range of [ a 5,A6 ] belongs to the third operation mode, and so on.
S3, inputting the characteristic value of the skin state obtained in the step S1 into a pattern recognition neural network model, and outputting optimal values of multiple types of sensing data.
Inputting the characteristic values { tx 1…txi …txn } of the skin state into the pattern recognition neural network model, wherein n represents the number of the characteristic values of the skin state, and calculating the output of each neuron of the hidden layer of the pattern recognition neural network model:
;
;
Wherein s j represents the output intermediate value of the jth neuron of the hidden layer, The threshold value of the j-th neuron of the hidden layer is represented, b j represents the output value of the j-th neuron of the hidden layer, j=1, 2.
Inputting the hidden layer output sequence { b 1,…bj ,…bp } to an output layer of the pattern recognition neural network model, and outputting each neuron of the output layer as follows:
;
;
Where s k represents the output median of the kth neuron of the output layer, Representing the threshold value of the kth neuron of the output layer, y k represents the output value of the kth neuron of the output layer, p connection weights of the kth neuron of the output layer are { v k1…vkj …vkp }, k=1, 2.
S4, inquiring the operation mode corresponding to the optimal value of the multi-type sensing data output in the step S3 according to the mode mapping list obtained in the step S2, and identifying the optimal operation mode.
And inquiring the range of the optimal value of the q-type sensing data according to the mode mapping list, and searching the corresponding operation mode according to the range of the optimal value of the q-type sensing data.
Preferably, if the operation modes corresponding to all the optimal values of the sensing data are the same, the operation mode is directly selected, and if the operation modes corresponding to the optimal values of the sensing data are different, the final operation mode is required to be determined according to a priority rule.
In a preferred embodiment, the following formula is used to determine the priority value of each type of sensing data according to the overlapping condition of the data range of each type of sensing data and the data range of each type of sensing data in the pattern mapping list:
;
wherein c m is the data range of the m-th type of sensing data in the mode mapping list, N is the number of the remaining sensing data types except the m-th type of sensing data and the sensing data types with determined priorities, and the function The number of data overlapping the data ranges c h and c m of the h-th and m-th types of sensing data, and D (c m) represents the difference between the maximum value and the minimum value in the data range of the m-th type of sensing data, for example, a 2-A1,F(cm) is the calculated c m priority value.
Example 2
The invention also provides an operation mode recognition system for realizing the operation mode recognition method of the facial massager, as shown in fig. 4, wherein the operation mode recognition system comprises an image pickup system, an image analysis module, a sensing data processing unit, a mode recognition neural network model and a recognition unit.
The image analysis module is used for identifying the characteristic value of the skin state of the facial skin picture of the user generated by the image capturing system.
The image analysis module is used for carrying out specific treatment and analysis on skin images to indirectly evaluate the change of the moisture content of the stratum corneum, and relates to technologies such as color model conversion, region segmentation, image binarization and the like.
The sensing data processing unit collects various sensing data sets of the facial massager in different operation modes and clusters the various sensing data sets respectively to form a mode mapping list. The collection of various sensing data sets is mainly to carry out statistics on historical data, and the more the statistical data is, the better the later clustering analysis effect is.
The input parameter of the pattern recognition neural network model is a characteristic value of the skin state, and the output parameter is a corresponding optimal value of multiple types of sensing data. According to the complexity of the problem and the characteristics of the data, a proper pattern recognition neural network model is selected, such as a multi-layer perceptron neural network model, a convolution neural network or a cyclic neural network. In this embodiment, since the input is a feature value, not image or sequence data, a multi-layer perceptron neural network model is preferred.
The identification unit identifies an optimal operation mode according to the operation mode corresponding to the optimal value of the multi-class sensing data output by the neural network model by inquiring the mode according to the mode mapping list.
Once the optimal mode of operation is identified, the facial massager system may adjust the parameters of the relevant sensors and the massage regimen to provide the most personalized skin massage experience. For example, high-frequency vibration is used for stimulating facial muscles and skin, promoting blood circulation and lymph to remove toxin, and the massage intensity is adjusted by combining sensors such as pressure, temperature and the like so as to adapt to the requirements of different skin states, and the modes such as facial acupoint massage, blood circulation promotion and the like are adopted.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, produces a flow or function in accordance with embodiments of the present application, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in or transmitted across a computer-readable storage medium. The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid State Disk (SSD)), etc.
While the application has been described with reference to certain preferred embodiments, it will be understood by those skilled in the art that various changes and substitutions of equivalents may be made and equivalents will be apparent to those skilled in the art without departing from the scope of the application. Therefore, the protection scope of the application is subject to the protection scope of the claims.