Sesame product filling detection method and system

Through the multimodal synergy of gas sensors, infrared thermal imaging and pressure detection components, combined with the heat supplement component and the mode comparison learning model of leakage detection, the problem of low detection accuracy in sesame product filling inspection is solved, and efficient identification and accurate judgment of micro leakage is achieved.

CN120253069AActive Publication Date: 2025-07-04RUIFU SESAME OIL
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202510756371.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-09
Publication Date
2025-07-04
Estimated Expiration
2045-06-09

AI Technical Summary

Technical Problem

The existing sesame product filling detection methods have problems such as low detection accuracy and poor results reliability, especially when facing complex leakage characteristics, it is difficult to accurately identify small leakage.

Method used

The gas sensor group, infrared thermal imaging component and pressure detection component work together, combined with the heat supplement component to stimulate the release of inducible gases, and feature extraction and judgment are performed through multimodal data fusion and leakage detection mode comparison learning model to achieve cross-modal inference judgment.

Benefits of technology

It improves the ability to identify small leaks, enhances the robustness and accuracy of the system, reduces the probability of missed and false detection, and improves the accuracy and reliability of detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120253069A_ABST
    Figure CN120253069A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of sealing detection, and discloses a sesame product filling detection method and system, and the system comprises a gas sensor group which is used for collecting a volatile gas spectrogram of a to-be-detected object; the heat compensation assembly is used for heating the to-be-detected object; the infrared thermal imaging assembly is used for constructing an infrared image data set; the pressure detection assembly is used for collecting pressure data; the control module comprises an acquisition unit, a processing unit, a detection unit and an early warning unit; the acquisition unit acquires a known state sample, establishes a training sample and constructs a leakage detection mode contrast learning model; the processing unit obtains a feature matrix; the detection unit processes the feature matrix according to a leakage detection modal contrast learning model to obtain a model output result; and the early warning unit performs early warning according to the model output result. According to the invention, multi-level leakage alarm and abnormity tracking are realized, the identification capability of tiny and hidden leakage is improved, and the robustness and precision of the system are enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of sealing detection, and specifically, to a filling detection method and system for sesame products. Background Art

[0002] With the improvement of the automation and intelligent level of the food industry, bottled sesame products (such as sesame paste, sesame flavor oil, etc.), as an integral part of the condiment industry, exhibit production characteristics of large filling volume, frequent batches, and sensitive quality. In order to ensure that the finished products do not leak, oxidize or become contaminated during circulation and storage, the sealing quality detection during the filling process has become a key link to ensure product safety and extend the shelf life.

[0003] In the current industry, the following several methods are mainly adopted for the filling and sealing detection of sesame products: One is the manual sampling inspection method, which visually observes the sealing state of the bottle mouth or weighs to detect leakage, but this method has low efficiency, strong subjectivity, and is difficult to identify subtle leaks; the second is physical sensing detection, such as using laser interference to measure the deformation of the bottle mouth, but such methods have interference problems such as uneven contents, bubble shielding, and thermal expansion and contraction for liquid sesame products, and the false alarm rate is relatively high; the third is like the invention patent CN118758528A, an airtightness automatic detection device for canned food packaging, which realizes the production line sealing pressure test through the structure, but in this scheme, when the pressure is small, the change of the second piston is not obvious, and when the pressure is large, the secondary deformation of the object to be detected is likely to occur, and false alarms and missed alarms are likely to occur.

[0004] Therefore, there is an urgent need for a filling detection method and system for sesame products to improve the detection accuracy and anti-interference ability. Summary of the Invention

[0005] In view of this, the present invention proposes a filling detection method and system for sesame products, aiming to solve the problems of low detection accuracy and poor reliability of detection results existing in the current filling and sealing detection of sesame products.

[0006] On the one hand, the present invention proposes a filling detection system for sesame products, including: A gas sensor group, arranged on one side of the outlet of the canning device, the gas sensor group includes a plurality of odor sensors, the odor sensors are evenly distributed on both sides of the conveyor belt, and the gas sensor group is used to collect the volatile gas spectrum of the object to be detected; A heat supplement component, arranged between the gas sensor group and the canning device, and the heat supplement component is used to heat the object to be detected; An infrared thermal imaging component, including a plurality of infrared cameras, and the infrared thermal imaging component is used to collect infrared image data of the heated object to be detected a plurality of times and construct an infrared image data group; A pressure detection component for performing a sealed pressure test on the object to be detected. The pressure detection component further includes a pressure sensor for collecting pressure data of the sealed pressure test. A control module, including a collection unit, a processing unit, a detection unit, and an early warning unit. The collection unit is configured to collect 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 leakage 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 give an early warning according to the model output result.

[0007] Furthermore, it includes: The heat supplement component includes a far-infrared heating device or a hot air blowing device. The odor sensor includes a gas-sensitive device based on metal oxide, and the gas sensor group includes 8 such odor sensors. Each odor sensor samples for 3 seconds, with 10 samples per second. The infrared camera in the infrared thermal imaging component takes the trigger point 1 second after the heat supplement ends, and the image pixels are 120×120 pixels. The sampling time of the pressure sensor in the pressure detection component is 2 seconds, and the sampling frequency is 50Hz.

[0008] Furthermore, the positive pressure value for the pressure detection component to perform a sealed 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 20Hz.

[0009] Furthermore, when the collection unit constructs the leakage detection modal contrast learning model, it includes: The leakage detection modal contrast learning model includes an odor spectrogram encoder, an infrared image encoder, and a pressure curve encoder. Each encoder outputs an embedding vector of 128 dimensions. The processing unit collects the training samples, inputs the three types of modal data of each training sample into the encoder respectively to obtain the embedding vectors, and constructs positive sample pairs and negative sample pairs based on the embedding vectors. The positive samples are combined data from the same bottle body and different modalities. The negative samples are combined data from different bottle bodies or different sealing states. The processing unit calculates the semantic similarity between the positive sample pairs and the negative sample pairs based on the cosine similarity function, and defines the contrastive loss function based on the normalized temperature-scaled cross-entropy; The loss functions of all positive sample pairs in each training batch are weighted and 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 layers, fully connected layers or recurrent structures in each modality encoder.

[0010] Furthermore, when the acquisition unit constructs the leakage detection modality contrastive learning model, it further includes: The contrastive loss function: ; where, represents the loss value of the positive sample pair formed by the anchor and the positive sample; represents the semantic similarity between the anchor and the positive sample; represents the semantic similarity between the anchor and the negative sample, represents the negative sample pool, represents the temperature coefficient.

[0011] Furthermore, when the acquisition unit constructs the leakage detection modality contrastive learning model, it further includes: The total loss value: ; where N represents the number of training samples, represents the gas coding output of the i-th bottle body; represents the infrared coding output of the i-th bottle body; represents the pressure coding output of the i-th bottle body; represents the overall loss averaged over all positive sample pairs in the current batch, represents the loss value of the pair of the i-th odor modality and the i-th infrared modality; represents the loss value of the pair of the i-th odor modality and the i-th pressure modality; represents the loss value of the pair of the i-th infrared modality and the i-th pressure modality.

[0012] Furthermore, when the acquisition unit constructs the leakage detection modality contrastive learning model according to the training samples, it further includes: The acquisition unit collects the system operation records; When the operation record is empty, the acquisition unit takes the constructed leakage detection modality contrastive learning model as the final model; When the operation record is not empty, the acquisition unit acquires the output results of the historical model, and uses the verified output results of the historical model as a new verification set to optimize the constructed leakage detection modality contrastive learning model.

[0013] Further, when the processing unit preprocesses the acquired data to obtain a feature matrix, it includes: The processing unit filters and denoises each channel of the volatile gas spectrogram based on a median filter, and normalizes each channel by maximum-minimum normalization, and controls the odor spectrogram encoder to convert the normalized data into a 128-dimensional odor feature vector; The processing unit enhances the gradient of the infrared image data group based on the Laplace operator, and normalizes it to a gray value between 0 and 1, and controls the infrared image encoder to process the normalized data and extract a 128-dimensional image feature vector; The processing unit removes the high-frequency noise of the pressure data based on a sliding window average, calculates the pressure drop rate and the slope of the steady section according to the denoised pressure data, and controls the 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.

[0014] Further, when the detection unit processes the feature matrix according to the leakage detection modality contrastive learning model to obtain a model output result, it includes: The detection unit obtains the similarity score between the feature matrix and the sealed state according to the leakage detection modality contrastive 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; When the similarity score is less than or equal to the first similarity threshold, the detection unit determines that the object to be detected has a high-risk leakage; 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 leakage; when the similarity score is greater than the second similarity threshold, the detection unit determines that the object to be detected is in good seal.

[0015] Compared with the prior art, the beneficial effects of the present invention are as follows: By constructing a multi-modal perception and discrimination sesame product filling and sealing detection system, the problems of missed detection and misjudgment caused by the limitations of existing single-modal detection means being vulnerable to the state of the content, thermal disturbance, and mechanical structure are overcome. A gas sensor group is arranged at the canning outlet. By means of a heat supplement component, the release of volatile components is stimulated. Combined with an infrared thermal imaging component, the abnormal thermal distribution generated by minute leaks after heating is captured, and the dynamic seal response data provided by a pressure detection component is synchronously collected to form three types of heterogeneous modal inputs: an odor spectrogram, a thermal image, and a 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 a modal contrast learning model. The detection unit realizes cross-modal reasoning and discrimination. The warning unit realizes multi-level leakage warning and anomaly tracking based on the model results, thereby improving the recognition ability of minute and hidden leaks and enhancing the robustness and accuracy of the system.

[0016] 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 and includes: Collect the volatile gas spectrogram of the object to be detected based on a gas sensor, collect the infrared image data of the object to be detected after heating by means of an infrared thermal imaging component to construct an infrared image data group, and collect the pressure data of the seal pressure test based on a pressure sensor; Collect known state samples, establish training samples according to the known state samples, and construct a leakage detection modal contrast learning model according to the training samples; Process the volatile gas spectrogram, the infrared image data group, and the pressure data based on the leakage detection modal contrast learning model to obtain a feature matrix; Process the feature matrix according to the leakage detection modal contrast learning model to obtain a model output result; Give a warning according to the model output result.

[0017] It can be understood that the above-mentioned sesame product filling detection method and system have the same beneficial effects, which will not be elaborated here. Description of the Drawings

[0018] By reading the following detailed description of the preferred embodiments, various other advantages and benefits will become clear to those of ordinary skill in the art. The drawings are only for the purpose of showing the preferred embodiments and are not considered to be a limitation of the present invention. Moreover, throughout the drawings, the same reference numerals are used to represent the same components. In the drawings: Figure 1 It is a functional block diagram of the sesame product filling detection system provided by an embodiment of the present invention; Figure 2 It is a flowchart of the sesame product filling detection method provided by an embodiment of the present invention. Detailed implementation manners

[0019] Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the 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 so that the present disclosure can be more thoroughly understood and the scope of the present disclosure can be fully conveyed to those skilled in the art. It should be noted that, without conflict, the embodiments in the present invention 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 drawings and in conjunction with the embodiments.

[0020] In traditional filling and sealing detection methods, the difficulty of multi-modal data fusion limits the detection accuracy. Manual sampling inspection methods rely on subjective judgment and cannot capture leakage characteristics in real time. Physical sensing detection is vulnerable to interference from uneven liquid contents, bubble shielding, and thermal expansion and contraction. Sealing pressure testing has insufficient sensitivity in the low-pressure range and may cause deformation of the object to be detected in the high-pressure range.

[0021] For example, in an automated production line, sesame paste filling bottles enter the sealing detection link immediately after high-temperature filling. Since sesame products contain highly oily substances, their volatile gases form a non-linear diffusion pattern during the cooling stage, and the heat conduction characteristics of the poorly sealed area are slightly different from those of the normal area. When the existing system uses a single pressure test, the pressure sensor cannot distinguish the true leakage from the pressure drop noise caused by bottle deformation in the test range below 0.1 bar. When using infrared detection, the surface temperature gradient of the unheated bottle is insufficient, and the signal-to-noise ratio of the thermal imaging data is low. The volatile gas spectra collected by gas sensors are easily interfered by fluctuations in temperature and humidity in the production line environment.

[0022] In the face of the above problems, this application finds that a single detection method is difficult to cover the complex characteristics of sesame product leakage. Traditional pressure testing has insufficient sensitivity in the low-pressure range, while high-pressure testing may cause bottle deformation. Infrared detection does not consider the problem of insufficient temperature gradient caused by the cooling of oily substances. Gas sensors are vulnerable to environmental interference. In response to this, this application proposes to synchronously capture multi-dimensional physical changes caused by leakage and improve the detection robustness through a collaborative complementary mechanism. Further, this application designs a post-heating link after filling, actively heats to strengthen the heat conduction difference between the leakage area and the non-leakage area, and synchronously collects the infrared images and volatile gas spectra after heating. The temperature field change is used to accelerate gas diffusion and enhance the signal-to-noise ratio of the sensing signal. At the same time, cross-modal correlation is performed on the pressure test data and the thermal and gas modal data to construct a detection model that can capture the coupling characteristics of time series and space, thereby breaking through the perception limitations of a single modality.

[0023] In some embodiments of this application, refer to Figure 1As shown in the figure, the present application proposes a filling detection system for sesame products, including: a gas sensor group, which is arranged on one side of the outlet of the filling device. The gas sensor group includes several odor sensors, and the odor sensors are evenly distributed on both sides of the conveyor belt. The gas sensor group is used to collect the volatile gas spectrum of the object to be detected. A heat supplement component, which is arranged between the gas sensor group and the canning device, and the heat supplement component is used to heat the object to be detected. An infrared thermal imaging component, which includes several infrared cameras, and the infrared thermal imaging component is used to collect the infrared image data of several objects to be detected after heating and construct an infrared image data group. A pressure detection component, which is 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 the pressure data of the sealing pressure test. A control module, which includes a collection unit, a processing unit, a detection unit and a warning unit. The collection unit is configured to collect known state samples, establish training samples according to the known state samples, and construct a leakage detection mode contrast learning model according to the training samples. The processing unit processes the volatile gas spectrum, the infrared image data group and the pressure data based on the leakage detection mode contrast learning model to obtain a feature matrix. The detection unit is configured to process the feature matrix according to the leakage detection mode contrast learning model to obtain a model output result. The warning unit is configured to give a warning according to the model output result.

[0024] Specifically, the gas sensor group refers to a set of sensors used to detect the volatile gases released by the object to be detected. Specifically, a metal oxide gas sensor array can be used to achieve this. By capturing changes in gas composition with multiple sensors distributed at different positions, it solves the problem of volatile substance dispersion caused by subtle leaks that cannot be identified by traditional manual spot checks. Among them, the heat supplement component refers to a device that applies an external heat source to the object to be detected. Specifically, a far-infrared heater or a hot air circulation device can be used to achieve this. By moderately heating to accelerate the release of volatile gases, it enhances the detection sensitivity of the gas sensor group and solves the problem of weak detection signals caused by slow gas diffusion in low-temperature environments. Among them, the infrared thermal imaging component refers to a device that generates a temperature distribution image using infrared radiation. Specifically, an array of multiple high-resolution infrared cameras can be used to achieve this. By collecting changes in the temperature field on the surface of the bottle after heating, it identifies abnormal heat conduction areas caused by leaks and solves the problem of false judgments caused by interference from the contents in physical pressure tests. Among them, the pressure detection component refers to a device that applies pressure and monitors pressure changes. Specifically, a pressure sensor and a sealed cavity can be used in combination to achieve this. By performing a positive pressure test to evaluate the sealing strength of the bottle, it solves the problem that relying solely on visual or weight detection cannot quantify the sealing performance. Among them, the leakage detection modality contrast learning model refers to a machine learning model that fuses multi-modal data. Specifically, an encoder can be used to extract the feature vectors of gas, infrared, and pressure data and optimize the model parameters through contrast loss to achieve this. By cross-modal data association, it improves the robustness of leakage detection and solves the problem that single detection methods are vulnerable to environmental noise interference. Among them, the feature matrix refers to a multi-dimensional data set obtained by integrating the features of different modal data. Specifically, it can be generated through vector splicing or weighted fusion. By uniformly representing multi-source information, it reduces the computational complexity of the model and solves the problem of low processing efficiency caused by data heterogeneity in traditional multi-sensor systems. Among them, the warning unit refers to a module that triggers an alarm based on the model output. Specifically, an audible and visual alarm or a production line emergency stop device can be used to achieve this. By a hierarchical response mechanism to match different leakage risk levels, it solves the problem of excessive shutdowns caused by the inability of existing systems to distinguish between minor leaks and serious defects.

[0025] It can be understood that through the combined application of gas volatilization analysis, thermal imaging monitoring, and pressure testing, and by using a contrast learning model to achieve cross-modal feature alignment, it effectively overcomes the limitations of single detection methods in the sesame product filling scenario and improves the accuracy of micro-leakage identification and anti-interference ability.

[0026] The working process and principle of this application are as follows. The sesame product filling detection system includes a gas sensor group, a heat supplement component, an infrared thermal imaging component, a pressure detection component, and a control module. The gas sensor group is arranged on one side of the outlet of the tank device and consists of several odor sensors evenly distributed on both sides of the conveyor belt, which is used to collect the volatile gas spectrum of the object to be detected. The heat supplement component is arranged between the gas sensor group and the tank device to heat the object to be detected. The infrared thermal imaging component includes several infrared cameras. The infrared thermal imaging component can be arranged after the gas sensor group to collect the infrared image data of the object to be detected after heating and construct an infrared image data group. The pressure detection component conducts a sealed pressure test on the object to be detected, and the pressure sensor collects the pressure data of the sealed pressure test.

[0027] The control module includes a collection unit, a processing unit, a detection unit, and an early warning unit. The collection unit collects known state samples, establishes training samples, and constructs a leakage detection modal contrast learning model. The processing unit processes the volatile gas spectrum, infrared image data group, and pressure data based on this model to obtain a feature matrix. The detection unit processes the feature matrix according to the model to obtain the model output result. The early warning unit issues an early warning according to the model output result.

[0028] The system captures multi-dimensional physical changes caused by leakage through multi-modal data fusion. The heat supplement link strengthens the heat conduction difference between the leakage area and the non-leakage area. The synchronously collected infrared images and volatile gas spectra use the temperature field change to accelerate gas diffusion and enhance the signal-to-noise ratio of the sensing signal. The pressure test data is cross-modally correlated with the heat and gas modal data to construct a detection model that can capture the temporal and spatial coupling characteristics, breaking through the perception limitations of a single modality.

[0029] As a preferred embodiment, the solution of this application is specifically implemented as follows: The gas sensor group consists of 8 odor sensors, which are evenly distributed on both sides of the conveyor belt. Each odor sensor samples for 3 seconds, and samples 10 times per second. The heat supplement component uses a far-infrared heating device to heat the object to be detected. The infrared thermal imaging component includes 4 infrared cameras. Taking 1 second after the heat supplement ends as the trigger point, it collects infrared images of 120×120 pixels. The pressure detection component conducts a sealed pressure test on the object to be detected. The positive pressure value is 0.2 bar, the sampling time of the pressure sensor is 2 seconds, and the sampling frequency is 50 Hz.

[0030] In the control module, the acquisition unit first acquires 100 known state samples, including three states: normal sealing, minor leakage, and severe leakage. Minor leakage and severe leakage can be determined according to the size of the leakage gap at the bottle mouth. Based on these samples, a training sample set is established for constructing a leakage detection modality contrast learning model. The model includes an odor spectrogram encoder, an infrared image encoder, and a pressure curve encoder, and each encoder outputs an embedding vector of 128 dimensions.

[0031] The processing unit preprocesses the acquired data. Median filtering denoising and normalization are performed on each channel of the volatile gas spectrogram. Laplace operator gradient enhancement and gray value normalization are performed on the infrared image data group. Sliding window averaging denoising is performed on the pressure data, and the pressure drop rate and the slope of the stable section are calculated. Then, the preprocessed data is input into the corresponding encoder to obtain feature vectors, which are concatenated to form a feature matrix.

[0032] The detection unit uses the leakage detection modality contrast learning model to process the feature matrix and calculates the similarity score with the sealing state. The first similarity threshold is set to 0.3, and the second threshold is set to 0.7. When the similarity score ≤ 0.3, it is determined as high-risk leakage. When 0.3 < similarity score ≤ 0.7, it is determined as suspected leakage. When the similarity score > 0.7, it is determined as good sealing.

[0033] The warning unit issues a warning according to the detection result. For high-risk leakage, an audible and visual alarm is triggered and the production line is stopped. For suspected leakage, the item to be detected is marked for manual re-inspection. For good sealing, the product is allowed to pass.

[0034] Through the above solution, the present application realizes the accurate detection of the filling and sealing quality of sesame products. Multi-modal data fusion overcomes the limitations of single detection means and improves the accuracy and reliability of detection. The heat supplement link strengthens the leakage characteristics and enhances the signal-to-noise ratio of the sensing signal. The leakage detection modality contrast learning model effectively captures the temporal and spatial coupling characteristics and improves the generalization ability of the model. The system can timely detect minor leakage, prevent unqualified products from entering the market, and reduce the risks of product oxidation and microbial contamination. At the same time, the automated detection of the system improves the production efficiency. In addition, through the collaborative analysis of multi-dimensional physical characteristics, this method effectively reduces the influence of environmental interference on the detection result and enhances the robustness of the detection.

[0035] In some of the above solutions of the present application, the synergistic effect of the heat supplement component and the gas sensor group restricts the detection accuracy. Specifically, the single heating method causes uneven heating of the item to be detected, the mismatch of the gas-sensitive device types results in weak response signals of volatile gases, the number of sensors and the sampling timing cannot cover the entire surface area of the bottle body, the deviation of the infrared image triggering timing leads to the lack of dynamic heat conduction characteristics, and the high-frequency noise interference of the pressure signal affects the accuracy of the pressure drop rate calculation.

[0036] The present application further proposes that the heat supplement component includes a far-infrared heating device or a hot air blowing device. The odor sensor includes a gas-sensitive device based on metal oxide, and the gas sensor group includes 8 odor sensors. Each odor sensor samples for 3 seconds, with 10 samples per second. The infrared camera in the infrared thermal imaging component takes the trigger point 1 second after the heat supplement ends, and the image pixels are 120×120 pixels. The sampling time of the pressure sensor in the pressure detection component is 2 seconds, and the sampling frequency is 50Hz.

[0037] Among them, the far-infrared heating device improves the surface temperature uniformity of sesame products through radiative heat transfer, and the hot air blowing device uses forced convection to shorten the heating time. The gas-sensitive device based on metal oxide has a selective adsorption characteristic for sulfur-containing volatile compounds. The 8 odor sensors are symmetrically distributed on both sides of the conveyor belt to form an annular detection array, and the 3-second sampling period covers the time window for the bottle body to pass through the detection area. The infrared camera is triggered 1 second after the heat supplement ends to capture the stable state where the heat diffuses to the bottle mouth sealing layer, and the 120×120 pixel resolution balances the image details and processing efficiency. The 50Hz sampling frequency of the pressure sensor meets the acquisition requirement of at least 100 pressure data points within the 2-second test period.

[0038] Specifically, in the heat supplement stage, the far-infrared heating device performs non-contact radiative heating on the bottle body, or the hot air blowing device is used to perform dynamic air flow heating on the bottle body conveyed at high speed. Both methods ensure that a stable thermal gradient that can be captured by the infrared camera is formed on the surface of the sesame products. The gas-sensitive device based on metal oxide converts the concentration of volatile sulfides into a change in conductivity through a surface redox reaction, and the 8 sensors are arranged in an interval annular pattern to synchronously collect the circumferential gas distribution at the bottle mouth. 10 data are collected per second within the 3-second sampling period to generate a time series of 30 data points to eliminate instantaneous interference. The infrared camera starts 1 second after the heat supplement ends. At this time, the thermal expansion of the bottle mouth sealant tends to be stable, and the 120×120 pixel image can clearly present the tiny cracks at the edge of the sealing ring. The pressure sensor continuously collects 2 seconds of pressure data at a frequency of 50Hz, and eliminates mechanical vibration noise through a moving average algorithm to accurately calculate the pressure drop rate.

[0039] As a preferred embodiment, the solution of the present application is specifically implemented as follows: The heat supplement component includes a far-infrared heating device or a hot air blowing device. The far-infrared heating device uses a carbon fiber heating tube with a power of 1000W and a wavelength range of 3-10μm. The hot air blowing device uses a turbo fan, and the adjustable range of the air volume is 0-100m³ / h, and the outlet air temperature can be controlled between 20-80°C.

[0040] The odor sensor includes a metal-oxide-based gas-sensitive device, and the gas sensor group includes 8 odor sensors. Each odor sensor samples for 3 seconds, with 10 samples 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 8 odor sensors are evenly distributed on both sides of the conveyor belt, 4 on each side, with a spacing of 10 cm.

[0041] The infrared camera in the infrared thermal imaging component takes the trigger point 1 second after the heat compensation ends, and the image pixels are 120×120 pixels. Further, 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°.

[0042] The sampling time of the pressure sensor in the pressure detection component is 2 seconds, and the sampling frequency is 50 Hz. Among them, the pressure sensor uses a piezoresistive sensor with a measurement range of 0 - 1 bar and an accuracy of ±0.1% FS.

[0043] Through the above technical solutions, this application realizes the comprehensive detection of the sealing quality during the filling process of sesame products. The heat compensation component effectively stimulates the volatile gases of the object to be detected and enhances the detection sensitivity of the odor sensor through far-infrared heating or hot air blowing. The gas sensor group uses multiple odor sensors, improving the spatial coverage rate and time resolution of sampling. The infrared thermal imaging component can capture subtle temperature changes through high-resolution image acquisition, helping to identify potential leakage points. The pressure detection component can accurately record the pressure change curve through high-frequency sampling, thereby judging the sealing performance. Thus, this solution comprehensively utilizes various detection means, improves the accuracy and reliability of detection, and effectively reduces the probability of missed detection and false detection.

[0044] In some of the above solutions of this application, there is a problem of insufficient matching between the positive pressure value setting and the sampling frequency when the pressure detection component performs the sealing pressure test. If the positive pressure value is too high, it is easy to cause secondary deformation of the object to be detected, resulting in distorted pressure data, while if the positive pressure value is too low, it is difficult to stimulate the leakage characteristics. At the same time, insufficient sampling frequency will miss the details of the dynamic pressure change and affect the accuracy of leakage judgment.

[0045] This application further proposes that the positive pressure value for the sealing pressure test of the pressure detection component is set to 0.1 - 0.3 bar, and the sampling frequency of the pressure sensor is higher than 20 Hz.

[0046] Among them, the interval range of the positive pressure value of 0.1 - 0.3 bar is determined through experimental verification. This interval can not only avoid the deformation interference caused by the compression and expansion of the content, but also effectively stimulate the gas escape from the micro-leakage points. The setting of the sampling frequency of the pressure sensor higher than 20 Hz is based on the periodic characteristics of the pressure fluctuation. When the pressure is applied, the elastic deformation of the bottle mouth sealing structure will generate a high-frequency response signal above 10 Hz, and the sampling frequency higher than 20 Hz can completely capture the steep drop characteristics in the pressure change curve.

[0047] Specifically, during the sealed pressure test, the pressure detection component applies an initial pressure of 0.1 bar to the object to be detected, and then increases it linearly to 0.3 bar. This progressive pressurization method not only avoids the plastic deformation of the bottle body caused by instantaneous high-pressure impact, but also ensures that the weak points of the seal are gradually revealed. The pressure sensor records the pressure data at a sampling frequency of 50 Hz, and its sampling interval of 20 ms is sufficient to capture the non-linear mutation points during the pressure drop process. For example, when there is a 0.1 mm gap in the bottle mouth thread, the pressure drops at a rate of 0.05 bar per second at 0.2 bar, and this change process is completely recorded by the pressure sensor. By matching the positive pressure range with the sampling frequency, it not only prevents false alarms caused by high pressure damage to the bottle body structure, but also avoids missing real leakage signals due to low-frequency sampling.

[0048] As a preferred embodiment, the solution of the present application is specifically implemented as follows: The positive pressure value for the pressure detection component to perform the sealed pressure test on the object to be detected is 0.2 bar, and the sampling frequency of the pressure sensor is 50 Hz. Specifically, after the object to be detected is transported to the pressure detection component, the pressure detection component first applies a positive pressure of 0.2 bar to the object to be detected, and then collects the pressure data of the object to be detected through the pressure sensor at a sampling frequency of 50 Hz. Thus, a high-precision pressure change curve can be obtained, which helps to accurately detect tiny leakage situations.

[0049] Through the above technical solution, the present application can obtain high-precision pressure change data without causing secondary damage to the object to be detected. Due to the adoption of a moderate positive pressure value and a high sampling frequency, tiny pressure changes can be effectively captured, thereby improving the detection sensitivity to fine leaks. At the same time, the high sampling frequency can also reduce the influence of environmental noise on the measurement results, further improving the accuracy and reliability of the detection.

[0050] In some of the above solutions of the present application, there is a problem of insufficient semantic alignment between modalities during the training process of the leakage detection modality contrastive learning model. The embedding vectors extracted by different modality encoders are difficult to effectively represent the multi-modal features of the same bottle body, resulting in limited generalization ability of the model and affecting the detection accuracy.

[0051] The present application further proposes a leakage detection modality contrastive learning model, which includes an odor spectrogram encoder, an infrared image encoder, and a pressure curve encoder. Each encoder outputs an embedding vector of 128 dimensions. The processing unit collects training samples, inputs the three types of modality data of each training sample into the encoders respectively to obtain the embedding vectors, and constructs positive sample pairs and negative sample pairs based on the embedding vectors. The positive samples are combined data from the same bottle body and different modalities. The negative samples are combined data from different bottle bodies or different sealing states. The processing unit calculates the semantic similarity of the positive sample pairs and negative sample pairs based on the cosine similarity function, and defines a contrastive loss function based on the normalized temperature-scaled cross-entropy. The loss functions of all positive sample pairs in each training batch are weighted and 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 layers, fully connected layers or recurrent structures in each modality encoder.

[0052] Among them, the odor spectrogram encoder uses a convolutional neural network to extract features from the time-series data collected by the gas sensor, the infrared image encoder extracts image spatial features through a residual network, and the pressure curve encoder uses a long short-term memory network to process the pressure time-series data. The construction of the positive sample pairs is achieved by pairwise combination of the odor-infrared, odor-pressure, and infrared-pressure modality data of the same bottle body, and the negative sample pairs are generated by randomly combining the modality data of different bottle bodies or leakage states. The temperature coefficient is set to 0.07 to adjust the steepness of the similarity distribution. The learning rate of the Adam optimizer is initialized to 3e-4, and a weight decay strategy is adopted to prevent overfitting.

[0053] Specifically, the odor spectrogram encoder inputs the 3-second × 10-sampling data collected by the gas sensor into a one-dimensional convolutional layer, and outputs a 128-dimensional vector after pooling operations. The infrared image encoder performs a convolution operation with a 3×3 convolution kernel on the 120×120 pixel infrared image, and compresses it to 128 dimensions after extracting multi-layer features through residual connections. The pressure curve encoder inputs the 2-second × 50Hz pressure data into a bidirectional long short-term memory network, and maps it to a 128-dimensional vector after extracting time-series dependence features. During the training process, the three modality embedding vectors of the same bottle body are pairwise composed into positive sample pairs, and any two modalities of different bottle bodies are composed into negative sample pairs. The similarity of the positive sample pairs is calculated to be higher than that of the negative sample pairs through the cosine similarity function, and the cross-entropy loss function is used to maximize the similarity probability distribution of the positive sample pairs. When calculating the total loss value, the loss values of the three groups of positive sample pairs of odor-infrared, odor-pressure, and infrared-pressure are averaged to ensure the semantic consistency between modalities. After the automatic differentiation mechanism calculates the gradient, the Adam optimizer updates the convolutional kernel weights and fully connected layer parameters of the encoder, so that the model can learn discriminative features in multi-modal data.

[0054] As a preferred embodiment, the solution of the present application is specifically implemented as follows: When the acquisition unit constructs the leakage detection modality contrast learning model, the leakage detection modality contrast learning model includes an odor spectrogram encoder, an infrared image encoder, and a pressure curve encoder, and each encoder outputs an embedding vector of 128 dimensions.

[0055] The processing unit collects training samples, inputs the three types of modality data of each training sample into the encoder respectively to obtain embedding vectors, and constructs positive sample pairs and negative sample pairs according to the embedding vectors. Positive samples are combined data from the same bottle body and different modalities. Negative samples are combined data from different bottle bodies or different sealing states.

[0056] The processing unit calculates the semantic similarity of the positive sample pairs and negative sample pairs based on the cosine similarity function, and defines the contrast loss function based on the normalized temperature-scaled cross-entropy.

[0057] The loss functions of all positive sample pairs in each training batch are weighted and averaged to obtain the total loss value.

[0058] 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 recurrent structures in each modality encoder.

[0059] Through the above technical solution, the present application realizes the fusion and contrast learning of multi-modal data, improves the accuracy and robustness of leakage detection. By constructing positive and negative sample pairs and calculating the semantic similarity, the model can learn the internal correlation between different modality data. The use of the contrast loss function and the automatic differentiation mechanism for optimization further enhances the representation ability and generalization of the model. This method effectively solves the problem that single-modal detection is easily interfered, and improves the system's ability to identify subtle leaks.

[0060] In some of the above solutions of the present application, the leakage detection modality contrast learning model extracts features through a multi-modal 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 contrast learning between different modalities, resulting in the model being difficult to effectively distinguish positive and negative sample pairs during training, affecting the accuracy of leakage detection.

[0061] The present application further proposes that the contrast loss function is defined by the normalized temperature-scaled cross-entropy, and the specific formula is .

[0062] Among them, represents the loss value of the positive sample pair formed by the anchor point and the positive sample. represents the semantic similarity between the anchor point and the positive sample. Indicates the semantic similarity between the anchor point and the negative sample. Indicates the negative sample pool. Indicates the temperature coefficient. Σ represents the summation over all negative samples in the negative sample pool.

[0063] Among them, the temperature coefficient τ is set as an adjustable parameter to control the sharpness of the probability distribution. When τ approaches zero, the model only focuses on the most difficult negative samples. When τ increases, the model's discrimination ability for similar samples decreases. The positive sample pair is composed of different modality data combinations of the same bottle body, and the negative sample pair comes from data combinations of different bottle bodies or different sealing states. The cosine similarity function is used to calculate the semantic correlation between the embedding vectors, and its value range is limited to the interval [-1, 1].

[0064] Specifically, this loss function converts the similarity into a probability distribution through the normalized temperature scaling mechanism. During the training process, the model maximizes the similarity probability of the positive sample pair while minimizing the similarity probability of the negative sample pair. The introduction of the temperature coefficient τ enables the model to adaptively adjust the learning weights of different difficulty samples, especially enhancing the discrimination ability for 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 generates a large gradient, forcing the encoder network to adjust the parameters to enhance the feature consistency between modalities. It solves the problem of difficult alignment of different modality feature spaces in multi-modal contrast learning, enabling the model to more accurately capture the coupling features of the leakage state in multi-modal data.

[0065] As a preferred embodiment, the solution of the present application is specifically implemented as follows: Contrast loss function: .

[0066] Among them, Indicates the loss value of the positive sample pair composed of 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, Indicates the negative sample pool, Indicates the temperature coefficient.

[0067] Specifically, the sim function uses the cosine similarity to calculate the semantic similarity. The temperature coefficient τ is used to adjust the discrimination degree between the positive and negative sample pairs, usually set to 0.07. The negative sample pool N contains all samples in the current batch except the positive samples. The exp function is used to map the similarity to the probability space. By minimizing this loss function, the model can learn the common semantic representation of different modality data.

[0068] Furthermore, during the training process, the losses of all positive sample pairs in each batch are weighted and averaged to obtain the overall loss. Then, the gradients are calculated using automatic differentiation, and the Adam optimizer is used to update the parameters of each modality encoder. Through multiple rounds of iterative training, an encoder model that can extract the common semantic features of multimodal data is finally obtained.

[0069] Through the above technical solutions, the present application can effectively learn the semantic associations of multimodal data, improve the model's ability to fuse different modality information. Thereby, the detection accuracy of the filling and sealing state of sesame products is improved, and the probabilities of false alarms and missed detections are reduced. At the same time, this method does not require a large amount of labeled data, can make full use of unlabeled samples for self-supervised learning, and has strong generalization ability. In addition, through the method of contrastive learning, the model can learn more robust feature representations, enhancing the system's resistance to various interference factors.

[0070] In some of the above solutions of the present application, when constructing the leakage detection modality contrastive learning model, different modality features are extracted by multiple encoders and a contrastive loss function is constructed. However, during the model training process, the differences in the loss values of different modality combinations may cause the model optimization to be biased towards specific modalities, affecting the balance of multimodal feature fusion.

[0071] The present 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 one over the number of training samples multiplied by the sum of the losses of the gas and infrared modality pairs, the gas and pressure modality pairs, and the infrared and pressure modality pairs for all bottles. Among them, the loss value of each modality pair is used to calculate the semantic similarity through the cosine similarity function and the contrastive loss function is defined by combining the normalized temperature scaling cross-entropy.

[0072] Among them, the calculation of the total loss value is based on the sum of the loss values of the three modality pairs for each bottle. The loss value of each modality pair represents the contrastive loss contribution of different modality combinations. The loss of the gas and infrared modality pair reflects the correlation between the odor feature and the infrared feature. The loss of the gas and pressure modality pair reflects the correlation between the odor feature and the pressure feature. The loss of the infrared and pressure modality pair reflects the correlation between the infrared feature and the pressure feature. By averaging the loss values of the three modality pairs, it is ensured that different modality combinations have balanced optimization weights during the model training process, avoiding the loss of a single modality from dominating the update of the model parameters.

[0073] Specifically, during the training process, the gas, infrared, and pressure data of each bottle are respectively input into the corresponding encoder to generate embedding vectors. Positive sample pairs are constructed based on different modal combinations of the same bottle, and negative sample pairs are constructed based on combinations of different bottles or different sealing states. For each positive sample pair, calculate its semantic similarity with all negative sample pairs in the negative sample pool, and calculate the contrast loss value based on the normalized temperature-scaled cross-entropy. The loss values of the three modalities for each bottle are added up, divided by the number of samples, and then the average value of the losses of the three modality pairs is taken as the total loss value. Through this calculation method, the model simultaneously optimizes the feature alignment between different modalities during the backpropagation process, enhances the robustness of multi-modal feature fusion, and thus improves the accuracy of leakage detection. For example, when the training batch contains 100 samples, the total loss value is equal to the sum of the losses of the gas-infrared, gas-pressure, and infrared-pressure modality pairs of all samples divided by 100 and then divided by 3. This balanced loss calculation mechanism effectively prevents the model from overly relying on a certain modality feature during training, ensuring that the synergistic effect of multi-modal data is fully learned.

[0074] As a preferred embodiment, the solution of the present application is specifically implemented as follows: When the acquisition unit constructs the leakage detection modality contrast learning model, the calculation method of the total loss value is as follows: 。

[0075] Where N represents the number of training samples, represents the gas coding output of the i-th bottle. represents the infrared coding output of the i-th bottle. represents the pressure coding output of the i-th bottle. represents the overall loss averaged over 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 i-th odor modality and the i-th pressure modality pair. represents the loss value of the i-th infrared modality and the i-th pressure modality pair.

[0076] Furthermore, in practical applications, the calculation of the total loss value can be achieved through the following steps: Initialize the total loss value L to 0.

[0077] Traverse each sample i in the training sample set.

[0078] For each sample i, calculate the loss value of the odor modality and the infrared modality pair, the loss value of the odor modality and the pressure modality pair, and the loss value of the infrared modality and the pressure modality pair.

[0079] Add up the above three loss values to obtain the total loss of sample i.

[0080] Accumulate the total loss of sample i.

[0081] Repeat the steps until all samples are traversed.

[0082] Divide the accumulated data by the number of samples N to obtain the final average total loss value.

[0083] Through the above technical solution, the present application realizes the joint optimization of multi-modal data. Considering the mutual relationship between different modalities, it improves the accuracy and robustness of the model for leakage detection. By calculating the average total loss value, the influence of individual abnormal samples on model training is reduced, making the model more stable. It can better capture the sealing state characteristics in the filling process of sesame products and improve the performance and reliability of the detection system.

[0084] In some of the above solutions of the present application, when constructing the leakage detection modality contrast learning model, only the initial training samples are used for model training, without considering the historical operation data accumulated in the actual production process, 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.

[0085] The present application further proposes that when the acquisition unit constructs the leakage detection modality contrast learning model according to the training samples, it further includes: collecting system operation records. When the operation record is empty, the acquisition unit takes the constructed leakage detection modality contrast learning model as the final model. When the operation record is not empty, the acquisition unit collects the output results of the historical model and uses the verified output results of the historical model as a new validation set to optimize the constructed leakage detection modality contrast learning model.

[0086] Among them, in the preprocessing stage, the acquisition unit first checks the existence status of the system operation record. An empty operation record indicates that the system is in the initial deployment stage and no actual operation data has been accumulated yet. At this time, the model constructed directly from the initial training samples is used as the final detection model. If the operation record is not empty, it indicates that the system has been running for some time. The acquisition unit extracts the verified model output results from the historical record and uses them as a new validation set to update the parameters of the initial model through incremental learning or fine-tuning mechanisms to improve the model's adaptability to new data. For example, the new validation set can include samples from different batches and under different ambient temperature changes in the actual production line, and the model is iteratively optimized to learn a wider feature distribution.

[0087] Specifically, when the system starts up, the acquisition unit automatically retrieves the operation records stored locally. If no historical data is found, the optimization step is skipped, and the initial model is directly applied to perform the detection task. If there is historical data, the acquisition unit filters out the reliable detection results that have been manually verified or confirmed by subsequent processes, and recombines the corresponding multimodal data (volatile gas spectra, infrared image data sets, pressure data) with the detection labels to form a validation set. After this validation set is merged with the initial training set, the network weights of the encoder are adjusted through the backpropagation algorithm. For example, the weight coefficients of the overfitting samples in the initial training set are reduced to enhance the robustness of the model against noise interference in the actual working conditions. Further, during the optimization process, a dynamic learning rate strategy is adopted to automatically adjust the learning rate step according to the change in the validation set loss value, avoiding model oscillation. Thus, the system continuously accumulates effective data during long-term operation, and the model gradually improves the recognition accuracy for different seal defects through periodic optimization, adapting to the impacts brought by fluctuations in production line parameters or environmental changes.

[0088] As a preferred embodiment, the solution of the present application is specifically implemented as follows: When the acquisition unit constructs the leakage detection modal contrast learning model based on the training samples, it further includes: The acquisition unit collects the system operation records.

[0089] When the operation record is empty, the acquisition unit uses the constructed leakage detection modal contrast learning model as the final model.

[0090] When the operation record is not empty, the acquisition unit collects the output results of the historical model, and uses the verified output results of the historical model as a new validation set to optimize the constructed leakage detection modal contrast learning model.

[0091] Specifically, when the system initially runs, since there is no historical operation data, the acquisition unit directly uses the constructed leakage detection modal contrast learning model as the final model. As the system continues to run, the acquisition unit will continuously accumulate operation records. When enough operation records have been accumulated, the acquisition unit extracts the output results of the historical model and manually verifies these results. The verified results will be used as a new validation data set for further optimizing and adjusting the leakage detection modal contrast learning model. For example, these new validation data can be used to fine-tune the model parameters or adjust the model structure to improve the performance of the model in the actual application scenario.

[0092] Through the above technical solutions, the present application realizes the continuous optimization and adaptive ability of the model. Thus, the model can continuously learn and adapt to changes in the actual production environment, improving the accuracy and robustness of detection. Further, this method reduces the need for manually annotating a large amount of data, lowering the model maintenance cost. At the same time, by using actual production data for model optimization, the model is more suitable for the actual application scenario, improving the practicality and reliability of the system.

[0093] In some of the above solutions of the present application, a leakage detection modality contrast learning model is constructed to process multi-modal data. However, during the model training process, the volatile gas spectrogram may have noise fluctuations due to environmental interference, the infrared image may have blurred edges due to heat 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.

[0094] The present application further proposes that when the processing unit preprocesses the collected data to obtain a feature matrix, it includes: the processing unit filters and denoises each channel of the volatile gas spectrogram based on a median filter, and normalizes each channel by maximum-minimum normalization, controlling the odor spectrogram encoder to convert the normalized data into a 128-dimensional odor feature vector. The processing unit enhances the gradient of the infrared image data group based on the Laplace operator and normalizes it to a gray value between 0 and 1, controlling the infrared image encoder to process the normalized data and extract a 128-dimensional image feature vector. The processing unit removes the high-frequency noise of the pressure data based on moving average with a sliding window, calculates the pressure drop rate and the slope of the steady section according to the denoised pressure data, and controls the 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 a feature matrix.

[0095] Among them, the median filter uses a sliding window with a window length of 5 to eliminate the impulse noise of the volatile gas spectrogram by taking the median value, and the maximum-minimum normalization linearly maps the data of each channel to the interval [-1, 1]. The Laplace operator uses a 3×3 convolution kernel for edge sharpening to enhance the contour of the temperature anomaly region in the infrared image. The moving average with a sliding window uses a moving average method with a window width of 10 to suppress the mechanical vibration interference above 25 Hz in the pressure signal. The pressure drop rate is the first derivative of the pressure drop stage, and the slope of the steady section is the linear fitting coefficient of the pressure stable stage.

[0096] Specifically, after the original volatile gas spectrogram output by the gas sensor is median-filtered to eliminate outliers caused by sudden changes in ambient temperature and humidity, the range differences of different sensors are eliminated by maximum-minimum normalization, and the standardized odor data is input into the encoder. The original image captured by the infrared camera undergoes a convolution operation with the Laplace operator to highlight the uneven regions of the surface temperature distribution of the bottle after heating. After gray-scale normalization, it is input into the image encoder to extract spatial features. The original pressure curve collected by the pressure sensor is filtered by moving average to remove high-frequency noise, and the dynamic changes of the sealing performance are reflected by calculating the pressure drop rate and the slope of the stable section, and the pressure encoder is input to generate a pressure feature vector. The feature vectors of the three modalities are concatenated to form a 384-dimensional feature matrix, providing high-quality input data resistant to interference for the subsequent model and improving the robustness of leak detection.

[0097] As a preferred embodiment, the solution of the present application is specifically implemented as follows: When the processing unit preprocesses the volatile gas spectrogram, a median filter with a window length of 5 is used to perform sliding filtering on the original signal collected by the gas sensor to eliminate pulse noise interference. Subsequently, the sensor response values of each channel are linearly mapped to the 0-1 interval to complete the normalization operation. When preprocessing the infrared thermal imaging data, a 3×3 Laplace convolution kernel is applied to calculate the edge gradient, enhancing the temperature distribution difference features in the bottle mouth area, and scaling the pixel values to the 0-1 range. When preprocessing 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 the difference algorithm. At the same time, a linear regression model in the pressure stable stage is fitted to obtain the slope eigenvalue. Finally, the 128-dimensional feature vectors of the three types of gas, infrared, and pressure are concatenated by columns to form a 384-dimensional feature matrix.

[0098] Through the above technical solutions, the present application can effectively eliminate the noise interference in the sensor signals, enhance the expression of key features in different modality 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 achieve accurate identification of filling and sealing defects of sesame products.

[0099] In some of the above solutions of the present application, when the processing unit constructs the feature matrix, a differentiated preprocessing method is not designed according to the characteristics of multi-modal data, resulting in the influence of gas spectrogram noise interference on the accuracy of feature extraction, the blurring of the edges of infrared images reducing the ability to identify abnormal heat conduction, and the high-frequency fluctuations of pressure data affecting the accuracy of pressure drop rate calculation.

[0100] When the processing unit preprocesses the collected data to obtain a feature matrix, it includes: filtering and denoising each channel of the volatile gas spectrogram based on a median filter, normalizing each channel by maximum-minimum normalization, and controlling the odor spectrogram encoder to convert the normalized data into a 128-dimensional odor feature vector. Gradient enhancing the infrared image data group based on the Laplace operator and normalizing it to a gray value between 0 and 1, and controlling the infrared image encoder to process the normalized data to extract a 128-dimensional image feature vector. Removing high-frequency noise from the pressure data based on moving window averaging, calculating the pressure drop rate and the slope of the steady section according to the denoised pressure data, and controlling the pressure curve encoder to obtain a 128-dimensional pressure feature vector. Concatenating the odor feature vector, the image feature vector, and the pressure feature vector into a feature matrix.

[0101] Among them, the median filter uses a sliding window with a window length of 5 to filter the gas spectrogram, 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 degree of the temperature gradient change. The moving window averaging sets the window length to 10 sampling points to suppress the high-frequency noise of the pressure sensor. The pressure drop rate is obtained by linearly fitting the data of the first 0.5 seconds of the pressure curve, and the slope of the steady section takes the average change rate of the data in the 1 second after the pressure stabilization stage.

[0102] Specifically, the volatile gas spectrogram collected by the gas sensor is prone to abnormal spikes due to electromagnetic interference during transmission. The median filter is used to retain the trend of the effective signal and eliminate outliers while the maximum-minimum normalization maps the data of each sensor channel to the 0-1 interval, eliminating the influence of dimensional differences on the encoder training. The infrared thermal imaging component is affected by environmental thermal radiation interference, resulting in a decrease in image contrast. The Laplace operator is used to strengthen the temperature difference boundary between the bottle surface and the background, and the normalization operation enhances the recognition of weak heat conduction anomalies. The pressure detection component generates mechanical vibration noise during the pressurization process. After the moving window averaging smooths the data curve, the pressure drop rate reflects the velocity characteristics of gas leakage when the seal fails, and the slope of the steady section characterizes the residual elastic deformation characteristics of the seal structure. The 384-dimensional feature matrix formed by concatenating the three modal feature vectors in the 128-dimensional space can simultaneously characterize the synergistic action mode of gas leakage, heat conduction anomaly, and mechanical seal failure, enabling the contrast learning model to establish a leakage determination basis for multi-physical field coupling.

[0103] As a preferred embodiment, the solution of the present application is specifically implemented as follows: The detection unit receives the feature matrix formed by splicing the odor feature vector, the image feature vector, and the pressure feature vector, and inputs the feature matrix into the pre-trained leakage detection modality 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 ≤ 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 > 0.8, a green qualified signal is output and the next process is allowed to enter. The system cross-verifies the judgment result with the pressure test curve and the 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.

[0104] Through the above technical solution, the present application effectively solves the problem of misjudgment caused by insufficient utilization of the correlation of multi-modal data in traditional seal detection methods. By using the contrast learning model, a quantitative mapping relationship is established between the joint representation of odor, infrared, and pressure features and the seal state, and a dual-threshold mechanism is used to achieve gradient recognition of leakage risks. On the basis of maintaining the reliability of the physical detection of the pressure test, this solution integrates data on the volatility and heat conduction characteristics of substances, significantly improving the recognition sensitivity to complex failure modes such as slow leakage and intermittent leakage. At the same time, the cross-verification mechanism is used to avoid misoperations caused by abnormal single sensors, ensuring the continuity and stability of production line detection.

[0105] Through the above technical solution, the present application effectively overcomes the limitations of traditional single detection modes under complex working conditions. By integrating multi-dimensional information on volatile substance analysis, heat conduction characteristic detection, and mechanical sealability testing, the recognition sensitivity to minor leakage defects during the filling process of sesame products is improved. The contrast 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 warning strategy can implement differential processing according to the leakage risk level, optimizing the sorting efficiency of the production line while ensuring the detection accuracy.

[0106] In the above embodiments, by constructing a multi-modal perception and discrimination sesame product filling and sealing detection system, the problems of missed detection and misjudgment caused by the limitations of existing single-modal detection methods due to the state of the content, thermal disturbance, and mechanical structure are overcome. A gas sensor group is arranged at the canning outlet. By activating the release of volatile components through the heat supplement component, combined with the infrared thermal imaging component to capture the abnormal thermal distribution generated by minute leaks after heating, and synchronously collecting the dynamic seal response data provided by the pressure detection component, three types of heterogeneous modal inputs, namely odor spectra, thermal images, and pressure curves, are formed. 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 a modal contrast learning model. The detection unit realizes cross-modal inference and discrimination. The warning unit realizes multi-level leakage warning and anomaly tracking based on the model results, thereby improving the recognition ability of minute and hidden leaks and enhancing the robustness and accuracy of the system.

[0107] In another preferred embodiment based on the above embodiments, referring to Figure 2 as shown, this embodiment provides a sesame product filling detection method, which is applied to the above sesame product filling detection system and includes: S100: Based on the gas sensor, collect the volatile gas spectrum of the object to be detected. Based on the infrared thermal imaging component, collect a number of infrared image data of the object to be detected after heating, and construct an infrared image data group. Based on the pressure sensor, collect the pressure data of the seal pressure test.

[0108] S200: Collect known state samples, establish training samples according to the known state samples, and construct a leakage detection modal contrast learning model according to the training samples.

[0109] S300: Process the volatile gas spectrum, infrared image data group, and pressure data based on the leakage detection modal contrast learning model to obtain a feature matrix.

[0110] S400: Process the feature matrix according to the leakage detection modal contrast learning model to obtain the model output result.

[0111] S500: Give a warning according to the model output result.

[0112] It is understandable that by constructing a sesame product filling and sealing detection system for multi-modal perception and discrimination, the problems of missed detection and misjudgment caused by the limitations of existing single-modal detection methods due to the state of the content, thermal disturbance, and mechanical structure are overcome. A gas sensor group is arranged at the canning outlet, and the heating component is used to stimulate the release of volatile components. The infrared thermal imaging component is combined to capture the abnormal thermal distribution caused by tiny leaks after heating, and the dynamic seal response data provided by the pressure detection component is synchronously 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 performs deep feature extraction and semantic alignment through a modal contrast learning model. The detection unit realizes cross-modal reasoning and discrimination. The warning unit realizes multi-level leakage warning and abnormal 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.

[0113] Those skilled in the art should understand that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0114] The present application is described with reference to the flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or block in the flowchart and / or block diagram can be implemented by computer program instructions, and the combination of processes and / or blocks in the flowchart and / or block diagram can also be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate a device for realizing the functions specified in Figure 1 one process or multiple processes and / or blocks Figure 1 the functions specified in one block or multiple blocks.

[0115] These computer program instructions can 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 generate a manufactured article including an instruction device, and the instruction device realizes the functions specified in Figure 1 one process or multiple processes and / or blocks Figure 1 the functions specified in one block or multiple blocks.

[0116] These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus, so that a series of operation steps are executed on the computer or other programmable apparatus to produce a computer-implemented process, thereby providing instructions for implementing the functions specified in one process or a plurality of processes and / or blocks Figure 1 one or more processes and / or blocks Figure 1 steps of the functions specified in one block or a plurality of blocks.

[0117] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them. Although the present invention has been described in detail with reference to the above embodiments, those of ordinary skill in the art should understand that: modifications or equivalent replacements can still be made to the specific implementation manners of the present invention, and any modifications or equivalent replacements that do not depart from the spirit and scope of the present invention shall be covered by the protection scope of the claims of the present invention.

Claims

1. A sesame product filling detection system, characterized in that Including: A gas sensor group, arranged on one side of the outlet of the canning device. The gas sensor group includes a plurality of odor sensors, which are evenly distributed on both sides of the conveyor belt. The gas sensor group is used to collect the volatile gas spectrum of the object to be detected; A heat supplement component, arranged between the gas sensor group and the canning device. The heat supplement component is used to heat the object to be detected; An infrared thermal imaging component, including a plurality of infrared cameras. The infrared thermal imaging component is used to collect the infrared image data of the object to be detected after heating, and construct an infrared image data group; 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, which is used to collect the pressure data of the sealing pressure test; A control module, including 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 according to the known state samples, and construct a leakage detection modal contrast learning model according to the training samples; The processing unit processes the volatile gas spectrum, the infrared image data group and the pressure data based on the leakage 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 give an early warning according to the model output result.

2. The sesame product filling detection system according to claim 1, wherein Including: The heat supplement component includes a far-infrared heating device or a hot air blowing device; The odor sensor includes a gas-sensitive device based on metal oxide, and the gas sensor group includes 8 such odor sensors. Each odor sensor samples for 3 seconds, and samples 10 times per second; The infrared cameras in the infrared thermal imaging component use 1 second after the heat supplement ends as the trigger point, and the image pixels are 120×120 pixels; The sampling time of the pressure sensor in the pressure detection component is 2 seconds, and the sampling frequency is 50Hz.

3. The sesame product filling detection system according to claim 1, characterized in that, The positive pressure value of the pressure detection component for performing the 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 20Hz.

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 leakage detection modal contrast learning model includes an odor spectrum encoder, an infrared image encoder and a pressure curve encoder. Each encoder outputs an embedding vector of 128 dimensions; The processing unit collects the training samples, inputs the three types of modal data of each training sample into the encoder respectively to obtain the embedding vectors, and constructs positive sample pairs and negative sample pairs according to the embedding vectors; The positive sample is the combined data from the same bottle body and different modalities; The negative sample is the combined data from different bottle bodies or different sealing states; The processing unit calculates the semantic similarity of the positive sample pairs and the negative sample pairs based on the cosine similarity function, and defines a 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 and averaged to obtain the total loss value; The gradient of the total loss value with respect to the encoder network parameters is calculated using an automatic differentiation mechanism, and the convolutional layers, fully connected layers, or recurrent structures in each modality encoder are iteratively optimized using an Adam optimizer.

5. The sesame product filling detection system according to claim 4, characterized in that, When the acquisition unit constructs the leakage detection modality contrastive learning model, it further includes: The contrastive loss function: ; Among them, represents the loss value of the positive sample pair formed by the anchor point and the positive sample; represents the semantic similarity between the anchor point and the positive sample; represents 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, wherein, When the acquisition unit constructs the leakage detection modality contrastive learning model, it further includes: The total loss value: ; where N represents the number of training samples, represents the gas coding output of the i-th bottle body; represents the infrared coding output of the i-th bottle body; represents the pressure coding output of the i-th bottle body; represents the overall loss averaged over 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 i-th odor modality and the i-th pressure modality pair; represents the loss value of the i-th infrared modality and the i-th pressure modality pair.

7. The sesame product filling detection system according to claim 6, wherein When the acquisition unit constructs the leakage detection modality contrastive learning model according to the training samples, it further includes: The acquisition unit collects the system operation records; When the operation record is empty, the acquisition unit uses the constructed leakage detection modality contrastive learning model as the final model; When the operation record is not empty, the acquisition unit collects the output results of the historical model, and uses the verified output results of the historical model as a new validation set to optimize the constructed leakage detection modality contrastive learning model.

8. The sesame product filling detection system according to claim 7, wherein When the processing unit preprocesses the collected data to obtain a feature matrix, it includes: The processing unit filters and denoises each channel of the volatile gas spectrogram based on a median filter, and normalizes each channel by maximum-minimum normalization, and controls the odor spectrogram encoder to convert the normalized data into a 128-dimensional odor feature vector; The processing unit enhances the gradient of the infrared image data group based on the Laplace operator, normalizes it to a gray 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 the high-frequency noise of the pressure data based on a sliding window average, calculates the pressure drop rate and the slope of the steady section according to the denoised pressure data, and controls the 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, wherein When the detection unit processes the feature matrix according to the leakage detection modality contrastive learning model to obtain the model output result, it includes: The detection unit obtains the similarity score between the feature matrix and the sealed state according to the leakage detection modality contrastive 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; When the similarity score is less than or equal to the first similarity threshold, the detection unit determines that the object to be detected has a high-risk leakage; 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 leakage; when the similarity score is greater than the second similarity threshold, the detection unit determines that the object to be detected is in good seal.

10. A filling detection method for sesame products, applied to the sesame product filling detection system according to any one of claims 1-9, characterized in that, It includes: Collecting the volatile gas spectrogram of the object to be detected based on a gas sensor, collecting a group of infrared image data of the object to be detected after heating based on an infrared thermal imaging component, and collecting the pressure data of the sealed pressure test based on a pressure sensor; Collect samples of known states, establish training samples based on the samples of known states, and construct a leakage detection modality contrastive learning model based on the training samples; Process the volatile gas spectrogram, infrared image data set, and pressure data based on the leakage detection modality contrastive learning model to obtain a feature matrix; Process the feature matrix according to the leakage detection modality contrastive learning model to obtain a model output result; Give an early warning according to the model output result.

Citation Information

Patent Citations

  • Air tightness automatic detection device for canned food packaging

    CN118758528A

  • Blow-molded bottle air tightness detection equipment and detection method thereof

    CN113447216A

  • 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

  • Underground water supply pipe network leakage detection method and system based on audio signals

    CN118423620A