Method for constructing lung dysfunction recognition model based on neural network

By identifying respiratory states and state transition points, the parameter adjustment of the neural network model is optimized, solving the problems of inaccurate feature extraction and coarse parameter adjustment in existing methods. This improves the accuracy and efficiency of lung function disorder identification and adapts to application needs in different scenarios.

CN121662337APending Publication Date: 2026-03-13SHANGHAI UNIV OF T C M
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-12
Publication Date
2026-03-13

AI Technical Summary

Technical Problem

Existing neural network-based methods for identifying pulmonary dysfunction do not fully consider the differences and dynamic changes in respiratory states, resulting in inaccurate feature extraction, insufficient model generalization ability, and coarse parameter adjustment, which increases training time and computational resource consumption, making it difficult to meet the needs of large-scale screening and real-time monitoring.

Method used

By identifying respiratory states and state transition points, feature parameters are extracted, key points for adjusting model parameters are determined, and similar and dissimilar key points are distinguished. Feature deviation parameters are calculated, model similarity parameters are derived, and the neural network model is optimized to adapt to different respiratory states.

Benefits of technology

It enables refined processing of lung function data, improves model training efficiency and recognition accuracy, reduces computational resource consumption, expands the application scope of the model, and adapts to the needs of lung function impairment recognition in different scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121662337A_ABST
    Figure CN121662337A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of lung function recognition, and discloses a method for constructing a lung dysfunction recognition model based on a neural network. The method comprises the following steps: collecting lung function data, and identifying a breathing state and a state transition point in the lung function data; feature parameters are extracted according to the recognition result, and training activation signals of the neural network model are generated based on the parameters; judging model parameter adjustment key points according to the training activation signal, wherein the key points comprise parameter correction points caused by data variation in the same breathing state and parameter rearrangement points caused by switching of different breathing states; key point types are distinguished, and characteristic deviation parameters are calculated, wherein the parameters reflect parameter changes in the states and between the states; deducing model similarity parameters containing general parameters and exclusive parameters based on the characteristic deviation parameters; and optimizing a neural network model by adopting the parameters to complete establishment of a pulmonary dysfunction recognition model. The method adapts to lung function data processing requirements in different scenes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of lung function identification technology, specifically a method for constructing a lung function impairment identification model based on neural networks. Background Technology

[0002] In the fields of clinical diagnosis and health monitoring, early identification of pulmonary dysfunction is of great value for disease intervention and treatment. Currently, the identification of pulmonary dysfunction mainly relies on traditional pulmonary function testing equipment and related analysis methods. These methods require professionals to operate the equipment to collect pulmonary function data, and then manually analyze the data based on experience to determine whether functional impairment exists. This process not only consumes a lot of manpower and time, but is also prone to deviations in analysis results due to differences in personnel operation and experience levels, making it difficult to meet the needs of large-scale screening or real-time monitoring.

[0003] With the development of artificial intelligence technology, machine learning and neural network models are increasingly being applied to the field of pulmonary function disorder identification. Existing neural network-based identification methods often employ direct feature extraction and model training from raw pulmonary function data, failing to fully consider the strong correlation between pulmonary function data and respiratory states. The respiratory process includes different states such as inspiration and expiration, and pulmonary function parameters (such as airflow velocity and lung volume) differ significantly between these states, with dynamic changes occurring during state transitions. Existing methods ignore these state differences and dynamic changes, employing only a uniform feature extraction and parameter adjustment strategy. This results in extracted features that cannot accurately represent pulmonary function characteristics under different respiratory states, thus affecting the model's accuracy in identifying pulmonary function disorders.

[0004] Existing neural network models lack precise identification of key points for parameter adjustment during the parameter tuning process. During model training, parameter adjustments are often based on global correction of overall data error, failing to distinguish between parameter correction needs arising from natural data variations within the same respiratory state and parameter reset needs caused by abrupt parameter changes when switching between different respiratory states. This coarse-grained parameter tuning approach easily leads to a decline in the model's fitting performance to data from other states when adapted to data from a particular respiratory state, resulting in insufficient generalization ability. Furthermore, the parameters of existing models are often proprietary to specific respiratory states and cannot be reused across different respiratory states. Each time a new or adjusted respiratory state-related analysis task is added, the model parameters must be retrained, increasing the time cost and computational resource consumption of model training, hindering the rapid deployment and widespread application of the model.

[0005] Existing methods lack an effective mechanism for calculating feature bias parameters in the feature processing stage. This prevents the accurate quantification of the differences between parameter changes within and between states, resulting in derived model parameters that lack specific adaptation to the dynamic characteristics of respiratory states. Consequently, the reliability of the model in identifying pulmonary dysfunction is further reduced. These issues collectively limit the performance improvement and practical application scope of neural network-based pulmonary dysfunction identification models. Summary of the Invention

[0006] The purpose of this invention is to provide a method for constructing a lung dysfunction identification model based on a neural network, so as to solve the problems mentioned in the background art.

[0007] To achieve the above objectives, the present invention provides a method for constructing a lung function impairment identification model based on a neural network, the method comprising: Collect lung function data and identify respiratory states and transition points in the data; Based on the identified respiratory states and state transition points, feature parameters are extracted from the lung function data; based on the extracted feature parameters, training activation signals for the neural network model are generated. Based on the generated training activation signals, the key points for model parameter adjustment are determined. These key points include parameter correction points caused by data variation under the same breathing state and parameter reset points caused by switching between different breathing states. The determined key points for parameter adjustment are distinguished into similar key points and dissimilar key points, and then the feature deviation parameters are calculated. The feature deviation parameters reflect the parameter changes within the state and the parameter changes between states. Based on the calculated feature deviation parameters, the model similarity parameters are derived. The model similarity parameters include general parameters that can be reused across respiratory states and specific parameters that are only applicable to individual respiratory states. The derived model similarity parameters were used to optimize the neural network model, and finally the lung function disorder identification model was established.

[0008] Preferably, the process of collecting lung function data and identifying respiratory states and state transition points in the data includes the following steps: constructing a multimodal data stream containing time-series flow velocity signals, images of changes in pleural volume, and audio frequencies of respiratory sounds; performing piecewise linear fitting on the time-series flow velocity signals and extracting points of change in the fitting slope as potential state transition markers; performing optical flow analysis on the images of changes in pleural volume to generate a pleural motion vector field and calculating divergence abrupt change points in the vector field; extracting Mel-frequency cepstral coefficients from the audio frequencies of respiratory sounds and identifying the transition moments of the audio spectrum energy; and performing time alignment and confidence-weighted fusion on the points of change in the fitting slope, divergence abrupt change points, and spectral energy transition moments to finally determine the respiratory state and state transition points.

[0009] Preferably, the process of extracting feature parameters from lung function data includes the following steps: using the respiratory state transition point as a time anchor, dividing the multimodal data within each state cycle into multiple time windows; within each time window, using a temporal convolutional network to extract local trend features from the time-series flow velocity signal; simultaneously, using a three-dimensional convolutional network to extract spatial motion features from the pleural volume change image sequence; calculating the correlation weight between the local trend features and the spatial motion features through a cross-modal attention mechanism to generate a weighted fused spatiotemporal feature vector; and arranging the spatiotemporal feature vectors of all time windows in chronological order to constitute the feature parameters.

[0010] Preferably, the process of generating a training activation signal for the neural network model based on the extracted feature parameters includes the following steps: real-time monitoring of changes in the feature parameters; calculation of the dynamic time warping distance between the current dynamic feature parameters and historical feature templates; generation of a primary trigger pulse when the dynamic time warping distance exceeds an adaptive threshold; pulse width modulation of the primary trigger pulse, the modulation depth of which is positively correlated with the amplitude of the dynamic time warping distance; and use the modulated pulse signal as the training activation signal, with its rising edge marking the start of the model update cycle.

[0011] Preferably, the process of determining the key points for model parameter adjustment includes the following steps: establishing a feature trajectory map containing multiple typical breathing patterns; mapping the real-time acquired feature parameters onto the feature trajectory map and calculating their fit with each trajectory in the map; identifying the reference trajectory with the highest fit and marking the deviation points between the current sequence and the reference trajectory as potential key points; filtering and verifying the potential key points based on the persistence of the deviation points and the consistency of the deviation direction; confirming the verified deviation points as key points for model parameter adjustment and recording their corresponding breathing pattern types.

[0012] Preferably, the process of distinguishing the determined parameter adjustment key points into similar key points and dissimilar key points, and then calculating the feature deviation parameter, includes: for similar key points, calculating the mean cosine similarity of the feature vectors between key points as an intra-state deviation measure; for dissimilar key points, calculating the Mahalanobis distance of the feature vectors before and after the state transition as an inter-state deviation measure; fusing the mean cosine similarity and the Mahalanobis distance, and using weighted summation to obtain the comprehensive feature deviation parameter.

[0013] Preferably, the process of deriving model similarity parameters based on the calculated feature deviation parameters includes: applying a hierarchical clustering algorithm to group the feature deviation parameters to form a clustering tree; determining a general parameter group and a specific parameter group according to the cutting height of the clustering tree; labeling the parameters in the general parameter group as transfer parameters and the parameters in the specific parameter group as independent parameters; verifying the separability of the parameter groups through linear discriminant analysis and adjusting the parameter division.

[0014] Preferably, the process of optimizing the neural network model using the derived model similarity parameters includes: initializing the transfer parameters as shared weights of the neural network and initializing the independent parameters as private weights of a specific layer; training the neural network using lung function data and updating the parameters using an adaptive moment estimation algorithm; and periodically verifying the model's performance on state segments during training, and readjusting the parameter initialization if the performance degrades.

[0015] Preferably, generating the training activation signal includes: analyzing the gradient changes of the feature vector and calculating the moving average of the gradient magnitude; triggering an early activation signal when the moving average suddenly increases; and adjusting the activation timing using a time series prediction model in conjunction with historical activation patterns to achieve adaptive triggering.

[0016] Preferably, the application of the hierarchical clustering algorithm to group the feature deviation parameters includes: calculating the dissimilarity matrix between the feature deviation parameters and performing clustering using the Ward variance minimization algorithm; extracting the center point of each cluster as a representative parameter based on the clustering results; evaluating the clustering quality through the silhouette coefficient and optimizing the number of clusters and parameter allocation.

[0017] Compared with the prior art, the beneficial effects of the present invention are: This method, in the initial stage of data processing, achieves refined segmentation of lung function data by collecting lung function data and identifying respiratory states and state transition points. The accurate identification of respiratory states and state transition points allows subsequent feature extraction to focus on effective data under different respiratory states, avoiding feature interference caused by the mixing of data from different states in the original data. Compared to existing methods that directly extract features from the entire dataset, this method allows the extracted feature parameters to better reflect the physiological characteristics of lung function under different respiratory states, more accurately reflecting the inherent patterns of lung function data, and providing more targeted input information for subsequent model training.

[0018] Feature parameters are extracted based on the identified respiratory states and state transition points, and training activation signals for the neural network model are generated. This makes the triggering and adjustment of model training more closely match the actual characteristics of the data. The training activation signal is generated from the specifically extracted feature parameters, which can accurately convey lung function feature information under different respiratory states. This allows the neural network model to more easily capture key features related to lung dysfunction during training, reduces interference from irrelevant information, and improves the efficiency and accuracy of model training.

[0019] By identifying key points for model parameter adjustment based on training activation signals and distinguishing between similar and dissimilar key points, the model parameter adjustment becomes more refined and targeted. Key points include parameter correction points triggered by data variations within the same breathing state and parameter reset points triggered by switching between different breathing states. This distinction allows model parameter adjustment to adapt to different scenario requirements. For data variations within the same breathing state, fine-tuning the model parameters through parameter correction points ensures the model's adaptability to data changes in that state. For switching between different breathing states, resetting the model parameters through parameter reset points avoids the influence of previous state parameters on the current state's data fitting. This precise identification and distinction of key points solves the problem of insufficient generalization ability caused by coarse parameter adjustment in existing methods, allowing the model to maintain good fitting performance across different breathing states.

[0020] By calculating the feature deviation parameter, the difference between parameter changes within and between states can be accurately reflected, providing a reliable basis for the derivation of subsequent model similarity parameters. The calculation of the feature deviation parameter is based on the differentiated key points of similar and dissimilar types, quantifying the parameter change characteristics in different dimensions and avoiding the parameter adaptability problem caused by the lack of an effective quantification mechanism in existing methods. The model similarity parameters derived from this feature deviation parameter further realize parameter classification and optimization. General parameters that can be reused across breathing states can be shared between different breathing states, reducing parameter redundancy during model training, lowering the time cost and computational resource consumption required for training, and improving the efficiency of model deployment. Specific parameters adapted only to individual breathing states can be optimized for the characteristics of specific breathing states, ensuring the model's targeted adaptation to data from different breathing states, balancing the model's generality and specificity.

[0021] Optimizing neural network models using model similarity parameters can comprehensively improve their overall performance. The combination of general and specific parameters allows the model to adapt across respiratory states and accurately fit lung function characteristics under different respiratory states, effectively addressing the shortcomings of existing models in terms of insufficient generalization and lack of specificity. The optimized neural network model can more accurately capture feature signals related to lung dysfunction under different respiratory states, reducing identification bias caused by data contamination and improper parameter adaptation, thus improving the reliability of model identification. Furthermore, the method has a clear overall process logic, forming a complete solution adapted to the dynamic characteristics of respiratory states, from data processing and feature extraction to parameter adjustment and model optimization. It can adapt to the lung function data processing needs of different scenarios, playing a significant role in both precise analysis in clinical diagnosis and efficient identification in large-scale health screening, thus expanding the practical application scope of neural network-based lung dysfunction identification models. Attached Figure Description

[0022] Figure 1 This is a schematic diagram illustrating the working principle of the method for constructing a lung function impairment identification model based on a neural network as described in this invention. Figure 2 A flowchart for multimodal feature parameter extraction; Figure 3 The flowchart for calculating the characteristic deviation parameter. Detailed Implementation

[0023] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0024] Please see Figure 1This invention provides a method for constructing a pulmonary function disorder identification model based on a neural network. The method includes: collecting pulmonary function data and identifying respiratory states and state transition points in the data; extracting feature parameters from the pulmonary function data based on the respiratory states and state transition points; generating a training activation signal for the neural network model based on the feature parameters; determining key points for model parameter adjustment based on the training activation signal, including parameter correction points caused by data variation under the same respiratory state and parameter reset points caused by switching between different respiratory states; distinguishing the key points for parameter adjustment into similar key points and dissimilar key points, and then calculating feature deviation parameters, which reflect parameter changes within and between states; deriving model similarity parameters based on the feature deviation parameters, which include general parameters that can be reused across respiratory states and specific parameters that are only applicable to individual respiratory states; optimizing the neural network model using the model similarity parameters, and finally establishing a pulmonary function disorder identification model.

[0025] Example 1: See Figure 2 The process of acquiring lung function data and identifying respiratory states and transition points within the data constructs a multimodal data stream containing time-series flow velocity signals, images of changes in pleural volume, and audio recordings of respiratory sounds. This multimodal data stream relies on an integrated physiological signal acquisition system. This system includes a high-precision differential pressure respiratory velocity sensor to capture airflow velocity changes, a high-speed stereo vision depth camera to record the three-dimensional motion sequence of the pleural surface, and a medical-grade contact microphone to collect respiratory sounds. The sampling frequency of the time-series flow velocity signal is set to 100 Hz, and the signal output is a continuous voltage value, linearly related to airflow velocity. The raw signal passes through a hardware low-pass filter to eliminate high-frequency noise interference. The frame rate for acquiring images of changes in pleural volume is set to 30 frames per second. The depth camera has a built-in structured light projector, which generates a high-precision depth map sequence by calculating the phase shift of laser speckle. Each depth map frame contains hundreds of thousands of three-dimensional point cloud data. The sampling rate for the breath sound audio was 44.1 kHz. The microphone was placed in the suprasternal notch area. The audio signal passed through a preamplifier and a bandpass filter. The passband of the bandpass filter was set to 100 Hz to 2000 Hz to preserve the effective components of the breath sound.

[0026] Piecewise linear fitting is performed on the time-series flow velocity signal, and the points of change in the fitted slope are extracted as potential state transition markers. The piecewise linear fitting employs an iterative algorithm based on an adaptive window. During algorithm initialization, the entire signal sequence is divided into several fixed-length segments. For each segment, a straight line is fitted using the least squares method, and the slope value of the line is calculated. The slope difference between adjacent segments is calculated in real time. When the absolute value of the slope difference exceeds a preset dynamic threshold, the algorithm inserts a new segment at that location. The dynamic threshold is updated based on the moving average and standard deviation of historical slope differences. The fitting process iterates continuously until the slope changes between all segments tend to stabilize. The final segment points are the fitted slope change points, corresponding to moments in the flow velocity curve where acceleration changes significantly, such as the flow velocity surge at the beginning of inspiration or the flow velocity plateau at the end of expiration. Each fitted slope change point is accompanied by a confidence score, which is determined by both the fitting residual and the significance of the slope change.

[0027] Optical flow analysis was performed on images of changes in thoracic cavity volume to generate a thoracic cavity motion vector field, and divergence abrupt changes were calculated. An improved dense optical flow algorithm was employed for the optical flow analysis. The algorithm first preprocesses the continuous depth map sequence, including coordinate normalization and voxel meshing, converting the point cloud data into a regular 3D voxel array. Optical flow calculations were performed in voxel space. By solving the constant brightness constraint equation and the spatial smoothness constraint equation, the 3D motion vector of each voxel between adjacent frames was calculated. The motion vectors of all voxels constitute a dense thoracic cavity motion vector field. The divergence of the vector field was calculated using differential geometry. The divergence value characterizes the rate of volume change in a local region; positive values ​​indicate an expansion trend, and negative values ​​indicate a contraction trend. Divergence abrupt changes were identified by detecting the zero-crossing points of the first derivative of the divergence time series. These divergence abrupt changes correspond to moments when the direction of thoracic cavity motion reverses, such as when the thoracic cavity reaches its limit of expansion at the end of inspiration or when it contracts to its minimum volume at the end of expiration. Each divergence abrupt change point is also assigned a confidence weight, the weight value of which is proportional to the magnitude of the divergence change and the signal-to-noise ratio of the vector field.

[0028] Mel frequency cepstral coefficients were extracted from breath sound audio to identify the transition moments of audio spectral energy. The Mel frequency cepstral coefficient extraction process includes pre-emphasis, framing, windowing, fast Fourier transform, Mel filter bank filtering, logarithmic operation, and discrete cosine transform. In the pre-emphasis stage, a first-order high-pass filter was used to boost high-frequency components. In the framing stage, the audio signal was divided into short frames of 25 milliseconds with a frame shift of 10 milliseconds. In the windowing stage, a Hamming window function was used to reduce spectral leakage. The fast Fourier transform converted each frame signal to the frequency domain, generating a power spectrum. The Mel filter bank consisted of 40 triangular bandpass filters with their center frequencies uniformly distributed according to the Mel scale. Logarithmic operation converted the power values ​​to a decibel scale, and discrete cosine transform compressed the logarithmic Mel spectrum, extracting a 12-dimensional Mel frequency cepstral coefficient feature vector. The transition moments of audio spectral energy are detected by analyzing the dynamic changes of the Mel frequency cepstral coefficient sequence. The Euclidean distance between the Mel frequency cepstral coefficient vectors of adjacent frames is calculated. When the distance value has a local peak and exceeds the adaptive threshold, it is marked as a spectral energy transition moment. These moments are often synchronized with the transition of the breathing phase, such as the alternation point between inspiratory and expiratory sounds.

[0029] The fitting slope change points, divergence abrupt change points, and spectral energy transition moments are time-aligned and weighted with confidence to ultimately determine the breathing state and state transition points. The time alignment operation employs a dynamic time warping algorithm, which can flexibly stretch or compress the time series of different modes to achieve optimal matching of their feature points on the time axis. The multimodal data streams have already achieved coarse-grained alignment during acquisition using hardware synchronization signals; dynamic time warping then fine-tunes this, generating an optimal time curvature path. The confidence-weighted fusion is based on the Durmst-Schaffer evidence theory, treating each mode's state transition point as a piece of evidence. The confidence of the fitting slope change points is derived from the coefficients of determination of the linear fitting; the confidence of the divergence abrupt change points is based on the spatial consistency of the optical flow field; and the confidence of the spectral energy transition moments is related to the signal-to-noise ratio of the Mel frequency cepstral coefficient sequence. Evidence theory merges this uncertain information, outputting a fused set of respiratory states and state transition points. Respiratory states are categorized into inspiratory phase, expiratory phase, and possible breath-holding phase. State transition points precisely mark key events such as the start and end of inspiration, the start and end of expiration, and the end of expiration. The process of extracting feature parameters from pulmonary function data uses respiratory state transition points as time anchors, dividing the multimodal data within each state cycle into multiple time windows. The time window division strategy follows the physiological laws of respiratory movement. A complete respiratory cycle begins at the start of inspiration and ends at the start of the next inspiration, with the cycle further subdivided into smaller analytical units based on state transition points. For example, the inspiratory phase is evenly divided into three time windows, corresponding to the inspiratory acceleration phase, inspiratory peak phase, and inspiratory deceleration phase, respectively. The expiratory phase is similarly divided into three windows, corresponding to the expiratory acceleration phase, expiratory peak phase, and expiratory deceleration phase. The boundaries of each time window are determined by interpolation of state transition points. The length of the time window adapts to the total duration of the respiratory cycle, ensuring comparability of time windows at different respiratory rates. Data segments within the window are extracted for subsequent feature calculations.

[0030] Within each time window, a temporal convolutional network (TCNN) is used to extract local trend features from the time-series flow velocity signal. A TCNN is a convolutional neural network specifically designed for processing one-dimensional time series. The network structure consists of an input layer, three one-dimensional convolutional layers, two max-pooling layers, and a fully connected layer. The input layer receives a flow velocity signal segment within a time window. This signal segment is normalized. The one-dimensional convolutional layers scan the signal using kernels of varying widths: the first kernel has a width of 5 sampling points to capture short-term fluctuations, the second kernel has a width of 10 sampling points to extract intermediate trends, and the third kernel has a width of 15 sampling points to capture long-term patterns. Each convolutional layer is followed by a ReLU activation function and a batch normalization operation. The max-pooling layers reduce the temporal resolution of the feature maps, and the fully connected layer maps the convolutional features into a 128-dimensional local trend feature vector. This local trend feature vector encodes the changes in the flow velocity signal within the time window, such as the slope of ascent, curve shape, and fluctuation patterns. Spatial motion features are extracted from a sequence of images showing changes in thoracic cavity volume using a 3D convolutional network. The 3D convolutional network processes a 3D tensor composed of multiple consecutive depth maps, where the three dimensions represent the image's height, width, and temporal depth, respectively. The network structure comprises two 3D convolutional layers and one 3D max-pooling layer. The first 3D convolutional layer uses a 3x3x3 kernel to extract low-level spatiotemporal edge features, while the second 3D convolutional layer uses a 5x5x5 kernel to capture high-level thoracic cavity motion patterns. The 3D convolutional operations are performed simultaneously in both spatial and temporal dimensions, enabling the perception of the motion trajectory of points on the thoracic cavity surface. The 3D max-pooling layer downsamples the spatial dimension, preserving the most significant motion information. At the end of the network is a global average pooling layer, which compresses the feature map into a 256-dimensional spatial motion feature vector. This vector describes the overall motion characteristics of the thoracic cavity within a time window, including expansion amplitude, motion symmetry, and regional coordination.

[0031] A cross-modal attention mechanism is used to calculate the correlation weights between local trend features and spatial motion features, generating a weighted fused spatiotemporal feature vector. This mechanism, a content-addressed fusion strategy, first maps the local trend feature vector and the spatial motion feature vector to the same common feature space through a linear transformation layer. In this common feature space, the dot product similarity between the local trend feature vector and the spatial motion feature vector is calculated. The similarity score is normalized using a Softmax function to generate a set of attention weights, reflecting the correlation between the two modal features. The spatial motion feature vector is then weighted and summed using these attention weights to obtain a weighted spatial motion representation. This representation is concatenated with the original local trend feature vector, and then dimensionality compression and information fusion are performed through a fully connected layer, ultimately outputting a 200-dimensional spatiotemporal feature vector. This spatiotemporal feature vector integrates information from flow dynamics and thoracic cavity movement, forming a compact representation of respiratory actions. The spatiotemporal feature vectors of all time windows are arranged in chronological order to form feature parameters. The chronological order strictly follows the physiological sequence of the respiratory cycle, starting from the first time window of the inspiratory phase and sequentially passing through each window of the inspiratory and expiratory phases, ultimately forming a complete feature sequence. The length of the feature sequence is variable, depending on the duration of the respiratory cycle, but the dimension of the feature vector corresponding to each time window is fixed at 200 dimensions. The feature sequence forms a multidimensional time series that captures the dynamic changes in lung function throughout the entire respiratory cycle.

[0032] Example 2: The process of generating training activation signals for a neural network model based on extracted feature parameters involves real-time monitoring of changes in feature parameters. These feature parameters are organized as time-series vectors, with each time step corresponding to a 200-dimensional spatiotemporal feature vector within a specific time window of a respiratory cycle. Real-time monitoring is achieved through a sliding window mechanism. The sliding window's length is set to 32 consecutive time steps, moving forward in steps of one time step at a time. The monitoring process calculates the dynamic time warping distance between the current dynamic feature parameters and the historical feature template. The historical feature template is a baseline sequence learned from feature parameters of a set of standard healthy respiratory cycles, with the template sequence's length matching the sliding window. The calculation of the dynamic time warping distance employs a classic dynamic programming algorithm. The algorithm constructs a cumulative cost matrix and finds an optimal curved path to align the current sequence with the template sequence, even if the two sequences exhibit nonlinear scaling on the time axis. The dynamic time warping distance is defined as the minimum cumulative cost on the optimal path, quantifying the degree of morphological difference between the current breathing pattern and the standard healthy pattern. When the dynamic time-warped distance exceeds the adaptive threshold, a primary trigger pulse is generated. The adaptive threshold is not fixed but dynamically adjusted based on the statistical characteristics of recent dynamic time-warped distance values. The calculation of the adaptive threshold relies on a sliding window of 100 historical distance values. The mean and standard deviation of the dynamic time-warped distance within the window are updated in real time, and the adaptive threshold is set to the mean plus twice the standard deviation. This dynamic adjustment mechanism allows the threshold to adapt to the natural fluctuations in breathing patterns of different individuals or at different times. When the real-time calculated dynamic time-warped distance value exceeds the adaptive threshold, the comparator circuit outputs a high-level signal, which is the primary trigger pulse. The width of the primary trigger pulse is fixed at one system clock cycle, and its rising edge precisely marks the moment the abnormal pattern is detected.

[0033] The primary trigger pulse is pulse-width modulated (PWM), with its modulation depth positively correlated with the amplitude of the dynamic time warping distance. This PWM process is performed by a dedicated modulator module. The modulation depth parameter is obtained from the amplitude of the dynamic time warping distance through a linear transformation function. The slope of the transformation function is calibrated to map typical distance fluctuations to a reasonable modulation depth range. The PWM modulator extends the duration of the primary trigger pulse based on the modulation depth parameter. The high-level duration of the modulated pulse signal is proportional to the amplitude of the dynamic time warping distance; a larger distance indicates a more significant deviation between the current breathing pattern and the standard pattern, requiring a longer model update cycle for parameter adjustment. The PWM signal retains the precise rising edge time of the original trigger pulse, while its pulse width carries information about the deviation amplitude. The modulated pulse signal is used as the training activation signal, with its rising edge marking the start of the model update cycle. The training activation signal is a digital level signal connected to the control unit of the neural network training engine. The rising edge of the training activation signal triggers a series of initialization operations, including updating the training data buffer, resetting the optimizer's internal state, and starting the learning rate scheduler. The falling edge of the pulse signal marks the theoretical end point of the model update cycle, but in practice, the training process may terminate early based on convergence conditions. The training activation signal acts as an asynchronous event trigger throughout the system, ensuring that parameter updates of the neural network model are initiated only when a significant pattern change is detected, thus avoiding the waste of computational resources and potential overfitting risks associated with continuous training.

[0034] The process of generating training activation signals also includes analyzing gradient changes in feature vectors and calculating the moving average of the gradient magnitude. Gradient change analysis is based on the forward and backpropagation results of the neural network model on the latest feature parameters. Whenever a new feature vector is input into the neural network, the model calculates its output and generates a loss value, and calculates the gradient vector of the loss function with respect to the model parameters using the backpropagation algorithm. The magnitude of the gradient vector is obtained by calculating its L2 norm, reflecting the learning intensity of the model at the current data point. The moving average of the gradient magnitude is calculated using an exponentially weighted moving average algorithm, which assigns higher weight to recent gradient magnitudes. The time constant of the moving average window is set to cover the most recent 50 training samples. The smoothed moving average eliminates random noise in gradient calculation, more clearly showing the direction of learning trend changes. When the moving average suddenly increases, an early activation signal is triggered. The surge detection mechanism continuously monitors the moving average sequence of gradient magnitudes, and the detection principle is based on a threshold judgment of the first difference of the moving average. The difference between the current moving average and the moving average at the previous moment is calculated. When this difference exceeds a preset surge threshold, a gradient surge event is determined to have occurred. The surge threshold is set to a conservative value based on historical gradient fluctuations to avoid false triggering. Once a surge event is detected, the early activation signal generation circuit immediately generates a short pulse. The pulse width of the early activation signal is fixed, and its triggering timing is earlier than the primary trigger pulse based on the dynamic time warping distance, aiming to provide a forward-looking model update prompt.

[0035] By combining historical activation patterns with a time-series prediction model, activation timing is adjusted to achieve adaptive triggering. Historical activation patterns refer to the timestamps of training activation signals and their corresponding pulse widths over a past period. The time-series prediction model employs a Long Short-Term Memory (LSTM) network architecture. The LTM network's input is the time series of historical activation patterns, including the time interval sequence and pulse width sequence of activation events. The LTM network learns the periodicity and intensity patterns of activation events through its internal gating mechanism, and the model output is a prediction of the next activation event's occurrence time. The adaptive triggering logic fuses the LTM network's prediction results with real-time monitored gradient surge signals and dynamic time warping distance signals. When the real-time signals deviate significantly from the predicted patterns, the triggering logic dynamically adjusts the activation timing, such as issuing training activation signals earlier or later, making the model update rhythm more consistent with the actual dynamic changes in breathing patterns.

[0036] Example 3: See Figure 3The process of determining key points for model parameter adjustment based on the generated training activation signals establishes a feature trajectory atlas containing multiple typical breathing patterns. The construction of the feature trajectory atlas is based on a large-scale pulmonary function database, which includes feature parameter sequences from healthy subjects and patients with different types of pulmonary dysfunction. The generation of the feature trajectory atlas employs a master curve extraction algorithm. This algorithm learns several smooth curves from a large amount of sequence data in a high-dimensional feature space. Each curve represents a typical breathing pattern evolution trajectory, such as a circular trajectory for calm breathing, a flat trajectory for restrictive ventilatory disorders, and a convex trajectory for obstructive ventilatory disorders. Mathematically, the feature trajectory atlas is represented as a graph structure, where nodes are representative points in the feature space, and edges represent reachability relationships between patterns. The atlas is stored in a graph database for rapid querying and matching. Real-time acquired feature parameters are mapped onto the feature trajectory atlas, and their fit with each trajectory in the atlas is calculated. The mapping process uses a projection algorithm to project the current feature parameter sequence onto each master curve of the feature trajectory atlas. The projection algorithm finds the closest point on the master curve for the current sequence point and calculates the Euclidean distance between the sequence point and the projected point. The fit is defined as the reciprocal of the distance between the entire sequence and the master curve. The fit calculation considers the temporal dynamics of the sequence, using a dynamic time warping algorithm to align the time scale of the current sequence with the master curve, eliminating the influence of differences in respiratory rate. The fit value ranges from 0 to 1; the closer the value is to 1, the more similar the current breathing pattern is to a typical pattern in the characteristic trajectory map.

[0037] The system identifies the reference trajectory with the highest fit and marks deviations between the current sequence and the reference trajectory as potential keypoints. The reference trajectory with the highest fit is the main curve in the feature trajectory map that has the smallest dynamic time warp distance from the current sequence. Deviation point detection is achieved by comparing the feature vector differences between the current sequence points and the corresponding projection points on the reference trajectory. Points where the magnitude of the difference vector exceeds a threshold are marked as potential keypoints. The deviation point detection threshold is set based on the statistical characteristics of the feature space, and the threshold size is related to the measurement accuracy of the feature parameters and individual variability. Each potential keypoint records its timestamp, deviation direction, and deviation magnitude, forming a detailed deviation event report. Potential keypoints are filtered and validated based on the persistence and consistency of the deviation direction. Persistence validation checks the temporal continuity of the deviation event; an occasional deviation at a single time point may be due to measurement noise, while consistent deviations at multiple consecutive time points are physiologically significant. Persistence validation sets a time window; a deviation is considered persistent only if the proportion of deviation points occurring within the window exceeds a threshold. The consistency verification of deviation direction checks whether the eigenvector changes of consecutive deviation points are similar. Directional consistency is evaluated by calculating the cosine similarity of consecutive deviation vectors. A high cosine similarity indicates that the deviation is systematic rather than random fluctuation. The filtering verification process eliminates transient and random deviation points, retaining those continuous and consistent deviation patterns.

[0038] The verified deviation points are identified as key points for model parameter adjustment, and their corresponding breathing pattern types are recorded. Key points are divided into two categories: parameter correction points caused by data variation within the same breathing state, and parameter reset points caused by switching between different breathing states. Parameter correction points typically occur within a breathing state, with feature parameters fluctuating slightly around a typical trajectory. Parameter reset points occur at the boundary of breathing state transitions, where feature parameters undergo abrupt changes. Each key point is associated with its corresponding breathing state information, such as the steady phase of inspiration or the acceleration phase of expiration. The attribute information of key points is stored in a key point registry to provide input for subsequent feature deviation parameter calculation. The process of distinguishing the identified parameter adjustment key points into similar and dissimilar key points and then calculating the feature deviation parameters involves calculating the average cosine similarity of the feature vectors between similar key points as a measure of in-state deviation. Similar key points refer to the set of key points belonging to the same breathing state. The calculation of the average cosine similarity first extracts the feature vectors corresponding to similar key points, and then calculates the cosine similarity between each pair of these vectors. Cosine similarity measures the similarity of vectors in direction, and the calculation formula is: ; in: The mean cosine similarity is represented by N, where N represents the number of keypoints of the same type. and Let represent the feature vectors of the i-th and j-th keypoints, respectively, and · denote the dot product operation of the vectors. and Let represent the magnitudes of the vectors. The mean cosine similarity ranges from -1 to 1; a value closer to 1 indicates higher consistency of features within a state and smaller deviation. The deviation metric within a state is defined as 1 minus the mean cosine similarity, such that the deviation increases with increasing inconsistency.

[0039] For outlier keypoints, the Mahalanobis distance between the eigenvectors before and after the state transition is calculated as a measure of state deviation. Outlier keypoints are keypoints occurring at the boundary of respiratory state transitions, such as the transition point from inspiration to expiration. The Mahalanobis distance calculation considers the distribution characteristics of the eigenvectors, and the formula is: ; in: Let represent the Mahalanobis distance, x represent the feature vector before the state transition, and y represent the feature vector after the state transition. This represents the combined covariance matrix of the eigenvectors. Mahalanobis distance eliminates the correlation effects between different feature dimensions, and can more accurately reflect the essential differences between states. The numerical value of the state deviation measure is directly taken from the Mahalanobis distance calculation result; the larger the distance, the more significant the feature changes brought about by the respiratory state transition.

[0040] The comprehensive feature bias parameter is obtained by combining the mean cosine similarity and Mahalanobis distance using a weighted summation. The weighted summation formula is as follows: ; in: This represents the comprehensive characteristic deviation parameter. The weighting coefficients represent the in-state deviation measure. This represents the weighting coefficients for measuring the deviation between states. The weighting coefficients are set based on the physiological characteristics of respiratory states; the intra-state deviation weights reflect the sensitivity to data variation, while the inter-state deviation weights reflect the significance of state transitions. The comprehensive feature deviation parameter is a dimensionless scalar value that comprehensively characterizes the degree of variation in lung function data both within and between states, providing a quantitative basis for subsequent derivation of model similarity parameters.

[0041] Example 4: The process of deriving model similarity parameters based on calculated feature deviation parameters. Hierarchical clustering algorithm is applied to group the feature deviation parameters into cluster trees. The feature deviation parameters are derived from the comprehensive feature deviation parameters calculated in the above examples, as well as detailed records of intra-state and inter-state deviation measures. The hierarchical clustering algorithm adopts a bottom-up aggregation strategy. During algorithm initialization, each feature deviation parameter sample is considered as an independent cluster. The sample is a comprehensive feature deviation parameter value from multiple respiratory cycles and different subjects. The clustering process calculates the dissimilarity between all pairs of clusters. The dissimilarity measure is Euclidean distance; a larger distance value indicates a greater difference in the feature deviation patterns of the two clusters. The Ward variance minimization algorithm is used to guide cluster merging. At each step, the Ward variance minimization algorithm selects to merge the two clusters that minimize the intra-class variance increment of the merged new cluster. The intra-class variance increment is obtained by calculating the change in the sum of squared distances from all samples to their cluster centers before and after merging. Each merge operation generates a new node in the clustering tree. The height of the node records the dissimilarity level of the merge. The growth process of the clustering tree continues until all samples are finally aggregated into a large cluster containing all the data. The resulting clustering tree visually displays the grouping structure of the feature bias parameters at different granularities in the form of a dendrogram.

[0042] The selection of the cut height in the clustering tree determines the general and specific parameter sets. The cut height is a crucial step, corresponding to a dissimilarity threshold on the vertical axis of the clustering tree. Horizontal cutting of the dendrogram at this threshold determines the final number of clusters. Determining the cut height requires balancing intra-cluster homogeneity and inter-cluster segregation. A higher cut height results in fewer clusters with greater internal differences, while a lower cut height results in more clusters with higher internal consistency. The general parameter set consists of large clusters containing a large number of samples and covering a wide range of respiratory states; the characteristic deviation parameters within these clusters exhibit stable patterns across states. The specific parameter set consists of small clusters containing fewer samples and associated only with specific respiratory states; the parameter patterns within these clusters are state-specific. The specific value of the cut height is determined by analyzing the steepness of the clustering tree, looking for an inflection point in the dendrogram where the merging distance significantly increases. This inflection point indicates that the merging of two highly dissimilar clusters is forced and unnatural.

[0043] Parameters within the general parameter group are labeled as transfer parameters, while parameters within the specific parameter group are labeled as independent parameters. The parameter labeling process assigns a type label to each cluster in the clustering results. Transfer parameters represent model parameters that are highly similar across different respiratory states and even different individuals; these parameters encode common, fundamental patterns in respiratory physiology and possess good transferability. Independent parameters correspond to parameters sensitive to specific states, pathological conditions, or individuals; these parameters are used to capture and adapt to unique, local variations. The labeling results are stored in a parameter-cluster mapping table, which records the cluster number to which each feature bias parameter sample belongs and whether it is labeled as a transfer parameter or an independent parameter. The separability of parameter groups is verified using linear discriminant analysis (LDA), a supervised dimensionality reduction and classification technique used to verify whether the parameter groups obtained from clustering analysis are statistically significantly different. LDA uses the clustered group labels as category information and the original feature bias parameters as input features, aiming to find a projection direction that maximizes the ratio of between-group variance to within-group variance after projection. Linear discriminant analysis (LDA) calculates the between-group and within-group scatter matrices, obtains the discriminant vector by solving the generalized eigenvalue problem, and calculates the center position and distribution range of each group from the projected data. The separability of parameter groups is quantified by the ratio of between-group distance to within-group scatter; a higher ratio indicates better separation between the migrated parameter group and the independent parameter group, suggesting the current parameter partitioning is effective. If LDA shows the separability index is below a preset threshold, the cut height of the clustering tree needs to be readjusted, perhaps by trying a slightly higher or lower cut point, re-partitioning the clusters, and recalibrating the parameters. This iterative optimization process continues until satisfactory separability results are obtained.

[0044] Hierarchical clustering algorithms are applied to group feature bias parameters, including calculating the dissimilarity matrix between feature bias parameters. The Ward variance minimization algorithm is then used for clustering. The dissimilarity matrix is ​​a symmetric matrix where rows and columns correspond to each feature bias parameter sample, and matrix elements record the Euclidean distance between corresponding samples. The Euclidean distance is calculated based on a multi-dimensional vector representation of the feature bias parameters, which may contain multiple dimensions such as the comprehensive feature bias parameters, the statistical characteristics of intra-state bias sequences, and the statistical characteristics of inter-state bias sequences. Before each merging operation, the Ward variance minimization algorithm calculates the connection cost between any two clusters. The connection cost is defined as the increment of the intra-class variance of the new cluster relative to the sum of the intra-class variances of the original two clusters if these two clusters are merged. The algorithm iterates through all possible cluster pairs, selects the pair with the minimum connection cost for merging, updates the dissimilarity matrix after merging, removes the two merged clusters, adds the newly formed cluster, and calculates the distance between the new cluster and all other clusters. The merging process of the Ward variance minimization algorithm is continuously recorded, forming a complete clustering history.

[0045] The centroids of each cluster are extracted as representative parameters based on the clustering results. The centroids are typically calculated using the arithmetic mean of all samples within the cluster. For numerical feature bias parameters, the mean vector best represents the typical characteristics of the cluster. For each cluster, the mean of all its samples is calculated across each feature dimension. These mean values ​​are combined into a new vector, which represents the centroid of the cluster. The centroid coordinates describe the average position of the cluster in the feature space and serve as the representative parameter for the entire cluster. These representative parameters are stored in a lookup table for subsequent model parameter initialization.

[0046] The silhouette coefficient was used to evaluate cluster quality by optimizing the number of clusters and parameter allocation. The silhouette coefficient is a cohesion metric for evaluating clustering performance, considering both intra-cluster compactness and inter-cluster separation. The average silhouette coefficient of all samples was used to assess the overall clustering quality at the current number of clusters. By trying different numbers of clusters, the average silhouette coefficient was calculated for each cluster. The cluster number with the highest average silhouette coefficient was selected as the optimal solution. Based on this result, the partitioning of the general parameter set and the specific parameter set, as well as the allocation of migration and independent parameters, were finally determined. Table 1 shows the clustering quality evaluation, where the clustering scheme corresponding to the cut height H3 has the highest average silhouette coefficient and is considered the optimal partitioning scheme.

[0047] Table 1: Clustering Quality Assessment Table at Different Cutting Heights Cutting height number Cutting height value Number of clusters Average profile coefficient Recommended solution H1 1.5 2 0.45 Insufficient number of clusters, resulting in inadequate separation. H2 1.2 4 0.58 Candidate solutions H3 0.9 6 0.72 Optimal solution H4 0.6 10 0.65 Too many clusters may lead to overfitting. Example 5: The process of optimizing a neural network model using the derived model similarity parameters initializes the transfer parameters as shared weights of the neural network and the independent parameters as private weights of specific layers. The neural network model adopts a hybrid architecture, including fully connected layers for processing spatiotemporal feature vectors and output layers for pattern classification. The transfer parameters are derived from the general parameter set determined by hierarchical clustering in the above examples. These parameters represent stable feature transformation patterns across different breathing states. The transfer parameters are mapped to the first few fully connected layers of the neural network, which are responsible for extracting basic and common abstract representations from the input features. Specifically, assuming that the representative centroid vector of the general parameter set has a dimension of 128, the initial value of the weight matrix W_shared of the first fully connected layer is constructed from this 128-dimensional vector through appropriate dimension transformation and duplication, so that this layer applies the same feature extraction criteria to all input data. Independent parameters are derived from dedicated parameter sets, corresponding to breathing states or variant modes. Independent parameters are mapped to parts of the network closer to the output layer, such as the last one or two fully connected layers. The weights W_private of these layers are initialized to the center point vector of the corresponding cluster in the dedicated parameter set. Each breathing state or specific mode has its corresponding private weight initialization value. When the network processes inputs in different states, it activates the corresponding private weight path through a state selection signal.

[0048] The neural network is trained using pulmonary function data, and the parameters are updated using the Adaptive Moment Estimation (IME) algorithm. The pulmonary function data is a sequence of spatiotemporal feature vectors after preprocessing and feature extraction, forming the training dataset. IEM is a first-order optimization algorithm that maintains first- and second-order moment estimates for each parameter and uses a bias correction term to adjust the learning rate. The training process aims to minimize the cross-entropy loss function, which measures the difference between the neural network's predicted probability distribution for respiratory state classification and the true label distribution. With each parameter update, IEM calculates the gradient of the loss function with respect to each weight, then updates the corresponding first- and second-order moment estimates, and finally calculates the parameter update based on the corrected moment estimates and the global learning rate. For shared weights W_shared, their gradients come from the contributions of all respiratory state samples, and the update direction is to find a common solution that performs well for all states. For private weights W_private, their gradients mainly come from the contributions of specific respiratory state samples, and the update direction is to optimize the fitting ability for that specific state. The learning rate dynamically decays according to the network training progress, using a larger learning rate initially to accelerate convergence and a smaller learning rate later for fine-tuning.

[0049] During training, the model's performance on state segments is periodically validated. If performance deteriorates, parameter initialization is readjusted. A separate validation set is used, containing feature vector sequences not used in training and their corresponding breathing state labels. The performance evaluation metric is the macro F1 score. The macro F1 score is calculated by taking the arithmetic mean of the F1 score for each breathing state (e.g., calm inhalation, forced exhalation, breath-holding), thus balancing the impact of uneven sample sizes across different states. Validation is performed after each training cycle, recording the macro F1 score change curve on the validation set. If a sustained decline in validation performance occurs over several consecutive training cycles, a parameter re-initialization mechanism is triggered. This readjustment is not completely random; instead, it re-executes the hierarchical clustering analysis process described in the previous embodiment based on the latest accumulated training data. A larger-scale, more representative feature bias parameter dataset is used to recalculate the centroids of the general and specific parameter sets, resulting in updated transfer parameters and independent parameter sets. Then, the shared weights of the neural network are reinitialized using the updated transfer parameters, the private weights are reinitialized using the updated independent parameters, and the internal states of the optimizer (such as first-moment and second-moment estimates) are reset. This mechanism allows the model to adapt to slow shifts in data distribution, such as the improvement or deterioration of a patient's respiratory function as treatment progresses.

[0050] To illustrate this process, consider an example of building a model for identifying patients with chronic obstructive pulmonary disease (COPD). Initially, the model is trained using a multimodal pulmonary function database containing healthy individuals and typical COPD patients. Cluster analysis from the above example might reveal that feature bias patterns associated with expiratory flow limitation are categorized as independent parameters because they strongly characterize the pathological features of COPD; while feature bias patterns associated with baseline chest rise and fall are categorized as transfer parameters because they are relatively stable across different populations. Therefore, the weights of the specific fully connected layers in the neural network responsible for detecting expiratory flow limitation patterns are initialized using independent parameters corresponding to the "expiratory flow limitation" cluster. After training begins, the model performs well on the validation set, with the macro-F1 score steadily increasing. Suppose that after a period of monitoring, the patient's condition changes, for example, by developing transient bronchospasm, resulting in new variations in their breathing patterns that were not fully reflected in the training data. These new variations alter the distribution of the feature bias parameters calculated in real-time. During periodic validation, the model's macro F1 score on new patient data may begin to decline continuously, indicating that the current model parameter initialization is no longer optimally adapted to the new situation. The system triggers a re-initialization process. It re-clusters the model using all recently collected feature bias parameters from the patient. The new clustering results may identify specific variation patterns induced by bronchospasm as a new, small set of proprietary parameters, resulting in a new set of independent parameters. The neural network's private weights are then re-initialized using this new set of independent parameters, allowing the model to quickly adjust its decision boundaries to capture this new pathological feature without discarding previously learned knowledge about underlying COPD patterns and healthy patterns. Through this dynamic parameter initialization strategy, the pulmonary dysfunction identification model achieves continuous self-optimization, maintaining long-term sensitivity and accuracy in identifying changes in individual patient respiratory function.

[0051] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.

Claims

1. A method for constructing a lung function impairment identification model based on a neural network, characterized in that, The method includes: Collect lung function data and identify respiratory states and transition points in the data; Based on the identified respiratory states and state transition points, feature parameters are extracted from the lung function data; based on the extracted feature parameters, training activation signals for the neural network model are generated. Based on the generated training activation signals, the key points for model parameter adjustment are determined. These key points include parameter correction points caused by data variation under the same breathing state and parameter reset points caused by switching between different breathing states. The determined key points for parameter adjustment are distinguished into similar key points and dissimilar key points, and then the feature deviation parameters are calculated. The feature deviation parameters reflect the parameter changes within the state and the parameter changes between states. Based on the calculated feature deviation parameters, the model similarity parameters are derived. The model similarity parameters include general parameters that can be reused across respiratory states and specific parameters that are only applicable to individual respiratory states. The derived model similarity parameters were used to optimize the neural network model, and finally the lung function disorder identification model was established.

2. The method for constructing a lung function impairment identification model based on a neural network according to claim 1, characterized in that, The process of collecting lung function data and identifying respiratory states and state transition points in the data includes the following steps: constructing a multimodal data stream containing time-series flow velocity signals, images of changes in pleural volume, and audio frequencies of respiratory sounds; performing piecewise linear fitting on the time-series flow velocity signals and extracting points of change in the fitting slope as potential state transition markers; performing optical flow analysis on the images of changes in pleural volume to generate a pleural motion vector field and calculating divergence abrupt change points in the vector field; extracting Mel-frequency cepstral coefficients from the audio frequencies of respiratory sounds and identifying the transition moments of the audio spectrum energy; and performing time alignment and confidence-weighted fusion on the points of change in the fitting slope, divergence abrupt change points, and spectral energy transition moments to finally determine the respiratory state and state transition points.

3. The method for constructing a lung function impairment identification model based on a neural network according to claim 1, characterized in that, The process of extracting feature parameters from lung function data includes the following steps: using the respiratory state transition point as a time anchor, the multimodal data within each state cycle is divided into multiple time windows; within each time window, a temporal convolutional network is used to extract local trend features from the time-series flow velocity signal; simultaneously, a three-dimensional convolutional network is used to extract spatial motion features from the pleural volume change image sequence; the correlation weight between the local trend features and the spatial motion features is calculated through a cross-modal attention mechanism to generate a weighted fused spatiotemporal feature vector; and the spatiotemporal feature vectors of all time windows are arranged in chronological order to constitute the feature parameters.

4. The method for constructing a lung function impairment identification model based on a neural network according to claim 1, characterized in that, The process of generating a training activation signal for a neural network model based on the extracted feature parameters includes the following steps: real-time monitoring of changes in the feature parameters; calculation of the dynamic time warping distance between the current dynamic feature parameters and historical feature templates; generation of a primary trigger pulse when the dynamic time warping distance exceeds an adaptive threshold; pulse width modulation of the primary trigger pulse, the modulation depth of which is positively correlated with the amplitude of the dynamic time warping distance; and using the modulated pulse signal as the training activation signal, with its rising edge marking the start of the model update cycle.

5. The method for constructing a lung function impairment identification model based on a neural network according to claim 1, characterized in that, The process of determining the key points for model parameter adjustment includes the following steps: establishing a feature trajectory map containing multiple typical breathing patterns; mapping the real-time acquired feature parameters onto the feature trajectory map and calculating their fit with each trajectory in the map; identifying the reference trajectory with the highest fit and marking the deviation points between the current sequence and the reference trajectory as potential key points; filtering and verifying the potential key points based on the persistence of the deviation points and the consistency of the deviation direction; confirming the deviation points that pass the verification as key points for model parameter adjustment and recording their corresponding breathing pattern types.

6. The method for constructing a lung function impairment identification model based on a neural network according to claim 1, characterized in that, The process of distinguishing the determined parameter adjustment key points into similar key points and dissimilar key points, and then calculating the feature deviation parameter, includes: for similar key points, calculating the mean cosine similarity of the feature vectors between key points as an intra-state deviation measure; for dissimilar key points, calculating the Mahalanobis distance of the feature vectors before and after the state transition as an inter-state deviation measure; and fusing the mean cosine similarity and Mahalanobis distance, and using weighted summation to obtain the comprehensive feature deviation parameter.

7. The method for constructing a lung function impairment identification model based on a neural network according to claim 1, characterized in that, The process of deriving model similarity parameters based on the calculated feature deviation parameters includes: applying a hierarchical clustering algorithm to group the feature deviation parameters to form a clustering tree; determining the general parameter group and the specific parameter group according to the cutting height of the clustering tree; labeling the parameters in the general parameter group as transfer parameters and the parameters in the specific parameter group as independent parameters; verifying the separability of the parameter groups through linear discriminant analysis and adjusting the parameter division.

8. The method for constructing a lung function impairment identification model based on a neural network according to claim 1, characterized in that, The process of optimizing the neural network model using the derived model similarity parameters includes: initializing the transfer parameters as shared weights of the neural network and initializing the independent parameters as private weights of a specific layer; training the neural network using lung function data and updating the parameters using an adaptive moment estimation algorithm; periodically verifying the model's performance on state segments during training, and readjusting the parameter initialization if the performance degrades.

9. The method for constructing a lung function impairment identification model based on a neural network according to claim 4, characterized in that, The process of generating training activation signals includes: analyzing the gradient changes of feature vectors and calculating the moving average of the gradient magnitude; triggering an early activation signal when the moving average suddenly increases; and adjusting the activation timing using a time series prediction model in conjunction with historical activation patterns to achieve adaptive triggering.

10. The method for constructing a lung function impairment identification model based on a neural network according to claim 7, characterized in that, The application of hierarchical clustering algorithm to group feature deviation parameters includes: calculating the dissimilarity matrix between feature deviation parameters and performing clustering using the Ward variance minimization algorithm; extracting the center point of each cluster as a representative parameter based on the clustering results; evaluating the clustering quality through the silhouette coefficient and optimizing the number of clusters and parameter allocation.