Natural grease skin care product formula raw material replacement method based on graph neural network

Through the method based on the graph neural network, a graph structure model of skin care product formulas and raw materials is constructed, which solves the problem of unstable product performance in skin care product raw material replacement, and achieves higher product performance and stability.

CN120126599AActive Publication Date: 2025-06-10NANJING UNIV OF INFORMATION SCI & TECH
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510611440.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-13
Publication Date
2025-06-10
Estimated Expiration
2045-05-13

AI Technical Summary

Technical Problem

In the production of skin care products, shortage of raw materials or fluctuations in cost lead to unstable formulas. The existing technology relies on manual experience to fully consider the synergistic effects between raw materials, resulting in unstable product performance after replacement.

Method used

Using a graph neural network-based method, a two-part graph structure model of oil and grease formula and raw materials is constructed, and a neighborhood selection strategy of meta-path and information aggregation strategy of graph neural network are used to enhance the feature expression of raw materials and comprehensively consider the synergistic effects between raw materials.

Benefits of technology

It improves the performance, stability and safety of the product, ensures that the replaced formula achieves the best matching of stability and efficacy, and enhances R&D efficiency and product quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120126599A_ABST
    Figure CN120126599A_ABST
Patent Text Reader

Abstract

The invention provides a natural grease skin care product formula raw material replacement method based on a graph neural network, which comprises the following steps: step 1, constructing a data set according to a natural grease formula and raw material information, and establishing a graph structure model between the grease formula and raw materials; 2, in the graph structure established in the step 1, selecting neighborhoods to replace direct neighborhoods of raw materials in the graph structure by adopting a neighborhood selection strategy based on a meta path, fusing neighborhood information through a graph neural network model to enhance feature expression of the raw materials, and synchronously learning a connection relationship and node features of the natural grease raw materials; and step 3, designing a natural grease raw material replacement selection scheme, and ensuring that the stability and the efficacy of the replaced formula are optimally matched. According to the method, the calculation efficiency is considered in the recommendation process, and the similarity of the raw materials and the formula to which the raw materials belong is comprehensively considered, so that the accuracy of the recommendation result is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of natural skin care product formula development, and particularly to a method for replacing raw materials of natural oil skin care product formula based on graph neural network. Background Art

[0002] In the actual production of skin care products, enterprises often face challenges such as raw material shortages or cost fluctuations, which may lead to the inability to stably execute the formula. To ensure the continuity of production and product quality, enterprises need to screen suitable substitutes from the existing raw material library. However, the replacement of skin care product raw materials is not a simple substitution. It is necessary to not only ensure a high degree of similarity in the physical and chemical properties of the raw materials before and after replacement, but also fully consider their synergistic effects in the formula and potential impacts on the overall product performance. Such comprehensive evaluation can effectively ensure the applicability of the replaced raw materials and the stability of the product, so as to cope with the uncertainties in production.

[0003] Currently, when enterprises design skin care product formulas and replace raw materials, they usually rely on the experience of professional technicians and make selections based on the characteristics of raw materials. Although this method has certain reference value, it has obvious limitations: on the one hand, over-reliance on manual judgment increases the subjectivity and uncertainty of decision-making; on the other hand, it can only start from the similarity of the characteristics of the raw materials themselves and cannot comprehensively consider the synergistic effects between raw materials from the perspective of the formula, which may lead to unstable product performance after replacement. Summary of the Invention

[0004] Object of the Invention: Aiming at the deficiencies of the prior art, the present invention provides a method for replacing raw materials of natural oil skin care product formula based on graph neural network. By using bipartite graph to model formula and raw material information, a neighborhood selection strategy based on meta-path and a graph neural network (Graph Convolutional Network, GCN) information aggregation strategy are proposed to enhance the features of raw materials from two dimensions: the attributes of the formula to which the raw materials belong and their own characteristics. The process of replacing formula raw materials not only considers the similarity between individual raw materials, but also comprehensively considers the synergistic effects between various raw materials in the formula, thereby improving the performance, stability and safety of the product.

[0005] Technical Solution: To solve the above technical problems, the present invention provides a method for replacing raw materials of natural oil skin care product formula based on graph neural network, including the following steps: Step 1, construct a data set according to the natural oil formula and raw material information, and establish a graph structure model between the oil formula and the raw materials; Step 2. In the graph structure established in Step 1, a meta-path-based neighborhood selection strategy is adopted to select neighbors to replace the direct neighbors of the replacement raw materials in the graph structure. The neighborhood information is fused through a graph neural network model to enhance the feature expression of the raw materials, and the connection relationship and node features of natural oil raw materials are learned synchronously. Step 3. Design a natural oil raw material replacement selection scheme to ensure that the stability and efficacy of the replaced formula reach the optimal match.

[0006] Step 1 specifically includes: Step 1-1. Obtain the composition of the formula raw materials of natural oil skin care products and the characteristic information data of each oil raw material therein; the characteristic information data includes the proportion of natural ingredients, melting point, refractive index, moisture retention, pH value, viscosity, antioxidant performance, moisturizing effect, sun protection factor, and allergy reaction rate of each oil raw material.

[0007] Step 1-2. According to the belonging relationship between each skin care product formula and each oil raw material, construct a bipartite graph structure model G(V, E) of all formula and oil raw material data; V represents the node set, and the node set contains formula nodes and raw material nodes, where represents the nth formula node, represents the mth raw material node; E refers to the edges between nodes. The edge represents the connection between the formula and the oil raw material. If the formula and the oil raw material are in a belonging relationship, there is a corresponding edge between the formula node and the raw material node, otherwise there is no edge; the raw material node only has an edge connection with the belonging formula node; there is no edge connection between raw material nodes, and there is no edge connection between formula nodes; each raw material node contains a feature vector describing the attribute information , and each formula node contains a feature vector describing the style characteristic information .

[0008] Step 2 specifically includes: Step 2-1. Using the formula raw material bipartite graph, define the meta-path as: formula raw material formula raw material, where the symbol represents the sequential relationship in the meta-path selection process.

[0009] Step 2-2. Adopt a meta-path-based neighborhood selection strategy to select node neighborhood information; Step 2-3. Construct a raw material recommendation set: After Steps 2-1 and 2-2, obtain the neighborhood information of each raw material node under different formula guidelines, and fuse the information of each raw material and its corresponding neighborhood through a graph neural network to enhance the feature expression of natural oil raw materials and construct a raw material recommendation set.

[0010] Step 2-2 includes: For a meta-path path, there must exist two recipe nodes , , and two raw material nodes , , denoted as , where a and b take values from 1 to n; f and g take values from 1 to m; First, perform a normalization operation on each feature, and the formula is: , where z is the original value of the variable, is the maximum value of the variable, is the minimum value of the variable, is the normalized value, with a value range of 0 to 1; Encode the features of the raw material nodes and recipe nodes respectively through an encoder, as shown in Formula (1) and Formula (2): (1), (2), where , respectively represent the normalized feature vectors of the raw material nodes and the normalized feature vectors of the recipe nodes; represents the encoder for extracting the features of the raw material nodes, and the input dimension is the number of raw material node features; represents the encoder for extracting the features of the recipe nodes, and the input dimension is the number of recipe node features; , respectively represent the feature vectors of the raw material nodes and the feature vectors of the recipe nodes obtained after encoding processing; Obtain the expressions of the features of the raw material nodes and recipe nodes in the meta-path after being processed by the encoder through Formula (1) and (2) , , , , where is obtained from the normalized features of the raw material node in the meta-path path through Formula (1); is obtained from the normalized features of the raw material node in the meta-path path through Formula (1); is obtained from the normalized features of the recipe node in the meta-path path through Formula (2); is obtained from the normalized features of the recipe node in the meta-path path through Formula (2); As shown in formula (3), the long short-term memory network (LSTM) is used to fuse the meta-path information: (3), where corresponds to the node order in the meta-path path; h represents the fused information expression of a meta-path. It is assumed that the raw material node under the current formula node to be replaced , then is the target node. The meta-path obtained under the guidance of is called the target meta-path, and the fused information expression is denoted as ; ;

[0011] Step 2-2 also includes: projecting into a query vector , projecting the fused information expression of each meta-path in the bipartite graph structure into a key vector , calculating the attention scores through formulas (4) and (5), and obtaining the top five meta-paths with high similarity as the basis for selecting the node neighborhood: (4), (5), where , are weight matrices, which are used to convert the feature vectors of the meta-path into the query vector and the key vector respectively. This conversion can help the model better capture the key features of the meta-path; is a scaling factor to prevent the dot product result from being too large, d is the vector dimension; the softmax function is used to convert the result of the dot product into a probability distribution to ensure that the sum of all attention weights is 1. represents the similarity between

[0012] Step 2-2 also includes: extracting the raw material node and formula node information in the meta-path as the neighborhood of the target node , setting , where represents the set of formula nodes containing the target meta-path and the most relevant meta-paths selected; represents the set of raw material nodes containing the target meta-path and the most relevant meta-paths selected.

[0013] Step 2-3 includes: designing a single-layer graph neural network to complete the fusion of raw material node and neighborhood information by using the message passing mechanism. The formula is (6), where represents the normalized feature vector of the raw material node; represents the normalized feature vector of the recipe node; represents the proportion of the feature of the i-th raw material node in the fused feature, represents the proportion of the feature of the j-th recipe node in the fused feature, , The value is between 0 and 1 and is calculated through the attention mechanism; represents the feature expression of the raw material node after fusing neighborhood information; represents the vector concatenation operation; represents the activation function: , where is an intermediate parameter, generally taking 0.01;

[0014] Step 3 includes: Step 3-1, constructing a meta-path under the specified raw material and recipe: Set the n-th raw material node in the s-th recipe node to be replaced. First, calculate the cosine similarity between the features of other raw material nodes in the s-th recipe node and the target raw material node using formula (7). Select the raw material node with the highest similarity and set it as , which is the second hop of the meta-path; Next, calculate the cosine similarity between the features of other recipe nodes where the raw material node is located and the features of the recipe node . Select the recipe node with the highest similarity and set it as , which is the third hop of the meta-path; Finally, calculate the cosine similarity between the features of other raw material nodes in the recipe node and the target raw material node . Select the raw material node with the highest similarity and set it as , which is the fourth hop of the meta-path; Thus, the target meta-path is formed: (7), where represents and 's cosine similarity, which is used to measure the similarity of features of the same type of nodes; Represents the normalized representation of the target node features, which is the normalized representation of the node features that need to be compared with the target node for similarity; n is the dimension of the feature vector; Represents the value corresponding to the i-th position in Represents the value corresponding to the i-th position in, and they represent the same feature attributes. If calculating the cosine similarity of two formula nodes, , it represents the expressions of the features of two different formula nodes after normalization and n = 6. At this time, represents the pH value, represents the viscosity, represents the antioxidant performance, represents the moisturizing effect, represents the sun protection factor, represents the allergy reaction rate; cos ranges from [-1, 1], and the larger this value, the higher the similarity of the two node features.

[0015] Step 3-2, after obtaining the target meta-path , adopt the method of Step 2 to obtain the raw materials under the guidance of the formula the feature expression after fusing the neighborhood information ; Step 3-3, use formula (7) to calculate the cosine similarity between the feature expression and each data in the raw material recommendation set, sort and obtain the top ten feature expressions that are most similar to , ; Split the initially selected top ten feature expressions into two parts ; where represents the feature expression of the raw material node c after fusing the neighborhood information under the guidance of the formula l; represents the fused expression of the formula features obtained by the raw material node c under the guidance of the formula l; and so on to obtain , and , , where represents the raw material node under the guidance of the formula node the fused expression of the raw material features, represents the fused expression of the raw material features in; represents the raw material in the formula Fusion expression of formulation features under guidance, denote the fusion expression of formulation features in; Adopt formula (7) for the fusion expression of formulation features and perform screening on the top ten feature expressions based on the cosine similarity of select the top five that are most similar to from them; on this basis, based on the fusion features of raw materials and further screen based on the cosine similarity of select the top three that are most similar to and use the raw materials that generate the three items as the recommended results.

[0016] The present invention also provides an electronic device, including a processor and a memory, where the memory stores program codes, and when the program codes are executed by the processor, the processor is caused to execute the steps of the method.

[0017] The present invention also provides a storage medium, storing a computer program or instruction, and when the computer program or instruction runs on a computer, the steps of the method are executed.

[0018] Application scenarios of the method of the present invention: Replacement of skin care product raw materials: Establish the relationship between natural oil-based skin care product formulations and raw materials into a graph structure, and the graph neural network can better explore the internal connections between formulation raw materials, so as to make better replacement choices.

[0019] Skin care product R & D: During the replacement process of natural oil skin care product formulation raw materials, more formulation possibilities can be explored under the message passing mechanism of the graph neural network, so as to develop more skin care products.

[0020] Beneficial effects: Compared with the raw material replacement selection that relies on professional personnel, in the raw material replacement process of the present invention, not only the attribute similarity between raw materials is considered, but also the applicability of the replacement raw materials is comprehensively evaluated from the overall perspective of the formulation. This means that when selecting suitable alternative components, the present invention not only focuses on whether the physical and chemical properties of a single component match the original component, but also pays more attention to the interaction and synergy between various components in the entire formulation. In addition, this comprehensive evaluation method helps to discover new combination possibilities, thus providing support for innovation, which not only improves the R & D efficiency, but also helps to develop products with more excellent performance, meeting the market's demand for high-quality and high-safety skin care products. Description of the Drawings

[0021] Figure 1It is a schematic diagram of the relationship between skin care product formulas and raw materials.

[0022] Figure 2 It is a schematic diagram for recommending oil raw materials. Specific implementation manners

[0023] The present invention will be further illustrated below in conjunction with the diagrams and specific implementation manners. The embodiments described in the present invention are only a part of the embodiments of the present invention, rather than all embodiments. Based on the embodiments in the present invention, other embodiments obtained by those of ordinary skill in the art without creative efforts all fall within the scope protected by the present invention.

[0024] In a specific embodiment of the present invention, a method for replacing raw materials in a natural oil skin care product formula based on a graph neural network is provided. The specific implementation scheme is as Figure 2 shown, and it includes the following steps: Step 1, construct a data set according to the natural oil formula and raw material information, and establish a graph structure model between the oil formula and the raw materials; Step 2, in the graph structure established in Step 1, adopt a neighborhood selection strategy based on meta-paths to select neighbors to replace the direct neighbors of the replacement raw materials in the graph structure, and fuse the neighborhood information through a graph neural network model to enhance the feature expression of the raw materials, and synchronously learn the connection relationship and node features of the natural oil raw materials; Step 3, design a natural oil raw material replacement selection scheme to ensure that the replaced formula achieves an optimal match in terms of stability and efficacy, and effectively improve the overall quality of the skin care product formula.

[0025] Step 1 specifically includes: Step 1-1, under the guidance of professionals, obtain the composition of the raw materials of the natural oil skin care product and the characteristic information data of each oil raw material therein; the characteristic information data includes the proportion of natural ingredients contained in each oil raw material, melting point, refractive index, moisture retention, as well as the pH value, viscosity, antioxidant performance, moisture retention effect, sun protection factor and allergy reaction rate of each formula.

[0026] Step 1-2, construct a bipartite graph structure model G(V,E) of all formula and oil raw material data according to the belonging relationship between each skin care product formula and each oil raw material; represents the node set, and the node set contains formula nodes and raw material nodes, where represents the nth formula node, Denote the m-th raw material node; E represents the edge between nodes. The edge indicates the connection between the formula and the oil raw material. If the formula and the oil raw material are in a subordinate relationship, there is a corresponding edge between the formula node and the raw material node; otherwise, there is no such edge. The raw material node is only connected to the subordinate formula node by an edge; there is no edge connection between raw material nodes, and there is no edge connection between formula nodes; each raw material node contains a feature vector describing the attribute information. Each formula node contains a feature vector describing the style characteristic information. .

[0027] Step 2 specifically includes: Step 2-1: Using the formula-raw material bipartite graph, define the meta-path as: formula raw material formula raw material, where the symbol represents the sequential relationship in the meta-path selection process. This kind of meta-path can deeply explore the synergistic effect between the raw material and the formula; through the neighborhood node information selected by the meta-path, the complex interaction relationship between the raw material and the formula can be captured more accurately.

[0028] Step 2-2: Adopt a neighborhood selection strategy based on the meta-path to select the node neighborhood information. Step 2-3: Construct a raw material recommendation set: After obtaining the neighborhood information of each raw material node under different formula guidelines through Steps 2-1 and 2-2, fuse the features of each raw material and its corresponding neighborhood information through a graph neural network to enhance the feature expression of the natural oil raw material and construct a raw material recommendation set.

[0029] Step 2-2 includes: For a meta-path path, there must exist two formula nodes , , and two raw material nodes , , denoted as , where a and b take values from 1 to n; f and g take values from 1 to m; Next, integrate the meta-path information through the meta-path information fusion module: First, perform a normalization operation on each feature. The formula is: , where z is the original value of the variable, is the maximum value of the variable, is the minimum value of the variable, is the normalized value, and its value range is 0 to 1; Encode the features of the raw material node and the formula node respectively through the encoder, as shown in formulas (1) and (2): (1), (2), wherein and respectively represent the normalized feature vectors of the raw material nodes and the normalized feature vectors of the formula nodes; represents an encoder for extracting the features of the raw material nodes, and the input dimension is the number of raw material node features; represents an encoder for extracting the features of the formula nodes, and the input dimension is the number of formula node features; and respectively represent the feature vectors of the raw material nodes and the formula node features obtained after encoding processing; the beneficial effect of the encoder processing is that while retaining the important information in the node features, it can unify the dimensions of the feature expressions of the formula nodes and the raw material nodes, facilitating subsequent processing; The expressions of the raw material nodes and the formula node features in the meta-path after being processed by the encoder are obtained through formulas (1) and (2) and and and , wherein is obtained from the normalized features of the raw material node in the meta-path path through formula (1); is obtained from the normalized features of the raw material node in the meta-path path through formula (1); is obtained from the normalized features of the formula node in the meta-path path through formula (2); is obtained from the normalized features of the formula node in the meta-path path through formula (2); In fact, each meta-path is a sequential structure, reflecting the high-order connection relationship between the raw material nodes and the formula nodes; As shown in formula (3), a long short-term memory network LSTM (Long Short-Term Memory, LSTM) is used to fuse the meta-path information: (3), wherein corresponds to the node order in the meta-path path; h represents the fused information expression of a meta-path. Assuming that the raw material node under the current formula node to be replaced is the target node, then under the guidance of the meta-path obtained is called the target meta-path, and the fused information expression is denoted as The beneficial effect of using the Long Short-Term Memory Network (LSTM) to fuse meta-path information lies in capturing the sequential dependence relationships between different nodes in the meta-path, laying a solid foundation for the subsequent evaluation of the matching degree of the meta-path and the screening of the effective path neighborhood.

[0030] Step 2-2 also includes: projecting into a query vector , projecting the fusion information representation of each meta-path in the bipartite graph structure into a key vector , calculating the attention scores through formulas (4) and (5), and obtaining the top five meta-paths with high similarity as the basis for selecting the node neighborhood: (4), (5), where , are weight matrices, which are used to convert the feature vectors of the meta-path into the query vector and the key vector respectively. This conversion can help the model better capture the key features of the meta-path; is a scaling factor to prevent the dot product result from being too large, d is the vector dimension; the softmax function is used to convert the result of the dot product into a probability distribution to ensure that the sum of all attention weights is 1. This enables the model to assign different weights according to the similarity between paths; represents the similarity between and h;

[0031] The effect of the meta-path selection strategy based on the attention mechanism is that it can effectively obtain other meta-paths that are highly similar to the target meta-path, and can accurately match both the attributes of raw materials and formulas in the meta-path and their high-order connection relationships. Selecting node information from these paths to enhance the target node representation takes into account both its structural connectivity and the characteristics of the nodes themselves.

[0031] Step 2-2 also includes: extracting the raw material node and formula node information in the meta-path as the neighborhood of the target node , setting , where represents the set of formula nodes in the target meta-path and the most relevant meta-paths selected; represents the set of raw material nodes in the target meta-path and the most relevant meta-paths selected.

[0032] Step 2-3 includes: designing a single-layer graph neural network in the neighborhood information fusion module, and using the message passing mechanism to complete the fusion of the raw material node and neighborhood information. The formula is (6), wherein, represents the normalized feature vector of the raw material node; represents the normalized feature vector of the formula node; represents the proportion of the feature of the i-th raw material node in the fused feature, represents the proportion of the feature of the j-th formula node in the fused feature, , The value is between 0 and 1 and is obtained by the attention mechanism; represents the feature expression after the raw material node fuses the neighborhood information; represents the activation function: , wherein is an intermediate parameter, generally taking 0.01; Adopting the method of separately aggregating the information of the raw material node and the formula node can effectively avoid the confusion of heterogeneous node information, make the result more reliable and easy to interpret, and provide a solid foundation for the accurate recommendation of subsequent raw materials.

[0033] By fusing the raw material node and its neighborhood information, the feature expression of the raw material node is enhanced in terms of attributes and structure. The raw material recommendation set constructed based on this strategy not only facilitates the subsequent efficient screening of raw materials with similar features, but also ensures that the recommended raw materials meet the requirements of specific formulas.

[0034] Step 3 includes: Step 3-1, constructing a meta-path under the specified raw material and formula: Usually, there is a complex many-to-many structural relationship between the raw material node and the formula node. Blindly selecting the target meta-path often cannot reflect the role played by the replacement raw material in the formula and the synergistic relationship between the raw materials under the same formula, and thus cannot achieve a good recommendation effect. Therefore, it is particularly important to design a reasonable meta-path selection strategy.

[0035] Actually, the target meta-path that meets the expectation can be well constructed through the similarity principle. Because the similarity between the raw material node features in the meta-path "formula-raw material-formula-raw material" constructed based on the similarity principle is satisfied, and since the similarity between the formula nodes is satisfied, then the latter half of the meta-path "raw material-formula-raw material" can just reflect the high-order connection relationship between the raw material node and the formula node, that is, the synergistic relationship between the formula and the raw material.

[0036] It is assumed that due to reasons such as cost and inventory, now it is necessary to process the n-th raw material node in the s-th formula node Perform replacement and select the raw material meta-path under the specified formula through the meta-path selection module. First, calculate the s-th formula node through formula (7). The cosine similarity between the features of other raw material nodes and the target raw material node in is selected, and the raw material node with the highest similarity is set as , as the second hop of the meta-path; Next, calculate the cosine similarity between the features of other formula nodes where the raw material node is located and the features of the formula node , and select the formula node with the highest similarity and set it as , as the third hop of the meta-path; Finally, calculate the cosine similarity between the features of other raw material nodes and the target raw material node in the formula node , and select the raw material node with the highest similarity and set it as , as the fourth hop of the meta-path; Thus, the target meta-path is formed: (7), where represents and 's cosine similarity, which is used to measure the similarity of features of the same type of nodes; represents the normalized representation of the target node features, represents the normalized representation of the node features that need to be compared with the target node for similarity; n is the dimension of the feature vector; represents the value corresponding to the i-th position in, represents the value corresponding to the i-th position in, and they represent the same feature attributes. If calculating the cosine similarity of two formula nodes, , then it represents the expressions after normalization of the features of two different formula nodes and n = 6. At this time, represents the pH value, represents the viscosity, represents the antioxidant performance, represents the moisturizing effect, represents the sun protection factor, represents the allergic reaction rate; cos ranges from [-1, 1], and the larger this value, the higher the similarity of the features of the two nodes.

[0037] Step 3-2, after obtaining the target meta-path , adopt the method in Step 2 to obtain the feature expression of the raw material after fusing the neighborhood information under the guidance of the formula ​ ; Step 3-3, calculate the feature expression using formula (7) and the cosine similarity between each data in the raw material recommendation set, sort and obtain the top ten feature expressions that are most similar to , ; Since the feature vector of is formed by fusing and splicing all raw materials and formula features in the neighborhood, the recommendation result may be severely biased towards the expression of one side, which does not conform to the design intention of the present invention. Therefore, it is necessary to further screen the recommendation result. Specifically, it is necessary to split the feature expression and evaluate the similarity between the recommended raw materials on the raw material features and formula features respectively; Split the top ten feature expressions preliminarily selected into two parts ; where represents the feature expression after the raw material node c obtains the fused neighborhood information under the guidance of the formula l, that is, in formula (6); represents the fused expression of the formula features obtained by the raw material node c under the guidance of the formula l, that is, in formula (6); and so on to obtain , and , , where represents the raw material node under the guidance of the formula node the fused expression of the raw material features, represents the fused expression of the raw material features in; represents the raw material under the guidance of the formula the fused expression of the formula features, represents the fused expression of the formula features in; Use formula (7) to screen the top ten feature expressions based on the cosine similarity between the fused expression of the formula features and , and select the top five that are most similar to ; On this basis, further screen based on the cosine similarity between the fused features of the raw materials and , and select the top three that are most similar to , and use the raw materials that generate the three items as the recommendation result.

[0038] In the following examples, the specification parameters of raw materials and formulations are from the public data of domestic daily chemical companies.

[0039] In another specific embodiment of the present invention, an alternative recommendation method for raw materials of natural oil formulations based on bipartite graph path selection and graph neural network information aggregation strategy is provided. Raw material 0 in a certain formulation a is selected as the implementation object, and the specific steps include: Step 1: Construct a data set based on natural oil formulations and raw material information, and establish a graph structure model between oil formulations and raw materials; the following steps are included: Step 1-1: Extract the formulation and raw material information of natural oil skin care products from literature, patents and experimental data. Under the guidance of professionals, obtain the formulation raw material composition of natural oil skin care products and the characteristic information data of each oil raw material therein. Table 1 includes characteristic information such as the proportion of natural components, melting point, refractive index, and moisture retention of each oil raw material, and Table 2 includes characteristic information such as the pH value, viscosity, antioxidant performance, moisturizing effect, SPF value, and allergy reaction rate of each formulation.

[0040] Step 1-2: According to the belonging relationship between each skin care product formulation and each oil raw material indicated in Table 3, construct a bipartite graph structure model G(V,E) of all formulation and oil raw material data; represents the node set, and the node set contains formulation nodes and raw material nodes, where represents the nth formulation node, represents the mth raw material node; E refers to the edges between nodes. The edge represents the connection between the formulation and the oil raw material. If the formulation and the oil raw material are in a belonging relationship, there is a corresponding edge between the formulation node and the raw material node, otherwise there is no edge; the raw material node is only connected to the belonging formulation node by an edge; there is no edge connection between raw material nodes, and there is no edge connection between formulation nodes; each raw material node contains a feature vector describing the attribute information , and each formulation node contains a feature vector describing the style characteristic information .

[0041] Table 1

[0042] Type of oil and fat Oleic acid (%) Linoleic acid (%) Palmitic acid (%) Lauric acid (%) Linolenic acid (%) Melting point (°C) Refractive index Moisture retention Absorption rate Antioxidant property Olive oil 70 15 10 0 0 -6 1.46 8 5 6 Coconut oil 5 2 8 50 0 25 1.44 9 8 3 Sweet almond oil 60 25 6 0 0 -20 1.46 7 6 5 Jojoba oil 0 0 0 0 0 -10 1.47 8 7 7 Grape seed oil 18 70 7 0 0 -8 1.47 6 8 8 Rosehip oil 15 45 5 0 35 -10 1.47 9 6 9 Cocoa butter 30 0 25 0 0 35 1.45 10 4 4 Shea butter 0 0 0 0 0 37 1.46 10 3 5 Avocado oil 75 12 12 0 0 -5 1.47 9 4 7 ... ... ... ... ... ... ... ... ... ... ... Walnut oil 15 65 10 0 10 -10 1.47 7 6 7

[0043] Table 2

[0044]

[0045] Table 3

[0046] Formula number Olive oil Coconut oil Sweet almond oil Jojoba oil Grape seed oil Rosehip oil Cocoa butter Shea butter ... Avocado oil 1 40 0 30 20 0 10 0 0 ... 0 2 0 20 0 10 20 10 0 10 ... 0 3 0 10 0 20 10 0 0 20 ... 10 4 15 10 0 10 0 0 10 15 ... 0 5 20 0 20 0 0 0 0 0 ... 20 6 0 15 10 10 10 0 0 0 ... 0 7 0 0 0 30 20 0 0 10 ... 0 8 20 0 0 10 0 0 0 0 ... 10 9 0 20 0 10 10 0 0 0 ... 0 10 0 0 20 0 0 20 0 0 ... 0 11 10 0 10 10 10 0 0 0 ... 0 12 0 10 0 10 0 0 0 0 ... 0 13 0 0 20 0 0 0 0 0 ... 20 14 10 0 0 0 0 0 10 0 ... 0 ... ... ... ... ... ... ... ... ... ... ... 158 0 0 0 10 0 10 0 0 ... 0 Step 2: Enhance the feature expression of natural oil raw materials; In the graph structure established in step 1, a meta-path-based neighborhood selection strategy is adopted to select neighbors to replace its direct neighbors, and the neighborhood information is fused through a graph neural network model to enhance the feature expression of raw materials, and the connection relationship and node features of natural oil raw materials are learned synchronously. The specific steps are as follows: Step 2-1, construct a meta-path under the specified raw material and formula through the meta-path selection module: Generally, there is a many-to-many complex structural relationship between raw materials and formulas. Blindly selecting the target meta-path often fails to reflect the role of the replacement raw material in the formula and the synergistic relationship between raw materials under the same formula, and thus cannot achieve a good recommendation effect. Therefore, it is particularly important to design a reasonable meta-path selection strategy.

[0047] In fact, the target meta-path that meets the expectations can be well constructed through the similarity principle. Because the similarity between raw material features in the meta-path "formula - raw material - formula - raw material" constructed based on the similarity principle is satisfied, and since the similarity between formulas is satisfied, the latter part "raw material - formula - raw material" in the meta-path can just reflect the high-order connection relationship between raw materials and formulas, that is, the synergistic relationship between formula raw materials. In particular, as Figure 1 shown, taking the raw material node under the formula node as an example to introduce the construction process of the target meta-path: The feature data of formula a is , the feature data of raw material is , and there are also raw materials , in formula a, and their feature data are , . Calculate their similarities with raw material respectively through formula (7): The normalized feature vector value is: = [0.7, 0.15, 0.1, 0, 0, 0.2, 0.23, 0.8, 0.5, 0.6]; = [0, 0.75, 0.15, 0.3, 0.5, 0.6857, 0.445, 0.9, 0.3, 0.5]; = [0.85, 0.1, 0.3, 0.2, 0, 0.5, 0.165, 0.7, 0.4, 0.9]; The similarity calculation results are: = 0.679, = 0.944. Select the raw material node As the second hop of the meta-path; next, calculate the raw materials in other formulas 、 , and their characteristic data is , .

[0048] The cosine similarity between and the formula features is obtained as = 0.986, =0.919. Select the formula node with the highest similarity as the third hop of the meta-path; further select the raw material node as the fourth hop of the meta-path.

[0049] Thus, the target meta-path is constructed .

[0050] Step 2-2, obtain the fused representation through the meta-path information fusion module : As shown in formulas (1) and (2), extract the effective features of the raw material nodes and formula nodes in to obtain: = = [0.62,0.31,0.45,0.28,0.57]; = = [0.71,0.24,0.53,0.36,0.49]; = = [0.67,0.42,0.78,0.35,0.59]; = = [0.58,0.37,0.85,0.41,0.63]; In fact, each meta-path is a sequential structure, reflecting the high-order connection relationship between raw materials and formulas. As shown in formula (3), an LSTM model is used here to fuse the meta-path information to obtain : = [0.645,0.337,0.652,0.35,0.55]; Step 2-3, screen the meta-paths similar to the target meta-path: After obtaining the fused representation of the specified meta-path information, project the features of the target path into a query vector , and project the features of all candidate paths in the bipartite graph structureProjected bonding vector , calculate their attention scores with the target path through formulas (4) and (5), and obtain the top five meta-paths with high similarity as the basis for selecting the node neighborhood: = [0.6, 0.3, 0.9, 0.4, 0.7], = [0.7, 0.2, 0.8, 0.4, 0.6]; = [0.8, 0.1, 0.5, 0.5, 0.6], = [0.5, 0.4, 0.7, 0.3, 0.5]; = [0.4, 0.5, 0.6, 0.2, 0.4]; Step 2-4, obtain the neighborhood information of the target node according to the meta-path , and obtain the raw material node through the neighborhood information fusion module The fusion feature expression obtained under the guidance of the formula is: = [2.38,0.77,0.96,0.83,0.54,1.43,2.16,2.29,1.72,2.27,0.47,0.2,0.5,0.3,0.22,0.5]; Step 3, perform replacement selection on natural oil raw materials; A set of replacement selection schemes for natural oil raw materials is designed to ensure that the replaced formula achieves the optimal match in terms of stability and efficacy, effectively improving the overall quality of the skin care product formula; Step 3 specifically includes the following steps: Step 3-1, calculate using formula (7) and the cosine similarity between each data in the raw material recommendation set, sort and obtain the top ten feature expressions that are most similar to , where : : =[2.33,0.79,0.94,0.82,0.53,1.42,2.15,2.27,1.70,2.25,0.45,0.22,0.49,0.33,0.24,0.4]; =[2.41,0.63,0.88,0.53,0.61,1.65,2.68,2.51,1.94,2.89,0.61,0.45,0.32,0.76,0.46,0.36]; =[2.43, 0.65, 0.86, 0.55, 0.63, 1.67, 2.70, 2.53, 1.96, 2.91, 0.63, 0.47, 0.34, 0.78, 0.48, 0.38]; =[2.39, 0.61, 0.90, 0.51, 0.59, 1.63, 2.66, 2.49, 1.92, 2.87, 0.59, 0.43, 0.30, 0.74, 0.44, 0.34]; =[2.45, 0.64, 0.87, 0.56, 0.64, 1.68, 2.72, 2.55, 1.98, 2.93, 0.64, 0.48, 0.35, 0.79, 0.49, 0.39]; =[2.38, 0.62, 0.89, 0.52, 0.60, 1.64, 2.67, 2.50, 1.93, 2.88, 0.60, 0.44, 0.31, 0.75, 0.45, 0.35]; =[2.42, 0.66, 0.85, 0.54, 0.62, 1.66, 2.69, 2.52, 1.95, 2.90, 0.62, 0.46, 0.33, 0.77, 0.47, 0.37]; =[2.37, 0.60, 0.91, 0.50, 0.58, 1.62, 2.65, 2.48, 1.91, 2.86, 0.58, 0.42, 0.29, 0.73, 0.43, 0.33]; =[2.44, 0.65, 0.86, 0.55, 0.63, 1.67, 2.71, 2.54, 1.97, 2.92, 0.63, 0.47, 0.34, 0.78, 0.48, 0.38]; =[2.37, 0.76, 0.96, 0.84, 0.54, 1.43, 2.16, 2.28, 1.72, 2.27, 0.47, 0.38, 0.52, 0.31, 0.41, 0.32]; Since the eigenvector is formed by fusing and splicing all the raw material and formulation features in the neighborhood, the recommended result may be severely biased towards the expression of one side, which does not conform to the original intention of the present invention. Therefore, it is necessary to further screen the recommended result. Specifically, the preliminarily screened data needs to be split into two parts and , and successively obtain 、 and 、 , and conduct evaluation and screening on the raw material characteristics and formulation characteristics: = [2.38, 0.77, 0.96, 0.83, 0.54, 1.43, 2.16, 2.29, 1.72, 2.27]; = [2.33, 0.79, 0.94, 0.82, 0.53, 1.42, 2.15, 2.27, 1.70, 2.25]; = [2.41, 0.63, 0.88, 0.53, 0.61, 1.65, 2.68, 2.51, 1.94, 2.89]; = [2.43, 0.65, 0.86, 0.55, 0.63, 1.67, 2.70, 2.53, 1.96, 2.91]; = [2.39, 0.61, 0.90, 0.51, 0.59, 1.63, 2.66, 2.49, 1.92, 2.87]; = [2.45, 0.64, 0.87, 0.56, 0.64, 1.68, 2.72, 2.55, 1.98, 2.93]; = [2.38, 0.62, 0.89, 0.52, 0.60, 1.64, 2.67, 2.50, 1.93, 2.88]; = [2.42, 0.66, 0.85, 0.54, 0.62, 1.66, 2.69, 2.52, 1.95, 2.90]; = [2.37, 0.60, 0.91, 0.50, 0.58, 1.62, 2.65, 2.48, 1.91, 2.86]; = [2.44, 0.65, 0.86, 0.55, 0.63, 1.67, 2.71, 2.54, 1.97, 2.92]; = [2.37, 0.76, 0.96, 0.84, 0.54, 1.43, 2.16, 2.28, 1.72, 2.27]; =[0.47, 0.2, 0.5, 0.3, 0.22, 0.5], =[0.45, 0.22, 0.49, 0.33, 0.24, 0.4]; =[0.61, 0.45, 0.32, 0.76, 0.46, 0.36], =[0.63, 0.47, 0.34, 0.78, 0.48, 0.38]; =[0.59, 0.43, 0.30, 0.74, 0.44, 0.34], =[0.64, 0.48, 0.35, 0.79, 0.49, 0.39]; =[0.60, 0.44, 0.31, 0.75, 0.45, 0.35], =[0.62, 0.46, 0.33, 0.77, 0.47, 0.37]; =[0.58, 0.42, 0.29, 0.73, 0.43, 0.33], =[0.63, 0.47, 0.34, 0.78, 0.48, 0.38]; =[0.47, 0.38, 0.52, 0.31, 0.41, 0.32]; First, the recommended nodes are screened based on the cosine similarity of the formula feature expressions, and the top five most similar to the replacement raw materials are selected, calculated by formula (1): =0.994; =0.873; =0.877; =0.868; =0.878; =0.871; =0.875; =0.866; =0.877; =0.948; The calculated cosine similarities are sorted to obtain: > > > > > > > > > ; then select . On this basis, select the top three most similar ones as the recommendation results based on the fusion features, which are calculated by formula (1): = 0.982; = 0.873; = 0.852; = 0.821; = 0.936; Sort the calculated cosine similarities to get: > > > > . It can be seen from the calculation results that the corresponding raw materials for generating , , should be recommended to replace .

[0051] Step 4, result evaluation; In order to verify the effectiveness of the proposed method, 100 formulas are randomly selected from 158 formula raw materials for raw material replacement experiments. Table 4 shows the replacement recommendation results of oil raw materials in some formulas.

[0052] Table 4

[0053]

[0054] Calculate the availability rate η: (8), where n represents the number of formulas selected in the experiment. H 1 represents the number of raw materials that can be judged as available by experts; It can be seen from the data in Table 4 that the replacement recommendation results of different oil raw materials under the same formula are different; the replacement recommendation results of the same raw material for different formulas are also different, which verifies that the model not only considers the characteristic attributes of oil raw materials but also the coordination effect between raw materials in the recommendation process, making up for the deficiencies brought by manual recommendation based only on raw material attributes. The experimental results are analyzed by the expert judgment method, and the availability of the recommended raw materials is calculated by formula (8) to verify the effect of the model. Under the evaluation of professionals, 389 out of 400 recommended alternative raw materials can be used for the production of the corresponding formula, and the availability rate of the recommended oil raw materials is as high as 97.3%, verifying the accuracy and practicality of the method of the present invention in the replacement of oil raw materials.

[0055] The present invention provides a method for replacing raw materials in the formulation of natural oil skin care products based on graph neural networks. There are many methods and ways to specifically implement this technical solution. The above description is only the preferred embodiment of the present invention. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present invention, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of the present invention. Each component not clearly defined in this embodiment can be implemented by existing technologies.

Claims

1. A method for replacing raw materials in natural oil skin care product formula based on graph neural network, characterized in that: The following steps are involved: Step 1: construct a data set based on natural oil formula and raw material information, and establish a graph structure model between oil formula and raw materials; Step 2: In the graph structure established in step 1, a meta-path-based neighborhood selection strategy is used to select neighbors to replace the direct neighbors of the raw material in the graph structure, and the neighborhood information is fused through a graph neural network model to enhance the feature expression of the raw material, and the connection relationship and node characteristics of the natural oil raw material are simultaneously learned; Step 3: Design a natural oil raw material replacement option to ensure that the replaced formula achieves the best match in terms of stability and efficacy.

2. The method according to claim 1, characterized in that Step 1 specifically includes: Step 1-1, obtaining the formula raw material composition of natural oil skin care products and characteristic information data of each oil raw material; the characteristic information data includes the proportion of natural ingredients contained in each oil raw material, melting point, refractive index, moisturizing property, and pH value, viscosity, antioxidant performance, moisturizing effect, sun protection factor and allergic reaction rate of each formula; Step 1-2, based on the relationship between each skin care product formula and each oil raw material, construct a bipartite graph structure model G(V,E) of all formulas and oil raw material data; represents a node set, which includes recipe nodes and raw material nodes, where Represents the nth recipe node, represents the mth raw material node; E refers to the edge between nodes, and the edge represents the connection between the formula and the oil raw material. If the formula and the oil raw material are in a relationship of belonging, there is a corresponding edge between the formula node and the raw material node, otherwise there is no edge; the raw material node is only connected to the formula node to which it belongs; there is no edge connection between the raw material nodes, and there is no edge connection between the formula nodes; each raw material node contains a feature vector describing the attribute information , each recipe node contains a feature vector describing the style feature information .

3. The method according to claim 2, characterized in that Step 2 specifically includes: Step 2-1, using the formula raw material bipartite graph, define the meta-path as: formula raw material formula Raw materials, including symbols Indicates the order relationship in the process of meta-path selection; Step 2-2, using a meta-path based neighborhood selection strategy to select node neighborhood information; Step 2-3, constructing a raw material recommendation set: After steps 2-1 and 2-2, the neighborhood information of each raw material node under the guidance of different formulas is obtained, and the raw materials and corresponding neighborhood information are fused through the graph neural network to enhance the characteristic expression of natural oil raw materials and construct a raw material recommendation set.

4. The method according to claim 3, characterized in that Step 2-2 includes: For a meta path path, there must be two recipe nodes , , and two raw material nodes , , denoted as , where a and b are 1~n; f and g are 1~m; firstly, normalize each feature, the formula is: , Where z is the original value of the variable, is the maximum value of the variable, is the minimum value of the variable, It is a normalized value, ranging from 0 to 1; The raw material node and recipe node features are encoded by the encoder, as shown in formula (1) and formula (2): (1), (2), in , They represent the normalized feature vector of the raw material node and the normalized feature vector of the recipe node respectively; Represents an encoder for extracting raw material node features, and the input dimension is the number of raw material node features; Represents the encoder for extracting recipe node features, and the input dimension is the number of recipe node features; , They respectively represent the feature vector of the raw material node and the feature vector of the recipe node obtained after encoding processing; The expression of the raw material node and recipe node features in the meta-path after being processed by the encoder is obtained through formulas (1) and (2): , , , ,in The raw material node in the meta path path The normalized features of are obtained through formula (1); The raw material node in the meta path path The normalized features of are obtained through formula (1); By the recipe node in the meta path path The normalized features of are obtained through formula (2); By the recipe node in the meta path path The normalized features of are obtained through formula (2); As shown in formula (3), the long short-term memory network LSTM is used to fuse the meta-path information: (3) , in Corresponds to the node order in the meta-path path; h represents the fusion information expression of a meta-path, setting the recipe node that needs to be replaced Raw material node ,but is the target node, exist The meta-path obtained under the guidance It is called the target meta-path, and the fusion information expression is recorded as .

5. The method according to claim 4, characterized in that Step 2-2 also includes: Projected into query vector , each meta-path in the bipartite graph structure is fused with information to express Projection into key vector , calculate the attention score through formula (4) and formula (5), and obtain the top five meta-paths with high similarity as the basis for selecting the node neighborhood: (4), (5), in , are weight matrices, which are used to transform the feature vector of the meta-path into the query vector and key vector ; is a scaling factor, d is the vector dimension; express The similarity between h.

6. The method according to claim 5, characterized in that Step 2-2 also includes: extracting the raw material node and recipe node information in the meta-path as the neighborhood of the target node ,set up ,in represents the set of recipe nodes including the target meta-path and the most relevant meta-path selected; Represents the set of raw material nodes that include the target meta-path and the most relevant meta-path that has been filtered out.

7. The method according to claim 6, characterized in that Step 2-3 includes: designing a single-layer graph neural network and using the message passing mechanism to complete the fusion of raw material nodes and neighborhood information. The formula is: (6), in, Represents the normalized feature vector of the raw material node; Represents the normalized feature vector of the recipe node; Indicates the proportion of the i-th raw material node feature in the fusion feature, Indicates the proportion of the j-th recipe node feature in the fusion feature, , The value is between 0 and 1; It represents the feature expression of the raw material node after integrating the neighborhood information; Represents a vector concatenation operation; Represents the activation function.

8. The method according to claim 7, characterized in that Step 3 includes: Step 3-1, construct the meta-path under the specified raw materials and recipes: set the sth recipe node to The nth raw material node in To make a replacement, first calculate the sth recipe node using formula (7) Other raw material node characteristics and target raw material node The cosine similarity between features, select the raw material node with the highest similarity, and set it to , as the second hop of the meta-path; next, calculate the raw material node Other recipe node features and recipe nodes The cosine similarity between features, select the recipe node with the highest similarity, and set it as , as the third hop of the meta-path; finally, calculate the recipe node Other raw material node characteristics and target raw material node The cosine similarity between features, select the raw material node with the highest similarity, and set it to , as the fourth hop of the meta-path; thus forming the target meta-path : (7), in express and cosine similarity of ; represents the normalized representation of the target node features, Represents the normalized representation of the node features that need to be compared with the target node for similarity; n is the feature vector dimension; express The value corresponding to the i-th position in , express The value corresponding to the i-th position in ; Step 3-2, get the target meta path Then, take the method of step 2 to obtain the raw materials In the recipe Feature expression after fusion of neighborhood information under guidance ; Step 3-3, use formula (7) to calculate the feature expression The cosine similarity between each data in the raw material recommendation set is sorted and obtained. The characteristic expressions of the top ten most similar items , ; The first ten features screened out are expressed as Split into two parts ;in It represents the feature expression of raw material node c after integrating neighborhood information under the guidance of recipe l; It represents the fusion expression of the recipe features obtained by the raw material node c under the guidance of recipe l; , and , ,in Represents the raw material node In the recipe node The fusion expression of raw material characteristics under the guidance of express Fusion expression of raw material characteristics; Indicates raw materials In the recipe The fusion expression of formula characteristics under the guidance of express Fusion expression of formula features; Formula (7) is used to express the fusion of recipe features. and The cosine similarity of the first ten features is expressed Filter and select The top five most similar items; based on this, the fusion characteristics based on the raw materials and The cosine similarity of , select and The top three most similar items will generate the raw materials of the top three items as recommendation results.

9. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores program codes, and when the program codes are executed by the processor, the processor executes the steps of the method according to any one of claims 1 to 8.

10. A storage medium, characterized in that: A computer program or instruction is stored, and when the computer program or instruction is run on a computer, the steps of the method according to any one of claims 1 to 8 are executed.

Citation Information

Patent Citations

  • Body fat data analysis and diet recommendation method and device based on graph neural network, and readable medium

    CN118116549A

  • Method and system for identifying odor characteristics in water based on electronic nose topological fingerprints

    CN119001031A

  • Kit for enhancing the effect of a cosmetic preparation for skin care and improvement of skin condition

    DE202024106182U1