Rare earth permanent magnet product visual inspection system based on 5G network cloud computing
By adopting 5G network cloud computing technology in the visual detection system of rare earth permanent magnet products, 5G network information data deviation and noise problems are solved, the model structure and learning rate are optimized, the efficient data visual support is achieved, the product quality is improved, and the quality of the product is improved. Evaluation and network optimization effect.
Patent Information
- Application Number
- CN202411475558.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-22
- Publication Date
- 2025-01-28
- Estimated Expiration
- 2044-10-22
AI Technical Summary
The existing vision detection system of rare earth permanent magnet products fails to effectively process deviations and noise in 5G network information data, resulting in a decline in data quality and affecting network performance evaluation and optimization results. In addition, the tree structure generated by the model is too complex, the computational cost is high and difficult to explain; the lack of effective data visualization support leads to a lack of systematicity and scientificity in the decision-making process.
采用基于5G网络云计算的稀土永磁产品视觉检测系统,通过数据采集模块、数据处理模块、产品质量预测模块、产品质量评估模块、缺陷类型判断模块和反馈控制模块,实现对产品缺陷图像数据、 5G network information data and transmission of environmental data collection, calibration and pre -processing. Then obtain a comprehensive characteristic data set through weighted fusion, build a product defect evaluation model and defect type diagnostic model, and perform data visual analysis to support decision -making.
By automatic calibration and optimization of 5G network information data, improve data quality and network optimization effects, and reduce maintenance costs. By controlling the complexity and learning rate of the model, the interpretability and training efficiency of the model are improved. Through the visual support of Pareto, the decision -making process of more scientific and systematic systems, optimizing resource allocation, and reducing production costs.
Smart Images

Figure CN119375231A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of machine vision technology, and more specifically, to a rare earth permanent magnet product visual inspection system based on 5G network cloud computing. Background Art
[0002] As an important strategic new material, rare earth permanent magnet materials have attracted much attention in their production, manufacturing and quality inspection. As a new generation of key basic materials, the quality stability of rare earth permanent magnet products is crucial to the performance and reliability of downstream application fields.
[0003] The patent publication number CN116046738A discloses a machine vision detection system and method for rare earth distribution based on a variable background light source, including a variable light source, a standard sample pool and a sample pool to be tested, an image acquisition device, a calculation and logic control device, and a signal output device. The calculation and logic control device communicates with the image acquisition device and the signal output device. The light emitted by the variable light source irradiates the standard sample and the sample to be tested to generate an absorption light signal and a fluorescence signal and is captured by the image acquisition device. After fitting calculation, the signal output device outputs the detection result of the distribution of the rare earth solution. By adopting the method disclosed in the present invention, by setting a variable background light source, online distribution detection can be achieved even for elements that have no obvious absorption in the visible light band, thereby improving the practicality and universality of the product. No manual intervention is required during the detection process, and it is suitable for online high-frequency continuous sampling. The equipment is simple and reliable, with low hardware requirements, and is suitable for application in complex and harsh industrial production environments.
[0004] The existing visual inspection system for rare earth permanent magnet products has the following main problems:
[0005] The use of linear adaptive filters to automatically calibrate and optimize 5G network information data is not considered; uncalibrated 5G network information data may contain significant deviations and noise caused by the transmission environment; these deviations and noise will significantly reduce the quality of the data, making the analysis results inaccurate, and thus affecting the effectiveness of network performance evaluation and optimization; network optimization based on inaccurate or low-quality data is difficult and may even be ineffective. Incorrect optimization strategies may not only fail to improve network performance, but may also aggravate problems, waste resources and increase maintenance costs;
[0006] Without controlling the number of leaf nodes and the penalty coefficient of leaf node scores of the tree model, the model may generate a very complex tree structure with a large number of leaf nodes and complex branches. Such a model is not only computationally expensive, but also difficult to explain and understand, which reduces the credibility and acceptability of the model; when the learning rate is not adjusted, the model may use the default learning rate for training; however, different data sets and models may require different learning rates to achieve the best training results; improper learning rate setting may lead to problems such as slow training process, difficult convergence or unstable oscillation, which significantly reduces the training efficiency of the model and increases training time and computational costs;
[0007] Lacking the data visualization support provided by the Pareto chart, the production department may only be able to rely on scattered, unorganized data when making decisions; this leads to a lack of systematic and scientific nature in the decision-making process, making it difficult to accurately determine which types of defects have the greatest impact on production costs, and thus making it impossible to make the best resource allocation decisions; this leads to uneven resource allocation, with some key defects not being dealt with in a timely manner, while some minor defects occupy too many resources, resulting in a waste of resources.
[0008] In view of this, the present invention proposes a rare earth permanent magnet product visual inspection system based on 5G network cloud computing to solve the above problems. Summary of the invention
[0009] In order to overcome the above-mentioned defects of the prior art and to achieve the above-mentioned purpose, the present invention provides the following technical solution: a visual inspection system for rare earth permanent magnet products based on 5G network cloud computing, comprising:
[0010] Data acquisition module, used to collect product defect image data, 5G network information data and transmission environment data;
[0011] A data processing module is used to calibrate the 5G network information data according to the transmission environment data to obtain the calibrated 5G network information data; pre-process the product defect image data, the calibrated 5G network information data and the transmission environment data to obtain a defect image feature data set, a calibrated 5G network information feature data set and a transmission environment feature data set;
[0012] The defect image feature dataset, the calibration 5G network information feature dataset and the transmission environment feature dataset are weightedly fused to obtain a comprehensive feature dataset;
[0013] The product quality prediction module is used to build a product defect assessment model, input the comprehensive feature data set into the product quality prediction model, and predict the product defect grade coefficient;
[0014] The product quality assessment module is used to compare the predicted product defect level coefficient with the preset product defect level coefficient threshold to determine whether the quality of the rare earth permanent magnet product is qualified;
[0015] The defect type judgment module is used to collect data on unqualified rare earth permanent magnet products, build a defect type diagnosis model, input the data on unqualified rare earth permanent magnet products into the defect type diagnosis model, and predict the product defect type data;
[0016] The feedback control module is used to send out early warning instructions through the visual inspection terminal to feed back product defect type data to the production department. The production department optimizes the production process in a timely manner based on the fed-back product defect type data. Each module is connected by wired and / or wireless means.
[0017] Furthermore, the product defect image data includes defect image parameter data, defect location and defect area; the defect image parameter data includes image resolution and color depth; the 5G network information data includes network bandwidth, delay, packet loss rate, data transmission rate, 5G signal strength and error rate in data transmission; the transmission environment data includes the temperature of the transmission environment, the electromagnetic interference level, the current and voltage of the network equipment.
[0018] Furthermore, the method of calibrating the 5G network information data according to the transmission environment data to obtain the calibrated 5G network information data includes:
[0019] The 5G network information data is calibrated according to the transmission environment data through a linear adaptive filter, and a linear adaptive filter is defined, whose output is: ;in, is the output of the linear adaptive filter; The input of the linear adaptive filter is 5G network information data; is the weight coefficient of the linear adaptive filter; is the order of the linear adaptive filter; is the iteration time of the linear adaptive filter; is the number of iterations of the linear adaptive filter;
[0020] The weight coefficient of the linear adaptive filter is adjusted by the minimum mean square error algorithm. The weight coefficient is updated at each iteration time as follows: ;in, for The weight coefficient updated at the iteration time; is the error between the expected output and the actual output of the linear adaptive filter; The rate at which the weight coefficient is adjusted;.
[0021] The error between the expected output and the actual output of the linear adaptive filter for: ;in, The expected output after calibrating the 5G network information data according to the transmission environment data; is the output of the linear adaptive filter;
[0022] According to the error between the expected output and the actual output of the linear adaptive filter, the rate of adjusting the weight coefficient of the adaptive filter is adjusted by the weight coefficient adjustment model until the output is stable; the weight coefficient adjustment model is: ;in, The initial rate adjusted for the weight factor; is the number of iterations of the linear adaptive filter; is the total number of iterations of the linear adaptive filter;
[0023] The error threshold between the expected output and the actual output of the preset linear adaptive filter is , when the error between the expected output and the actual output of the linear adaptive filter is less than the error threshold The adjustment is stopped when , and the optimal rate of weight coefficient adjustment is obtained at this time; the linear adaptive filter is used to learn the influence of transmission environment data on 5G network information data, and the calibrated 5G network information data is obtained through the output of the linear adaptive filter.
[0024] Furthermore, the method of preprocessing the product defect image data, the calibration 5G network information data and the transmission environment data to obtain the defect image feature data set, the calibration 5G network information feature data set and the transmission environment feature data set includes:
[0025] Preprocessing of product defect image data:
[0026] The product defect image is converted from a color image to a gray image. The converted gray image is: ;in, For gray images The pixel value at ; The horizontal and vertical coordinates of each pixel; is the red channel pixel value of the product defect image; is the green channel pixel value of the product defect image; is the pixel value of the blue channel of the product defect image;
[0027] Use a Gaussian filter to denoise the gray image: ;in, is the image after denoising by Gaussian filter at position The pixel value at ; is the Gaussian kernel at position The weight of is the original grayscale image at position The pixel value of For current location The offset of is the size of the Gaussian kernel;
[0028] The histogram equalization method is used to enhance the image contrast, and the Canny edge detection is used to extract the edge information in the image. The image segmentation threshold is preset as , based on the image segmentation threshold Binarize the image: ; For the binary image at position Pixel value; 255 is the product defect area; 0 is the background area;.
[0029] The LOF algorithm is used to detect and eliminate abnormal data in product defect image data, calibrate 5G network information data, and transmission environment data, and obtain processed defect image feature data sets, calibrate 5G network information feature data sets, and transmission environment feature data sets;
[0030] The defect image feature dataset, the calibration 5G network information feature dataset, and the transmission environment feature dataset are normalized and converted into a standard normal distribution to obtain the normalized defect image feature dataset, the calibration 5G network information feature dataset, and the transmission environment feature dataset.
[0031] Furthermore, the method of weightedly fusing the defect image feature dataset, the calibration 5G network information feature dataset and the transmission environment feature dataset to obtain a comprehensive feature dataset includes:
[0032] The defect image feature dataset, the calibration 5G network information feature dataset and the transmission environment feature dataset are fused through a weighted model to form a comprehensive feature dataset; the defect image feature dataset is recorded as , the calibrated 5G network information feature dataset is recorded as , the transmission environment feature dataset is recorded as ;
[0033] The weighted model is: ;in, It is a comprehensive feature dataset; is the weight coefficient of the defect image feature dataset; To calibrate the weight coefficient of the 5G network information feature dataset; is the weight coefficient of the transmission environment feature dataset.
[0034] Furthermore, the training method of the product defect assessment model includes:
[0035] The historical comprehensive feature data set and the corresponding output label product defect level coefficient are used as the sample set; the sample set is used as the data set, and the data set is divided into a training set, a validation set, and a test set; GBDT is selected as the specific implementation of the gradient boosting machine model to handle the regression task;
[0036] Initialize GBDT parameters and define the objective function; GBDT parameters include the maximum number of leaf nodes in each tree, learning rate, number of trees and maximum depth of trees; use the historical comprehensive feature data set as input data and the corresponding product defect grade coefficient as output label to train the product defect assessment model; the product defect assessment model is a gradient boosting machine model;
[0037] The mean square error is used as the loss function to measure the difference between the model's predicted value and the actual value; the mean square error loss function is: ;in, is the number of samples in the data set; For the data set The actual value of samples; For the data set The predicted value of samples; is the index of the sample;
[0038] In each iteration, GBDT builds a new decision tree to fit the negative gradient of the loss function of the previous step, uses the negative gradient of the objective function as the learning target of the new tree, and adjusts the contribution of the new tree to the final result through the learning rate to minimize the loss function; the performance of the model is evaluated using the validation set, the model is tuned, and the model parameters are adjusted based on its performance feedback until the model performance is no longer significantly improved or the preset stopping condition is reached.
[0039] Furthermore, the method for tuning the model includes:
[0040] Add a regularization term to the objective function of GBDT, and the objective function of GBDT is: ;in, is the number of samples in the data set; For the data set The actual value of samples; For the model At the next iteration, The predicted value of samples; is the mean square error loss function of the model; is the regularization term in the objective function, which is used to penalize the complexity of the model;
[0041] The regularization term for: ;in, The coefficient for controlling the penalty of the number of leaf nodes; For Trees The number of leaf nodes; The coefficient to control the square penalty of leaf node scores; For Tree Middle The score of leaf nodes;
[0042] Combining the loss function and the regularization term, we get the complete objective function: ;in, For the The cumulative prediction value at the iteration; For the The predicted value of the newly added tree at the iteration;
[0043] At each iteration, a new decision tree is constructed To fit the negative gradient of the loss function of the previous step: ;in, It is the first-order derivative of the loss function with respect to the predicted value, i.e., the gradient; ;in, is the second-order derivative of the loss function with respect to the predicted value, i.e., the Hessian matrix;
[0044] Then, by optimizing the objective function The predicted value of the newly added tree at the iteration To find the optimal tree structure: ;in, For about A quadratic function of
[0045] Through learning rate To adjust the contribution of the new tree to the final result: ;in, is the learning rate, which controls the contribution of each tree to the final model prediction; For the After the iteration, The predicted value of samples; For the The predicted value of the newly added tree at the iteration;
[0046] The learning rate is dynamically adjusted through the learning rate limit model, and the optimal learning rate is found through the optimal adjustment model;
[0047] The learning rate limiting model is: ;in, is the dynamically adjusted learning rate; is the maximum value of the learning rate; is the minimum value of the learning rate; is the current iteration number; is the cycle length; The preset learning rate threshold is that when the dynamically adjusted learning rate is less than the preset learning rate threshold, the iteration is stopped;
[0048] The optimal adjustment model is: ;in, is the optimal learning rate; is the number of times the learning rate is adjusted; is the total number of iterations;
[0049] The ratio of the preset learning rate adjustment times to the total number of iterations is ; When the ratio of learning rate adjustment times to total iteration times is When the model performance is optimal within the range, the range is determined to be an optimal ratio, that is, the learning rate at this time is the optimal learning rate;
[0050] The test set is used to evaluate the performance of the model in the prediction task, and the trained product defect evaluation model is used to predict the current comprehensive feature data set to obtain the product defect grade coefficient.
[0051] Furthermore, the method of comparing the predicted rare earth permanent magnet product quality index with a preset rare earth permanent magnet product quality index threshold to determine whether the rare earth permanent magnet product quality is qualified includes:
[0052] If the predicted quality index of the rare earth permanent magnet product is less than the preset quality index threshold of the rare earth permanent magnet product, it is judged that the quality of the rare earth permanent magnet product does not meet the standard;
[0053] If the predicted rare earth permanent magnet product quality index is greater than or equal to the preset rare earth permanent magnet product quality index threshold, it is judged that the quality of the rare earth permanent magnet product has met the standard.
[0054] Furthermore, the training method of the defect type diagnosis model includes:
[0055] The data set is divided into a training set, a test set and a validation set, and a defect type diagnosis model is constructed. The defect type diagnosis model includes an input layer, a hidden layer and an output layer; the input layer is the historical unqualified rare earth permanent magnet product data, and the output layer is the product defect type data; the output layer is set with neurons equal to the number of product defect types, and each neuron corresponds to the predicted probability of a defect type; the softmax function is used as the activation function; the defect type diagnosis model is a multi-layer perceptron MLP model;
[0056] Multi-classification cross entropy is used as the loss function of the model to measure the difference between the predicted value and the actual value of the model; the multi-classification cross entropy loss function is: ;in, is the average loss of the dataset; is the total number of samples in the data set; The number of product defect type data; For the For the sample The true labels of each type; The model predicts The samples belong to The probability of each type;
[0057] Use the training set to train the defect type diagnosis model, and use the back propagation algorithm to update the model parameters to minimize the loss function; use the validation set to evaluate the performance of the defect type diagnosis model by calculating the accuracy index;
[0058] The SGD optimization algorithm is selected as the optimizer, and the model is tuned according to the performance feedback of the validation set. The model parameters are adjusted until the performance is no longer significantly improved or the preset stopping condition is reached. The test set is used to evaluate the performance of the model in the prediction task, and the trained defect type diagnosis model is used to predict the current comprehensive feature data set to obtain product defect type data.
[0059] Furthermore, the method of sending out an early warning instruction through the visual inspection terminal to feed back the product defect type data to the production department, and the production department timely optimizing the production process according to the fed-back product defect type data includes:
[0060] The product defect type data is collected in real time through the visual inspection terminal, and the collected product defect type data is expressed as a set as follows: ;in, For the The number of defect types; is the number of total defect types;
[0061] Sort the product defect type data in descending order according to the impact on production costs, and use the Power BI drawing tool to draw a Pareto chart; in the Pareto chart, the vertical axis is the number of product defect type data, and the horizontal axis is the type of product defect type data; draw a bar chart, and the height of each bar in the chart corresponds to the number of product defect type data; draw a cumulative curve, with the horizontal axis being the type of product defect type data and the vertical axis being the cumulative percentage of the number of product defect type data;
[0062] A cumulative percentage threshold is preset. When the cumulative percentage of the number of defect type data of a certain product exceeds the preset cumulative percentage threshold, the visual inspection terminal issues a warning instruction. The production department identifies product defect problems based on the warning instruction and the product defect type data in the Pareto chart, takes measures to optimize the production process, reduce or eliminate defect problems, and updates the Pareto chart based on the new product defect type data.
[0063] The technical effects and advantages of the visual inspection system for rare earth permanent magnet products based on 5G network cloud computing of the present invention are as follows:
[0064] The present invention automatically adjusts the weight coefficient of a linear adaptive filter to minimize the error between the expected output and the actual output; this dynamic adjustment capability enables the filter to quickly adapt to the ever-changing transmission environment, such as signal attenuation, interference increase, etc., thereby ensuring that the calibrated 5G network information data is more accurate and reliable; by calibrating the 5G network information data, the data deviation and noise caused by the transmission environment can be eliminated or weakened, significantly improving the quality of the data; the calibrated 5G network information data can more accurately reflect the actual status of the network, providing strong support for network optimization; through automatic calibration and optimization, the need for manual intervention is reduced, and the complexity and cost of network maintenance are reduced;
[0065] By adding regularization terms, the model is effectively prevented from overfitting on the training data and the generalization ability of the model on unknown data is improved; by controlling the number of leaf nodes and the penalty coefficient of the leaf node score, the model can be guided to generate a more reasonable and concise tree structure, thereby improving the interpretability and comprehensibility of the model; by adjusting the learning rate, it can be flexibly adjusted according to the specific data set and model performance to achieve the best training effect, significantly improve the training efficiency of the model, and reduce the training time; making the model more adaptable and robust to different types of data sets and training environments;
[0066] The Pareto chart visually displays the number of various defects and their cumulative percentages; enables the production department to make decisions based on data, giving priority to the types of defects that have the greatest impact on production costs, thereby achieving effective allocation of resources; timely identification and resolution of product defects can reduce waste of raw materials, time and manpower; helps to reduce production costs, improve resource utilization, and increase corporate profitability; through close collaboration between visual inspection terminals, data analysis teams and production departments; and by jointly solving product defect problems, communication and collaboration between different departments have been strengthened, promoting the team's overall collaboration and work efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0067] Figure 1 This is a schematic diagram of the structure of a visual inspection system for rare earth permanent magnet products based on 5G network cloud computing of the present invention;
[0068] Figure 2 This is a schematic flow chart of the visual inspection method for rare earth permanent magnet products based on 5G network cloud computing of the present invention. DETAILED DESCRIPTION
[0069] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention. Example
[0070] See also Figure 1 As shown, the visual inspection of rare earth permanent magnet products based on 5G network cloud computing in this embodiment includes: a data acquisition module for collecting product defect image data, 5G network information data and transmission environment data;
[0071] A data processing module is used to calibrate the 5G network information data according to the transmission environment data to obtain the calibrated 5G network information data; pre-process the product defect image data, the calibrated 5G network information data and the transmission environment data to obtain a defect image feature data set, a calibrated 5G network information feature data set and a transmission environment feature data set;
[0072] The defect image feature dataset, the calibration 5G network information feature dataset and the transmission environment feature dataset are weightedly fused to obtain a comprehensive feature dataset;
[0073] The product quality prediction module is used to build a product defect assessment model, input the comprehensive feature data set into the product quality prediction model, and predict the product defect grade coefficient;
[0074] The product quality assessment module is used to compare the predicted product defect level coefficient with the preset product defect level coefficient threshold to determine whether the quality of the rare earth permanent magnet product is qualified;
[0075] The defect type judgment module is used to collect data on unqualified rare earth permanent magnet products, build a defect type diagnosis model, input the data on unqualified rare earth permanent magnet products into the defect type diagnosis model, and predict the product defect type data;
[0076] The feedback control module is used to send out early warning instructions through the visual inspection terminal to feed back product defect type data to the production department. The production department optimizes the production process in a timely manner based on the fed-back product defect type data. Each module is connected by wired and / or wireless means.
[0077] Product defect image data includes defect image parameter data, defect location and defect area; defect image parameter data includes image resolution and color depth; 5G network information data includes network bandwidth, delay, packet loss rate, data transmission rate, 5G signal strength and error rate in data transmission; transmission environment data includes the temperature of the transmission environment, electromagnetic interference level, current and voltage of network equipment.
[0078] The product defect image data is obtained by shooting with an industrial camera; the 5G network information data is obtained through the network test equipment MATLAB; the temperature of the transmission environment is obtained through a temperature sensor, the electromagnetic interference level is obtained through an electromagnetic interference sensor, and the current and voltage of the network equipment are obtained through a current sensor and a voltage sensor; The method for calibrating the 5G network information data according to the transmission environment data to obtain the calibrated 5G network information data includes:
[0079] The 5G network information data is calibrated according to the transmission environment data through a linear adaptive filter, and a linear adaptive filter is defined, whose output is: ;in, is the output of the linear adaptive filter; The input of the linear adaptive filter is 5G network information data; is the weight coefficient of the linear adaptive filter; is the order of the linear adaptive filter; is the iteration time of the linear adaptive filter; is the number of iterations of the linear adaptive filter;
[0080] The weight coefficient of the linear adaptive filter is adjusted by the minimum mean square error algorithm. The weight coefficient is updated at each iteration time as follows: ;in, for The weight coefficient updated at the iteration time; is the error between the expected output and the actual output of the linear adaptive filter; The rate at which the weight coefficient is adjusted;
[0081] The error between the expected output and the actual output of the linear adaptive filter for: ;in, The expected output after calibrating the 5G network information data according to the transmission environment data; is the output of the linear adaptive filter;
[0082] According to the error between the expected output and the actual output of the linear adaptive filter, the rate of adjusting the weight coefficient of the adaptive filter is adjusted by the weight coefficient adjustment model until the output is stable; the weight coefficient adjustment model is: ;in, The initial rate adjusted for the weight factor; is the number of iterations of the linear adaptive filter; is the total number of iterations of the linear adaptive filter;
[0083] The error threshold between the expected output and the actual output of the preset linear adaptive filter is , when the error between the expected output and the actual output of the linear adaptive filter is less than the error threshold The adjustment is stopped when , and the optimal rate of weight coefficient adjustment is obtained at this time; the linear adaptive filter is used to learn the influence of transmission environment data on 5G network information data, and the calibrated 5G network information data is obtained through the output of the linear adaptive filter.
[0084] For example, suppose there is the following original 5G network information data: bandwidth: 100Mbps, latency: 50ms, packet loss rate: 1%; transmission environment data includes: temperature: 25°C, electromagnetic interference level: medium, current and voltage of network equipment: normal;
[0085] The preset expected output (calibrated data) is: bandwidth: 120Mbps, latency: 30ms, packet loss rate: 0.5%;
[0086] Define a linear adaptive filter, and set the initial weight coefficient of the filter to 0.5; adjust the weight coefficient through the minimum mean square error algorithm, assuming that the initial rate of weight coefficient adjustment is 0.1, and the number of iterations of the linear adaptive filter is 100 times. In each iteration, calculate the error between the expected output and the actual output of the linear adaptive filter, and update the weight coefficient according to the weight coefficient adjustment model;
[0087] Finally, when the error between the expected output and the actual output of the linear adaptive filter is less than the preset error threshold, the adjustment is stopped, and the weight coefficient obtained at this time is the optimal rate; the linear adaptive filter is used to learn the impact of the transmission environment data on the 5G network information data, and the calibrated 5G network information data is obtained through the output of the linear adaptive filter.
[0088] The method of preprocessing product defect image data, calibration 5G network information data and transmission environment data to obtain a defect image feature data set, a calibration 5G network information feature data set and a transmission environment feature data set includes:
[0089] Preprocessing of product defect image data:
[0090] The product defect image is converted from a color image to a gray image. The converted gray image is: ;in, For gray images The pixel value at ; The horizontal and vertical coordinates of each pixel; is the red channel pixel value of the product defect image; is the green channel pixel value of the product defect image; is the pixel value of the blue channel of the product defect image;
[0091] Use a Gaussian filter to denoise the gray image: ;in, is the image after denoising by Gaussian filter at position The pixel value at ; is the Gaussian kernel at position The weight of is the original grayscale image at position The pixel value of For current location The offset of is the size of the Gaussian kernel;
[0092] The histogram equalization method is used to enhance the image contrast, and the Canny edge detection is used to extract the edge information in the image. The image segmentation threshold is preset as , based on image segmentation threshold Binarize the image: , For the binary image at position Pixel value; 255 is the product defect area; 0 is the background area;
[0093] The LOF algorithm is used to detect and eliminate abnormal data in product defect image data, calibrate 5G network information data, and transmission environment data, and obtain processed defect image feature data sets, calibrate 5G network information feature data sets, and transmission environment feature data sets;
[0094] The defect image feature dataset, the calibration 5G network information feature dataset, and the transmission environment feature dataset are normalized and converted into a standard normal distribution to obtain the normalized defect image feature dataset, the calibration 5G network information feature dataset, and the transmission environment feature dataset.
[0095] The method of weightedly fusing the defect image feature dataset, the calibration 5G network information feature dataset and the transmission environment feature dataset to obtain a comprehensive feature dataset includes:
[0096] The defect image feature dataset, the calibration 5G network information feature dataset and the transmission environment feature dataset are fused through a weighted model to form a comprehensive feature dataset; the defect image feature dataset is recorded as , the calibrated 5G network information feature dataset is recorded as , the transmission environment feature dataset is recorded as ;
[0097] The weighted model is: ;in, It is a comprehensive feature dataset; is the weight coefficient of the defect image feature dataset; To calibrate the weight coefficient of the 5G network information feature dataset; is the weight coefficient of the transmission environment feature dataset.
[0098] For example, if image features are most important, calibrating 5G network information is second, and transmission environment has the least impact, the weight coefficients can be set as follows: is 0.6; is 0.3; is 0.1; therefore, the comprehensive feature dataset can be expressed as ;
[0099] The training methods of the product defect assessment model include:
[0100] The historical comprehensive feature data set and the corresponding output label product defect level coefficient are used as the sample set; the sample set is used as the data set, and the data set is divided into a training set, a validation set, and a test set; GBDT is selected as the specific implementation of the gradient boosting machine model to handle the regression task;
[0101] Initialize GBDT parameters and define the objective function; GBDT parameters include the maximum number of leaf nodes in each tree, learning rate, number of trees and maximum depth of trees; use the historical comprehensive feature data set as input data and the corresponding product defect grade coefficient as output label to train the product defect assessment model; the product defect assessment model is a gradient boosting machine model;
[0102] The mean square error is used as the loss function to measure the difference between the model's predicted value and the actual value; the mean square error loss function is: ;in, is the number of samples in the data set; For the data set The actual value of samples; For the data set The predicted value of samples; is the index of the sample;
[0103] In each iteration, GBDT builds a new decision tree to fit the negative gradient of the loss function of the previous step, uses the negative gradient of the objective function as the learning target of the new tree, and adjusts the contribution of the new tree to the final result through the learning rate to minimize the loss function; the performance of the model is evaluated using the validation set, the model is tuned, and the model parameters are adjusted based on its performance feedback until the model performance is no longer significantly improved or the preset stopping condition is reached.
[0104] Methods for tuning the model include:
[0105] Add a regularization term to the objective function of GBDT, and the objective function of GBDT is: ;in, is the number of samples in the data set; For the data set The actual value of samples; For the model At the next iteration, The predicted value of samples; is the mean square error loss function of the model; is the regularization term in the objective function, which is used to penalize the complexity of the model;
[0106] The regularization term for: ;in, The coefficient for controlling the penalty of the number of leaf nodes; For Tree The number of leaf nodes; The coefficient to control the square penalty of leaf node scores; For Tree Middle The score of leaf nodes; Combining the loss function and the regularization term, we get the complete objective function: ;in, For the The cumulative prediction value at the iteration; For the The predicted value of the newly added tree at the iteration;.
[0107] At each iteration, a new decision tree is constructed To fit the negative gradient of the loss function of the previous step: ;in, It is the first-order derivative of the loss function with respect to the predicted value, i.e., the gradient; ;in, is the second-order derivative of the loss function with respect to the predicted value, i.e., the Hessian matrix; Then, by optimizing the objective function The predicted value of the newly added tree at the iteration To find the optimal tree structure: ;in, For about A quadratic function of
[0108] Through learning rate To adjust the contribution of the new tree to the final result: ;in, is the learning rate, which controls the contribution of each tree to the final model prediction; For the After the iteration, The predicted value of samples; For the The predicted value of the newly added tree at the iteration; The learning rate is dynamically adjusted through the learning rate limit model, and the optimal learning rate is found through the optimal adjustment model;
[0109] The learning rate limiting model is: ;in, is the dynamically adjusted learning rate; is the maximum value of the learning rate; is the minimum value of the learning rate; is the current iteration number; is the cycle length; The preset learning rate threshold is that when the dynamically adjusted learning rate is less than the preset learning rate threshold, the iteration is stopped;
[0110] The optimal adjustment model is: ;in, is the optimal learning rate; is the number of times the learning rate is adjusted; is the total number of iterations;
[0111] The ratio of the preset learning rate adjustment times to the total number of iterations is ; When the ratio of learning rate adjustment times to total iteration times is When the model performance is optimal within the range, the range is determined to be an optimal ratio, that is, the learning rate at this time is the optimal learning rate;
[0112] The test set is used to evaluate the performance of the model in the prediction task, and the trained product defect evaluation model is used to predict the current comprehensive feature data set to obtain the product defect grade coefficient.
[0113] For example, suppose there is a data set that contains the following features: defect image data: resolution, color depth, defect location, and defect area; 5G network information data: bandwidth, latency, and packet loss rate; transmission environment data: temperature, electromagnetic interference level, current and voltage of network equipment; the target variable is the product defect grade coefficient;
[0114] In each iteration, a new decision tree is constructed to fit the current negative gradient; the learning rate is used to adjust the contribution of the new tree to the final result, and the learning rate is dynamically adjusted within a certain range; through the optimal adjustment model, the optimal learning rate is found so that the number of learning rate adjustments accounts for the total number of iterations within a specific range; finally, the trained GBDT model is used to predict the current comprehensive feature data set to obtain the product defect grade coefficient.
[0115] The method of comparing the predicted quality index of the rare earth permanent magnet product with the preset quality index threshold of the rare earth permanent magnet product to determine whether the quality of the rare earth permanent magnet product is qualified includes:
[0116] If the predicted quality index of the rare earth permanent magnet product is less than the preset quality index threshold of the rare earth permanent magnet product, it is judged that the quality of the rare earth permanent magnet product does not meet the standard;
[0117] If the predicted rare earth permanent magnet product quality index is greater than or equal to the preset rare earth permanent magnet product quality index threshold, it is judged that the quality of the rare earth permanent magnet product has met the standard.
[0118] The training method of the defect type diagnosis model includes:
[0119] The data set is divided into a training set, a test set and a validation set, and a defect type diagnosis model is constructed. The defect type diagnosis model includes an input layer, a hidden layer and an output layer; the input layer is the historical unqualified rare earth permanent magnet product data, and the output layer is the product defect type data; the output layer is set with neurons equal to the number of product defect types, and each neuron corresponds to the predicted probability of a defect type; the softmax function is used as the activation function; the defect type diagnosis model is a multi-layer perceptron MLP model;
[0120] Multi-classification cross entropy is used as the loss function of the model to measure the difference between the predicted value and the actual value of the model; the multi-classification cross entropy loss function is: ;in, is the average loss of the dataset; is the total number of samples in the data set; The number of product defect type data; For the For the sample The true labels of each type; The model predicts The samples belong to The probability of each type;
[0121] Use the training set to train the defect type diagnosis model, and use the back propagation algorithm to update the model parameters to minimize the loss function; use the validation set to evaluate the performance of the defect type diagnosis model by calculating the accuracy index;
[0122] The SGD optimization algorithm is selected as the optimizer, and the model is tuned according to the performance feedback of the validation set. The model parameters are adjusted until the performance is no longer significantly improved or the preset stopping condition is reached. The test set is used to evaluate the performance of the model in the prediction task, and the trained defect type diagnosis model is used to predict the current comprehensive feature data set to obtain product defect type data.
[0123] The visual inspection terminal issues an early warning command to feed back product defect type data to the production department. The production department optimizes the production process in a timely manner based on the fed-back product defect type data, including:
[0124] The product defect type data is collected in real time through the visual inspection terminal, and the collected product defect type data is expressed as a set as follows: ;in, For the The number of defect types; is the number of total defect types;
[0125] Sort the product defect type data in descending order according to the impact on production costs, and use the Power BI drawing tool to draw a Pareto chart; in the Pareto chart, the vertical axis is the number of product defect type data, and the horizontal axis is the type of product defect type data; draw a bar chart, and the height of each bar in the chart corresponds to the number of product defect type data; draw a cumulative curve, with the horizontal axis being the type of product defect type data and the vertical axis being the cumulative percentage of the number of product defect type data;
[0126] A cumulative percentage threshold is preset. When the cumulative percentage of the number of defect type data of a certain product exceeds the preset cumulative percentage threshold, the visual inspection terminal issues a warning instruction. The production department identifies product defect problems based on the warning instruction and the product defect type data in the Pareto chart, takes measures to optimize the production process, reduce or eliminate defect problems, and updates the Pareto chart based on the new product defect type data.
[0127] For example, suppose a company that produces rare earth permanent magnet products uses a visual inspection terminal to detect product defects in real time; the visual inspection terminal can identify and classify defects on the product and classify them into the following types: scratches, missing parts, color mismatch, poor welding;
[0128] The data collected in real time by the visual inspection terminal are as follows:
[0129] Number of scratches: 100, number of missing parts: 20, number of color mismatches: 5, number of poor welds: 3; the total number of defect types is 100+20+5+3=128.
[0130] According to the impact on production cost, these defect type data are sorted in descending order: scratches: 100, missing parts: 20, color mismatch: 5, poor welding: 3;
[0131] Use Power BI’s graphing tool to draw a Pareto chart. The Pareto chart will show the number of each defect type and their contribution to the total number of defects.
[0132] Bar graph: The height of each bar corresponds to the number of each defect type; for example, scratches have the highest number, so it is the highest in the bar graph;
[0133] Cumulative curve: The horizontal axis represents the defect type, and the vertical axis represents the cumulative percentage; the cumulative percentage refers to the proportion of the number of the previous defect type to the total number when plotting; for example, the number of scratches accounts for 85.9% of the total number (100 / 128), so it will be located at the first point of the cumulative curve;
[0134] Preset the cumulative percentage threshold, for example, 90%. When the cumulative percentage exceeds 90%, the visual inspection terminal issues an early warning instruction. In this example, the number of scratches accounts for 85.9% of the total number, so it will not trigger an early warning; however, if the threshold is set to 80%, the number of scratches will trigger an early warning because it exceeds this cumulative percentage threshold.
[0135] After receiving the early warning, the production department will check the Pareto chart and find that scratches are the main type of defects; the production department can take measures, such as improving the cleaning process on the production line or strengthening employee training, to reduce the number of scratch defects.
[0136] Based on new product defect type data, the Pareto chart can be updated to reflect the effect of any improvement measures; if the number of scratches decreases, the Pareto chart will show the new cumulative percentage, which helps the production department continue to optimize the production process to further reduce defects.
[0137] The preset product defect grade coefficient threshold is set by the staff. Different product defect grade coefficients are collected through the visual inspection terminal, and the average value of multiple product defect grade coefficients is taken as the preset product defect grade coefficient threshold. Similarly, the error threshold between the expected output and the actual output of the linear adaptive filter and the preset cumulative percentage threshold are set.
[0138] In this embodiment, a linear adaptive filter automatically adjusts its weight coefficient to minimize the error between the expected output and the actual output; this dynamic adjustment capability enables the filter to quickly adapt to the changing transmission environment, such as signal attenuation, interference increase, etc., thereby ensuring that the calibrated 5G network information data is more accurate and reliable; by calibrating the 5G network information data, the data deviation and noise caused by the transmission environment can be eliminated or weakened, and the data quality can be significantly improved; the calibrated 5G network information data can more accurately reflect the actual status of the network, providing strong support for network optimization; through automatic calibration and optimization, the need for manual intervention is reduced, and the complexity and cost of network maintenance are reduced;
[0139] By adding regularization terms, the model is effectively prevented from overfitting on the training data and the generalization ability of the model on unknown data is improved; by controlling the number of leaf nodes and the penalty coefficient of the leaf node score, the model can be guided to generate a more reasonable and concise tree structure, thereby improving the interpretability and comprehensibility of the model; by adjusting the learning rate, it can be flexibly adjusted according to the specific data set and model performance to achieve the best training effect, significantly improve the training efficiency of the model, and reduce the training time; making the model more adaptable and robust to different types of data sets and training environments;
[0140] The Pareto chart visually displays the number of various defects and their cumulative percentages; enables the production department to make decisions based on data, giving priority to the types of defects that have the greatest impact on production costs, thereby achieving effective allocation of resources; timely identification and resolution of product defects can reduce waste of raw materials, time and manpower; helps to reduce production costs, improve resource utilization, and increase corporate profitability; through close collaboration between visual inspection terminals, data analysis teams and production departments; and by jointly solving product defect problems, communication and collaboration between different departments have been strengthened, promoting the team's overall collaboration and work efficiency. Example
[0141] See also Figure 2 As shown, the part not described in detail in this embodiment is described in Example 1, and a visual inspection method for rare earth permanent magnet products based on 5G network cloud computing is provided, including:
[0142] S1. Collect product defect image data, 5G network information data and transmission environment data;
[0143] S2. Calibrate the 5G network information data according to the transmission environment data to obtain calibrated 5G network information data; pre-process the product defect image data, the calibrated 5G network information data and the transmission environment data to obtain a defect image feature data set, a calibrated 5G network information feature data set and a transmission environment feature data set;
[0144] The defect image feature dataset, the calibration 5G network information feature dataset and the transmission environment feature dataset are weightedly fused to obtain a comprehensive feature dataset;
[0145] S3. Build a product defect assessment model, input the comprehensive feature data set into the product quality prediction model, and predict the product defect grade coefficient;
[0146] S4. Compare the predicted product defect level coefficient with the preset product defect level coefficient threshold to determine whether the quality of the rare earth permanent magnet product is qualified;
[0147] S5. Collect data on unqualified rare earth permanent magnet products, build a defect type diagnosis model, input the data on unqualified rare earth permanent magnet products into the defect type diagnosis model, and predict product defect type data;
[0148] S6. Issue early warning instructions through the visual inspection terminal to feed back product defect type data to the production department, and the production department will optimize the production process in a timely manner based on the fed-back product defect type data.
[0149] Since the electronic device introduced in this embodiment is an electronic device used to implement the visual inspection system for rare earth permanent magnet products based on 5G network cloud computing in the embodiment of this application, based on the visual inspection system for rare earth permanent magnet products based on 5G network cloud computing introduced in the embodiment of this application, a person skilled in the art can understand the specific implementation method of the electronic device of this embodiment and its various variations, so how the electronic device implements the method in the embodiment of this application is not described in detail here. As long as a person skilled in the art implements the electronic device used in the visual inspection system for rare earth permanent magnet products based on 5G network cloud computing in the embodiment of this application, it belongs to the scope of protection of this application.
[0150] The above formulas are all dimensionless and numerical calculations. The formula is a formula for the most recent real situation obtained by collecting a large amount of data and performing software simulation. The preset parameters and thresholds in the formula are set by technicians in this field according to actual conditions.
[0151] The above is only a preferred embodiment of the present invention, and the protection scope of the present invention is not limited to the above embodiments. All technical solutions under the concept of the present invention belong to the protection scope of the present invention. It should be pointed out that for ordinary technical users in this technical field, some improvements and modifications without departing from the principle of the present invention should also be regarded as the protection scope of the present invention.
Claims
1. The visual inspection system for rare earth permanent magnet products based on 5G network cloud computing is characterized by: include: Data acquisition module, used to collect product defect image data, 5G network information data and transmission environment data; A data processing module, used for calibrating the 5G network information data according to the transmission environment data to obtain calibrated 5G network information data; Preprocess the product defect image data, the calibration 5G network information data, and the transmission environment data to obtain a defect image feature data set, a calibration 5G network information feature data set, and a transmission environment feature data set; The defect image feature dataset, the calibration 5G network information feature dataset and the transmission environment feature dataset are weightedly fused to obtain a comprehensive feature dataset; The product quality prediction module is used to build a product defect assessment model, input the comprehensive feature data set into the product quality prediction model, and predict the product defect grade coefficient; The product quality assessment module is used to compare the predicted product defect level coefficient with the preset product defect level coefficient threshold to determine whether the quality of the rare earth permanent magnet product is qualified; The defect type judgment module is used to collect data on unqualified rare earth permanent magnet products, build a defect type diagnosis model, input the data on unqualified rare earth permanent magnet products into the defect type diagnosis model, and predict the product defect type data; The feedback control module is used to send out early warning instructions through the visual inspection terminal to feed back product defect type data to the production department. The production department optimizes the production process in a timely manner based on the fed-back product defect type data. Each module is connected by wired and / or wireless means.
2. According to the 5G network cloud computing-based rare earth permanent magnet product visual inspection system of claim 1, it is characterized in that: The product defect image data includes defect image parameter data, defect location and defect area; the defect image parameter data includes image resolution and color depth; the 5G network information data includes network bandwidth, delay, packet loss rate, data transmission rate, 5G signal strength and error rate in data transmission; the transmission environment data includes the temperature of the transmission environment, the electromagnetic interference level, the current and voltage of the network equipment.
3. The rare earth permanent magnet product visual inspection system based on 5G network cloud computing according to claim 2 is characterized in that: The method of calibrating the 5G network information data according to the transmission environment data to obtain the calibrated 5G network information data includes: The 5G network information data is calibrated according to the transmission environment data through a linear adaptive filter, and a linear adaptive filter is defined, whose output is: ;in, is the output of the linear adaptive filter; The input of the linear adaptive filter is 5G network information data; is the weight coefficient of the linear adaptive filter; is the order of the linear adaptive filter; is the iteration time of the linear adaptive filter; is the number of iterations of the linear adaptive filter; The weight coefficient of the linear adaptive filter is adjusted by the minimum mean square error algorithm. The weight coefficient is updated at each iteration time as follows: ;in, for The weight coefficient updated at the iteration time; is the error between the expected output and the actual output of the linear adaptive filter; The rate at which the weight coefficient is adjusted; The error between the expected output and the actual output of the linear adaptive filter for: ,in, The expected output after calibrating the 5G network information data according to the transmission environment data; is the output of the linear adaptive filter; According to the error between the expected output and the actual output of the linear adaptive filter, the rate of adjusting the weight coefficient of the adaptive filter is adjusted by the weight coefficient adjustment model until the output is stable; the weight coefficient adjustment model is: ;in, The initial rate adjusted for the weight factor; is the number of iterations of the linear adaptive filter; is the total number of iterations of the linear adaptive filter; The error threshold between the expected output and the actual output of the preset linear adaptive filter is , when the error between the expected output and the actual output of the linear adaptive filter is less than the error threshold The adjustment is stopped when , and the optimal rate of weight coefficient adjustment is obtained at this time; the linear adaptive filter is used to learn the influence of transmission environment data on 5G network information data, and the calibrated 5G network information data is obtained through the output of the linear adaptive filter.
4. According to claim 3, the rare earth permanent magnet product visual inspection system based on 5G network cloud computing is characterized in that: The method of preprocessing product defect image data, calibration 5G network information data and transmission environment data to obtain a defect image feature data set, a calibration 5G network information feature data set and a transmission environment feature data set includes: Preprocessing of product defect image data: The product defect image is converted from a color image to a gray image. The converted gray image is: ,in, For gray images The pixel value at ; The horizontal and vertical coordinates of each pixel; is the red channel pixel value of the product defect image; is the green channel pixel value of the product defect image; is the blue channel pixel value of the product defect image; Use a Gaussian filter to denoise the gray image: ;in, is the image after denoising by Gaussian filter at position The pixel value at ; is the Gaussian kernel at position The weight of is the original grayscale image at position The pixel value of For current location The offset of is the size of the Gaussian kernel; The histogram equalization method is used to enhance the image contrast, and the Canny edge detection is used to extract the edge information in the image. The image segmentation threshold is preset as , based on the image segmentation threshold Binarize the image: ; For the binary image at position Pixel value; 255 is the product defect area; 0 is the background area; The LOF algorithm is used to detect and eliminate abnormal data in product defect image data, calibrate 5G network information data, and transmission environment data, and obtain processed defect image feature data sets, calibrate 5G network information feature data sets, and transmission environment feature data sets; The defect image feature dataset, the calibration 5G network information feature dataset, and the transmission environment feature dataset are normalized and converted into a standard normal distribution to obtain the normalized defect image feature dataset, the calibration 5G network information feature dataset, and the transmission environment feature dataset.
5. The rare earth permanent magnet product visual inspection system based on 5G network cloud computing according to claim 4 is characterized in that: The method of weightedly fusing the defect image feature data set, the calibration 5G network information feature data set, and the transmission environment feature data set to obtain a comprehensive feature data set includes: The defect image feature dataset, the calibration 5G network information feature dataset and the transmission environment feature dataset are fused through a weighted model to form a comprehensive feature dataset; the defect image feature dataset is recorded as , the calibrated 5G network information feature dataset is recorded as , the transmission environment feature dataset is recorded as ; The weighted model is: ;in, It is a comprehensive feature dataset; is the weight coefficient of the defect image feature dataset; To calibrate the weight coefficient of the 5G network information feature dataset; is the weight coefficient of the transmission environment feature dataset.
6. The rare earth permanent magnet product visual inspection system based on 5G network cloud computing according to claim 5 is characterized in that: The training method of the product defect assessment model includes: The historical comprehensive feature data set and the corresponding output label product defect level coefficient are used as the sample set; the sample set is used as the data set, and the data set is divided into a training set, a validation set, and a test set; GBDT is selected as the specific implementation of the gradient boosting machine model to handle the regression task; Initialize GBDT parameters and define the objective function; GBDT parameters include the maximum number of leaf nodes in each tree, learning rate, number of trees and maximum depth of trees; use the historical comprehensive feature data set as input data and the corresponding product defect grade coefficient as output label to train the product defect assessment model; the product defect assessment model is a gradient boosting machine model; The mean square error is used as the loss function to measure the difference between the model's predicted value and the actual value; the mean square error loss function is: ;in, is the number of samples in the data set; For the data set The actual value of samples; For the data set The predicted value of samples; is the index of the sample; In each iteration, GBDT builds a new decision tree to fit the negative gradient of the loss function of the previous step, uses the negative gradient of the objective function as the learning target of the new tree, and adjusts the contribution of the new tree to the final result through the learning rate to minimize the loss function; the performance of the model is evaluated using the validation set, the model is tuned, and the model parameters are adjusted based on its performance feedback until the model performance is no longer significantly improved or the preset stopping condition is reached.
7. The rare earth permanent magnet product visual inspection system based on 5G network cloud computing according to claim 6 is characterized in that: The method for tuning the model includes: Add a regularization term to the objective function of GBDT, and the objective function of GBDT is: ;in, is the number of samples in the data set; For the data set The actual value of samples; For the model At the next iteration, The predicted value of samples; is the mean square error loss function of the model; is the regularization term in the objective function; The regularization term for: ;in, The coefficient for controlling the penalty of the number of leaf nodes; For Trees The number of leaf nodes; The coefficient to control the square penalty of leaf node scores; For Trees Middle The score of leaf nodes; Combining the loss function and the regularization term, we get the complete objective function: ;in, For the The cumulative prediction value at the iteration; For the The predicted value of the newly added tree at the iteration; At each iteration, a new decision tree is constructed To fit the negative gradient of the loss function of the previous step: ;in, is the first-order derivative of the loss function with respect to the predicted value; ;in, is the second-order derivative of the loss function with respect to the predicted value; Then, by optimizing the objective function The predicted value of the newly added tree at the iteration To find the optimal tree structure: ;in, For about A quadratic function of Through learning rate To adjust the contribution of the new tree to the final result: ;in, is the learning rate; For the After the iteration, The predicted value of samples; For the The predicted value of the newly added tree at the iteration; The learning rate is dynamically adjusted through the learning rate limit model, and the optimal learning rate is found through the optimal adjustment model; The learning rate limiting model is: ;in, is the dynamically adjusted learning rate; is the maximum value of the learning rate; is the minimum value of the learning rate; is the current iteration number; is the cycle length; The preset learning rate threshold is that when the dynamically adjusted learning rate is less than the preset learning rate threshold, the iteration is stopped; The optimal adjustment model is: ;in, is the optimal learning rate; is the number of times the learning rate is adjusted; is the total number of iterations; The ratio of the preset learning rate adjustment times to the total number of iterations is ; When the ratio of learning rate adjustment times to total iteration times is When the model performance is optimal within the range, the range is determined to be an optimal ratio, that is, the learning rate at this time is the optimal learning rate; The test set is used to evaluate the performance of the model in the prediction task, and the trained product defect evaluation model is used to predict the current comprehensive feature data set to obtain the product defect grade coefficient.
8. The rare earth permanent magnet product visual inspection system based on 5G network cloud computing according to claim 7 is characterized in that: The method of comparing the predicted rare earth permanent magnet product quality index with the preset rare earth permanent magnet product quality index threshold to determine whether the rare earth permanent magnet product quality is qualified includes: If the predicted quality index of the rare earth permanent magnet product is less than the preset quality index threshold of the rare earth permanent magnet product, it is judged that the quality of the rare earth permanent magnet product does not meet the standard; If the predicted rare earth permanent magnet product quality index is greater than or equal to the preset rare earth permanent magnet product quality index threshold, it is judged that the quality of the rare earth permanent magnet product has met the standard.
9. The rare earth permanent magnet product visual inspection system based on 5G network cloud computing according to claim 8 is characterized in that: The training method of the defect type diagnosis model includes: The data set is divided into a training set, a test set and a validation set, and a defect type diagnosis model is constructed. The defect type diagnosis model includes an input layer, a hidden layer and an output layer; the input layer is the historical unqualified rare earth permanent magnet product data, and the output layer is the product defect type data; the output layer is set with neurons equal to the number of product defect types, and each neuron corresponds to the predicted probability of a defect type; the softmax function is used as the activation function; the defect type diagnosis model is a multi-layer perceptron MLP model; Multi-classification cross entropy is used as the loss function of the model to measure the difference between the predicted value and the actual value of the model; the multi-classification cross entropy loss function is: ;in, is the average loss of the dataset; is the total number of samples in the data set; The number of product defect type data; For the The samples for The true labels of each type; The model predicts The samples belong to The probability of a type; Use the training set to train the defect type diagnosis model, and use the back propagation algorithm to update the model parameters to minimize the loss function; use the validation set to evaluate the performance of the defect type diagnosis model by calculating the accuracy index; The SGD optimization algorithm is selected as the optimizer, and the model is tuned according to the performance feedback of the validation set. The model parameters are adjusted until the performance is no longer significantly improved or the preset stopping condition is reached. The test set is used to evaluate the performance of the model in the prediction task, and the trained defect type diagnosis model is used to predict the current comprehensive feature data set to obtain product defect type data.
10. The rare earth permanent magnet product visual inspection system based on 5G network cloud computing according to claim 9 is characterized in that: The method of sending out early warning instructions through the visual inspection terminal to feed back product defect type data to the production department, and the production department timely optimizing the production process according to the fed-back product defect type data includes: The product defect type data is collected in real time through the visual inspection terminal, and the collected product defect type data is expressed as a set as follows: ;in, For the The number of defect types; is the number of total defect types; Sort the product defect type data in descending order according to the impact on production costs, and use the Power BI drawing tool to draw a Pareto chart; in the Pareto chart, the vertical axis is the number of product defect type data, and the horizontal axis is the type of product defect type data; draw a bar chart, and the height of each bar in the chart corresponds to the number of product defect type data; draw a cumulative curve, with the horizontal axis being the type of product defect type data and the vertical axis being the cumulative percentage of the number of product defect type data; A cumulative percentage threshold is preset. When the cumulative percentage of the number of defect type data of a certain product exceeds the preset cumulative percentage threshold, the visual inspection terminal issues a warning instruction. The production department identifies product defect problems based on the warning instruction and the product defect type data in the Pareto chart, takes measures to optimize the production process, reduce or eliminate defect problems, and updates the Pareto chart based on the new product defect type data.
Citation Information
Patent Citations
Rare earth partition machine vision detection system and method based on variable background light source
CN116046738A
Welding defect detection method and device, electronic equipment and storage medium
CN111862067A
Minimum error entropy adaptive filtering method based on robust M estimation
CN115632633A
Method and system for monitoring construction quality of 3D printing bridge floor based on semantic segmentation
CN116664846A
Product defect big data intelligent detection method and cloud platform system thereof
CN117214179A