A method for detecting the quality of ceramic powder in a multilayer ceramic capacitor based on a genetic algorithm

By generating virtual samples using a genetic algorithm and employing an acceptance-rejection sampling method, the problem of small sample sizes in the production of multilayer ceramic capacitors was solved, improving the accuracy of ceramic powder quality detection and achieving more reliable detection results.

CN115841150BActive Publication Date: 2026-01-09CHONGQING UNIV OF POSTS & TELECOMM
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211329319.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-27
Publication Date
2026-01-09
Estimated Expiration
2042-10-27

AI Technical Summary

Technical Problem

In the production of multilayer ceramic capacitors, the small sample size problem hinders the training of machine learning models, and existing data generation methods rely on manual prior assumptions, resulting in low accuracy of detection results.

Method used

Virtual samples were generated using a genetic algorithm, and the authenticity of the samples was ensured by an acceptance-rejection sampling method. A training dataset was constructed, and a backpropagation neural network was used to train the model.

Benefits of technology

The accuracy of the ceramic powder quality detection model has been improved, the small sample problem has been overcome, and the generated virtual samples can better reflect the distribution of real samples, thus improving the reliability of the detection results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115841150B_ABST
    Figure CN115841150B_ABST
Patent Text Reader

Abstract

The application belongs to the field of ceramic powder quality detection, and particularly relates to a ceramic powder quality detection method for multilayer ceramic capacitors based on a genetic algorithm, which comprises the following steps: obtaining original small sample training data; generating virtual samples by using the genetic algorithm according to the original training data set, screening the generated virtual samples from the attribute by using an acceptance-rejection sampling method, and obtaining optimal virtual samples; constructing a training data set according to the optimal virtual samples and the original small sample training data; constructing a ceramic powder quality detection model based on a BPNN, training the ceramic powder quality detection model by using the training data set; and inputting sample data to be detected into the trained ceramic powder quality detection model to obtain a detection result; the genetic algorithm is used to increase sample data, and the acceptance-rejection sampling method is used to screen the sample data, so that the training data are more accurate, and the accuracy of model training in a small sample environment is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the field of ceramic powder quality detection, and particularly relates to a ceramic powder quality detection method for multilayer ceramic capacitors based on a genetic algorithm. BACKGROUND

[0002] As a basic passive component, ceramic capacitors account for more than half of the capacitor market. Among them, multilayer ceramic capacitors (MLCC) account for more than 90% of the ceramic capacitor market due to their high temperature resistance, high voltage resistance, small size, wide capacitance range and other characteristics. At present, the industrial AI trend is obvious. Through machine automatic control of the production process, workers can be freed from heavy production tasks, and production efficiency can be improved. In the production process of MLCC, the quality of ceramic powder ultimately determines the final performance of MLCC. Therefore, manufacturers must check whether the dielectric constant index of the ceramic powder meets the standard before putting it into production. In order to make the machine detection result more accurate, a large amount of data is needed for the training of the classifier. However, due to the characteristics of deep learning, a large amount of data is needed for learning, so as to obtain a better model. However, in the production process of MLCC, due to the high product yield, it is difficult to collect defect samples, small batch and multi-species production, defect samples have not been collected, the type of defect is various, and there is a long tail effect, which cannot traverse all defects and the defect data lacks professional annotation, which cannot be used by deep learning algorithm, resulting in a serious small sample problem in the production field of MLCC, which hinders the training process of the machine learning model and slows down the AI process in the industry.

[0003] For the small sample quality detection problem in the art, the existing data generation methods are as follows: (1) the method based on simple transformation. This is an early and relatively simple data generation method, such as adding noise to the original data, rotating the image, and using resampling method. 2) the method based on sample distribution. Assuming that the original small sample obeys a certain distribution, the data distribution function is obtained by parameter estimation method, and the virtual sample is obtained by sampling or interpolation based on the obtained function; such as the method based on information diffusion theory: using the concept of information diffusion, calculating the range of attribute value change, and sampling in the range; the method based on overall trend diffusion: similar to the former, further considering the overall information of the sample; the method based on Gaussian distribution and error theory: assuming that the data obeys Gaussian distribution, fitting the distribution function and sampling; the method based on Weibull distribution: assuming that the data obeys Weibull distribution, fitting the distribution function and sampling, and further considering the multimodal data. (3) the method based on feature mapping. The principle of this method is to map the original data set to a certain feature space, then generate interpolation in the space, and then map it back to the original space as a virtual sample; for example: the sample generation method based on ELM feature mapping method, the sample generation algorithm based on Isomap dimension reduction method, the sample generation algorithm based on Kriging interpolation method, the method based on input training neural network (ITNN), the sample generation method based on genetic algorithm, etc. (4) the method based on swarm intelligence algorithm. The swarm intelligence algorithm can generate intermediate process samples in the optimization process, which can be used as virtual samples in downstream tasks after being processed; for example: the sample generation algorithm based on particle swarm optimization (PSO) algorithm, the sample generation method based on differential evolution (DE) algorithm, etc.

[0004] The above existing methods often deviate from the distribution of real samples, and usually rely more on artificial prior assumptions, so it is easy to produce large subjective errors, and it is difficult to objectively ensure that the virtual sample obeys the distribution of the real sample, so that the accuracy of the final detection result is low. SUMMARY

[0005] To solve the problems in the prior art, the present application provides a ceramic powder quality detection method for multilayer ceramic capacitors based on a genetic algorithm, which comprises the following steps: collecting original training data; generating virtual samples based on the genetic algorithm according to the original training data set, and constructing a training data set according to the virtual samples; training a ceramic powder quality detection model using the training data set; obtaining ceramic powder data to be detected, inputting the ceramic powder data into the trained ceramic powder quality detection model, and obtaining a detection result; the process of constructing the training data set comprises:

[0006] S1: obtaining an original data set;

[0007] S2: initialize parameters of the genetic algorithm, including maximum number of attempts a, mutation rate m, virtual sample set S, and required virtual sample quantity m;

[0008] S3: take data in the original data set as an original population, and randomly select two parent samples x i and x j from the original population;

[0009] S4: perform encoding processing on the parent samples x i and x j ;

[0010] S5: perform cross processing on the encoded parent samples to obtain cross parent samples x′ i and x′ j ;

[0011] S6: detect the cross parent samples x′ i and x′ j using an acceptance-rejection sampling method, and if the detection result is correct, execute step S8, otherwise execute step S7;

[0012] S7: update the first number of attempts, i.e., add 1 to the first number of attempts; compare the updated first number of attempts with the maximum number of attempts a, and if the updated first number of attempts is greater than the maximum number of attempts a, return to step S3, otherwise return to step S5;

[0013] S8: perform mutation on the cross parent samples x′ i and x′ j according to the mutation rate to obtain a mutation result;

[0014] S9: detect the mutation result using the acceptance-rejection sampling method, and if the detection result is correct, execute step S11, otherwise execute step S10;

[0015] S10: update the second number of attempts, i.e., add 1 to the second number of attempts; compare the updated second number of attempts with the maximum number of attempts a, and if the updated second number of attempts is greater than the maximum number of attempts a, return to step S3, otherwise return to step S8;

[0016] S11: store the mutated sample data into the virtual sample set S; compare the data quantity in the virtual sample set with the required virtual sample quantity m, and if the data quantity in the virtual sample set is equal to the required virtual sample quantity m, output a training data set, otherwise return to step S3.

[0017] Preferably, the original data set includes 44 sample data, each of which includes 12 input attributes and 1 output attribute, wherein the input attributes include specific surface area, 90th percentile of particle size distribution, 50th percentile of particle size distribution, 10th percentile of particle size distribution, moisture content, sintering temperature, dielectric constant K value, dissipation factor, minimum temperature variation characteristic of capacitance, maximum temperature variation characteristic of capacitance, Curie point, and 50th percentile of particle size distribution of ceramic powder on the production line; the output attribute is the real output k value of the input attribute after model processing; wherein the specific surface area is the sum of the surface area of the ceramic powder per unit volume, the i-th percentile of the particle size distribution is the i-th percentile of the diameter of all ceramic powders flowing through the pipeline per unit time, the moisture content is the moisture content of the ceramic powder measured in one hour at a certain temperature, the sintering temperature is the temperature in the furnace during sintering, the dissipation factor is the ratio of dissipated energy to stored energy, and the Curie point is the temperature at which the dielectric constant of the ceramic material appears a peak or a sudden increase.

[0018] Preferably, the parent samples x i and x j are encoded as x i and x j .

[0019] S41: traverse each attribute value pair corresponding to each attribute in the sample x i and x j .

[0020] S42: encode each attribute value pair obtained by each traversal into a pair of 32-bit binary strings; and .

[0021] S43: save the binary strings corresponding to all attribute value pairs of the two encoded parent samples as two new samples to obtain the encoded parent samples.

[0022] Preferably, the process of cross-processing the encoded parent samples includes: traversing all attribute value pairs corresponding to the attribute columns of the encoded parent samples, the attribute value being a binary string; randomly selecting a value in the range of 1 to 32 as a crossover point; exchanging the substrings before and after the selected crossover point of the two binary strings to obtain two new binary strings, taking the new binary strings as two new attribute values, and collecting all the new attribute values to obtain the cross-processed parent samples x i and x j .

[0023] Preferably, the process of detecting the cross-processed parent samples x i and x j using the acceptance-rejection sampling method includes:

[0024] S61: Obtain all attribute values ​​for each attribute column in the original dataset;

[0025] S62: Fit a Gaussian distribution to each attribute column, with the Gaussian distribution function being p(x) = [p(x)]. 1 ),p(x 2 ...p(x) D )];

[0026] S63: Provide a uniform distribution g(x) for each attribute column. j ), uniformly distributed as g(x)=[g(x) 1 ),g(x 2 )...g(x D )];

[0027] S64: Calculate the uniform distribution value C×g(x) for each attribute column, where C is a constant. Let C = 1.001, then C×g(x) = [1.001×max(p(x)]. 1 )),1.001×max(p(x 2 ))…1.001×max(p(x D ))];

[0028] S65: For two offspring samples x′ generated after crossover and mutation operations... i and x′ j Calculate each sample Each attribute value The corresponding probability density function value A random value u is selected from a uniform distribution in [0,1]. j ,when When it is established, this attribute value is... is a true attribute value; when sample x′ i A virtual sample is considered a valid virtual sample only if all attribute values ​​are acceptable; otherwise, it is not considered a valid virtual sample.

[0029] S66: Use the same method to determine x′ j .

[0030] Preferably, the process of training the ceramic powder quality detection model includes:

[0031] Step 1: Expand the original dataset; that is, merge the virtual samples generated by the generative model with the original dataset to obtain an expanded dataset;

[0032] Step 2: a BP neural network is constructed, the neural network comprises an input layer, a hidden layer and an output layer, the input layer comprises 12 nodes, the hidden layer comprises 32 nodes, and the output layer comprises one node; in the feature extraction process of the input data in the hidden layer, a Sigmoid function is used as the activation function of the hidden layer;

[0033] Step 3: the data in the expanded data set are input into the input layer of the BP neural network; the input data are subjected to feature extraction in the hidden layer, sample features are obtained, and the sample features are abstracted into a 32-dimensional space; the 32-dimensional sample features are subjected to abstract feature conversion in the output layer, and one-dimensional results are obtained;

[0034] Step 4: the loss function of the model is calculated according to the one-dimensional output results, the parameters of the model are continuously adjusted, and when the loss function is the minimum, the training of the model is completed.

[0035] Further, the loss function of the model adopts a cross-entropy loss function.

[0036] The beneficial effects of the present application are as follows:

[0037] The present application adopts a genetic algorithm to generate a large number of virtual samples, and then adopts an acceptance-rejection sampling method to determine the authenticity of the virtual samples from the attribute level, so that the virtual samples can reach the reliability degree of real samples, and greatly improve the problem of low accuracy of the ceramic powder quality detection model caused by sample shortage. BRIEF DESCRIPTION OF DRAWINGS

[0038] Figure 1 A flow chart of the ceramic powder quality detection method based on the genetic algorithm of the multilayer ceramic capacitor of the present application;

[0039] Figure 2 A flow chart of the virtual sample generation of the present application to expand the original data set;

[0040] Figure 3 A flow chart of the random selection of the data in the data set of the present application;

[0041] Figure 4 A data structure chart after coding of the present application;

[0042] Figure 5 A cross process chart of the present application;

[0043] Figure 6 A mutation process chart of the present application;

[0044] Figure 7 A flow chart of the sample detection based on the acceptance-rejection sampling method of the present application. DETAILED DESCRIPTION

[0045] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all the other embodiments obtained by a person of ordinary skill in the art without creative effort belong to the scope of the present application.

[0046] A ceramic powder quality detection method in a multilayer ceramic capacitor based on a genetic algorithm, as shown in the accompanying drawings, comprises the following steps: Figure 1 S1: acquiring original training data; S2: generating virtual samples from the original training data set by using a genetic algorithm, and constructing a training data set according to the virtual samples; S3: training a ceramic powder quality detection model by using the training data set; S4: acquiring ceramic powder data to be detected, inputting the ceramic powder data into the trained ceramic powder quality detection model, and obtaining a detection result.

[0047] A method for constructing a training data set, as shown in the accompanying drawings, comprises the following steps: Figure 2 S1: acquiring original data set;

[0048] S2: initializing parameters of the genetic algorithm, the parameters comprising maximum trial number α, mutation rate μ, virtual sample set S and required virtual sample quantity m;

[0049] S3: taking data in the original data set as original population, and randomly selecting two parent samples x i and x j from the original population;

[0050] S4: performing coding processing on the parent samples x i and x j ;

[0051] S5: performing cross processing on the coded parent samples to obtain cross processed parent samples x′ i and x′ j ;

[0052] S6: performing detection on the cross processed parent samples x′ i and x′ j by using an acceptance-rejection sampling method, and if the detection result is correct, performing step S8, otherwise performing step S7;

[0053] S7: updating the first trial number, i.e. adding 1 to the first trial number; comparing the updated first trial number with the maximum trial number α, and if the updated first trial number is greater than the maximum trial number α, returning to step S3, otherwise returning to step S5;

[0054] S7: updating the first trial number, i.e. adding 1 to the first trial number; comparing the updated first trial number with the maximum trial number α, and if the updated first trial number is greater than the maximum trial number α, returning to step S3, otherwise returning to step S5;

[0055] S8: according to the mutation rate, the parent samples x' after the crossover are mutated to obtain the mutation results; i and x' j are mutated to obtain the mutation results;

[0056] S9: the mutation results are detected by using the acceptance-rejection sampling method, if the detection result is correct, step S11 is executed, otherwise step S10 is executed;

[0057] S10: the second attempt number is updated, that is, the second attempt number is increased by 1; the updated second attempt number is compared with the maximum attempt number a, if greater than the maximum attempt number a, step S3 is returned, otherwise step S8 is returned;

[0058] S11: the mutated sample data is stored in the virtual sample set S; the data amount in the virtual sample set is compared with the required virtual sample amount m, if the data amount in the virtual sample set is equal to the required virtual sample amount m, the training data set is output, otherwise step S3 is returned.

[0059] In this embodiment, the initialization of the parameters includes setting a = 1000, μ = 0.001, the sample set S is initially in an empty state, and the virtual sample amount m is the number of samples expected to be generated by the user.

[0060] In this embodiment, the process of randomly selecting two parent samples x i and x j from the original population includes: in each iteration process of the genetic algorithm, the method randomly selects two parent samples x i and x j from the original population, instead of selecting them from the offspring sample set. This is a significant difference from the classical genetic algorithm, and the purpose is to enable the child samples generated by the genetic algorithm to carry more original sample information, while being able to distinguish from the parent samples and enrich the information amount of the sample set. Taking two real data as an example, Figure 3 The square rows in the same column in the table represent all values of the same attribute, for example, the attribute values in the attribute a1 include {x1, x2, …, xn}; first, the distribution of each attribute is calculated, and then the attribute values are randomly selected according to the distribution.

[0061] The process of encoding the parent samples x i and x j includes: in order to perform crossover and mutation operations, it is necessary to encode the selected x i and x jEach attribute value of the two parent samples is encoded into a binary string, which is called a chromosome. The encoding method used here is the IEEE binary arithmetic standard, IEEE-754 standard, which is the most widely used floating-point arithmetic standard since the 1980s and has been adopted by many CPUs and floating-point arithmetic units. IEEE-754 specifies four ways to represent floating-point values: single precision (32 bits), double precision (64 bits), extended single precision (43 bits and above), and extended double precision (79 bits and above). Here, the appropriate representation method can be selected according to the data characteristics in the actual application scenario. Because the number of encoding bits is fixed in length, the genetic algorithm does not need to consider the consistency of the lengths of the two parent chromosomes when performing the crossover operator. Taking the single precision (32-bit) encoding method as an example, the IEEE-754 encoding specification includes three parts: the sign bit, the exponent bit, and the mantissa part. In single precision, these three parts occupy 1 bit, 8 bits, and 23 bits, respectively, as shown in Figure 4 .

[0062] In this embodiment, the process of performing crossover on the encoded parent samples includes: the crossover method is the same as that in the classical genetic algorithm, and for the chromosomes of all attribute values of the two parent samples x i and x j , a random value is selected from the range of [1, 32] as the crossover point, and the chromosome substrings before and after the point are exchanged to obtain two new chromosomes: x′ i and x′ j . Unlike the classical genetic algorithm, after each attribute crossover, the ARS-VAD algorithm is used to determine whether the newly generated attribute value conforms to the distribution of the original sample attribute value. Only when all the attribute values of x′ i and x′ j conform to the distribution of the original sample attribute value, can the two new samples perform the following operations; otherwise, the crossover operation is repeated, and if the number of repetitions reaches an upper limit a (as mentioned earlier, we set a = 1000), the program considers that the two parent samples selected in this iteration are not suitable and needs to be reselected. Figure 5 The encoding and crossover process are shown.

[0063] According to the mutation rate, the parent samples x′ i and x′ jThe mutation process includes: performing a mutation operation on the offspring sample according to a mutation rate μ (as described above, μ = 0.001 is set), taking a random number r in the interval [0, 1], and if r ≥ μ, performing a mutation operation. Similar to the crossover operation, a mutation point needs to be selected from the range of [1, 32], and then the bit is set to the opposite bit. Finally, the ARS-VAD algorithm is also used to determine whether the new attribute value meets the distribution requirements of the original attribute value. If not, a new mutation bit is found again. Similarly, when the number of repetitions reaches the upper limit α, the parent sample should be reselected. Figure 6 The mutation operation process is shown.

[0064] The process of detecting the parent sample x' after crossover using the acceptance-rejection sampling method includes: i and x' j The process of detecting the parent sample x' after crossover using the acceptance-rejection sampling method includes:

[0065] In addition, the intermediate virtual attribute value generated by the generation model is not always reasonable, because some virtual attribute values may exceed the value range of the corresponding attribute values in the real sample, but the value range of the real sample attribute values is always difficult to accurately calculate. A method of calculating the acceptance range of attribute values using a triangular membership function, which uses the concept of fuzzy mathematics, can calculate a clear value range, but the accuracy and reasonableness of the calculation method are not explained, and the reasonableness is difficult to guarantee. In this method, the acceptance-rejection sampling (ARS) method is used to judge the reasonableness of the virtual attribute value, which ensures the reasonableness of the evaluation result and does not limit the range of attribute values within a fixed range, with better flexibility.

[0066] In this embodiment, the process of detecting the parent sample x' after crossover using the acceptance-rejection sampling method includes: i and x' j The process of detecting the parent sample x' after crossover using the acceptance-rejection sampling method includes:

[0067] S61: Obtain all attribute values of each attribute column in the original data set;

[0068] S62: Fit each attribute column as a Gaussian distribution, and the Gaussian distribution function is p(x) = [p(x1 ),p(x 2 ...p(x) D The expression for the Gaussian distribution function is:

[0069]

[0070]

[0071]

[0072] Where, σ d μ represents the variance in the d-th dimension. d x represents the mean along the d-th dimension. d This represents all attribute values ​​along the d-th dimension. Let represent the attribute value in the i-th row of the d-th dimension, and n represent the amount of data in the original sample set.

[0073] S63: Provide a uniform distribution g(x) for each attribute column. j ), uniformly distributed as g(x)=[g(x) 1 ),g(x 2 )...g(x D )];

[0074] S64: Calculate the uniform distribution value C×g(x) for each attribute column, where C is a constant. Let C = 1.001, then C×g(x) = [1.001×max(p(x)]. 1 )),1.001×max(p(x 2 ))…1.001×max(p(x D ))];

[0075] S65: For two offspring samples x′ generated after crossover and mutation operations... i and x′ j Calculate each sample Each attribute value The corresponding probability density function value A random value u is selected from a uniform distribution in [0,1]. j ,when When it is established, this attribute value is... is a true attribute value; when sample x′ i A virtual sample is considered a valid virtual sample only if all attribute values ​​are acceptable; otherwise, it is not considered a valid virtual sample.

[0076] S66: Use the same method to determine x′ j .

[0077] Specifically, the Accept-Rejection Sampling (ARS) method is a Monte Carlo sampling method. This method addresses the problem of how to sample a set of samples X that conforms to a given distribution P with a known probability density function p(x). First, ARS needs to find an auxiliary proposal distribution G, whose probability density function g(x) must be known. Then, a constant C is set, which guarantees that for any sample x, the formula C × g(x) ≥ p(x) is always satisfied. The ARS algorithm then selects a sample x from the proposal distribution G and a random number u from a uniform distribution [0,1]. If the following equation is satisfied, the sample x is considered to conform to distribution P. Through continuous sampling and judgment, a set of samples conforming to the target distribution p(x) can eventually be obtained. Furthermore, to ensure the efficiency of the ARS algorithm, the constant C should be set as small as possible.

[0078]

[0079] Inspired by the preceding process, the ARS-VAD algorithm proposed in this patent is a transformation of the accept-rejection sampling method. In this method, each virtual sample x does not originate from the proposal distribution G, but rather from a genetic algorithm. A uniform distribution G is used as the proposal distribution, so C×g(x) will always be a constant value M slightly greater than p(x). Then, the above formula can be used to determine whether the virtual sample x is reasonable. Steps 1 to 3 below detail the ARS-VAD algorithm flow.

[0080] Step 1: Obtain the target distribution p(x) for all attribute columns.

[0081] Given an existing training set of N real samples X = {x1, x2, ..., x...} N},in, For a real sample containing D attributes, fit a Gaussian distribution to each attribute column and label it as p(x) = [p(x)]. 1 ),p(x 2 ...p(x) D In fact, this step is completed during the initialization process of the main algorithm program.

[0082] Step 2: Obtain the suggested distribution g(x) for all attribute columns.

[0083] Taking the j-th attribute as an example, select a uniform distribution g(x) j ) can be used as the suggested distribution for this attribute column, so C×g(x) can be used as the suggested distribution. j () is considered as a certain constant M j Additionally, according to the requirements described above, it is necessary to ensure that M... j The value is slightly larger than the target distribution p(x)j ) of the maximum value of p(x j ), so M j = 1.001 * max(p(x 1 )) is taken in the method.

[0084] Step 3: Determine whether the given virtual attribute value can be accepted.

[0085] When the generation model generates a virtual sample s = [s 2 , s D ,... s j ], for each attribute value s j (j e [1, D]), the corresponding probability density function value p(s j ) is calculated. Then a random value u is taken from the uniform distribution of [0, 1]. When Figure 7 is true, the virtual attribute value is considered to be accepted as a real attribute value. When all virtual attribute values can be accepted, the virtual sample is considered to be a qualified virtual sample.

[0086] In the embodiment, the process of training the ceramic powder quality detection model includes:

[0087] Step 1: Data expansion is performed on the original data set; that is, the virtual sample generated by the generation model is fused with the original data set to obtain an expanded data set;

[0088] Step 2: A BP neural network is constructed, which includes an input layer, a hidden layer and an output layer. The input layer contains 12 nodes, the hidden layer contains 32 nodes, and the output layer contains one node. In the feature extraction process of the input data in the hidden layer, the Sigmoid function is used as the activation function of the hidden layer.

[0089] Step 3: The data in the expanded data set is input into the input layer of the BP neural network. The input data is feature-extracted by the hidden layer to obtain sample features, and the sample features are abstracted into a 32-dimensional space. The output layer converts the 32-dimensional sample features to obtain a one-dimensional result.

[0090] Step 4: The loss function of the model is calculated according to the one-dimensional output result, and the parameters of the model are adjusted constantly. When the loss function is minimized, the training of the model is completed. The cross-entropy loss function is used as the loss function of the model.

[0091] The above examples further illustrate the objects, technical solutions and advantages of the present application. It should be understood that the above examples are only preferred embodiments of the present application and are not intended to limit the present application. Any modification, equivalent replacement, improvement, etc. made to the present application within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A method for detecting the mass of ceramic powder in a multilayer ceramic capacitor based on a genetic algorithm, characterized by, The method comprises the following steps of: collecting original small sample training data; generating virtual samples from the original training data set by using a genetic algorithm, and constructing a training data set according to the virtual samples; training a ceramic powder quality detection model by using the training data set; obtaining ceramic powder data to be detected, inputting the ceramic powder data into the trained ceramic powder quality detection model, and obtaining a detection result; and the process of constructing the training data set comprises the following steps of: S1: obtaining an original data set; the original data set comprises 44 sample data, each sample data comprises 12 input attributes and 1 output attribute, wherein the input attributes comprise specific surface area, 90th percentile of particle size distribution, 50th percentile of particle size distribution, 10th percentile of particle size distribution, water content, sintering temperature, dielectric constant K value, dissipation coefficient, minimum temperature change characteristic of capacitance, maximum temperature change characteristic of capacitance, Curie point and 50th percentile of particle size distribution of ceramic powder on a production line; the output attribute is the real output K value of the input attribute after model processing; wherein the specific surface area is the total of the ceramic powder surface area in a unit volume, the i-th percentile of particle size distribution is the i-th percentile of the diameter of all ceramic powders flowing through the pipeline in a unit time, the water content is the water content of the ceramic powder measured in one hour at a certain temperature, the sintering temperature is the temperature in the furnace during sintering, the dissipation coefficient is the ratio between the dissipated energy and the stored energy, and the Curie point is the temperature at which the dielectric constant of the ceramic material appears a peak or a sudden increase; S2: initialize parameters of the genetic algorithm, including the maximum number of attempts , mutation rate , virtual sample set , and the required virtual sample size ; S3: Take the data in the original dataset as the original population, randomly select two parent samples from the original population and ; S4: encoding the parent sample and performing an encoding process; S5: cross processing the encoded parent sample to obtain a cross-processed parent sample and ; S6: Adopting the acceptance-rejection sampling method to the crossed parent sample and If the detection result is correct, step S8 is executed, otherwise step S7 is executed. S7: update the first attempt number, i.e. the first attempt number plus 1; compare the updated first attempt number with the maximum attempt number If greater than the maximum attempt number then return to step S3, otherwise return to step S5; S8: the parent sample after crossing according to the mutation rate and mutation to obtain a mutation result; S9: detecting the variation result by using a method based on acceptance-rejection sampling, if the detection result is correct, performing step S11, otherwise performing step S10; S10: update the second attempt number, i.e. the second attempt number plus 1; compare the updated second attempt number with the maximum attempt number If greater than the maximum attempt number then return to step S3, otherwise return to step S8; S11: store the mutated sample data into the virtual sample set S3: compare the amount of data in the virtual sample set with the required amount of virtual samples S3: compare the amount of data in the virtual sample set with the required amount of virtual samples S3: compare the amount of data in the virtual sample set with the required amount of virtual samples 2. The method for detecting the mass of ceramic powder in a multilayer ceramic capacitor based on a genetic algorithm according to claim 1, characterized in that, Parental samples and The encoding process includes: S41: traversing the sample and a pair of attribute values corresponding to each attribute and ; S42: Retrieve the pair of attribute values ​​obtained from each iteration. and Encode it into a pair of 32-bit binary strings; S43: saving the binary strings corresponding to all attribute values of the two parent sample encodings as two new samples to obtain the parent samples after encoding.

3. The method for detecting the mass of ceramic powder in a multilayer ceramic capacitor based on a genetic algorithm according to claim 1, characterized in that, The process of cross processing the encoded parent sample includes: traversing all attribute value pairs corresponding to all attribute columns of the encoded parent sample, the attribute value being a binary string; randomly selecting a value in the range from 1 to 32 as a cross point; exchanging the substrings before and after the selected cross point of the two binary strings to obtain two new binary strings, taking the new binary strings as two new attribute values, and collecting all the new attribute values respectively to obtain the cross processed parent sample and .

4. The method for detecting the mass of ceramic powder in a multilayer ceramic capacitor based on a genetic algorithm according to claim 1, characterized in that, The parental samples after crossing are detected by using the acceptance-rejection sampling method and The process of detecting includes: S61: obtaining all attribute values of each attribute column in the original data set; S62: fit each attribute column as a Gaussian distribution, the Gaussian distribution function is ; S63: provide a uniform distribution for all attribute columns respectively , the uniform distribution is ; S64: Calculate the uniform distribution value for each attribute column where is a constant; S65: For samples that have two offspring after crossover and mutation operations and Calculate each sample Each attribute value The corresponding probability density function value ;from A random value is selected from a uniform distribution. ,when When it is established, this attribute value is... This is a real attribute value; when the sample A virtual sample is considered a valid virtual sample only if all attribute values ​​are acceptable; otherwise, it is not considered a valid virtual sample. S66: Determine in the same way .

5. The method for detecting the mass of ceramic powder in a multilayer ceramic capacitor based on a genetic algorithm according to claim 1, characterized in that, The expression of the Gaussian distribution function is: ; ; ; wherein, denotes the variance in the d-th dimension, denotes the mean in the d-th dimension, denotes all attribute values in the d-th dimension, denotes the attribute value of the i-th row in the d-th dimension, denotes the data volume of the original sample set.

6. The method for detecting the mass of ceramic powder in a multilayer ceramic capacitor based on a genetic algorithm according to claim 1, characterized in that, The size of the constant C is 1.001, then the uniformly distributed value has the value: ; wherein denotes the maximum function.

7. The method for detecting the mass of ceramic powder in a multilayer ceramic capacitor based on a genetic algorithm according to claim 1, characterized in that, The process of training the ceramic powder quality detection model comprises the following steps of: Step 1: data expansion is performed on the original data set; that is, the virtual samples generated by the generated model are fused with the original data set to obtain an expanded data set; Step 2: a BP neural network is constructed, the neural network comprises an input layer, a hidden layer and an output layer, the input layer comprises 12 nodes, the hidden layer comprises 32 nodes, and the output layer comprises one node; in the feature extraction process of the input data in the hidden layer, a Sigmoid function is used as the activation function of the hidden layer; Step 3: the data in the expanded data set is input into the input layer of the BP neural network; the hidden layer is used to extract the features of the input data, the sample features are obtained, and the sample features are abstracted into a 32-dimensional space; the output layer is used to convert the 32-dimensional sample features to obtain a one-dimensional result; Step 4: the loss function of the model is calculated according to the one-dimensional output result, the parameters of the model are adjusted, and the training of the model is completed when the loss function is minimum.