Industrial Internet detection methods, systems, media and equipment based on digital twins
By building a factory twin platform and product defect detection model, and using boosting classifiers for correction, the problem of insufficient data collection and processing capabilities in the digital twin detection method is solved, more efficient and accurate industrial Internet detection is achieved, and production and Management efficiency.
Patent Information
- Application Number
- CN202411081749.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-08
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2044-08-08
AI Technical Summary
Existing industrial Internet detection methods based on digital twins have insufficient data collection accuracy and real-time performance, limited data processing and analysis capabilities, and untimely update and optimization of digital twin models, resulting in detection results that rely on a single image data, poor robustness, and impact Product detection accuracy.
Build a factory twin platform and a product defect detection model. By acquiring factory images and product images, build a 3D model, use a boosting classifier to correct the digital space and the real scene space, extract key features, filter the most influential features, train the model and perform real-time detection. , automatically triggering the correction mechanism to optimize the model.
It improves production efficiency, reduces energy consumption, optimizes product quality, reduces maintenance costs, enhances management efficiency and safety, and ensures the accuracy and reliability of product testing.
Smart Images

Figure CN118608526B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of industrial Internet, and specifically to an industrial Internet detection method, system, medium and equipment based on digital twins. Background Art
[0002] With the advancement of Industry 4.0 and intelligent manufacturing, industrial Internet technology has become a key force in promoting the transformation and upgrading of the manufacturing industry. As an important part of industrial Internet technology, digital twin technology provides the manufacturing industry with unprecedented simulation, optimization and monitoring capabilities for product design and production processes by building a virtual model corresponding to the actual physical system and synchronizing the operating status data of the physical system in real time.
[0003] Traditional industrial detection methods mainly rely on manual inspections and regular maintenance, which is not only inefficient but also difficult to detect and handle problems in real time. The industrial Internet detection method based on digital twins can collect the operating status data of the physical system in real time, detect potential problems in time through data analysis, and predict the maintenance needs of equipment, thereby improving production efficiency and equipment reliability.
[0004] However, the existing industrial Internet detection methods, systems, media and equipment based on digital twins still have some shortcomings. For example, the accuracy and real-time performance of data collection need to be improved, the data processing and analysis capabilities are limited, and the update and optimization of digital twin models are not timely enough. These problems limit the application and development of digital twin technology in the field of industrial Internet. Summary of the invention
[0005] To this end, the technical problem to be solved by the present invention is to provide an industrial Internet detection method, system, medium and equipment based on digital twins, which solves the technical problem that the detection results in the prior art only depend on the single data of image data, and the quality of image data also affects the results of factory production products. The single detection approach leads to poor robustness of factory results, and ultimately leads to uncontrollable product detection accuracy.
[0006] In order to solve the above technical problems, the present invention provides the following technical solutions:
[0007] The industrial Internet detection method based on digital twins includes the following steps:
[0008] S100) Build a factory twin platform and product defect detection model for solving industrial Internet digital prediction product defects. The specific operations are as follows:
[0009] S101) Acquire factory images and factory product images;
[0010] S102) Constructing a real-life 3D model of the factory operation and a physical 3D model of the factory products;
[0011] S103) constructing a factory twin platform for solving industrial Internet digital prediction product defects based on the factory operation real-scene 3D model and the factory product entity 3D model constructed in step S102), and creating a product defect detection model for solving factory real-scene prediction product defects on the factory digital twin platform;
[0012] S200) Use the boosting classifier to calibrate the solution results of the factory twin platform and the product defect detection model in the digital space and the real space to obtain the real defects of the product. The specific operations are as follows:
[0013] S201) Extract key features of products from the factory twin platform and product defect detection model;
[0014] S202) Using feature selection algorithm to select key features that have the greatest impact on product defect classification results;
[0015] S203) Collect sample data containing product defects and annotate the collected sample data, with the number of sample data not less than 10,000;
[0016] S204) using the sample data annotated in step S203) to train the product defect detection model, and then migrating the parameters of the trained product defect detection model to the boosting classifier as initial parameters of the weak classifier;
[0017] S205) Use the factory twin platform and product defect detection model to detect product defects in real time, and compare the detection results with the actual situation.
[0018] The above-mentioned industrial Internet detection method based on digital twins, step S200) also includes the following operations:
[0019] S206) When a false alarm or missed alarm is detected, a correction mechanism is automatically triggered, wherein the correction mechanism includes at least one of re-collecting sample data of the product currently produced by the factory, re-training the model, and adjusting the classifier parameters;
[0020] S207) Feeding back the corrected results to the factory twin platform and the product defect detection model to optimize the factory twin platform and the product defect detection model.
[0021] In the above-mentioned digital twin-based industrial Internet detection method, in step S206), a boosting classifier is used to calibrate the settlement results of the factory twin platform and the product defect detection model in the digital space and the real space. The specific operations are as follows:
[0022] S206-1) using the product prediction image calculated by the factory twin platform and the product defect real scene prediction image calculated by the product defect detection model as input items of the boosting classifier, and using the product defect real scene image as output item of the boosting classifier;
[0023] S206-2) Based on the accuracy of the factory twin platform solution and the accuracy of the product defect detection model solution, a correction objective function for solving the structure in the digital space and the real space is constructed. The correction objective function is:
[0024]
[0025] Where M is the correction target value; FR is the accuracy of the real-life image of the factory product; FD is the accuracy of the digital image solved by the factory twin platform; is the weight factor used to adjust the penalty intensity;
[0026] S206-3) Using the correction objective function obtained in step S206-2) as the loss function of the boosting classifier, the boosting classifier is trained to obtain a correction model for outputting the real image of the product. The correction model is:
[0027] D=boosting(Dreal,Ddigital)
[0028] Among them, D is the real image of the product; Dreal is the real scene image of the product; Ddigital is the digital image of the product.
[0029] In the above-mentioned digital twin-based industrial Internet detection method, in step S103), the real-life 3D model of the factory operation and the physical 3D model of the product are loaded through Unity and projected onto a digital platform to obtain a factory twin platform; wherein the real-life 3D model of the factory operation and the physical 3D model of the product are communicatively connected through a data transmission channel constructed by a cloud server; the projection method used when projecting the real-life 3D model of the factory operation and the physical 3D model of the product onto the digital platform is the UTM projection method.
[0030] In the above industrial Internet detection method based on digital twins, in step S205), when the product defect detection model detects product defects, the specific operations are as follows:
[0031] S205-1) transmitting the information of the product entity to the factory entity 3D model generated by the digital twin of the factory twin platform in real time, so that the product entity 3D model moves accordingly in the factory real scene 3D model according to the movement information;
[0032] S205-2) The factory twin platform records in real time the production information of the product entity 3D model in the factory real-scene 3D model as the product defect prediction result.
[0033] In the above industrial Internet detection method based on digital twin, S103) product defect detection model is created through the following steps:
[0034] S103-1) Randomly select multiple product patterns as sample patterns;
[0035] S103-2) using the product information in the sample pattern selected in step S103-1) as real scene prediction information;
[0036] S103-3) Using the sample image as the input item of the YOLO V8 neural network, using the real scene prediction image as the output item of the YOLO V8 neural network, and using the YOLO V8 neural network to perform mapping learning on the input item of the YOLO V8 neural network and the output item of the YOLO V8 neural network, a product defect detection model can be obtained after learning.
[0037] In the above-mentioned industrial Internet detection method based on digital twins, the feature fusion network structure in the YOLO V8 neural network is BiFPN.
[0038] A system for performing industrial Internet detection using the above-mentioned industrial Internet detection method based on digital twins, comprising:
[0039] A data acquisition unit, used to acquire factory images and factory product images;
[0040] Factory twin platform, used to solve industrial Internet digital prediction product defects;
[0041] Product defect detection model, used to solve the factory scene to predict product defects;
[0042] Boosting classifier, used to calibrate the solution results of the factory twin platform and product defect detection model in digital space and real space;
[0043] The data acquisition unit is respectively communicated with the factory twin platform and the product defect detection model, and the factory twin platform and the product defect detection model are respectively communicated with the boosting classifier.
[0044] A computer-readable storage medium stores a computer program, which implements the above method when executed by a processor.
[0045] A computer device includes a readable storage medium, a processor, and a computer program stored in the readable storage medium and executable on the processor, wherein the computer program implements the above method when executed by the processor.
[0046] The technical solution of the present invention achieves the following beneficial technical effects:
[0047] 1. Improve production efficiency:
[0048] Real-time data collection and analysis enables potential problems to be discovered and handled promptly, reducing the risk of production interruptions and thus improving production efficiency.
[0049] Through the simulation and optimization of digital twin models, the production process can be continuously improved, unnecessary production steps can be reduced, and production efficiency can be further improved.
[0050] 2. Reduce energy consumption:
[0051] Accurate data monitoring and analysis can help companies identify bottlenecks in energy consumption, thereby formulating more reasonable energy use plans and reducing energy consumption.
[0052] Optimized production processes and equipment maintenance strategies can also help reduce unnecessary energy consumption.
[0053] 3. Optimize product quality:
[0054] Digital twin technology can simulate the entire production process of a product, including each production link and parameter settings, so as to discover potential quality problems and make improvements during the product design stage.
[0055] Real-time monitoring and early warning systems can ensure the stability and consistency of products during the production process, reduce the defective rate and improve product quality.
[0056] 4. Reduce maintenance costs:
[0057] Through remote monitoring and predictive maintenance of equipment, companies can detect the risk of equipment failure in advance and intervene, reducing production interruptions and maintenance costs caused by equipment failure.
[0058] Predictive maintenance can also extend the life of equipment and reduce the frequency and cost of equipment replacement and repair.
[0059] 5. Improve management efficiency:
[0060] The visual management interface and tools enable managers to understand the situation at the production site in real time, make corresponding decisions and adjustments, and improve management efficiency.
[0061] 6. Enhanced Security:
[0062] Through real-time monitoring and early warning of key equipment and production processes, enterprises can promptly identify potential safety hazards and take corresponding measures to reduce the risk of production accidents. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] Figure 1 This is a working principle diagram of the industrial Internet security defense traceability system based on digital twins in the present invention;
[0064] Figure 2 A flowchart for constructing a factory twin platform and a product defect detection model in the present invention;
[0065] Figure 3 This is a flow chart of using the factory twin platform and product defect detection model to perform real product defect detection and prediction in the present invention;
[0066] Figure 4 Schematic diagram of computer equipment capable of performing digital twin-based Industrial Internet detection. DETAILED DESCRIPTION
[0067] The present invention is further described below with reference to examples.
[0068] like Figure 1 As shown, the industrial Internet detection system based on digital twins in the present invention includes a data acquisition unit, an industrial twin platform, a product defect detection model and a boosting classifier. The data acquisition unit is respectively connected to the factory twin platform and the product defect detection model in communication, and the factory twin platform and the product defect detection model are respectively connected to the boosting classifier in communication. Among them, the data acquisition unit is used to obtain factory images and factory product images; the factory twin platform is used to solve the industrial Internet digital prediction product defects; the product defect detection model is used to solve the factory real scene prediction product defects; the boosting classifier is used to correct the solution results of the factory twin platform and the product defect detection model in digital space and real scene space.
[0069] When the industrial Internet detection system based on digital twins of the present invention is applied to factory product Internet detection, it is necessary to first build a factory twin platform and a product defect detection model for solving the industrial Internet digital prediction product defect, such as Figure 2 As shown, the specific operations are:
[0070] S101) Acquire factory images and factory product images;
[0071] S102) Constructing a real-life 3D model of the factory operation and a physical 3D model of the factory products;
[0072] S103) Based on the factory operation real scene 3D model and the factory product entity 3D model constructed in step S102), a factory twin platform for solving the industrial Internet digital prediction product defects is constructed, and a product defect detection model for solving the factory real scene prediction product defects is created on the factory digital twin platform; wherein the product defect detection model is created by the following steps:
[0073] S103-1) Randomly select multiple product patterns as sample patterns;
[0074] S103-2) using the product information in the sample pattern selected in step S103-1) as real scene prediction information;
[0075] S103-3) Using the sample pattern as the input item of the YOLO V8 neural network, using the real scene prediction image as the output item of the YOLO V8 neural network, using the YOLO V8 neural network to perform mapping learning on the input item of the YOLO V8 neural network and the output item of the YOLO V8 neural network, after learning, a product defect detection model can be obtained; wherein, when using the YOLO V8 neural network, the feature fusion network structure in the YOLO V8 neural network is BiFPN.
[0076] The product defect detection model obtained in step S103-3) is:
[0077] Dreal=YOLO V8 (G)
[0078] In the formula, Dreal is the product real scene prediction image, G is the real image, and YOLO V8 is the YOLO V8 neural network.
[0079] In the present invention, the real-life 3D model of the factory operation and the 3D model of the product entity are loaded into Unity and projected onto the digital platform to obtain the factory twin platform. The real-life 3D model of the factory operation and the 3D model of the product entity are connected through the data transmission channel constructed by the cloud server; the projection method used when projecting the real-life 3D model of the factory operation and the 3D model of the product entity onto the digital platform is the UTM projection method.
[0080] Secondly, if Figure 3 As shown in the figure, on the basis of completing the factory twin platform and product defect detection model, when using the factory twin platform and product defect detection model to detect and predict product defects, the boosting classifier is used to correct the solution results of the factory twin platform and product defect detection model in digital space and real space to obtain the real defects of the product. The specific operations are as follows:
[0081] S201) Extract key features of products from the factory twin platform and product defect detection model;
[0082] S202) Using feature selection algorithm to select key features that have the greatest impact on product defect classification results;
[0083] S203) Collect sample data containing product defects and annotate the collected sample data, with the number of sample data not less than 10,000;
[0084] S204) using the sample data annotated in step S203) to train the product defect detection model, and then migrating the parameters of the trained product defect detection model to the boosting classifier as initial parameters of the weak classifier;
[0085] S205) Use the factory twin platform and the product defect detection model to detect product defects in real time, and compare the detection results with the actual situation; when the product defect detection model detects product defects, the specific operations are as follows:
[0086] S205-1) transmitting the information of the product entity to the factory entity 3D model generated by the digital twin of the factory twin platform in real time, so that the product entity 3D model moves accordingly in the factory real scene 3D model according to the movement information;
[0087] S205-2) The factory twin platform records in real time the production information of the product entity 3D model in the factory real scene 3D model as the product defect prediction result;
[0088] S206) When a false alarm or missed alarm is detected, a correction mechanism is automatically triggered, wherein the correction mechanism includes at least one of re-collecting sample data of the factory's current production products, retraining the model, and adjusting the classifier parameters; using a boosting classifier to correct the settlement results of the factory twin platform and the product defect detection model in the digital space and the real space, and the specific operations are:
[0089] S206-1) using the product prediction image calculated by the factory twin platform and the product defect real scene prediction image calculated by the product defect detection model as input items of the boosting classifier, and using the product defect real scene image as output item of the boosting classifier;
[0090] S206-2) Based on the accuracy of the factory twin platform solution and the accuracy of the product defect detection model solution, a correction objective function for solving the structure in the digital space and the real space is constructed. The correction objective function is:
[0091]
[0092] Where M is the correction target value; FR is the accuracy of the real-life image of the factory product; FD is the accuracy of the digital image solved by the factory twin platform; is the weight factor used to adjust the penalty intensity;
[0093] S206-3) Using the correction objective function obtained in step S206-2) as the loss function of the boosting classifier, the boosting classifier is trained to obtain a correction model for outputting the real image of the product. The correction model is:
[0094] D=boosting(Dreal,Ddigital)
[0095] Among them, D is the real image of the product; Dreal is the real scene image of the product; Ddigital is the digital image of the product;
[0096] S207) Feeding back the corrected results to the factory twin platform and the product defect detection model to optimize the factory twin platform and the product defect detection model.
[0097] After the factory twin platform and product defect detection model are built, in order to improve the solution accuracy of the factory twin platform and product defect detection model, the factory twin platform and product defect detection model are optimized. The specific operations are:
[0098] (1) Data collection: Collect a large amount of sample data containing product defects and label them. These sample data can come from different factories, different product types, and different production processes;
[0099] (2) Pre-trained model: Use the collected sample data to train a high-performance product defect detection model as a pre-trained model. Migrate the parameters of the pre-trained model to the boosting classifier as the initial parameters of the weak classifier. In this way, the knowledge learned from the pre-trained model can be used to accelerate the training process of the boosting classifier, and the parameters of the weak classifier can be continuously optimized to improve its performance on specific tasks;
[0100] (3) Real-time detection: Detect product defects in real time on the factory twin platform and compare the detection results with the actual situation.
[0101] (4) Correction mechanism: When a false alarm or missed alarm is detected, the correction mechanism is automatically triggered.
[0102] (5) Feedback loop: Feedback the corrected results to the factory twin platform and product defect detection model to optimize the performance of the factory twin platform and product defect detection model. This can form a closed-loop feedback system to continuously improve the accuracy and reliability of product defect detection.
[0103] In order to reduce the influence of noise data and improve the performance of boosting classifier, so as to identify some defect types that are difficult to distinguish, for example, for subtle crack defects, contrast stretching is used to highlight these features. The present invention adopts the following operations:
[0104] (a) Key features are extracted from the factory twin platform and product defect detection model. These features include product texture, color, shape, and size.
[0105] (b) The feature selection algorithm Fisher’s exact test is used to select the features that have the greatest impact on the classification results.
[0106] When using the present invention to predict product defects, the information of the product entity is transmitted to the real-scene 3D model of the factory in real time, so that the product entity 3D model moves accordingly in the real-scene 3D model of the factory according to the movement information, wherein the movement information includes the precise location data of the product entity in the factory and the specific time information of the product entity in a specific location or state; the factory twin platform records the production information of the product entity 3D model in the real-scene 3D model of the factory in real time as the product defect prediction result.
[0107] In the present invention, the correction target value M represents the result of a correction objective function, which represents the difference between the accuracy of the factory twin platform solution and the accuracy of the product defect detection model solution. The result of the correction objective function (M value) acts on various aspects of the product defect detection model, mainly in the following aspects:
[0108] 1. Parameter adjustment of product defect detection model
[0109] The M value is used to dynamically adjust the learning rate of the product defect detection model to optimize the performance of the product defect detection model, wherein in machine learning, the learning rate is a hyperparameter used to determine the step size for updating model parameters during training. In the present invention, the learning rate can be adjusted according to the performance of the product defect detection model on the validation set, so as to train the product defect detection model more effectively. When the M value is high, it means that the performance of the product defect detection model on the validation set has not been significantly improved. At this time, the learning rate can be reduced to adjust the model parameters more finely, which helps to avoid overfitting and improve generalization ability; when the M value is low, it means that the product defect detection model performs well on the validation set. At this time, the learning rate can be increased to accelerate the training of the product defect detection model.
[0110] In this embodiment, the learning rate hyperparameter of the product defect detection model is dynamically adjusted through the following steps:
[0111] 1-1) Initialize the learning rate of the product defect detection model. The initial value of the learning rate can be determined based on past experience, experimental data or default settings. In this embodiment, it is assumed that the initial learning rate is set to 0.01;
[0112] 1-2) Define a correction objective function for calculating the difference between the factory twin platform solution accuracy and the product defect detection model solution accuracy, and obtain the M value. The specific form of the correction objective function can be set according to actual needs. For example, the mean square error (MES) or other suitable indicators can be used;
[0113] 1-3) Product defect detection model training and M value calculation. During the product defect detection model training process, the product defect detection model is iteratively trained using the training data set. At the end of each iteration cycle, the solution accuracy of the product defect detection model is calculated using the verification data set and compared with the solution accuracy of the factory twin platform to obtain the M value;
[0114] 1-4) According to the M value calculated in step 1-3), the learning rate of the product defect detection model is dynamically adjusted, wherein the specific adjustment strategy is:
[0115] (i) If the M value is higher than the preset upper threshold (e.g. 0.05), it is considered that the current learning rate is too large, resulting in too rough adjustment of model parameters. In this case, the learning rate is multiplied by a decay factor less than 1 (e.g. 0.9) to reduce the learning rate;
[0116] (ii) If the M value is lower than the preset threshold value (e.g. 0.01), it is considered that the current learning rate is small enough and the parameter adjustment of the product defect detection model is relatively accurate. At this time, the learning rate can be kept unchanged and increased appropriately according to demand to accelerate training;
[0117] (iii) If the M value is between two thresholds, the current learning rate can be kept unchanged;
[0118] 1-5) Repeat steps 1-3) and 1-4) to perform training for multiple iteration cycles, and in each iteration cycle, calculate the M value and dynamically adjust the learning rate of the product defect detection model. When the product defect detection model is iterated to a preset number of times (for example, 100 times) or the M value meets the preset convergence condition (for example, the change of the M value for multiple consecutive iteration cycles is less than a certain threshold), stop training;
[0119] 1-6) After the product defect detection model is trained, the product defect detection model is evaluated using a test data set to verify the performance of the product defect detection model in actual applications. If the performance of the product defect detection model meets the requirements, the trained product defect detection model is output for subsequent use.
[0120] By dynamically adjusting the learning rate, the product defect detection model can adaptively adjust the parameter update step size during the training process, thereby improving the solution accuracy and training efficiency of the product defect detection model.
[0121] 2. Adjustment of Industrial Internet Detection System Based on Digital Twin
[0122] The M value is used for feature selection, and then used for the prediction of product defects in the industrial Internet detection system based on digital twins. The following operations are used to combine the M value with Fisher:
[0123] 2-1) Calculate the M value of each feature in the sample data set;
[0124] 2-2) Use Fisher's exact test to preliminarily screen the features and exclude features that are not related to the target variable;
[0125] 2-3) Sort the remaining features according to the M value, and select the feature with the highest M value to add to the feature set;
[0126] 2-4) Repeat steps 2-3) until the feature set size or product defect detection model performance requirements are met;
[0127] 2-5) Evaluate the model performance based on the selected feature set. If the performance does not meet the requirements, return to step 2-3) to adjust the feature selection strategy.
[0128] 3. Used for integration of multiple training models
[0129] When multiple training models are integrated into the product defect detection model of the present invention in an integrated manner, the M value can be used to guide the integration of the training models. The specific operation is:
[0130] 3-1) Training multiple training models (such as multiple weak classifiers in a boosting classifier);
[0131] 3-2) Calculate the M value of each model on the validation data set;
[0132] 3-3) Assign a weight to each model based on the M value, and the weight is proportional to its contribution to reducing the M value;
[0133] 3-4) Integrate multiple models according to the assigned weights to obtain the final integrated model;
[0134] 3-5) Evaluate the performance of the integrated model. If the performance does not meet the requirements, return to step 3-1) to adjust the model or weight distribution strategy.
[0135] 4. Data augmentation and resampling
[0136] The M value can be used to guide data enhancement strategies, such as performing more enhancement on samples that result in higher M values. For unbalanced datasets, samples can be resampled according to the M value to balance the number of samples in different categories.
[0137] 5. Feedback loop for product defect detection model training
[0138] During the product defect detection model training process, a feedback loop is introduced to adjust the training parameters or model structure according to the change of M value. Among them, M value is used as a quantitative indicator to measure the performance or deviation of the model. By monitoring the change of M value in real time or regularly, problems in the product defect detection model can be discovered in time and corresponding adjustment measures can be taken. The specific operations are as follows:
[0139] 5-1) Initialize the model: Select the appropriate model structure and initial parameters to start the training process of the product defect detection model;
[0140] 5-2) Use the training data set to train the product defect detection model and record the M value of each training epoch or iteration;
[0141] 5-3) Monitor the M value: monitor the changes of the M value in real time or regularly. You can set a threshold or change trend as a trigger condition. When the M value exceeds the threshold or shows an unfavorable change trend, the feedback loop is triggered;
[0142] 5-4) Analyze M-value: Conduct in-depth analysis of the M-value that triggers the feedback loop. By analyzing the changes in the M-value and the contribution of different features to the M-value, systematic deviations or defects in the product defect detection model can be identified.
[0143] 5-5) Adjust the model: According to the analysis results of the M value, make corresponding adjustments to the product defect detection model. Adjustment measures may include but are not limited to: adjusting the hyperparameters of the product defect detection model, such as learning rate, batch size, etc.; changing the structure of the product defect detection model, such as increasing or decreasing the number of network layers, changing the activation function, etc.; introducing new features or deleting irrelevant features; trying different optimization algorithms or loss functions;
[0144] 5-6) Retrain the model: Use the adjusted product defect detection model to retrain and continue to monitor the changes in the M value;
[0145] 5-7) Iterative optimization: Repeat steps 5-3) to 5-6) to gradually reduce the M value and improve the performance of the product defect detection model through continuous iterative optimization.
[0146] By adjusting the training of the product defect detection model based on the feedback loop of the M value, the performance of the model can be monitored in real time or regularly, and the training process of the product defect detection model can be adjusted in time according to the changes in the M value. By introducing the feedback loop mechanism, systematic deviations or defects in the product defect detection model can be discovered and corrected in time, improving the accuracy and generalization ability of the product defect detection model.
[0147] 6. Visualization and monitoring:
[0148] Visualize the M value as a key performance indicator (KPI) to monitor the performance of the model in real time.
[0149] When the M value exceeds the preset threshold, an alarm can be triggered or the strategy can be automatically adjusted to ensure the stability and accuracy of the product defect detection model.
[0150] During user feedback and iterative optimization, the M value is used as part of the user feedback to collect user feedback on the prediction results of the product defect detection model, and the model is adjusted based on the feedback. Through the iterative optimization process, the accuracy and reliability of the product defect detection model are continuously improved to meet user needs and expectations.
[0151] To apply the M value to the real-time detection process to ensure the accuracy and real-time performance of product defect detection, the following steps can be taken:
[0152] 6-1) Update M value in real time:
[0153] During the real-time inspection process, after each defect inspection, the difference between the actual inspection result and the predicted result is calculated immediately. The difference data is used to update the M value in real time.
[0154] 6-2) Dynamically adjust the detection threshold
[0155] Dynamically adjust the threshold of product defect detection according to the size of the M value. If the M value is high, it means that the prediction of the product defect detection model may be biased. The threshold can be appropriately lowered to increase the sensitivity of the detection and reduce missed reports. If the M value is low, it means that the prediction of the product defect detection model is relatively accurate. The threshold can be appropriately increased to reduce false positives.
[0156] 6-3) Real-time feedback and adjustment
[0157] The real-time calculated M value and test results are fed back to the system monitoring personnel or the system is automatically adjusted. If the M value is continuously high or the test results are abnormal, the system can automatically trigger adjustment measures, such as adjusting model parameters, changing the detection algorithm, etc.
[0158] 6-4) Real-time model optimization
[0159] If the M value indicates that the product defect detection model performance has degraded, the system can automatically trigger the online learning or fine-tuning process of the product defect detection model. The product defect detection model is optimized using the latest inspection data and the M value calculated in real time to improve its prediction accuracy.
[0160] 6-5) Monitoring and logging
[0161] Record the M value, test results, adjustment measures, etc. of each real-time test. Analyze the logs regularly to find potential problems and trends, and optimize the test process and model performance accordingly.
[0162] 6-6) Real-time alerts and notifications
[0163] If the M value exceeds the preset threshold or the test result is seriously abnormal, the system can automatically trigger an alarm or notify relevant personnel. In this way, manual intervention measures can be taken in time to ensure the accuracy and reliability of the test.
[0164] 6-7) Model update and iteration:
[0165] Design an automated iteration loop in which the system automatically decides whether to retrain or adjust the product defect detection model based on the M value and performance of real-time detection. This ensures that the model is always in the best state to adapt to the ever-changing product defect detection needs. The performance of the model is regularly evaluated based on the data and M value collected during real-time detection. If the model performance is found to have degraded or cannot meet the requirements, the model can be retrained or the model parameters can be updated using new data. Through continuous iteration and optimization, the accuracy and generalization ability of the model can be improved to adapt to the ever-changing product defect detection needs.
[0166] Through the above steps, the M value can be effectively applied to the real-time detection process to ensure the accuracy and real-time performance of product defect detection. At the same time, by continuously optimizing and adjusting the detection process and model performance, the accuracy and efficiency of detection can be further improved.
[0167] The feature fusion network structure in the YOLO V8 neural network in the present invention is BiFPN (Bi-directional Feature Pyramid Network), which is different from the feature fusion network structure PANet (Path Aggregation Network) in the existing YOLO V8 neural network and can more effectively fuse feature information of different scales, thereby improving the performance of target detection.
[0168] BiFPN is a multi-scale, bidirectional feature pyramid network that aims to fuse features of multiple scales and consider the importance of each feature during the fusion process. BiFPN uses a weighted feature fusion method so that the model can learn which features are more important for detection.
[0169] When the YOLO V8 neural network is used in the present invention, a BiFPN module including multiple BiFPN units is first defined, each BiFPN unit performs upsampling, downsampling and weighted fusion of features, and then the Neck part is found in the YOLO V8 neural network and the PANet in the Neck part is replaced with BiFPN.
[0170] At present, most target detection loss functions use the cross entropy (CE) loss function, but since it is not very good at distinguishing boundary pixels during the training process, it will cause blurred boundaries. In the present invention, in order to obtain a high-confidence saliency map and a clear boundary, the original traditional cross entropy loss function is changed to a hybrid loss function, that is, the hybrid loss function is selected as the target detection loss function in the product defect detection model, wherein the hybrid loss function is a loss function obtained by combining binary cross entropy (BCE), structural similarity (SSIM) and intersection over union (IOU) losses.
[0171] Binary cross entropy (BCE) loss is a very widely used loss in binary classification and segmentation, and its formula is expressed as:
[0172]
[0173] Where y is a binary label with a value of 0 or 1, and p(y) is the predicted probability of significance.
[0174] Structural Similarity (SSIM) was originally proposed for image quality assessment. Since there is a strong correlation between the pixels of an image, these correlations carry important information about the structure of objects in the visual scene. SSIM defines the structural information in an image by taking the brightness and contrast related to the structure of the object, so it can capture the structural information in the input image.
[0175] The SSIM measurement system consists of three comparison modules: brightness, contrast, and structure.
[0176] Among them, the brightness contrast function takes the average grayscale of the image as an estimate of the brightness measurement, and its formula is expressed as:
[0177]
[0178] Based on the brightness contrast function, the brightness contrast function formula of the two images is:
[0179]
[0180] The contrast function uses the standard deviation of the image as a contrast measurement estimate, and the formula is:
[0181]
[0182] Based on the contrast function, the contrast comparison function formula of the two images is:
[0183]
[0184] The formula of the structural contrast function is:
[0185]
[0186] Finally, the brightness contrast function of the two images, the contrast contrast function of the two images, and the structure contrast function constitute the SSIM function. The formula of the SSIM function is:
[0187]
[0188] Among them, α, β and γ are all greater than 0, which are used to adjust the importance of these three modules.
[0189] Assume that α, β, and γ are all 1. , then the SSIM function formula is:
[0190]
[0191] Based on the above-mentioned industrial Internet detection method based on digital twins, accordingly, a computer-readable storage medium storing a computer program is also provided in this example. When the computer program is executed by the processor, the following steps are implemented: constructing a factory twin platform and a product defect detection model for solving industrial Internet digital prediction product defects, and using a boosting classifier to correct the solution results of the factory twin platform and the product defect detection model in digital space and real space to obtain real product defects.
[0192] like Figure 4As shown, based on the above-mentioned digital twin industrial Internet detection method and computer-readable storage medium, in this embodiment, a computer device is also provided, which includes a readable storage medium, a processor, and a computer program stored on the readable storage medium and run on the processor, wherein the readable storage medium and the processor are both arranged on a bus, and the processor implements the following steps when executing the computer program: constructing a factory twin platform and a product defect detection model for solving industrial Internet digital prediction product defects, and using a boosting classifier to correct the solution results of the factory twin platform and the product defect detection model in digital space and real space to obtain real product defects.
[0193] Obviously, the above embodiments are merely examples for the purpose of clear explanation, and are not intended to limit the implementation methods. For those skilled in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the implementation methods here. The obvious changes or modifications derived therefrom are still within the scope of protection of the claims of this patent application.
Claims
1. The industrial Internet detection method based on digital twins is characterized by: The steps include: S100) Build a factory twin platform and product defect detection model for solving industrial Internet digital prediction product defects. The specific operations are as follows: S101) Acquire factory images and factory product images; S102) Constructing a real-life 3D model of the factory operation and a physical 3D model of the factory products; S103) constructing a factory twin platform for solving industrial Internet digital prediction product defects based on the factory operation real-scene 3D model and the factory product entity 3D model constructed in step S102), and creating a product defect detection model for solving factory real-scene prediction product defects on the factory digital twin platform; S200) Use the boosting classifier to calibrate the solution results of the factory twin platform and the product defect detection model in the digital space and the real space to obtain the real defects of the product. The specific operations are as follows: S201) Extract key features of products from the factory twin platform and product defect detection model; S202) Using feature selection algorithm to select key features that have the greatest impact on product defect classification results; S203) Collect sample data containing product defects and annotate the collected sample data, with the number of sample data not less than 10,000; S204) using the sample data annotated in step S203) to train the product defect detection model, and then migrating the parameters of the trained product defect detection model to the boosting classifier as initial parameters of the weak classifier; S205) Use the factory twin platform and product defect detection model to detect product defects in real time, and compare the detection results with the actual situation.
2. The industrial Internet detection method based on digital twins according to claim 1 is characterized in that: Step S200) also includes the following operations: S206) When a false alarm or missed alarm is detected, a correction mechanism is automatically triggered, wherein the correction mechanism includes at least one of re-collecting sample data of the product currently produced by the factory, re-training the model, and adjusting the classifier parameters; S207) Feeding back the corrected results to the factory twin platform and the product defect detection model to optimize the factory twin platform and the product defect detection model.
3. The industrial Internet detection method based on digital twins according to claim 2 is characterized in that: In step S206), the boosting classifier is used to calibrate the settlement results of the factory twin platform and the product defect detection model in the digital space and the real space. The specific operations are as follows: S206-1) using the product prediction image calculated by the factory twin platform and the product defect real scene prediction image calculated by the product defect detection model as input items of the boosting classifier, and using the product defect real scene image as output item of the boosting classifier; S206-2) Based on the accuracy of the factory twin platform solution and the accuracy of the product defect detection model solution, a correction objective function for solving the structure in the digital space and the real space is constructed. The correction objective function is: Where M is the correction target value; FR is the accuracy of the real-life image of the factory product; FD is the accuracy of the digital image solved by the factory twin platform; is the weight factor used to adjust the penalty intensity; S206-3) Using the correction objective function obtained in step S206-2) as the loss function of the boosting classifier, the boosting classifier is trained to obtain a correction model for outputting the real image of the product. The correction model is: D=boosting(Dreal,Ddigital) Among them, D is the real image of the product; Dreal is the real scene image of the product; Ddigital is the digital image of the product.
4. The industrial Internet detection method based on digital twins according to claim 1 is characterized in that: In step S103), the real-life 3D model of the factory operation and the physical 3D model of the product are loaded through Unity and projected onto the digital platform to obtain a factory twin platform; wherein the real-life 3D model of the factory operation and the physical 3D model of the product are communicatively connected through a data transmission channel constructed by a cloud server; the projection method used when projecting the real-life 3D model of the factory operation and the physical 3D model of the product onto the digital platform is the UTM projection method.
5. The industrial Internet detection method based on digital twins according to claim 1 is characterized in that: In step S205), when the product defect detection model detects product defects, the specific operations are: S205-1) transmitting the information of the product entity to the factory entity 3D model generated by the digital twin of the factory twin platform in real time, so that the product entity 3D model moves accordingly in the factory real scene 3D model according to the movement information; S205-2) The factory twin platform records in real time the production information of the product entity 3D model in the factory real-scene 3D model as the product defect prediction result.
6. The industrial Internet detection method based on digital twins according to claim 1 is characterized in that: S103) The product defect detection model is created through the following steps: S103-1) Randomly select multiple product patterns as sample patterns; S103-2) using the product information in the sample pattern selected in step S103-1) as real scene prediction information; S103-3) Using the sample image as an input item of the YOLO V8 neural network, using the real scene prediction image as an output item of the YOLO V8 neural network, and using the YOLO V8 neural network to perform mapping learning on the input item of the YOLO V8 neural network and the output item of the YOLO V8 neural network, a product defect detection model can be obtained after learning.
7. The industrial Internet detection method based on digital twins according to claim 6 is characterized in that: The feature fusion network structure in the YOLO V8 neural network is BiFPN.
8. A system for performing industrial Internet detection using the industrial Internet detection method based on digital twins according to claim 1, characterized in that: include: A data acquisition unit, used to acquire factory images and factory product images; Factory twin platform, used to solve industrial Internet digital prediction product defects; Product defect detection model, used to solve the factory scene to predict product defects; Boosting classifier, used to calibrate the solution results of the factory twin platform and product defect detection model in digital space and real space; The data acquisition unit is respectively communicated with the factory twin platform and the product defect detection model, and the factory twin platform and the product defect detection model are respectively communicated with the boosting classifier.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
10. A computer device comprising a readable storage medium, a processor, and a computer program stored on the readable storage medium and executable on the processor, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
