A method for replacing raw materials in the formula of natural oil skin care products based on graph neural network

By constructing a graph neural network model, combining graph structure and meta-path selection strategy, the uncertainty of raw material replacement in skin care product formula design is solved, more efficient and accurate raw material replacement is achieved, and the stability and performance of the product are improved.

CN120126599BActive Publication Date: 2025-07-04NANJING UNIV OF INFORMATION SCI & TECH
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

In the prior art In the skin care product formula design, there is subjectivity and uncertainty in decision-making caused by excessive reliance on manual judgment during the replacement of raw materials, and the synergy between raw materials cannot be fully considered, which may lead to unstable product performance.

Method used

Using a graph neural network-based method, by constructing a two-part graph structure model of oil and fat formula and raw materials, using the meta-path selection strategy and graph neural network model to fuse neighborhood information, enhance the expression of raw materials, comprehensively consider the synergistic effects between the raw materials in the formula, and design alternative solutions to ensure stability and efficacy.

Benefits of technology

It improves the accuracy and efficiency of the raw material replacement process, can better consider the interaction of various ingredients in the formula, and develops skin care products with superior performance to meet the market's needs for high quality and high safety.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120126599B_ABST
    Figure CN120126599B_ABST
Patent Text Reader

Abstract

The present invention provides a method for replacing raw materials in the formula of natural oil skin care products based on graph neural networks, comprising 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 simultaneously 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. The present invention takes into account both the computational efficiency and the similarity of raw materials and their respective formulas during the recommendation process, ensuring the accuracy of the recommendation results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of the development of natural skin care product formulations, and particularly relates to a method for replacing raw materials in a natural oil skin care product formulation based on a 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 formulation. 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 not only to ensure a high degree of similarity in the physical and chemical properties of the raw materials before and after replacement, but also to fully consider their synergistic effects in the formulation 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, thereby coping with the uncertainties in production.

[0003] Currently, when enterprises design skin care product formulations and replace raw materials, they usually rely on the experience of professional technicians and make selections based on the characteristics of the 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 the raw materials from the perspective of the formulation, which may lead to problems of 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 in a natural oil skin care product formulation based on a graph neural network. By using a bipartite graph to model the formulation and raw material information, a neighborhood selection strategy based on meta-paths and a graph neural network (Graph Convolutional Network, GCN) information aggregation strategy are proposed to enhance the features of the raw materials from two dimensions: the attributes of the affiliated formulation and their own characteristics. The process of replacing raw materials in the formulation not only considers the similarity between individual raw materials, but also comprehensively considers the synergistic effects between the raw materials in the formulation, 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 in a natural oil skin care product formulation based on a graph neural network, including the following steps:

[0006] Step 1, construct a data set according to the natural oil formulation and raw material information, and establish a graph structure model between the oil formulation and the raw materials;

[0007] Step 2, in the graph structure established in Step 1, adopt a meta-path-based neighborhood selection strategy 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 simultaneously learn the connection relationship and node features of natural oil raw materials;

[0008] 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.

[0009] Step 1 specifically includes:

[0010] 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 contained in each oil raw material, melting point, refractive index, moisture retention, as well as the pH value, viscosity, antioxidant performance, moisturizing effect, sun protection factor and allergy reaction rate of each formula.

[0011] 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; 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, and the edges represent the connections between the formula and the oil raw materials. 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 none; 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 .

[0012] Step 2 specifically includes:

[0013] 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.

[0014] Step 2-2, adopt a meta-path-based neighborhood selection strategy to select node neighborhood information;

[0015] 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 different formula guidelines is obtained. By using a graph neural network to fuse each raw material and its corresponding neighborhood information, the feature expression of natural oil raw materials is enhanced, and a raw material recommendation set is constructed.

[0016] 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; First, perform a normalization operation on each feature. The formula is:

[0017] ,

[0018] 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;

[0019] Encode the features of the raw material nodes and formula nodes respectively through an encoder, as shown in formulas (1) and (2):

[0020] (1),

[0021] (2),

[0022] where , respectively represent the normalized feature vectors of the raw material nodes and the normalized feature vectors of the formula 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 formula nodes, and the input dimension is the number of formula node features; , respectively represent the feature vectors of the raw material nodes and the feature vectors of the formula nodes obtained after encoding processing;

[0023] Obtain the expressions of the raw material nodes and formula nodes in the meta-path after being processed by the encoder through formulas (1) and (2) , , , , where is obtained from the normalized features of the raw material node in the meta-path path through formula (1); Obtained from the normalized features of the raw material nodes in the meta-path path through formula (1); Obtained from the normalized features of the formula nodes in the meta-path path through formula (2); Obtained from the normalized features of the formula nodes in the meta-path path through formula (2);

[0024] As shown in formula (3), a long short-term memory network (LSTM) is used to fuse the meta-path information:

[0025] (3),

[0026] 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 is, 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 ; ;

[0027] Step 2-2 also includes: projecting into a query vector , projecting each meta-path fused information expression 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:

[0028] (4),

[0029] (5),

[0030] 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 Similarity between h and

[0031] Step 2-2 further includes: extracting the raw material nodes and formula node information in the meta-path as the neighborhood of the target node , set , 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, and using the message passing mechanism to complete the fusion of raw material node and neighborhood information. The formula is

[0033] (6),

[0034] , where 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 calculated through the attention mechanism; represents the feature expression of the raw material node after fusing the neighborhood information; represents the vector concatenation operation; represents the activation function:

[0035] ,

[0036] where is an intermediate parameter, generally taking 0.01;

[0037] Step 3 includes:

[0038] Step 3-1, constructing a meta-path under the specified raw materials and formulas: setting that the n-th raw material node in the s-th formula node needs to be replaced. First, calculate the cosine similarity between the features of other raw material nodes in the s-th formula node and the features of the target raw material node through formula (7), select the raw material node with the highest similarity, and set it 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 , select the formula node with the highest similarity, and set it as as the third hop of the meta-path; finally, calculate the formula node the characteristics of other raw material nodes in and the target raw material node the cosine similarity between the characteristics, select the raw material node with the highest similarity, and set it as :

[0039] (7),

[0040] where represents and the cosine similarity of, which is used to measure the similarity of the characteristics of the same type of nodes; represents the normalized representation of the target node characteristics, represents the normalized representation of the node characteristics 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 characteristic attributes. If calculating the cosine similarity of two formula nodes, , then it represents the expressions after normalization of the characteristics 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 allergy reaction rate; cos The value range is [-1, 1], and the larger this value, the higher the similarity of the characteristics of the two nodes.

[0041] Step 3-2, after obtaining the target meta-path adopt the method of Step 2 to obtain the raw materials in the formula the feature expression after fusing the neighborhood information under the guidance of ;

[0042] 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 , ;

[0043] The top ten feature expressions initially screened out 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;

[0044] 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 three items as recommendation results.

[0045] The present invention also provides an electronic device, comprising a processor and a memory, wherein the memory stores program code, and when the program code is executed by the processor, the processor executes the steps of the described method.

[0046] The present invention also provides a storage medium storing a computer program or instruction. When the computer program or instruction is run on a computer, the steps of the method described are executed.

[0047] Application scenarios of the method of the present invention:

[0048] Skin care product raw material replacement: The relationship between natural oil skin care product formulas and raw materials is established as a graph structure. Through graph neural networks, the intrinsic connections between formula raw materials can be better explored, so as to make better replacement choices.

[0049] Skin care product R & D: During the replacement process of raw materials for natural oil skin care product formulations, more formulation possibilities can be explored under the message passing mechanism of the graph neural network, thus developing more skin care products.

[0050] Beneficial effects: Compared with the replacement selection of raw materials relying on professional manual work, in the process of raw material replacement in the present invention, not only the property 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 those of the original component, but also pays more attention to the interaction and synergistic effect between various components in the entire formulation. In addition, this all-round evaluation method helps to discover new combination possibilities, thus providing support for innovation. This not only improves the R & D efficiency, but also helps to develop products with more excellent performance, meeting the market demand for high-quality and high-safety skin care products. Description of the Drawings

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

[0052] Figure 2 It is a schematic diagram of the recommended oil raw materials. Detailed Embodiments

[0053] The present invention will be further clarified below in conjunction with the drawings and specific embodiments. 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.

[0054] In a specific embodiment of the present invention, a method for replacing raw materials of a natural oil skin care product formulation based on a graph neural network is provided. The specific implementation scheme is as Figure 2 shown, including the following steps:

[0055] Step 1, construct a data set according to the natural oil formulation and raw material information, and establish a graph structure model between the oil formulation and raw materials;

[0056] 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 the 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;

[0057] Step 3, design a natural oil raw material replacement selection scheme to ensure that the replaced formulation achieves an optimal match in terms of stability and efficacy, effectively improving the overall quality of the skin care product formulation.

[0058] Step 1 specifically includes:

[0059] Step 1-1, under the guidance of professionals, 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 contained in each oil raw material, melting point, refractive index, moisturizing property, as well as the pH value, viscosity, antioxidant property, moisturizing effect, sun protection factor and allergy reaction rate of each formula.

[0060] 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, and the edges represent the connections between formulas and oil raw materials. If there is a belonging relationship between a formula and an oil raw material, there is a corresponding edge between the formula node and the raw material node, otherwise there is none; a 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 attribute information , and each formula node contains a feature vector describing style characteristic information .

[0061] Step 2 specifically includes:

[0062] 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 raw materials and formulas; through the neighborhood node information selected by the meta-path, the complex interaction relationship between raw materials and formulas can be captured more accurately.

[0063] Step 2-2, adopt a neighborhood selection strategy based on the meta-path to select node neighborhood information;

[0064] Step 2-3, construct a raw material recommendation set: After obtaining the neighborhood information of each raw material node under different formula guidelines through Step 2-1 and Step 2-2, fuse the features of each raw material and the corresponding neighborhood information through a graph neural network to enhance the feature expression of natural oil raw materials and construct a raw material recommendation set.

[0065] Step 2-2 includes: For a meta-path path, there must be 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, the meta-path information is integrated through the meta-path information fusion module:

[0066] First, perform a normalization operation on each feature. The formula is:

[0067] ,

[0068] 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;

[0069] Encode the features of the raw material nodes and the formula nodes through the encoder respectively, as shown in formulas (1) and (2):

[0070] (1),

[0071] (2),

[0072] where 、 respectively represent the normalized feature vectors of the raw material nodes and the formula 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 formula nodes, and the input dimension is the number of formula node features; 、 respectively represent the feature vectors of the raw material nodes and the formula node features obtained after encoding; The beneficial effect of 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;

[0073] Obtain the expressions of the features of the raw material nodes and the formula nodes in the meta-path after being processed by the encoder through formulas (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); The normalized features of the formula nodes in the meta-path path are obtained through Equation (2); The normalized features of the formula nodes in the meta-path path are obtained through Equation (2);

[0074] In fact, each meta-path is a sequential structure, reflecting the high-order connection relationship between raw material nodes and formula nodes;

[0075] As shown in Equation (3), a Long Short-Term Memory (LSTM) network is used to fuse the meta-path information:

[0076] (3),

[0077] 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 is the target node. Then under the guidance of the obtained meta-path is called the target meta-path, and the fused information expression is denoted as ; The beneficial effect of using the LSTM network to fuse the meta-path information is to capture the sequential dependence relationship 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.

[0078] 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 Equations (4) and (5), and obtaining the top five meta-paths with high similarity as the basis for selecting the node neighborhood:

[0079] (4),

[0080] (5),

[0081] 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, where d is the vector dimension; the softmax function is used to convert the dot product result into a probability distribution, ensuring 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;

[0082] 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 both the attributes of raw materials and formulas in the meta-path and their high-order connection relationships can be accurately matched. Node information is selected from these paths to enhance the target node representation, considering both its structural connectivity and the characteristics of the nodes themselves.

[0083] Step 2-2 also includes: extracting the raw material nodes 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 selected most relevant meta-paths; represents the set of raw material nodes in the target meta-path and the selected most relevant meta-paths.

[0084] 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 raw material nodes and neighborhood information. The formula is

[0085] (6),

[0086] where represents the normalized feature vector of the raw material node; represents the normalized feature vector of the formula node; represents the proportion of the i-th raw material node feature in the fused feature, represents the proportion of the j-th formula node feature 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 the neighborhood information; represents the activation function:

[0087] ,

[0088] where is an intermediate parameter, usually taken as 0.01;

[0089] By adopting the method of separately aggregating raw material node and formula node information, it is possible to effectively avoid the confusion of heterogeneous node information, making the results more reliable and easier to interpret, providing a solid foundation for the precise recommendation of subsequent raw materials.

[0090] By fusing the raw material node with 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 a specific formula.

[0091] Step 3 includes:

[0092] Step 3-1, constructing a meta-path under a specified raw material and formula: Generally, there is a complex many-to-many structural relationship between raw material nodes and formula nodes. Blindly selecting the target meta-path often fails to reflect the role of substitute raw materials in the formula and the synergy relationship between raw materials under the same formula, thus failing to achieve a good recommendation effect. Therefore, it is particularly important to design a reasonable meta-path selection strategy.

[0093] In fact, a target meta-path that meets expectations can be well constructed through the similarity principle. Because the similarity between the feature of raw material nodes in the meta-path "formula - raw material - formula - raw material" constructed based on the similarity principle is satisfied, and since the similarity between formula nodes is satisfied, the latter part "raw material - formula - raw material" in the meta-path can just reflect the high-order connection relationship between raw material nodes and formula nodes, that is, the synergy relationship between formula and raw materials.

[0094] Suppose due to reasons such as cost and inventory, now it is necessary to replace the nth raw material node in the s-th formula node . Select the raw material meta-path under the specified formula through the meta-path selection module. First, calculate the cosine similarity between the features of other raw material nodes in the s-th formula node and the target raw material node using formula (7), select the raw material node with the highest similarity, designated 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 feature of the formula node , select the formula node with the highest similarity, designated as , as the third hop of the meta-path; Finally, calculate the cosine similarity between the features of other raw material nodes in the formula node and the target raw material node , select the raw material node with the highest similarity, designated as , as the fourth hop of the meta-path; Thus, the target meta-path is formed :

[0095] (7),

[0096] where represents and 's cosine similarity, which is used to measure the similarity of feature vectors of nodes of the same type; 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 of two different formula node features after normalization and n = 6. At this time, represents the pH value, represents the viscosity, represents the antioxidant property, 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.

[0097] Step 3-2, after obtaining the target meta-path , adopt the method in Step 2 to obtain the raw materials in the formula the feature expression after fusing the neighborhood information under the guidance of ;

[0098] 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 , ; Since 's feature vector is composed of the fusion and splicing of all raw material 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;

[0099] The top ten feature expressions initially screened out are split into two parts ; where represents the feature expression after the fusion neighborhood information obtained by the raw material node c under the guidance of the formula l, that is, in formula (6) ; represents the fusion 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 , and , , where represents the raw material node under the guidance of the formula node the fusion expression of the raw material features, represents the fusion expression of the raw material features in; represents the raw material under the guidance of the formula the fusion expression of the formula features, represents the fusion expression of the formula features in;

[0100] Using formula (7), based on the fusion expression of the formula features and the cosine similarity of the top ten feature expressions is screened, and the top five most similar to are selected; on this basis, based on the fusion features of the raw materials and the cosine similarity is further screened , and the top three most similar to are selected, and the raw materials generating the three items are used as the recommended results.

[0101] In the following examples, the specification parameters of the raw materials and formulas are from the public data of a domestic daily chemical company.

[0102] In another specific embodiment of the present invention, a method for substituting and recommending natural oil formula raw materials based on bipartite graph path selection and graph neural network information aggregation strategy is provided. The raw material 0 in a certain formula a is selected as the implementation object, and the specific steps include:

[0103] 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; including the following steps:

[0104] Step 1-1: Extract the formula and raw material information of natural oil skin care products from literature, patents and experimental data. Under the guidance of professionals, 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. Table 1 includes characteristic information such as the proportion of natural components contained in each oil raw material, melting point, refractive index, moisture retention, etc., and Table 2 includes characteristic information such as the pH value, viscosity, antioxidant performance, moisturizing effect, SPF value, and allergic reaction rate of each formula.

[0105] Step 1-2: According to the ownership relationship between each skin care product formula and each oil raw material indicated in Table 3, 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 an ownership 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 only has an edge connection with the affiliated 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 .

[0106] Table 1

[0107] Type of oil and fat Oleic acid (%) Linoleic acid (%) Palmitic acid (%) Lauric acid (%) Linolenic acid (%) Melting point (°C) Refractive index Moisturizing property 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

[0108] Table 2

[0109]

[0110] Table 3

[0111] Formulation 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

[0112] Step 2: Enhance the characteristic expression of natural oil raw materials;

[0113] In the graph structure established in Step 1, adopt a neighborhood selection strategy based on meta-path to select neighbors to replace its direct neighbors, and fuse the neighborhood information through a graph neural network model to enhance the characteristic expression of the raw materials, and synchronously learn the connection relationship of natural oil raw materials and their node characteristics. The specific steps are as follows:

[0114] Step 2-1, construct a meta-path under the specified raw materials and formula through the meta-path selection module: Generally, there is a complex many-to-many structural relationship between raw materials and formulas. Blindly selecting the target meta-path often fails to reflect the role of the substituted raw materials in the formula and the synergistic relationship between raw materials under the same formula, thus failing to achieve a good recommendation effect. Therefore, it is particularly important to design a reasonable meta-path selection strategy.

[0115] In fact, the desired target meta-path 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. 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:

[0116] The characteristic data of formula a is , and the characteristic data of raw material is . Moreover, there are also raw materials , in formula a, and their characteristic data is , . Calculate their similarities with raw material respectively through formula (7):

[0117] The normalized characteristic vector values are:

[0118] = [0.7, 0.15, 0.1, 0, 0, 0.2, 0.23, 0.8, 0.5, 0.6];

[0119] = [0, 0.75, 0.15, 0.3, 0.5, 0.6857, 0.445, 0.9, 0.3, 0.5];

[0120] = [0.85, 0.1, 0.3, 0.2, 0, 0.5, 0.165, 0.7, 0.4, 0.9];

[0121] The similarity calculation results are: = 0.679, = 0.944. Select the raw material node with the highest similarity as the second hop of the meta-path; Next, calculate the other formulas where raw material is located , , and their characteristic data are , .

[0122] The cosine similarity with the formula characteristics is = 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.

[0123] Thus, the target meta-path is formed.

[0124] Step 2-2, obtain the fused representation through the meta-path information fusion module: As shown in formulas (1) and (2), extract the effective characteristics of the raw material nodes and formula nodes in

[0125] = = [0.62, 0.31, 0.45, 0.28, 0.57];

[0126] = = [0.71, 0.24, 0.53, 0.36, 0.49];

[0127] = = [0.67, 0.42, 0.78, 0.35, 0.59];

[0128] = = [0.58, 0.37, 0.85, 0.41, 0.63];

[0129] 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 :

[0130] = [0.645, 0.337, 0.652, 0.35, 0.55];

[0131] Step 2-3, screen the meta-paths similar to the target meta-path: After obtaining the fused representation of the specified meta-path information, the characteristics of the target path Project into query vectors Project the features of all candidate paths in the bipartite graph structure into key vectors 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:

[0132] = [0.6, 0.3, 0.9, 0.4, 0.7], = [0.7, 0.2, 0.8, 0.4, 0.6];

[0133] = [0.8, 0.1, 0.5, 0.5, 0.6], = [0.5, 0.4, 0.7, 0.3, 0.5];

[0134] = [0.4, 0.5, 0.6, 0.2, 0.4];

[0135] 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 fused feature expression obtained under the guidance of the formula in the recipe is:

[0136] = [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];

[0137] Step 3. Conduct replacement selection for natural oil raw materials;

[0138] 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:

[0139] Step 3-1. Calculate the cosine similarity between and each data in the raw material recommendation set using formula (7), sort and obtain the feature expressions of the top ten items most similar to , where : :

[0140] =[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];

[0141] =[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];

[0142] =[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];

[0143] =[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];

[0144] =[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];

[0145] =[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];

[0146] =[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];

[0147] =[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];

[0148] =[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];

[0149] =[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];

[0150] Since the eigenvector of is formed by fusing and splicing all the raw material and formulation features in the neighborhood, the recommendation result may be severely biased towards the expression of one side, which does not conform to the original design intention of the present invention. Therefore, it is necessary to further screen the recommendation result. Specifically, the preliminarily screened data needs to be split into two parts and , and then , and , are obtained in turn, and judgment and screening are carried out on the raw material features and formulation features:

[0151] =[2.38,0.77,0.96,0.83,0.54,1.43,2.16,2.29,1.72,2.27];

[0152] =[2.33,0.79,0.94,0.82,0.53,1.42,2.15,2.27,1.70,2.25];

[0153] =[2.41,0.63,0.88,0.53,0.61,1.65,2.68,2.51,1.94,2.89];

[0154] =[2.43,0.65,0.86,0.55,0.63,1.67,2.70,2.53,1.96,2.91];

[0155] =[2.39,0.61,0.90,0.51,0.59,1.63,2.66,2.49,1.92,2.87];

[0156] =[2.45,0.64,0.87,0.56,0.64,1.68,2.72,2.55,1.98,2.93];

[0157] =[2.38,0.62,0.89,0.52,0.60,1.64,2.67,2.50,1.93,2.88];

[0158] =[2.42,0.66,0.85,0.54,0.62,1.66,2.69,2.52,1.95,2.90];

[0159] =[2.37,0.60,0.91,0.50,0.58,1.62,2.65,2.48,1.91,2.86];

[0160] =[2.44,0.65,0.86,0.55,0.63,1.67,2.71,2.54,1.97,2.92];

[0161] =[2.37,0.76,0.96,0.84,0.54,1.43,2.16,2.28,1.72,2.27];

[0162] =[0.47,0.2,0.5,0.3,0.22,0.5], =[0.45,0.22,0.49,0.33,0.24,0.4];

[0163] =[0.61,0.45,0.32,0.76,0.46,0.36], =[0.63,0.47,0.34,0.78,0.48,0.38];

[0164] =[0.59,0.43,0.30,0.74,0.44,0.34], =[0.64,0.48,0.35,0.79,0.49,0.39];

[0165] =[0.60,0.44,0.31,0.75,0.45,0.35], =[0.62,0.46,0.33,0.77,0.47,0.37];

[0166] =[0.58, 0.42, 0.29, 0.73, 0.43, 0.33], =[0.63, 0.47, 0.34, 0.78, 0.48, 0.38];

[0167] =[0.47, 0.38, 0.52, 0.31, 0.41, 0.32];

[0168] 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):

[0169] = 0.994; = 0.873; = 0.877; = 0.868;

[0170] = 0.878; = 0.871; = 0.875; = 0.866;

[0171] = 0.877; = 0.948;

[0172] The calculated cosine similarities are sorted to obtain:

[0173] > > > > > > > > > ; Then, is selected. Based on this, the top three most similar are selected as the recommended results based on the fusion features, calculated by formula (1):

[0174] = 0.982; = 0.873; = 0.852;

[0175] = 0.821; = 0.936;

[0176] The calculated cosine similarities are sorted to obtain:

[0177] > > > > 。It can be seen from the calculation results that 、 、 the corresponding raw materials for generating should be recommended as a substitute for

[0178] Step 4, result evaluation;

[0179] To verify the effectiveness of the proposed method, 100 formulas were randomly selected from 158 formula raw materials for raw material substitution experiments. Table 4 shows the substitution recommendation results of oil raw materials in some formulas.

[0180] Table 4

[0181]

[0182] Calculate the availability rate η:

[0183] (8),

[0184] where n represents the number of formulas selected in the experiment. H1 represents the number of raw materials that can be used by experts;

[0185] It can be seen from the data in Table 4 that the substitution recommendation results of different oil raw materials under the same formula are different; the substitution recommendation results of the same raw material for different formulas are also different, verifying that the model not only considers the characteristic attributes of oil raw materials but also the coordination effect between raw materials during the recommendation process, making up for the deficiencies of manual recommendation based only on raw material attributes. The experimental results were analyzed by the method of expert evaluation, and the availability of the recommended raw materials was calculated through formula (8) to verify the effect of the model. Under the evaluation of professionals, 389 out of the 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 substitution of oil raw materials.

[0186] The present invention provides a method for replacing raw materials in a natural oil skin care product formula based on a graph neural network. There are many methods and ways to specifically implement this technical solution. The above description is only the preferred implementation manner 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 the formula of natural oil skin care products based on graph neural network, characterized in that, It includes the following steps: Step 1: Construct a dataset based on 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 meta-path-based neighborhood selection strategy 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 replacement selection scheme for natural oil raw materials to ensure that the formula after replacement achieves an optimal match in terms of stability and efficacy; Specifically, Step 1 includes: Step 1-1: Obtain the formula raw material composition 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 components contained in each oil raw material, melting point, refractive index, moisturizing property, as well as the pH value, viscosity, antioxidant performance, moisturizing effect, sun protection factor and allergy reaction rate of each formula; Step 1-2: Construct a bipartite graph structure model G(V, E) of all formulae and oil raw material data according to the belonging relationships between each skin care product formula and various oil raw materials; 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. An edge represents the connection between a formula and an oil raw material. If there is a belonging relationship between a formula and an oil raw material, there is a corresponding edge between the formula node and the raw material node; otherwise, there is no such edge. A 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 attribute information , and each formula node contains a feature vector describing style characteristic information ; Specifically, Step 2 includes: Step 2-1: Using the bipartite graph of formula raw materials, define the meta-path as: formula raw material formula raw material, where the symbol represents the sequential relationship in the meta-path selection process; 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 obtaining the neighborhood information of each raw material node under different formula guidelines through Step 2-1 and Step 2-2, fuse the information of each raw material and its corresponding neighborhood through a graph neural network to enhance the feature expression of the natural oil raw materials and construct a raw material recommendation set; Step 3 includes: Step 3-1, constructing a meta-path under specified raw materials and formulations: Set that it is necessary to replace the nth raw material node in the s-th formulation node . First, calculate the cosine similarity between the features of other raw material nodes and the target raw material node in the s-th formulation node through 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 the other formulation nodes where the raw material node is located and the features of the formulation node , select the formulation 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 and the target raw material node in the formulation 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 cosine similarity; 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; Step 3-2, obtaining the target meta-path After that, adopt the method in Step 2 to obtain raw materials In the formula The feature representation after fusing neighborhood information under the guidance ; Step 3-3, calculate the feature expression using formula (7) the cosine similarity between each data in the raw material recommendation set, sort and obtain the top ten feature expressions that are most similar , ; The top ten feature expressions preliminarily screened out are split into two parts ; among them represents the feature expression after the fusion neighborhood information obtained by the raw material node c under the guidance of the formula l; represents the fusion expression of the formula features obtained by the raw material node c under the guidance of the formula l; and so on 、 and 、 ; among them represents the raw material node under the guidance of the formula node the fusion expression of the raw material features, represents the fusion expression of the raw material features therein; represents the raw material under the guidance of the formula the fusion expression of the formula features, represents the fusion expression of the formula features therein; Fusion expression based on formula (7) for formulation features With The cosine similarity of the top ten feature expressions Is screened, and the top five most similar to Are selected; On this basis, based on the fusion features of the raw materials And The cosine similarity is further screened , And the top three most similar to Are selected, and the raw materials that generate the top three are used as the recommended results.

2. The method according to claim 1, characterized in that 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 the formula nodes respectively through an encoder, as shown in Formulas (1) and (2): (1), (2), Among them and respectively represent the feature vectors of the normalized raw material nodes and the feature vectors of the normalized formula 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 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 feature vectors of the formula nodes obtained after the encoding process; The representations of the raw material nodes and formula nodes in the meta-path after being processed by the encoder are obtained through formulas (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 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); As shown in Formula (3), adopt a long short-term memory network LSTM to fuse the meta-path information: (3) , Among them corresponds to the node order in the meta-path path; h represents the expression of the fusion information of a meta-path, and it is assumed that the raw material node under the formula node to be replaced currently is , then is the target node, and the meta-path obtained under the guidance of is called the target meta-path, and the expression of the fusion information is denoted as . .

3. The method according to claim 2, wherein Step 2-2 further includes: projecting into a query vector , projecting the fusion information expression of each meta-path in the bipartite graph structure into a key vector , calculating attention scores through formulas (4) and (5), obtaining the top five meta-paths with high similarity, and using them as the basis for selecting node neighborhoods: (4), (5), Among them , are weight matrices, which are respectively used to convert the feature vectors of the meta - paths into query vectors and key vectors ; is a scaling factor, and d is the vector dimension; denotes the similarity between 4. The method according to claim 3, wherein Step 2-2 further includes: extracting the raw material nodes 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.

5. The method according to claim 4, characterized in that Step 2-3 includes: Design a single-layer graph neural network, and use the message passing mechanism to complete the fusion of the raw material nodes and the neighborhood information. The formula is (6), Among them, represents the normalized eigenvector of the raw material node; represents the normalized eigenvector 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; represents the feature expression after the raw material node fuses the neighborhood information; represents the vector concatenation operation; represents the activation function.

6. An electronic device, characterized in that, It includes a processor and a memory. The memory stores program codes. 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 5.

7. A storage medium, characterized in that, Store a computer program or instruction. When the computer program or instruction runs on a computer, it executes the steps of the method according to any one of Claims 1 to 5.

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