Ultrasonic corrosion measurement method and system based on cloud edge collaboration
Patent Information
- Application Number
- CN202611442662.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-17
- Publication Date
- 2026-10-20
AI Technical Summary
[0007]本发明目的是为了解决现有技术中强云端依赖导致延迟突出、单一算法识别精度不足、云边任务分配失衡及运行效率低的技术问题,提供了基于云边协同的超声腐蚀测量方法及系统
[0055]本发明提供了一种基于云边协同的超声腐蚀测量系统,通过在边缘端部署LSTM、CNN等算法实现缺陷的实时识别与分级预警,同时优化云边数据交互机制,解决现有系统实时性差、缺陷识别精度低、人工排查风险高的问题,提升工业管道腐蚀监测的安全性与可靠性。
Smart Images

Figure FT_1 
Figure FT_2 
Figure FT_3
Abstract
Description
Technical Field
[0001] This application relates to the field of nondestructive testing technology, and in particular to ultrasonic corrosion measurement. Background Technology
[0002] Corrosion monitoring is a core component in ensuring the safe operation of industrial pipelines, pressure vessels, and other facilities. Ultrasonic testing technology, with its non-contact and high-precision characteristics, has become the mainstream method for detecting corrosion defects. However, existing ultrasonic corrosion measurement systems mostly employ a cloud-based centralized processing architecture or only perform simple data acquisition at the edge, making them difficult to adapt to the complex needs of industrial sites.
[0003] In practical applications, existing technologies have the following prominent problems:
[0004] Insufficient real-time capability: Systems relying on cloud processing are prone to data transmission delays during network fluctuations, making it impossible to provide immediate warnings of defects such as pipeline corrosion and cracks. As pipelines are high-risk facilities, manual inspection of corrosion and cracks is risky and slow to respond, which can easily lead to safety accidents.
[0005] Limited defect identification capability: Traditional systems rely heavily on manual or simple algorithm analysis of ultrasonic data, making it difficult to accurately distinguish between different types of defects such as corrosion, cracks, deformation, and dents. The identification accuracy is low and cannot meet the needs of industrial sites for accurate defect classification.
[0006] Lack of cloud-edge collaboration: Although some systems have introduced edge processing, they have not established a cloud-edge task collaboration mechanism. The edge can only complete basic calculations and cannot achieve real-time defect identification and hierarchical early warning. Meanwhile, redundant computing in the cloud leads to low system efficiency and cannot meet the needs of on-site response speed and in-depth data analysis. Summary of the Invention
[0007] The purpose of this invention is to solve the technical problems in the prior art, such as prominent latency due to strong cloud dependence, insufficient recognition accuracy of single algorithms, imbalance in cloud-edge task allocation, and low operating efficiency. It provides an ultrasonic corrosion measurement method and system based on cloud-edge collaboration.
[0008] The technical solution adopted by the present invention to solve the above problems is: an ultrasonic corrosion measurement system based on cloud-edge collaboration, the system comprising: an edge terminal, an encrypted communication link, and a cloud terminal;
[0009] The edge device includes an ultrasonic probe, an ADC analog-to-digital converter chip, a lightweight embedded industrial computer, an early warning terminal, a local SD cache module, and a GPS and clock module;
[0010] The ultrasonic probe is used to acquire ultrasonic echo signals from pipeline corrosion; the ADC analog-to-digital converter chip is used to convert the ultrasonic echo analog signals into digital signals; the lightweight embedded industrial computer integrates an acquisition module, a preprocessing module, an LSTM and CNN fusion algorithm module, and a status monitoring module to realize signal preprocessing, defect identification and risk classification, system status monitoring, and fault-tolerant processing; the early warning terminal is connected to the lightweight embedded industrial computer to execute differentiated early warnings according to risk levels; the local SD cache module is used to store preprocessed data and anomaly information; the GPS and clock module is used to synchronously record traceability information of measurement data.
[0011] The encrypted communication link is used to enable data interaction between the edge and the cloud, and to transmit customized lightweight data frames;
[0012] The cloud includes a server, which is built with a microservice architecture and deploys a port listening program, a three-database storage architecture, an ARIMA corrosion risk trend prediction module, and an algorithm iteration and optimization module.
[0013] The port listening program receives data from the edge and performs double verification; the three-database storage architecture includes a time-series database, a relational database, and a high-risk defect database, which are used to store raw feature data, structured data, and Level IV risk defect data, respectively; the ARIMA corrosion risk trend prediction module is used to predict future corrosion risk trends based on historical defect data; and the algorithm iteration optimization module is used to iteratively optimize the weights and classification thresholds of the LSTM and CNN fusion algorithm weekly.
[0014] Furthermore, the preprocessing module specifically includes: applying db4 wavelet denoising to the ultrasonic echo digital signal after ADC conversion, with a denoising threshold of 0.02, to filter out interference signals below 50kHz; continuously extracting a 2ms duration interval from the peak moment of the first ultrasonic wave as the effective ultrasonic echo signal, which fully contains the echo information corresponding to pipe wall reflection and corrosion defects, and extracting three types of feature parameters: peak amplitude, transit time, and amplitude attenuation rate; performing min-max normalization on the extracted feature parameters, mapping them to the [0,1] interval, and generating an n×3 dimension feature vector, where n is the number of time-series sampling points uniformly sampled within a single 2ms effective signal segment.
[0015] Furthermore, the LSTM and CNN fusion algorithm module specifically includes:
[0016] The input layer receives an n×3 dimensional feature vector generated by the preprocessing module;
[0017] The CNN branch reconstructs the n×3 dimensional feature vector received by the input layer into an n×3×1 feature map, which is then processed by two convolutional layers and two 2×2 max pooling layers to output a spatial feature vector.
[0018] The LSTM branch takes the n×3 dimension feature vector received by the input layer, passes it through 2 layers of LSTM units, and adds a dropout layer to prevent overfitting, and outputs a temporal feature vector.
[0019] The fusion layer employs an adaptive weighted fusion method, and the fusion feature output formula is as follows: ,in, The fused feature vector The spatial feature vector output by the CNN branch. This is the temporal feature vector output by the LSTM branch. For the weights of the CNN branches, The weights are the weights of the LSTM branches, and the sum of the two is always 1;
[0020] The fused feature vectors are then normalized using L2 and input into a Softmax classifier to identify defects and risk levels.
[0021] Furthermore, the customized lightweight data frame is of fixed length and includes five parts: header identifier, data type, data length, payload, and CRC16 checksum.
[0022] The data types include enumerated codes: 0x01 = Level IV defect data, 0x02 = Level I-III defect data, 0x03 = Equipment status data, 0x04 = Algorithm update package data, 0x05 = Abnormal alarm feedback data;
[0023] The payload includes Device ID, timestamp, GPS, and measurement data;
[0024] The total length of the data frame satisfies the formula Where L_total is the total length. For the length of the header identifier, For data type length, For the length of the data length field, For the effective payload length, This is the length of the check bit.
[0025] Furthermore, the status monitoring module is used to monitor three core states, including the ultrasonic probe coupling status, the LSTM and CNN algorithm branch running status, and the industrial control computer computing power load status.
[0026] Ultrasonic probe coupling status determination: 80% of the normal coupling echo amplitude is used as the threshold. This represents the actual amplitude of the acquired echo signal; The mean amplitude of the echo signal under normal coupling conditions, when If the signal is detected as a coupling abnormality, a yellow audible and visual alarm will be triggered, signal acquisition will be paused, and abnormal information will be recorded; otherwise, it will be normal. Once the coupling is restored to normal and continues for a preset duration, the acquisition will automatically restart.
[0027] LSTM and CNN algorithm branch running state determination: single branch inference time When the time consumed exceeds the inference time threshold, it is judged as abnormal, automatically switches to single-branch independent operation mode, synchronously feeds back fault information to the cloud, receives cloud repair parameters and attempts to repair;
[0028] Industrial control computer computing load determination: When the CPU utilization rate is greater than the first utilization rate threshold and remains at the first utilization rate for a prolonged period, it is determined to be overloaded. Non-core tasks are automatically suspended, and core tasks such as data acquisition, preprocessing, inference, and early warning are prioritized.
[0029] After the CPU utilization rate drops below the second utilization rate threshold and remains at the second utilization rate for a certain period of time, non-core tasks are automatically resumed; all abnormal information, processing procedures and recovery status are recorded in real time and uploaded to the cloud.
[0030] Furthermore, the port listening program specifically includes: frame structure validity verification and Device ID whitelist matching verification; the frame structure validity determination formula is:
[0031]
[0032] in, The result of the frame structure legality determination; The actual length of the received frame; The standard frame length corresponds to a customized lightweight data frame format; This means that all conditions must be met simultaneously; This is the header identifier for the received frame; The standard header identifier is a fixed value; For the CRC16 checksum of the received frame; This is for CRC16 cyclic redundancy check calculation; To receive the raw data of the frame excluding the CRC16 checksum;
[0033] The formula for determining Device ID whitelist matching is:
[0034]
[0035] in, The result of the Device ID whitelist matching judgment; The unique identifier of the device carried in the received frame; This belongs to the operation; This does not belong to the operation; A set of device whitelists pre-stored in the cloud;
[0036] Double verification is only performed when the frame structure validity check result is valid and the Device ID whitelist match check result is a match. If either check fails, the data is discarded or the connection is refused.
[0037] Furthermore, the iterative process of the algorithm iterative optimization module is as follows: periodically and automatically summarize the data from the previous cycle to construct a training set;
[0038] The weights of the LSTM and CNN fusion algorithm are optimized based on the accuracy of dual-branch recognition. The weight update formula is as follows:
[0039]
[0040]
[0041] in, The weights of the CNN branch after the (k+1)th iteration; Let be the weights of the CNN branch after the k-th iteration; This represents the number of algorithm iterations; one iteration occurs per cycle. This represents the recognition accuracy of the current CNN branch. This represents the recognition accuracy of the current LSTM branch. The weights of the LSTM branches after the (k+1)th iteration;
[0042] At the same time, set the threshold fine-tuning step size for the classification threshold. Make minor adjustments.
[0043] Furthermore, the order of the ARIMA corrosion risk trend prediction module is p, d=1, q; where p is the autoregressive order, representing the use of the previous p sets of corrosion data in the modeling; d is the differencing order, performing first-order differencing on the original time series to achieve sequence stationarity; q is the moving average order, introducing the residuals of the previous q predictions to correct the prediction results; the model is trained based on historical defect data stored in the cloud, and when the prediction accuracy reaches a preset percentage, the future corrosion risk trend is output.
[0044] The ARIMA corrosion risk trend prediction module has a built-in remote alarm push unit. When the corrosion rate exceeds the historical average by several times, an alarm is triggered and pushed to the administrator.
[0045] Furthermore, the data transmission strategy between the cloud and the edge is as follows: when network connectivity is detected, data is uploaded according to priority when the network is normal; Level IV defect data is uploaded in real time, and Level I-III defect data is uploaded in batches according to preset frames; when the network is abnormal, the edge temporarily stores the data and automatically reconnects; after the network is restored, the data is resent according to priority and timestamp order; when the algorithm update verification fails, it automatically rolls back, and the cloud polls and pushes update packages at preset time intervals.
[0046] Secondly, the present invention provides an ultrasonic corrosion measurement method based on the system described above, the method comprising:
[0047] S100: The edge-end ultrasonic probe collects ultrasonic echo signals of pipeline corrosion. After analog-to-digital conversion by ADC, it synchronously records the source information and transmits it to the preprocessing module for preprocessing to generate feature vectors.
[0048] S200: The LSTM and CNN fusion algorithm module processes the feature vectors to achieve defect identification and risk classification, and outputs the identification results. If the identification is blurry, it will re-acquire the data.
[0049] S300: The cloud receives data transmitted from the edge through a port listening program, performs double verification, and stores the data according to the three-database architecture after the verification is passed.
[0050] S400: The cloud-based ARIMA trend prediction module predicts corrosion risk trends based on historical data and triggers alarms when anomalies occur; the algorithm iteration and optimization module generates incremental parameter packages and pushes them to the edge.
[0051] S500: The edge device interacts with the cloud via a customized lightweight data frame and an encrypted communication link, and performs differentiated upload and breakpoint resume according to the network status.
[0052] S600: The edge device receives incremental parameter packets pushed from the cloud and performs legality verification. If the verification fails, the version rollback mechanism is automatically triggered to ensure the stability and reliability of remote algorithm upgrades.
[0053] S700: The edge status monitoring module monitors three core states in real time, performs fault tolerance processing when an anomaly is detected, records the anomaly information and uploads it to the cloud to ensure stable system operation.
[0054] The beneficial effects of this invention are:
[0055] This invention provides an ultrasonic corrosion measurement system based on cloud-edge collaboration. By deploying algorithms such as LSTM and CNN at the edge, it achieves real-time defect identification and hierarchical early warning. At the same time, it optimizes the cloud-edge data interaction mechanism to solve the problems of poor real-time performance, low defect identification accuracy, and high risk of manual inspection in existing systems, thereby improving the safety and reliability of industrial pipeline corrosion monitoring.
[0056] The real-time early warning capability is greatly enhanced and the security risk is significantly reduced. By deploying all defect identification, classification and early warning tasks at the edge, the dependence on the cloud is eliminated. The total response time from data collection to early warning output is less than 1 second (preprocessing time ≤500ms, algorithm inference time ≤300ms). It can instantly trigger the red sound and light + vibration early warning of Level IV high-risk defects, buy time for on-site emergency response, and the edge supports offline independent operation, completely solving the delay and paralysis problems caused by the cloud dependence of the existing system, reducing the frequency of manual on-site inspection and security risks.
[0057] The defect identification accuracy is significantly improved, meeting the needs of refined monitoring. The LSTM and CNN fusion algorithm breaks through the limitations of a single algorithm. The two branches accurately capture the spatial morphology and temporal dynamic features of defects respectively. After adaptive weighted fusion, four types of defects can be accurately distinguished. The identification accuracy is more than 30% higher than that of traditional single algorithms, and the false judgment rate is controlled within 5%. Combined with the Softmax two-dimensional classification logic, the defect type and risk level are accurately classified simultaneously, providing support for refined operation and maintenance.
[0058] The cloud-edge collaboration efficiency is optimized and adapted to complex industrial scenarios. Through lightweight data interaction and dynamic task allocation, the cloud-edge computing power is utilized efficiently. The overall system operating efficiency is improved by 40% compared with the existing solution. Lightweight data encapsulation reduces the amount of data transmitted by more than 90%, reduces bandwidth consumption and latency, supports collaborative monitoring of multiple edge devices, and the incremental algorithm update mechanism enables continuous optimization of system performance without the need for overall model reconstruction, thus reducing operation and maintenance costs.
[0059] This invention is applicable to on-site detection and early warning of industrial pipelines. Attached Figure Description
[0060] To more clearly illustrate the technical solution of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0061] Figure 1 This is a diagram illustrating the overall architecture of the cloud-edge collaborative ultrasonic corrosion measurement system in this embodiment of the invention.
[0062] Figure 2 This is a schematic diagram of the high-voltage transmission drive and echo signal conditioning and receiving circuit of the ultrasonic probe in an embodiment of the present invention.
[0063] Figure 3 This is a flowchart of the ultrasonic pipeline corrosion cloud-edge collaborative detection data processing in an embodiment of the present invention;
[0064] Figure 4This is a branch logic diagram of the LSTM+CNN fusion algorithm in this embodiment of the invention;
[0065] Figure 5 This is a flowchart illustrating the cloud-edge data interaction process in an embodiment of the present invention.
[0066] Figure 6 This is a schematic diagram of the corrosion risk trend prediction module in an embodiment of the present invention;
[0067] Figure 7 This is a schematic diagram of the STM32-based edge acquisition and signal conditioning module in an embodiment of the present invention;
[0068] Figure 8 This is a schematic diagram of the data management module in an embodiment of the present invention. Detailed Implementation
[0069] Detailed Implementation: This implementation aims to address the core technical deficiencies of existing ultrasonic corrosion measurement systems in industrial pipeline monitoring scenarios, and to overcome the shortcomings of existing solutions in terms of real-time performance, accuracy, collaborative capabilities, and safety. In conjunction with the refined, efficient, and safe monitoring needs of industrial sites, the following improvement directions are specifically proposed to overcome existing technical bottlenecks:
[0070] Strong cloud reliance leads to significant latency. The traditional "edge acquisition - cloud full processing" mode has a total response time of over 3 seconds, high-risk defect warnings are delayed, the system crashes when the network is interrupted, and it has poor adaptability to complex scenarios.
[0071] Single algorithms have limitations. CNNs have difficulty capturing temporal features, LSTMs are weak in spatial feature extraction, and their defects are easily confused. Their recognition accuracy and classification accuracy are insufficient and cannot meet the requirements of refinement.
[0072] The imbalance in task allocation between the cloud and the edge leads to idle computing power at the edge and overload on the cloud. Data interaction lacks a lightweight design, and full uploads exacerbate bandwidth consumption and latency. The lack of dynamic adjustment and incremental algorithm update mechanisms results in low operating efficiency.
[0073] Based on the aforementioned shortcomings of existing technologies, the core objectives are clearly defined as follows: First, to achieve real-time identification and graded early warning of corrosion defects in industrial pipelines, significantly shortening response time and reducing the safety risks of manual on-site inspections; second, to improve the identification accuracy and grading accuracy of various defect types such as corrosion, cracks, deformation, and dents, adapting to the needs of refined monitoring and maintenance; and third, to build an efficient cloud-edge collaboration mechanism, optimizing task allocation and data interaction logic, balancing rapid on-site response speed with cloud-based global data management and trend analysis capabilities, and meeting the actual needs of multi-device collaborative monitoring in complex industrial scenarios.
[0074] The overall architecture of an ultrasonic corrosion measurement system based on cloud-edge collaboration in this embodiment is as follows: Figure 1As shown, the system is divided into three layers: edge acquisition and processing module, cloud-edge interaction protocol module, and cloud data management module. The edge layer completes ultrasonic data acquisition, preprocessing, and defect identification. The cloud-edge interaction protocol module realizes bidirectional data and command transmission between the edge and the cloud, and has built-in fault tolerance mechanisms for disconnection caching and retransmission. The cloud data management module is responsible for data storage, corrosion trend analysis, model iteration optimization, and visualization output.
[0075] The edge device includes an ultrasonic probe, an ADS836 ADC analog-to-digital converter chip, a lightweight embedded industrial control computer, an early warning terminal, a local SD cache module, and a GPS and clock module. The ultrasonic probe is used to collect ultrasonic echo signals from pipeline corrosion, with a frequency range of 50kHz-200kHz. The ADS836 ADC chip is used to convert the ultrasonic echo analog signals into digital signals, with a sampling rate of 200kHz and a bit depth of 16 bits. The specific circuit is as follows... Figure 2 As shown, ultrasonic excitation and echo signal conditioning are completed. The probe collects ultrasonic echo signals from the corroded area by attaching to the pipe inspection surface with a coupling agent. The lightweight embedded industrial control computer integrates an acquisition module, a preprocessing module, an LSTM+CNN fusion algorithm module, and a status monitoring module to realize signal preprocessing, defect identification and risk classification, system status monitoring, and fault tolerance processing. The local SD cache module is used to store preprocessed data and abnormal information, with a cache duration of ≥7 days. The GPS and clock module is used to synchronously record the traceability information of the measurement data, including Device ID, timestamp, and GPS location information.
[0076] The data processing flow for ultrasonic pipeline corrosion cloud-edge collaborative detection is as follows: Figure 3 As shown in the figure, the entire chain of steps, including wavelet denoising feature extraction, LSTM+CNN defect classification, network fault tolerance caching, and cloud model iteration, is fully illustrated.
[0077] Specifically, the preprocessing module's preprocessing flow includes: denoising the ADC-converted ultrasonic echo digital signal using db4 wavelet denoising with a denoising threshold of 0.02 to filter out interference signals below 50kHz; continuously extracting a 2ms duration interval from the peak of the first ultrasonic wave as the effective ultrasonic echo signal, this interval fully encompasses the echo information corresponding to pipe wall reflection and corrosion defects, extracting three types of feature parameters: peak amplitude, transit time, and amplitude attenuation rate; performing min-max normalization on the extracted feature parameters, mapping them to the [0,1] interval; and finally generating a 100×3-dimensional feature vector, where dimension 100 represents the number of time-series sampling points uniformly sampled within a single 2ms effective signal segment, and dimension 3 corresponds to the three types of features: peak amplitude, transit time, and amplitude attenuation rate. The total preprocessing time is ≤500ms.
[0078] Specifically, the LSTM+CNN fusion algorithm module has the following algorithm branch logic diagram: Figure 4 As shown, the structure is as follows: the input layer receives a 100×3 dimension feature vector;
[0079] The CNN branch reconstructs the feature vector into a 100×3×1 feature map, which is then processed by two convolutional layers (16 and 32 3×3 convolutional kernels respectively) and two 2×2 max pooling layers, and flattened to output an 800-dimensional spatial feature vector.
[0080] The LSTM branch receives a 100×3 time-series feature vector, sets up 2 layers of LSTM units (64 hidden units per layer), and adds a dropout layer (probability 0.2) to prevent overfitting, and outputs a 64-dimensional time-series feature vector;
[0081] The fusion layer adopts an adaptive weighted fusion method with initial weights. =0.5、 =0.5, the formula for fusion feature output is: (where F is the fused 864-dimensional feature vector, Output feature vectors for the CNN branch. (output feature vectors for the LSTM branch).
[0082] The fused features are then normalized using L2 and input into a Softmax classifier to identify four types of defects and four risk levels. The classification threshold is... =0.8, algorithm inference time ≤300ms.
[0083] Specifically, the status monitoring module is used to monitor three core states, including the ultrasonic probe coupling status, the LSTM+CNN algorithm branch running status, and the industrial control computer computing power load status.
[0084] Ultrasonic probe coupling status determination: With 80% of the normal coupling echo amplitude as the threshold, if the actual echo amplitude A_echo < 0.8 × A_std (A_std is the average normal coupling echo amplitude), it is determined to be an abnormal coupling, triggering a yellow audible and visual alarm, pausing signal acquisition and recording abnormal information; after coupling is restored and the amplitude meets the standard for 200ms, acquisition is automatically restarted.
[0085] Algorithm branch running status determination: When the single branch inference time T_inf > 150ms, it is determined to be abnormal, and it automatically switches to the single branch independent running mode, synchronously feeding back fault information to the cloud, receiving cloud repair parameters and attempting to repair;
[0086] Industrial control computer computing load judgment: When the CPU utilization rate (CPU_load) is ≥85% for 3 seconds, it is judged as overload, and non-core tasks such as historical data backup are automatically suspended, while core tasks such as data acquisition, preprocessing, inference, and early warning are prioritized; after the CPU utilization rate drops to below 70% for 5 seconds, non-core tasks are automatically resumed; all abnormal information, processing process and recovery status are recorded in real time and uploaded to the cloud.
[0087] The cloud-edge interaction protocol module is used to realize data interaction between the edge and the cloud, and transmit customized lightweight data frames;
[0088] Specifically, the customized lightweight data frame is of fixed length, ≤1024 bytes (1KB) after compression, and includes 5 parts: header identifier (0x5A5A, 2 bytes), data type (1 byte, enumerated encoding: 0x01=Level IV defect data, 0x02=Level I-III defect data, 0x03=Device status data, 0x04=Algorithm update package data, 0x05=Abnormal alarm feedback data), data length (2 bytes, range 0-256), payload (maximum 256 bytes, binary compressed encoding, including Device ID, timestamp, GPS and core measurement data), and CRC16 checksum (1 byte); the total length of the data frame satisfies the formula (Where L_total is the total length,) For the length of the header identifier, For data type length, For the length of the data length field, For the effective payload length, (Length of check bits).
[0089] Specifically, the cloud-edge data transmission strategy is as follows: network connectivity is detected via ping commands, with a ping command timeout threshold of 300ms; when the network is normal, data is uploaded according to priority, with Level IV risk defect data uploaded in real time, and Level I-III defect data uploaded in batches of 50 frames; when the network is abnormal, the edge device temporarily stores data and automatically reconnects, with the first 10 reconnections occurring at 5-second intervals, and subsequent reconnections occurring at 30-second intervals; after the network recovers, data is resent according to priority and timestamp order; when algorithm update verification fails, it automatically rolls back, and the cloud pushes update packages in a polling manner at 30-minute intervals. The cloud-edge data interaction flowchart is as follows. Figure 5 As shown.
[0090] The cloud platform includes servers with 8 cores, 16GB RAM, and CentOS 7 operating system. These servers are built on a microservice architecture and deploy port listening programs, a three-database storage architecture, an ARIMA corrosion risk trend prediction module, and an algorithm iteration and optimization module. The three-database storage architecture includes an InfluxDB 2.0 time-series database, a MySQL 8.0 relational database, and an independent MySQL high-risk defect database, used to store raw feature data (retained for ≥3 years), structured data (automatically backed up daily and permanently retained), and Level IV risk defect data, respectively. The ARIMA corrosion risk trend prediction module is used to predict future corrosion risk trends based on historical defect data, and the algorithm iteration and optimization module is used to iteratively optimize the weights and classification thresholds of the LSTM+CNN fusion algorithm weekly.
[0091] Specifically, after receiving data from the edge terminal, the cloud port monitoring program performs dual verification: frame structure validity verification and Device ID whitelist matching verification; the frame structure validity determination formula is as follows:
[0092] in The actual length of the received frame. For a standard frame length ≤ 1024 bytes, For the received frame header identifier, For the receive frame check bit, To receive the original data of the frame excluding the checksum;
[0093] The formula for determining Device ID whitelist matching is:
[0094]
[0095] in For the receiving frame device identifier, A pre-stored whitelist set in the cloud;
[0096] The total time for double verification is ≤10ms. If either verification fails, the data is discarded or the connection is rejected.
[0097] Specifically, the ARIMA corrosion risk trend prediction module has orders of p=2, d=1, and q=2. It is trained on a model based on three months of historical defect data stored in the cloud, achieving a prediction accuracy of ≥90%. It can output corrosion risk trends for the next 7, 30, and 90 days. Figure 6 As shown; when the corrosion rate exceeds twice the historical average, an email and SMS alert is triggered and pushed to the administrator.
[0098] Specifically, the iteration process of the algorithm iteration optimization module is as follows: every Monday morning, the data from the previous week is automatically summarized and a training set is constructed in a 7:2:1 ratio; based on the CNN branch recognition accuracy P1 and the LSTM branch recognition accuracy P2, the weights of the two branches are optimized through the weight update formula.
[0099] The weight update formula is:
[0100]
[0101]
[0102] Where k is the number of iterations;
[0103] Synchronous fine-tuning formula via threshold Fine-tune the classification threshold to avoid deviation. =0.8 core value; package ≤1MB incremental parameter package, and push it to the edge according to device type + algorithm version.
[0104] In this embodiment, an edge module including an ultrasound probe and a data acquisition unit was constructed, such as... Figure 7 As shown, it realizes ultrasonic echo signal acquisition, noise filtering, feature extraction and normalization processing, completes defect type identification and risk level classification through LSTM+CNN fusion algorithm, triggers differentiated on-site early warning, and caches key data to support offline independent operation.
[0105] A cloud-based data management module was built, and a distributed server cluster was deployed to construct the cloud module, such as... Figure 8 As shown, a time-series database, a relational database, and a high-risk defect database are established to store various types of data. The ARIMA model is used to complete corrosion trend prediction and anomaly alarm, and equipment life cycle management is carried out. The algorithm is iteratively optimized regularly and incremental update packages are generated.
[0106] A lightweight cloud-edge communication module was built by constructing a cloud-edge interaction protocol module. A customized frame structure was used to encapsulate key data and upload it in a differentiated manner according to priority. The boundaries between real-time and non-real-time tasks on the cloud and edge were clearly defined. The module supports incremental algorithm updates and anomaly rollback. Data transmission security and collaborative stability are ensured through encrypted links and device whitelists.
[0107] The system was debugged and operated collaboratively, completing the connection and collaborative debugging of the three major modules, verifying core functions such as data transmission, defect identification, and trend prediction, optimizing parameter configuration, and ensuring that the system meets the high-efficiency management and control requirements of pipeline corrosion detection in industrial sites.
[0108] Example:
[0109] The cloud-edge collaborative ultrasonic corrosion measurement system in this embodiment adopts an integrated architecture of "real-time processing at the edge + in-depth analysis in the cloud + lightweight collaborative interaction". It includes an edge acquisition and processing module, a cloud data management module, and a cloud-edge interaction protocol module. The three establish a stable collaborative connection through a TLS 1.3 encrypted communication link to achieve closed-loop operation of "rapid on-site response - global cloud control - algorithm iteration optimization". The hardware configuration, software implementation, operation process and interaction logic of each module are as follows.
[0110] This embodiment provides a measurement method based on the cloud-edge collaborative ultrasonic corrosion measurement system described above, for on-site detection and early warning of industrial pipelines, including the following steps:
[0111] Step S100: Design an ultrasonic acquisition device to collect pipeline corrosion echo signals and source information, preprocess the raw signals to generate feature vectors and cache them.
[0112] Step S200: Construct an LSTM+CNN fusion algorithm to identify defects and risk levels, design an early warning terminal and local cache, and support cloud-edge interaction.
[0113] Step S300: Deploy a data receiving and verification unit to perform dual verification on the data uploaded from the edge to ensure device and data security. A three-database architecture is adopted to achieve data classification, storage, and full lifecycle management to support data querying, traceability, and specialized maintenance. Step S400: Deploy an ARIMA time series prediction model to predict pipeline corrosion risk trends and issue anomaly alarms. An algorithm iteration unit is designed to periodically optimize and fuse algorithm parameters and push them to the edge to improve recognition accuracy.
[0114] Step S500: Design customized lightweight data frames to reduce transmission latency and bandwidth usage, achieve differentiated data upload and breakpoint resume to ensure no data loss, design incremental algorithm update and rollback mechanisms to ensure algorithm update stability, and clarify the boundaries of cloud-edge dynamic task allocation to adapt to different industrial monitoring scenarios.
[0115] Step S600: Establish an algorithm incremental update and automatic version rollback mechanism to ensure the stability of remote upgrades; construct an edge-cloud dynamic task allocation architecture to flexibly adjust the cloud-edge task boundaries according to on-site working conditions and adapt to different industrial monitoring scenarios.
[0116] Step S700 involves designing three core states for real-time monitoring: ultrasonic probe coupling, algorithm branch operation, and industrial control computer computing load. Corresponding fault-tolerant emergency handling strategies are executed for different abnormal states to ensure continuous system operation.
[0117] In this embodiment, the edge acquisition and signal conditioning module of this system can complete the underlying function implementation based on the STM32 main control chip, such as... Figure 6As shown, it can also be further equipped with an industrial control computer to realize high-level data processing, algorithm inference and cloud-edge interaction functions, adapting to multiple hardware deployment scenarios. Furthermore, step S100 may include the following sub-steps:
[0118] Step S110: Select a 50kHz-200kHz industrial contact ultrasonic probe, paired with an ADS836 16-bit ADC analog-to-digital converter chip, and set the sampling rate to 200kHz; connect the probe as follows... Figure 7 As shown, ultrasonic excitation and echo signal conditioning are completed. The probe is attached to the pipeline inspection surface through a coupling agent to collect ultrasonic echo signals from the corrosion area. During acquisition, the industrial control computer simultaneously reads the GPS latitude and longitude, the clock module timestamp, and the device ID. These are encapsulated with the digital echo signal into a standardized data frame of "device ID + timestamp + location information + echo digital signal" to ensure accurate acquisition and data traceability. The industrial control computer runs the signal preprocessing program locally, and the total processing time is ≤500ms.
[0119] Step S120: Use the db4 wavelet basis function (threshold 0.02) to denoise and filter out interference below 50kHz; extract the effective signal 2ms after the first echo peak, and extract three types of parameters: peak amplitude, transit time, and amplitude attenuation rate; normalize to the [0,1] interval after min-max, generate a 100×3 dimension feature vector and store it on the local SD card to provide support for subsequent algorithm recognition.
[0120] In this embodiment, step S200 may further include the following sub-steps:
[0121] Step S210: The model is trained based on the PyTorch framework, and after lightweight pruning and adaptation for ARM industrial control computers, the inference time is ≤300ms. The specific implementation is as follows:
[0122] 1. CNN branch design: The 100×3 one-dimensional feature vector is reconstructed into a 100×3×1 feature map, which is then processed by two convolutional layers (16 / 32 3×3 convolutional kernels) and two 2×2 max pooling layers. After flattening, the output is an 800-dimensional spatial feature vector F_CNN, which captures the spatial morphological features of defects.
[0123] 2. LSTM branch design: Receives a 100×3 time-series feature vector, sets up 2 layers of LSTM units (64 hidden units in each layer), and adds a dropout layer (probability 0.2) to prevent overfitting, outputting a 64-dimensional time-series feature vector F_LSTM to capture the dynamic trend of defects.
[0124] 3. Adaptive weighted fusion and classification recognition: using initial weights , Optimize the weights of the two branches (satisfying) The formula for fusion feature output is: ,in: For CNN branch weights, These are the branch weights of the LSTM, and their sum is always 1; The 800-dimensional feature vector output by the CNN branch; This is the 64-dimensional temporal feature vector output by the LSTM branch; This is the 864-dimensional feature vector output after the two-branch fusion; the fused features are then L2 normalized and input into a Softmax classifier, with the classification confidence calculated using the following formula: ,in: The confidence level for identifying the i-th type of defect / risk level (range [0,1]); For fusion features The output value corresponding to the i-th class after inputting into the Softmax classifier; It is a natural exponential function; Category index (1-4, corresponding to 4 types of defects / 4 levels of risk); To perform a summation operation on the four types of output values; a classification threshold is set. =0.8, according to the classification determination formula ,in: The classification threshold is fixed at 0.8. This is the maximum confidence level among the four categories of identification; this formula is used to identify four types of defects and four risk levels, determine the results based on probability, and trigger the corresponding process.
[0125] Step S220: The early warning terminal connects to the industrial control computer via RS485 and executes differentiated early warnings according to the risk level; the 128G SD card serves as a ring buffer, which can cache 10,000 frames of data (period ≥ 7 days), sorted by "timestamp + priority", and supports cloud-edge interaction and offline data retention.
[0126] In this embodiment, step S300 may further include the following sub-steps:
[0127] Step S310: Configure the server with 8 cores, 16GB RAM, and CentOS 7 system, build a microservice architecture, and communicate with the edge terminal via TCP / IP port; deploy a port listening program to perform double verification (frame structure validity + Device ID whitelist) after receiving data, where the formula for determining frame structure validity is as follows:
[0128] ,in: The result of the frame structure legality determination (only "legal" or "illegal"); The actual length of the received frame; Standard frame length (≤1024 bytes, corresponding to a customized lightweight data frame format). For logical AND operation (all conditions must be met simultaneously); This is the header identifier for the received frame; The standard header identifier is a fixed value; For the CRC16 checksum of the received frame; This is for CRC16 cyclic redundancy check calculation; The received frame contains the raw data excluding the CRC16 checksum; the Device ID whitelist matching formula is as follows: ,in: The result of the Device ID whitelist matching judgment (only "match" or "not match"); The unique identifier of the device carried in the received frame; This is the "belongs to" operation; This is the "not belonging" operation; A pre-stored set of device whitelists in the cloud; only when Double verification is performed in real time (symbols here have the same meaning as above). If either verification fails, the data is immediately discarded or the connection is rejected. The total time for double verification is ≤10ms, ensuring the security of cloud-edge data transmission. A three-database architecture of "time-series database + relational database + high-risk defect database" is adopted; InfluxDB 2.0 is used to store raw feature data, and the data retention period meets the requirements. ,in: This refers to the actual retention time of the original feature data; It supports "greater than or equal to" operations; MySQL 8.0 is used to store structured data, performs daily automatic backups and retains them permanently; an independent MySQL high-risk defect database is used to store Level IV risk defect data, providing data support for special operations and maintenance of high-risk defects.
[0129] In this embodiment, step S400 may further include the following sub-steps:
[0130] Step S410: With model order p=2, d=1, q=2, the model is trained and updated using 3 months of historical defect data. This can predict the corrosion risk trend of a single device in the next 7 / 30 / 90 days. An abnormal corrosion rate threshold is set; if the rate exceeds twice the mean, an email and SMS alert is triggered. The prediction accuracy is ≥90%. The iterative process is automatically executed every Monday morning, summarizing the previous week's data to build a training set (7:2:1 partitioning), optimizing the weights and classification threshold of the LSTM+CNN fusion algorithm, and packaging an incremental parameter package of ≤1MB. This package is then pushed to devices based on their type and algorithm version to ensure continuous algorithm optimization.
[0131] Step S420: The frame structure is of fixed length (≤1KB after compression), including 5 parts such as the header identifier (0x5A5A), reducing transmission volume by more than 90%; when the network is normal, data is uploaded according to priority; when there is an anomaly, it is temporarily stored and reconnected, and resent after recovery; the algorithm update verification fails and automatically rolls back; the cloud periodically polls and pushes data; the edge handles real-time tasks, and the cloud handles high-computing-power non-real-time tasks, and the boundaries can be flexibly adjusted; at the same time, the iteration program is automatically executed every Monday morning, summarizing the data of the previous week to build a training set (7:2:1 partition), and optimizing the weights of the LSTM+CNN fusion algorithm based on the dual-branch recognition accuracy, with the weight update formula being... , ,in: The weights of the CNN branch after the (k+1)th iteration; Let be the weights of the CNN branch after the k-th iteration; This represents the number of algorithm iterations (it iterates once a week). This represents the recognition accuracy of the current CNN branch. This represents the recognition accuracy of the current LSTM branch. The weights of the LSTM branch after the (k+1)th iteration are given; the classification threshold is simultaneously fine-tuned, and the threshold fine-tuning formula is as follows: The following is an explanation of each letter and symbol: This is the classification threshold adjusted after the (k+1)th iteration; The classification threshold is the threshold after the k-th iteration; For addition or subtraction operations (dynamically selected based on recognition accuracy, without deviation) =0.8 core value); Fine-tune the threshold step size; encapsulate incremental parameter packages of ≤1MB and push them to devices and algorithms based on device type and algorithm version to ensure continuous algorithm optimization.
[0132] Step S430: If the transit time fluctuates by ±10%, the probe coupling is determined to be abnormal; if the algorithm branch computing power is ≥90% for 10 seconds, the operation is determined to be abnormal; if the CPU load is ≥80% for 1 minute, the load is determined to be too high. Correspondingly, fault tolerance strategies such as audible and visual warnings, single-branch operation, and closing irrelevant programs are triggered to ensure that the core detection function is not interrupted.
[0133] In this embodiment, step S500 may further include the following sub-steps:
[0134] Step S510: The customized lightweight data frame is of fixed length (≤1KB after compression), containing five parts: header identifier (0x5A5A, 2 bytes), data type (1 byte), data length (2 bytes), payload (maximum 256 bytes), and CRC16 checksum (1 byte), reducing transmission volume by more than 90%; the formula for determining the total length of the data frame is as follows: ,in: Total length of the data frame (in bytes); The header identifier length (fixed to 2 bytes); The length of the data type (fixed to 1 byte); The length of the data length field (fixed to 2 bytes); Payload length (0-256 bytes); The length of the CRC16 checksum is fixed at 1 byte; it also satisfies the total length limit formula. (1024 bytes = 1KB) to ensure lightweight data frames.
[0135] Step S520: Network connectivity is checked via ping command (timeout 300ms). The network connectivity determination formula is as follows: ,in: The network connectivity determination result (only "normal" or "abnormal"); The actual response time for the ping command (in milliseconds). This is the timeout threshold for the ping command (fixed at 300ms). For the "greater than or equal to" operation, For "greater than" operations; when the network is normal, uploads are made according to priority (Level IV real-time, Levels I-III 50 frames / batch); in case of an anomaly, data is temporarily stored and reconnected, with the reconnection interval formula being... ,in: Reconnection interval (in seconds); This represents the number of reconnection attempts; after the network is restored, the temporary data will be resent in order of priority from high to low and timestamp from early to late.
[0136] In this embodiment, step S600 may further include the following sub-steps:
[0137] Step S610: The cloud periodically polls and pushes incremental algorithm update packages every 30 minutes. (Unit: seconds), where: The cloud polling push interval (unit: seconds) is used to determine the integrity and validity of the update package received at the edge. If the verification fails, the system will automatically roll back to the previous stable algorithm version, thus completely avoiding detection failure caused by algorithm update anomalies and ensuring the stability of remote iterative upgrades.
[0138] Step S620: Adopting a cloud-edge collaborative architecture of "edge-driven, cloud-assisted", the task division boundaries are clearly defined. The edge device carries low-latency real-time tasks such as ultrasonic acquisition, signal preprocessing, defect identification, and real-time early warning, while the cloud device carries high-computing-power non-real-time tasks such as corrosion trend prediction, model iteration optimization, and big data storage and analysis. Moreover, the task allocation boundaries can be flexibly adjusted according to the industrial site conditions to adapt to various complex monitoring scenarios.
[0139] In this embodiment, step S700 may further include the following sub-steps:
[0140] Step S701: Deploy a status monitoring program on the edge industrial control computer, with a sampling period of 100ms, synchronously collect three core status parameters, and transmit them to the status judgment unit in real time to achieve timely detection of anomalies; the sampling period formula is as follows: (Unit: ms), where The sampling cycle for status monitoring is set to ensure that anomalies are captured in a timely manner.
[0141] Step S702: Monitor the coupling status of the ultrasound probe, using 80% of the normal coupling echo amplitude as the threshold. The coupling status determination formula is as follows: ,in: The result of the probe coupling status determination (only "normal" or "abnormal"); This represents the actual amplitude of the acquired echo signal; The average amplitude of the echo signal under normal coupling conditions; The threshold for determining coupling anomalies is used; if the amplitude is below the threshold, a coupling anomaly is determined, triggering a yellow audible and visual alarm, pausing signal acquisition, and recording the anomaly information; the coupling recovery determination formula is:
[0142] ,in: The result is the coupling recovery determination result; The duration for amplitude to reach the target (unit: ms); after coupling recovery, acquisition will automatically restart, and abnormal and recovery records will be uploaded to the cloud.
[0143] Step S703: Monitor the running status of CNN / LSTM algorithm branches. The formula for judging abnormal algorithm branches is: ,in: This is the result of determining the running status of the algorithm branch; The actual inference time for a single branch of CNN / LSTM (unit: ms); 150 is the threshold for single-branch inference time; if the single-branch inference time is greater than 150ms, it is considered an abnormal operation and will automatically switch to single-branch independent operation mode to ensure that the recognition and classification function is not interrupted; the fault information is simultaneously fed back to the cloud, the cloud repair parameters are received and repair is attempted, and if the repair is successful, dual-branch operation is restored; if it fails, single-branch operation continues and an alarm is issued.
[0144] Step S704: Monitor the computing load of the industrial control computer. The formula for determining the computing load is:
[0145] ,in: The result is the computing power load assessment result for the industrial control computer. This represents the actual CPU utilization rate of the industrial control computer; 85% is the abnormal threshold for CPU utilization. 3 represents the duration of high CPU usage (in seconds); 3 is the threshold for high usage duration; a CPU usage rate ≥85% for 3 seconds is considered excessively high, automatically suspending non-core tasks and prioritizing the operation of core tasks; the load recovery determination formula is... ,in This represents the load recovery assessment result; 70% is the CPU utilization recovery threshold. 5 represents the duration of low CPU usage (in seconds); 5 is the threshold for low usage duration; after the load drops below 70% and lasts for 5 seconds, non-core tasks are automatically resumed, and load anomaly information is recorded and uploaded to the cloud throughout the process.
[0146] Step S705: Record all exception information, processing procedures, and recovery status of the three states in real time, with the local cache duration satisfying the formula. (Unit: days), of which: The actual local caching duration for abnormal information is recorded; daily summaries are uploaded to the cloud for permanent storage, providing data support for system optimization and equipment maintenance.
[0147] In summary, this embodiment details the implementation of the edge acquisition and processing module in a cloud-edge collaborative ultrasonic corrosion measurement system. It clarifies the processes of ultrasonic echo signal acquisition, source information recording, and preprocessing to generate feature vectors. An LSTM+CNN fusion algorithm is constructed to achieve defect identification and risk classification, and an early warning terminal and local cache are designed to support cloud-edge interaction. A dual verification mechanism for data reception and a three-database architecture are deployed to ensure data security and full lifecycle management. An ARIMA model is used to predict corrosion risk trends and generate anomaly alarms, and an algorithm iteration optimization strategy is designed. Lightweight data frames, differentiated uploads, breakpoint resume, and algorithm incremental update rollback mechanisms are customized. The dynamic task allocation boundaries between the cloud and edge are defined, and three core status monitoring systems and corresponding fault-tolerant emergency handling strategies are deployed, covering system hardware configuration, software implementation, operation process, and interaction logic.
[0148] This application discloses a cloud-edge collaborative ultrasonic corrosion measurement system and method, aiming to solve the technical problems of prominent latency due to strong cloud dependence, insufficient recognition accuracy of single algorithms, imbalance in cloud-edge task allocation, and low operating efficiency in existing technologies. The system includes an edge terminal, a TLS 1.3 encrypted communication link, and a cloud terminal. The edge terminal integrates modules such as an ultrasonic probe, an ADS836 ADC chip, and a lightweight chemical control computer to achieve ultrasonic echo signal acquisition, db4 wavelet denoising preprocessing, defect identification and risk classification using an LSTM+CNN dual-branch fusion algorithm, and real-time monitoring of probe coupling, algorithm operation, and computing load, while performing fault-tolerant processing. The cloud terminal deploys an 8-core 16G server and a three-database storage architecture to complete data double verification, ARIMA corrosion risk trend prediction, and weekly algorithm iteration optimization. The cloud and edge terminals achieve differentiated uploading and breakpoint resumption through customized lightweight data frames (≤1KB), and dynamically allocate tasks using an "edge-driven, cloud-assisted" strategy. This application reduces cloud dependence, shortens response time, improves defect identification accuracy and system stability, reduces bandwidth consumption, and is suitable for complex scenarios in industrial pipeline corrosion measurement, making it widely applicable in the field of ultrasonic corrosion monitoring.
[0149] This application discloses a cloud-edge collaborative ultrasonic corrosion measurement system and method. Its core lies in employing an edge-cloud collaborative architecture, using an LSTM+CNN fusion algorithm to achieve defect identification and risk classification, and designing a customized lightweight data transmission mechanism and multi-state monitoring fault-tolerant strategy. This addresses the problems of high latency, low accuracy, and poor efficiency in existing technologies, improving system adaptability and stability. In summary, the hardware configuration, software implementation, operation process, interaction logic, and effect verification of the cloud-edge collaborative ultrasonic corrosion measurement system are described in detail. Those skilled in the art can build, debug, and run the system based on the content of this description and existing technologies, achieving all the technical solutions of this application without creative effort. The scope of protection of this application is determined by the claims, not by the limitations of this embodiment.
[0150] Those skilled in the art can build, debug, and run the system by combining this description and existing technology. All technical solutions of this invention can be realized without creative effort. The scope of protection of this invention is defined by the claims, not by this embodiment.
Claims
1. A cloud-edge collaborative ultrasonic corrosion measurement system, characterized in that, The system includes: an edge terminal, an encrypted communication link, and a cloud terminal; The edge device includes an ultrasonic probe, an ADC analog-to-digital converter chip, a lightweight embedded industrial computer, an early warning terminal, a local SD cache module, and a GPS and clock module; The ultrasonic probe is used to acquire ultrasonic echo signals from pipeline corrosion; the ADC analog-to-digital converter chip is used to convert the ultrasonic echo analog signals into digital signals; the lightweight embedded industrial computer integrates an acquisition module, a preprocessing module, an LSTM and CNN fusion algorithm module, and a status monitoring module to realize signal preprocessing, defect identification and risk classification, system status monitoring, and fault-tolerant processing; the early warning terminal is connected to the lightweight embedded industrial computer to execute differentiated early warnings according to risk levels; the local SD cache module is used to store preprocessed data and anomaly information; the GPS and clock module is used to synchronously record traceability information of measurement data. The encrypted communication link is used to enable data interaction between the edge and the cloud, and to transmit customized lightweight data frames; The cloud includes a server, which is built with a microservice architecture and deploys a port listening program, a three-database storage architecture, an ARIMA corrosion risk trend prediction module, and an algorithm iteration and optimization module. The port listening program receives data from the edge and performs double verification; the three-database storage architecture includes a time-series database, a relational database, and a high-risk defect database, which are used to store raw feature data, structured data, and Level IV risk defect data, respectively; the ARIMA corrosion risk trend prediction module is used to predict future corrosion risk trends based on historical defect data; and the algorithm iteration optimization module is used to iteratively optimize the weights and classification thresholds of the LSTM and CNN fusion algorithm weekly.
2. The ultrasonic corrosion measurement system based on cloud-edge collaboration according to claim 1, characterized in that: The preprocessing module specifically includes: using db4 wavelet denoising on the ultrasonic echo digital signal after ADC conversion, with a denoising threshold of 0.02, to filter out interference signals below 50kHz; continuously extracting a 2ms time interval from the peak moment of the first ultrasonic wave as the effective ultrasonic echo signal, which fully contains the echo information corresponding to pipe wall reflection and corrosion defects, and extracting three types of feature parameters: peak amplitude, transit time, and amplitude attenuation rate; performing min-max normalization on the extracted feature parameters, mapping them to the [0,1] interval, and generating an n×3 dimension feature vector, where n is the number of time-series sampling points uniformly sampled within a single 2ms effective signal segment.
3. The ultrasonic corrosion measurement system based on cloud-edge collaboration according to claim 2, characterized in that: The LSTM and CNN fusion algorithm module specifically includes: The input layer receives an n×3 dimensional feature vector generated by the preprocessing module; The CNN branch reconstructs the n×3 dimensional feature vector received by the input layer into an n×3×1 feature map, which is then processed by two convolutional layers and two 2×2 max pooling layers to output a spatial feature vector. The LSTM branch takes the n×3 dimension feature vector received by the input layer, passes it through 2 layers of LSTM units, and adds a dropout layer to prevent overfitting, and outputs a temporal feature vector. The fusion layer employs an adaptive weighted fusion method, and the fusion feature output formula is as follows: ,in, The fused feature vector The spatial feature vector output by the CNN branch. This is the temporal feature vector output by the LSTM branch. For the weights of the CNN branches, The weights are the weights of the LSTM branches, and the sum of the two is always 1; The fused feature vectors are then normalized using L2 and input into a Softmax classifier to identify defects and risk levels.
4. The ultrasonic corrosion measurement system based on cloud-edge collaboration according to claim 1, characterized in that: The customized lightweight data frame is of fixed length and includes five parts: header identifier, data type, data length, payload, and CRC16 checksum. The data types include enumerated codes: 0x01 = Level IV defect data, 0x02 = Level I-III defect data, 0x03 = Equipment status data, 0x04 = Algorithm update package data, 0x05 = Abnormal alarm feedback data; The payload includes device ID, timestamp, GPS, and measurement data; The total length of the data frame satisfies the formula Where L_total is the total length. For the length of the header identifier, For data type length, For the length of the data length field, For the effective payload length, This is the length of the check bit.
5. The ultrasonic corrosion measurement system based on cloud-edge collaboration according to claim 1, characterized in that: The status monitoring module is used to monitor three core states, including the ultrasonic probe coupling status, the LSTM and CNN algorithm branch running status, and the industrial control computer computing power load status. Ultrasonic probe coupling status determination: 80% of the normal coupling echo amplitude is used as the threshold. This represents the actual amplitude of the acquired echo signal; The mean amplitude of the echo signal under normal coupling conditions, when If the signal is detected as a coupling abnormality, a yellow audible and visual alarm is triggered, signal acquisition is paused, and the abnormal information is recorded; otherwise, it is normal. After the coupling returns to normal and continues for the preset duration, the data acquisition will automatically restart. LSTM and CNN algorithm branch running state determination: single branch inference time When the time consumed exceeds the inference time threshold, it is judged as abnormal, automatically switches to single-branch independent operation mode, synchronously feeds back fault information to the cloud, receives cloud repair parameters and attempts to repair; Industrial control computer computing load determination: When the CPU utilization rate is greater than the first utilization rate threshold and remains at the first utilization rate for a prolonged period, it is determined to be overloaded. Non-core tasks are automatically suspended, and core tasks such as data acquisition, preprocessing, inference, and early warning are prioritized. After the CPU utilization rate drops below the second utilization rate threshold and remains at the second utilization rate for a certain period of time, non-core tasks are automatically resumed; all abnormal information, processing procedures and recovery status are recorded in real time and uploaded to the cloud.
6. The ultrasonic corrosion measurement system based on cloud-edge collaboration according to claim 1, characterized in that: The port listening program specifically includes: frame structure validity verification and device ID whitelist matching verification; the frame structure validity determination formula is: in, The result of the frame structure legality determination; The actual length of the received frame; The standard frame length corresponds to a customized lightweight data frame format; This means that all conditions must be met simultaneously; This is the header identifier for the received frame; The standard header identifier is a fixed value; For the CRC16 checksum of the received frame; This is for CRC16 cyclic redundancy check calculation; To receive the raw data of the frame excluding the CRC16 checksum; The formula for matching device IDs to the whitelist is as follows: in, The result of the device ID whitelist matching judgment; The unique identifier of the device carried in the received frame; This belongs to the operation; This does not belong to the operation; A set of device whitelists pre-stored in the cloud; Double verification is only performed when the frame structure validity check result is valid and the device ID whitelist match check result is a match. If either check fails, the data is discarded or the connection is refused.
7. The ultrasonic corrosion measurement system based on cloud-edge collaboration according to claim 1, characterized in that: The iterative process of the algorithm iteration optimization module is as follows: periodically and automatically summarize the data from the previous cycle to construct a training set; The weights of the LSTM and CNN fusion algorithm are optimized based on the accuracy of dual-branch recognition. The weight update formula is as follows: in, The weights of the CNN branch after the (k+1)th iteration; Let be the weights of the CNN branch after the k-th iteration; This represents the number of algorithm iterations; one iteration occurs per cycle. This represents the recognition accuracy of the current CNN branch. This represents the recognition accuracy of the current LSTM branch. The weights of the LSTM branches after the (k+1)th iteration; At the same time, set the threshold fine-tuning step size for the classification threshold. Make minor adjustments.
8. The ultrasonic corrosion measurement system based on cloud-edge collaboration according to claim 1, characterized in that: The ARIMA corrosion risk trend prediction module has orders p, d, and q; where p is the autoregressive order, representing the use of the previous p sets of corrosion data in the modeling; d=1 is the differencing order, performing first-order differencing on the original time series to achieve sequence stationarity; q is the moving average order, incorporating the residuals of the previous q predictions to correct the prediction results; the model is trained based on historical defect data stored in the cloud, and when the prediction accuracy reaches a preset percentage, it outputs the future corrosion risk trend; The ARIMA corrosion risk trend prediction module has a built-in remote alarm push unit. When the corrosion rate exceeds the historical average by several times, an alarm is triggered and pushed to the administrator.
9. The ultrasonic corrosion measurement system based on cloud-edge collaboration according to claim 1, characterized in that: The data transmission strategy between the cloud and the edge is as follows: when the network is normal, data is uploaded according to priority; Level IV defect data is uploaded in real time, and Level I-III defect data is uploaded in batches according to preset frames; when the network is abnormal, the edge temporarily stores the data and automatically reconnects; after the network is restored, the data is resent according to priority and timestamp order; when the algorithm update verification fails, it automatically rolls back, and the cloud polls and pushes update packages at preset time intervals.
10. An ultrasonic corrosion measurement method based on the system of any one of claims 1-9, characterized in that: The method includes: S100: The edge-end ultrasonic probe collects ultrasonic echo signals of pipeline corrosion. After analog-to-digital conversion by ADC, it synchronously records the source information and transmits it to the preprocessing module for preprocessing to generate feature vectors. S200: The LSTM and CNN fusion algorithm module processes the feature vectors to achieve defect identification and risk classification, and outputs the identification results. If the identification is blurry, it will re-acquire the data. S300: The cloud receives data transmitted from the edge through a port listening program, performs double verification, and stores the data according to the three-database architecture after the verification is successful. S400: The cloud-based ARIMA trend prediction module predicts corrosion risk trends based on historical data and triggers alarms when anomalies occur; the algorithm iteration and optimization module generates incremental parameter packages and pushes them to the edge. S500: The edge device interacts with the cloud via a customized lightweight data frame and an encrypted communication link, and performs differentiated upload and breakpoint resume according to the network status. S600: The edge device receives incremental parameter packets pushed from the cloud and performs legality verification. If the verification fails, the version rollback mechanism is automatically triggered to ensure the stability and reliability of remote algorithm upgrades. S700: The edge status monitoring module monitors three core states in real time, performs fault tolerance processing when an anomaly is detected, records the anomaly information and uploads it to the cloud to ensure stable system operation.