Ultrasonic-based gastric wall peristalsis detection method, device, equipment and storage medium

By combining a high frame rate ultrasound probe and the PBT-CCA algorithm with multi-scale feature fusion and convolutional neural networks, a non-invasive and high-precision gastric motility detection method was achieved. This method overcomes the limitations of existing gastric motility assessment methods and patient discomfort, and can accurately identify abnormal gastric motility.

CN121606318BActive Publication Date: 2026-04-28SICHUAN CANCER HOSPITAL
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SICHUAN CANCER HOSPITAL
Filing Date
2026-02-02
Publication Date
2026-04-28

AI Technical Summary

Technical Problem

Existing methods for assessing gastric motility are invasive, involve radiation exposure, are costly, and have low detection sensitivity, making them difficult to effectively assess abnormal gastric motility.

Method used

A high frame rate ultrasound probe was used to continuously acquire dynamic echo signals from the transverse section of the anterior wall of the gastric antrum. The images were then differentially analyzed using the PBT-CCA joint algorithm and fitted to form a continuous peristaltic wave propagation trajectory. Key dynamic parameters were extracted using a multi-scale feature fusion algorithm, and abnormal features were analyzed using a convolutional neural network to visualize the propagation trajectory.

Benefits of technology

It achieves non-invasive and accurate gastric motility detection, improving detection accuracy and comfort, and can quantitatively assess gastric motility status and identify abnormalities such as gastroparesis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121606318B_ABST
    Figure CN121606318B_ABST
Patent Text Reader

Abstract

The application discloses an ultrasonic-based gastric wall peristalsis detection method and device, equipment and storage medium, relates to the technical field of ultrasonic imaging, and the method ensures high space-time resolution of original data by continuously collecting dynamic echo signals of the transverse plane of the anterior wall of the gastric antrum through a high-frame-rate ultrasonic probe; then, the difference between adjacent frames of images is analyzed by adopting a phase tracking and cross-correlation algorithm, and gastric wall movement is converted into a quantifiable discrete displacement vector field; in the next step, the discrete displacement field is fitted into a continuous propagation trajectory, and the propagation process of peristaltic waves from the gastric body to the pylorus is intuitively presented; secondly, key kinetic parameters such as propagation speed and peristaltic intensity are extracted from the trajectory by a multi-scale feature fusion algorithm, and the leap from qualitative observation to quantitative evaluation is realized; finally, the fusion visualization of vector arrows and color coding simultaneously presents three-dimensional information of the propagation direction, speed and intensity of peristaltic waves, and the detection precision of gastric wall peristalsis is relatively obviously improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of ultrasound imaging technology, and in particular to a method, apparatus, device, and storage medium for detecting gastric wall peristalsis based on ultrasound. Background Technology

[0002] Gastric peristalsis is caused by rhythmic slow waves generated by interstitial cells of the stomach (ICC), which, under neural regulation, drive the smooth muscle of the stomach wall to produce periodic contractions, forming a mechanical propulsion wave that propagates from the stomach body to the pylorus.

[0003] This process is the key dynamic mechanism for achieving gastric emptying and food digestion. Parameters such as the frequency, direction of propagation, velocity, and amplitude of peristaltic waves are important indicators for evaluating the state of gastric motility. Abnormal peristaltic activity often leads to abnormalities such as gastroparesis, functional dyspepsia, and delayed postoperative emptying.

[0004] Current methods for assessing gastric motility mainly include: barium meal radiography, radionuclide gastric emptying scan, MRI, electrogastrography, and high-resolution pressure catheter detection. Although these methods can provide certain functional or structural information, they have the following shortcomings: (1) Invasiveness: For example, pressure catheters need to be inserted into the gastric cavity, causing discomfort to patients; (2) Radiation exposure: For example, barium meal radiography and radionuclide scanning limit the feasibility of repeated testing; (3) Insufficient cost and timeliness: MRI is expensive and has a long testing cycle, making it difficult to achieve dynamic observation; (4) Limited detection sensitivity: It is difficult to identify low-frequency, small-amplitude peristaltic waves.

[0005] In summary, existing methods for assessing gastric motility have significant limitations and can cause discomfort to patients. Summary of the Invention

[0006] The main objective of this application is to provide a method, device, equipment, and storage medium for detecting gastric wall peristalsis based on ultrasound, so as to solve the problems of obvious limitations and patient discomfort in existing gastric motility assessment methods.

[0007] To achieve the above objectives, this application provides the following technical solution:

[0008] A method for detecting gastric wall peristalsis based on ultrasound, wherein the method is applied to the gastric organ of a subject that has been exposed to ultrasound contrast agent, and the method includes:

[0009] Step S1: A series of dynamic echo signals of the subject's gastric organ based on the cross-sectional area of ​​the anterior wall of the gastric antrum are continuously acquired by an external ultrasound probe with a preset frame rate to obtain the original ultrasound image sequence.

[0010] Step S2: Differentiate adjacent frames of the original ultrasound image sequence using the PBT-CCA joint algorithm to obtain a discrete displacement vector field based on a pair of adjacent frames;

[0011] Step S3: Fit all discrete displacement vector fields to the propagation trajectory of a continuous creeping wave;

[0012] Step S4: Extract the key dynamic parameters of the continuous creeping wave propagation trajectory using a multi-scale feature fusion algorithm;

[0013] Step S5: The key dynamic parameters are superimposed onto the continuous peristaltic wave propagation trajectory in the form of vector arrows to obtain a visualized propagation trajectory with prominently displayed peristaltic wave propagation direction and intensity.

[0014] Effective effects:

[0015] Steps S1 to S5 of this application continuously acquire dynamic echo signals from the cross-section of the anterior wall of the gastric antrum using a high frame rate ultrasound probe, ensuring high spatiotemporal resolution of the raw data and providing a reliable foundation for subsequent analysis. Then, by employing a PBT-CCA (phase tracking and cross-correlation algorithm) combined algorithm to analyze the differences between adjacent frames, the gastric wall motion is transformed into a quantifiable discrete displacement vector field, solving the problem of traditional methods' difficulty in capturing submicron-level tissue displacement. The next step is to fit the discrete displacement field into a continuous propagation trajectory, visually presenting the peristaltic wave's propagation process from the gastric body to the pylorus, allowing medical staff to directly observe the gastric motility. Secondly, a multi-scale feature fusion algorithm extracts key dynamic parameters such as propagation velocity and peristaltic intensity from the trajectory, achieving a leap from qualitative observation to quantitative assessment. Finally, through the fusion visualization of vector arrows and color coding, the three-dimensional information of the propagation direction, velocity, and intensity of the peristaltic wave is simultaneously displayed, significantly improving the detection accuracy of gastric wall peristalsis. The entire process is non-invasive, greatly improving patient comfort while ensuring detection accuracy.

[0016] As a further improvement to this application, step S2 involves differentiating adjacent frames of the original ultrasound image sequence using the PBT-CCA joint algorithm to obtain a discrete displacement vector field based on a pair of adjacent frames, including:

[0017] Step S21: Preprocess the original ultrasound image sequence to obtain a preprocessed ultrasound image sequence;

[0018] Step S22: Perform Fourier transform on adjacent frame images of the processed ultrasound image sequence to obtain a cross power spectrum based on a pair of adjacent frames;

[0019] Step S23: Obtain the image translation amount of the current adjacent frame based on the peak position of the current cross power spectrum, and define the image translation amount as the initial displacement estimate;

[0020] Step S24: Obtain the cross-correlation function of the current cross-power spectrum using a cross-correlation algorithm;

[0021] Step S25: Starting from the current initial displacement estimate based on the image position of the current cross power spectrum, find the displacement corresponding to the maximum value of the cross-correlation coefficient of the cross-correlation function in the form of circular radiation from the starting point, and define it as the final displacement estimate.

[0022] Step S26: Spatial interpolation is performed on the final displacement estimate of the current adjacent frame to obtain the discrete displacement vector field of the current adjacent frame.

[0023] Beneficial effects:

[0024] Steps S21 to S26 of this application effectively eliminate noise interference in the original ultrasound image sequence through preprocessing, providing a high-quality data foundation for subsequent analysis and creating the necessary conditions for sub-micron displacement detection. Subsequently, in the core displacement detection step, the cross-power spectrum is calculated through Fourier transform, and the anti-noise properties of phase information are used to achieve coarse localization, enabling the initial displacement estimate to reach sub-pixel accuracy. The next step further refines the displacement estimate through local search, using a circumferential radiation search strategy to find the maximum cross-correlation coefficient near the initial estimate, ensuring computational efficiency while achieving sub-micron displacement detection resolution. Finally, the discrete displacement vector field generated by spatial interpolation fully reflects the motion characteristics of the gastric wall tissue in the ultrasound imaging plane, providing high-precision data support for subsequent trajectory reconstruction. The cross-power spectrum analysis and cross-correlation calculation in steps S21 to S26 of this application are complementary. The cross-power spectrum analysis uses global phase information for rapid localization, while the cross-correlation calculation uses local feature matching for precise localization. This joint strategy not only overcomes the limitations of a single algorithm in the motion detection of complex tissues, but also significantly improves computational efficiency. Furthermore, the introduction of the circumferential radiation search strategy further optimizes the search efficiency and reduces computational complexity while ensuring accuracy. Spatial interpolation can use a bicubic interpolation algorithm to ensure the continuity and smoothness of the displacement vector field and eliminate the trajectory breakage problem caused by sampling rate limitations.

[0025] As a further improvement to this application, step S3, fitting all discrete displacement vector fields into a continuous creep wave propagation trajectory, includes:

[0026] Step S31: Preprocess each discrete displacement vector field to obtain a preprocessed discrete displacement vector field based on a discrete displacement vector field.

[0027] Step S32: Spatiotemporal interpolation is performed on all discrete displacement vector fields using the B-spline curve interpolation algorithm to convert the discrete displacement vector fields of adjacent frames into a continuous displacement dataset.

[0028] Step S33: Calculate the propagation direction field of the subject's stomach organ using the continuous displacement dataset;

[0029] Step S34: Input the propagation direction field into the thin plate spline surface fitting model to reconstruct the continuous trajectory and obtain the continuous creeping wave propagation trajectory.

[0030] Beneficial effects:

[0031] Steps S31 to S34 of this application preprocess each discrete displacement vector field to eliminate measurement noise and outlier interference, ensuring the reliability of subsequent analysis. Subsequently, a B-spline curve interpolation algorithm is used to perform spatiotemporal interpolation on the discrete displacement vector fields in the time dimension, converting discrete data from adjacent frames into a continuous dataset. This solves the problem of insufficient temporal resolution in the original data, allowing the dynamic propagation process of peristaltic waves to be fully captured. Secondly, the propagation direction field is calculated using the continuous displacement dataset, accurately identifying the dominant propagation direction of peristaltic waves in each region of the stomach wall, providing directional constraints for subsequent trajectory reconstruction. Finally, the propagation direction field is input into a thin-plate spline surface fitting model for continuous trajectory reconstruction. This minimizes bending energy while maintaining surface smoothness, generating a continuous peristaltic wave propagation trajectory that conforms to the physiological motion characteristics of the stomach wall.

[0032] As a further improvement to this application, step S4 involves extracting key dynamic parameters of the continuous creeping wave propagation trajectory using a multi-scale feature fusion algorithm, including:

[0033] Step S41: The continuous creeping wave propagation trajectory is decomposed into several trajectory features of different resolutions using the Gaussian pyramid decomposition algorithm.

[0034] Step S42: Extract the key dynamic parameters for each trajectory feature;

[0035] Step S43: Input all key dynamic parameters into the multi-scale feature fusion network for fusion to obtain the fused feature matrix;

[0036] Step S44: Extract the dynamic parameter set based on the fused feature matrix;

[0037] Step S45: Standardize the set of dynamic parameters to obtain a standardized set of dynamic parameters, wherein the key dynamic parameters include several key dynamic parameters.

[0038] Beneficial effects:

[0039] Steps S41 to S45 of this application decompose the continuous peristaltic wave propagation trajectory into trajectory features of different resolutions using a Gaussian pyramid decomposition algorithm. This multi-scale analysis method can simultaneously capture the macroscopic propagation law and microscopic fluctuation details of the peristaltic wave, ensuring a comprehensive reflection of the complex characteristics of gastric wall motion. After extracting the key dynamic parameters of each trajectory feature, a multi-scale feature fusion network is used to deeply fuse all parameters to generate a fused feature matrix. This process effectively eliminates the limitations of single-scale analysis, making the extracted propagation velocity, peristalsis intensity, and other parameters more representative. The set of dynamic parameters extracted based on the fused feature matrix is ​​then standardized. After processing, a standardized set of dynamic parameters can be generated. This standardized set of dynamic parameters not only has high measurement accuracy but also good comparability. Moreover, the core advantage of the multi-scale feature fusion algorithm lies in its ability to adaptively integrate motion features at different spatial scales. For example, when analyzing peristalsis in the gastric antrum, it can identify minute displacement changes in local areas and assess the overall propagation trend. This multi-level analysis significantly improves the robustness of parameter extraction. The feature fusion mechanism specially designed by the algorithm can effectively suppress noise interference such as respiratory motion through attention weighting and cross-scale information interaction, ensuring that the extracted dynamic parameters truly reflect the peristaltic characteristics of the gastric wall.

[0040] As a further improvement to this application, step S5 involves superimposing the key dynamic parameters onto the continuous peristaltic wave propagation trajectory in the form of vector arrows to obtain a visualized propagation trajectory with prominently displayed peristaltic wave propagation direction and intensity. Following this, the process includes:

[0041] Step S10: Construct an abnormality database based on several typical abnormal features of the gastric organs pre-acquired using the gold standard method;

[0042] Step S20: Select key abnormal features from the key dynamic parameters based on preset screening conditions;

[0043] Step S30: Establish an anomaly feature classification model based on a convolutional neural network architecture, and train the anomaly feature classification model using the anomaly database;

[0044] Step S40: Input the key abnormal features into the abnormal feature classification model to obtain the similarity values ​​between the key abnormal features and the typical abnormal features of each gastric organ.

[0045] Step S50: Obtain the typical abnormal features of the gastric organ corresponding to the maximum value among all similarity values, and define it as the abnormal features of the subject's gastric organ.

[0046] Beneficial effects:

[0047] Steps S10 to S50 of this application construct an anomaly database based on the gold standard method, providing a reliable reference benchmark for subsequent analysis and ensuring consistency between detection results and practice. Furthermore, by integrating typical abnormal features such as gastroparesis and functional dyspepsia, the database can comprehensively cover the pathological patterns of various gastric motility disorders, providing rich comparison samples for anomaly identification. Secondly, the anomaly feature classification model based on the ResNet3D architecture can automatically extract and analyze the complex features of gastric peristalsis parameters through deep learning technology. Finally, multi-dimensional similarity calculation is achieved through fully connected layers and parallel branch structures (SSIM, DTW, cosine similarity), which can output the matching probability with typical abnormal features of various gastric organs, providing medical staff with an intuitive distribution map of abnormal features.

[0048] As a further improvement to this application, step S30, establishing an anomaly feature classification model based on a convolutional neural network architecture, and training the anomaly feature classification model using the anomaly database, includes:

[0049] Step S301: Establish an anomaly feature classification model based on the ResNet3D architecture;

[0050] Step S302: Perform data augmentation and feature standardization on all typical abnormal features to obtain the training sample set;

[0051] Step S303: Input the training sample set into the anomaly feature classification model, and train the anomaly feature classification model using a combined loss function and the AdamW optimizer until the combined loss function no longer decreases, thus obtaining the trained anomaly feature classification model.

[0052] Beneficial effects:

[0053] Steps S301 to S303 of this application effectively capture the spatiotemporal features of gastric wall peristalsis by employing a 3D convolutional neural network architecture. Furthermore, the depthwise separable convolutional structure of ResNet3D can automatically extract multi-scale abnormal pattern features. Its residual connection mechanism solves the gradient vanishing problem in deep network training, enabling the model to learn more complex abnormal feature representations. Before model training, data augmentation techniques (such as adding Gaussian noise) are used to simulate individual differences, and Z-score standardization is combined to eliminate the influence of dimensions and improve the model's generalization ability. During training, the combined loss function (cross-entropy loss and mean squared error) and the AdamW optimizer (with weight decay) ensure efficient updating of model parameters, while early stopping mechanism and cosine annealing learning rate scheduling strategies further optimize training efficiency.

[0054] As a further improvement to this application, step S40 involves inputting the key abnormal features into the abnormal feature classification model to obtain similarity values ​​between the key abnormal features and typical abnormal features of each gastric organ, including:

[0055] Step S401: Map all key abnormal features to the same high-dimensional feature space through the fully connected layer of the abnormal feature classification model to obtain the abnormal feature vector.

[0056] Step S402: Input all abnormal feature vectors into the input layer of the abnormal feature classification model, and output waveform morphology matching degree, temporal feature similarity, and cosine similarity through the three parallel branches of the abnormal feature classification model respectively.

[0057] Step S403: The similarity value is obtained by weighted fusion of the waveform morphology matching degree, the temporal feature similarity, and the cosine similarity.

[0058] Beneficial effects:

[0059] Steps S401 to S403 of this application map key abnormal features to a high-dimensional feature space through a fully connected layer and employ a multi-branch parallel computing mechanism to achieve a comprehensive assessment of abnormal features of the gastric organ. Its core advantage lies in the fact that the mapping process not only preserves the biomechanical significance of the original features but also enhances the discriminative power of abnormal patterns through the linear separability of the high-dimensional space, laying a solid foundation for subsequent similarity calculations. Furthermore, the three parallel branches integrate multimodal assessment dimensions. The structural similarity index branch focuses on topological matching of peristaltic wave morphology, enabling the identification of waveform distortions characteristic of gastroparesis; the dynamic time warping branch effectively captures the rhythmic disorder features of functional dyspepsia by elastically aligning temporal data; and the cosine similarity branch assesses overall similarity from the perspective of parameter space distribution. This multi-dimensional assessment mechanism overcomes the limitations of single indicators. For example, traditional methods relying solely on propagation velocity thresholds may miss early gastroparesis, while this scheme significantly improves the ability to identify complex abnormalities (such as diabetic gastroparesis combined with gastroesophageal reflux) through joint analysis of waveform morphology and temporal features.

[0060] To achieve the above objectives, this application also provides the following technical solutions:

[0061] An ultrasound-based gastric wall peristalsis detection device, wherein the gastric wall peristalsis detection device is applied to the gastric wall peristalsis detection method described above, and the gastric wall peristalsis detection device comprises:

[0062] The original ultrasound image sequence acquisition module is used to continuously acquire several dynamic echo signals of the subject's gastric organ based on the cross-sectional area of ​​the anterior wall of the gastric antrum using an external ultrasound probe with a preset frame rate, thereby obtaining the original ultrasound image sequence.

[0063] The discrete displacement vector field acquisition module is used to differentiate adjacent frames of the original ultrasound image sequence using the PBT-CCA joint algorithm, and obtain a discrete displacement vector field based on a pair of adjacent frames.

[0064] The continuous creep wave propagation trajectory fitting module is used to fit all discrete displacement vector fields into a continuous creep wave propagation trajectory.

[0065] The key dynamic parameter extraction module is used to extract the key dynamic parameters of the continuous creeping wave propagation trajectory through a multi-scale feature fusion algorithm.

[0066] The visualization propagation trajectory acquisition module is used to overlay the key dynamic parameters onto the continuous peristaltic wave propagation trajectory in the form of vector arrows to obtain a visualization propagation trajectory with prominently displayed peristaltic wave propagation direction and peristaltic wave intensity.

[0067] To achieve the above objectives, this application also provides the following technical solutions:

[0068] An electronic device includes a processor and a memory coupled to the processor, the memory storing program instructions executable by the processor; when the processor executes the program instructions stored in the memory, it implements the gastric wall peristalsis detection method as described above.

[0069] To achieve the above objectives, this application also provides the following technical solutions:

[0070] A computer-readable storage medium storing program instructions that, when executed by a processor, enable the gastric wall peristalsis detection method described above. Attached Figure Description

[0071] Figure 1 This is a schematic flowchart of one embodiment of the ultrasound-based gastric wall peristalsis detection method of this application;

[0072] Figure 2 This is a schematic diagram of the functional modules of an embodiment of an ultrasound-based gastric wall peristalsis detection device according to this application;

[0073] Figure 3 This is a schematic diagram of the structure of an embodiment of the electronic device of this application;

[0074] Figure 4 This is a schematic diagram of the structure of one embodiment of the storage medium of this application;

[0075] Labeling Explanation: 1. Original Ultrasonic Image Sequence Acquisition Module; 2. Discrete Displacement Vector Field Acquisition Module; 3. Continuous Creep Wave Propagation Trajectory Fitting Module; 4. Key Dynamic Parameter Extraction Module; 5. Visualized Propagation Trajectory Acquisition Module; 6. Electronic Equipment; 61. Processor; 62. Memory; 7. Storage Medium; 71. Program Instructions. Detailed Implementation

[0076] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0077] The terms "first," "second," and "third" in this application are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Therefore, a feature defined as "first," "second," or "third" may explicitly or implicitly include at least one of that feature. In the description of this application, "multiple" means at least two, such as two, three, etc., unless otherwise explicitly specified. All directional indications (such as up, down, left, right, front, back, etc.) in the embodiments of this application are only used to explain the relative positional relationships and movements between components in a specific orientation (as shown in the figures). If the specific orientation changes, the directional indications also change accordingly. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or devices.

[0078] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a mutually exclusive, independent, or alternative embodiment. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0079] like Figure 1 As shown, this embodiment provides an example of a gastric wall peristalsis detection method based on ultrasound. In this embodiment, the gastric wall peristalsis detection method is applied to the gastric organ of a subject that has been exposed to ultrasound contrast agent.

[0080] Preferably, the subject needs to fast for 6-8 hours before the examination and take an oral ultrasound contrast agent to enhance the acoustic contrast between the gastric cavity and the gastric wall tissue. The contrast agent dosage is calculated according to body weight and is usually 0.03 ml / kg.

[0081] Specifically, this method for detecting gastric wall peristalsis includes the following steps:

[0082] Step S1: A series of dynamic echo signals of the subject's gastric organs based on the cross-sectional area of ​​the anterior wall of the gastric antrum are continuously acquired by an external ultrasound probe with a preset frame rate to obtain the original ultrasound image sequence.

[0083] Preferably, the ultrasound probe can be set as a high frame rate ultrasound probe with a preset frame rate of ≥100 frames / second, placed in the transverse area of ​​the anterior wall of the gastric antrum, and the probe position is confirmed by real-time B-ultrasound mode to ensure that the scanning plane includes the complete gastric wall structure from the mucosa layer, muscle layer to the serosa layer.

[0084] The probe frequency was set to 3MHz to 5MHz to balance penetration depth and resolution, the focusing area was adjusted to the middle layer of the stomach wall, and the gain was set to 60dB to 70dB to obtain the best signal-to-noise ratio.

[0085] Next, the ultrasound probe initiates continuous acquisition mode, emitting ultrasound waves at the preset frame rate and receiving dynamic echo signals from the stomach wall tissue. During acquisition, the probe position must be kept stable, and the echo signal quality must be continuously monitored to avoid data distortion caused by respiratory movements or probe displacement. This process outputs a raw radiofrequency signal sequence containing motion information from each layer of the stomach wall tissue.

[0086] It is worth noting that the detection process can be achieved through automated equipment such as robots and robotic arms.

[0087] The next step involves preprocessing the acquired dynamic echo signals. This can be achieved through time gain compensation (TGC) to compensate for depth attenuation, logarithmic compression to expand the dynamic range, and envelope detection to extract signal amplitude information. The preprocessed echo signals are then input into a delay-and-sum beamformer. By calculating the phase delay of the signals received by each array element and coherently superimposing them, the original ultrasound image sequence is generated. Key code is as follows:

[0088] import numpy as np

[0089] import scipy.signal as signal

[0090] class UltrasoundSignalPreprocessor:

[0091] def __init__(self, sampling_rate=40e6, center_freq=3.5e6):

[0092] self.sampling_rate = sampling_rate

[0093] self.center_freq = center_freq

[0094] def time_gain_compensation(self, raw_signals, depth):

[0095] "Time Gain Compensation Algorithm"

[0096] # Calculate depth-dependent gain

[0097] attenuation = 0.7 dB / cm / MHz

[0098] compensation = attenuation * depth * (self.center_freq / 1e6)

[0099] return raw_signals * np.power(10, compensation / 20)

[0100] def bandpass_filtering(self, signals):

[0101] "Bandpass filtering processing"

[0102] nyquist = self.sampling_rate / 2

[0103] low_cut = 2e6 / nyquist

[0104] high_cut = 6e6 / nyquist

[0105] b, a = signal.butter(4, [low_cut, high_cut], btype='band')

[0106] return signal.filtfilt(b, a, signals)

[0107] def envelope_detection(self, signals):

[0108] """Envelope Detection Algorithm"""

[0109] analytic_signal = signal.hilbert(signals)

[0110] return np.abs(analytic_signal)

[0111] def beamforming(self, signals, probe_geometry):

[0112] "Time-delay superposition beamforming algorithm"

[0113] # Core logic for beamforming

[0114] delayed_signals = self.calculate_delays(signals, probe_geometry)

[0115] return np.sum

[0116] (delayed_signals, axis=0)

[0117] Step S2: Differentiate adjacent frames of the original ultrasound image sequence using the PBT-CCA joint algorithm, and obtain a discrete displacement vector field based on a pair of adjacent frames.

[0118] Preferably, the PBT-CCA joint algorithm (Phase-Based Tracking & Cross-Correlation Algorithm) is a high-precision displacement detection method based on ultrasound image analysis. Its Chinese name is Phase Tracking and Cross-Correlation Algorithm. By combining the two core technologies of phase tracking and cross-correlation calculation, it can achieve submicron level tissue particle displacement measurement.

[0119] Among them, the phase tracking mechanism PBT utilizes the phase shift characteristics of ultrasonic echo signals, calculates the cross power spectrum of adjacent frame images through Fourier transform, and determines the initial displacement estimate based on the peak position of the phase spectrum. This mechanism has extremely high sensitivity to minute displacements and strong anti-noise interference capability. The cross-correlation calculation mechanism CCA accurately locates the displacement near the initial estimate of phase tracking by searching the local cross-correlation function. It adopts a circular radiation search strategy (traversing within a radius of 3 pixels with the initial estimate as the center) to find the final displacement estimate corresponding to the maximum cross-correlation coefficient.

[0120] Preferably, the architecture of the PBT-CCA joint algorithm includes the following components:

[0121] ① Input layer: Receives the preprocessed ultrasound image sequence. The data dimension is (number of frames × height × width), and the frame rate is required to be ≥100 frames / second to ensure time resolution.

[0122] ② Preprocessing module: Denoises and normalizes the original ultrasound image sequence to eliminate the influence of equipment noise and signal strength fluctuations, ensuring that the grayscale distribution of adjacent frames is comparable.

[0123] ③ Phase Correlation Analysis Module: Includes a Fourier transform unit, a cross-power spectrum calculation unit, and a translation amount determination unit that are electrically or signalally connected in sequence; the aforementioned three units sequentially perform Fourier transform on adjacent frame images, calculate the cross-power spectrum of their phase spectra, and determine the translation amount between two frame images through the peak position of the phase spectrum.

[0124] ④ Cross-correlation calculation module: Performs a local search around the initial displacement estimate determined by phase correlation analysis, uses a cross-correlation algorithm to calculate the cross-correlation function of the local region, and finds the displacement corresponding to the maximum value of the cross-correlation coefficient.

[0125] ⑤ Displacement field generation module: Interpolates the obtained displacement estimates according to spatial location to generate a continuous displacement vector field.

[0126] Specifically, step S2 is implemented through the following sub-steps:

[0127] Step S21: Preprocess the original ultrasound image sequence to obtain the preprocessed ultrasound image sequence.

[0128] Preferably, the preprocessing steps in step S21 typically include denoising and contrast enhancement. Median filtering effectively removes salt-and-pepper noise from ultrasound images while preserving edges relatively well; contrast-limited adaptive histogram equalization (CLAHE) improves local image contrast without amplifying noise.

[0129] Step S22: Perform Fourier transform on adjacent frames of the processed ultrasound image sequence to obtain a cross power spectrum based on a pair of adjacent frames.

[0130] Preferably, a Hanning window can be applied to the two images to reduce boundary effects, followed by a Fast Fourier Transform (FFT), and then the cross-power spectrum can be calculated. The cross-power spectrum is defined as the quotient of the conjugate product of the Fourier transforms of the two images and its modulus.

[0131] Step S23: Obtain the image translation amount of the current adjacent frame based on the peak position of the current cross power spectrum, and define the image translation amount as the initial displacement estimate.

[0132] Preferably, a cross-correlation algorithm is used for local search in the vicinity of the initial displacement estimate determined by phase correlation analysis. By calculating the cross-correlation function of local regions in adjacent frame images, the displacement corresponding to the maximum cross-correlation coefficient is found. Specifically, this can be achieved by performing an inverse FFT on the cross-power spectrum to find the coordinates of the maximum value in the response image, which is the initial displacement estimate (dx, dy).

[0133] It is worth noting that, due to the periodicity of FFT, the obtained displacement may need to be adjusted to be relevant to the image center.

[0134] Step S24: Obtain the cross-correlation function of the current cross-power spectrum using a cross-correlation algorithm.

[0135] Preferably, the cross-correlation function can be directly the response_surface obtained by inverse FFT in step S23.

[0136] Step S25: Starting from the current initial displacement estimate based on the current image position of the cross power spectrum, find the displacement corresponding to the maximum value of the cross-correlation coefficient of the cross-correlation function in the form of circular radiation from the starting point, and define it as the final displacement estimate.

[0137] Preferably, the purpose of step S25 is to find the true peak of the cross-correlation function near the initially estimated integer pixel position through interpolation or fitting methods, thereby obtaining the displacement with sub-pixel accuracy. Specifically, this can be achieved by taking a small neighborhood (e.g., 5x5) centered on the initial estimated position, and then using quadratic surface fitting or the centroid method to locate the pixel peak.

[0138] Step S26: Spatial interpolation is performed on the final displacement estimate of the current adjacent frame to obtain the discrete displacement vector field of the current adjacent frame.

[0139] Preferably, step S26 is designed so that the displacement estimate calculated in step S25 may be sparse, for example, calculated only at feature points or grid points of the image. Step S26 aims to generate a continuous, dense displacement vector field covering the entire image region from these sparse displacement vectors through an interpolation method.

[0140] Preferably, the spatial interpolation in step S26 can be performed using radial basis function interpolation, and the key code is as follows:

[0141] from scipy.interpolate import Rbf

[0142] def interpolate_displacement_field(sparse_points, displacements,grid_shape):

[0143] """

[0144] A dense displacement field is generated by interpolating sparse displacement points using radial basis functions.

[0145] Parameter: sparse_points - The coordinates of sparse points, an array of shape (N, 2).

[0146] displacements - An array of (N, 2) vectors representing the displacements at corresponding points (dx, dy).

[0147] grid_shape - The shape of the target grid (rows, cols)

[0148] Returns: dense_dx, dense_dy - the x-direction displacement field and y-direction displacement field over the entire mesh.

[0149] """

[0150] x_coords = sparse_points[:, 0]

[0151] y_coords = sparse_points[:, 1]

[0152] dx_vals = displacements[:, 0]

[0153] dy_vals = displacements[:, 1]

[0154] # Create a grid for interpolation

[0155] grid_x, grid_y = np.meshgrid(np.arange(grid_shape[1]), np.arange(grid_shape[0]))

[0156] # Interpolate dx and dy using the radial basis function linear, respectively.

[0157] rbf_dx = Rbf(x_coords, y_coords, dx_vals, function='linear',smooth=0.1)

[0158] rbf_dy = Rbf(x_coords, y_coords, dy_vals, function='linear',smooth=0.1)

[0159] # Interpolate on the target grid

[0160] dense_dx = rbf_dx(grid_x, grid_y)

[0161] dense_dy = rbf_dy(grid_x, grid_y)

[0162] return dense_dx, dense_dy

[0163] # Define sparse_locations as a list of sparse point coordinates and sparse_displacements as a list of corresponding displacements.

[0164] # dense_displacement_field_x, dense_displacement_field_y =interpolate_displacement_field(

[0165] # np.array(sparse_locations), np.array(sparse_displacements),preprocessed_sequence[0].shape)

[0166] Preferably, the simplified key code for steps S21 to S26 is as follows:

[0167] import numpy as np

[0168] import cv2

[0169] from scipy.fft import fft2, ifft2, fftshift, ifftshift

[0170] def super_simple_pbt_cca(frame1, frame2):

[0171] """

[0172] A simplified version of the PBT-CCA algorithm: calculating the displacement field between two frames.

[0173] Parameters: frame1, frame2 - grayscale images of two adjacent frames

[0174] Returns: displacement_field - displacement field [H, W, 2] (dx, dy)

[0175] """

[0176] # Step S21: Image Preprocessing

[0177] frame1_processed = cv2.GaussianBlur(frame1, (5, 5), 1.0)

[0178] frame2_processed = cv2.GaussianBlur(frame2, (5, 5), 1.0)

[0179] # Step S22: Fourier Transform and Cross-Power Spectrum Calculation

[0180] F1 = fft2(frame1_processed)

[0181] F2 = fft2(frame2_processed)

[0182] cross_power = (F1 * np.conj(F2)) / (np.abs(F1 * np.conj(F2)) +1e-10)

[0183] # Step S23: Initial displacement estimation (phase correlation method)

[0184] correlation = np.real(ifft2(cross_power))

[0185] max_pos = np.unravel_index(np.argmax(correlation),correlation.shape)

[0186] H, W = frame1.shape

[0187] init_dy, init_dx = max_pos[0] - H / / 2, max_pos[1] - W / / 2

[0188] # Steps S24-25: Subpixel Refinement (Simplified Version)

[0189] # Perform a local search around the initial estimate

[0190] search_radius = 2

[0191] best_correlation = -1

[0192] refined_dx, refined_dy = init_dx, init_dy

[0193] for dy in range(init_dy-search_radius, init_dy+search_radius+1):

[0194] for dx in range(init_dx-search_radius, init_dx+search_radius+1):

[0195] # Apply displacement and calculate correlation

[0196] shifted = np.roll(frame2_processed, (dy, dx), axis=(0,1))

[0197] corr = np.corrcoef(frame1_processed.flatten(),shifted.flatten())[0,1]

[0198] if corr > best_correlation:

[0199] best_correlation = corr

[0200] refined_dx, refined_dy = dx, dy

[0201] # Step S26: Create the displacement field (simplified version - assuming global displacement)

[0202] displacement_field = np.zeros((H, W, 2))

[0203] displacement_field[:, :, 0] = refined_dx # Displacement in the x-direction

[0204] displacement_field[:, :, 1] = refined_dy # Displacement in the y-direction

[0205] return displacement_field

[0206] Beneficial effects:

[0207] In this embodiment, steps S21 to S26 effectively eliminate noise interference in the original ultrasound image sequence through preprocessing, providing a high-quality data foundation for subsequent analysis and creating the necessary conditions for sub-micron displacement detection. Subsequently, in the core displacement detection step, the cross-power spectrum is calculated using Fourier transform, and the anti-noise properties of phase information are used to achieve coarse localization, enabling the initial displacement estimate to reach sub-pixel accuracy. The next step further refines the displacement estimate through local search, using a circumferential radiation search strategy to find the maximum cross-correlation coefficient near the initial estimate, ensuring computational efficiency while achieving sub-micron displacement detection resolution. Finally, the discrete displacement vector field generated by spatial interpolation fully reflects the motion characteristics of the gastric wall tissue in the ultrasound imaging plane, providing high-precision data support for subsequent trajectory reconstruction. In this embodiment, the cross-power spectrum analysis and cross-correlation calculation in steps S21 to S26 are complementary. The cross-power spectrum analysis uses global phase information for rapid localization, while the cross-correlation calculation uses local feature matching for precise localization. This joint strategy not only overcomes the limitations of a single algorithm in the detection of motion in complex tissues, but also significantly improves computational efficiency. Furthermore, the introduction of the circumferential radiation search strategy further optimizes the search efficiency, reducing computational complexity while ensuring accuracy. Spatial interpolation can use a bicubic interpolation algorithm to ensure the continuity and smoothness of the displacement vector field, eliminating the trajectory breakage problem caused by sampling rate limitations.

[0208] Step S3: Fit all discrete displacement vector fields to the propagation trajectory of a continuous creeping wave.

[0209] Specifically, step S3 is implemented through the following sub-steps:

[0210] Step S31: Preprocess each discrete displacement vector field to obtain a preprocessed discrete displacement vector field based on a discrete displacement vector field.

[0211] Preferably, each discrete displacement vector field undergoes quality control and data cleaning to remove outliers and smooth noise, thus preparing high-quality data for subsequent interpolation.

[0212] Step S32: Spatiotemporal interpolation is performed on all discrete displacement vector fields using the B-spline curve interpolation algorithm to convert the discrete displacement vector fields of adjacent frames into a continuous displacement dataset.

[0213] Preferably, the B-spline curve interpolation algorithm interpolates the discrete displacement vector field in both time and space dimensions to generate a continuous displacement dataset.

[0214] Step S33: Calculate the propagation direction field of the subject's stomach organs using the continuous displacement dataset.

[0215] Step S34: Input the propagation direction field into the thin plate spline surface fitting model to reconstruct the continuous trajectory and obtain the continuous creep wave propagation trajectory.

[0216] Preferably, the simplified key code for steps S31 to S34 is as follows:

[0217] import numpy as np

[0218] from scipy import interpolate

[0219] import cv2

[0220] def super_simple_trajectory_fitting(displacement_fields):

[0221] """

[0222] Super-simplified version of continuous peristaltic wave trajectory fitting

[0223] Parameter: displacement_fields - List of discrete displacement fields [T, H, W, 2]

[0224] Returns: continuous_trajectory - continuous propagation trajectory [H, W, 2]

[0225] """

[0226] T, H, W, _ = displacement_fields.shape

[0227] # Step S31: Preprocess the displacement field

[0228] processed_fields = []

[0229] for i in range(T):

[0230] field = displacement_fields[i]

[0231] # Simple preprocessing: Gaussian smoothing

[0232] dx_smooth = cv2.GaussianBlur(field[:,:,0], (3,3), 1)

[0233] dy_smooth = cv2.GaussianBlur(field[:,:,1], (3,3), 1)

[0234] processed_field = np.stack([dx_smooth, dy_smooth], axis=-1)

[0235] processed_fields.append(processed_field)

[0236] processed_fields = np.array(processed_fields)

[0237] # Step S32: Time-dimension interpolation (simplified linear interpolation)

[0238] # Create consecutive time points (from 0 to T-1)

[0239] time_points = np.linspace(0, T-1, T*2) # Double the time resolution

[0240] # Perform time interpolation for each spatial point

[0241] continuous_data = np.zeros((len(time_points), H, W, 2))

[0242] for y in range(H):

[0243] for x in range(W):

[0244] # Extract the displacement time series of this point

[0245] dx_series = processed_fields[:, y, x, 0]

[0246] dy_series = processed_fields[:, y, x, 1]

[0247] # Linear interpolation

[0248] original_times = np.arange(T)

[0249] dx_interp = np.interp(time_points, original_times, dx_series)

[0250] dy_interp = np.interp(time_points, original_times, dy_series)

[0251] continuous_data[:, y, x, 0] = dx_interp

[0252] continuous_data[:, y, x, 1] = dy_interp

[0253] # Step S33: Calculate the propagation direction field (time average)

[0254] time_avg_displacement = np.mean(continuous_data, axis=0) # [H,W, 2]

[0255] # Calculate the direction field (unit vector)

[0256] magnitudes = np.linalg.norm(time_avg_displacement, axis=2,keepdims=True)

[0257] magnitudes = np.where(magnitudes < 1e-10, 1e-10, magnitudes)

[0258] direction_field = time_avg_displacement / magnitudes

[0259] # Step S34: Trajectory Reconstruction (Simplified Surface Fitting)

[0260] # Simulate the smoothing effect of thin-plate splines using Gaussian filtering

[0261] smooth_dx = cv2.GaussianBlur(direction_field[:,:,0], (5,5), 2)

[0262] smooth_dy = cv2.GaussianBlur(direction_field[:,:,1], (5,5), 2)

[0263] continuous_trajectory = np.stack([smooth_dx, smooth_dy], axis=-1)

[0264] return continuous_trajectory

[0265] # Usage Example

[0266] if __name__ == "__main__":

[0267] # Create a sample discrete displacement field sequence (simulating stomach wall peristalsis)

[0268] T, H, W = 10, 50, 60 # 10 time points, 50x60 spatial grid

[0269] # Generating a simulated displacement field: the propagating wave spreads outward from the center.

[0270] y, x = np.ogrid[0:H, 0:W]

[0271] center_y, center_x = H / / 2, W / / 2

[0272] displacement_fields = []

[0273] for t in range(T):

[0274] # Simulated Propagation Wave: Radius Increases with Time

[0275] radius = 5 + t * 2

[0276] wave_front = np.exp(-((x-center_x)**2 + (y-center_y)**2 -radius**2)**2 / 100)

[0277] # Radial displacement field

[0278] dx = (x - center_x) * wave_front * 0.1

[0279] dy = (y - center_y) * wave_front * 0.1

[0280] displacement_field = np.stack([dx, dy], axis=-1)

[0281] displacement_fields.append(displacement_field)

[0282] displacement_fields = np.array(displacement_fields)

[0283] # Fitting a continuous trajectory

[0284] trajectory = super_simple_trajectory_fitting(displacement_fields)

[0285] print(f"Continuous trajectory shape: {trajectory.shape}")

[0286] print(f"Average displacement intensity: {np.mean(np.linalg.norm(trajectory, axis=2)):.3f}")

[0287] Beneficial effects:

[0288] In this embodiment, steps S31 to S34 preprocess each discrete displacement vector field to eliminate measurement noise and outlier interference, ensuring the reliability of subsequent analysis. Subsequently, a B-spline curve interpolation algorithm is used to perform spatiotemporal interpolation on the discrete displacement vector fields in the time dimension, converting discrete data from adjacent frames into a continuous dataset. This solves the problem of insufficient temporal resolution in the original data, allowing the dynamic propagation process of peristaltic waves to be fully captured. Secondly, the propagation direction field is calculated using the continuous displacement dataset, accurately identifying the dominant propagation direction of peristaltic waves in each region of the stomach wall, providing directional constraints for subsequent trajectory reconstruction. Finally, the propagation direction field is input into a thin-plate spline surface fitting model for continuous trajectory reconstruction. This minimizes bending energy while maintaining surface smoothness, generating a continuous peristaltic wave propagation trajectory that conforms to the physiological motion characteristics of the stomach wall.

[0289] Step S4: Extract key dynamic parameters of the continuous creeping wave propagation trajectory using a multi-scale feature fusion algorithm.

[0290] Specifically, step S4 is implemented through the following sub-steps:

[0291] Step S41: The continuous creeping wave propagation trajectory is decomposed into several trajectory features of different resolutions using the Gaussian pyramid decomposition algorithm.

[0292] Preferably, the key code for the Gaussian pyramid decomposition algorithm to decompose the continuous creeping wave propagation trajectory into several trajectory features of different resolutions is as follows:

[0293] import numpy as np

[0294] import cv2

[0295] from scipy import ndimage

[0296] import pywt

[0297] def gaussian_pyramid_decomposition(trajectory_field, num_levels=4,scale_factor=0.5):

[0298] """

[0299] Gaussian Pyramid Decomposition Algorithm

[0300] Parameter: trajectory_field - The trajectory of the continuous creeping wave [H, W, 2] (direction vector field)

[0301] num_levels - Number of pyramid levels

[0302] scale_factor - scaling factor

[0303] Returns: pyramid_features - A list of multi-scale trajectory features

[0304] """

[0305] H, W, _ = trajectory_field.shape

[0306] pyramid_features = []

[0307] # Layer 0: Original Resolution

[0308] current_level = trajectory_field.copy()

[0309] pyramid_features.append(current_level)

[0310] # Constructing the Gaussian Pyramid

[0311] for level in range(1, num_levels):

[0312] # Gaussian Blur

[0313] blurred_dx = cv2.GaussianBlur(current_level[:, :, 0], (5, 5),1.0)

[0314] blurred_dy = cv2.GaussianBlur(current_level[:, :, 1], (5, 5),1.0)

[0315] blurred_trajectory = np.stack([blurred_dx, blurred_dy], axis=-1)

[0316] # Downsampling

[0317] new_H = max(1, int(H * (scale_factor ** level)))

[0318] new_W = max(1, int(W * (scale_factor ** level)))

[0319] if new_H < 2 or new_W < 2:

[0320] break # Image too small, stop decomposition

[0321] resized_trajectory = cv2.resize(blurred_trajectory, (new_W,new_H),

[0322] interpolation=cv2.INTER_AREA)

[0323] pyramid_features.append(resized_trajectory)

[0324] current_level = resized_trajectory

[0325] return pyramid_features

[0326] def multi_scale_wavelet_decomposition(trajectory_field, wavelet='db4', level=3):

[0327] """

[0328] Wavelet multi-scale decomposition (an alternative to the Gaussian pyramid)

[0329] Parameter: trajectory_field - trajectory field

[0330] wavelet - wavelet basis function

[0331] level - number of decomposition levels

[0332] Returns: wavelet_coeffs - a dictionary of wavelet coefficients

[0333] """

[0334] # Perform wavelet decomposition in the x and y directions respectively

[0335] dx_field = trajectory_field[:, :, 0]

[0336] dy_field = trajectory_field[:, :, 1]

[0337] # Wavelet decomposition

[0338] coeffs_dx = pywt.wavedec2(dx_field, wavelet, level=level)

[0339] coeffs_dy = pywt.wavedec2(dy_field, wavelet, level=level)

[0340] wavelet_features = {

[0341] 'dx_coeffs': coeffs_dx,

[0342] 'dy_coeffs': coeffs_dy,

[0343] 'scales': [f'level_{i}' for i in range(level+1)]

[0344] }

[0345] return wavelet_features

[0346] Step S42: Extract the key dynamic parameters for each trajectory feature.

[0347] Preferably, the key dynamic parameters can be selected from the following aspects:

[0348] ①Propagation characteristic parameters: velocity, acceleration, propagation distance.

[0349] ② Directional characteristic parameters: directional consistency, angular distribution, and main propagation direction.

[0350] ③ Morphological characteristic parameters: curvature, waveform regularity, symmetry.

[0351] ④ Frequency characteristic parameters: creep frequency, power spectrum characteristics.

[0352] ⑤ Intensity characteristic parameters: creep wave amplitude and energy distribution.

[0353] Step S43: Input all key dynamic parameters into the multi-scale feature fusion network for fusion to obtain the fused feature matrix.

[0354] Preferably, the fusion principle is to automatically learn the importance of features at each scale by weighting features across scales, mine feature complementarity by combining macroscopic overall features and microscopic detailed features, and remove redundant information to reduce duplicate information across scales.

[0355] Step S44: Extract the dynamic parameter set based on the fused feature matrix.

[0356] Step S45: Standardize the dynamic parameter set to obtain a standardized dynamic parameter set, including several key dynamic parameters.

[0357] Preferably, the simplified key code for steps S41 to S45 is as follows:

[0358] import numpy as np

[0359] import cv2

[0360] from scipy import ndimage

[0361] def super_simple_multiscale_feature_fusion(continuous_trajectory):

[0362] """

[0363] A simplified version of multi-scale feature fusion for extracting key dynamic parameters.

[0364] Parameter: continuous_trajectory - The continuous creeping wave propagation trajectory [H, W, 2]

[0365] Returns: normalized_parameters - Normalized kinetic parameters

[0366] """

[0367] H, W, _ = continuous_trajectory.shape

[0368] # Step S41: Gaussian Pyramid Decomposition

[0369] pyramid_features = []

[0370] current_level = continuous_trajectory

[0371] for level in range(3): # 3 scales

[0372] # Downsampling

[0373] new_H, new_W = max(4, H / / (2**level)), max(4, W / / (2**level))

[0374] resized = cv2.resize(current_level, (new_W, new_H))

[0375] pyramid_features.append(resized)

[0376] # Step S42: Extract key parameters for each scale

[0377] scale_parameters = []

[0378] for i, feature in enumerate(pyramid_features):

[0379] params = extract_kinematic_parameters_simple(feature, f"scale_{i}")

[0380] scale_parameters.append(params)

[0381] # Step S43: Multi-scale feature fusion (simple stitching)

[0382] fused_features = np.concatenate([p.flatten() for p in scale_parameters])

[0383] # Step S44: Extract the key parameter set

[0384] kinematic_set = extract_key_parameters_simple(fused_features)

[0385] # Step S45: Standardization Processing

[0386] normalized_params = simple_normalization(kinematic_set)

[0387] return normalized_params

[0388] def extract_kinematic_parameters_simple(trajectory, scale_name):

[0389] """

[0390] Simplified version of dynamic parameter extraction

[0391] """

[0392] dx, dy = trajectory[:,:,0], trajectory[:,:,1]

[0393] # Basic parameters

[0394] magnitude = np.sqrt(dx**2 + dy**2)

[0395] angles = np.arctan2(dy, dx)

[0396] # Key parameter calculation

[0397] params = {

[0398] f'{scale_name}_mean_speed': np.mean(magnitude),

[0399] f'{scale_name}_max_speed': np.max(magnitude),

[0400] f'{scale_name}_speed_std': np.std(magnitude),

[0401] f'{scale_name}_direction_consistency': compute_direction_consistency(angles),

[0402] f'{scale_name}_curvature': compute_simple_curvature(dx, dy)

[0403] }

[0404] return np.array(list(params.values()))

[0405] def compute_direction_consistency(angles):

[0406] Consistency of computational direction

[0407] # Using circular statistics

[0408] mean_sin = np.mean(np.sin(angles))

[0409] mean_cos = np.mean(np.cos(angles))

[0410] return np.sqrt(mean_sin**2 + mean_cos**2) # Directional consistency index

[0411] def compute_simple_curvature(dx, dy):

[0412] "Simplified curvature calculation"

[0413] # Calculate gradient

[0414] dy_dx = np.gradient(dy, axis=1)

[0415] dx_dy = np.gradient(dx, axis=0)

[0416] curvature = dy_dx - dx_dy # Simplify vorticity calculation

[0417] return np.mean(np.abs(curvature))

[0418] def extract_key_parameters_simple(fused_features):

[0419] """

[0420] Extracting key parameter sets from fused features

[0421] """

[0422] # Select the most important features (simplified version: select the top N features with the largest variance)

[0423] if len(fused_features) > 10:

[0424] variances = np.abs(fused_features - np.mean(fused_features))

[0425] important_indices = np.argsort(variances)[-10:] # Retrieve the top 10 most important features

[0426] key_params = fused_features[important_indices]

[0427] else:

[0428] key_params = fused_features

[0429] return key_params

[0430] def simple_normalization(parameters):

[0431] "Simplified and standardized processing"

[0432] # Z-score standardization

[0433] mean_val = np.mean(parameters)

[0434] std_val = np.std(parameters)

[0435] if std_val > 1e-10:

[0436] normalized = (parameters - mean_val) / std_val

[0437] else:

[0438] normalized = parameters * 0 # All zeros processed

[0439] # Scale to [0,1] range

[0440] min_val, max_val = np.min(normalized), np.max(normalized)

[0441] if max_val - min_val > 1e-10:

[0442] scaled = (normalized - min_val) / (max_val - min_val)

[0443] else:

[0444] scaled = normalized

[0445] return scaled

[0446] Beneficial effects:

[0447] In this embodiment, steps S41 to S45 decompose the continuous peristaltic wave propagation trajectory into trajectory features of different resolutions using the Gaussian pyramid decomposition algorithm. This multi-scale analysis method can simultaneously capture the macroscopic propagation law and microscopic fluctuation details of the peristaltic wave, ensuring a comprehensive reflection of the complex characteristics of gastric wall motion. After extracting the key dynamic parameters of each trajectory feature, a multi-scale feature fusion network is used to deeply fuse all parameters to generate a fused feature matrix. This process effectively eliminates the limitations of single-scale analysis, making the extracted propagation velocity, peristalsis intensity, and other parameters more representative. The dynamic parameter set extracted based on the fused feature matrix is ​​then standardized... After standardization, a standardized set of dynamic parameters can be generated. This standardized set of dynamic parameters not only has high measurement accuracy but also good comparability. Furthermore, the core advantage of the multi-scale feature fusion algorithm lies in its ability to adaptively integrate motion features at different spatial scales. For example, when analyzing peristalsis in the gastric antrum, it can identify minute displacement changes in local areas and assess the overall propagation trend. This multi-level analysis significantly improves the robustness of parameter extraction. The feature fusion mechanism specially designed by this algorithm can effectively suppress noise interference such as respiratory motion through attention weighting and cross-scale information interaction, ensuring that the extracted dynamic parameters truly reflect the peristaltic characteristics of the gastric wall.

[0448] Step S5: The key dynamic parameters are superimposed onto the continuous peristaltic wave propagation trajectory in the form of vector arrows to obtain a visualized propagation trajectory with prominent peristaltic wave propagation direction and intensity.

[0449] Preferably, the visualization of the propagation trajectory can be achieved as follows:

[0450] ① Vector arrow visualization: Arrows are used to indicate the direction of peristaltic wave propagation.

[0451] ② Color coding system: The intensity of the peristaltic wave is represented by color.

[0452] ③ Trajectory overlay display: The dynamic parameters and propagation trajectory are displayed together.

[0453] ④ Interactive visualization: Supports user interaction and parameter adjustment.

[0454] Preferably, the key code for the simplified step S5 is as follows:

[0455] import numpy as np

[0456] import matplotlib.pyplot as plt

[0457] def simplest_visualization(trajectory):

[0458] """

[0459] The simplest visualization function

[0460] Parameter: trajectory - propagation trajectory [H, W, 2]

[0461] """

[0462] # Calculate strength

[0463] intensity = np.linalg.norm(trajectory, axis=2)

[0464] intensity = (intensity - np.min(intensity)) / (np.max(intensity)- np.min(intensity))

[0465] # Create Image

[0466] plt.figure(figsize=(10, 8))

[0467] # Draw an intensity heatmap

[0468] plt.imshow(intensity, cmap='hot', alpha=0.7)

[0469] # Draw an arrow (simplified version)

[0470] H, W = intensity.shape

[0471] step = max(1, H / / 20) # Automatically calculate step size

[0472] for y in range(0, H, step):

[0473] for x in range(0, W, step):

[0474] if intensity[y, x] > 0.1:

[0475] dx, dy = trajectory[y, x]

[0476] # Normalized arrow length

[0477] length = 10 * intensity[y, x]

[0478] plt.arrow(x, y, dx*length, dy*length, head_width=2,

[0479] head_length=3, fc='blue', ec='blue', width=0.5)

[0480] plt.colorbar(label='Crawl Intensity')

[0481] plt.title('Visualization of Stomach Wall Peristalsis')

[0482] plt.axis('off')

[0483] plt.tight_layout()

[0484] plt.show()

[0485] Effective effects:

[0486] In this embodiment, steps S1 to S5 continuously acquire dynamic echo signals from the transverse section of the anterior wall of the gastric antrum using a high frame rate ultrasound probe, ensuring high spatiotemporal resolution of the raw data and providing a reliable foundation for subsequent analysis. Then, by employing a PBT-CCA (phase tracking and cross-correlation algorithm) combined algorithm to analyze the differences between adjacent frames, the gastric wall motion is transformed into a quantifiable discrete displacement vector field, solving the problem of traditional methods' difficulty in capturing submicron-level tissue displacement. Next, the discrete displacement field is fitted into a continuous propagation trajectory, visually presenting the peristaltic wave's propagation process from the gastric body to the pylorus, allowing medical staff to directly observe the gastric motility. Furthermore, a multi-scale feature fusion algorithm extracts key dynamic parameters such as propagation velocity and peristaltic intensity from the trajectory, achieving a leap from qualitative observation to quantitative assessment. Finally, through the fusion visualization of vector arrows and color coding, the three-dimensional information of the propagation direction, velocity, and intensity of the peristaltic wave is simultaneously displayed, significantly improving the detection accuracy of gastric wall peristalsis. The entire process is non-invasive, greatly improving patient comfort while ensuring detection accuracy.

[0487] Further, in step S5, key dynamic parameters are superimposed onto the continuous creeping wave propagation trajectory in the form of vector arrows to obtain a visualized propagation trajectory with prominently displayed creeping wave propagation direction and intensity. This process then includes:

[0488] Step S10: Construct an abnormality database based on several typical abnormal features of the gastric organs pre-acquired using the gold standard method.

[0489] Preferably, a database containing typical abnormal patterns such as gastroparesis and functional dyspepsia can be established based on gold standard methods such as radionuclide scintillation imaging and ultrasonic gastric motility examination. The database needs to store: solid / liquid food emptying time parameters for patients with delayed gastric emptying (an isotope retention rate >10% after 4 hours is considered abnormal); quantitative indicators of the propagation speed, intensity, and rhythm of peristaltic waves in the gastric antrum; accompanying symptom characteristics (postprandial fullness, early satiety, nausea, vomiting, etc.); and pathophysiological mechanism data (such as the neuropathy characteristics of diabetic gastroparesis).

[0490] Step S20: Select key abnormal features from key dynamic parameters based on preset screening conditions.

[0491] Preferably, key anomalous features may include propagation stagnation features, rhythm disorder features, intensity attenuation features, and spatial anomaly features; the preset screening conditions for each anomalous feature are as follows:

[0492] ① Propagation sluggishness characteristic: The propagation speed of the peristaltic wave is lower than the normal threshold (e.g., <2cm / s).

[0493] ② Rhythm disorder characteristics: The standard deviation of the wave interval time exceeds the normal range (e.g., >1.5s).

[0494] ③ Intensity attenuation characteristics: The creep amplitude decreases to less than 60% of the normal value.

[0495] ④ Spatial abnormalities: Reverse peristalsis or stagnation occurs in local areas (such as the antrum of the stomach).

[0496] Step S30: Establish an anomaly feature classification model based on a convolutional neural network architecture, and train the anomaly feature classification model using an anomaly database.

[0497] Preferably, the anomaly feature classification model can be established and trained using the MobileNetV3 architecture within the Convolutional Neural Network (CNN) architecture. The MobileNetV3 architecture specifically includes:

[0498] ① Input layer: Receives the standardized creep parameter matrix (time × spatial dimension).

[0499] ② Feature extraction layer: Automatically extracts abnormal pattern features through depthwise separable convolution.

[0500] ③ Classification layer: Outputs the probability of abnormal type (slow propagation / rhythm disorder / mixed type).

[0501] ④ Model training should employ a cross-validation strategy, using typical case data from the database (such as cases of delayed solid emptying in gastroparesis) for supervised learning.

[0502] Specifically, step S30 is implemented through the following sub-steps:

[0503] Step S301: Establish an anomaly feature classification model based on the ResNet3D architecture.

[0504] Preferably, the anomaly feature classification model includes the following core components:

[0505] ① Input layer: Receives the standardized dynamic parameter matrix (time × spatial dimension), and the input size is adjusted to (1, 100, 32) according to the gastric wall peristalsis characteristics.

[0506] ② Feature extraction layer: It uses depthwise separable convolution to automatically extract abnormal pattern features, and contains 3 convolutional blocks (each containing a 3×3×3 convolutional kernel, batch normalization and ReLU activation).

[0507] ③ Attention mechanism: A channel attention module (SE Block) is inserted after the second convolutional block to dynamically adjust the weights of each feature channel.

[0508] ④ Classification layer: Global average pooling followed by a fully connected layer, outputting the probability of anomaly type (slow propagation / rhythm disorder / mixed type).

[0509] Step S302: Perform data augmentation and feature standardization on all typical abnormal features to obtain the training sample set.

[0510] Preferably, data augmentation can add Gaussian noise σ=0.1 to the transmission rate parameter of gastroparesis cases to simulate individual differences; feature standardization can use Z-score standardization to eliminate the influence of dimensions; and then anomaly labels are generated by labeling the abnormality type and severity (0 to 10 points) of each sample according to the gold standard (such as the results of radionuclide scintillation imaging).

[0511] Step S303: Input the training sample set into the anomaly classification model, and train the anomaly classification model using the combined loss function and AdamW optimizer until the combined loss function no longer decreases, thus obtaining the trained anomaly classification model.

[0512] Preferably, the anomaly feature classification model can adopt the following training strategy:

[0513] ①Loss function: Combine cross-entropy loss (for classification tasks) and mean squared error (for regression tasks) with a weight ratio of 3:1.

[0514] ② Optimizer: AdamW optimizer (initial learning rate 0.0001, weight decay 0.00001).

[0515] ③ Training strategy: Cosine annealing learning rate scheduling is used for the first 5 rounds; from the 6th round onwards, an early stopping mechanism is introduced, and the training is terminated if the loss does not decrease for 3 consecutive rounds.

[0516] ④ Regularization: Dropout rate 0.5, L2 regularization coefficient 0.0001.

[0517] Beneficial effects:

[0518] In this embodiment, steps S301 to S303 effectively capture the spatiotemporal features of gastric wall peristalsis using a 3D convolutional neural network architecture. The depthwise separable convolutional structure of ResNet3D automatically extracts multi-scale abnormal pattern features, and its residual connection mechanism solves the gradient vanishing problem in deep network training, enabling the model to learn more complex abnormal feature representations. Before model training, data augmentation techniques (such as adding Gaussian noise) are used to simulate individual differences, and Z-score standardization is combined to eliminate the influence of dimensions and improve the model's generalization ability. During training, the combined loss function (cross-entropy loss and mean squared error) and the AdamW optimizer (with weight decay) ensure efficient updating of model parameters, while early stopping mechanisms and cosine annealing learning rate scheduling further optimize training efficiency. The final classification model can accurately identify characteristic peristaltic patterns such as gastroparesis and functional dyspepsia.

[0519] Step S40: Input the key abnormal features into the abnormal feature classification model to obtain the similarity values ​​between the key abnormal features and the typical abnormal features of each gastric organ.

[0520] Specifically, step S40 is implemented through the following sub-steps:

[0521] Step S401: Map all key abnormal features to the same high-dimensional feature space through the fully connected layer of the abnormal feature classification model to obtain the abnormal feature vector.

[0522] Step S402: Input all abnormal feature vectors into the input layer of the abnormal feature classification model, and output waveform morphology matching degree, temporal feature similarity, and cosine similarity through the three parallel branches of the abnormal feature classification model.

[0523] Step S403: The similarity value is obtained by weighted fusion of waveform shape matching degree, temporal feature similarity and cosine similarity.

[0524] Beneficial effects:

[0525] In this embodiment, steps S401 to S403 map key abnormal features to a high-dimensional feature space through a fully connected layer and employ a multi-branch parallel computing mechanism to achieve a comprehensive assessment of abnormal features of the gastric organ. Its core advantage lies in the fact that the mapping process not only preserves the biomechanical significance of the original features but also enhances the discriminative power of abnormal patterns through the linear separability of the high-dimensional space, laying a solid foundation for subsequent similarity calculations. Furthermore, the three parallel branches integrate multimodal assessment dimensions. The structural similarity index branch focuses on topological matching of peristaltic wave morphology, enabling the identification of waveform distortions characteristic of gastroparesis; the dynamic time warping branch effectively captures the rhythmic disorder features of functional dyspepsia by elastically aligning temporal data; and the cosine similarity branch assesses overall similarity from the perspective of parameter space distribution. This multi-dimensional assessment mechanism overcomes the limitations of single indicators. For example, traditional methods relying solely on propagation velocity thresholds may miss early gastroparesis, while this scheme significantly improves the ability to identify complex abnormalities (such as diabetic gastroparesis combined with gastroesophageal reflux) through joint analysis of waveform morphology and temporal features.

[0526] Step S50: Obtain the typical abnormal features of the gastric organ corresponding to the maximum value among all similarity values, and define it as the abnormal features of the subject's gastric organ.

[0527] Beneficial effects:

[0528] In this embodiment, steps S10 to S50 construct an anomaly database based on the gold standard method, providing a reliable reference benchmark for subsequent analysis and ensuring consistency between detection results and practice. Furthermore, by integrating typical abnormal features such as gastroparesis and functional dyspepsia, the database can comprehensively cover the pathological patterns of various gastric motility disorders, providing rich comparison samples for anomaly identification. Secondly, the anomaly feature classification model based on the ResNet3D architecture can automatically extract and analyze the complex features of gastric peristalsis parameters through deep learning technology. Finally, multi-dimensional similarity calculation is achieved through fully connected layers and parallel branch structures (SSIM, DTW, cosine similarity), which can output the matching probability with typical abnormal features of various gastric organs, providing medical staff with an intuitive distribution map of abnormal features.

[0529] It should be noted that the code appearing in this embodiment is a simplified version of the key code. The code appearing above is only for explaining the principle and does not represent all the original code of each step in this embodiment. Please do not confuse it with the code of the complete software execution.

[0530] See Figure 2 Based on the above embodiments, this embodiment provides an embodiment of an ultrasound-based gastric wall peristalsis detection device. In this embodiment, the gastric wall peristalsis detection device is applied to the gastric wall peristalsis detection method as described in the above embodiments.

[0531] Specifically, the gastric wall peristalsis detection device includes a raw ultrasound image sequence acquisition module 1, a discrete displacement vector field acquisition module 2, a continuous peristaltic wave propagation trajectory fitting module 3, a key dynamic parameter extraction module 4, and a visualization propagation trajectory acquisition module 5, which are sequentially electrically or signalally connected.

[0532] The original ultrasound image sequence acquisition module 1 is used to continuously acquire several dynamic echo signals of the gastric organ of the subject based on the cross-sectional area of ​​the anterior wall of the gastric antrum using an external ultrasound probe with a preset frame rate, thereby obtaining the original ultrasound image sequence; the discrete displacement vector field acquisition module 2 is used to differentiate adjacent frames of the original ultrasound image sequence using the PBT-CCA joint algorithm, and obtain a discrete displacement vector field based on a pair of adjacent frames; the continuous peristaltic wave propagation trajectory fitting module 3 is used to fit all discrete displacement vector fields into a continuous peristaltic wave propagation trajectory; the key dynamic parameter extraction module 4 is used to extract the key dynamic parameters of the continuous peristaltic wave propagation trajectory using a multi-scale feature fusion algorithm; and the visualization propagation trajectory acquisition module 5 is used to superimpose the key dynamic parameters onto the continuous peristaltic wave propagation trajectory in the form of vector arrows, thereby obtaining a visualization propagation trajectory with prominently displayed peristaltic wave propagation direction and intensity.

[0533] It should be noted that this embodiment is a functional module embodiment based on the above method embodiment. For the preferred, extended, limited, exemplified, and principle-explained parts of this embodiment, please refer to the above embodiments. This embodiment will not repeat them here.

[0534] Figure 3 This is a schematic diagram of the structure of an electronic device according to an embodiment of this application. Figure 3 As shown, the electronic device 6 includes a processor 61 and a memory 62 coupled to the processor 61.

[0535] The memory 62 stores program instructions for implementing the federated learning-based collaborative energy-saving method for government data clusters in any of the above embodiments.

[0536] The processor 61 is used to execute program instructions stored in the memory 62 for collaborative energy saving of government data clusters based on federated learning.

[0537] The processor 61 can also be referred to as a CPU (Central Processing Unit). The processor 61 may be an integrated circuit chip with signal processing capabilities. The processor 61 can also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. A general-purpose processor can be a microprocessor or any conventional processor.

[0538] Furthermore, Figure 4 This is a schematic diagram of the structure of a storage medium according to an embodiment of this application. See also: Figure 4 In this embodiment of the application, the storage medium 7 stores program instructions 71 capable of implementing all the above methods. These program instructions 71 can be stored in the storage medium in the form of a software product, including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods in each embodiment of the application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks, or terminal devices such as computers, servers, mobile phones, and tablets.

[0539] In the several embodiments provided in this application, it should be understood that the disclosed systems, methods, and approaches can be implemented in other ways. For example, the system embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between systems or units may be electrical, mechanical, signal, or other forms.

[0540] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated units described above can be implemented in hardware or as software functional units. The above are merely embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made based on the description and drawings of this application, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.

Claims

1. An ultrasound-based gastric wall peristalsis detection device, wherein the gastric wall peristalsis detection device is used to implement an ultrasound-based gastric wall peristalsis detection method, wherein the gastric wall peristalsis detection method is applied to the gastric organ of a subject that has been exposed to an ultrasound contrast agent, characterized in that, The method for detecting gastric wall peristalsis includes: Step S1: A series of dynamic echo signals of the subject's gastric organ based on the cross-sectional area of ​​the anterior wall of the gastric antrum are continuously acquired by an external ultrasound probe with a preset frame rate to obtain the original ultrasound image sequence. Step S2: Differentiate adjacent frames of the original ultrasound image sequence using the PBT-CCA joint algorithm to obtain a discrete displacement vector field based on a pair of adjacent frames; Step S21: Preprocess the original ultrasound image sequence to obtain a preprocessed ultrasound image sequence; Step S22: Perform Fourier transform on adjacent frame images of the processed ultrasound image sequence to obtain a cross power spectrum based on a pair of adjacent frames; Step S23: Obtain the image translation amount of the current adjacent frame based on the peak position of the current cross power spectrum, and define the image translation amount as the initial displacement estimate; Step S24: Obtain the cross-correlation function of the current cross-power spectrum using a cross-correlation algorithm; Step S25: Starting from the current initial displacement estimate based on the image position of the current cross power spectrum, find the displacement corresponding to the maximum value of the cross-correlation coefficient of the cross-correlation function in the form of circular radiation from the starting point, and define it as the final displacement estimate. Step S26: Spatial interpolation is performed on the final displacement estimates of the current adjacent frames to obtain the discrete displacement vector field of the current adjacent frames; Step S3: Fit all discrete displacement vector fields to the propagation trajectory of a continuous creeping wave; Step S31: Preprocess each discrete displacement vector field to obtain a preprocessed discrete displacement vector field based on a discrete displacement vector field. Step S32: Spatiotemporal interpolation is performed on all discrete displacement vector fields using the B-spline curve interpolation algorithm to convert the discrete displacement vector fields of adjacent frames into a continuous displacement dataset. Step S33: Calculate the propagation direction field of the subject's stomach organ using the continuous displacement dataset; Step S34: Input the propagation direction field into the thin plate spline surface fitting model to reconstruct the continuous trajectory and obtain the continuous creeping wave propagation trajectory; Step S4: Extract the key dynamic parameters of the continuous creeping wave propagation trajectory using a multi-scale feature fusion algorithm; Step S41: The continuous creeping wave propagation trajectory is decomposed into several trajectory features of different resolutions using the Gaussian pyramid decomposition algorithm. Step S42: Extract the key dynamic parameters for each trajectory feature; Step S43: Input all key dynamic parameters into the multi-scale feature fusion network for fusion to obtain the fused feature matrix; Step S44: Extract the dynamic parameter set based on the fused feature matrix; Step S45: Standardize the set of dynamic parameters to obtain a standardized set of dynamic parameters, wherein the key dynamic parameters include several key dynamic parameters; Step S5: The key dynamic parameters are superimposed onto the continuous peristaltic wave propagation trajectory in the form of vector arrows to obtain a visualized propagation trajectory with prominently displayed peristaltic wave propagation direction and intensity.

2. The gastric wall peristalsis detection device according to claim 1, characterized in that, Step S5: The key dynamic parameters are superimposed onto the continuous peristaltic wave propagation trajectory as vector arrows to obtain a visualized propagation trajectory with prominently displayed peristaltic wave propagation direction and intensity. This then includes: Step S10: Construct an abnormality database based on several typical abnormal features of the gastric organs pre-acquired using the gold standard method; Step S20: Select key abnormal features from the key dynamic parameters based on preset screening conditions; Step S30: Establish an anomaly feature classification model based on a convolutional neural network architecture, and train the anomaly feature classification model using the anomaly database; Step S40: Input the key abnormal features into the abnormal feature classification model to obtain the similarity values ​​between the key abnormal features and the typical abnormal features of each gastric organ. Step S50: Obtain the typical abnormal features of the gastric organ corresponding to the maximum value among all similarity values, and define it as the abnormal features of the subject's gastric organ.

3. The gastric wall peristalsis detection device according to claim 2, characterized in that, Step S30: Establish an anomaly feature classification model based on a convolutional neural network architecture, and train the anomaly feature classification model using the anomaly database, including: Step S301: Establish an anomaly feature classification model based on the ResNet3D architecture; Step S302: Perform data augmentation and feature standardization on all typical abnormal features to obtain the training sample set; Step S303: Input the training sample set into the anomaly feature classification model, and train the anomaly feature classification model using a combined loss function and the AdamW optimizer until the combined loss function no longer decreases, thus obtaining the trained anomaly feature classification model.

4. The gastric wall peristalsis detection device according to claim 2, characterized in that, Step S40: Input the key abnormal features into the abnormal feature classification model to obtain the similarity scores between the key abnormal features and typical abnormal features of each gastric organ, including: Step S401: Map all key abnormal features to the same high-dimensional feature space through the fully connected layer of the abnormal feature classification model to obtain the abnormal feature vector. Step S402: Input all abnormal feature vectors into the input layer of the abnormal feature classification model, and output waveform morphology matching degree, temporal feature similarity, and cosine similarity through the three parallel branches of the abnormal feature classification model respectively. Step S403: The similarity value is obtained by weighted fusion of the waveform morphology matching degree, the temporal feature similarity, and the cosine similarity.

Citation Information

Patent Citations

  • Spatially-fine shear wave dispersion ultrasound vibrometry sampling

    CN102469980A

  • Dynamic dimming method and system based on dual-channel camera illumination sensing

    CN120264546A