Cosmetic quality management method and device based on mapping knowledge domain, medium and equipment

By acquiring cosmetic production line data and knowledge content based on knowledge graphs, generating fused data and evaluating quality, and providing adjustment strategies, the problem of unstable quality in the cosmetic production process is solved, and efficient and accurate quality management and improvement solutions are achieved.

CN121599552AActive Publication Date: 2026-03-03GUANGZHOU JINNUODA INFORMATION TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202610113906.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-01-28
Publication Date
2026-03-03
Estimated Expiration
2046-01-28

AI Technical Summary

Technical Problem

In the cosmetics production process, quality instability affects the safety and reliability of use. Existing quality inspection methods are inefficient and difficult to provide effective improvement solutions.

Method used

A knowledge graph-based approach is used to acquire target batch data of cosmetic production lines, query knowledge content that matches production parameters, generate fused data, extract feature information through a feature extraction network, determine quality assessment results, and generate adjustment strategies.

Benefits of technology

It enables efficient and accurate cosmetic quality assessment and automatically provides production quality improvement solutions, thereby improving the stability and safety of cosmetic quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121599552A_ABST
    Figure CN121599552A_ABST
Patent Text Reader

Abstract

The invention discloses a cosmetic quality management method and device based on a knowledge graph, a medium and equipment. The method comprises the following steps: acquiring target batch data; querying knowledge content matched with the production parameters and / or the cosmetic production line from a cosmetic field knowledge graph; based on the target batch data and the knowledge content, generating fusion data; a feature extraction network is called, feature information of the fused data is extracted, the feature extraction network is obtained through pre-training according to sample data and associated data of the sample data, the sample data comprises sample batch data and sample knowledge content, and the associated data comprises associated knowledge content; the cosmetic field knowledge graph comprises associated knowledge content and sample knowledge content; based on the feature information, determining a cosmetic quality evaluation result corresponding to the target batch data; based on the cosmetic quality evaluation result, an adjustment strategy for the produced cosmetics is generated, the cosmetic quality can be efficiently and accurately evaluated, and a cosmetic production quality improvement scheme can be automatically provided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a cosmetics quality management method, apparatus, medium and equipment based on knowledge graphs. Background Technology

[0002] When producing cosmetics, the quality of the cosmetics is easily affected by factors in various stages of the production process and environmental factors, which can lead to unstable quality and affect the safety and reliability of the cosmetics.

[0003] In related technologies, quality inspectors are usually assigned to inspect each batch of cosmetics. However, this method is not only inefficient, but also fails to provide effective solutions for improving the quality of cosmetic production. Summary of the Invention

[0004] To address the aforementioned technical issues, this application proposes a cosmetics quality management method, apparatus, medium, and equipment based on knowledge graphs. This method can efficiently and accurately assess cosmetics quality and automatically provide effective solutions for improving cosmetics production quality.

[0005] In a first aspect, embodiments of this application provide a cosmetic quality management method based on a knowledge graph, comprising: Obtain target batch data of cosmetics produced by the cosmetics production line; From the knowledge graph of the cosmetics field, query knowledge content that matches the production parameters and / or the cosmetics production line, wherein the production parameters correspond to the target batch data; Based on the target batch data and the knowledge content, fused data is generated; The feature extraction network is invoked to extract feature information from the fused data. The feature extraction network is pre-trained based on sample data and related data of the sample data. The sample data includes sample batch data and sample knowledge content. The related data includes related knowledge content. The cosmetics domain knowledge graph includes the related knowledge content and the sample knowledge content. Based on the aforementioned feature information, the cosmetic quality assessment result corresponding to the target batch data is determined; Based on the cosmetic quality assessment results, an adjustment strategy is generated for the cosmetics produced.

[0006] Optionally, the training process of the feature extraction network includes: Obtain the sample data and the associated data; The network to be trained is invoked to extract features from the sample data to obtain sample data feature information; The network to be trained is invoked to extract features from the associated data to obtain associated data feature information; Based on the difference between the feature information of the sample data and the feature information of the associated data, the network to be trained is iteratively trained to obtain the feature extraction network after the iterative training is completed.

[0007] Optionally, the step of iteratively training the network to be trained based on the difference between the sample data feature information and the associated data feature information includes: Based on the difference between the feature information of the sample data and the feature information of the associated data, the feature loss is determined; The network to be trained is iteratively trained with the goal of minimizing the feature loss.

[0008] Optionally, determining the cosmetic quality assessment result corresponding to the target batch data based on the feature information includes: The artificial intelligence model is invoked to determine the quality assessment result of the cosmetics based on the feature information, wherein the artificial intelligence model is obtained by training the student model based on the teacher model and sample features; The training process of the artificial intelligence model includes: Obtain the teacher-level quality assessment results of the teacher model regarding the sample features; Obtain the student-level quality assessment results of the student model regarding the sample features; Extract the corresponding batch data impact information and knowledge impact information from the teacher-level quality assessment results, and extract the corresponding batch data impact information and knowledge impact information from the student-level quality assessment results; The student model is trained based at least on the differences between the batch data impact information corresponding to the teacher-level quality assessment results and the student-level quality assessment results, and the differences between the knowledge impact information corresponding to the teacher-level quality assessment results and the student-level quality assessment results.

[0009] Optionally, the step of extracting corresponding batch data impact information and knowledge impact information from the teacher-level quality assessment results, and from the student-level quality assessment results, includes: For each of the teacher-level quality assessment results and the student-level quality assessment results The quality assessment result is transformed into N target spaces to obtain the spatial representations corresponding to each of the N target spaces, where N is a positive integer; Extract the batch data space information and knowledge space information corresponding to each target space from the spatial representation corresponding to each target space; Based on the batch data spatial information corresponding to each of the N target spaces, the batch data impact information corresponding to the quality assessment result is determined, and based on the knowledge spatial information corresponding to each of the N target spaces, the knowledge impact information corresponding to the quality assessment result is determined.

[0010] Optionally, training the student model based at least on the differences between the batch data impact information corresponding to the teacher-level quality assessment results and the student-level quality assessment results, and the differences between the knowledge impact information corresponding to the teacher-level quality assessment results and the student-level quality assessment results, includes: Based on the differences between the batch data impact information corresponding to the teacher-level quality assessment results and the student-level quality assessment results, the batch data impact loss is determined. Based on the differences in knowledge impact information corresponding to the teacher-level quality assessment results and the student-level quality assessment results, the knowledge impact loss is determined. A comprehensive loss is determined based on at least one of the first quality assessment loss and the second quality assessment loss, as well as the batch data impact loss and the knowledge impact loss. The first quality assessment loss is determined based on the difference between the teacher-level quality assessment result and the student-level quality assessment result, and the second quality assessment loss is determined based on the difference between the student-level quality assessment result and the quality assessment label corresponding to the sample feature. The student model is trained based on the comprehensive loss.

[0011] Optionally, before obtaining the student-level quality assessment results of the student model regarding the sample features, the training process of the artificial intelligence model further includes: Determine the first network weights associated with the teacher model in the process of generating the teacher-level quality assessment results; The first network weights are mapped to the student model network weight space to obtain the second network weights, wherein the student model network weight space corresponds to the student model; The network weights of the student model are adjusted using the second network weights.

[0012] Secondly, embodiments of this application provide a cosmetic quality management device based on a knowledge graph, comprising: The batch data acquisition module is used to acquire target batch data of cosmetics produced by the cosmetic production line. The knowledge module is used to query knowledge content that matches the production parameters and / or the cosmetic production line from a knowledge graph in the cosmetic field, wherein the production parameters correspond to the target batch data; The fusion module is used to generate fused data based on the target batch data and the knowledge content; The feature extraction module is used to call the feature extraction network to extract feature information from the fused data. The feature extraction network is pre-trained based on sample data and related data of the sample data. The sample data includes sample batch data and sample knowledge content. The related data includes related knowledge content. The cosmetics domain knowledge graph includes the related knowledge content and the sample knowledge content. The quality assessment module is used to determine the cosmetic quality assessment result corresponding to the target batch data based on the feature information; The strategy generation module is used to generate adjustment strategies for the produced cosmetics based on the cosmetics quality assessment results.

[0013] Thirdly, embodiments of this application provide a non-transitory computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the method described in any of the above-mentioned embodiments.

[0014] Fourthly, embodiments of this application provide a computer device including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor executes the computer program to implement the steps of the method described in any of the preceding claims.

[0015] In summary, the embodiments of this application have at least the following beneficial effects: Using the embodiments of this application, target batch data of cosmetics produced by a cosmetic production line is obtained; knowledge content matching the production parameters and / or the cosmetic production line is queried from a cosmetic domain knowledge graph, wherein the production parameters correspond to the target batch data; fused data is generated based on the target batch data and the knowledge content; a feature extraction network is invoked to extract feature information from the fused data, wherein the feature extraction network is pre-trained based on sample data and the associated data of the sample data, the sample data includes sample batch data and sample knowledge content, the associated data includes associated knowledge content, and the cosmetic domain knowledge graph includes the associated knowledge content and the sample knowledge content; based on the feature information, a cosmetic quality assessment result corresponding to the target batch data is determined; based on the cosmetic quality assessment result, an adjustment strategy for the produced cosmetics is generated. Thus, cosmetic quality can be assessed efficiently and accurately, and effective cosmetic production quality improvement solutions can be automatically provided. Attached Figure Description

[0016] Figure 1 This is a flowchart illustrating the cosmetic quality management method based on knowledge graphs provided in an embodiment of this application. Figure 2 This is a schematic diagram of the structure of the cosmetic quality management device based on knowledge graph provided in the embodiments of this application; Figure 3 This is a schematic diagram of the structure of the computer device provided in the embodiments of this application. Detailed Implementation

[0017] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments / examples are only a part of the embodiments / examples of this application, and not all of the embodiments / examples. Based on the embodiments / examples in this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0018] In the description of this application, the terms "first," "second," "third," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Therefore, a feature defined with "first," "second," "third," etc., may explicitly or implicitly include one or more of that feature. In the description of this application, unless otherwise stated, "multiple" means two or more. In the description of this application, the term "comprising" and its variations are open-ended, meaning "including but not limited to." The term "based on" means "at least partially based on." The term "according to" means "at least partially according to." The term "one embodiment / example" means "at least one embodiment / example"; the term "another embodiment / example" means "at least one additional embodiment / example"; the term "some embodiments / examples" means "at least some embodiments / examples."

[0019] In the description of this application, it should be noted that, unless otherwise expressly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection between two components. Those skilled in the art can understand the specific meaning of the above terms in this application based on the specific circumstances.

[0020] In the description of this application, it should be noted that, unless otherwise defined, all technical and scientific terms used in this application have the same meaning as commonly understood by one of ordinary skill in the art. The terminology used in this application is for the purpose of describing specific embodiments only and is not intended to limit the application. Those skilled in the art can understand the specific meaning of the above terms in this application according to the specific circumstances.

[0021] Firstly, see [the following] Figure 1 The diagram illustrates a flowchart of a knowledge graph-based cosmetic quality management method provided in this application embodiment. This knowledge graph-based cosmetic quality management method can be applied to a computer device with data processing capabilities. The method includes steps S101-S106, as detailed below.

[0022] S101, Obtain target batch data of cosmetics produced by the cosmetics production line.

[0023] In some examples, the target batch data may include at least one of the following: test data obtained from testing the produced cosmetics, raw material data corresponding to the produced cosmetics, and process data of the cosmetics production line.

[0024] For example, the aforementioned detection data may include at least one of the following: the pH value of the cosmetic (normal pH value can be 6.1 to 6.3, preferably 6.2), viscosity (normal viscosity can be... to ), heavy metal (e.g., may include lead) content (normal heavy metal content can be below) ), and the concealing power test value of concealer cosmetics.

[0025] For example, the above raw material data may include at least one of the following: the viscosity and / or purity of silicone oil (i.e., skin-feeling ingredient), the addition ratio of moisturizer (e.g., glycerin) (by weight, the normal addition ratio can be 7% to 9%), and the addition ratio of titanium dioxide (concealing ingredient) in concealing cosmetics (by weight, the normal addition ratio can be 4.5% to 5.5%).

[0026] For example, the above-mentioned process data may include at least one of the following: a temperature profile of the emulsification stage (which can be used to indicate the emulsification temperature and heat preservation time of the cosmetic; the normal emulsification temperature can be 83°C to 88°C, preferably 85°C; the normal heat preservation time can be 110 min to 130 min, preferably 120 min); and stirring speed (the normal stirring speed can be 110 min to 130 min, preferably 120 min). to ), stirring time (normal stirring time can be 30 minutes), and filling accuracy in the filling process (can be used to indicate the filling quality error between different bottles of cosmetics in the same batch).

[0027] S102, query the knowledge content that matches the production parameters and / or the cosmetic production line from the cosmetic knowledge graph, wherein the production parameters correspond to the target batch data.

[0028] In some examples, the knowledge content may include: knowledge in the cosmetics domain knowledge graph that has a similarity to production parameters that is higher than a preset first similarity threshold, and / or, knowledge in the cosmetics domain knowledge graph that has a similarity to production line parameters of the cosmetics production line that is higher than a preset second similarity threshold.

[0029] In some examples, the production parameters may include parameters corresponding to the aforementioned raw material data and / or process data during the production of the cosmetics for the target batch data.

[0030] In some examples, this knowledge content may include at least one of the following: raw material-related knowledge, process-related knowledge, and testing quality standard knowledge. For example, the raw material-related knowledge may include at least one of the following: the concealing power achievement rate corresponding to different addition ratios of titanium dioxide, and the skin smoothness corresponding to different viscosities and / or purities of silicone oil and / or different addition ratios of glycerin. The process-related knowledge may include at least one of the following: the emulsification uniformity corresponding to different temperature profiles during the emulsification stage, and the raw material dispersion corresponding to different stirring speeds and / or stirring durations. The testing quality standard knowledge may include at least one of the following: the skin irritation level corresponding to different pH values ​​of cosmetics, and the cosmetic safety standards corresponding to different heavy metals.

[0031] In some examples, at least a portion of the knowledge in a cosmetics knowledge graph can be categorized into standard-constrained knowledge and experiential knowledge. Standard-constrained knowledge can be knowledge with clearly defined standards (e.g., industry standards, cosmetic safety standards), while experiential knowledge can be knowledge obtained through statistical analysis of historical batch data. For example, the aforementioned raw material-related knowledge, or at least a portion thereof, can be categorized into standard-constrained knowledge and experiential knowledge; and / or, the aforementioned process-related knowledge, or at least a portion thereof, can be categorized into standard-constrained knowledge and experiential knowledge.

[0032] S103, Generate fused data based on the target batch data and the knowledge content.

[0033] In some examples, this knowledge content can be incorporated into the target batch of data to form the fused data.

[0034] S104, invoke the feature extraction network to extract feature information from the fused data. The feature extraction network is pre-trained based on sample data and related data of the sample data. The sample data includes sample batch data and sample knowledge content. The related data includes related knowledge content. The cosmetics domain knowledge graph includes the related knowledge content and the sample knowledge content.

[0035] In some examples, the associated data may also include historical associated batch data. This historical associated batch data may be data with the same dimension as the sample data (for example, the same dimension may mean that the data types contained are the same, and the type can refer to the data types contained in the target batch data mentioned above), but the specific values ​​may differ. This historical associated batch data can be used to characterize the batch characteristics under non-optimal and / or abnormal operating conditions. In this case, the associated data can be used as a negative sample to control the direction of training. Alternatively, the historical associated batch data can also be used to characterize the batch characteristics under optimal operating conditions, that is, the associated data can be used as a positive sample to control the direction of training.

[0036] Similarly, the associated knowledge content can also be knowledge in the same dimension as the sample knowledge content, but the specific content may differ, so as to control the direction of training as negative or positive samples.

[0037] In some examples, a general encoder can be used as the feature extraction network.

[0038] S105, Based on the feature information, determine the cosmetic quality assessment result corresponding to the target batch data.

[0039] In some examples, the cosmetic quality assessment result may be a comprehensive evaluation of testing-related quality assessment results, raw material quality assessment results, and / or process quality assessment results. Alternatively, the cosmetic quality assessment result may include testing-related quality assessment results, raw material quality assessment results, and / or process quality assessment results. For example, the testing-related quality assessment result may include quality scores corresponding to at least a portion of the aforementioned testing data; the raw material quality assessment result may include quality scores corresponding to at least a portion of the aforementioned raw material data; and the process quality assessment result may include quality scores corresponding to at least a portion of the aforementioned process data.

[0040] In some examples, this feature information can be transformed into the feature space of a large model to obtain transformed feature information. The cosmetic quality assessment prompts and this transformed feature information are then input into the large model to obtain the cosmetic quality assessment results output by the large model. The cosmetic quality assessment prompts can be used to guide the large model to perform cosmetic quality assessments based on the transformed feature information. These prompts can be obtained by the user filling in information into a cosmetic quality assessment prompt template; the filled information can include keywords related to the quality indicators the user hopes to improve.

[0041] S106, Based on the cosmetic quality assessment results, generate an adjustment strategy for the produced cosmetic.

[0042] In some cases, altering any single related parameter during cosmetic production can lead to inconsistencies with other parameters, resulting in poor quality cosmetics. For example, increasing the proportion of titanium dioxide in a cosmetic (e.g., to 7%) to enhance coverage without simultaneously adjusting the amount of silicone oil and the emulsification stirring speed may result in insufficient dispersion of titanium dioxide particles, leading to a grainy texture, cakey application, and a dry feel on the skin. Alternatively, reducing the emulsification and heat preservation time of foundation to 60 minutes to shorten the production cycle without simultaneously increasing the emulsification temperature and stirring power may cause uneven mixing of raw materials and an unstable emulsion system, resulting in layering, clumping, and a significantly shortened shelf life in the finished cosmetic.

[0043] Therefore, this embodiment can generate an adjustment strategy that comprehensively considers various factors in the cosmetic quality assessment results, based on the cosmetic quality assessment results. This strategy can be used to make targeted adjustments to the produced cosmetics, thereby improving the quality of the next batch of cosmetics produced after the adjustment strategy is implemented, and thus achieving iterative optimization of cosmetic production quality.

[0044] It is easy to understand here that this embodiment can improve the reliability of the adjustment strategy by improving the accuracy of cosmetic quality assessment.

[0045] In some examples, the adjustment strategy may include a raw material adjustment strategy and / or a process adjustment strategy. The raw material adjustment strategy may include an adjustment strategy for the addition ratio of at least a portion of the above-mentioned raw material data, and the process adjustment strategy may include an adjustment strategy for at least a portion of the above-mentioned process data.

[0046] In some examples, a pre-trained policy generation model can be used to determine adjustment strategies based on cosmetic quality assessment results. This policy generation model can be a trained model capable of predicting using cosmetic quality assessment results as input and adjustment strategies as output. During training, cosmetic quality assessment samples can be used as sample data (the sample data also carries the expected corresponding strategy label, which represents the corresponding expected adjustment strategy). The predicted adjustment strategy generated by the model based on the sample data is obtained. Based on the difference between the predicted adjustment strategy and the expected adjustment strategy represented by the label, a general loss function is used to calculate the loss value. Based on the loss value, a general training algorithm (such as gradient descent) is used to train the model so that the trained model can have the above-mentioned capabilities. For example, the model may include an input representation layer, a feature fusion and representation layer, and a prediction output layer. The input representation layer can receive data from the input model and convert the data into the desired feature vector form. For example, the input representation layer can use word embeddings or pre-trained language models (such as bidirectional language representation models based on the Transformer architecture) to generate semantic vectors, and / or use embedding layers to generate dense vectors. The feature fusion and representation layer can be used to fuse the feature vectors converted by the input representation layer. For example, the feature fusion and representation layer can implement the fusion through fully connected layers or attention mechanism layers. The prediction output layer can be used to generate prediction results based on the fused features. For example, the prediction output layer can use a softmax layer to output the probability distribution for different categories, and then output the prediction result based on the probability (for example, it can output the top one or more classification results with the highest probability as the prediction result).

[0047] In one optional implementation, the training process of the feature extraction network includes: Obtain the sample data and the associated data; The network to be trained is invoked to extract features from the sample data to obtain sample data feature information; The network to be trained is invoked to extract features from the associated data to obtain associated data feature information; Based on the difference between the feature information of the sample data and the feature information of the associated data, the network to be trained is iteratively trained to obtain the feature extraction network after the iterative training is completed.

[0048] In some examples, the network to be trained can be a hybrid network built on CNN (Convolutional Neural Network) and MLP (Multilayer Perceptron). The CNN is suitable for extracting local features from time-series and / or curve-like data in the sample data, while the MLP is suitable for extracting features from structured data such as raw material data and / or process data. The network to be trained is suitable for concatenating the features extracted and output by the CNN and the MLP respectively to form the output features of the network to be trained. In other examples, the network to be trained can also adopt a Transformer network architecture.

[0049] In one optional implementation, the iterative training of the network to be trained based on the difference between the sample data feature information and the associated data feature information includes: Based on the difference between the feature information of the sample data and the feature information of the associated data, the feature loss is determined; The network to be trained is iteratively trained with the goal of minimizing the feature loss.

[0050] In this embodiment, the historical associated batch data can be used to characterize the batch characteristics under the optimal working condition. That is, the associated data can be used as positive samples to control the direction of training. Thus, when minimizing feature loss, the network to be trained can adjust its parameters in the direction of outputting associated data feature information that is closer to the optimal working condition, and complete the iterative training of the model.

[0051] In some examples, this feature loss can be obtained by calculating the cosine similarity (cosine distance) between the two types of feature information. For example, the cosine similarity can be calculated using the following formula.

[0052] , in, Represents cosine similarity. , These represent the two types of feature information for which cosine similarity needs to be calculated. Represents the vector dot product. This represents the L2 norm of a vector.

[0053] In some examples, the feature loss can also be obtained by calculating the Euclidean distance and / or KL divergence (Kullback-Leibler divergence) between the two types of feature information.

[0054] Furthermore, the feature loss can also be obtained by calculating at least two of the cosine similarity, Euclidean distance, and KL divergence mentioned above. In this case, the calculated at least two values ​​can be weighted and summed to obtain the feature loss.

[0055] In one optional implementation, determining the cosmetic quality assessment result corresponding to the target batch data based on the feature information includes: The artificial intelligence model is invoked to determine the quality assessment result of the cosmetics based on the feature information, wherein the artificial intelligence model is obtained by training the student model based on the teacher model and sample features; The training process of the artificial intelligence model includes: Obtain the teacher-level quality assessment results of the teacher model regarding the sample features; Obtain the student-level quality assessment results of the student model regarding the sample features; Extract the corresponding batch data impact information and knowledge impact information from the teacher-level quality assessment results, and extract the corresponding batch data impact information and knowledge impact information from the student-level quality assessment results; The student model is trained based at least on the differences between the batch data impact information corresponding to the teacher-level quality assessment results and the student-level quality assessment results, and the differences between the knowledge impact information corresponding to the teacher-level quality assessment results and the student-level quality assessment results.

[0056] In some examples, the teacher model can adopt the aforementioned large model. It should be understood that although the large model has higher evaluation accuracy, the computing power required to call the large model is also relatively high, and the requirements for computing hardware, power supply, etc. are relatively high when deployed locally, making local deployment more difficult. Therefore, in this embodiment, an artificial intelligence model suitable for local deployment can be obtained by using the teacher model (large model) in combination with sample features to train the student model, while at the same time trying to improve the evaluation ability of the artificial intelligence model to be close to that of the teacher model (large model).

[0057] In some examples, the teacher-level quality assessment result can be the output information of the teacher model obtained by inputting the sample features into the teacher model, and the student-level quality assessment result can be the output information of the student model obtained by inputting the sample features into the student model.

[0058] In some examples, the batch data impact information may include at least one of the following: raw material batch data impact information, process batch data impact information, and testing batch data impact information.

[0059] In some examples, the knowledge impact information may include at least one of the following: standard constraint knowledge impact information, experience association knowledge impact information.

[0060] In some examples, the student model can be trained by calculating the combined loss based solely on the batch data impact loss calculated from the difference between the batch data impact information corresponding to the teacher-level quality assessment results and the student-level quality assessment results, and the knowledge impact loss calculated from the difference between the knowledge impact information corresponding to the teacher-level quality assessment results and the student-level quality assessment results.

[0061] In one optional implementation, the step of extracting corresponding batch data impact information and knowledge impact information from the teacher-level quality assessment results, and from the student-level quality assessment results, includes: For each of the teacher-level quality assessment results and the student-level quality assessment results The quality assessment result is transformed into N target spaces to obtain the spatial representations corresponding to each of the N target spaces, where N is a positive integer; Extract the batch data space information and knowledge space information corresponding to each target space from the spatial representation corresponding to each target space; Based on the batch data spatial information corresponding to each of the N target spaces, the batch data impact information corresponding to the quality assessment result is determined, and based on the knowledge spatial information corresponding to each of the N target spaces, the knowledge impact information corresponding to the quality assessment result is determined.

[0062] In some examples, determining the batch data impact information corresponding to the quality assessment result based on the batch data spatial information corresponding to each of the N target spaces may include: obtaining the spatial importance weight corresponding to each target space, wherein the spatial importance weight is determined according to the ratio of the between-group variance to the within-group variance of the target space in historical batch data, the between-group variance representing the variance between different batches of data in historical batch data, and the within-group variance representing the variance between data within the same batch of data in historical batch data; and weighting and fusing the batch data spatial information corresponding to each of the N target spaces based on the spatial importance weight to obtain the batch data impact information.

[0063] In some examples, determining the knowledge impact information corresponding to the quality assessment result based on the knowledge space information corresponding to each of the N target spaces may include: obtaining the knowledge weight corresponding to each of the target spaces, wherein the knowledge weight is determined according to the ratio of the within-group variance to the total variance, and the total variance is the sum of the between-group variance and the within-group variance; and weighting and fusing the knowledge space information corresponding to each of the N target spaces based on the knowledge weight to obtain the knowledge impact information.

[0064] In some examples, the above N target spaces may include at least one of the following: The potential space, and the corresponding spatial characterization, are suitable for indicating the nonlinear coupling relationship between raw materials, processes, and testing quality. The target space for raw material proportions can be represented by at least one of the following dimensions: raw material type dimension, raw material addition ratio dimension, raw material purity dimension, and raw material supplier batch dimension. The target space of process parameters can be represented by at least one of the following dimensions: emulsification temperature, stirring speed, heat preservation time, and filling accuracy. The target space of physicochemical indicators can be represented by at least one of the following dimensions: pH value, viscosity, heavy metal content, and microbial quantity. The efficacy and performance target space can be represented by at least one of the following dimensions: concealing power dimension, moisturizing duration dimension, and skin feel rating dimension.

[0065] In some examples, for the spatial representation corresponding to the aforementioned latent space, since the spatial representation is a latent feature learned by the model, it is difficult to extract it directly. Therefore, the extraction of the spatial representation can be completed by clustering the feature vector of the latent feature (the feature vector of the latent feature can be obtained by transforming the quality assessment result into the latent space / latent space). This results in the batch data spatial information and knowledge spatial information corresponding to the latent space formed by clustering.

[0066] In some examples, for the target spaces other than the potential space, the spatial representation corresponding to the target space can be extracted based on whether the corresponding data has data class attributes (such as objective numerical or state-type data attributes) or knowledge class attributes (such as rule, standard, or experience-type data attributes). The representation information with data class attributes of the corresponding data is extracted from the spatial representation to serve as batch data spatial information, and the representation information with knowledge class attributes of the corresponding data is extracted from the spatial representation to serve as knowledge spatial information.

[0067] In one optional implementation, training the student model based at least on the differences between batch data impact information corresponding to the teacher-level quality assessment results and the student-level quality assessment results, and the differences between knowledge impact information corresponding to the teacher-level quality assessment results and the student-level quality assessment results, includes: Based on the differences between the batch data impact information corresponding to the teacher-level quality assessment results and the student-level quality assessment results, the batch data impact loss is determined. Based on the differences in knowledge impact information corresponding to the teacher-level quality assessment results and the student-level quality assessment results, the knowledge impact loss is determined. A comprehensive loss is determined based on at least one of the first quality assessment loss and the second quality assessment loss, as well as the batch data impact loss and the knowledge impact loss. The first quality assessment loss is determined based on the difference between the teacher-level quality assessment result and the student-level quality assessment result, and the second quality assessment loss is determined based on the difference between the student-level quality assessment result and the quality assessment label corresponding to the sample feature. The student model is trained based on the comprehensive loss.

[0068] In some examples, this embodiment may train the student model with the objective of minimizing the integrated loss. The integrated loss can be used to indicate whether the knowledge affects the loss when it is minimized, and whether the batch of data affects the loss when it is minimized.

[0069] In some examples, any one or more of the batch data impact loss, knowledge impact loss, first quality assessment loss, and second quality assessment loss mentioned above can be calculated using at least one of the cosine similarity, Euclidean distance, and KL divergence mentioned above. The specific calculation method can be referred to the description related to feature loss mentioned above, and will not be repeated here.

[0070] It is understandable that, in actual production, samples within the same batch may be highly similar due to shared raw materials, equipment, and environment, but there may be systematic deviations between samples from different batches (such as new emulsifiers, changes in temperature and humidity). If the loss between the teacher-level quality assessment results and the student-level quality assessment results is directly calculated and the student model is trained accordingly, the student model will learn both knowledge and batch noise at the same time, resulting in unstable assessment performance of the student model in different batches.

[0071] In this embodiment, the batch data impact loss and knowledge impact loss are calculated separately first, and then the comprehensive loss is re-determined. The knowledge impact loss can be used to force the student model to imitate the teacher model's judgment on essential knowledge features, thereby strengthening the student model's ability in this aspect. The batch data impact loss can also be used to discourage the student model from replicating the teacher model's batch bias.

[0072] In one optional implementation, before obtaining the student-level quality assessment results of the student model regarding the sample features, the training process of the artificial intelligence model further includes: Determine the first network weights associated with the teacher model in the process of generating the teacher-level quality assessment results; The first network weights are mapped to the student model network weight space to obtain the second network weights, wherein the student model network weight space corresponds to the student model; The network weights of the student model are adjusted using the second network weights.

[0073] It is understandable that since student models are usually smaller than teacher models (e.g. fewer layers, fewer channels), random initialization is difficult to effectively mimic the complex decision boundaries of the teacher model. If random weights are used directly to set the initial student model, the output of the initial student model will easily be noisy, the gradient will be unreliable, and it will easily get trapped in local optima.

[0074] Therefore, in this embodiment of the application, the student model can be initialized by mapping the network weights, so that the starting point of the student model is closer to that of the teacher model, which reduces the difficulty of subsequent training and improves training efficiency, and reduces the situation where the student model gets stuck in local optima.

[0075] Understandably, due to the different structures of the teacher and student models (for example, the teacher model can be a multi-layer Transformer, while the student model can be a lightweight MLP or a Transformer with fewer layers than the teacher model), it is difficult to directly reuse network weights.

[0076] Therefore, this embodiment can determine the Transformer layers that the teacher model needs to call during the generation of the teacher-level quality assessment result, and determine the network weights of each Transformer layer as the first network weights. Then, the first network weights can be adapted to the student model network weight space by mapping algorithms (such as weight distillation, dimensionality compression, transfer mapping, etc.) to obtain the corresponding weight parameters as the second network weights. Specifically, for models with the same type of network structure, such as both the teacher model and the student model being Transformers, weight distillation can be used to obtain the second network weights. For models with different types of network structures, such as the teacher model being a Transformer and the student model being an MLP, dimensionality compression (such as weight dimensionality compression based on principal component analysis) can be used to obtain the second network weights.

[0077] In some examples, the original network weights of the student model can be directly replaced with the second network weights, thereby adjusting the network weights of the student model.

[0078] Secondly, correspondingly, the embodiments of this application also provide a cosmetic quality management device based on a knowledge graph, which can realize all the processes of the cosmetic quality management method based on a knowledge graph provided in the above embodiments.

[0079] See Figure 2 This illustration shows a schematic diagram of a knowledge graph-based cosmetic quality management device 200 provided in an embodiment of this application. The knowledge graph-based cosmetic quality management device 200 includes: Batch data acquisition module 201 is used to acquire target batch data of cosmetics produced by the cosmetic production line. Knowledge module 202 is used to query knowledge content that matches the production parameters and / or the cosmetic production line from a knowledge graph in the cosmetic field, wherein the production parameters correspond to the target batch data; The fusion module 203 is used to generate fused data based on the target batch data and the knowledge content; The feature extraction module 204 is used to call the feature extraction network to extract the feature information of the fused data. The feature extraction network is pre-trained based on the sample data and the associated data of the sample data. The sample data includes sample batch data and sample knowledge content. The associated data includes associated knowledge content. The cosmetics domain knowledge graph includes the associated knowledge content and the sample knowledge content. The quality assessment module 205 is used to determine the cosmetic quality assessment result corresponding to the target batch data based on the feature information; The strategy generation module 206 is used to generate an adjustment strategy for the produced cosmetics based on the cosmetics quality assessment results.

[0080] In one optional implementation, the training process of the feature extraction network includes: Obtain the sample data and the associated data; The network to be trained is invoked to extract features from the sample data to obtain sample data feature information; The network to be trained is invoked to extract features from the associated data to obtain associated data feature information; Based on the difference between the feature information of the sample data and the feature information of the associated data, the network to be trained is iteratively trained to obtain the feature extraction network after the iterative training is completed.

[0081] In one optional implementation, the iterative training of the network to be trained based on the difference between the sample data feature information and the associated data feature information includes: Based on the difference between the feature information of the sample data and the feature information of the associated data, the feature loss is determined; The network to be trained is iteratively trained with the goal of minimizing the feature loss.

[0082] In one optional implementation, determining the cosmetic quality assessment result corresponding to the target batch data based on the feature information includes: The artificial intelligence model is invoked to determine the quality assessment result of the cosmetics based on the feature information, wherein the artificial intelligence model is obtained by training the student model based on the teacher model and sample features; The training process of the artificial intelligence model includes: Obtain the teacher-level quality assessment results of the teacher model regarding the sample features; Obtain the student-level quality assessment results of the student model regarding the sample features; Extract the corresponding batch data impact information and knowledge impact information from the teacher-level quality assessment results, and extract the corresponding batch data impact information and knowledge impact information from the student-level quality assessment results; The student model is trained based at least on the differences between the batch data impact information corresponding to the teacher-level quality assessment results and the student-level quality assessment results, and the differences between the knowledge impact information corresponding to the teacher-level quality assessment results and the student-level quality assessment results.

[0083] In one optional implementation, the step of extracting corresponding batch data impact information and knowledge impact information from the teacher-level quality assessment results, and from the student-level quality assessment results, includes: For each of the teacher-level quality assessment results and the student-level quality assessment results The quality assessment result is transformed into N target spaces to obtain the spatial representations corresponding to each of the N target spaces, where N is a positive integer; Extract the batch data space information and knowledge space information corresponding to each target space from the spatial representation corresponding to each target space; Based on the batch data spatial information corresponding to each of the N target spaces, the batch data impact information corresponding to the quality assessment result is determined, and based on the knowledge spatial information corresponding to each of the N target spaces, the knowledge impact information corresponding to the quality assessment result is determined.

[0084] In one optional implementation, training the student model based at least on the differences between batch data impact information corresponding to the teacher-level quality assessment results and the student-level quality assessment results, and the differences between knowledge impact information corresponding to the teacher-level quality assessment results and the student-level quality assessment results, includes: Based on the differences between the batch data impact information corresponding to the teacher-level quality assessment results and the student-level quality assessment results, the batch data impact loss is determined. Based on the differences in knowledge impact information corresponding to the teacher-level quality assessment results and the student-level quality assessment results, the knowledge impact loss is determined. A comprehensive loss is determined based on at least one of the first quality assessment loss and the second quality assessment loss, as well as the batch data impact loss and the knowledge impact loss. The first quality assessment loss is determined based on the difference between the teacher-level quality assessment result and the student-level quality assessment result, and the second quality assessment loss is determined based on the difference between the student-level quality assessment result and the quality assessment label corresponding to the sample feature. The student model is trained based on the comprehensive loss.

[0085] In one optional implementation, before obtaining the student-level quality assessment results of the student model regarding the sample features, the training process of the artificial intelligence model further includes: Determine the first network weights associated with the teacher model in the process of generating the teacher-level quality assessment results; The first network weights are mapped to the student model network weight space to obtain the second network weights, wherein the student model network weight space corresponds to the student model; The network weights of the student model are adjusted using the second network weights.

[0086] Thirdly, embodiments of this application provide a non-transitory computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the method described in any of the above-mentioned embodiments.

[0087] Fourthly, embodiments of this application provide a computer device including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor executes the computer program to implement the steps of the method described in any of the preceding claims.

[0088] See Figure 3 The computer device in this embodiment includes a processor 301, a memory 302, and a computer program stored in the memory 302 and executable on the processor 301, such as a knowledge graph-based cosmetic quality management program. When the processor 301 executes the computer program, it implements the steps in the various knowledge graph-based cosmetic quality management method embodiments described above, for example... Figure 1 The steps S101-S106 are shown.

[0089] For example, the computer program may be divided into one or more modules / units, which are stored in the memory 302 and executed by the processor 301 to complete this application. The one or more modules / units may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of the computer program in the computer device.

[0090] The computer device may be a desktop computer, laptop, handheld computer, or cloud server, etc. The computer device may include, but is not limited to, a processor 301 and a memory 302. Those skilled in the art will understand that the schematic diagram is merely an example of a computer device and does not constitute a limitation on the computer device. It may include more or fewer components than shown, or combine certain components, or different components. For example, the computer device may also include input / output devices, network access devices, buses, etc.

[0091] The processor 301 can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor, or the processor 301 can be any conventional processor. The processor 301 is the control center of the computer device, connecting various parts of the entire computer device through various interfaces and lines.

[0092] The memory 302 can be used to store the computer programs and / or modules. The processor 301 implements various functions of the computer device by running or executing the computer programs and / or modules stored in the memory 302 and calling the data stored in the memory 302. The memory 302 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the mobile phone (such as audio data, phonebook, etc.). In addition, the memory 302 may include high-speed random access memory, and may also include non-volatile memory, such as hard disk, memory, plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, at least one disk storage device, flash memory device, or other volatile solid-state storage device.

[0093] Wherein, if the modules / units integrated into the computer device are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing related hardware. The computer program can be stored in a non-transitory computer-readable storage medium. When the computer program is executed by the processor 301, it can implement the steps of the various method embodiments described above. Wherein, the computer program includes computer program code, which can be in the form of source code, object code, executable file, or some intermediate form, etc. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, portable hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal, and software distribution medium, etc.

[0094] Fifthly, embodiments of this application provide a computer program product, including computer instructions that, when executed by a processor, implement the steps of the method described in any of the preceding claims.

[0095] In summary, the embodiments of this application have at least the following beneficial effects: Using the embodiments of this application, target batch data of cosmetics produced by a cosmetic production line is obtained; knowledge content matching the production parameters and / or the cosmetic production line is queried from a cosmetic domain knowledge graph, wherein the production parameters correspond to the target batch data; fused data is generated based on the target batch data and the knowledge content; a feature extraction network is invoked to extract feature information from the fused data, wherein the feature extraction network is pre-trained based on sample data and the associated data of the sample data, the sample data includes sample batch data and sample knowledge content, the associated data includes associated knowledge content, and the cosmetic domain knowledge graph includes the associated knowledge content and the sample knowledge content; based on the feature information, a cosmetic quality assessment result corresponding to the target batch data is determined; based on the cosmetic quality assessment result, an adjustment strategy for the produced cosmetics is generated. Thus, cosmetic quality can be assessed efficiently and accurately, and effective cosmetic production quality improvement solutions can be automatically provided.

[0096] Through the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary hardware platforms, or it can be implemented entirely by hardware. Based on this understanding, all or part of the technical solutions of this application that contribute to the background technology can be embodied in the form of a software product. This computer software product can be stored in a storage medium, such as ROM (Read-Only Memory) / RAM (Random Access Memory), magnetic disk, optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in various embodiments or some parts of the embodiments of this application.

[0097] The above description is the preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications are also considered to be within the scope of protection of this application.

Claims

1. A cosmetic quality management method based on knowledge graphs, characterized in that, include: Obtain target batch data of cosmetics produced by the cosmetics production line; From the knowledge graph of the cosmetics field, query knowledge content that matches the production parameters and / or the cosmetics production line, wherein the production parameters correspond to the target batch data; Based on the target batch data and the knowledge content, fused data is generated; The feature extraction network is invoked to extract feature information from the fused data. The feature extraction network is pre-trained based on sample data and related data of the sample data. The sample data includes sample batch data and sample knowledge content. The related data includes related knowledge content. The cosmetics domain knowledge graph includes the related knowledge content and the sample knowledge content. Based on the aforementioned feature information, the cosmetic quality assessment result corresponding to the target batch data is determined; Based on the cosmetic quality assessment results, an adjustment strategy is generated for the cosmetics produced.

2. The method according to claim 1, characterized in that, The training process of the feature extraction network includes: Obtain the sample data and the associated data; The network to be trained is invoked to extract features from the sample data to obtain sample data feature information; The network to be trained is invoked to extract features from the associated data to obtain associated data feature information; Based on the difference between the feature information of the sample data and the feature information of the associated data, the network to be trained is iteratively trained to obtain the feature extraction network after the iterative training is completed.

3. The method according to claim 2, characterized in that, The iterative training of the network to be trained based on the difference between the feature information of the sample data and the feature information of the associated data includes: Based on the difference between the feature information of the sample data and the feature information of the associated data, the feature loss is determined; The network to be trained is iteratively trained with the goal of minimizing the feature loss.

4. The method according to claim 1, characterized in that, The step of determining the cosmetic quality assessment result corresponding to the target batch data based on the feature information includes: The artificial intelligence model is invoked to determine the quality assessment result of the cosmetics based on the feature information, wherein the artificial intelligence model is obtained by training the student model based on the teacher model and sample features; The training process of the artificial intelligence model includes: Obtain the teacher-level quality assessment results of the teacher model regarding the sample features; Obtain the student-level quality assessment results of the student model regarding the sample features; Extract the corresponding batch data impact information and knowledge impact information from the teacher-level quality assessment results, and extract the corresponding batch data impact information and knowledge impact information from the student-level quality assessment results; The student model is trained based at least on the differences between the batch data impact information corresponding to the teacher-level quality assessment results and the student-level quality assessment results, and the differences between the knowledge impact information corresponding to the teacher-level quality assessment results and the student-level quality assessment results.

5. The method according to claim 4, characterized in that, The extraction of corresponding batch data impact information and knowledge impact information from the teacher-level quality assessment results, and the extraction of corresponding batch data impact information and knowledge impact information from the student-level quality assessment results, include: For each of the teacher-level quality assessment results and the student-level quality assessment results The quality assessment result is transformed into N target spaces to obtain the spatial representations corresponding to each of the N target spaces, where N is a positive integer; Extract the batch data space information and knowledge space information corresponding to each target space from the spatial representation corresponding to each target space; Based on the batch data spatial information corresponding to each of the N target spaces, the batch data impact information corresponding to the quality assessment result is determined, and based on the knowledge spatial information corresponding to each of the N target spaces, the knowledge impact information corresponding to the quality assessment result is determined.

6. The method according to any one of claims 4-5, characterized in that, The step of training the student model based at least on the differences between the batch data impact information corresponding to the teacher-level quality assessment results and the student-level quality assessment results, and the differences between the knowledge impact information corresponding to the teacher-level quality assessment results and the student-level quality assessment results, includes: Based on the differences between the batch data impact information corresponding to the teacher-level quality assessment results and the student-level quality assessment results, the batch data impact loss is determined. Based on the differences in knowledge impact information corresponding to the teacher-level quality assessment results and the student-level quality assessment results, the knowledge impact loss is determined. A comprehensive loss is determined based on at least one of the first quality assessment loss and the second quality assessment loss, as well as the batch data impact loss and the knowledge impact loss. The first quality assessment loss is determined based on the difference between the teacher-level quality assessment result and the student-level quality assessment result, and the second quality assessment loss is determined based on the difference between the student-level quality assessment result and the quality assessment label corresponding to the sample feature. The student model is trained based on the comprehensive loss.

7. The method according to any one of claims 4-5, characterized in that, Before obtaining the student-level quality assessment results of the student model regarding the sample features, the training process of the artificial intelligence model further includes: Determine the first network weights associated with the teacher model in the process of generating the teacher-level quality assessment results; The first network weights are mapped to the student model network weight space to obtain the second network weights, wherein the student model network weight space corresponds to the student model; The network weights of the student model are adjusted using the second network weights.

8. A cosmetic quality management device based on knowledge graph, characterized in that, include: The batch data acquisition module is used to acquire target batch data of cosmetics produced by the cosmetic production line. The knowledge module is used to query knowledge content that matches the production parameters and / or the cosmetic production line from a knowledge graph in the cosmetic field, wherein the production parameters correspond to the target batch data; The fusion module is used to generate fused data based on the target batch data and the knowledge content; The feature extraction module is used to call the feature extraction network to extract feature information from the fused data. The feature extraction network is pre-trained based on sample data and related data of the sample data. The sample data includes sample batch data and sample knowledge content. The related data includes related knowledge content. The cosmetics domain knowledge graph includes the related knowledge content and the sample knowledge content. The quality assessment module is used to determine the cosmetic quality assessment result corresponding to the target batch data based on the feature information; The strategy generation module is used to generate adjustment strategies for the produced cosmetics based on the cosmetics quality assessment results.

9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method described in any one of claims 1-7.

10. A computer device, characterized in that, The method includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor, when executing the computer program, implements the method of any one of claims 1-7.

Citation Information

Patent Citations

  • Cosmetic production quality risk grade assessment method and system in combination with improved ReliefF and random forest

    CN117745078A

  • Traceability tracking method and system of cosmetic electronic two-dimensional code

    CN119398801A

  • Digital control method and system based on cosmetic production characteristics

    CN121364701A

  • Skin test method and cosmetic composition manufacturing method using the same

    KR102167185B1