Parameter optimization system based on contact lens intelligent production line defect prediction
By constructing a defect prediction model for an intelligent contact lens production line and using machine learning to analyze production data, the problem of difficulty in detecting defects in contact lens production in advance has been solved, enabling early warning and real-time adjustments, thereby improving production efficiency and quality.
Patent Information
- Application Number
- CN202511447296.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-11
- Publication Date
- 2025-12-26
- Estimated Expiration
- 2045-10-11
AI Technical Summary
In the production of contact lenses, existing technologies make it difficult to detect defects in advance, leading to problems being discovered only during finished product inspection, which increases production costs and waste.
A parameter optimization system based on a smart contact lens production line is adopted. Through data acquisition, preprocessing, modeling and optimization modules, a defect prediction model is built. Machine learning technology is used to analyze production data, identify potential defects in advance and provide real-time adjustment suggestions.
It enables early warning of defects in the contact lens manufacturing process, improving production efficiency and quality, and reducing the production of substandard products.
Smart Images

Figure CN120911707B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of production line management, in particular to a parameter optimization system based on contact lens intelligent production line defect prediction. BACKGROUND
[0002] The production process of contact lenses includes multiple key process steps such as pad printing, mold assembly, mold separation, and hydration, etc., each of which has a significant impact on the quality of the final product. Due to the complexity of production conditions and process parameters, contact lens production defects are often difficult to detect in advance, and are usually only revealed during finished product testing.
[0003] Traditional quality control methods usually rely on finished product testing and cannot provide effective early warning for defects in the production process. Without early intervention, it may result in the production of a large number of unqualified products, increasing production costs and waste. SUMMARY
[0004] Therefore, the purpose of the present application is to provide a parameter optimization system based on contact lens intelligent production line defect prediction to solve the problems in the background art.
[0005] In order to achieve the above-mentioned purpose, the present application adopts the following technical solutions:
[0006] The parameter optimization system based on contact lens intelligent production line defect prediction of the present application comprises:
[0007] A data acquisition module for acquiring historical operation data of equipment in each process of the contact lens intelligent production line and acquiring current operation data of the equipment in each process of the contact lens intelligent production line, wherein the historical operation data includes values of multiple process parameters at multiple historical time points and lens defect detection results, the current operation data includes values of multiple process parameters at multiple time points in a current time period, and the current time period is a time period of a target length before the current time point;
[0008] A data preprocessing module for preprocessing the historical operation data and the current operation data respectively to obtain preprocessed data samples and current preprocessed data, and extracting features from the preprocessed data samples and the current preprocessed data respectively to obtain feature samples and current features;
[0009] A modeling and optimization module for constructing training data based on the feature samples and the lens defect detection results, training an artificial neural network based on the training data combined with a focal loss function to obtain an initial prediction model, calculating the contribution of different process parameters to the lens defect detection results based on the initial prediction model, updating the training data based on the contribution, and training the initial prediction model based on the updated training data to obtain a defect prediction model;
[0010] a prediction and optimization module, configured to input the current feature into the defect prediction model to obtain a prediction result, adjust a process parameter based on the prediction result to obtain a preliminary adjustment scheme when the prediction result contains any kind of defect risk, match the preliminary adjustment scheme with a pre-constructed adjustment rule library, and determine a final optimization scheme based on a matching result.
[0011] In an embodiment of the present application, the method further comprises:
[0012] an iterative optimization module, configured to collect an actual defect result corresponding to the current running data and calculate a similarity between the actual defect result and the prediction result when the final optimization scheme is not adopted, store the current running data and the prediction result into a pre-constructed prediction knowledge base as a warning case when the similarity is greater than a preset similarity threshold, evaluate an adjustment effect based on a double difference model when the final optimization scheme is adopted, store the final optimization scheme into a pre-constructed adjustment rule library when a target quality index improvement amplitude exceeds a threshold and a stability index meets a preset requirement, and send the final optimization scheme to an expert system for evaluation when the target quality index improvement amplitude does not exceed the threshold or the stability index does not meet the preset requirement.
[0013] In an embodiment of the present application, the method further comprises:
[0014] cleaning the historical running data to obtain cleaned data, wherein the cleaning manner includes data elimination corresponding to equipment failure, data deletion based on business logic, interpolation, and outlier elimination, and the cleaned data is a time series data sequence;
[0015] sliding a pre-constructed sliding window along a value sequence of each process parameter of the cleaned data to obtain sharded data of a plurality of time windows, wherein a width of the sliding window is determined based on a process to which the cleaned data belongs;
[0016] extracting time domain features of the plurality of sharded data of each process parameter, wherein the time domain features include a mean value, a peak value, a valley value, a variance, a range, a rising slope, a falling slope, and a fluctuation frequency of the process parameter;
[0017] performing Fourier transform on the plurality of sharded data of each process parameter to obtain frequency domain data of the plurality of sharded data of each process parameter, and extracting frequency domain features from the frequency domain data, wherein the frequency domain features include a main frequency, a secondary main frequency, a frequency spectrum energy distribution, and a frequency spectrum peak value;
[0018] combining the time domain feature and the frequency domain feature to obtain a time-frequency domain feature;
[0019] determine a first process parameter associated with a lens deformation defect and a second process parameter associated with a scratch defect based on a pre-constructed correlation model;
[0020] combining the time domain feature and the frequency domain feature of the plurality of first process parameters respectively to obtain a feature combination;
[0021] introducing a plurality of defect correlation information into the frequency domain feature and the time domain feature of the second process parameter corresponding time point to obtain a fusion feature, wherein the defect correlation information is one or a combination of more of operation abnormal alarm and suction nozzle wear warning of the taking and placing mechanical arm, contact lens raw material difference information, and equipment debugging record;
[0022] standardizing the time-frequency domain feature, the feature combination and the fusion feature of the process parameter to obtain a structured dynamic feature, and constructing a pre-processing data sample based on the structured dynamic feature and the corresponding lens defect detection result.
[0023] In an embodiment of the present application, the time-frequency domain feature, the feature combination and the fusion feature of the process parameter are standardized to obtain a structured dynamic feature, including:
[0024] converting the engineering parameters in the dynamic feature into actual process quantities, standardizing the continuous process parameters in the dynamic feature, normalizing the skewed distribution continuous features in the dynamic feature, converting the discrete process parameters in the dynamic feature into numerical features through binning or one-hot encoding, and unifying the dimensions of the dynamic feature to obtain a structured dynamic feature, wherein the dynamic feature is the time-frequency domain feature, the feature combination or the fusion feature.
[0025] In an embodiment of the present application, the construction method of the correlation model includes:
[0026] classifying the historical operation data based on the lens defect detection result to obtain a plurality of defect type historical operation data units;
[0027] preprocessing and feature extraction on the historical operation data unit to obtain a plurality of feature vectors of each process parameter wherein, represents a time window, is the serial number of the process parameter;
[0028] density clustering on the plurality of feature vectors of the historical operation data unit to obtain a plurality of feature vector clusters;
[0029] extracting an intra-cluster data amount of each feature vector cluster, regarding a feature vector cluster with an intra-cluster data amount greater than a set threshold as a target cluster, and merging the target clusters based on the process parameters to obtain a target cluster set, wherein each target cluster set corresponds to one process parameter;
[0030] statistically calculating a ratio of a number of the target cluster set to a number of the historical running data unit, and regarding a process parameter with a ratio greater than a set proportion threshold as an associated process parameter of a flaw type corresponding to the historical running data unit;
[0031] constructing an association model based on the associated process parameters of the plurality of flaw types.
[0032] In an embodiment of the present application, an artificial neural network is trained based on the training data and a focal loss function to obtain an initial prediction model, including:
[0033] S11, constructing training data based on a value sequence of each piece of data, a structured dynamic feature, and a lens flaw detection result, wherein the lens flaw detection result is a real label;
[0034] S12, inputting the training data into a Transformer-GCN hybrid network architecture to obtain a predicted label;
[0035] S13, calculating a focal loss between the predicted label and the real label, and adjusting parameters of the Transformer-GCN hybrid network architecture based on the focal loss, repeating steps S12-S13 until training is completed to obtain an initial prediction model.
[0036] In an embodiment of the present application, the contribution of different process parameters to the lens flaw detection result is calculated based on the initial prediction model, including:
[0037] obtaining a plurality of verification samples and inputting the plurality of verification samples into the initial prediction model to obtain a predicted label;
[0038] classifying the predicted label based on a flaw type to obtain a geometry of the flaw type; and calculating Shapley values of a plurality of process parameters based on corresponding predicted labels for a set of different flaw types, wherein a mathematical expression of the Shapley value is:
[0039]
[0040] wherein, represents a Shapley value of a process parameter , represents a set of all process parameters, represents a subset not containing the process parameter , subsets the number of process parameter categories, the number of all process parameter categories, subsets predicted labels of the corresponding samples, representing the process parameters after joining the process parameters;
[0041] Shapley values of each process parameter as the contribution of the corresponding defect.
[0042] In an embodiment of the present application, the process parameters are adjusted based on the prediction result to obtain a preliminary adjustment scheme, including:
[0043] S21, extracting a defect prediction type from the prediction result, and determining an associated process parameter associated with the defect prediction type based on a pre-constructed association model;
[0044] S22, comparing the value of the associated process parameter with a pre-constructed process parameter reference value, and adjusting the value of the associated process parameter by one unit based on the size relationship between the value of the associated process parameter and the pre-constructed process parameter reference value, to obtain an updated process parameter;
[0045] S23, updating the current running data with the updated process parameter, and pre-processing and feature extracting the updated current running data to obtain updated current features;
[0046] S24, inputting the updated current features into a defect prediction model to obtain an updated prediction label; when any kind of defect risk still exists in the updated prediction label, returning to step S21 until no any kind of defect risk exists in the updated prediction label; when no any kind of defect risk exists in the updated prediction label, constructing a preliminary adjustment scheme based on the adjustment value of the associated process parameter.
[0047] In an embodiment of the present application, the preliminary adjustment scheme is matched with a pre-constructed adjustment rule library, and a final optimization scheme is determined based on the matching result, including:
[0048] vectorizing the preliminary adjustment scheme to obtain an adjustment vector;
[0049] calculating the cosine similarity of the adjustment vector and a plurality of rule vectors in the pre-constructed adjustment rule library, and when the cosine similarity of the adjustment vector and any one rule vector is greater than or equal to a preset similarity threshold, taking the preliminary adjustment scheme as the final optimization scheme.
[0050] In an embodiment of the present application, the training data is updated based on the contribution degree, comprising:
[0051] The process parameters with a contribution degree lower than a preset contribution degree threshold are removed from the training data to obtain updated training data.
[0052] The beneficial effects of the present application are: the parameter optimization system for defect prediction based on an intelligent contact lens production line in the present application extracts process parameter sequences and corresponding detection results from historical running data of the production line, extracts dynamic features from the process parameter sequences, and fits the corresponding relationship between the dynamic features and the detection results through machine learning to obtain a defect prediction model. The dynamic features of the process parameters in the current time period are predicted using the defect prediction model to obtain a defect prediction result. If there is a defect risk in the defect prediction result, the process parameters are first adjusted using a dynamic adjustment technology to obtain a preliminary adjustment scheme with no defect risk in the prediction result, and then the preliminary adjustment scheme is matched with a historical mature scheme. In the matching process, an optimized final scheme is output. The present application uses machine learning and other prediction technologies to analyze production data to identify potential production defects in advance and provide real-time adjustment suggestions during the production process to improve the production efficiency and quality of contact lenses. BRIEF DESCRIPTION OF DRAWINGS
[0053] The present application will be further described below in conjunction with the drawings and embodiments:
[0054] Figure 1 is a structural diagram of the parameter optimization system for defect prediction based on an intelligent contact lens production line in an embodiment of the present application;
[0055] Figure 2 is a whole process schematic diagram in an embodiment of the present application;
[0056] Figure 3 is an initialization configuration flowchart of the data acquisition system in an embodiment of the present application;
[0057] Figure 4 is a multi-source data acquisition flowchart in an embodiment of the present application;
[0058] Figure 5 is a preprocessing process schematic diagram in an embodiment of the present application;
[0059] Figure 6 is a data cleaning and standardization processing process schematic diagram in an embodiment of the present application;
[0060] Figure 7 is a construction flowchart of an initial prediction model in an embodiment of the present application;
[0061] Figure 8 A schematic diagram of a model optimization process in an embodiment of the present application;
[0062] Figure 9 A schematic diagram of a real-time prediction process in an embodiment of the present application;
[0063] Figure 10 A flowchart of dynamic intervention and parameter adjustment in an embodiment of the present application;
[0064] Figure 11 A flowchart of effect verification and data collection in an embodiment of the present application. DETAILED DESCRIPTION
[0065] The present application is described below by way of specific examples. Other advantages and effects of the present application can be easily understood by those skilled in the art from the description. The present application can also be implemented or applied in other different specific embodiments, and various modifications or changes can be made to the details in the description based on different views and applications without departing from the spirit of the present application. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict.
[0066] It should be noted that the diagrams provided in the following embodiments only schematically illustrate the basic concept of the present application, and only the layers related to the present application are shown in the diagrams, not the number of layers, shapes and sizes in actual implementation. The actual implementation of each layer may be a random change in pattern, number and proportion, and the layer layout pattern may also be more complex.
[0067] In the following description, a large number of details are discussed to provide a more thorough explanation of the embodiments of the present application, however, it is obvious to those skilled in the art that the embodiments of the present application can be implemented without these specific details.
[0068] The following are introductions of related parameters in the present application:
[0069] For example, the process of a certain contact lens intelligent production line is: injection molding, vertical warehouse buffering, filling and molding, curing, mold separation and piece taking, hydration immersion, full inspection and packaging.
[0070] Visual inspection process: filling and molding (bubbles, dirt), full inspection and packaging (scratches, burrs, edge damage, lens deformation, surface holes, foreign matter, no lens, multiple lenses, etc.).
[0071] Some related parameters of the full production line dimension part:
[0072] Production batch information: Production batch information, namely order batch information, is associated with various materials (such as raw materials, packaging materials, etc.), equipment operation data, process parameters and other production information involved in the production process of the order. By comparing these information of different order batches horizontally, the differences between batches can be quickly found, which provides basis for analyzing production stability and optimizing process.
[0073] Device state alarm information: Device state alarm information refers to the prompt information issued when each device in the production process runs abnormally, including alarm device number, alarm time, alarm type (such as temperature abnormality, pressure exceeding standard, running fault, etc.). If the operator does not repair in time, does not repair properly or does not completely eliminate the fault before resuming production, it may cause defects in the subsequent production of lenses. This information can be used as an important clue to trace the cause of defects and assist in analyzing the relevance of device abnormalities and product defects.
[0074] Process parameters in the device dimension:
[0075] Injection molding - pressure: Injection molding pressure refers to the pressure applied when injecting molten contact lens material into the mold cavity. If the pressure is too small, the material may not be able to fill the mold cavity, which may result in incomplete lens formation; if the pressure is too large, the mold may be subjected to excessive load, affecting the service life of the mold, and may also result in defects such as lens burrs.
[0076] Injection molding - speed: Injection molding speed refers to the speed at which molten material is injected into the mold cavity. If the speed is too slow, the material may lose its flowability during injection due to cooling, resulting in insufficient filling; if the speed is too fast, it may generate turbulence, trapping air and forming bubbles, and may also cause the material to splash inside the mold, causing contamination.
[0077] Warehouse buffer - standing time: The length of time spent in the warehouse. If the standing time is too short or too long, it may affect the stability of the material in the subsequent process, thereby indirectly affecting the product quality, such as affecting the flowability of the material during filling and molding.
[0078] Warehouse buffer - environmental temperature and humidity: The temperature and humidity of the warehouse refers to the temperature and humidity of the air in the warehouse. If the temperature is too high or too low, it may cause physical property changes in the lens material, affecting subsequent processing; if the humidity is too high, it may cause the lens to become damp, breed microorganisms and affect the quality of the lens; if the humidity is too low, the lens material may become brittle and prone to breakage.
[0079] Fill-up - Torque Instruction: The internal torque instruction refers to the percentage of the torque control instruction received by the internal driving components of the equipment. The size of the instruction value will affect the output force of the driving components. If the value is not appropriate, it may cause the injection, compression, and other actions to be executed improperly, thereby affecting the accuracy of the injection volume and the tightness of the compression, increasing the probability of defects such as bubbles and dirt.
[0080] Fill-up - Injection Volume (Downward Pressure): The injection volume is represented by the downward pressure (in mm) and refers to the material injection volume corresponding to the downward pressure of the injection mechanism. There are four sets of injection mechanisms, each with 8 individually set injection parameters. Too much or too little injection volume may cause abnormal mold cavity filling, with too much causing waste and pollution, and too little causing bubbles and other defects.
[0081] Fill-up - Downward Servo Speed: The downward servo speed refers to the speed controlled by the servo motor during the downward pressure of the injection mechanism, with units of mm / s and corresponding speed multipliers. Inappropriate speed will affect the uniformity and stability of the injection, with too fast speed possibly causing material splashing and dirt, and too slow speed possibly causing bubbles due to delayed filling.
[0082] Fill-up - Compression Station Settings: There are four compression stations, three of which are pre-compression stations and one is a lifting station. The settings of the compression stations directly affect the mold closing effect. If the pre-compression station pressure or position is not appropriate, it may cause the mold to close tightly, resulting in bubbles and dirt. Unreasonable lifting station settings may affect the overall production rhythm and compression quality.
[0083] Curing - Temperature Curve: The temperature curve changes over time during the curing process. This curve is related to the production batch and the position of the carrier plate. Different temperature curves will affect the curing degree and uniformity of the material. If the temperature curve is not reasonable, it may cause the lens to cure poorly, affecting the subsequent mold release yield and the physical properties of the lens.
[0084] Mold Release - Turntable Heating Temperature: The turntable heating temperature refers to the heating temperature of the turntable in the mold release equipment to facilitate subsequent lens removal. If the temperature is too high, it may cause the lens to deform due to overheating, and if the temperature is too low, it may cause the lens to adhere to the mold, making it difficult to release, and may cause scratches, breakage, and other problems.
[0085] Mold Release - Lens Removal Rotation Speed: The rotation speed of the rotating shaft is too fast, which may cause the mold release action to be too violent, causing lens edge damage, burrs, and other defects. If the speed is too slow, it may affect production efficiency, and if the mold release is not timely, it may cause the lens to adhere, resulting in lens removal failure.
[0086] Hydration soak - heating temperature: Heating temperature refers to the heating temperature of the soaking liquid during the hydration process, with the unit of °C. Inappropriate temperature will affect the hydration reaction of the material, and too high temperature may damage the lens structure, and too low temperature may lead to insufficient hydration and affect the performance of the lens.
[0087] Hydration soak - soaking time: The soaking time of each tank refers to the time length of the lens staying in the hydration tank, with the unit of minutes. Insufficient soaking time will result in insufficient hydration; and too long time may cause the lens to be over-swollen or corroded, affecting its shape and quality.
[0088] Full inspection package - material taking and placing speed: The speed of the mechanical arm grabbing, suction nozzle sucking and placing, etc. Improper speed may cause the lens to be damaged, dropped, collided with other objects, squeezed or collided, resulting in deformation, scratches and other problems.
[0089] Full inspection package - heat sealing temperature: Heat sealing temperature refers to the temperature of the package during heat sealing, with the unit of °C. Too high temperature may cause the packaging material to melt and stick to the lens, resulting in lens deformation or contamination; and too low temperature may result in weak heat sealing, easy package breakage and lens contamination.
[0090] Figure 1 is the structure diagram of the parameter optimization system based on contact lens intelligent production line defect prediction in an embodiment of the present application, as shown in Figure 1 The parameter optimization system based on contact lens intelligent production line defect prediction of the present embodiment includes a data acquisition module 110, a data preprocessing module 120, a modeling and optimization module 130, a prediction and optimization module 140, and an iterative optimization module 150, Figure 2 is the overall flowchart of an embodiment of the present application, combined with Figure 2 The principles of the individual functional modules are described as follows:
[0091] a) Data acquisition module 110, responsible for initializing and configuring the data acquisition system, including system running parameter setting, PLC device communication parameter configuration (such as IP address, port number, protocol type), multi-type collector (such as sensor, IoT device) access protocol adaptation and parameter calibration. Through standardized configuration, process data and environmental data of all devices are collected.
[0092] Then, based on the initialized configuration of the acquisition system, the historical running data of the devices of the contact lens intelligent production line are obtained, and the current running data of the devices of the contact lens intelligent production line are obtained;
[0093] The historical running data includes values of multiple process parameters at multiple historical time points and lens defect detection results, and the current running data includes values of multiple process parameters at multiple time points in a current time period, and the current time period is a time period of a target time length before a current time point.
[0094] b) a data preprocessing module 120, configured to preprocess the historical running data and the current running data respectively to obtain preprocessed data samples and current preprocessed data, and perform feature extraction on the preprocessed data samples and the current preprocessed data respectively to obtain feature samples and current features;
[0095] Specifically, the data preprocessing module is responsible for cleaning, standardizing and feature extracting the collected raw data, including eliminating abnormal values caused by human intervention and equipment abnormalities, collecting and converting actual process parameters based on the equipment production process, and extracting dynamic process features such as mold closing pressure rising slope and fluctuation variance through a sliding window algorithm to generate a structured feature data set.
[0096] c) a modeling and optimization module 130, configured to construct training data based on the feature samples and the lens defect detection results, train an artificial neural network based on the training data combined with a focal loss function to obtain an initial prediction model, calculate the contribution of different process parameters to the lens defect detection results based on the initial prediction model, update the training data based on the contribution, and train the initial prediction model based on the updated training data to obtain a defect prediction model;
[0097] Specifically, a Transformer-GCN hybrid network architecture is used to construct the prediction model, the model is trained by collecting actual production data (including various qualified / unqualified product process parameter sequences), and the focal loss function is used to optimize the recognition accuracy of unbalanced samples (such as low probability defect types). At the same time, based on the Shapley value algorithm, the contribution of each process parameter to the prediction result (such as the influence weight of the mold closing speed on the scratch defect) is analyzed, the model input feature combination is optimized, and the model is trained.
[0098] d) a prediction and optimization module 140, configured to input the current features into the defect prediction model to obtain a prediction result, adjust process parameters based on the prediction result to obtain a preliminary adjustment scheme when the prediction result contains any kind of defect risk, match the preliminary adjustment scheme with a pre-constructed adjustment rule library, and determine a final optimization scheme based on the matching result.
[0099] Specifically, the pre-processed real-time process data is input into the trained model, the probability of defects of each process is output, and the early warning threshold is dynamically adjusted based on the distribution of real-time data. When the predicted risk level reaches the yellow warning, the process parameter fine-tuning suggestion is automatically generated, which is written to the PLC controller through the OPC UA protocol to remind the operator to optimize the process parameters.
[0100] e) Iterative optimization module 150, collecting optimized production data and production data without adopting optimization suggestions by operators, calculating the deviation between actual optimization rate and predicted optimization rate through confusion matrix, and displaying the correlation between parameter adjustment and quality indicators in a visual chart, verifying the prediction results based on actual production data, and dynamically adjusting the optimization range of process parameters.
[0101] Specifically, when the final optimization scheme is not adopted, the actual defect result corresponding to the current running data is collected, and the similarity between the actual defect result and the prediction result is calculated. When the similarity is greater than a preset similarity threshold, the current running data and the prediction result are stored in a pre-constructed prediction knowledge base as a warning case; when the final optimization scheme is adopted, the adjustment effect is evaluated based on a double difference model, and when the target quality index improvement amplitude exceeds a threshold and the stability index meets a preset requirement, the final optimization scheme is stored in a pre-existing adjustment rule base, and when the target quality index improvement amplitude does not exceed the threshold or the stability index does not meet the preset requirement, the final optimization scheme is sent to an expert system for evaluation.
[0102] The following is a specific implementation of each of the above functional modules:
[0103] a) Data acquisition module 110;
[0104] Figure 3 The initialization configuration flowchart of the data acquisition system in an embodiment of the present application is shown in Figure 3 First, the data acquisition system is initialized and configured, including system running parameter setting, PLC device communication parameter configuration (such as IP address, port number, protocol type), multi-type collector (such as sensor, IoT device) access protocol adaptation and parameter calibration. Through standardized configuration, process data and environmental data of all devices are collected. Figure 4 The multi-source data acquisition flowchart in an embodiment of the present application is shown in Figure 4 The data acquisition process includes acquisition parameter-reading configuration file-initializing device type and communication protocol-initializing interactive heartbeat-initializing collection task-collection task execution or waiting for callback-original data storage. In this acquisition process, the data acquisition system has the following characteristics:
[0105] (1) Based on the self-developed data acquisition system, a data acquisition network covering all production line equipment is constructed.
[0106] (2) Multi-source heterogeneous data standardized access (supporting OPC UA, Modbus, Snap7, etc. Multi-industry protocol adaptation), industrial-grade hot standby redundant transmission channel and distributed real-time database technology.
[0107] (3) Realize the process parameters (such as mold pressure, injection volume, etc.), equipment state (such as temperature, alarm condition, etc.), tray circulation information, production log, specific detection data and other key data acquisition and persistent storage.
[0108] (4) Manually preset the adjustment gradient and range of each process parameter, covering the reasonable floating interval of the upper and lower thresholds of normal production.
[0109] (5) According to the preset parameter adjustment scheme, control the production line to run repeatedly for corresponding production processes, and synchronously trigger the data acquisition system to continuously collect full-quantity production data under different parameter combinations.
[0110] (6) Through the cyclic operation of multiple rounds of parameter adjustment and data acquisition, ensure that all possible values and combinations of process parameters within the set range are covered, forming a complete parameter-data mapping library containing boundary values, critical values and typical values, providing data support for subsequent modeling.
[0111] Based on the historical running data and current running data collected by the above data acquisition system, the subsequent process is obtained.
[0112] b) Data preprocessing module 120
[0113] The data preprocessing module is responsible for cleaning, standardizing and feature extraction of the collected raw data, including removing outliers caused by human intervention and equipment abnormalities, converting actual process parameters based on equipment production process, and extracting dynamic process features such as mold pressure rising slope and fluctuation variance through sliding window algorithm, to generate structured feature data set.
[0114] Figure 5 The preprocessing flowchart in an embodiment of the present application is shown in Figure 5 The preprocessing process includes:
[0115] b1) Clean the historical running data to obtain cleaned data, wherein the cleaning method includes data removal corresponding to equipment failure, data deletion based on business logic, interpolation and outlier removal, and the cleaned data is a time series data sequence.
[0116] In the data cleaning process, based on the collected device state (such as alarm code, shutdown signal) and the actual device business logic (such as production rhythm, process correlation) judgment. And combined with 3σ criterion, box chart and other statistical methods to identify outliers, linear interpolation repair is used for continuous type abnormal value, and discrete type abnormal value is marked and removed.
[0117] b2) Based on the pre-constructed sliding window, slide along the value sequence of each process parameter of the cleaning data, obtain the fragmented data of multiple time windows, wherein the width of the sliding window is determined based on the process to which the cleaning data belongs;
[0118] Firstly, based on the sliding window technology, the dynamic characteristics are extracted, and the window size can be dynamically adjusted according to the process cycle (such as mold closing stage, liquid injection stage) of different production processes, so as to ensure the capture of the feature change of the key process period.
[0119] b3) Extract the time domain features of the multiple fragmented data of each process parameter, wherein the time domain features include the mean, peak, valley, variance, range, rising slope, falling slope and fluctuation frequency of the process parameter;
[0120] The time domain features include the mean, peak, valley, variance, range, rising slope, falling slope and fluctuation frequency of the process parameter, which reflect the overall change trend and fluctuation of the parameter in the time dimension.
[0121] b4) Fourier transform is performed on the multiple fragmented data of each process parameter to obtain the frequency domain data of the multiple fragmented data of each process parameter, and frequency domain features are extracted from the frequency domain data, wherein the frequency domain features include main frequency, secondary main frequency, frequency spectrum energy distribution and frequency spectrum peak;
[0122] The frequency domain features such as main frequency, secondary main frequency, frequency spectrum energy distribution and frequency spectrum peak are obtained through Fourier transform, which can mine the hidden rules of the process parameter in the frequency dimension and identify the periodic fluctuations that may cause defects.
[0123] b5) The time domain features and the frequency domain features are combined to obtain time-frequency domain features;
[0124] In addition to the above general time-frequency domain features, for the key process of contact lens production, attention is focused on specific process features that are strongly related to product forming quality, such as mold closing stage pressure and curing stage temperature. For example, for bubble detection in the filling and molding stage, the size of the sliding window is dynamically adjusted (based on the period of liquid injection, compression, etc.) to capture the parameter changes in different stages to associate with possible defects. At the same time, the time domain features (such as difference degree, extreme value, etc.) of the parameter are calculated to reflect the stability and consistency of the operation, and the hidden abnormal signals of the equipment operation are mined through frequency domain analysis to identify potential quality problems.
[0125] In addition to the above bubble detection in the filling and molding stage, this embodiment also includes specific process features related to lens deformation defects and scratch defects, which require additional feature extraction. Specifically as follows:
[0126] b6) determining a first process parameter associated with lens deformation defects and a second process parameter associated with scratch defects based on a pre-constructed correlation model;
[0127] In this application, the correlation between process parameters and different defect types can be determined by expert analysis, correlation calculation, etc. In one embodiment of this application, a data statistical method is used to construct a correlation model, which specifically includes:
[0128] b61) classifying the historical operation data based on lens defect detection results to obtain historical operation data units of multiple defect types;
[0129] First, the historical operation data is labeled and classified according to the lens defect detection results (such as cracks, scratches, bubbles, etc.), and the process parameters corresponding to the same type of defects are classified into the same category. Each historical operation data unit (such as the process parameters of a production batch) is assigned to a specific defect type category to form a structured data set.
[0130] Specifically, the label information includes the defect type and the number of lenses with defects, or the defect type and the yield of the batch of lenses.
[0131] b62) pre-processing and feature extraction of the historical operation data unit to obtain multiple feature vectors of each process parameter wherein, represents a time window, is the serial number of the process parameter;
[0132] The pre-processing and feature extraction process of this step is consistent with the previous description. Please refer to the pre-processing and feature extraction process in the previous description for understanding.
[0133] b63) density clustering on the plurality of feature vectors of the historical running data unit to obtain a plurality of feature vector clusters;
[0134] Based on the density distribution of the feature vectors, the high-density area is divided into clusters, and the low-density area is regarded as noise. Specifically, the similarity between the feature vectors can be calculated by a distance function (such as Euclidean distance) to form a tight cluster structure.
[0135] The feature vectors in the cluster have similar process parameter behavior patterns, which facilitates subsequent analysis of their association with the defect type.
[0136] b64) extracting the intra-cluster data volume of each feature vector cluster, and taking the feature vector cluster with an intra-cluster data volume greater than a set threshold as a target cluster, and merging the target clusters based on the process parameters to obtain a target cluster set, wherein each target cluster set corresponds to one process parameter;
[0137] By setting a data volume threshold (such as the number of samples in the cluster > 100), small-scale clusters (which may be noise or rare patterns) are filtered out. Then, different target clusters of the same process parameter are merged to form a unified feature cluster set of the parameter. Thus, only high-confidence clusters are retained, redundant analysis is reduced, and the efficiency of subsequent steps is improved. By merging target clusters of the same parameter, the common behavior patterns of the parameter under different process conditions are revealed.
[0138] b65) calculating the ratio of the number of target cluster sets to the number of historical running data units, and taking the process parameter with a ratio greater than a set proportion threshold as an associated process parameter of the defect type corresponding to the historical running data unit;
[0139] The ratio of the number of target cluster sets to the total number of historical running data units (such as cluster ratio > 30%) is calculated to judge the contribution of the process parameter to the defect type. In this embodiment, the relationship between the process parameter and the defect type is objectively evaluated by the statistical index (ratio) to avoid subjective judgment. High-ratio parameters are marked as key associated parameters to guide the priority of process optimization. The threshold value can be adjusted according to actual needs to adapt to the complexity of different production scenarios.
[0140] b66) constructing an association model based on the associated process parameters of multiple defect types.
[0141] Specifically, the associated process parameters (such as temperature, pressure) of multiple defect types (such as cracks, scratches) can be integrated into a unified association rule base or graph model (such as Bayesian network). The causal relationship between the process parameters and the defect types is quantified by statistical methods (such as mutual information, Granger causality) to form an association model.
[0142] After obtaining the correlation model, the first process parameters associated with the lens deformation defect and the second process parameters associated with the scratch defect can be read from the correlation model.
[0143] b7) Time-domain features and frequency-domain features of a plurality of first process parameters are respectively time-aligned and combined to obtain feature combinations;
[0144] For lens deformation detection similar to full inspection packet, related parameter information of previous links needs to be connected, such as temperature curve of curing oven, operation parameters of mold separation and lens taking, environmental parameters of hydration immersion, etc. The running state of these previous links is deeply integrated into the feature system.
[0145] Referring to the correlation model, core process parameters closely associated with lens morphology are screened out. Based on this, other process parameters are linked to construct multi-dimensional feature combinations. By analyzing the correlation and change trend of previous parameters and current process parameters, various influencing factors that may cause lens deformation are more comprehensively captured, including material property changes, equipment running cumulative errors, etc., thereby improving the accuracy of detection.
[0146] b8) Defect-related information is introduced into the frequency-domain features and time-domain features of the second process parameter corresponding time point to obtain fusion features, wherein the defect-related information is one or a combination of more of the following information: running abnormal alarm and suction nozzle wear warning of the material taking and placing robot, contact lens raw material difference information, and device debugging record;
[0147] For scratch detection similar to full inspection packet, feature extraction is performed based on full production line dimensional parameters.
[0148] From the equipment state, the running abnormal alarm and suction nozzle wear warning of the material taking and placing robot are included. These state abnormalities may directly cause lens and mechanical parts to rub and produce scratches;
[0149] Combined with production batch information, the distribution law of lens scratches in the same batch is analyzed. If scratches in a batch occur concentratedly, the difference in raw materials used in the batch can be associated. Considering the personnel intervention factor, the operation record of the operator to the device is included in the feature system. Non-standard operation intervention may increase the risk of scratches.
[0150] By integrating multi-dimensional parameters such as equipment, batch, and personnel, comprehensive features are constructed in the form of feature binning to accurately identify scratch hazards.
[0151] b9) The time-frequency domain features, feature combinations, and fusion features of the process parameters are standardized to obtain structured dynamic features, and a pre-processing data sample is constructed based on the structured dynamic features and the corresponding lens defect detection results.
[0152] Since there are a large number of specific features in the above process, when the above features are used as training samples or input features, there is a problem of inconsistent dimensions, and therefore standardization processing is required. Figure 6 For the data cleaning and standardization processing flow in an embodiment of the present application, as shown in Figure 6 The data cleaning process has been described above, and the standardization process includes:
[0153] b91) converting the engineering parameters in the dynamic features into actual process quantities;
[0154] The engineering parameters of the equipment are converted into actual process quantities (such as the height of the graduated cylinder) through a process conversion formula.
[0155] b92) standardizing the continuous process parameters in the dynamic features;
[0156] The continuous process parameters are standardized, and for features that conform to the normal distribution (such as the temperature value in the constant temperature stage), Z-score standardization is used to eliminate the dimension effect.
[0157] b93) normalizing the continuous features with skewed distribution in the dynamic features;
[0158] For continuous features with skewed distribution, normalization is used to map the feature values to the [0, 1] interval, enhancing the comparability and stability of the data.
[0159] b94) converting the discrete process parameters in the dynamic features into numerical features through binning or one-hot encoding;
[0160] For discrete process parameters, binning or one-hot encoding is used to convert them into numerical features to meet the requirements of the model for input data format.
[0161] b95) and dimension unification of the dynamic features, to obtain structured dynamic features, wherein the dynamic features are time-frequency domain features, feature combinations or fusion features.
[0162] In addition, padding, truncation, and other methods are used to unify the dimensions of the dynamic features, so that the dimensions of the dynamic features are unified, facilitating subsequent machine learning training or input.
[0163] c) modeling and optimization module 130
[0164] In this application, a Transformer-GCN hybrid network architecture is used to construct a prediction model. The model is trained by collecting actual production data (including various qualified / unqualified product process parameter sequences), and the recognition accuracy of unbalanced samples (such as low probability defect types) is optimized by combining a focal loss function. At the same time, based on the Shapley value algorithm, the contribution of each process parameter to the prediction result (such as the influence weight of the mold separation speed on the scratch defect) is analyzed, the input feature combination of the model is optimized, and the model is trained.
[0165] Figure 7 For the construction process of the initial prediction model in an embodiment of the present application, as shown in Figure 7 The specific process of constructing the initial prediction model includes:
[0166] C1) Constructing training data based on the value sequence of each slice data, the structured dynamic feature, and the lens defect detection result, wherein the lens defect detection result is a true label;
[0167] C2) Inputting the training data into the Transformer-GCN hybrid network architecture to obtain a prediction label;
[0168] C3) Calculating the focal loss between the prediction label and the true label, and adjusting the parameters of the Transformer-GCN hybrid network architecture based on the focal loss, repeating steps C2-C3 until the training is completed, and obtaining an initial prediction model.
[0169] In the above process, the preprocessed time series structured feature data set (including process parameter sequence, dynamic feature value) is input into the model, wherein the Transformer layer is responsible for capturing the long-range time series dependence relationship of the process parameters, and the GCN layer models the association structure between different process features.
[0170] The number of Transformer encoder layers, the number of attention heads, and the GCN convolution layer are set in the present application. The gradient vanishing problem is alleviated by residual connection and layer normalization. The output layer uses a sigmoid activation function to output the prediction probability of each defect type.
[0171] During the training process, the qualified / unqualified product labels of multiple defect types are used as the supervision signal, the Adam optimizer is used for model training, the focal loss function (dynamic adjustment of positive and negative sample weights) is used to handle sample imbalance, and the model accuracy (precision, recall, F1-score) is evaluated by 5-fold cross-validation.
[0172] If the validation set metrics do not converge (fluctuation > 5%), adjust the hyperparameters (learning rate, batch size, number of network layers) using the Bayesian optimization algorithm, or optimize the network structure using dropout regularization and early stopping mechanisms until the model converges and reaches the preset accuracy threshold.
[0173] Figure 8 This is a schematic diagram of the model optimization process in one embodiment of this application, such as... Figure 8 As shown, the model optimization process includes:
[0174] C4) Obtain multiple validation samples and input the multiple validation samples into the initial prediction model to obtain the predicted labels;
[0175] C5) Classify the predicted labels based on defect type to obtain the geometry of the defect type; for different defect type sets, calculate the Shapley values of various process parameters based on the corresponding predicted labels, where the mathematical expression of the Shapley value is:
[0176]
[0177] In the formula, Indicate process parameters Shapley value, Represents the set of all process parameters. This indicates that process parameters are not included. subset of , Representing a subset The number of process parameter types This indicates the quantity of all types of process parameters. Representing a subset The predicted label of the corresponding sample, Indicates the addition of process parameters The predicted labels of samples within the subsequent set;
[0178] C6) The Shapley value of each process parameter is used as the contribution of the corresponding defect.
[0179] In the above optimization process, based on the trained model, the Shapley value of each process parameter is calculated for different defect types (such as scratches, bubbles, and uneven thickness), and the marginal contribution of a single parameter to the prediction result is quantified.
[0180] Set a contribution threshold, retain high-contribution features, and remove low-contribution redundant features.
[0181] The optimized feature combination is re-input into the model for training, and the model evaluation indicators (such as the flaw recognition F1-score improvement) before and after screening are compared. If the indicators are significantly improved, the new feature input scheme is solidified.
[0182] Figure 9 For the real-time prediction process in an embodiment of the present application, as shown in Figure 9 After the model optimization is completed, the process parameters of the current time period are preprocessed and features are extracted (the preprocessing and feature extraction refer to the foregoing), and then input into the model for prediction, and the prediction data of the current generated batch is stored in the data cache pool for subsequent calling.
[0183] e) Iterative optimization module 150
[0184] Based on the identification result, preliminary adjustment is performed, and then matched with the rule library to determine the final optimization scheme. Whether the final scheme is adopted depends on the relevant personnel, but the rule library or prediction knowledge base can be further expanded through whether it is adopted and the execution result after adoption.
[0185] Figure 10 For the dynamic intervention and parameter adjustment process chart in an embodiment of the present application, as shown in Figure 10 The prediction data is called from the batch data cache pool. If the predicted batch yield is not up to standard according to the prediction result (such as there are more than N prediction results with flaw risk in the current batch), the target optimization algorithm is triggered to generate a parameter adjustment method and perform optimization and issue the body shape. The process of the target optimization algorithm in the present application is as follows:
[0186] e1) Extract the flaw prediction type from the prediction result, and determine the associated process parameters associated with the flaw prediction type based on the pre-constructed association model;
[0187] e2) Compare the value of the associated process parameter with the pre-constructed process parameter reference value, and adjust the value of the associated process parameter by one unit based on the size relationship between the value of the associated process parameter and the pre-constructed process parameter reference value, to obtain an updated process parameter;
[0188] Wherein, the parameter value of the process parameter is the typical value described in the foregoing, and the critical range can also be used for comparison.
[0189] When the value of the associated process parameter is greater than the typical value, reduce one unit, and update the associated process parameter;
[0190] When the value of the associated process parameter is less than the typical value, increase one unit, and update the associated process parameter;
[0191] e3) updating the current running data with the updated process parameters, and pre-processing and feature extraction of the updated current running data to obtain updated current features;
[0192] e4) inputting the updated current features into the defect prediction model to obtain an updated prediction label; when any defect risk still exists in the updated prediction label, returning to step e1 until no defect risk exists in the updated prediction label; when no defect risk exists in the updated prediction label, constructing a preliminary adjustment scheme based on the adjustment value of the associated process parameter.
[0193] The updated scheme is spliced after the current running data as the running data at the prediction time point, and is rolled in real time to update the parameter sequence and the corresponding dynamic features, and is output to the defect prediction model to obtain an updated prediction label. If the updated prediction label can restore the yield rate of the current production batch to the normal level, the adjusted scheme is taken as the preliminary adjustment scheme. Otherwise, the above process is repeated until the yield rate of the current production batch is restored to the normal level.
[0194] After obtaining the preliminary adjustment scheme, in order to further ensure the scientific rationality of the scheme, further comparison with the rule base is also needed, and the rule base contains a large number of adjustment schemes recognized by experts and adjustment schemes proved feasible after execution. Specifically, the matching process includes:
[0195] e5) vectorizing the preliminary adjustment scheme to obtain an adjustment vector;
[0196] e6) calculating the cosine similarity of the adjustment vector and a plurality of rule vectors in the pre-constructed adjustment rule base, and when the cosine similarity of the adjustment vector and any one rule vector is greater than or equal to a preset similarity threshold, the preliminary adjustment scheme is taken as the final optimization scheme.
[0197] Among them, the preliminary adjustment scheme includes the adjustment amount of each process parameter of the current process equipment, which falls into the interval [-1, 1] after normalization. Therefore, the adjustment vector can be directly constructed and matched with a plurality of rule vectors in the rule base to calculate the cosine similarity. The cosine similarity is used to evaluate the matching degree of the adjustment scheme. If it matches, it means that the scheme is reasonable and feasible. If it does not match, it is sent to the expert system or the operator for decision.
[0198] Finally, the final optimization scheme is sent to the operator, and whether to adopt it is decided by the operator.
[0199] The optimized production data (data after adopting the scheme) and the production data of the operator not adopting the optimization suggestion are used to calculate the deviation between the actual optimization rate and the predicted optimization rate through a confusion matrix, and a visual chart is used to show the correlation between parameter adjustment and quality indicators. The prediction result is verified based on the actual production data, and the process parameter optimization range is dynamically adjusted.
[0200] Figure 11 The effect verification and data collection flowchart in an embodiment of the present application can further expand the rule library based on the adoption or non-adoption results, specifically including:
[0201] When the final optimization scheme is not adopted, the actual defect result corresponding to the current running data is collected, and the similarity between the actual defect result and the prediction result is calculated. When the similarity is greater than a preset similarity threshold, the current running data and the prediction result are stored as a pre-warning case in a pre-constructed prediction knowledge base.
[0202] When the final optimization scheme is adopted, the adjustment effect is evaluated based on a double difference model. When the target quality index improvement amplitude exceeds a threshold and the stability index meets the preset requirements, the final optimization scheme is stored in a pre-existing adjustment rule library. When the target quality index improvement amplitude does not exceed the threshold or the stability index does not meet the preset requirements, the final optimization scheme is sent to an expert system for evaluation.
[0203] In the above process, a full-link quality tracking system is constructed, and a causal correlation analysis of adjustment parameters and quality indicators is realized based on time series analysis technology. Whether the parameters are updated or not, continuous monitoring is performed.
[0204] When the parameters are not updated, a prediction confidence interval verification technology is used to compare the prediction results. When the actual result and the prediction interval overlap degree is ≥95%, the prediction case is stored in the precise prediction knowledge base to form an intelligent early warning rule.
[0205] When the parameters are updated, a double difference model is used to evaluate the adjustment effect. When the key quality index improvement amplitude exceeds a preset threshold and the stability index meets the standard, the adjustment scheme is converted into a standardized process instruction and stored in a dynamic rule library.
[0206] When the expected effect is not achieved, an intelligent traceability mechanism is triggered, the optimization path is reconstructed through process mining technology, the failure node is located by combining fault tree analysis method, and improvement suggestions are generated by the expert system to form a closed-loop optimization case.
[0207] The parameter optimization system based on contact lens intelligent production line flaw prediction of the application extracts process parameter sequences and corresponding detection results from historical operation data of the production line, extracts dynamic characteristics from the process parameter sequences, and obtains a flaw prediction model by fitting the corresponding relationship between the dynamic characteristics and the detection results through machine learning. The flaw prediction model is used to predict the dynamic characteristics of the process parameters in the current time period to obtain a flaw prediction result. If there is a flaw risk in the flaw prediction result, the process parameters are adjusted using a dynamic adjustment technology to obtain a preliminary adjustment scheme with no flaw risk in the prediction result, and then the preliminary adjustment scheme is matched with a historical mature scheme. In the matching process, an optimized scheme is output. The application uses machine learning and other prediction technologies to analyze production data to identify potential production flaws in advance and provide real-time adjustment suggestions during the production process, thereby improving the production efficiency and quality of contact lenses.
[0208] The embodiment also provides an electronic terminal, including a processor and a memory.
[0209] The memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory to enable the terminal to execute any method in the embodiment.
[0210] The computer readable storage medium in the embodiment can be understood by those skilled in the art that all or part of the steps of the above-mentioned method embodiments can be completed by a computer program related hardware. The aforementioned computer program can be stored in a computer readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes ROM, RAM, magnetic disc or optical disc and various storage program codes.
[0211] The electronic terminal provided in the embodiment includes a processor, a memory, a transceiver and a communication interface. The memory and the communication interface are connected with the processor and the transceiver and complete communication between each other. The memory is used to store a computer program, the communication interface is used for communication, and the processor and the transceiver are used to run the computer program to enable the electronic terminal to execute each step of the method.
[0212] In the embodiment, the memory can include random access memory (RAM) and can also include non-volatile memory, such as at least one disk memory.
[0213] The processor described above can be a general processor, including a central processing unit (CPU), a network processor (NP), etc.; can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component.
[0214] In the above embodiments, although the present application has been described in conjunction with specific embodiments thereof, numerous alternatives, modifications and variations will be readily apparent to those of ordinary skill in the art in the light of the foregoing descriptions. The embodiments of the present application are intended to embrace all such alternatives, modifications and variations as falling within the scope of the appended claims.
[0215] The above embodiments only illustrate the principles and effects of the present application, but are not used to limit the present application. Any person skilled in the art can modify or change the above embodiments without departing from the spirit and scope of the present application. Therefore, all equivalent modifications or changes made by those skilled in the art without departing from the spirit and technical ideas of the present application should be covered by the claims of the present application.
Claims
1. A parameter optimization system based on contact lens smart production line defect prediction, characterized by, The method comprises the following steps: a data acquisition module is configured to acquire historical running data of devices in each process of the smart contact lens production line and current running data of the devices in each process of the smart contact lens production line, wherein the historical running data comprises values of multiple process parameters at multiple historical time points and lens defect detection results, and the current running data comprises values of multiple process parameters at multiple time points in a current time period, and the current time period is a time period of a target length before a current time point; The data preprocessing module is configured to preprocess the historical operation data and the current operation data respectively to obtain preprocessed data samples and current preprocessed data, and to extract features from the preprocessed data samples and the current preprocessed data respectively to obtain feature samples and current features. The data preprocessing module is configured to preprocess the historical operation data to obtain preprocessed data samples, including: cleaning the historical operation data to obtain cleaned data, wherein the cleaning methods include data elimination corresponding to equipment failure, data deletion based on business logic, interpolation, and outlier elimination, and the cleaned data is a time series data sequence; sliding a pre-constructed sliding window along the value sequence of each process parameter of the cleaned data to obtain fragmented data of multiple time windows, wherein the width of the sliding window is determined based on the process to which the cleaned data belongs; extracting time domain features of the multiple fragmented data of each process parameter, wherein the time domain features include the mean, peak, valley, variance, range, rising slope, falling slope, and fluctuation frequency of the process parameter; performing Fourier transform on the multiple fragmented data of each process parameter to obtain frequency domain data of the multiple fragmented data of each process parameter, and extracting frequency domain features from the frequency domain data, wherein the frequency domain features include the main frequency, secondary main frequency, frequency spectrum energy distribution, and frequency spectrum peak; combining the time domain features and the frequency domain features to obtain time-frequency domain features; determining a first process parameter associated with lens deformation defects and a second process parameter associated with scratch defects based on a pre-constructed correlation model; combining the time domain features and the frequency domain features of multiple first process parameters respectively in time to obtain feature combinations; introducing multiple defect association information into the frequency domain features and the time domain features of the second process parameter corresponding time points to obtain fusion features, wherein the defect association information is one or a combination of multiple of the following: operation abnormal alarm and suction nozzle wear warning information of the taking and placing mechanical arm, contact lens raw material difference information, and equipment debugging records; performing standardization processing on the time-frequency domain features of the process parameters, the feature combinations, and the fusion features to obtain structured dynamic features, and constructing preprocessed data samples based on the structured dynamic features and corresponding lens defect detection results; and the construction method of the correlation model includes: classifying the historical operation data based on lens defect detection results to obtain historical operation data units of multiple defect types; preprocessing and feature extraction on the historical operation data units to obtain multiple feature vectors of each process parameter wherein, represents a time window, is a serial number of a process parameter; performing density clustering on a plurality of feature vectors of the historical running data unit to obtain a plurality of feature vector clusters; extracting an intra-cluster data amount of each feature vector cluster, and taking a feature vector cluster with an intra-cluster data amount greater than a set threshold as a target cluster, and merging the target clusters based on the process parameter to obtain a target cluster set, wherein each target cluster set corresponds to one process parameter; calculating a ratio of a number of the target cluster sets to a number of the historical running data units, and taking a process parameter with a ratio greater than a set proportion threshold as an associated process parameter of a flaw type corresponding to the historical running data unit; and constructing an association model based on the associated process parameters of the plurality of flaw types. a modeling and optimization module is configured to construct training data based on the feature samples and the lens defect detection results, train an artificial neural network based on the training data and a focal point loss function, obtain an initial prediction model, calculate the contribution of different process parameters to the lens defect detection results based on the initial prediction model, update the training data based on the contribution, and train the initial prediction model based on the updated training data to obtain a defect prediction model; a prediction and optimization module is configured to input the current features into the defect prediction model to obtain a prediction result, adjust process parameters based on the prediction result to obtain a preliminary adjustment scheme when the prediction result contains any kind of defect risk, match the preliminary adjustment scheme with a pre-constructed adjustment rule library, and determine a final optimization scheme based on a matching result.
2. The parameter optimization system based on contact lens smart production line flaw prediction according to claim 1, characterized in that, Further comprising: an iterative optimization module is configured to, when the final optimization scheme is not adopted, acquire actual defect results corresponding to the current running data, calculate a similarity between the actual defect results and the prediction result, and store the current running data and the prediction result as a warning case in a pre-constructed prediction knowledge base when the similarity is greater than a pre-set similarity threshold; when the final optimization scheme is adopted, evaluate the adjustment effect based on a double difference model, and store the final optimization scheme in a pre-constructed adjustment rule library when a target quality index improvement amplitude exceeds a threshold and a stability index meets a pre-set requirement, or send the final optimization scheme to an expert system for evaluation when the target quality index improvement amplitude does not exceed the threshold or the stability index does not meet the pre-set requirement.
3. The parameter optimization system based on contact lens smart production line flaw prediction of claim 1, wherein, standardize the time-frequency domain features, feature combinations and fused features of the process parameters to obtain structured dynamic features, including: convert engineering parameters in dynamic features into actual process quantities, standardize continuous process parameters in dynamic features, normalize skewed distribution continuous features in dynamic features, convert discrete process parameters in dynamic features into numerical features through binning or one-hot encoding, and unify the dimensions of dynamic features to obtain structured dynamic features, wherein the dynamic features are time-frequency domain features, feature combinations or fused features.
4. The parameter optimization system based on contact lens smart production line flaw prediction of claim 1, wherein, train an artificial neural network based on the training data and a focal point loss function to obtain an initial prediction model, including: S11, construct training data based on the value sequence of each piece of data, structured dynamic features and lens defect detection results, wherein the lens defect detection results are true labels; S12, input the training data into the Transformer-GCN hybrid network architecture to obtain a predicted label; S13, calculate the focal loss between the predicted label and the true label, and adjust the parameters of the Transformer-GCN hybrid network architecture based on the focal loss, and repeat steps S12-S13 until the training is completed, to obtain an initial prediction model.
5. The parameter optimization system based on contact lens smart production line flaw prediction of claim 1, wherein, Based on the initial prediction model, the contribution of different process parameters to the lens defect detection result is calculated, including: Obtain a plurality of verification samples, and input the plurality of verification samples into the initial prediction model to obtain a predicted label; Classify the predicted label based on the defect type to obtain the geometry of the defect type; for a set of different defect types, calculate the Shapley value of a plurality of process parameters based on the corresponding predicted label, wherein the mathematical expression of the Shapley value is: wherein, denotes a process parameter , the Shapley value of , the set of all process parameters, denotes the set of samples without the process parameter , , denotes the number of process parameter types in the subset , denotes the number of all process parameter types, denotes the predicted label of the sample corresponding to the subset , denotes the predicted label of the sample within the set after adding the process parameter ; Take the Shapley value of each process parameter as the contribution of the corresponding defect.
6. The parameter optimization system based on contact lens smart production line flaw prediction of claim 1, wherein, Based on the prediction result, the process parameters are adjusted to obtain a preliminary adjustment scheme, including: S21, extract the defect prediction type from the prediction result, and determine the associated process parameters associated with the defect prediction type based on a pre-constructed association model; S22, compare the value of the associated process parameter with the pre-constructed process parameter reference value, and adjust the value of the associated process parameter by one unit based on the size relationship between the value of the associated process parameter and the pre-constructed process parameter reference value, to obtain an updated process parameter; S23, update the current running data with the updated process parameter, and pre-process and feature extract the updated current running data to obtain updated current features; S24, input the updated current features into the defect prediction model to obtain an updated predicted label; when there is still any kind of defect risk in the updated predicted label, return to step S21 until there is no any kind of defect risk in the updated predicted label; when there is no any kind of defect risk in the updated predicted label, construct a preliminary adjustment scheme based on the adjustment value of the associated process parameter.
7. The parameter optimization system based on contact lens smart production line flaw prediction of claim 1, wherein, Match the preliminary adjustment scheme with a pre-constructed adjustment rule library, and determine a final optimization scheme based on the matching result, including: Vectorize the preliminary adjustment scheme to obtain an adjustment vector; Calculate the cosine similarity between the adjustment vector and a plurality of rule vectors in the pre-constructed adjustment rule library, and when the cosine similarity between the adjustment vector and any one rule vector is greater than or equal to a preset similarity threshold, take the preliminary adjustment scheme as the final optimization scheme.
8. The parameter optimization system based on contact lens smart production line flaw prediction of claim 1, wherein, Update the training data based on the contribution, including: Remove the process parameters with a contribution lower than a preset contribution threshold from the training data to obtain updated training data.
Citation Information
Patent Citations
Die casting defect prediction and diagnosis system
CN113486457A