Hydrogen storage bottle detection method, device and equipment based on machine learning algorithm and medium

Through acoustic emission technology and multi-dimensional ultrasonic signal processing based on machine learning algorithms, the accuracy and complexity problems of high-pressure hydrogen storage bottle detection were solved, and efficient non-destructive testing was achieved.

CN120596846APending Publication Date: 2025-09-05CHINA UNIV OF PETROLEUM (BEIJING)
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510787195.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-12
Publication Date
2025-09-05

AI Technical Summary

Technical Problem

Existing technologies make it difficult to accurately and safely inspect high-pressure hydrogen storage bottles. Traditional methods have the problems of low efficiency, difficulty in detecting tiny defects, and complex operation.

Method used

A detection method based on machine learning algorithm is adopted, and acoustic emission technology is used to obtain multi-dimensional ultrasonic signal data. Through data cleaning and Fourier transform to extract features, a logarithmic probability regression model, K-means clustering and decision tree model are constructed to achieve non-destructive testing of hydrogen storage bottles.

Benefits of technology

The accuracy and stability of hydrogen storage bottle detection are improved, the operation complexity is reduced, and fast and accurate non-destructive detection is achieved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120596846A_ABST
    Figure CN120596846A_ABST
Patent Text Reader

Abstract

The invention discloses a hydrogen storage bottle detection method and device based on a machine learning algorithm, equipment and a medium, and relates to the technical field of artificial intelligence. Multi-dimensional ultrasonic signal data generated by an ultrasonic emission device on a hydrogen storage bottle to be detected are obtained by using an acoustic emission technology, and data cleaning, Fourier transform and feature extraction are performed on the ultrasonic signal data to obtain a detection result; obtaining time domain and frequency domain features; comparing the ultrasonic signal data with an acoustic emission database, determining a first detection result of which the type is damaged, and generating damage index characteristics by using a difference proportion method to supplement time domain and frequency domain characteristics; inputting the time domain and frequency domain features into a logarithmic probability regression model, and outputting a second detection result of which the type is damaged; performing calculation and iterative clustering on the clustering data set by using a K-means clustering algorithm to obtain a third detection result; inputting the third detection result and preset data into a decision tree model, and outputting a fourth detection result; nondestructive detection of the hydrogen storage bottle is realized, the detection accuracy and stability are improved, and the operation complexity is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a hydrogen storage bottle detection method, device, equipment and medium based on a machine learning algorithm. Background Art

[0002] As a key technology driving global energy transformation and achieving carbon neutrality, hydrogen energy is demonstrating tremendous potential in transportation, industry, construction, and power generation. It can significantly reduce emissions and enhance the flexibility and safety of energy systems. High-pressure hydrogen storage cylinders, a crucial component of hydrogen energy utilization, are crucial for their safe and efficient storage and transportation, directly impacting the overall performance of hydrogen energy systems.

[0003] However, the inspection of high-pressure hydrogen storage bottles faces multiple challenges. The high diffusivity and flammability and explosiveness of hydrogen require that the inspection methods must be accurate and safe to prevent leaks or accidents. At the same time, the bottle body is easily affected by factors such as temperature and pressure fluctuations, material aging and mechanical damage during use, resulting in performance degradation or safety hazards. Traditional inspection methods such as visual inspection, wall thickness measurement and water pressure testing can detect some defects, but they have problems such as long cycle time, low efficiency and difficulty in detecting small defects. Acoustic inspection is a good inspection method, but it still has many problems such as inaccurate test results, complex operation and processing procedures, and high labor consumption.

[0004] As can be seen from the above, how to accurately implement non-destructive testing of hydrogen storage bottles, improve the accuracy and stability of hydrogen storage bottle testing, and reduce the operational complexity of hydrogen storage bottle testing are problems to be solved in this field. Summary of the Invention

[0005] In view of this, the purpose of the present invention is to provide a hydrogen storage bottle detection method, device, equipment and medium based on machine learning algorithms, which can accurately perform non-destructive testing of hydrogen storage bottles, improve the accuracy and stability of hydrogen storage bottle detection, and reduce the operational complexity of hydrogen storage bottle detection. The specific scheme is as follows:

[0006] In a first aspect, the present application discloses a hydrogen storage bottle detection method based on a machine learning algorithm, comprising:

[0007] Acquiring multidimensional ultrasonic signal data generated by an ultrasonic transmitter on the hydrogen storage bottle to be inspected using acoustic emission technology, performing data cleaning on the multidimensional ultrasonic signal data, extracting time domain feature data, performing Fourier transform, and extracting frequency domain feature data to obtain multidimensional ultrasonic signal data in both time domain and frequency domain perspectives, including impact, amplitude, rise time, duration, energy, count, arrival time, peak count in the time domain, and characteristic frequency in the frequency domain;

[0008] Comparing the multi-dimensional ultrasonic signal data with a preset acoustic emission database to obtain a comparison result, determining a first detection result of damage based on the comparison result, calculating a relative deviation between the actual feature and the standard feature using a difference ratio method to generate a damage index feature, and fusing the original time domain and frequency domain features with the damage index feature to generate time domain and frequency domain features;

[0009] Constructing a logarithmic probability regression model, inputting the time domain and frequency domain features into the logarithmic probability regression model to output a second detection result of the type being damaged;

[0010] generating a cluster data set based on the first detection result and the second detection result of the type being damaged, and performing Euclidean distance calculation, mean vector calculation, Dunn index calculation, and iterative clustering on the cluster data set using a K-means clustering algorithm to obtain a third detection result;

[0011] Constructing a decision tree model, inputting the third detection result and preset data into the decision tree model for training, testing, evaluation and debugging to output a fourth detection result;

[0012] A detection and analysis result of the hydrogen storage bottle to be detected is generated based on the first detection result, the second detection result, the third detection result, and the fourth detection result.

[0013] Optionally, performing data cleaning on the multi-dimensional ultrasonic signal data, extracting time domain feature data, Fourier transforming, and extracting frequency domain feature data includes:

[0014] Deleting text data from the multi-dimensional ultrasonic signal data and performing signal denoising processing using a sliding average method to obtain cleaned multi-dimensional ultrasonic signal data;

[0015] Extracting time domain feature data of impact, amplitude, rise time, duration, energy, count, arrival time, and peak count from the multi-dimensional ultrasonic signal data after cleaning;

[0016] Performing Fourier transform on the multi-dimensional ultrasonic signal data to obtain frequency domain data, and filtering out characteristic frequencies from the frequency domain data.

[0017] Optionally, filtering out characteristic frequencies from the frequency domain data includes:

[0018] Setting a frequency threshold, traversing the frequency domain data, and screening initial characteristic frequencies from the frequency domain data based on the frequency threshold;

[0019] Determine a magnitude relationship between the initial characteristic frequency and the left initial characteristic frequency and the right initial characteristic frequency adjacent to the initial characteristic frequency;

[0020] If the left initial characteristic frequency and the right initial characteristic frequency are both smaller than the initial characteristic frequency, the local extreme value method is used to select the initial characteristic frequency with the largest value from the initial characteristic frequencies according to a preset number as the characteristic frequency.

[0021] Optionally, the calculation formula of the logarithmic probability regression model is:

[0022] ;

[0023] Among them, when When y represents the second test result of type non-damage, When y represents the second detection result with damaged type, x is the matrix containing the data after time domain and frequency domain feature extraction, Represents a vector The transpose of , b is the bias term;

[0024] The matrix containing the data after time domain and frequency domain feature extraction is:

[0025] .

[0026] Optionally, generating a cluster data set based on the first detection result and the second detection result of the type being damaged, and performing Euclidean distance calculation, mean vector calculation, Dunn index calculation, and iterative clustering on the cluster data set using a K-means clustering algorithm, includes:

[0027] generating an original data set based on the first detection result of the type being damaged and the second detection result, and separating a clustered data set from the original data set;

[0028] Randomly select a mean vector from the cluster data set using a K-means clustering algorithm, and calculate the Euclidean distance between the mean vector and other vectors in the cluster data set except the mean vector;

[0029] The Euclidean distance with the smallest value is used as a cluster label, and the mean vector is calculated for the vectors corresponding to the same cluster label, and the process of Euclidean distance calculation is repeated until the mean vector and the cluster label meet the stopping condition;

[0030] The cluster labels and corresponding clusters are subjected to Dunn index calculation and iterative clustering.

[0031] Optionally, the calculation formula of the Euclidean distance is:

[0032] ;

[0033] in, is the Euclidean distance between vectors in the clustered dataset, is the u-th value of the i-th vector in the clustering data set, is the u-th value of the j-th vector in the clustering data set, and n is the number of values ​​in the vector;

[0034] The calculation formula of the mean vector is:

[0035] ;

[0036] in, is the mean vector, is the i-th vector with consistent cluster labels, and n is the number of vectors with consistent cluster labels;

[0037] The calculation formula of Dunn Index is:

[0038] ;

[0039] in, is the minimum distance between the vectors of clusters labeled i and j, is the maximum distance between vectors in the same cluster, and k is the actual number of clusters.

[0040] Optionally, the constructing of a decision tree model, inputting the third detection result and preset data into the decision tree model for training, testing, evaluation and debugging to output a fourth detection result, includes:

[0041] A decision tree model is constructed using the classification and regression tree algorithm to obtain clusters obtained by iteratively clustering the clustering data set using the K-means clustering algorithm;

[0042] Inputting the third detection result and the preset data into the decision tree model, and using the cluster to train and test the decision tree model to obtain the decision tree model after training and testing;

[0043] Evaluate the decision tree model after training and testing; the evaluation indicators include accuracy, precision, recall, and the harmonic mean of precision and recall;

[0044] When the evaluation is completed, the decision tree model after evaluation is debugged to obtain a target decision tree model, and a fourth detection result is output.

[0045] In a second aspect, the present application discloses a hydrogen storage bottle detection device based on a machine learning algorithm, comprising:

[0046] A data processing module is used to use acoustic emission technology to obtain multi-dimensional ultrasonic signal data generated by the ultrasonic transmitter on the hydrogen storage bottle to be tested, perform data cleaning on the multi-dimensional ultrasonic signal data, extract time domain feature data, perform Fourier transform, and extract frequency domain feature data to obtain multi-dimensional ultrasonic signal data in both time domain and frequency domain perspectives, including impact, amplitude, rise time, duration, energy, count, arrival time, peak count in the time domain, and characteristic frequency in the frequency domain;

[0047] a database comparison module, configured to compare the multi-dimensional ultrasonic signal data with a preset acoustic emission database to obtain a comparison result, and determine a first detection result of damage according to the comparison result;

[0048] The difference ratio module is used to calculate the relative deviation between the actual feature and the standard feature using the difference ratio method to generate the damage index feature, and fuse the original time domain and frequency domain features with the damage index feature to generate the time domain and frequency domain features;

[0049] a logarithmic probability regression model construction module, configured to construct a logarithmic probability regression model, input the time domain and frequency domain features into the logarithmic probability regression model, and output a second detection result of the type being damaged;

[0050] a K-means clustering module, configured to generate a cluster data set based on the first detection result of the damage type and the second detection result, and perform Euclidean distance calculation, mean vector calculation, Dunn index calculation, and iterative clustering on the cluster data set using a K-means clustering algorithm to obtain a third detection result;

[0051] A decision tree model construction module is used to construct a decision tree model, input the third detection result and preset data into the decision tree model for training, testing, evaluation and debugging, so as to output a fourth detection result;

[0052] A detection and analysis module is used to generate a detection and analysis result of the hydrogen storage bottle to be detected based on the first detection result, the second detection result, the third detection result, and the fourth detection result.

[0053] In a third aspect, the present application discloses an electronic device, comprising:

[0054] Memory, used to store computer programs;

[0055] A processor is used to execute the computer program to implement the aforementioned hydrogen storage bottle detection method based on machine learning algorithm.

[0056] In a fourth aspect, the present application discloses a computer storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the steps of the aforementioned disclosed hydrogen storage bottle detection method based on machine learning algorithm are implemented.

[0057] It can be seen that the present application provides a hydrogen storage bottle detection method based on a machine learning algorithm, including using acoustic emission technology to obtain multi-dimensional ultrasonic signal data generated by an ultrasonic transmitting device on a hydrogen storage bottle to be detected, performing data cleaning on the multi-dimensional ultrasonic signal data, extracting time domain feature data, Fourier transforming, and extracting frequency domain feature data to obtain multi-dimensional ultrasonic signal data from both time domain and frequency domain perspectives, including impact, amplitude, rise time, duration, energy, count, arrival time, peak count in the time domain, and characteristic frequency in the frequency domain; comparing the multi-dimensional ultrasonic signal data with a preset acoustic emission database to obtain a comparison result, determining a first detection result of a damaged type based on the comparison result, and using the difference ratio method to calculate the relative deviation between the actual feature and the standard feature to generate a damage index feature, and comparing the original time domain and The frequency domain features are integrated with the damage index features to generate time domain and frequency domain features; a logarithmic probability regression model is constructed, and the time domain and frequency domain features are input into the logarithmic probability regression model to output a second detection result of damaged type; a clustering data set is generated based on the first detection result of damaged type and the second detection result, and the K-means clustering algorithm is used to perform Euclidean distance calculation, mean vector calculation, Dunn index calculation, and iterative clustering on the clustering data set to obtain a third detection result; a decision tree model is constructed, and the third detection result and preset data are input into the decision tree model for training, testing, evaluation and debugging to output a fourth detection result; based on the first detection result, the second detection result, the third detection result, and the fourth detection result, a detection and analysis result of the hydrogen storage bottle to be detected is generated.This application uses acoustic emission technology to obtain multi-dimensional ultrasonic signal data generated by the ultrasonic emission device on the hydrogen storage bottle to be tested, performs data cleaning on the multi-dimensional ultrasonic signal data, extracts time domain feature data, Fourier transforms, and extracts frequency domain feature data to obtain multi-dimensional ultrasonic signal data from both time domain and frequency domain perspectives, which can more accurately judge the type and degree of damage. The multi-dimensional ultrasonic signal data is compared with a preset acoustic emission database to obtain a comparison result. According to the comparison result, the first detection result with the type of damage is determined, and the difference ratio method is used to calculate the relative deviation between the actual feature and the standard feature to generate a damage index feature. The original time domain and frequency domain features are fused with the damage index feature to generate time domain and frequency domain features, and then three machine learning algorithms are used: logarithmic probability regression, K-means clustering and decision A tree algorithm is used to construct a logarithmic probability regression model, and the time domain and frequency domain features are input into the logarithmic probability regression model to output the second detection result. The K-means clustering algorithm is used to perform Euclidean distance calculation, mean vector calculation, Dunn index calculation, and iterative clustering on the clustering data set to obtain the third detection result. A decision tree model is constructed, and the third detection result and preset data are input into the decision tree model for training, testing, evaluation and debugging to output the fourth detection result. This can save a lot of manpower investment and also improve the accuracy and stability of the detection. The detection analysis results of the hydrogen storage bottle to be detected are generated based on the first detection result, the second detection result, the third detection result, and the fourth detection result. Based on the machine learning algorithm, the requirements of fast and accurate non-destructive testing of high-pressure hydrogen storage bottles are realized, and the operational complexity of hydrogen storage bottle detection is reduced. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are merely embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.

[0059] Figure 1 This is a flow chart of a hydrogen storage bottle detection method based on a machine learning algorithm disclosed in this application;

[0060] Figure 2 The waveform diagram disclosed in this application is a waveform diagram before and after Fourier transform of ultrasonic data of an undamaged hydrogen storage bottle;

[0061] Figure 3 This is a specific flow chart for hydrogen storage bottle detection disclosed in this application;

[0062] Figure 4 This is a diagram of a disc spring preloaded vacuum coupled hydrogen storage bottle detection probe disclosed in this application;

[0063] Figure 5 This is a diagram of a disc spring preloaded vacuum-coupled multi-channel acoustic array detection device disclosed in this application;

[0064] Figure 6 This is a schematic diagram of the assembly of a hydrogen storage bottle detection device disclosed in this application (viewpoint one);

[0065] Figure 7 This is a schematic diagram of the assembly of a hydrogen storage bottle detection device disclosed in this application (viewpoint 2);

[0066] Figure 8 This is a schematic structural diagram of a hydrogen storage bottle detection device based on a machine learning algorithm disclosed in this application;

[0067] Figure 9 This is a structural diagram of an electronic device provided in this application. DETAILED DESCRIPTION

[0068] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0069] As a key technology driving global energy transformation and achieving carbon neutrality, hydrogen energy is demonstrating tremendous potential in transportation, industry, construction, and power generation. It can significantly reduce emissions and enhance the flexibility and safety of energy systems. High-pressure hydrogen storage cylinders, a crucial component of hydrogen energy utilization, are crucial for their safe and efficient storage and transportation, directly impacting the overall performance of hydrogen energy systems. However, the inspection of high-pressure hydrogen storage cylinders presents multiple challenges. The high diffusivity and flammability of hydrogen require precise and safe detection methods to prevent leaks and accidents. Furthermore, during use, cylinders are susceptible to temperature and pressure fluctuations, material aging, and mechanical damage, leading to performance degradation and potential safety hazards. Traditional inspection methods such as visual inspection, wall thickness measurement, and hydrostatic testing can detect some defects, but they suffer from long cycle times, low efficiency, and difficulty detecting minor defects. Acoustic inspection, while a promising method, also presents challenges such as inaccurate results, complex operation and processing, and significant labor consumption. As can be seen from the above, how to accurately implement non-destructive testing of hydrogen storage bottles, improve the accuracy and stability of hydrogen storage bottle testing, and reduce the operational complexity of hydrogen storage bottle testing are problems to be solved in this field.

[0070] See also Figure 1 As shown, the embodiment of the present invention discloses a hydrogen storage bottle detection method based on a machine learning algorithm, which may specifically include:

[0071] Step S11: Use acoustic emission technology to obtain multi-dimensional ultrasonic signal data generated by the ultrasonic transmitting device on the hydrogen storage bottle to be tested, perform data cleaning on the multi-dimensional ultrasonic signal data, extract time domain feature data, perform Fourier transform, and extract frequency domain feature data to obtain multi-dimensional ultrasonic signal data in both time domain and frequency domain perspectives, including impact, amplitude, rise time, duration, energy, count, arrival time, peak count in the time domain, and characteristic frequency in the frequency domain.

[0072] In this embodiment, acoustic emission technology is used to obtain multidimensional ultrasonic signal data generated by an ultrasonic transmitter on the hydrogen storage bottle to be inspected, which can more accurately determine the type and degree of damage. The text data in the multidimensional ultrasonic signal data is deleted, and the signal is denoised using a sliding average method to obtain the cleaned multidimensional ultrasonic signal data; the time domain feature data of impact, amplitude, rise time, duration, energy, count, arrival time, and peak count are extracted from the cleaned multidimensional ultrasonic signal data; the multidimensional ultrasonic signal data is Fourier transformed to obtain frequency domain data, and the characteristic frequency is screened out from the frequency domain data.

[0073] Among them, the process of filtering out characteristic frequencies from frequency domain data is as follows: setting a frequency threshold, traversing the frequency domain data, and filtering out the initial characteristic frequency from the frequency domain data based on the frequency threshold; determining the size relationship between the left initial characteristic frequency and the right initial characteristic frequency adjacent to the initial characteristic frequency; if the left initial characteristic frequency and the right initial characteristic frequency are both smaller than the initial characteristic frequency, then using the local extreme value method and according to a preset number, filtering out the initial characteristic frequency with the largest value from the initial characteristic frequency as the characteristic frequency.

[0074] Specifically, this application uses an ultrasonic emission system to generate an acoustic signal on the hydrogen storage bottle to be inspected through an ultrasonic emission device, and collects the acoustic signal on the bottle body with the help of an acoustic emission signal receiving sensor: (1) Place the high-pressure composite hydrogen storage bottle to be inspected horizontally, connect the ultrasonic emission device to the bottom of the bottle, and use an acoustic signal receiving sensor at a certain position on the bottle body to receive the acoustic signal. When the sensor contact or signal reception is poor, an ultrasonic coupling agent can be applied appropriately to enhance the reception effect; (2) Use a signal line to connect the acoustic signal receiving sensor to the acoustic signal detection system to collect data; (3) Transmit the collected data to a computer and use the computer to process the data. Unlike traditional acoustic emission flaw detection systems, the acoustic signal is emitted by the ultrasonic device rather than generated by the detection sample itself, which increases the signal strength and is conducive to the detection of specific damage types and damage levels.

[0075] In this application, ultrasonic signal data is cleaned, Fourier transformed, and feature extracted. Data cleaning is an essential step in data preprocessing. Its primary goal is to remove abnormal and textual data from the data collected by the acoustic emission system to improve data quality and reliability. During data cleaning, the relevant data collected from the hydrogen storage bottle must be queried and verified to prevent data inaccuracies and facilitate the subsequent verification and implementation of machine learning.

[0076] The specific steps of data processing are as follows:

[0077] Step 1: Data cleaning: Remove some text data from the data, convert the damage status of the hydrogen storage cylinders into numerical values, and use algorithmic denoising methods to denoise the collected signals to remove noise and environmental influences from the collected signals.

[0078] The specific method of the numerical conversion is as follows: marking a hydrogen storage bottle with a known damage type of no damage as 0, and marking a hydrogen storage bottle with a known damage type as 1;

[0079] Step 2: Select the time domain feature data such as amplitude, rise time, rise count, and ring count from the cleaned ultrasonic signal data, and screen the root mean square, peak value, valley value, standard deviation, and upper quartile of the time domain feature data as the actual data used by the subsequent machine learning algorithm;

[0080] ;

[0081] in, is a finite-length discrete time series, F(K) is its corresponding discrete frequency sequence, and N is the length of the sequence;

[0082] In addition, the waveforms of the ultrasonic data of the undamaged hydrogen storage bottle before and after Fourier transformation are as follows: Figure 2 As shown;

[0083] Step 3: Set the upper quartile as the threshold, traverse the frequency domain data, and filter out the frequency domain data of the threshold as the potential feature frequency;

[0084] Step 4: Further process the potential characteristic frequency. If the data on both sides of the potential characteristic frequency are smaller than the frequency, it will be selected as the characteristic frequency.

[0085] Step 5: Treat the extracted characteristic frequencies as a high-dimensional vector.

[0086] Step S12: Compare the multi-dimensional ultrasonic signal data with a preset acoustic emission database to obtain a comparison result, determine the first detection result as damaged based on the comparison result, and use the difference ratio method to calculate the relative deviation between the actual feature and the standard feature to generate a damage index feature, and fuse the original time domain and frequency domain features with the damage index feature to generate time domain and frequency domain features.

[0087] The preset acoustic emission database proposed in this application includes preset standard signals, which are acoustic signals detected at various positions on the body of a qualified high-pressure hydrogen storage bottle that has just left the factory.

[0088] In this embodiment, the calculation formula of the difference ratio method is:

[0089] ;

[0090] Among them, a is the feature data processed by the difference ratio method, which can be used to supplement the time domain and frequency domain features, and m is the time domain and frequency domain features obtained by data processing of the actually collected ultrasonic signal. The standard time domain and frequency domain characteristics of the non-destructive hydrogen storage bottles in the preset acoustic emission database are obtained through the same data processing method.

[0091] Step S13: constructing a logarithmic probability regression model, inputting the time domain and frequency domain features into the logarithmic probability regression model to output a second detection result of the type of damage.

[0092] In this embodiment, the calculation formula of the logarithmic probability regression model is:

[0093] ;

[0094] Among them, when When y represents the second test result of type non-damage, When y represents the second detection result with damaged type, x is the matrix containing the data after time domain and frequency domain feature extraction, Represents a vector The transpose of , b is the bias term;

[0095] The matrix containing the data after time domain and frequency domain feature extraction is:

[0096] .

[0097] The first m*5 elements of the above matrix (such as 、 、 、 、 、 、 etc.) are all matrices. Taking the matrix of as an example, the specific contents of the first m*5 elements are introduced. The structure of the remaining elements is similar, so they are not described in detail.

[0098] matrix The content is as follows, which is a 1*a matrix including a time-domain related variables such as amplitude, rise time, rise count, and ring count:

[0099] .

[0100] Implementation: After performing data cleaning, Fourier transform, and feature extraction on the received acoustic signal data of a hydrogen storage bottle with unknown damage, the time domain feature data and frequency domain feature frequencies are substituted into a logarithmic probability regression model to obtain a second detection result. The second detection result is in the interval [0, 1].

[0101] Analyze the second test result: the second test result is the probability that the hydrogen storage bottle to be tested is damaged. The data between [0.5, 1] ​​can be regarded as the damage condition of the hydrogen storage bottle to be tested is damaged, and the data between [0, 0.5) can be regarded as the damage condition of the hydrogen storage bottle to be tested is not damaged.

[0102] Step S14: Generate a cluster data set based on the first detection result of the damaged type and the second detection result, and use the K-means clustering algorithm to perform Euclidean distance calculation, mean vector calculation, Dunn index calculation, and iterative clustering on the cluster data set to obtain a third detection result.

[0103] In this embodiment, an original data set is generated based on the first detection result of the damaged type and the second detection result, and a cluster data set is separated from the original data set; a mean vector is randomly selected from the cluster data set using the K-means clustering algorithm, and the Euclidean distance between the mean vector and other vectors in the cluster data set except the mean vector is calculated; the Euclidean distance with the smallest value is used as a cluster label, and the mean vector calculation is performed on the vectors corresponding to the same cluster label, and the Euclidean distance calculation process is repeated until the mean vector and the cluster label meet the stopping iteration condition; the Dunn index calculation and iterative clustering are performed on the cluster label and the corresponding cluster to obtain a third detection result.

[0104] The calculation formula of the Euclidean distance is:

[0105] ;

[0106] in, is the Euclidean distance between vectors in the clustered dataset, is the u-th value of the i-th vector in the clustering data set, is the u-th value of the j-th vector in the clustering data set, and n is the number of values ​​in the vector;

[0107] The calculation formula of the mean vector is:

[0108] ;

[0109] in, is the mean vector, is the i-th vector with consistent cluster labels, and n is the number of vectors with consistent cluster labels;

[0110] The calculation formula of Dunn Index is:

[0111] ;

[0112] in, is the minimum distance between the vectors of clusters labeled i and j, is the maximum distance between vectors in the same cluster, and k is the actual number of clusters.

[0113] Specifically, an original dataset is generated based on the first and second detection results of the damaged type. Using the logarithmic probability regression method described above, a new cluster dataset is separated from the original dataset x to form the dataset used for K-means clustering. Then, the initial number of clusters is set to k, and k vectors are randomly selected as the mean vector of the current dataset. The distance between the mean vector and other vectors in the dataset is calculated using the Euclidean distance formula. The minimum distance is then selected as the cluster label for the vector in the dataset. Vectors with the same cluster label are considered to belong to the same cluster, and the mean vector is recalculated for vectors with the same cluster label. The Euclidean distance between the vector in the dataset and the new mean vector is then calculated, and the minimum distance is selected as the new cluster label for the vector in the dataset. This process is repeated until the mean vector and cluster label generated by the iterations remain unchanged. The Dunn Index (DI) is then calculated. The above steps are repeated for k=2, 3, 4, ..., 15. The k with the largest DI value is taken as the actual number of clusters (this is the optimal number of clusters), and the cluster at this point is used as the clustering result of the K-means clustering algorithm. The clustering results obtained by the K-means algorithm represent the different damage types and damage degrees of the hydrogen storage bottles. The relationship between the clustering results and the specific damage types and damage degrees of the hydrogen storage bottles is determined by the subsequent decision tree model.

[0114] Step S15: construct a decision tree model, input the third detection result and preset data into the decision tree model for training, testing, evaluation and debugging, so as to output a fourth detection result.

[0115] In this embodiment, a decision tree model is constructed using a classification and regression tree algorithm, and clusters are obtained by iteratively clustering the cluster data set using a K-means clustering algorithm; the third test result and preset data are input into the decision tree model, and the idea of ​​semi-supervised learning is adopted to train and test the decision tree model using the cluster to obtain the decision tree model after training and testing; the decision tree model after training and testing is evaluated; the evaluation indicators include accuracy, precision, recall, and the harmonic mean of precision and recall; when the evaluation is completed, the evaluated decision tree model is debugged to obtain a target decision tree model, and the fourth test result is output.

[0116] A decision tree is a tree-like structure. Each leaf node corresponds to a classification, and non-leaf nodes correspond to divisions on a certain attribute. Samples are divided into several subsets based on their different values ​​on the attribute. For non-pure leaf nodes, the symbol of the majority class gives the class to which the sample that reaches this node belongs. The core issue in constructing a decision tree is how to select appropriate attributes to split the sample at each step. For a classification problem, learning and constructing a decision tree from training samples with known class labels is a top-down, divide-and-conquer process. The basic idea is to achieve data classification by segmenting features. Each internal node represents a test of a feature, each branch represents the test result, and each leaf node represents the final classification result.

[0117] The basic principle is as follows: Entropy: Entropy describes the uncertainty of an event, and the unit is bit. If an event has n results, the probability of each result is Then the entropy H(p) of this event is defined as:

[0118] ;

[0119] Conditional entropy: Entropy is a measure of the uncertainty of the outcome of an event, but when certain conditions are known, the uncertainty becomes smaller. Conditional entropy measures the uncertainty of event Y under certain condition X, denoted as H(Y|X). Its definition is:

[0120] ;

[0121] Information Gain: Information gain represents the degree to which the uncertainty of an event decreases after a certain condition is known, denoted as g(X, Y). It is calculated as entropy minus conditional entropy, indicating the degree to which the uncertainty of the original event decreases after a certain condition is known. Its definition is:

[0122] ;

[0123] Information gain rate: defined as the information gain divided by the intrinsic value of the feature, denoted as . Its definition is:

[0124] .

[0125] Common decision tree algorithms are shown in Table 1:

[0126] Table 1

[0127]

[0128] Based on the descriptions of various decision tree algorithms mentioned above, this application chooses to use the CART (Classification and Regression Tree) algorithm, which can process continuous and discrete features (such as damage type, material type, etc.) and ultimately output a class label (damage or not, damage type or damage degree).

[0129] Compared to the ID3 and C4.5 algorithms, CART can be used for both classification and regression analysis. The complete CART algorithm consists of three parts: feature selection, decision tree generation, and decision tree pruning. Key features of the CART algorithm include: a binary tree structure where each node is divided into only two child nodes; support for classification and regression problems, using the Gini index and mean squared error, respectively; support for processing both categorical and numerical features; and recursive splitting, which constructs the tree by selecting the optimal features and split points, making it easy to understand and interpret.

[0130] In this application, a decision tree model is constructed, and the specific process of inputting the third test results and preset data into the decision tree model for training, testing, evaluation and debugging is as follows:

[0131] The clusters obtained by the K-means clustering method are obtained as a data set, and the data set is divided into a training set and a test set. Then, the CART algorithm is used to build and train the model. The CART algorithm automatically selects the optimal splitting features based on the training data and builds a decision tree model.

[0132] In the classification problem, assuming there are K categories, the probability that a sample point belongs to the kth category is p; then the Gini index of the probability distribution is defined as:

[0133] ;

[0134] The steps to build a decision tree model include:

[0135] Selecting splitting features and thresholds: The CART algorithm calculates the Gini index (for classification problems) to select the optimal features and splitting points for each node. The algorithm recursively splits until a stopping condition (such as a tree depth limit, a node sample limit, or a purity requirement) is met.

[0136] Parameter settings during training: Maximum depth of the tree: controls the complexity of the tree to prevent overfitting; Minimum number of samples: the minimum number of samples on each leaf node to avoid generating too small leaf nodes; Minimum number of split samples: determines the minimum number of samples required for node splitting to avoid unnecessary complexity; Pruning strategy: In order to avoid overfitting, pre-pruning or post-pruning methods can be used to reduce the complexity of the tree after training is completed.

[0137] The steps of training, testing, evaluation and debugging include: After model training, the obtained model is evaluated through the set test set and validation set, where the evaluation indicators are as follows: Classification problem: Use evaluation indicators such as accuracy, precision, recall rate, F1-score, etc.

[0138] Accuracy: The ratio of the number of correctly classified samples to the total number of samples:

[0139] ;

[0140] Among them, TP (True Positive): predict the correct class as the correct class, TN (True Negative): predict the wrong class as the wrong class, FP (False Positive): predict the wrong class as the correct class, FN (False Negative): predict the correct class as the wrong class;

[0141] Precision: The ratio of the correct number of results predicted as positive:

[0142] ;

[0143] Recall: The proportion of samples that are actually positive that are correctly judged as positive:

[0144] ;

[0145] F1-score: Precision and recall are a pair of contradictory indicators, so they need to be considered together. F1-score is the harmonic mean of precision and recall:

[0146] ;

[0147] in, is the F1-score, P is the precision, and R is the recall.

[0148] The model's actual performance is determined by comparing the model's processed data with the actual damage level and type of the sample being tested. If the model's accuracy is unsatisfactory, further parameter adjustments can be made to improve it. Once the model is trained and evaluated, it can be applied to actual acoustic emission signal data for real-time damage detection and assessment.

[0149] After performing the above-mentioned data cleaning, Fourier transform, feature extraction and other operations on the received hydrogen storage bottle acoustic signal data with unknown damage, the input data is substituted into the decision tree model to obtain the classification result. The final classification result represents the actual damage condition of the hydrogen storage bottle (such as: point-like mild damage, point-like moderate damage, scratch-like severe damage, etc.) and corresponds to the result obtained by K-means clustering.

[0150] Step S16: Generate a detection and analysis result of the hydrogen storage bottle to be detected based on the first detection result, the second detection result, the third detection result, and the fourth detection result.

[0151] The specific process of implementing hydrogen storage bottle detection based on machine learning algorithm in this application is as follows Figure 3As shown, first, the acoustic emission technology is used to obtain the multi-dimensional ultrasonic signal data generated by the ultrasonic emission device on the hydrogen storage bottle to be inspected; then the ultrasonic signal data is cleaned, Fourier transformed, and feature extracted to obtain time domain feature data and frequency domain feature frequency. The frequency and intensity of the ultrasonic signal source can be actively controlled to facilitate the detection of various defect types, enhance the stability of the signal, and solve the problems of weak signal and large noise interference in passive detection. The local extreme value method is used for feature screening, and the upper quartile is set as the threshold. By traversing the frequency domain data, the frequency domain data of the threshold is screened out as the potential feature frequency (coarse screening), and the left and right neighborhoods of the potential feature frequency are compared to verify whether the candidate frequency is the local maximum (peak frequency), avoiding noise interference, and an innovative feature frequency screening method is proposed. Then the multi-dimensional ultrasonic signal data is compared with the preset acoustic emission database. Compare and obtain the comparison result. According to the comparison result, determine the first detection result with damaged type, and use the difference ratio method to calculate the relative deviation between the actual feature and the standard feature to generate the damage index feature. The original time domain and frequency domain features are fused with the damage index feature to generate the time domain and frequency domain features. Then construct a logarithmic probability regression model, input the time domain and frequency domain features into the logarithmic probability regression model, and output the second detection result. Then use the K-means clustering algorithm to perform Euclidean distance calculation, mean vector calculation, Dunn index calculation, and iterative clustering on the clustering data set to obtain the third detection result. Then construct a decision tree model, input the third detection result and preset data into the decision tree model for training, testing, evaluation and debugging to output the fourth detection result. Finally, based on the first detection result, the second detection result, the third detection result, and the fourth detection result, the detection analysis result of the hydrogen storage bottle to be detected is generated.

[0152] This application combines nondestructive testing with machine learning. Dynamic clustering and hierarchical model integration: Multiple machine learning algorithms collaborate to improve detection accuracy and reduce manual effort. First, log-probability regression is compared with the acoustic emission database for rapid screening and classification of lossy and non-destructive types. Then, K-means clustering is used to dynamically determine the optimal number of clusters using the Dunn index, generating "pseudo-labels" (clusters). This is then combined with a small amount of labeled data to train a decision tree for semi-supervised learning. This forms a hierarchical detection process of "log-probability regression & database comparison → K-means → decision tree."

[0153] Compared to traditional K-means algorithms, which require manual k-value assignment and make clustering results difficult to directly use for classification, this patented method innovatively dynamically determines the k-value through Euclidean distance calculation, mean vector calculation, Dunn index calculation, and iterative clustering, adapting to the diverse damage patterns of different hydrogen storage bottles. Cluster labels are then used as decision tree features to transform clustering results into interpretable classification rules.

[0154] The innovation of the present invention lies in: integrating acoustic emission and ultrasonic detection to realize the identification of micro-defects in the inner liner of high-pressure hydrogen storage bottles. Compared with traditional detection methods, it improves accuracy and efficiency, and can realize hydrogen storage bottle detection without restrictive conditions. By processing and comparing time domain data such as amplitude, number of rises, and ring counts with frequency domain data, a diversified and multi-dimensional data analysis is established to achieve efficient machine learning; by collecting and collecting acoustic signal data on standard hydrogen storage bottles, the collected data is sorted and summarized into an acoustic signal database, and then the acoustic signal data on hydrogen storage bottles in the actual service stage is compared with the originally established acoustic emission database, and the standard data in the acoustic emission database is innovatively used with the non-standard data actually collected to calculate the relative deviation between the actual characteristics and the standard characteristics, generate damage indicator characteristics, and supplement the original time domain and frequency domain data. The difference between the two data and the specific size of the difference are analyzed through the results of machine learning. If the difference between the two exceeds a certain threshold, it can be judged as damage. The specific damage category can be distinguished by different time domain and frequency domain data.

[0155] In addition, the present application also discloses a hydrogen storage bottle detection device - a disc spring preloaded vacuum coupled hydrogen storage bottle detection probe, such as Figure 4 As shown. The device adopts a disc adsorption structure, which is mainly composed of a vacuum adsorption module, an elastic sealing assembly and a spring-loaded detection probe. The outer edge of the device is wrapped with a double-layer annular elastic sealing ring, which is distributed along the circumference of the outermost ring and the second outer ring to form an annular sealing area. A vacuum device is provided in the annular area to achieve stable coupling between the device and the surface of the hydrogen storage bottle through negative pressure. The center detection probe adopts a spring pre-tightening mechanism, which is subjected to an axial compression load when the vacuum adsorption is started, forming a stable coupling with the bottom of the bottle. The ultrasonic probe is rotated to be connected to the guide groove at the center assembly position, and the front part of the groove is an M-type standard thread structure (nominal diameter , thread depth ), the rear part has a smooth inner wall (inner diameter ), forming a combined thread constraint and free displacement mechanism, ensuring that the probe can only move in the normal direction after rotational engagement. Under the stable load applied by the spring, the contact surface and the hydrogen storage bottle are tightly fitted. The detection signal line is guided through the spring cavity and connected to an external intelligent control system, enabling real-time control of the probe's operating parameters and closed-loop feedback of the contact status.

[0156] Disc spring preload vacuum coupled array acoustic emission sensor detection device such as Figure 5As shown, it consists of a vacuum adsorption module, an elastic sealing unit and an annular sensor array. The outer ring of the device is provided with double circumferential elastic sealing rings, which are distributed along the radial outermost side and the second outer side respectively, forming an annular airtight area. A vacuum device is provided in the annular area, and the device is coupled with the curved surface at the mouth of the hydrogen storage bottle through negative pressure. A spring-preloaded annular contact is assembled at the guide groove near the center end, and a stable load is applied to the surface of the hydrogen storage bottle under the action of the spring load, while forming an adaptive contact with the bottle mouth. Multiple groups of acoustic emission sensors are rotated to connect to the contacts to form a rigid connection. An M-type precision thread (nominal diameter , thread depth ), the rear section is smooth wall without thread (inner diameter ), forming a threaded constraint-free displacement composite mechanism, tightly couples the sensor on the contact to the surface of the hydrogen storage bottle. All sensor unit signal lines are routed through the spring cavity and connected to an external intelligent control system, enabling multi-channel parameter modulation and online contact status monitoring.

[0157] Figure 6 This is the assembly diagram of the hydrogen storage bottle detection device (view point one). Figure 7 Schematic diagram of the hydrogen storage bottle detection device assembly (view two).

[0158] The innovation of the disc spring preloaded vacuum coupled hydrogen storage bottle detection probe in this application lies in: using a modular spring preloaded ultrasonic probe architecture, establishing negative pressure through the vacuum adsorption module, driving the probe to produce normal displacement, and using the thread to limit the unidirectional movement of the probe. The unidirectional free movement of the probe enables the device to better adapt to the surfaces of hydrogen storage bottles of different sizes. At the same time, the ultrasonic probe forms a stable coupling with the bottom of the bottle under the action of the spring load. The innovation of this device is that the probe and the coupling device are designed independently, and only simple manual operation is required to connect and put them into detection. In addition, the guide groove can be used to replace the detection probe, thereby greatly reducing the maintenance cost of the equipment, making it suitable for large-scale industrial testing occasions.

[0159] The innovative point of the disc spring preloaded vacuum coupled array acoustic emission sensor detection device is that the device is suitable for hydrogen storage bottle heads with complex geometric shapes that are prone to cracking due to stress concentration. The device uses independent designs of contacts, coupling devices and acoustic emission sensors, and only requires simple manual operations to connect and put into detection. This device uses a circular sensor array that is evenly distributed circumferentially, so that its detection range covers the entire hydrogen storage bottle body, realizing all-round detection around the axis. At the same time, by dynamically adjusting the phase weight parameters of the circular sensor array, a 0°-360° sound beam deflection can be achieved, meeting the full coverage detection of curved surface structures. In addition, compared with traditional single-channel detection equipment, the array-type synchronous data acquisition system can achieve a significant improvement in detection efficiency. After data processing, the sensor data at different angles can preliminarily locate the angle range of the defect.

[0160] The hydrogen storage bottle detection method based on machine learning algorithm proposed in this application is not only applicable to the field of artificial intelligence technology, but also to many fields such as LNG (Liquefied Natural Gas) storage tanks and their transportation pipelines, oil storage tanks, liquid hydrogen / gas hydrogen storage tanks, hydrogen refueling station bottle groups and hydrogen long tube trailer bottle groups, natural gas storage tanks, hydrogen pipelines, etc., and can be widely used and promoted in the fields of oil, hydrogen energy and other energy sources.

[0161] In this embodiment, acoustic emission technology is used to obtain multi-dimensional ultrasonic signal data generated by an ultrasonic transmitting device on a hydrogen storage bottle to be detected, and the multi-dimensional ultrasonic signal data is cleaned, time domain feature data is extracted, Fourier transform is performed, and frequency domain feature data is extracted to obtain multi-dimensional ultrasonic signal data from both time domain and frequency domain perspectives, including impact, amplitude, rise time, duration, energy, count, arrival time, peak count in the time domain, and characteristic frequency in the frequency domain; the multi-dimensional ultrasonic signal data is compared with a preset acoustic emission database to obtain a comparison result, and the first detection result of the type of damage is determined according to the comparison result, and the difference ratio method is used to calculate the relative deviation between the actual feature and the standard feature to generate a damage index feature, and the original time domain and frequency domain features are integrated with the damage index feature. Combine to generate time domain and frequency domain features; construct a logarithmic probability regression model, input the time domain and frequency domain features into the logarithmic probability regression model to output a second detection result of damaged type; generate a clustering data set based on the first detection result of damaged type and the second detection result, use the K-means clustering algorithm to perform Euclidean distance calculation, mean vector calculation, Dunn index calculation, and iterative clustering on the clustering data set to obtain a third detection result; construct a decision tree model, input the third detection result and preset data into the decision tree model for training, testing, evaluation and debugging to output a fourth detection result; generate the detection and analysis results of the hydrogen storage bottle to be detected based on the first detection result, the second detection result, the third detection result, and the fourth detection result.This application uses acoustic emission technology to obtain multi-dimensional ultrasonic signal data generated by the ultrasonic emission device on the hydrogen storage bottle to be tested, performs data cleaning on the multi-dimensional ultrasonic signal data, extracts time domain feature data, Fourier transforms, and extracts frequency domain feature data to obtain multi-dimensional ultrasonic signal data from both time domain and frequency domain perspectives, which can more accurately judge the type and degree of damage. The multi-dimensional ultrasonic signal data is compared with a preset acoustic emission database to obtain a comparison result. According to the comparison result, the first detection result with the type of damage is determined, and the difference ratio method is used to calculate the relative deviation between the actual feature and the standard feature to generate a damage index feature. The original time domain and frequency domain features are fused with the damage index feature to generate time domain and frequency domain features, and then three machine learning algorithms are used: logarithmic probability regression, K-means clustering and decision A tree algorithm is used to construct a logarithmic probability regression model, and the time domain and frequency domain features are input into the logarithmic probability regression model to output the second detection result. The K-means clustering algorithm is used to perform Euclidean distance calculation, mean vector calculation, Dunn index calculation, and iterative clustering on the clustering data set to obtain the third detection result. A decision tree model is constructed, and the third detection result and preset data are input into the decision tree model for training, testing, evaluation and debugging to output the fourth detection result. This can save a lot of manpower investment and also improve the accuracy and stability of the detection. The detection analysis results of the hydrogen storage bottle to be detected are generated based on the first detection result, the second detection result, the third detection result, and the fourth detection result. Based on the machine learning algorithm, the requirements of fast and accurate non-destructive testing of high-pressure hydrogen storage bottles are realized, and the operational complexity of hydrogen storage bottle detection is reduced.

[0162] See also Figure 8 As shown, the embodiment of the present invention discloses a hydrogen storage bottle detection device based on a machine learning algorithm, which may specifically include:

[0163] The data processing module 11 is used to use acoustic emission technology to obtain multi-dimensional ultrasonic signal data generated by the ultrasonic transmitter on the hydrogen storage bottle to be tested, perform data cleaning on the multi-dimensional ultrasonic signal data, extract time domain feature data, perform Fourier transform, and extract frequency domain feature data to obtain multi-dimensional ultrasonic signal data in both time domain and frequency domain perspectives, including impact, amplitude, rise time, duration, energy, count, arrival time, peak count in the time domain, and characteristic frequency in the frequency domain;

[0164] a database comparison module 12, configured to compare the multi-dimensional ultrasonic signal data with a preset acoustic emission database to obtain a comparison result, and determine a first detection result of damage according to the comparison result;

[0165] The difference ratio module 13 is used to calculate the relative deviation between the actual feature and the standard feature using the difference ratio method to generate the damage index feature, and fuse the original time domain and frequency domain features with the damage index feature to generate the time domain and frequency domain features;

[0166] a logarithmic probability regression model construction module 14, configured to construct a logarithmic probability regression model, input the time domain and frequency domain features into the logarithmic probability regression model, and output a second detection result of the type being damaged;

[0167] a K-means clustering module 15 for generating a cluster data set based on the first detection result of the damage type and the second detection result, and performing Euclidean distance calculation, mean vector calculation, Dunn index calculation, and iterative clustering on the cluster data set using a K-means clustering algorithm to obtain a third detection result;

[0168] A decision tree model construction module 16 is used to construct a decision tree model, input the third detection result and preset data into the decision tree model for training, testing, evaluation and debugging, so as to output a fourth detection result;

[0169] The detection and analysis module 17 is used to generate a detection and analysis result of the hydrogen storage bottle to be detected based on the first detection result, the second detection result, the third detection result, and the fourth detection result.

[0170] In this embodiment, acoustic emission technology is used to obtain multi-dimensional ultrasonic signal data generated by an ultrasonic transmitting device on a hydrogen storage bottle to be detected, and the multi-dimensional ultrasonic signal data is cleaned, time domain feature data is extracted, Fourier transform is performed, and frequency domain feature data is extracted to obtain multi-dimensional ultrasonic signal data from both time domain and frequency domain perspectives, including impact, amplitude, rise time, duration, energy, count, arrival time, peak count in the time domain, and characteristic frequency in the frequency domain; the multi-dimensional ultrasonic signal data is compared with a preset acoustic emission database to obtain a comparison result, and the first detection result of the type of damage is determined according to the comparison result, and the difference ratio method is used to calculate the relative deviation between the actual feature and the standard feature to generate a damage index feature, and the original time domain and frequency domain features are integrated with the damage index feature. Combine to generate time domain and frequency domain features; construct a logarithmic probability regression model, input the time domain and frequency domain features into the logarithmic probability regression model to output a second detection result of damaged type; generate a clustering data set based on the first detection result of damaged type and the second detection result, use the K-means clustering algorithm to perform Euclidean distance calculation, mean vector calculation, Dunn index calculation, and iterative clustering on the clustering data set to obtain a third detection result; construct a decision tree model, input the third detection result and preset data into the decision tree model for training, testing, evaluation and debugging to output a fourth detection result; generate the detection and analysis results of the hydrogen storage bottle to be detected based on the first detection result, the second detection result, the third detection result, and the fourth detection result.This application uses acoustic emission technology to obtain multi-dimensional ultrasonic signal data generated by the ultrasonic emission device on the hydrogen storage bottle to be tested, performs data cleaning on the multi-dimensional ultrasonic signal data, extracts time domain feature data, Fourier transforms, and extracts frequency domain feature data to obtain multi-dimensional ultrasonic signal data from both time domain and frequency domain perspectives, which can more accurately judge the type and degree of damage. The multi-dimensional ultrasonic signal data is compared with a preset acoustic emission database to obtain a comparison result. According to the comparison result, the first detection result with the type of damage is determined, and the difference ratio method is used to calculate the relative deviation between the actual feature and the standard feature to generate a damage index feature. The original time domain and frequency domain features are fused with the damage index feature to generate time domain and frequency domain features, and then three machine learning algorithms are used: logarithmic probability regression, K-means clustering and decision A tree algorithm is used to construct a logarithmic probability regression model, and the time domain and frequency domain features are input into the logarithmic probability regression model to output the second detection result. The K-means clustering algorithm is used to perform Euclidean distance calculation, mean vector calculation, Dunn index calculation, and iterative clustering on the clustering data set to obtain the third detection result. A decision tree model is constructed, and the third detection result and preset data are input into the decision tree model for training, testing, evaluation and debugging to output the fourth detection result. This can save a lot of manpower investment and also improve the accuracy and stability of the detection. The detection analysis results of the hydrogen storage bottle to be detected are generated based on the first detection result, the second detection result, the third detection result, and the fourth detection result. Based on the machine learning algorithm, the requirements of fast and accurate non-destructive testing of high-pressure hydrogen storage bottles are realized, and the operational complexity of hydrogen storage bottle detection is reduced.

[0171] In some specific embodiments, the data processing module 11 may specifically include:

[0172] a signal denoising processing module, configured to delete text data from the multi-dimensional ultrasonic signal data and perform signal denoising processing using a sliding average method to obtain cleaned multi-dimensional ultrasonic signal data;

[0173] a cleaning module, configured to extract time domain feature data of impact, amplitude, rise time, duration, energy, count, arrival time, and peak count from the cleaned multi-dimensional ultrasonic signal data;

[0174] The Fourier transform module is used to perform Fourier transform on the multi-dimensional ultrasonic signal data to obtain frequency domain data, and filter out characteristic frequencies from the frequency domain data.

[0175] In some specific embodiments, the data processing module 11 may specifically include:

[0176] A setting module, configured to set a frequency threshold, traverse the frequency domain data, and filter an initial characteristic frequency from the frequency domain data based on the frequency threshold;

[0177] A size relationship determining module, configured to determine a size relationship between the initial characteristic frequency and the initial characteristic frequency, which are adjacent to the left initial characteristic frequency and the right initial characteristic frequency;

[0178] The characteristic frequency determination module is used to use the local extreme value method and a preset number to screen out the initial characteristic frequency with the largest value from the initial characteristic frequencies as the characteristic frequency if the initial characteristic frequency on the left and the initial characteristic frequency on the right are both smaller than the initial characteristic frequency.

[0179] In some specific embodiments, the calculation formula of the logarithmic probability regression model is:

[0180] ;

[0181] Among them, when When y represents the second test result of type non-damage, When y represents the second detection result with damaged type, x is the matrix containing the data after time domain and frequency domain feature extraction, Represents a vector The transpose of , b is the bias term;

[0182] The matrix containing the data after time domain and frequency domain feature extraction is:

[0183] .

[0184] In some specific embodiments, the K-means clustering module 15 may specifically include:

[0185] a data set separation module, configured to generate an original data set based on the first detection result of the type being damaged and the second detection result, and separate a clustered data set from the original data set;

[0186] a Euclidean distance calculation module, configured to randomly select a mean vector from the cluster data set using a K-means clustering algorithm, and calculate the Euclidean distance between the mean vector and other vectors in the cluster data set except the mean vector;

[0187] an iterative module, configured to use the Euclidean distance with the smallest value as a cluster label, calculate the mean vector of the vectors corresponding to the same cluster label, and repeat the Euclidean distance calculation process until the mean vector and the cluster label meet the stopping condition;

[0188] The calculation and iterative clustering module is used to calculate the Dunn index and iteratively cluster the cluster labels and corresponding clusters.

[0189] In some specific embodiments, the calculation formula of the Euclidean distance is:

[0190] ;

[0191] in, is the Euclidean distance between vectors in the clustered dataset, is the u-th value of the i-th vector in the clustering data set, is the u-th value of the j-th vector in the clustering data set, and n is the number of values ​​in the vector;

[0192] The calculation formula of the mean vector is:

[0193] ;

[0194] in, is the mean vector, is the i-th vector with consistent cluster labels, and n is the number of vectors with consistent cluster labels;

[0195] The calculation formula of Dunn Index is:

[0196] ;

[0197] in, is the minimum distance between the vectors of clusters labeled i and j, is the maximum distance between vectors in the same cluster, and k is the actual number of clusters.

[0198] In some specific embodiments, the decision tree model building module 16 may specifically include:

[0199] A model building module is used to build a decision tree model using a classification and regression tree algorithm, and obtain clusters obtained by iteratively clustering the clustering data set using a K-means clustering algorithm;

[0200] A training and testing module, configured to input the third detection result and preset data into the decision tree model, and perform training and testing on the decision tree model using the cluster to obtain the decision tree model after training and testing;

[0201] An evaluation module is used to evaluate the decision tree model after training and testing; the evaluation indicators include accuracy, precision, recall, and the harmonic mean of precision and recall;

[0202] The debugging module is used to debug the evaluated decision tree model after the evaluation is completed, obtain a target decision tree model, and output a fourth detection result.

[0203] Figure 9 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The components of the electronic device are as follows:

[0204] Includes an optimal display that can clearly show the user the waveforms before and after time-frequency conversion, test results, human-computer interaction status and other specific information;

[0205] Contains a series of preferred buttons, including at least up, down, left, right, confirm, exit, stop, volume +, volume -, image zoom in, image zoom out, reset, power and other function buttons, for realizing human-computer interaction between the user and the electronic device;

[0206] Include a series of preferred interfaces, including at least two USB (Universal Serial Bus) interfaces, a USB Tape-C interface, and an HDMI (High Definition Multimedia Interface) interface to meet users' multi-dimensional data input and output needs. The USB Tape-C interface must also be capable of charging.

[0207] It includes an optimal power supply that can achieve long battery life and high number of charge and discharge cycles to provide power to the entire device to maintain operation, for user portable operation;

[0208] It includes a preferred memory, which contains an operating system, computer programs, and stored data. It can transmit data and operation results to the processor, and can transmit data, operation results, user-related instructions and other information to other components to realize related functions;

[0209] Contains a preferred processor that can transfer data and operation results to the memory and perform operations on related machine learning modules at high speed;

[0210] It includes an optimized voice broadcast system that can clearly and standardly broadcast key information such as hydrogen storage bottle test results to users in Mandarin. It is equipped with an optimized volume adjustment function that can accurately receive external key commands from users. A volume hole is also configured on the device housing to facilitate sound transmission.

[0211] It includes an LED (Light Emitting Diode) that can display three lights: red, blue, and green, to intuitively show the user the status of human-computer interaction. Red indicates that the test has failed and the user needs to confirm whether the data is normal or the interface is correctly connected; blue indicates that the device is running the test; green indicates that the test has ended and the test results have been output, waiting for the next test;

[0212] Contains an optimal data register that can temporarily store data to be transmitted without any loss, meeting the user's needs for transmitting data to external devices;

[0213] Contains an optimized wireless communication module that can connect to wireless networks such as WiFi (Wireless Fidelity) and transmit relevant data to designated terminals such as cloud databases and user mobile phones at high speed

[0214] The electronic device uses machine learning algorithms to achieve the coordinated work of hardware and software for hydrogen storage bottle detection. Its core principles are as follows:

[0215] The user inputs the collected raw ultrasound data signals into the device via the HDMI or USB interface and enters detection commands using the function buttons. The memory synchronously receives the data and commands and transmits them to the processor. Based on the built-in computing unit, the processor performs time-frequency conversion, feature extraction, and machine learning inference operations on the ultrasound signals. This process uses a localized edge computing model, eliminating the need for cloud computing power, significantly reducing network transmission latency, and ensuring closed-loop processing of sensitive data on the device to avoid the risk of leakage.

[0216] After the operation is completed, the processor returns the result to the memory, and the memory further distributes the result to the multimodal output module for subsequent data transmission:

[0217] Display: Displays waveforms before and after time-frequency conversion, test results, human-computer interaction status and other specific information;

[0218] LED lights: Red (test failure / abnormal), blue (operating), and green (test completed) lights provide intuitive feedback on system status;

[0219] Voice broadcast system: broadcasts key test results in standard Mandarin to meet the needs of different users;

[0220] Data register and transmission module: The register temporarily stores test results and raw data, supporting breakpoint resuming. When wireless transmission (Wi-Fi) is interrupted due to network fluctuations, data is automatically temporarily stored and seamlessly resumed upon network restoration, ensuring data integrity in industrial scenarios.

[0221] Furthermore, the electronic device connects directly to cloud databases and mobile devices via a wireless communication module. Test results can be synchronized to the cloud in real time to update model parameters or pushed to user terminals for remote monitoring. A built-in power module provides long battery life and supports portable operation, making it suitable for complex environments such as outdoor and confined spaces.

[0222] The innovative feature of the designed electronic detection device lies in its multimodal interactive system, including an electronic display, voice announcements, and LED indicators, to meet the needs of diverse usage scenarios. The electronic display provides rich information for detailed analysis by technicians. The voice announcements facilitate rapid identification of damaged hydrogen storage cylinders and the actual damage status during inspections. The LED indicator uses a universal three-color strobe pattern to provide rapid user feedback on any issues encountered during the inspection process, promptly informing users whether input data and the electronic detection equipment need to be adjusted. Furthermore, the designed electronic detection device integrates edge computing and transmits collected data and analysis results to a cloud database and user devices such as mobile phones and computers. This not only enriches the database for the further development of hydrogen storage cylinder detection models, but also allows users to directly view the damage status of hydrogen storage cylinders on the terminal, enabling remote, off-site monitoring to meet the needs of a wider range of application scenarios, such as third-party monitoring and remote verification. The designed electronic detection device also features a built-in data register to prevent data loss caused by data loss during transmission, thereby improving the stability and reliability of the entire electronic detection system.

[0223] Furthermore, an embodiment of the present application also discloses a computer-readable storage medium, in which a computer program is stored. When the computer program is loaded and executed by a processor, the steps of the hydrogen storage bottle detection method based on the machine learning algorithm disclosed in any of the aforementioned embodiments are implemented.

[0224] Finally, it should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or device comprising the element.

[0225] The above is a detailed introduction to the hydrogen storage bottle detection method, device, equipment and storage medium based on machine learning algorithm provided by the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for those skilled in the art, according to the ideas of the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting the present invention.

Claims

1. A hydrogen storage bottle detection method based on machine learning algorithm, characterized in that: include: Acquiring multidimensional ultrasonic signal data generated by an ultrasonic transmitter on the hydrogen storage bottle to be inspected using acoustic emission technology, performing data cleaning on the multidimensional ultrasonic signal data, extracting time domain feature data, performing Fourier transform, and extracting frequency domain feature data to obtain multidimensional ultrasonic signal data in both time domain and frequency domain perspectives, including impact, amplitude, rise time, duration, energy, count, arrival time, peak count in the time domain, and characteristic frequency in the frequency domain; Comparing the multi-dimensional ultrasonic signal data with a preset acoustic emission database to obtain a comparison result, determining a first detection result of damage based on the comparison result, calculating a relative deviation between the actual feature and the standard feature using a difference ratio method to generate a damage index feature, and fusing the original time domain and frequency domain features with the damage index feature to generate time domain and frequency domain features; Constructing a logarithmic probability regression model, inputting the time domain and frequency domain features into the logarithmic probability regression model to output a second detection result of the type being damaged; generating a cluster data set based on the first detection result and the second detection result of the type being damaged, and performing Euclidean distance calculation, mean vector calculation, Dunn index calculation, and iterative clustering on the cluster data set using a K-means clustering algorithm to obtain a third detection result; Constructing a decision tree model, inputting the third detection result and preset data into the decision tree model for training, testing, evaluation and debugging to output a fourth detection result; A detection and analysis result of the hydrogen storage bottle to be detected is generated based on the first detection result, the second detection result, the third detection result, and the fourth detection result.

2. The hydrogen storage bottle detection method based on machine learning algorithm according to claim 1 is characterized in that: The step of performing data cleaning on the multi-dimensional ultrasonic signal data, extracting time domain feature data, performing Fourier transform, and extracting frequency domain feature data includes: Deleting text data from the multi-dimensional ultrasonic signal data and performing signal denoising processing using a sliding average method to obtain the cleaned multi-dimensional ultrasonic signal data; Extracting time domain feature data of impact, amplitude, rise time, duration, energy, count, arrival time, and peak count from the multi-dimensional ultrasonic signal data after cleaning; Performing Fourier transform on the multi-dimensional ultrasonic signal data to obtain frequency domain data, and filtering out characteristic frequencies from the frequency domain data.

3. The hydrogen storage bottle detection method based on machine learning algorithm according to claim 2 is characterized in that: The step of screening out characteristic frequencies from the frequency domain data comprises: Setting a frequency threshold, traversing the frequency domain data, and screening initial characteristic frequencies from the frequency domain data based on the frequency threshold; Determine a magnitude relationship between the initial characteristic frequency and the left initial characteristic frequency and the right initial characteristic frequency adjacent to the initial characteristic frequency; If the left initial characteristic frequency and the right initial characteristic frequency are both smaller than the initial characteristic frequency, the local extreme value method is used to select the initial characteristic frequency with the largest value from the initial characteristic frequencies according to a preset number as the characteristic frequency.

4. The hydrogen storage bottle detection method based on machine learning algorithm according to claim 1 is characterized in that: The calculation formula of the log-odds regression model is: ; Among them, when When y represents the second test result of type non-damage, When y represents the second detection result with damaged type, x is the matrix containing the data after time domain and frequency domain feature extraction, Represents a vector The transpose of , b is the bias term; The matrix containing the data after time domain and frequency domain feature extraction is: 。 5. The hydrogen storage bottle detection method based on machine learning algorithm according to claim 1 is characterized in that: Generating a cluster data set based on the first detection result and the second detection result of the type being damaged, performing Euclidean distance calculation, mean vector calculation, Dunn index calculation, and iterative clustering on the cluster data set using a K-means clustering algorithm, including: generating an original data set based on the first detection result and the second detection result of the type being damaged, and separating a clustered data set from the original data set; Randomly select a mean vector from the cluster data set using a K-means clustering algorithm, and calculate the Euclidean distance between the mean vector and other vectors in the cluster data set except the mean vector; The Euclidean distance with the smallest value is used as a cluster label, and the mean vector is calculated for the vectors corresponding to the same cluster label, and the process of Euclidean distance calculation is repeated until the mean vector and the cluster label meet the stopping condition; The cluster labels and corresponding clusters are subjected to Dunn index calculation and iterative clustering.

6. The hydrogen storage bottle detection method based on machine learning algorithm according to claim 5 is characterized in that: The calculation formula of the Euclidean distance is: ; in, is the Euclidean distance between vectors in the clustered dataset, is the u-th value of the i-th vector in the clustering data set, is the u-th value of the j-th vector in the clustering data set, and n is the number of values ​​in the vector; The calculation formula of the mean vector is: ; in, is the mean vector, is the i-th vector with consistent cluster labels, and n is the number of vectors with consistent cluster labels; The calculation formula of Dunn Index is: ; in, is the minimum distance between the vectors of clusters labeled i and j, is the maximum distance between vectors in the same cluster, and k is the actual number of clusters.

7. The hydrogen storage bottle detection method based on machine learning algorithm according to any one of claims 1 to 6, characterized in that: The step of constructing a decision tree model and inputting the third detection result and preset data into the decision tree model for training, testing, evaluation and debugging to output a fourth detection result includes: A decision tree model is constructed using the classification and regression tree algorithm to obtain clusters obtained by iteratively clustering the clustering data set using the K-means clustering algorithm; Inputting the third detection result and the preset data into the decision tree model, and using the cluster to train and test the decision tree model to obtain the decision tree model after training and testing; Evaluate the decision tree model after training and testing; the evaluation indicators include accuracy, precision, recall, and the harmonic mean of precision and recall; When the evaluation is completed, the decision tree model after evaluation is debugged to obtain a target decision tree model, and a fourth detection result is output.

8. A hydrogen storage bottle detection device based on machine learning algorithm, characterized in that: include: A data processing module is used to use acoustic emission technology to obtain multi-dimensional ultrasonic signal data generated by the ultrasonic transmitter on the hydrogen storage bottle to be tested, perform data cleaning on the multi-dimensional ultrasonic signal data, extract time domain feature data, perform Fourier transform, and extract frequency domain feature data to obtain multi-dimensional ultrasonic signal data in both time domain and frequency domain perspectives, including impact, amplitude, rise time, duration, energy, count, arrival time, peak count in the time domain, and characteristic frequency in the frequency domain; a database comparison module, configured to compare the multi-dimensional ultrasonic signal data with a preset acoustic emission database to obtain a comparison result, and determine a first detection result of damage according to the comparison result; The difference ratio module is used to calculate the relative deviation between the actual feature and the standard feature using the difference ratio method to generate the damage index feature, and fuse the original time domain and frequency domain features with the damage index feature to generate the time domain and frequency domain features; a logarithmic probability regression model construction module, configured to construct a logarithmic probability regression model, input the time domain and frequency domain features into the logarithmic probability regression model, and output a second detection result of the type being damaged; a K-means clustering module, configured to generate a cluster data set based on the first detection result of the damage type and the second detection result, and perform Euclidean distance calculation, mean vector calculation, Dunn index calculation, and iterative clustering on the cluster data set using a K-means clustering algorithm to obtain a third detection result; A decision tree model construction module is used to construct a decision tree model, input the third detection result and preset data into the decision tree model for training, testing, evaluation and debugging, so as to output a fourth detection result; A detection and analysis module is used to generate a detection and analysis result of the hydrogen storage bottle to be detected based on the first detection result, the second detection result, the third detection result, and the fourth detection result.

9. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor, configured to execute the computer program to implement the hydrogen storage bottle detection method based on a machine learning algorithm as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that Used to store a computer program; wherein, when the computer program is executed by a processor, the hydrogen storage bottle detection method based on a machine learning algorithm as described in any one of claims 1 to 7 is implemented.