Metal bottle cap air leakage detection method and system
By generating vibrational sound waves through electromagnetic excitation of the bottle cap and using the PINN model for in-depth analysis, the problem of low efficiency and low accuracy in detecting minute leaks in existing technologies has been solved, achieving efficient and accurate detection of leaks in metal bottle caps.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NANCHANG UNIV
- Filing Date
- 2026-03-31
- Publication Date
- 2026-04-28
AI Technical Summary
Existing leak detection methods are inefficient and inaccurate when detecting minor leaks, making it difficult to guarantee beer quality and food safety.
The bottle cap is excited by electromagnetic force to generate vibration sound waves, which are collected and converted into digital sequences. The PINN model is used for in-depth analysis, and the leakage confidence probability is calculated by combining the circular diaphragm vibration equation and the loss function of physical constraints, so as to achieve efficient and accurate leakage detection.
It achieves accurate and high-speed identification of minute air leaks, reduces the training and deployment costs of the model, and improves detection efficiency and accuracy.
Smart Images

Figure CN121933208A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of air leakage detection technology, and specifically relates to a method and system for detecting air leakage in metal bottle caps. Background Technology
[0002] During the beer capping process, due to factors such as manufacturing tolerances of the bottle mouth and cap, and uneven micro-sealing of the cap gasket, sealing defects are easily left on the contact surface between the cap and the bottle mouth, resulting in air leakage. This causes gas loss from the product bottle and oxidation and deterioration of the beer, which may ultimately lead to food safety issues.
[0003] Currently, mainstream leak detection methods include pressure testing, traditional visual inspection, and ultrasonic testing. Pressure testing involves placing beer in water and applying pressure to the bottle opening to observe for bubbles, thus identifying minute leaks. However, this method is cumbersome, time-consuming, and inefficient. Traditional visual inspection and ultrasonic testing detect leaks by observing the bottle cap's appearance and applying ultrasonic waves to observe foam inside the bottle, respectively. While efficient, these methods struggle to identify subtle leaks, leading to high false negative rates. Therefore, developing a low-cost, high-efficiency, and high-precision micro-leak detection technology is crucial for ensuring beer quality, mitigating food safety risks, and protecting core business interests. Summary of the Invention
[0004] Based on this, the present invention provides a method and system for detecting leaks in metal bottle caps, aiming to achieve high-efficiency and high-precision detection of minor leaks in beer with low training and deployment costs.
[0005] A first aspect of the present invention provides a method for detecting air leakage in metal bottle caps, the method comprising: Excitation is applied to the bottle cap using electromagnetic force, and the sound waves of the bottle cap vibration are collected; The vibration sound wave is amplified and converted from analog to digital to convert the sound signal into a discrete digital sequence. The digital sequence is input into the trained PINN model, and the digital sequence is subjected to in-depth analysis in the trained PINN model to retrieve the predicted wave velocity that represents the sealing state of the bottle cap. Based on the predicted wave velocity, the leakage confidence probability is calculated, and based on the leakage confidence probability and a preset decision threshold, the leakage status of the bottle cap is determined.
[0006] Furthermore, in the step of applying excitation to the bottle cap using electromagnetic force and collecting the sound waves of the bottle cap vibration, the excitation to the bottle cap using electromagnetic force causes the bottle cap to produce characteristic vibrations that conform to the circular diaphragm vibration equation, which is: ; ; Where r is the polar radius, representing the distance from a point on the bottle cap to the center of the circle, t is time, and η(r,t) is the normal vibrational displacement perpendicular to the bottle cap surface at time t for a point with polar radius r on the bottle cap surface. Let ρ be the propagation wave velocity of the vibration in the circular film, T be the radial tension of the cap film, ρ be the material density, and h be the film thickness.
[0007] Furthermore, in the step of inputting the digital sequence into the trained PINN model and performing deep analysis on the digital sequence within the trained PINN model to derive the predicted wave velocity characterizing the bottle cap sealing state, the PINN model uses the dimensionality-reduced circular membrane vibration equation as a physical constraint to construct a loss function, and performs feature extraction and analysis on the input vibration signal. The dimensionality-reduced circular membrane vibration equation is: ; ; η(r,t) represents the normal vibrational displacement perpendicular to the bottle cap surface at time t on a point with a polar radius of r on the bottle cap surface. For geometric-modal constants, Let R be the propagation wave velocity of the vibration in the circular membrane, and R be the effective radius of the bottle cap. It is the first zero of the zero-order Bessel function.
[0008] Furthermore, the total loss function of the PINN model is expressed as: ; L total For the total loss, L data For data loss, L pde For the physical residual loss of PDE, L reg λ1, λ2, and λ3 are the weighting coefficients for the regularization loss, data loss, PDE physical residual loss, and regularization loss, respectively. ; ; ; For t i The actual vibration amplitude at time radius r0, where L is the number of data points in the discrete digital sequence. For t i Predicted vibration displacement at any time To predict vibration displacement The second derivative with respect to time t, To predict wave speed, c min c is the lower limit of wave speed. maxThe upper limit of wave speed is given by , and max(0,x) is the cutoff function, which returns x when x>0 and 0 when x≤0.
[0009] Furthermore, the expression for the leakage confidence probability is: ; Where, σ( ) is the Sigmoid activation function, β is the discriminant sensitivity coefficient, and c threshold The preset wave velocity threshold, To predict wave speed.
[0010] Furthermore, the PINN model incorporates a GRU structure, and the network architecture sequentially includes an input layer, a first hidden layer, a second hidden layer, a third hidden layer, a fourth hidden layer, a fifth hidden layer, and an output layer. The input layer contains L+1 nodes for receiving vibration signals of L data points from a discrete digital sequence and a fixed radial coordinate r0=0. The first hidden layer is a unidirectional GRU layer containing 64 nodes and uses the Tanh activation function to extract global temporal features of the input signal. The second hidden layer contains 48 nodes and uses the ReLU activation function to perform global average pooling on the input temporal features, and then compresses them into a 48-dimensional global feature vector through a fully connected layer. The third hidden layer contains 128 nodes and uses the ReLU activation function to copy the 48-dimensional global feature vector in the time dimension into a feature sequence of the same length as the input sequence. After being concatenated with the time coordinate sequence, it is mapped to a 128-dimensional high-dimensional feature space. The fourth hidden layer contains L nodes and uses the Tanh activation function to output the predicted vibration displacement corresponding to each time point. The fifth hidden layer contains one node and uses the Softplus activation function to invert the predicted wave velocity based on the physical constraints of the predicted vibration displacement and the reduced circular membrane vibration equation. The output layer contains one node and uses the Sigmoid activation function to calculate and output the leakage confidence probability based on the predicted wave velocity.
[0011] Furthermore, the training process of the PINN model includes: Prepare samples labeled "sealed" and "leaking", collect vibration signals from each sample to construct a dataset, divide the dataset into training and test sets according to the proportion, and generate sampling coordinate points in the domain of vibration signals for the calculation of PDE physical residual loss and regularization loss. Based on the training set data, the PINN model is iteratively trained with the goal of minimizing the total loss function to optimize the model network parameters. In the actual production line environment, unlabeled vibration signal samples containing environmental noise are collected. The weight coefficients λ1, λ2, and λ3 of the total loss function are dynamically adjusted through an adaptive algorithm to optimize the discrimination sensitivity coefficient β and improve the model's anti-interference ability. The pre-trained PINN model is connected to the detection system, and vibration signals of unlabeled samples on the production line are collected online. The parameters of the PINN model are fine-tuned and calibrated using the PDE physical residual loss term to adapt the PINN model to the target production line environment and complete the model deployment.
[0012] A second aspect of the present invention provides a metal bottle cap leakage detection system for implementing a metal bottle cap leakage detection method provided in the first aspect of the present invention, the system comprising: The acquisition module is used to apply excitation to the bottle cap through electromagnetic force and acquire the sound waves of the bottle cap vibration; The conversion module is used to perform operational amplification and analog-to-digital conversion on the vibration sound wave to convert the sound signal into a discrete digital sequence; The analysis module is used to input the digital sequence into the trained PINN model, perform in-depth analysis on the digital sequence in the trained PINN model, and inversely derive the predicted wave velocity that characterizes the sealing state of the bottle cap. The calculation module is used to calculate the leakage confidence probability based on the predicted wave velocity, and determine the leakage status of the bottle cap based on the leakage confidence probability and a preset decision threshold.
[0013] A third aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the metal bottle cap leakage detection method provided in the first aspect.
[0014] A fourth aspect of the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor executes the program to implement the metal bottle cap leakage detection method provided in the first aspect.
[0015] The present invention provides a method and system for detecting air leakage in metal bottle caps. By using electromagnetic excitation to make the bottle cap vibrate, the acoustic signal is collected and processed, and then input into a PINN model that incorporates the circular diaphragm vibration equation into the physical loss function. The predicted wave velocity is calculated based on the vibration signal generated by the bottle cap, and the confidence probability of the bottle cap having an air leakage is output to determine the airtightness of the bottle cap. This achieves accurate and high-speed identification of minor air leakage phenomena. Combined with the training method designed for the model, the training and deployment costs of the model are greatly reduced, and the model is built efficiently. Attached Figure Description
[0016] Figure 1 This is a flowchart illustrating the implementation of a metal bottle cap leakage detection method according to Embodiment 1 of the present invention. Figure 2 This is a structural block diagram of a metal bottle cap leakage detection system provided in Embodiment 2 of the present invention; Figure 3 This is a structural block diagram of an electronic device provided in Embodiment 3 of the present invention. Detailed Implementation
[0017] To facilitate understanding of the present invention, a more complete description will be given below with reference to the accompanying drawings. Several embodiments of the invention are illustrated in the drawings. However, the invention can be implemented in many different forms and is not limited to the embodiments described herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete.
[0018] It should be noted that when a component is said to be "fixed to" another component, it can be directly on the other component or there may be an intervening component. When a component is said to be "connected to" another component, it can be directly connected to the other component or there may be an intervening component. The terms "vertical," "horizontal," "left," "right," and similar expressions used in this document are for illustrative purposes only.
[0019] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.
[0020] Example 1 Please see Figure 1 , Figure 1 The present invention illustrates a method for detecting air leakage in metal bottle caps according to Embodiment 1 of the present invention. The method for detecting air leakage in metal bottle caps specifically includes steps S01 to S04.
[0021] Step S01: Excite the bottle cap with electromagnetic force and collect the sound waves of the bottle cap vibration.
[0022] In this embodiment of the invention, firstly, infrared through-beam sensors located on both sides of the conveyor belt are used to detect the position of the wine bottle in real time. When the bottle reaches the detection station, the microcontroller controls the electromagnet located above the detection station to generate a pulse excitation with a duration of 650μs, so that the bottle cap generates a vibration signal with a normal peak displacement of about 1μm and conforms to the circular film vibration equation. Under the condition that the bottle cap is well sealed, the duration of the vibration signal is about 5-7ms. Then, a high-performance microphone installed at the same horizontal height as the electromagnet and maintaining a safe distance is used to pick up the vibration signal of the bottle cap with a collection time of 10ms. This time design can completely collect the vibration signal under the condition of good sealing and capture the most significant characteristic difference in the initial stage of vibration signal attenuation under the condition of leakage.
[0023] It should be noted that the equation for circular membrane vibration is: ; ; Where r is the polar radius, representing the distance from a point on the bottle cap to the center of the circle, t is time, and η(r,t) is the normal vibrational displacement perpendicular to the bottle cap surface at time t for a point with polar radius r on the bottle cap surface. Let ρ be the propagation wave velocity of the vibration in the circular film, T be the radial tension of the cap film, ρ be the material density, and h be the film thickness.
[0024] Understandably, when the bottle cap is properly sealed, the internal air pressure is high, resulting in radial tension. As shown in the formula above, with ρ and h constant, this will result in a higher wave velocity c. Similarly, when there is air leakage in the bottle cap, the internal air pressure will decrease, causing a significant reduction in radial tension T, which in turn will decrease the wave velocity c. Therefore, the wave velocity c can be used to determine whether the bottle cap is leaking.
[0025] Step S02 involves amplifying and converting the vibration sound wave into a discrete digital sequence.
[0026] Specifically, the vibration sound wave signal is amplified by an operational amplifier circuit and then converted into a discrete digital sequence containing L data points by an analog-to-digital converter.
[0027] Step S03: Input the digital sequence into the trained PINN model, perform in-depth analysis on the digital sequence in the trained PINN model, and inversely derive the predicted wave velocity characterizing the bottle cap sealing state.
[0028] To improve the accuracy of bottle cap leak detection, in this embodiment of the invention, a PINN model N: (t, r) is constructed. (P), where P is the probability of leakage confidence, which is determined by the intermediate output term. and Calculations show that For the predicted bottle cap vibration displacement, To predict wave speed, the digital sequence converted by the analog-to-digital converter is used as the input dataset D. data ,in, The time for the microphone to collect samples satisfies 0 < <10ms for The time radius is The actual vibration amplitude at that location. Since the microphone is a single-point acquisition device and the excitation generated by the electromagnet is located directly above the bottle cap, to effectively simplify the model, The value can be set to 0, which is the extreme diameter of the bottle cap's center. Therefore, the circular film vibration equation can be reduced to an ordinary differential equation, equivalent to: ; ; t represents time, and η(r,t) represents the normal vibrational displacement perpendicular to the bottle cap surface at time t at a point with a polar radius of r on the bottle cap surface. For geometric-modal constants, Let R be the propagation wave velocity of the vibration in the circular membrane, and R be the effective radius of the bottle cap. It is the first zero of the zero-order Bessel function.
[0029] The total loss function of the PINN model is then constructed as follows: ; L total For the total loss, L data For data loss, L pde For the physical residual loss of PDE, L reg λ1, λ2, and λ3 are the weighting coefficients for the regularization loss, data loss, PDE physical residual loss, and regularization loss, respectively. ; ; ; For t i The actual vibration amplitude at time radius r0, where L is the number of data points in the discrete digital sequence. For t i Predicted vibration displacement at any time To predict vibration displacement The second derivative with respect to time t, To predict wave speed, c min c is the lower limit of wave speed. maxThe upper limit of wave speed is given by , and max(0,x) is the cutoff function, which returns x when x>0 and 0 when x≤0.
[0030] Understandably, under the constraint of the PDE physical residual loss, the network is forced to learn features consistent with the solution space of the circular membrane vibration equation. Among all input signals, any signal that does not conform to the form of the equation's solution, such as environmental noise, will significantly increase the physical loss. When the model receives a signal, it uses backpropagation and optimization algorithms to ensure that the wave velocity prediction satisfies the circular membrane vibration equation while minimizing the physical loss. This allows the model to more accurately identify and extract the vibration signal generated after the bottle cap excitation and calculate a wave velocity prediction that better matches the actual vibration characteristics.
[0031] It should be noted that the PINN model incorporates a GRU structure, and the network architecture includes, in sequence, an input layer, a first hidden layer, a second hidden layer, a third hidden layer, a fourth hidden layer, a fifth hidden layer, and an output layer. The input layer contains L+1 nodes, which are used to receive the vibration signals of L data points of the discrete digital sequence and the fixed radial coordinate r0=0. After passing through the input layer, the information will be transmitted to the next layer of the network. The first hidden layer is a unidirectional GRU layer containing 64 nodes and uses the Tanh activation function to extract global temporal features of the input signal. The second hidden layer contains 48 nodes and uses the ReLU activation function to perform global average pooling on the input temporal features, and then compresses them into a 48-dimensional global feature vector through a fully connected layer. The third hidden layer contains 128 nodes and uses the ReLU activation function to copy the 48-dimensional global feature vector in the time dimension into a feature sequence of the same length as the input sequence. After being concatenated with the time coordinate sequence, it is mapped to a 128-dimensional high-dimensional feature space. The fourth hidden layer contains L nodes and uses the Tanh activation function to output the predicted vibration displacement corresponding to each time point. The fifth hidden layer contains one node and uses the Softplus activation function to invert the predicted wave velocity based on the physical constraints of the predicted vibration displacement and the reduced circular membrane vibration equation. The output layer contains one node and uses the Sigmoid activation function to calculate and output the leakage confidence probability based on the predicted wave velocity.
[0032] During the training of the PINN model, a suitable number of samples labeled "Sealed Successfully" or "Leaking" were prepared, with 80% being "Sealed Successfully" and 20% being "Leaking". First, vibration signals were collected from each sample in a relatively quiet environment for calculation. Then, 70% of the samples were randomly selected as the training set and 30% as the test set. Finally, a large number of (t,0) coordinate points were randomly generated within the domain of the bottle cap vibration signal for calculation. ; During production line operation, the PINN model collects a small number of unlabeled bottle cap vibration signal samples containing actual production environment noise using a high-performance microphone. Based on this sample data, the PINN model dynamically adjusts its operation using an adaptive algorithm. The weights are determined, and the optimal discrimination sensitivity β is calculated, thereby improving the robustness and detection accuracy of the model. By integrating the PINN model into the detection system, a small number of unlabeled vibration signals from the production line are collected online and input into the trained PINN model. The relevant parameters in the process of calculating the predicted wave velocity and leakage confidence probability are calibrated through the PDE physical residual loss term, enabling the model to quickly adapt to the new detection environment, thereby enhancing the model's generalization ability and reducing the model's deployment cost.
[0033] Step S04: Calculate the leakage confidence probability based on the predicted wave velocity, and determine the bottle cap leakage status based on the leakage confidence probability and a preset decision threshold.
[0034] Specifically, the expression for the confidence probability of leakage is: ; Where, σ( ) is the Sigmoid activation function, β is the discriminant sensitivity coefficient, and c threshold The preset wave velocity threshold, To predict wave velocity, a wave velocity threshold c is set for the system based on statistics from well-sealed samples. threshold This threshold corresponds to the minimum wave velocity allowed by the minimum tension required to ensure a seal. By comparing with this threshold, if... > If P≈0, the bottle cap is under high pressure and the seal is good. < If P≈1, then the bottle cap tension is insufficient, indicating a leak. and Based on the relationship, the confidence probability P of "there is a leak" is obtained, thus completing the detection of a leaking bottle cap.
[0035] In summary, the metal bottle cap leakage detection method in the above embodiments of the present invention is successful.
[0036] Example 2 Please see Figure 2 , Figure 2This is a structural block diagram of a metal bottle cap leakage detection system 200 provided in Embodiment 2 of the present invention. The metal bottle cap leakage detection system 200 specifically includes: a data acquisition module 21, a conversion module 22, an analysis module 23, and a calculation module 24, wherein: The acquisition module 21 is used to apply excitation to the bottle cap using electromagnetic force and to acquire the sound waves of the bottle cap's vibration. Applying electromagnetic force to the bottle cap causes it to produce characteristic vibrations that conform to the circular diaphragm vibration equation, which is: ; ; Where r is the polar radius, representing the distance from a point on the bottle cap to the center of the circle, t is time, and η(r,t) is the normal vibrational displacement perpendicular to the bottle cap surface at time t for a point with polar radius r on the bottle cap surface. Let ρ be the propagation wave velocity of the vibration in the circular membrane, T be the radial tension of the cap film, ρ be the material density, and h be the film thickness. The conversion module 22 is used to perform operational amplification and analog-to-digital conversion on the vibration sound wave to convert the sound signal into a discrete digital sequence; Analysis module 23 is used to input the digital sequence into the trained PINN model, perform deep analysis on the digital sequence in the trained PINN model, and derive the predicted wave velocity representing the sealing state of the bottle cap. The PINN model uses the dimension-reduced circular membrane vibration equation as a physical constraint to construct a loss function, and performs feature extraction and analysis on the input vibration signal. The dimension-reduced circular membrane vibration equation is: ; ; Let t be time, and η(r,t) be the normal vibration displacement perpendicular to the bottle cap surface at time t on the point with radius r on the bottle cap surface. For geometric-modal constants, Let R be the propagation wave velocity of the vibration in the circular membrane, and R be the effective radius of the bottle cap. It is the first zero of the zero-order Bessel function; The total loss function of the PINN model is expressed as: ; L total For the total loss, L data For data loss, L pde For the physical residual loss of PDE, L reg λ1, λ2, and λ3 are the weighting coefficients for the regularization loss, data loss, PDE physical residual loss, and regularization loss, respectively. ; ; ; For t i The actual vibration amplitude at time radius r0, where L is the number of data points in the discrete digital sequence. For t i Predicted vibration displacement at any time To predict vibration displacement The second derivative with respect to time t, To predict wave speed, c min c is the lower limit of wave speed. max The upper limit of wave speed is given by , and max(0,x) is the cutoff function, which returns x when x>0 and 0 when x≤0. The PINN model incorporates a GRU structure, and the network architecture includes, in sequence, an input layer, a first hidden layer, a second hidden layer, a third hidden layer, a fourth hidden layer, a fifth hidden layer, and an output layer. The input layer contains L+1 nodes for receiving vibration signals of L data points from a discrete digital sequence and a fixed radial coordinate r0=0. The first hidden layer is a unidirectional GRU layer containing 64 nodes and uses the Tanh activation function to extract global temporal features of the input signal. The second hidden layer contains 48 nodes and uses the ReLU activation function to perform global average pooling on the input temporal features, and then compresses them into a 48-dimensional global feature vector through a fully connected layer. The third hidden layer contains 128 nodes and uses the ReLU activation function to copy the 48-dimensional global feature vector in the time dimension into a feature sequence of the same length as the input sequence. After being concatenated with the time coordinate sequence, it is mapped to a 128-dimensional high-dimensional feature space. The fourth hidden layer contains L nodes and uses the Tanh activation function to output the predicted vibration displacement corresponding to each time point. The fifth hidden layer contains one node and uses the Softplus activation function to invert the predicted wave velocity based on the physical constraints of the predicted vibration displacement and the reduced circular membrane vibration equation. The output layer contains one node and uses the Sigmoid activation function to calculate and output the leakage confidence probability based on the predicted wave velocity. The training process of the PINN model includes: Prepare samples labeled "sealed" and "leaking", collect vibration signals from each sample to construct a dataset, divide the dataset into training and test sets according to the proportion, and generate sampling coordinate points in the domain of vibration signals for the calculation of PDE physical residual loss and regularization loss. Based on the training set data, the PINN model is iteratively trained with the goal of minimizing the total loss function to optimize the model network parameters. In the actual production line environment, unlabeled vibration signal samples containing environmental noise are collected. The weight coefficients λ1, λ2, and λ3 of the total loss function are dynamically adjusted through an adaptive algorithm to optimize the discrimination sensitivity coefficient β and improve the model's anti-interference ability. The pre-trained PINN model is connected to the detection system, and vibration signals of unlabeled samples on the production line are collected online. The parameters of the PINN model are fine-tuned and calibrated through the PDE physical residual loss term to adapt the PINN model to the target production line environment and complete the model deployment. Calculation module 24 is used to calculate the leakage confidence probability based on the predicted wave velocity, and to determine the bottle cap leakage status based on the leakage confidence probability and a preset decision threshold. The expression for the leakage confidence probability is: ; Where, σ( ) is the Sigmoid activation function, β is the discriminant sensitivity coefficient, and c threshold The preset wave velocity threshold, To predict wave speed.
[0037] Example 3 In another aspect, the present invention also proposes an electronic device, please refer to [link to relevant documentation]. Figure 3 The image shows an electronic device according to Embodiment 3 of the present invention, including a memory 20, a processor 10, and a computer program 30 stored in the memory and executable on the processor. When the processor 10 executes the computer program 30, it implements the metal bottle cap leakage detection method as described above.
[0038] In some embodiments, the processor 10 may be a central processing unit (CPU), controller, microcontroller, microprocessor or other data processing chip, used to run program code stored in memory 20 or process data, such as executing access restriction programs.
[0039] The memory 20 includes at least one type of readable storage medium, such as flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 20 can be an internal storage unit of an electronic device, such as the hard disk of the electronic device. In other embodiments, the memory 20 can also be an external storage device of the electronic device, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc. Furthermore, the memory 20 can include both internal and external storage units of the electronic device. The memory 20 can be used not only to store application software and various types of data of the electronic device, but also to temporarily store data that has been output or will be output.
[0040] It should be pointed out that, Figure 3 The structure shown does not constitute a limitation on the electronic device. In other embodiments, the electronic device may include fewer or more components than shown, or combine certain components, or have different component arrangements.
[0041] This invention also proposes a computer-readable storage medium storing a computer program that, when executed by a processor, implements the metal bottle cap leakage detection method described above.
[0042] Those skilled in the art will understand that the logic and / or steps represented in the flowcharts or otherwise described herein, for example, can be considered as a ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can mean any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device.
[0043] More specific examples of computer-readable media (a non-exhaustive list) include: electrical connections (electronic devices) having one or more wires, portable computer disk drives (magnetic devices), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Furthermore, computer-readable media can even be paper or other suitable media on which the program can be printed, since the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in computer memory.
[0044] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0045] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0046] The above embodiments merely illustrate several implementation methods of the present invention, and their descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these all fall within the protection scope of the present invention. Therefore, the protection scope of this patent should be determined by the appended claims.
Claims
1. A method for detecting air leakage in metal bottle caps, characterized in that, The method includes: Excitation is applied to the bottle cap using electromagnetic force, and the sound waves of the bottle cap vibration are collected; The vibration sound wave is amplified and converted from analog to digital to convert the sound signal into a discrete digital sequence. The digital sequence is input into the trained PINN model, and the digital sequence is subjected to in-depth analysis in the trained PINN model to retrieve the predicted wave velocity that represents the sealing state of the bottle cap. Based on the predicted wave velocity, the leakage confidence probability is calculated, and based on the leakage confidence probability and a preset decision threshold, the leakage status of the bottle cap is determined.
2. The method for detecting leakage in metal bottle caps according to claim 1, characterized in that, In the step of applying excitation to the bottle cap using electromagnetic force and collecting the sound waves of the bottle cap vibration, the excitation to the bottle cap using electromagnetic force causes the bottle cap to produce characteristic vibrations that conform to the circular diaphragm vibration equation, which is: ; ; Where r is the polar radius, representing the distance from a point on the bottle cap to the center of the circle, t is time, and η(r,t) is the normal vibrational displacement perpendicular to the bottle cap surface at time t for a point with polar radius r on the bottle cap surface. Let ρ be the propagation wave velocity of the vibration in the circular film, T be the radial tension of the cap film, ρ be the material density, and h be the film thickness.
3. The method for detecting leakage in metal bottle caps according to claim 2, characterized in that, In the step of inputting the digital sequence into the trained PINN model and performing deep analysis on the digital sequence within the trained PINN model to derive the predicted wave velocity characterizing the bottle cap sealing state, the PINN model uses the dimensionality-reduced circular membrane vibration equation as a physical constraint to construct a loss function, and performs feature extraction and analysis on the input vibration signal. The dimensionality-reduced circular membrane vibration equation is as follows: ; ; Let t be time, and η(r,t) be the normal vibration displacement perpendicular to the bottle cap surface at time t on the point with radius r on the bottle cap surface. For geometric-modal constants, Let R be the propagation wave velocity of the vibration in the circular membrane, and R be the effective radius of the bottle cap. It is the first zero of the zero-order Bessel function.
4. The method for detecting leakage in metal bottle caps according to claim 3, characterized in that, The total loss function of the PINN model is expressed as: ; L total For the total loss, L data For data loss, L pde For the physical residual loss of PDE, L reg λ1, λ2, and λ3 are the weighting coefficients for the regularization loss, data loss, PDE physical residual loss, and regularization loss, respectively. ; ; ; For t i The actual vibration amplitude at time radius r0, where L is the number of data points in the discrete digital sequence. For t i Predicted vibration displacement at any time To predict vibration displacement The second derivative with respect to time t, To predict wave speed, c min c is the lower limit of wave speed. max The upper limit of wave speed is given by , and max(0,x) is the cutoff function, which returns x when x>0 and 0 when x≤0.
5. The method for detecting leakage in metal bottle caps according to claim 4, characterized in that, The expression for the confidence probability of air leakage is: ; Where, σ( ) is the Sigmoid activation function, β is the discriminant sensitivity coefficient, and c threshold The preset wave velocity threshold, To predict wave speed.
6. The method for detecting leakage in metal bottle caps according to claim 5, characterized in that, The PINN model incorporates a GRU structure, and the network architecture includes, in sequence, an input layer, a first hidden layer, a second hidden layer, a third hidden layer, a fourth hidden layer, a fifth hidden layer, and an output layer. The input layer contains L+1 nodes for receiving vibration signals of L data points from a discrete digital sequence and a fixed radial coordinate r0=0. The first hidden layer is a unidirectional GRU layer containing 64 nodes and uses the Tanh activation function to extract global temporal features of the input signal. The second hidden layer contains 48 nodes and uses the ReLU activation function to perform global average pooling on the input temporal features, and then compresses them into a 48-dimensional global feature vector through a fully connected layer. The third hidden layer contains 128 nodes and uses the ReLU activation function to copy the 48-dimensional global feature vector in the time dimension into a feature sequence of the same length as the input sequence. After being concatenated with the time coordinate sequence, it is mapped to a 128-dimensional high-dimensional feature space. The fourth hidden layer contains L nodes and uses the Tanh activation function to output the predicted vibration displacement corresponding to each time point. The fifth hidden layer contains one node and uses the Softplus activation function to invert the predicted wave velocity based on the physical constraints of the predicted vibration displacement and the reduced circular membrane vibration equation. The output layer contains one node and uses the Sigmoid activation function to calculate and output the leakage confidence probability based on the predicted wave velocity.
7. The method for detecting leakage in metal bottle caps according to claim 6, characterized in that, The training process of the PINN model includes: Prepare samples labeled "sealed" and "leaking", collect vibration signals from each sample to construct a dataset, divide the dataset into training and test sets according to the proportion, and generate sampling coordinate points in the domain of vibration signals for the calculation of PDE physical residual loss and regularization loss. Based on the training set data, the PINN model is iteratively trained with the goal of minimizing the total loss function to optimize the model network parameters. In the actual production line environment, unlabeled vibration signal samples containing environmental noise are collected. The weight coefficients λ1, λ2, and λ3 of the total loss function are dynamically adjusted through an adaptive algorithm to optimize the discrimination sensitivity coefficient β and improve the model's anti-interference ability. The pre-trained PINN model is connected to the detection system, and vibration signals of unlabeled samples on the production line are collected online. The parameters of the PINN model are fine-tuned and calibrated using the PDE physical residual loss term to adapt the PINN model to the target production line environment and complete the model deployment.
8. A metal bottle cap leakage detection system, characterized in that, For implementing the metal bottle cap leakage detection method as described in any one of claims 1-7, the system comprises: The acquisition module is used to apply excitation to the bottle cap through electromagnetic force and acquire the sound waves of the bottle cap vibration; The conversion module is used to perform operational amplification and analog-to-digital conversion on the vibration sound wave to convert the sound signal into a discrete digital sequence; The analysis module is used to input the digital sequence into the trained PINN model, perform in-depth analysis on the digital sequence in the trained PINN model, and inversely derive the predicted wave velocity that characterizes the sealing state of the bottle cap. The calculation module is used to calculate the leakage confidence probability based on the predicted wave velocity, and determine the leakage status of the bottle cap based on the leakage confidence probability and a preset decision threshold.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by the processor, the program implements the metal bottle cap leakage detection method as described in any one of claims 1-7.
10. An electronic device, characterized in that, The device includes a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor executes the program to implement the metal bottle cap leakage detection method as described in any one of claims 1-7.
Citation Information
Patent Citations
Structural vibration grading early warning method and device, and storage medium
CN121479434A
Real-time plate structure damage detection method and device based on physical information space-time diagram neural network
CN121577753A
On -line measuring system is leaked in beer bottle vacuum
CN205785676U
Bottle stopper with wireless control, LED lighting and sound output device
DE202023000447U1