A sesame product filling detection method and system
Through the coordinated work of gas sensors, infrared thermal imaging and pressure detection components, combined with multimodal learning model, the problems of low detection accuracy and poor reliability in sesame product filling inspection are solved, and efficient identification and accurate detection of micro leakage are achieved.
Patent Information
- Application Number
- CN202510756371.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-09
- Publication Date
- 2025-08-15
- Estimated Expiration
- 2045-06-09
AI Technical Summary
Among the existing sesame product filling detection methods, the detection accuracy is low, the detection results are poor, and the fine leakage is difficult to identify, and it is susceptible to interference from the content state, thermal disturbance and mechanical structure.
The gas sensor group, infrared thermal imaging component and pressure detection component work together, and the heat replenishment component is used to stimulate the release of inductive gases through the heat replenishment component. Combined with infrared thermal imaging, the thermal distribution abnormality of tiny leakage after heating is captured, and pressure detection data is synchronized to construct a multimodal perception and discrimination leakage detection mode comparison learning model to realize cross-modal feature extraction and inference judgment.
It improves the ability to identify small and hidden leaks, enhances the robustness and accuracy of the system, reduces the probability of missed detection and misjudgment, and improves the accuracy and reliability of detection.
Smart Images

Figure CN120253069B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of sealing detection, and in particular to a sesame product filling detection method and system. Background Art
[0002] As the food industry becomes increasingly automated and intelligent, bottled sesame products (such as sesame paste and sesame seasoning oil), as part of the seasoning industry, are characterized by large filling volumes, frequent batches, and sensitive quality. To ensure that finished products do not leak, oxidize, or become contaminated during distribution and storage, seal quality testing during the filling process has become a critical step in ensuring product safety and extending shelf life.
[0003] In the current industry, the following methods are mainly used for filling and sealing inspection of sesame products: the first is manual sampling method, which visually observes the sealing status of the bottle mouth or weighs it to detect whether there is a leak, but this method is inefficient, highly subjective, and difficult to identify subtle leaks; the second is physical sensing detection, such as using laser interferometry to measure the deformation of the bottle mouth, but this method has interference problems such as uneven contents, bubble shielding, thermal expansion and contraction for liquid sesame products, and has a high false alarm rate; the third is an automatic airtightness detection device for canned food packaging, such as the invention patent CN118758528A, which realizes production line sealing pressure testing through structure, but when the pressure is low in this scheme, the second piston does not change significantly, and when the pressure is high, secondary deformation of the object to be detected is likely to occur, which is prone to missed reports and false alarms.
[0004] Therefore, there is an urgent need for a sesame product filling detection method and system to improve detection accuracy and anti-interference ability. Summary of the Invention
[0005] In view of this, the present invention proposes a sesame product filling detection method and system, aiming to solve the problems of low detection accuracy and poor reliability of detection results in the current filling and sealing detection of sesame products.
[0006] In one aspect, the present invention provides a sesame product filling detection system, comprising:
[0007] A gas sensor group is provided at the outlet of the canning device. The gas sensor group includes a plurality of odor sensors evenly distributed on both sides of the conveyor belt. The gas sensor group is used to collect volatile gas spectra of the object to be detected;
[0008] A heating component is provided between the gas sensor group and the canning device, and is used to heat the object to be detected;
[0009] An infrared thermal imaging component, comprising a plurality of infrared cameras, wherein the infrared thermal imaging component is used to collect infrared image data of a plurality of heated objects to be detected and construct an infrared image data set;
[0010] A pressure detection component, used to perform a sealing pressure test on the object to be detected, the pressure detection component also includes a pressure sensor, and the pressure sensor is used to collect pressure data of the sealing pressure test;
[0011] Control module, including acquisition unit, processing unit, detection unit and early warning unit;
[0012] The acquisition unit is configured to acquire known state samples, establish training samples based on the known state samples, and construct a leakage detection modal contrast learning model based on the training samples;
[0013] The processing unit processes the volatile gas spectrogram, the infrared image data set, and the pressure data based on the leak detection modal contrast learning model to obtain a feature matrix;
[0014] The detection unit is configured to process the feature matrix according to the leakage detection modal contrast learning model to obtain a model output result;
[0015] The early warning unit is configured to issue an early warning according to the model output result.
[0016] Further, including:
[0017] The supplementary heat component includes a far-infrared heating device or a hot air blowing device;
[0018] The odor sensor includes a metal oxide-based gas sensor, and the gas sensor group includes 8 odor sensors, each of which samples for 3 seconds, and samples 10 times per second;
[0019] The infrared camera in the infrared thermal imaging assembly is triggered 1 second after the heating is completed, and the image pixel size is 120×120 pixels;
[0020] The pressure sensor in the pressure detection assembly has a sampling time of 2 seconds and a sampling frequency of 50 Hz.
[0021] Furthermore, the positive pressure value of the pressure detection component in performing a sealing pressure test on the object to be detected is 0.1-0.3 bar, and the sampling frequency of the pressure sensor is higher than 20 Hz.
[0022] Furthermore, when the acquisition unit constructs the leakage detection modal contrast learning model, it includes:
[0023] The leak detection modality contrast learning model includes an odor spectrum encoder, an infrared image encoder, and a pressure curve encoder, each of which outputs a 128-dimensional embedding vector;
[0024] The processing unit collects the training samples, inputs the three types of modal data of each training sample into an encoder to obtain an embedding vector, and constructs a positive sample pair and a negative sample pair based on the embedding vector; the positive sample is a combination of data from the same bottle body and different modalities; the negative sample is a combination of data from different bottles or different sealing states;
[0025] The processing unit calculates the semantic similarity between the positive sample pair and the negative sample pair based on a cosine similarity function, and defines a contrast loss function based on normalized temperature scaled cross entropy;
[0026] Take the weighted average of the loss functions of all positive sample pairs in each training batch to obtain the total loss value;
[0027] An automatic differentiation mechanism is used to calculate the gradient of the total loss value with respect to the encoder network parameters, and an Adam optimizer is used to iteratively optimize the convolutional layers, fully connected layers, or recursive structures in each modality encoder.
[0028] Furthermore, when the acquisition unit constructs the leakage detection modal contrast learning model, it also includes:
[0029] The contrast loss function:
[0030] ;
[0031] in, Indicates the loss value of the positive sample pair formed by the anchor point and the positive sample; Indicates the semantic similarity between the anchor point and the positive sample; Indicates the semantic similarity between the anchor point and the negative sample, represents the negative sample pool, Represents the temperature coefficient.
[0032] Furthermore, when the acquisition unit constructs the leakage detection modal contrast learning model, it also includes:
[0033] The total loss value:
[0034] ;
[0035] Where N represents the number of training samples, Indicates the gas code output of the i-th bottle; Indicates the infrared coding output of the i-th bottle; Indicates the pressure coding output of the i-th bottle; Represents the overall loss after averaging all positive sample pairs in the current batch, represents the loss value of the i-th odor modality and the i-th infrared modality pair; represents the loss value of the pair of the i-th odor mode and the i-th pressure mode; Represents the loss value of the i-th infrared mode and i-th pressure mode pair.
[0036] Furthermore, when the acquisition unit constructs the leakage detection modal contrast learning model according to the training samples, it also includes:
[0037] The collection unit collects system operation records;
[0038] When the operation record is empty, the acquisition unit uses the constructed leakage detection modal contrast learning model as the final model;
[0039] When the operation record is not empty, the acquisition unit acquires the historical model output results, and uses the verified historical model output results as a new verification set to optimize the constructed leakage detection modal contrast learning model.
[0040] Furthermore, when the processing unit preprocesses the collected data to obtain a feature matrix, it includes:
[0041] The processing unit performs filtering and denoising on each channel of the volatile gas spectrogram based on a median filter, normalizes each channel according to maximum and minimum values, and controls the odor spectrogram encoder to convert the normalized data into a 128-dimensional odor feature vector;
[0042] The processing unit performs gradient enhancement on the infrared image data set based on the Laplace operator, normalizes the data to a grayscale value between 0 and 1, and controls the infrared image encoder to process the normalized data to extract a 128-dimensional image feature vector;
[0043] The processing unit removes high-frequency noise from the pressure data based on a sliding window average, calculates a pressure drop rate and a plateau slope based on the denoised pressure data, and controls a pressure curve encoder to obtain a 128-dimensional pressure feature vector;
[0044] The odor feature vector, the image feature vector, and the pressure feature vector are concatenated into the feature matrix.
[0045] Furthermore, the detection unit processes the feature matrix according to the leakage detection modal contrast learning model to obtain a model output result, including:
[0046] The detection unit obtains a similarity score between the feature matrix and the sealing state according to the leakage detection modal contrast learning model, compares the similarity score with a first similarity threshold and a second similarity threshold, and obtains the model output result according to the comparison result; the first similarity threshold is less than the second similarity threshold;
[0047] When the similarity score is less than or equal to the first similarity threshold, the detection unit determines that the object to be detected is a high-risk leak; when the similarity score is greater than the first similarity threshold and less than or equal to the second similarity threshold, the detection unit determines that the object to be detected is a suspected leak; when the similarity score is greater than the second similarity threshold, the detection unit determines that the object to be detected is well sealed.
[0048] Compared with the existing technology, the beneficial effect of the present invention is that by constructing a sesame product filling and sealing detection system with multimodal perception and discrimination, a breakthrough is made in the problem that the existing single-modal detection means are easily affected by the state of the contents, thermal disturbances and mechanical structure, resulting in missed detection and misjudgment. A gas sensor group is arranged at the can outlet, and the release of volatile components is stimulated by the heating component. The infrared thermal imaging component is combined to capture the thermal distribution anomalies caused by tiny leaks after heating, and the dynamic sealing response data provided by the pressure detection component is collected simultaneously to form three types of heterogeneous modal inputs: odor spectra, thermal images and pressure curves. The acquisition unit is used to establish a training data set based on known samples, the processing unit performs deep feature extraction and semantic alignment through the modal contrast learning model, the detection unit realizes cross-modal reasoning and discrimination, and the early warning unit realizes multi-level leakage alarm and anomaly tracking based on the model results, thereby improving the recognition ability of tiny and hidden leaks and enhancing the robustness and accuracy of the system.
[0049] On the other hand, the present application also provides a sesame product filling detection method, which is applied to the above-mentioned sesame product filling detection system, comprising:
[0050] The gas sensor collects a volatile gas spectrum of the object to be detected, the infrared thermal imaging component collects a plurality of infrared image data of the object to be detected after heating, and constructs an infrared image data set, and the pressure sensor collects pressure data of the sealing pressure test;
[0051] Collecting known state samples, establishing training samples based on the known state samples, and constructing a leakage detection modal contrast learning model based on the training samples;
[0052] Processing the volatile gas spectrogram, the infrared image data set, and the pressure data based on the leak detection modal contrast learning model to obtain a feature matrix;
[0053] Processing the feature matrix according to the leakage detection modal contrast learning model to obtain a model output result;
[0054] An early warning is issued based on the output results of the model.
[0055] It is understandable that the above-mentioned sesame product filling detection method and system have the same beneficial effects and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] Various other advantages and benefits will become apparent to those skilled in the art upon reading the detailed description of the preferred embodiment below. The accompanying drawings are for illustration purposes only and are not to be considered as limiting the present invention. The same reference symbols are used throughout the drawings to represent the same components. In the drawings:
[0057] Figure 1 This is a functional block diagram of a sesame product filling detection system provided by an embodiment of the present invention;
[0058] Figure 2 This is a flow chart of a sesame product filling detection method provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0059] Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art. It should be noted that, unless there is a conflict, the embodiments of the present disclosure and the features in the embodiments can be combined with each other. The present invention will be described in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
[0060] Traditional filling and seal inspection methods suffer from difficulties integrating multimodal data, limiting detection accuracy. Manual spot checks rely on subjective judgment and fail to capture leak signatures in real time. Physical sensing is susceptible to interference from uneven liquid content, air bubble obscuration, and thermal expansion and contraction. Seal pressure testing lacks sensitivity in the low-pressure range, and high-pressure testing can cause deformation of the object under inspection.
[0061] For example, in an automated production line, sesame paste bottles undergo sealing inspection immediately after high-temperature filling. Because sesame products contain high-oil content, their volatile gases form a nonlinear diffusion pattern during the cooling phase, and the thermal conductivity characteristics of poorly sealed areas are slightly different from those of normal areas. When the existing system uses a single pressure test, the pressure sensor cannot distinguish between real leaks and pressure drop noise caused by bottle deformation in the test range below 0.1 bar. When using infrared detection, the temperature gradient on the surface of the unheated bottle is insufficient, and the signal-to-noise ratio of the thermal imaging data is low. The volatile gas spectrum collected by the gas sensor is easily affected by fluctuations in the temperature and humidity of the production line environment.
[0062] When faced with the above problems, the present applicant found that a single detection method is difficult to cover the complex characteristics of sesame product leakage. Traditional pressure testing is not sensitive enough in the low-pressure range, while high-pressure testing may cause the bottle to deform. Infrared detection does not take into account the problem of insufficient temperature gradient caused by the cooling of oily substances. Gas sensors are susceptible to environmental interference. In this regard, the present applicant proposes that the multi-dimensional physical changes caused by leakage should be captured simultaneously, and the detection robustness should be improved through a synergistic and complementary mechanism. Furthermore, the present applicant designs a supplementary heating link after filling, which strengthens the heat conduction difference between the leakage area and the non-leakage area through active heating, and simultaneously collects the infrared image and volatile gas spectrum after heating, using the temperature field change to accelerate gas diffusion and enhance the signal-to-noise ratio of the sensing signal. At the same time, the pressure test data is cross-modally correlated with the thermal and gas mode data to construct a detection model that can capture the temporal and spatial coupling characteristics, thereby breaking through the perception limitations of a single mode.
[0063] In some embodiments of the present application, see Figure 1 As shown, the present application proposes a sesame product filling inspection system, comprising: a gas sensor group, disposed on the outlet side of the filling device, comprising several odor sensors evenly distributed on both sides of the conveyor belt, for collecting volatile gas spectra of the inspected object; a supplementary heating assembly, disposed between the gas sensor group and the filling device, for heating the inspected object; an infrared thermal imaging assembly, comprising several infrared cameras, for collecting infrared image data of several heated inspected objects to construct an infrared image data set; a pressure detection assembly, for performing a seal pressure test on the inspected object, comprising a pressure sensor for collecting pressure data from the seal pressure test; a control module, comprising an acquisition unit, a processing unit, a detection unit, and an early warning unit. The acquisition unit is configured to collect known state samples, establish training samples based on the known state samples, and construct a leak detection modal contrast learning model based on the training samples. The processing unit processes the volatile gas spectra, infrared image data set, and pressure data based on the leak detection modal contrast learning model to obtain a feature matrix. The detection unit is configured to process the feature matrix according to the leakage detection modal contrast learning model to obtain a model output result. The early warning unit is configured to issue an early warning according to the model output result.
[0064] Specifically, a gas sensor assembly refers to a collection of sensors used to detect volatile gases released by the object being tested. This can be achieved using a metal oxide gas sensor array. Multiple sensors distributed across different locations capture changes in gas composition, addressing the inability of traditional manual spot checks to identify volatile emissions caused by subtle leaks. A heating component applies an external heat source to the object being tested, specifically a far-infrared heater or hot air circulation system. Moderate heating accelerates the release of volatile gases, enhancing the gas sensor assembly's detection sensitivity and addressing the weak detection signal caused by slow gas diffusion in low-temperature environments. An infrared thermal imaging component uses infrared radiation to generate temperature distribution images, specifically an array of multiple high-resolution infrared cameras. By capturing changes in the bottle's surface temperature after heating, it can identify areas of abnormal heat conduction caused by leaks, addressing the problem of misinterpretation caused by interference from the contents during physical pressure testing. A pressure detection component applies pressure and monitors changes in pressure, specifically a pressure sensor in conjunction with a sealed chamber. This positive pressure test assesses the seal strength of the bottle, addressing the inability to quantify seal performance through visual or weight-based testing alone. Among them, the modal contrast learning model for leak detection refers to a machine learning model that integrates multimodal data. Specifically, it can be achieved by using an encoder to extract the feature vectors of gas, infrared, and pressure data and optimizing the model parameters through contrast loss. It improves the robustness of leak detection through cross-modal data correlation, and solves the problem that a single detection method is easily interfered with by environmental noise. Among them, the feature matrix refers to a multidimensional data set after integrating the features of different modal data. Specifically, it can be generated by vector splicing or weighted fusion. By uniformly representing multi-source information, the model calculation complexity is reduced, and the problem of low processing efficiency caused by heterogeneous data in traditional multi-sensor systems is solved. Among them, the early warning unit refers to a module that triggers an alarm based on the output of the model. Specifically, it can be achieved by using an audible and visual alarm or a production line emergency stop device. Different leakage risk levels are matched through a graded response mechanism to solve the problem of excessive downtime caused by the inability of existing systems to distinguish between minor leaks and serious defects.
[0065] It is understandable that the combined application of gas volatilization analysis, thermal imaging monitoring and pressure testing, combined with the contrastive learning model to achieve cross-modal feature alignment, effectively overcomes the limitations of a single detection method in the sesame product filling scenario, and improves the accuracy of tiny leak identification and anti-interference ability.
[0066] The working process and principle of the present application are as follows: the sesame product filling detection system includes a gas sensor group, a heating component, an infrared thermal imaging component, a pressure detection component and a control module. The gas sensor group is arranged on the outlet side of the can-shaped device, and is composed of a number of odor sensors evenly distributed on both sides of the conveyor belt, which are used to collect the volatile gas spectrum of the object to be detected. The heating component is arranged between the gas sensor group and the can-shaped device to heat the object to be detected. The infrared thermal imaging component includes a number of infrared cameras, and the infrared thermal imaging component can be arranged after the gas sensor group to collect infrared image data of the object to be detected after heating and construct an infrared image data group. The pressure detection component performs a sealing pressure test on the object to be detected, wherein the pressure sensor collects pressure data of the sealing pressure test.
[0067] The control module includes an acquisition unit, a processing unit, a detection unit, and an early warning unit. The acquisition unit collects known state samples, creates training samples, and constructs a modal contrast learning model for leak detection. Based on this model, the processing unit processes the volatile gas spectra, infrared image data, and pressure data to obtain a feature matrix. The detection unit processes the feature matrix according to the model to obtain the model output. The early warning unit issues an early warning based on the model output.
[0068] The system uses multimodal data fusion to collaboratively capture the multi-dimensional physical changes caused by leaks. The heat supplementation process enhances the thermal conductivity difference between leaking and non-leaking areas. Simultaneously acquired infrared images and volatile gas spectra utilize temperature field changes to accelerate gas diffusion and enhance the signal-to-noise ratio of the sensor signal. Pressure test data is cross-modally correlated with thermal and gas modal data to construct a detection model capable of capturing temporal and spatial coupling characteristics, overcoming the limitations of single-modal perception.
[0069] As a preferred embodiment, the solution of this application is specifically implemented as follows:
[0070] The gas sensor assembly consists of eight odor sensors evenly distributed on both sides of the conveyor belt. Each odor sensor samples for three seconds, or 10 times per second. The supplemental heating component uses a far-infrared heater to heat the object being tested. The infrared thermal imaging component includes four infrared cameras, which capture 120×120 pixel infrared images, triggered one second after the supplemental heating ends. The pressure detection component performs a seal pressure test on the object being tested, with a positive pressure of 0.2 bar. The pressure sensor sampling time is two seconds, and the sampling frequency is 50 Hz.
[0071] In the control module, the acquisition unit first collects 100 samples of known states, including normal sealing, minor leaks, and severe leaks. Minor leaks and severe leaks are determined based on the size of the leak gap at the bottle mouth. These samples are then used to build a training set for a modal contrast learning model for leak detection. This model includes an odor spectrum encoder, an infrared image encoder, and a pressure curve encoder, each of which outputs a 128-dimensional embedding vector.
[0072] The processing unit preprocesses the collected data. Each channel of the volatile gas spectra is subjected to median filtering for denoising and normalization. Laplace operator gradient enhancement and grayscale normalization are performed on the infrared image data set. Sliding window averaging is used to denoise the pressure data, and the pressure drop rate and plateau slope are calculated. The preprocessed data is then input into the corresponding encoder to obtain feature vectors, which are then concatenated to form a feature matrix.
[0073] The detection unit uses a leak detection modal contrast learning model to process the feature matrix and calculate a similarity score with the sealing state. The first similarity threshold is set to 0.3, and the second threshold is set to 0.7. If the similarity score is ≤ 0.3, it is considered a high-risk leak. If the similarity score is 0.3 and ≤ 0.7, it is considered a suspected leak. If the similarity score is ≥ 0.7, it is considered a good seal.
[0074] The early warning unit issues warnings based on the test results. For high-risk leaks, an audible and visual alarm is triggered, halting the production line. For suspected leaks, the product is marked for manual re-inspection. For leaks that are well sealed, the product is allowed to pass.
[0075] Through the above scheme, this application realizes the accurate detection of the filling and sealing quality of sesame products. Multimodal data fusion overcomes the limitations of a single detection method and improves the accuracy and reliability of detection. The reheating link strengthens the leakage characteristics and enhances the signal-to-noise ratio of the sensor signal. The modal contrast learning model for leakage detection effectively captures the temporal and spatial coupling characteristics and improves the generalization ability of the model. The system can detect tiny leaks in a timely manner, prevent unqualified products from entering the market, and reduce the risk of product oxidation, deterioration and microbial contamination. At the same time, the system's automated detection improves production efficiency. In addition, the method effectively reduces the impact of environmental interference on the detection results and enhances the robustness of the detection through the collaborative analysis of multi-dimensional physical characteristics.
[0076] In some of the above-mentioned schemes of the present application, the synergistic effect of the heating component and the gas sensor group restricts the detection accuracy. Specifically, the single heating method leads to uneven heating of the object to be detected, the mismatch of the gas sensitive device type causes a weak volatile gas response signal, the number of sensors and the sampling timing cannot cover the entire area of the bottle surface, the deviation in the triggering timing of the infrared image leads to the loss of dynamic characteristics of heat conduction, and the high-frequency noise of the pressure signal interferes with the accuracy of the pressure drop rate calculation.
[0077] This application further proposes that the supplemental heating component include a far-infrared heating device or a hot air blowing device. The odor sensor includes a metal oxide-based gas sensor, and the gas sensor group includes eight odor sensors, each sampling for three seconds, 10 times per second. The infrared camera in the infrared thermal imaging component is triggered one second after the supplemental heating ends, with an image resolution of 120×120 pixels. The pressure sensor in the pressure detection component has a sampling time of two seconds and a sampling frequency of 50 Hz.
[0078] Among them, the far-infrared heating device improves the surface temperature uniformity of sesame products through radiant heat transfer, and the hot air blowing device uses forced convection to shorten the heating time. The metal oxide-based gas sensor has selective adsorption characteristics for sulfur-containing volatile compounds. Eight odor sensors are symmetrically distributed on both sides of the conveyor belt to form a circular detection array. The 3-second sampling cycle covers the time window when the bottle passes through the detection area. The infrared camera is triggered 1 second after the end of the supplementary heating to capture the stable state of heat diffusion to the bottle mouth sealing layer. The 120×120 pixel resolution balances image details and processing efficiency. The 50Hz sampling frequency of the pressure sensor meets the collection requirement of at least 100 pressure data points within a 2-second test cycle.
[0079] Specifically, during the reheating phase, a far-infrared heating device provides non-contact radiant heating of the bottle, or a hot air blast device applies dynamic airflow heating to the bottle during high-speed transport. Both methods ensure that a stable thermal gradient is formed on the surface of the sesame product, which can be captured by an infrared camera. A metal oxide-based gas sensor converts the concentration of volatile sulfides into changes in conductivity through surface redox reactions. Eight sensors arranged in a ring at intervals synchronously collect gas distribution around the bottle mouth. Data is collected 10 times per second within a 3-second sampling cycle, generating a time series of 30 data points to eliminate transient interference. The infrared camera is activated one second after the reheating period ends. At this time, the thermal expansion of the bottle mouth sealant tends to stabilize, and the 120×120 pixel image can clearly show tiny cracks on the edge of the seal. The pressure sensor continuously collects pressure data for 2 seconds at a frequency of 50Hz. A sliding average algorithm is used to eliminate mechanical vibration noise and accurately calculate the pressure drop rate.
[0080] As a preferred embodiment, the solution of this application is specifically implemented as follows:
[0081] The heating system includes either a far-infrared heater or a hot air blower. The far-infrared heater utilizes a carbon fiber heating tube with a power of 1000W and a wavelength range of 3-10μm. The hot air blower utilizes a turbine blower with an adjustable air volume range of 0-100m³ / h and an outlet temperature controllable between 20°C and 80°C.
[0082] The odor sensor consists of a metal oxide-based gas sensor. The gas sensor group includes eight odor sensors, each sampling for three seconds, or 10 times per second. Specifically, the odor sensor uses a SnO2 semiconductor gas sensor with a sensitivity of 10-1000 ppm and a response time of less than 10 seconds. The eight odor sensors are evenly distributed on both sides of the conveyor belt, four on each side, with a spacing of 10 cm.
[0083] The infrared camera in the infrared thermal imaging assembly is triggered one second after the end of the supplemental heating, and has an image resolution of 120×120 pixels. Furthermore, the infrared camera uses an uncooled microbolometer with a wavelength range of 8-14μm, a temperature resolution of 0.05°C, and a field of view of 25°×25°.
[0084] The pressure sensor in the pressure detection component has a sampling time of 2 seconds and a sampling frequency of 50Hz. The pressure sensor is a piezoresistive sensor with a range of 0-1 bar and an accuracy of ±0.1%FS.
[0085] Through the above technical solutions, this application realizes a comprehensive inspection of the sealing quality during the filling process of sesame products. The supplementary heating component effectively stimulates the volatile gas of the object to be detected through far-infrared heating or hot air blowing, thereby enhancing the detection sensitivity of the odor sensor. The gas sensor group adopts multiple odor sensors to improve the spatial coverage and temporal resolution of sampling. The infrared thermal imaging component can capture subtle temperature changes through high-resolution image acquisition, which helps to identify potential leaks. The pressure detection component can accurately record the pressure change curve through high-frequency sampling, thereby judging the sealing performance. Therefore, this solution comprehensively utilizes multiple detection methods to improve the accuracy and reliability of detection and effectively reduce the probability of missed detection and false detection.
[0086] In some of the aforementioned solutions, the pressure detection component suffers from an inadequate match between the positive pressure setting and the sampling frequency when performing a seal pressure test. Excessively high positive pressures can easily cause secondary deformation of the object being tested, leading to distorted pressure data. However, excessively low positive pressures can make it difficult to detect leak signatures. Furthermore, insufficient sampling frequency can miss details of dynamic pressure changes, affecting the accuracy of leak detection.
[0087] The present application further proposes that the positive pressure value of the pressure detection component for the sealing pressure test is set to 0.1-0.3 bar, and the sampling frequency of the pressure sensor is higher than 20 Hz.
[0088] The positive pressure range of 0.1-0.3 bar was experimentally verified to prevent deformation interference caused by the expansion of the contents under pressure while effectively stimulating gas escape from micro-leakage points. The pressure sensor sampling frequency is set higher than 20Hz based on the periodic characteristics of pressure fluctuations. When pressure is applied, the elastic deformation of the bottle seal generates a high-frequency response signal above 10Hz. A sampling frequency higher than 20Hz can fully capture the steep drops in the pressure change curve.
[0089] Specifically, during the sealing pressure test, the pressure detection component applies an initial pressure of 0.1 bar to the object to be tested, and then increases it to 0.3 bar in a linear increment. This gradual pressurization method not only avoids the instantaneous high-pressure impact that causes plastic deformation of the bottle body, but also ensures that the weak points of the seal are gradually revealed. The pressure sensor records pressure data at a sampling frequency of 50Hz, and its sampling interval of 20ms is sufficient to capture nonlinear mutation points in the pressure drop process. For example, when there is a 0.1mm gap between the bottle thread, a pressure drop rate of 0.05 bar per second occurs at a pressure of 0.2 bar, and this change process is fully recorded by the pressure sensor. By matching the positive pressure range and the sampling frequency, it can prevent false alarms caused by damage to the bottle structure due to high pressure, and avoid missing real leakage signals due to low-frequency sampling.
[0090] As a preferred embodiment, the solution of this application is specifically implemented as follows:
[0091] The pressure detection assembly performs a seal pressure test on the object under test at a positive pressure of 0.2 bar, and the pressure sensor has a sampling frequency of 50 Hz. Specifically, after the object under test is conveyed to the pressure detection assembly, the pressure detection assembly first applies a positive pressure of 0.2 bar to the object under test, and then uses the pressure sensor to collect pressure data at a sampling frequency of 50 Hz. This produces a highly accurate pressure curve, which helps accurately detect even small leaks.
[0092] Through the above technical solution, this application can obtain high-precision pressure change data without causing secondary damage to the object being tested. Due to the use of a moderate positive pressure value and a high sampling frequency, it can effectively capture tiny pressure changes, thereby improving the detection sensitivity of subtle leaks. At the same time, the high sampling frequency can also reduce the impact of environmental noise on measurement results, further improving the accuracy and reliability of detection.
[0093] In some of the above-mentioned solutions of this application, there is a problem of insufficient semantic alignment between modalities during the training process of the leakage detection modal contrast learning model. The embedding vectors extracted by different modal encoders are difficult to effectively represent the multimodal features of the same bottle body, resulting in limited model generalization ability and affecting the detection accuracy.
[0094] The present application further proposes a leak detection modal contrast learning model including an odor spectrum encoder, an infrared image encoder, and a pressure curve encoder, each encoder outputting a 128-dimensional embedding vector. The processing unit collects training samples, inputs the three types of modal data of each training sample into the encoder to obtain an embedding vector, and constructs positive sample pairs and negative sample pairs based on the embedding vector. The positive sample is a combination of data from the same bottle body and different modalities. The negative sample is a combination of data from different bottles or different sealing states. The processing unit calculates the semantic similarity between the positive sample pair and the negative sample pair based on the cosine similarity function, and defines the contrast loss function based on the normalized temperature scaled cross entropy. The loss functions of all positive sample pairs in each training batch are weighted averaged to obtain the total loss value. The automatic differentiation mechanism is used to calculate the gradient of the total loss value with respect to the encoder network parameters, and the Adam optimizer is used to iteratively optimize the convolutional layer, fully connected layer or recursive structure in each modal encoder.
[0095] The odor spectrogram encoder uses a convolutional neural network to extract features from time-series data collected by the gas sensor. The infrared image encoder uses a residual network to extract spatial image features. The pressure curve encoder uses a long short-term memory network to process pressure time-series data. Positive sample pairs are constructed by pairwise combining odor-infrared, odor-pressure, and infrared-pressure modal data from the same bottle. Negative sample pairs are generated by randomly combining modal data from different bottles or leaking states. A temperature coefficient of 0.07 is set to adjust the steepness of the similarity distribution. The Adam optimizer learning rate is initialized to 3e-4, and a weight decay strategy is used to prevent overfitting.
[0096] Specifically, the odor spectrogram encoder feeds 3 seconds × 10 sampling data collected by the gas sensor into a one-dimensional convolutional layer, which then outputs a 128-dimensional vector after pooling. The infrared image encoder performs a 3 × 3 convolution on the 120 × 120 pixel infrared image, extracts multi-layer features through residual connections, and compresses the image to 128 dimensions. The pressure curve encoder feeds 2 seconds × 50 Hz pressure data into a bidirectional long short-term memory network, extracts temporal-dependent features, and maps them into a 128-dimensional vector. During training, the three modal embedding vectors of the same bottle form a positive pair, while any two modal embedding vectors of different bottles form a negative pair. The cosine similarity function is used to calculate the similarity of positive pairs, which is higher than that of negative pairs. The cross-entropy loss function is used to maximize the probability distribution of the similarity of positive pairs. The total loss is calculated by averaging the loss values of the three positive pairs: odor-infrared, odor-pressure, and infrared-pressure, to ensure semantic consistency between the modalities. After the automatic differentiation mechanism calculates the gradient, the Adam optimizer updates the convolution kernel weights and fully connected layer parameters of the encoder, enabling the model to learn discriminative features in multimodal data.
[0097] As a preferred embodiment, the solution of this application is specifically implemented as follows:
[0098] When the acquisition unit constructs a leak detection modal contrast learning model, the leak detection modal contrast learning model includes an odor spectrum encoder, an infrared image encoder, and a pressure curve encoder, and each encoder outputs a 128-dimensional embedding vector.
[0099] The processing unit collects training samples and feeds the three modal data of each training sample into the encoder to obtain embedding vectors. Based on these embedding vectors, positive and negative sample pairs are constructed. Positive samples are data from the same bottle with different modalities. Negative samples are data from different bottles or different sealing conditions.
[0100] The processing unit calculates the semantic similarity between the positive sample pair and the negative sample pair based on the cosine similarity function, and defines the contrast loss function based on the normalized temperature scaled cross entropy.
[0101] The loss functions of all positive sample pairs in each training batch are weighted averaged to obtain the total loss value.
[0102] The automatic differentiation mechanism is used to calculate the gradient of the total loss value with respect to the encoder network parameters, and the Adam optimizer is used to iteratively optimize the convolutional layers, fully connected layers or recursive structures in each modality encoder.
[0103] Through the above technical solution, this application achieves the fusion and contrastive learning of multimodal data, improving the accuracy and robustness of leak detection. By constructing positive and negative sample pairs and calculating semantic similarity, the model can learn the inherent connections between data from different modalities. Optimization using a contrastive loss function and automatic differentiation mechanism further enhances the model's representational capabilities and generalization. This approach effectively addresses the problem of single-modal detection being susceptible to interference and improves the system's ability to identify subtle leaks.
[0104] In some of the above-mentioned schemes in this application, the leakage detection modal contrastive learning model extracts features through a multimodal encoder and calculates the semantic similarity of positive and negative sample pairs. However, the existing loss function design does not fully consider the optimization direction of contrastive learning between different modalities, resulting in the model being difficult to effectively distinguish between positive and negative sample pairs during training, affecting the accuracy of leakage detection.
[0105] This application further proposes that the contrast loss function is defined using normalized temperature-scaled cross entropy, and the specific formula is: .
[0106] in, Indicates the loss value of the positive sample pair formed by the anchor point and the positive sample. Indicates the semantic similarity between the anchor point and the positive sample. Indicates the semantic similarity between the anchor point and the negative sample, represents the negative sample pool, Represents the temperature coefficient. Σ represents the sum of all negative samples in the negative sample pool.
[0107] The temperature coefficient τ is set as an adjustable parameter to control the sharpness of the probability distribution. When τ approaches zero, the model focuses only on the most difficult negative examples. As τ increases, the model's ability to discriminate between similar examples decreases. Positive pairs consist of data from different modalities of the same bottle, while negative pairs come from data from different bottles or different sealing states. The cosine similarity function is used to calculate the semantic relevance between embedding vectors, and its value range is limited to the interval [-1, 1].
[0108] Specifically, the loss function converts similarity into a probability distribution through a normalized temperature scaling mechanism. During training, the model maximizes the similarity probability of positive sample pairs while minimizing the similarity probability of negative sample pairs. The introduction of the temperature coefficient τ enables the model to adaptively adjust the learning weights of samples of different difficulty levels, especially enhancing the ability to distinguish difficult negative samples. When the similarity s+ of the positive sample pair is low or the similarity s- of the negative sample pair is high, the loss function produces a larger gradient, forcing the encoder network to adjust the parameters to enhance the feature consistency between the modalities. This solves the problem of difficult spatial alignment of different modal features in multimodal contrastive learning, enabling the model to more accurately capture the coupling characteristics of the leakage state in multimodal data.
[0109] As a preferred embodiment, the solution of this application is specifically implemented as follows:
[0110] Contrastive loss function:
[0111] .
[0112] in, Indicates the loss value of the positive sample pair formed by the anchor point and the positive sample. Indicates the semantic similarity between the anchor point and the positive sample. Indicates the semantic similarity between the anchor point and the negative sample, represents the negative sample pool, Represents the temperature coefficient.
[0113] Specifically, the sim function uses cosine similarity to calculate semantic similarity. The temperature coefficient τ adjusts the discrimination between positive and negative sample pairs and is typically set to 0.07. The negative sample pool N contains all samples in the current batch except the positive samples. The exp function maps similarity to a probability space. By minimizing this loss function, the model learns a common semantic representation for data from different modalities.
[0114] Furthermore, during training, the weighted average of the losses for all positive sample pairs in each batch is used to obtain the overall loss. Automatic differentiation is then used to calculate the gradients, and the Adam optimizer is used to update the parameters of the encoders for each modality. Through multiple rounds of iterative training, an encoder model is ultimately obtained that can extract common semantic features from multimodal data.
[0115] Through the above technical solution, this application can effectively learn the semantic associations of multimodal data and improve the model's ability to integrate information from different modalities. This improves the detection accuracy of the filling and sealing status of sesame products and reduces the probability of false positives and missed positives. At the same time, this method does not require a large amount of labeled data and can make full use of unlabeled samples for self-supervised learning, with strong generalization capabilities. In addition, through comparative learning, the model can learn more robust feature representations, enhancing the system's resistance to various interference factors.
[0116] In some of the above-mentioned schemes of this application, when constructing a leakage detection modal contrast learning model, features of different modalities are extracted through multiple encoders and a contrast loss function is constructed. However, during the model training process, the difference in loss values of different modal combinations may cause the model optimization to be biased towards a specific modality, affecting the balance of multimodal feature fusion.
[0117] This application further proposes that the total loss value is obtained by weighted averaging the loss values of all positive sample pairs. The specific calculation formula is: the total loss value is equal to one-third of the number of training samples multiplied by the sum of the gas and infrared mode pair losses, gas and pressure mode pair losses, and infrared and pressure mode pair losses of all bottles, where the loss value of each mode pair is calculated by using the cosine similarity function to calculate the semantic similarity and the contrast loss function is defined in combination with the normalized temperature-scaled cross entropy.
[0118] The total loss is calculated based on the sum of the three modal pair losses for each bottle. Each modal pair loss represents the comparative loss contribution of different modal combinations. The gas-infrared modal pair loss reflects the correlation between odor and infrared features, the gas-pressure modal pair loss reflects the correlation between odor and pressure features, and the infrared-pressure modal pair loss reflects the correlation between infrared and pressure features. By averaging the loss values of the three modal pairs, we ensure that different modal combinations have balanced optimization weights during model training, preventing a single modal pair loss from dominating model parameter updates.
[0119] Specifically, during training, the gas, infrared, and pressure data for each bottle are fed into corresponding encoders to generate embedding vectors. Positive pairs are constructed based on different modal combinations of the same bottle, while negative pairs are constructed based on combinations of different bottles or different sealing states. For each positive pair, its semantic similarity with all negative pairs in the negative pool is calculated, and a contrastive loss is calculated based on normalized temperature-scaled cross-entropy. The losses for each of the three modal pairs are summed and divided by the number of samples, and the total loss is averaged. This calculation method simultaneously optimizes feature alignment between different modalities during backpropagation, enhancing the robustness of multimodal feature fusion and improving leak detection accuracy. For example, when a training batch contains 100 samples, the total loss is equal to the sum of the losses for the gas-infrared, gas-pressure, and infrared-pressure modal pairs for all samples, divided by 100, and then divided by 3. This balanced loss calculation mechanism effectively prevents the model from over-reliance on any one modality during training, ensuring that the synergistic effects of multimodal data are fully learned.
[0120] As a preferred embodiment, the solution of this application is specifically implemented as follows:
[0121] When the acquisition unit builds a leak detection modal contrast learning model, the total loss value is calculated as follows:
[0122] .
[0123] Where N represents the number of training samples, Indicates the gas code output of the i-th bottle. Indicates the infrared coding output of the i-th bottle. Indicates the pressure coding output of the i-th bottle. Represents the overall loss after averaging all positive sample pairs in the current batch, Represents the loss value of the i-th odor modality and the i-th infrared modality pair. Represents the loss value of the pair of the i-th odor mode and the i-th pressure mode. Represents the loss value of the i-th infrared mode and i-th pressure mode pair.
[0124] Furthermore, in practical applications, the total loss value can be calculated by the following steps:
[0125] Initialize the total loss value L to 0.
[0126] Traverse each sample i in the training sample set.
[0127] For each sample i, the loss value of the odor modality and infrared modality pair, the loss value of the odor modality and pressure modality pair, and the loss value of the infrared modality and pressure modality pair are calculated.
[0128] Add the above three loss values to get the total loss of sample i.
[0129] Accumulate the total loss for sample i.
[0130] Repeat the steps until all samples are traversed.
[0131] Divide the accumulated data by the number of samples N to get the final average total loss value.
[0132] Through the above technical solution, this application achieves joint optimization of multimodal data. By considering the interrelationships between different modalities, the accuracy and robustness of the model for leak detection are improved. By calculating the average total loss value, the impact of individual outliers on model training is reduced, making the model more stable. This allows for better capture of the sealing characteristics of sesame product filling processes, improving the performance and reliability of the detection system.
[0133] In some of the above-mentioned schemes in this application, when constructing the leakage detection modal contrast learning model, the model training is only based on the initial training samples, and the historical operation data accumulated in the actual production process is not considered, resulting in the model being unable to be optimized according to the dynamic changes in actual applications, which may reduce the detection accuracy and adaptability.
[0134] This application further proposes that when the acquisition unit constructs a leak detection modal contrast learning model based on the training samples, the acquisition unit also includes: collecting system operation records. If the operation records are empty, the acquisition unit uses the constructed leak detection modal contrast learning model as the final model. If the operation records are not empty, the acquisition unit collects historical model output results and uses the verified historical model output results as a new validation set to optimize the constructed leak detection modal contrast learning model.
[0135] During the preprocessing phase, the acquisition unit first checks the existence of system operation records. If the operation records are empty, this indicates that the system is in the initial deployment phase and has not yet accumulated actual operation data. In this case, the model constructed using the initial training samples is directly used as the final detection model. If the operation records are not empty, it means that the system has been running for a period of time. The acquisition unit extracts the verified model output results from the historical records and uses them as the new validation set. Through incremental learning or fine-tuning mechanisms, the parameters of the initial model are updated to improve the model's adaptability to new data. For example, the new validation set may include samples from different batches and under varying ambient temperatures in the actual production line. Through iterative optimization, the model can learn a wider range of feature distributions.
[0136] Specifically, the acquisition unit automatically retrieves locally stored operation records when the system starts. If no historical data is found, the optimization step is skipped and the initial model is directly applied to perform the detection task. If historical data exists, the acquisition unit selects reliable detection results that have been manually verified or confirmed by subsequent processes, and reconstructs the corresponding multimodal data (volatile gas spectra, infrared image data sets, pressure data) and detection labels into a validation set. After merging this validation set with the initial training set, the encoder's network weights are adjusted through a backpropagation algorithm. For example, the weight coefficients of overfit samples in the initial training set are reduced to enhance the model's robustness to noise interference in actual working conditions. Furthermore, a dynamic learning rate strategy is adopted during the optimization process to automatically adjust the learning rate step size according to changes in the validation set loss value to avoid model oscillation. As a result, the system continuously accumulates valid data during long-term operation. Through periodic optimization, the model gradually improves the recognition accuracy of different sealing defects and adapts to the impact of production line parameter fluctuations or environmental changes.
[0137] As a preferred embodiment, the solution of this application is specifically implemented as follows:
[0138] When the acquisition unit constructs the leakage detection modal contrast learning model according to the training samples, it also includes:
[0139] The collection unit collects system operation records.
[0140] When the running record is empty, the acquisition unit uses the constructed leakage detection modal contrast learning model as the final model.
[0141] When the operation record is not empty, the acquisition unit acquires the historical model output results, and uses the verified historical model output results as a new verification set to optimize the constructed leakage detection modal contrast learning model.
[0142] Specifically, during the system's initial operation, since there is no historical operating data, the acquisition unit directly uses the constructed leak detection modal contrast learning model as the final model. As the system continues to operate, the acquisition unit continuously accumulates operating records. Once sufficient operating records have been accumulated, the acquisition unit extracts the output of the historical model and manually verifies these results. The verified results serve as a new validation dataset for further optimization and adjustment of the leak detection modal contrast learning model. For example, this new validation data can be used to fine-tune model parameters or adjust the model structure to improve its performance in real-world application scenarios.
[0143] Through the above technical solution, this application achieves continuous optimization and self-adaptation of the model. As a result, the model can continuously learn and adapt to changes in the actual production environment, improving the accuracy and robustness of detection. Furthermore, this method reduces the need for manual annotation of large amounts of data and reduces model maintenance costs. At the same time, by using actual production data for model optimization, the model is made more suitable for actual application scenarios, improving the practicality and reliability of the system.
[0144] In some of the above-mentioned schemes in this application, multimodal data is processed by constructing a leak detection modal contrast learning model. However, during the model training process, the volatile gas spectrum may have noise fluctuations due to environmental interference, the infrared image may have blurred edges due to thermal diffusion, and the pressure data may introduce high-frequency noise due to mechanical vibration. These factors lead to inaccurate feature extraction and affect the model detection accuracy.
[0145] The present application further proposes that when the processing unit pre-processes the collected data to obtain a feature matrix, the process includes: the processing unit filters and denoises each channel of the volatile gas spectrum based on a median filter, and normalizes each channel according to the maximum and minimum values, and controls the odor spectrum encoder to convert the normalized data into a 128-dimensional odor feature vector. The processing unit performs gradient enhancement on the infrared image data group based on the Laplace operator and normalizes it to a grayscale value between 0 and 1, controls the infrared image encoder to process the normalized data, and extracts a 128-dimensional image feature vector. The processing unit removes high-frequency noise from the pressure data based on sliding window averaging, calculates the pressure drop rate and the plateau slope based on the denoised pressure data, and controls the pressure curve encoder to obtain a 128-dimensional pressure feature vector. The odor feature vector, image feature vector, and pressure feature vector are spliced into a feature matrix.
[0146] The median filter uses a sliding window with a window length of 5 to eliminate impulse noise in the volatile gas spectrum by taking the median value. Maximum and minimum value normalization is used to linearly map the data of each channel to the range [-1, 1]. The Laplace operator uses a 3×3 convolution kernel for edge sharpening to enhance the outlines of temperature anomalies in infrared images. The sliding window averaging method uses a moving average with a window width of 10 to suppress mechanical vibration interference above 25 Hz in the pressure signal. The pressure drop rate is the first-order derivative of the pressure drop phase, and the plateau slope is the linear fitting coefficient of the pressure stabilization phase.
[0147] Specifically, the raw volatile gas spectrum output by the gas sensor is median filtered to eliminate outliers caused by sudden changes in ambient temperature and humidity. The differences in the ranges of different sensors are then eliminated through maximum and minimum value normalization, forming standardized odor data that is input into the encoder. The original image captured by the infrared camera is convolved with the Laplace operator to highlight the uneven areas of temperature distribution on the surface of the bottle after heating. After grayscale normalization, it is input into the image encoder to extract spatial features. The raw pressure curve collected by the pressure sensor is filtered through a sliding average filter to remove high-frequency noise. The dynamic changes in sealing performance are reflected by calculating the pressure drop rate and the slope of the plateau segment. This is input into the pressure encoder to generate a pressure feature vector. The feature vectors of the three modes are concatenated to form a 384-dimensional feature matrix, which provides high-quality, interference-resistant input data for subsequent models and improves the robustness of leak detection.
[0148] As a preferred embodiment, the solution of the present application is specifically implemented as follows: when the processing unit pre-processes the volatile gas spectrum, it uses a median filter with a window length of 5 to perform sliding filtering on the original signal collected by the gas sensor to eliminate pulse noise interference, and then linearly maps the sensor response value of each channel to the 0-1 interval to complete the normalization operation. When pre-processing the infrared thermal imaging data, a 3×3 Laplace convolution kernel is applied to calculate the edge gradient, enhance the temperature distribution difference characteristics of the bottle mouth area, and scale the pixel value to the 0-1 range. When pre-processing the pressure detection data, a moving average method with a window width of 10 is used to eliminate high-frequency disturbances, and the pressure drop change rate during the pressure test is calculated by a differential algorithm. At the same time, a linear regression model of the pressure stabilization stage is fitted to obtain the slope eigenvalue. Finally, the 128-dimensional feature vectors of the three categories of gas, infrared, and pressure are spliced by column to form a 384-dimensional feature matrix.
[0149] Through the above technical solution, the present application can effectively eliminate noise interference in sensor signals, enhance the expression of key features in different modal data, improve the robustness of the sealing state discrimination model through multi-dimensional feature fusion, solve the misjudgment problem caused by poor data quality in traditional single detection methods, and realize the accurate identification of filling and sealing defects of sesame products.
[0150] In some of the above-mentioned schemes in this application, the processing unit did not design a differentiated preprocessing method for the characteristics of multimodal data when constructing the feature matrix, resulting in gas spectrum noise interference affecting the feature extraction accuracy, infrared image edge blurring reducing the ability to identify heat conduction anomalies, and high-frequency fluctuations in pressure data affecting the accuracy of pressure drop rate calculation.
[0151] The present application further proposes that when the processing unit pre-processes the collected data to obtain a feature matrix, it includes: filtering and denoising each channel of the volatile gas spectrum based on a median filter, and normalizing each channel according to the maximum and minimum values, and controlling the odor spectrum encoder to convert the normalized data into a 128-dimensional odor feature vector. Based on the Laplace operator, the infrared image data group is gradient enhanced and normalized to a grayscale value between 0 and 1, and the infrared image encoder is controlled to process the normalized data to extract a 128-dimensional image feature vector. Based on the sliding window average, the high-frequency noise of the pressure data is removed, and the pressure drop rate and the slope of the plateau are calculated based on the denoised pressure data, and the pressure curve encoder is controlled to obtain a 128-dimensional pressure feature vector. The odor feature vector, image feature vector and pressure feature vector are spliced into a feature matrix.
[0152] The median filter uses a sliding window with a window length of 5 to filter the gas spectrum, eliminating the interference of impulse noise on subsequent normalization. The Laplace operator uses a 3×3 convolution kernel to enhance the edge information of the infrared image and improve the visualization of temperature gradient changes. The sliding window is set to an average window length of 10 sampling points to suppress high-frequency noise from the pressure sensor. The pressure drop rate is obtained by linearly fitting the first 0.5 seconds of the pressure curve data, and the plateau slope is the average rate of change of the data after the pressure stabilization period.
[0153] Specifically, the volatile gas spectra collected by the gas sensor are susceptible to electromagnetic interference during transmission, generating abnormal spikes. Median filtering is used to retain valid signal trends while eliminating outliers. Maximum and minimum value normalization maps the data from each sensor channel to the 0-1 range, eliminating the impact of dimensional differences on encoder training. The infrared thermal imaging component is affected by ambient thermal radiation, resulting in a decrease in image contrast. The Laplace operator is used to enhance the temperature difference boundary between the bottle surface and the background, and normalization enhances the recognition of subtle thermal conduction anomalies. The pressure detection component generates mechanical vibration noise during pressurization. After sliding window averaging and smoothing the data curve, the pressure drop rate reflects the velocity characteristics of gas escape during seal failure, and the slope of the plateau segment characterizes the residual elastic deformation characteristics of the seal structure. The 384-dimensional feature matrix formed by concatenating the three modal eigenvectors in a 128-dimensional space can simultaneously characterize the synergistic interaction patterns of gas escape, thermal conduction anomalies, and mechanical seal failure, enabling the comparative learning model to establish a multi-physics field coupled basis for leak determination.
[0154] As a preferred embodiment, the solution of the present application is specifically implemented as follows: the detection unit receives a feature matrix formed by splicing the odor feature vector, the image feature vector and the pressure feature vector, and inputs the feature matrix into a pre-trained leak detection modal contrast learning model. The model calculates the similarity score between the feature matrix and the well-sealed sample, sets the first similarity threshold to 0.35, and the second similarity threshold to 0.8. When the similarity score is ≤0.35, a high-risk leakage signal is generated and the red alarm light and buzzer are triggered. When 0.35<similarity score ≤0.8, a yellow warning signal is generated and pushed to the re-inspection queue of the quality inspection platform. When the similarity score is >0.8, a green qualified signal is output and entry into the next process is allowed. The system cross-validates the judgment results with the pressure test curve and infrared image in real time. If the pressure curve is abnormal and the similarity score is within the threshold range, the detection priority of the sample is automatically increased.
[0155] Through the above technical solution, this application effectively solves the problem of misjudgment caused by the insufficient utilization of multimodal data correlation in traditional seal detection methods. Through a comparative learning model, a quantitative mapping relationship is established between the joint representation of odor, infrared, and pressure characteristics and the sealing status, and a dual threshold mechanism is used to achieve gradient identification of leakage risks. While maintaining the reliability of physical detection during pressure testing, this solution integrates material volatility and thermal conductivity data to significantly improve the sensitivity of identifying complex failure modes such as slow leakage and intermittent leakage. At the same time, a cross-validation mechanism is used to avoid false operation caused by single sensor anomalies, ensuring the continuity and stability of production line detection.
[0156] Through the above technical solutions, this application effectively overcomes the limitations of traditional single detection modes under complex working conditions. By integrating multi-dimensional information from volatile substance analysis, thermal conductivity characteristics detection, and mechanical sealing tests, it improves the sensitivity of identifying tiny leakage defects during the filling process of sesame products. The contrastive learning model effectively suppresses interference factors such as liquid flow noise and ambient temperature fluctuations through a cross-modal semantic alignment mechanism, reducing the probability of misjudgment. The multi-level early warning strategy can implement differentiated processing based on the level of leakage risk, optimizing production line sorting efficiency while ensuring detection accuracy.
[0157] In the above embodiment, by constructing a multimodal sensing and discrimination system for the filling and sealing detection of sesame products, a breakthrough is made in the existing single-modal detection means, which is easily affected by the state of the contents, thermal disturbances and mechanical structure limitations, leading to missed detection and misjudgment. A gas sensor group is arranged at the can outlet, and the release of volatile components is stimulated by the heating component. In combination with the infrared thermal imaging component, the thermal distribution anomaly caused by tiny leaks after heating is captured, and the dynamic sealing response data provided by the pressure detection component is simultaneously collected to form three types of heterogeneous modal inputs: odor spectrum, thermal image and pressure curve. The acquisition unit is used to establish a training data set based on known samples, the processing unit performs deep feature extraction and semantic alignment through the modal contrast learning model, the detection unit realizes cross-modal reasoning and discrimination, and the early warning unit realizes multi-level leakage alarm and anomaly tracking based on the model results, thereby improving the ability to identify tiny and hidden leaks and enhancing the robustness and accuracy of the system.
[0158] In another preferred embodiment based on the above embodiment, refer to Figure 2 As shown, this embodiment provides a sesame product filling detection method, which is applied to the above-mentioned sesame product filling detection system, including:
[0159] S100: Collecting volatile gas spectra of the object to be detected using a gas sensor, collecting infrared image data of several heated objects to be detected using an infrared thermal imaging component, constructing an infrared image data set, and collecting pressure data of a sealing pressure test using a pressure sensor.
[0160] S200: Collect known state samples, establish training samples based on the known state samples, and build a leakage detection modal comparison learning model based on the training samples.
[0161] S300: Processing the volatile gas spectrum, infrared image data set, and pressure data based on the leak detection modal contrast learning model to obtain a feature matrix.
[0162] S400: Processing the feature matrix according to the leakage detection modal contrast learning model to obtain a model output result.
[0163] S500: Issue an early warning based on the model output results.
[0164] It is understandable that by constructing a multimodal perception and discrimination system for the filling and sealing of sesame products, a breakthrough has been made in the existing single-modal detection method, which is susceptible to missed detection and misjudgment due to the state of the contents, thermal disturbances, and mechanical structure limitations. A gas sensor group is placed at the can outlet, and the release of volatile components is stimulated by the supplementary heating component. Infrared thermal imaging components are used to capture thermal distribution anomalies caused by tiny leaks after heating, and dynamic sealing response data provided by the pressure detection component are simultaneously collected to form three types of heterogeneous modal inputs: odor spectra, thermal images, and pressure curves. The acquisition unit is used to establish a training data set based on known samples. The processing unit uses a modal contrast learning model to perform deep feature extraction and semantic alignment. The detection unit implements cross-modal reasoning and discrimination. The early warning unit implements multi-level leak alarms and anomaly tracking based on the model results, thereby improving the ability to identify tiny and hidden leaks and enhancing the robustness and accuracy of the system.
[0165] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0166] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0167] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0168] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0169] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered by the scope of protection of the claims of the present invention.
Claims
1. A sesame product filling detection system, characterized in that: include: A gas sensor group is provided at the outlet of the canning device. The gas sensor group includes a plurality of odor sensors evenly distributed on both sides of the conveyor belt. The gas sensor group is used to collect volatile gas spectra of the object to be detected; A heating component is provided between the gas sensor group and the canning device, and is used to heat the object to be detected; An infrared thermal imaging component, comprising a plurality of infrared cameras, wherein the infrared thermal imaging component is used to collect infrared image data of a plurality of heated objects to be detected and construct an infrared image data set; A pressure detection component, used to perform a sealing pressure test on the object to be detected, the pressure detection component also includes a pressure sensor, and the pressure sensor is used to collect pressure data of the sealing pressure test; Control module, including acquisition unit, processing unit, detection unit and early warning unit; The acquisition unit is configured to acquire known state samples, establish training samples based on the known state samples, and construct a leakage detection modal contrast learning model based on the training samples; The processing unit processes the volatile gas spectrogram, the infrared image data set, and the pressure data based on the leak detection modal contrast learning model to obtain a feature matrix; The detection unit is configured to process the feature matrix according to the leakage detection modal contrast learning model to obtain a model output result; The early warning unit is configured to issue an early warning according to the model output result.
2. The sesame product filling detection system according to claim 1, characterized in that: include: The heat supplement component includes a far-infrared heating device or a hot air blowing device; The odor sensor includes a metal oxide-based gas sensor, and the gas sensor group includes 8 odor sensors, each of which samples for 3 seconds, and samples 10 times per second; The infrared camera in the infrared thermal imaging assembly is triggered 1 second after the heating is completed, and the image pixel size is 120×120 pixels; The pressure sensor in the pressure detection assembly has a sampling time of 2 seconds and a sampling frequency of 50 Hz.
3. The sesame product filling detection system according to claim 1, characterized in that: The positive pressure value of the pressure detection component in performing a sealing pressure test on the object to be detected is 0.1-0.3 bar, and the sampling frequency of the pressure sensor is higher than 20 Hz.
4. The sesame product filling detection system according to claim 1, characterized in that: When the acquisition unit constructs the leakage detection modal contrast learning model, it includes: The leak detection modality contrast learning model includes an odor spectrum encoder, an infrared image encoder, and a pressure curve encoder, each of which outputs a 128-dimensional embedding vector; The processing unit collects the training samples, inputs the three types of modal data of each training sample into an encoder to obtain an embedding vector, and constructs a positive sample pair and a negative sample pair based on the embedding vector; the positive sample is a combination of data from the same bottle body and different modalities; the negative sample is a combination of data from different bottles or different sealing states; The processing unit calculates the semantic similarity between the positive sample pair and the negative sample pair based on a cosine similarity function, and defines a contrast loss function based on normalized temperature scaled cross entropy; Take the weighted average of the loss functions of all positive sample pairs in each training batch to obtain the total loss value; An automatic differentiation mechanism is used to calculate the gradient of the total loss value with respect to the encoder network parameters, and an Adam optimizer is used to iteratively optimize the convolutional layers, fully connected layers, or recursive structures in each modality encoder.
5. The sesame product filling detection system according to claim 4, characterized in that: When the acquisition unit constructs the leakage detection modal contrast learning model, it also includes: The contrast loss function: ; in, Indicates the loss value of the positive sample pair formed by the anchor point and the positive sample; Indicates the semantic similarity between the anchor point and the positive sample; Indicates the semantic similarity between the anchor point and the negative sample, represents the negative sample pool, Represents the temperature coefficient.
6. The sesame product filling detection system according to claim 5, characterized in that: When the acquisition unit constructs the leakage detection modal contrast learning model, it also includes: The total loss value: ; Where N represents the number of training samples, Indicates the gas code output of the i-th bottle; Indicates the infrared coding output of the i-th bottle; Indicates the pressure coding output of the i-th bottle; Represents the overall loss after averaging all positive sample pairs in the current batch, represents the loss value of the i-th odor modality and the i-th infrared modality pair; represents the loss value of the pair of the i-th odor mode and the i-th pressure mode; Represents the loss value of the i-th infrared mode and i-th pressure mode pair.
7. The sesame product filling detection system according to claim 6, characterized in that: When the acquisition unit constructs the leakage detection modal contrast learning model according to the training samples, it also includes: The collection unit collects system operation records; When the operation record is empty, the acquisition unit uses the constructed leakage detection modal contrast learning model as the final model; When the operation record is not empty, the acquisition unit acquires the historical model output results, and uses the verified historical model output results as a new verification set to optimize the constructed leakage detection modal contrast learning model.
8. The sesame product filling detection system according to claim 7, characterized in that: When the processing unit preprocesses the collected data to obtain a feature matrix, it includes: The processing unit performs filtering and denoising on each channel of the volatile gas spectrogram based on a median filter, normalizes each channel according to maximum and minimum values, and controls the odor spectrogram encoder to convert the normalized data into a 128-dimensional odor feature vector; The processing unit performs gradient enhancement on the infrared image data set based on the Laplace operator, normalizes the data to a grayscale value between 0 and 1, and controls the infrared image encoder to process the normalized data to extract a 128-dimensional image feature vector; The processing unit removes high-frequency noise from the pressure data based on a sliding window average, calculates a pressure drop rate and a plateau slope based on the denoised pressure data, and controls a pressure curve encoder to obtain a 128-dimensional pressure feature vector; The odor feature vector, the image feature vector, and the pressure feature vector are concatenated into the feature matrix.
9. The sesame product filling detection system according to claim 8, characterized in that: The detection unit processes the feature matrix according to the leakage detection modal contrast learning model to obtain a model output result, including: The detection unit obtains a similarity score between the feature matrix and the sealing state according to the leakage detection modal contrast learning model, compares the similarity score with a first similarity threshold and a second similarity threshold, and obtains the model output result according to the comparison results; the first similarity threshold is less than the second similarity threshold; When the similarity score is less than or equal to the first similarity threshold, the detection unit determines that the object to be detected is a high-risk leak; when the similarity score is greater than the first similarity threshold and less than or equal to the second similarity threshold, the detection unit determines that the object to be detected is a suspected leak; when the similarity score is greater than the second similarity threshold, the detection unit determines that the object to be detected is well sealed.
10. A sesame product filling detection method, applied to the sesame product filling detection system according to any one of claims 1 to 9, characterized in that: include: The gas sensor group collects a volatile gas spectrum of the object to be detected, the infrared thermal imaging component collects a plurality of infrared image data of the object to be detected after heating, and constructs an infrared image data group, and the pressure sensor collects pressure data of the sealing pressure test; Collecting known state samples, establishing training samples based on the known state samples, and constructing a leakage detection modal contrast learning model based on the training samples; Processing the volatile gas spectrogram, the infrared image data set, and the pressure data based on the leak detection modal contrast learning model to obtain a feature matrix; Processing the feature matrix according to the leakage detection modal contrast learning model to obtain a model output result; An early warning is issued based on the output results of the model.
Citation Information
Patent Citations
Air tightness automatic detection device for canned food packaging
CN118758528A
Pressure vessel gas leakage acoustic identification method capable of automatically extracting features
CN115034271A
Oil and gas field station explosion-proof robot intelligent inspection system and inspection target identification method
CN117444992A