Acute respiratory failure prediction method based on mamba architecture

By adopting a deep learning model based on the mamba architecture in the prediction of acute respiratory failure, the problem of insufficient prediction accuracy in the prior art is solved, and higher prediction accuracy and real-time feedback capabilities are achieved, which is suitable for clinical acute respiratory failure scenarios.

CN119400395APending Publication Date: 2025-02-07THE AFFILIATED HOSPITAL OF QINGDAO UNIV +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411581313.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-07
Publication Date
2025-02-07

AI Technical Summary

Technical Problem

The prior art lacks sufficient sensitivity and specificity in predicting acute respiratory failure, which is difficult to meet clinical needs, and research based on the mamba architecture is relatively scarce.

Method used

A method for predicting acute respiratory failure based on mamba architecture is proposed. By obtaining the original image data from Lung Phantom Dataset, it constructs three feature encoders, attention modules, feature map layers, three feature decoders and three mamba modules. and optimized training to improve prediction accuracy.

Benefits of technology

It improves the accuracy and response speed of acute respiratory failure prediction, reduces false positives, improves the reliability of the model, and allows real-time feedback to be applied to acute respiratory failure scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119400395A_ABST
    Figure CN119400395A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of medical artificial intelligence, in particular to an acute respiratory failure prediction method based on a mamba architecture, and the method specifically comprises the following steps: obtaining original image data from an existing Lung Phantom Dataset lung lesion data set, constructing a data set # imgabs0 #, and then dividing the data set # imgabs1 # into a training set # imgabs2 # and a test set # imgabs3 #; an acute respiratory failure prediction model based on the mamba architecture is constructed, the model comprises three feature encoders, an attention module, a feature mapping layer, three feature decoders and three mamba modules, original image data in a training set # imgabs4 # are input into the modules, and a prediction result is obtained; and carrying out optimization training on the acute respiratory failure prediction model based on the mamba architecture, and then inputting original image data in the test set # imgabs5 # into the optimized model to obtain a final prediction result. According to the method, the precision of respiratory failure prediction is improved through the efficient mamba architecture, and the method can be used in the field of medical image analysis and prediction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of medical artificial intelligence technology, and in particular to an acute respiratory failure prediction method based on a mamba architecture. Background Art

[0002] Acute respiratory failure (ARF) refers to a sharp decline in respiratory system function due to a variety of reasons, which seriously affects oxygen exchange and carbon dioxide discharge. The causes of ARF are complex, including infection, trauma, lung disease, etc. Severe cases are often accompanied by high mortality and significant consumption of medical resources. Therefore, timely and accurate prediction of the risk of acute respiratory failure is of great significance for improving patient prognosis and optimizing treatment plans.

[0003] Traditional methods for predicting acute respiratory failure mainly rely on clinical experience, simple physiological indicators, and some blood test results. However, these methods often lack sufficient sensitivity and specificity when facing complex cases, and are difficult to meet clinical needs. In recent years, with the development of machine learning and artificial intelligence technology, prediction models based on big data analysis have gradually become a research hotspot. These models can identify potential danger signals by analyzing a large amount of clinical data, thereby achieving early warning of acute respiratory failure. As an emerging system design concept, the Mamba architecture integrates multiple methods and data sources through a modular approach, has flexibility and scalability, and provides strong support for building complex prediction models. The architecture can efficiently process heterogeneous data, improve data processing speed and accuracy, and enable the prediction method of acute respiratory failure to better adapt to actual clinical needs. However, the prediction method of acute respiratory failure based on the Mamba architecture is still in the exploratory stage, and related research is relatively scarce. Therefore, it is urgent to further develop effective methods and evaluate their application effects in clinical practice, in order to provide scientific basis for medical personnel and improve the management level of acute respiratory failure.

[0004] Therefore, the present invention proposes an acute respiratory failure prediction method based on the mamba architecture to solve the above problems. Summary of the invention

[0005] In view of the deficiencies in the prior art, the present invention proposes an acute respiratory failure prediction method based on the mamba architecture. The present invention improves the accuracy of respiratory failure prediction through the efficient mamba architecture and is suitable for the field of medical image analysis and prediction.

[0006] The technical solution to the technical problem of the present invention is a method for predicting acute respiratory failure based on the mamba architecture, which is as follows: S1. Obtain raw image data from the existing Lung Phantom Dataset lung lesion dataset and construct a dataset , then the dataset Divide into training set and test set ; S2. Construct an acute respiratory failure prediction model based on the mamba architecture. The model includes three feature encoders, an attention module, a feature mapping layer, three feature decoders, and three mamba modules. The original image data is input into the module to obtain the prediction result; S3. Optimize and train the acute respiratory failure prediction model based on the mamba architecture, and then use the test set The original image data in is input into the optimized model to obtain the final prediction result.

[0007] In a specific implementation manner, S1 is as follows: The image is histogram-equalized using the equalizeHist function in the OpenCV library, and then image data is obtained from the LungPhantom Dataset. Contains several original image data, the training set Any original image data is recorded as .

[0008] In a specific implementation manner, S2 is as follows: The training set Any original image data Input into the acute respiratory failure prediction model based on the mamba architecture, the acute respiratory failure prediction model based on the mamba architecture specifically includes a first feature encoder, a second feature encoder, a third feature encoder, an attention module, a feature mapping layer, a first feature decoder, a second feature decoder, a third feature decoder, a first mamba module, a second mamba module and a third mamba module.

[0009] S2.1, the first feature encoder includes a first convolution layer, a ReLU activation function, a first pooling layer, a second convolution layer, a ReLU activation function, a second pooling layer, a third convolution layer, a ReLU activation function, and a third pooling layer in sequence; Among them, the convolution kernel size of the first convolution layer is 1*1, the number of convolution kernels is 3, the stride is 1, and the same padding is used; the first pooling layer adopts maximum pooling, the pooling window size is 1*1, and the stride is 1; the convolution kernel size of the second convolution layer is 3*3, the number of convolution kernels is 32, the stride is 1, and the same padding is used; the second pooling layer adopts maximum pooling, the pooling window size is 2*2, and the stride is 2; the convolution kernel size of the third convolution layer is 3*3, the number of convolution kernels is 64, the stride is 2, and the same padding is used; the third pooling layer adopts maximum pooling, the pooling window size is 2*2, and the stride is 2; Will Input into the first feature encoder and output the first encoded feature ; S2.2, the second feature encoder includes a first convolution layer, a ReLU activation function, a first pooling layer, a second convolution layer, a ReLU activation function, a second pooling layer, and a whale operator in sequence; Among them, the convolution kernel size of the first convolution layer is 3*3, the number of convolution kernels is 128, the stride is 1, and the same padding is used; the first pooling layer adopts maximum pooling, the pooling window size is 1*1, and the stride is 1; the convolution kernel size of the second convolution layer is 3*3, the number of convolution kernels is 256, the stride is 1, and the same padding is used; the second pooling layer adopts maximum pooling, the pooling window size is 2*2, and the stride is 1; The calculation formula of the whale operator is as follows: , in, represents the feature map output by the second pooling layer in the second feature encoder, Representation feature map exist The feature points of the location, Representation feature map At the feature point The gradient amplitude of The first encoding feature Input to the second feature encoder, output the second encoded feature ; S2.3, the third feature encoder includes a first convolution layer, a ReLU activation function, a second convolution layer, a ReLU activation function, a third convolution layer, a Tanh activation function, and a pooling layer in sequence; Among them, the convolution kernel size of the first convolution layer is 3*3, the number of convolution kernels is 256, the stride is 1, and the same padding is used; the convolution kernel size of the second convolution layer is 3*3, the number of convolution kernels is 512, the stride is 1, and the same padding is used; the convolution kernel size of the third convolution layer is 3*3, the number of convolution kernels is 512, the stride is 2, and the same padding is used; the pooling layer uses average pooling, the pooling window size is 2*2, and the stride is 2; The second encoding feature Input to the third feature encoder, output the third encoded feature .

[0010] S2.4, the second coding feature Input to the attention module, the specific process is as follows: , in, Represents the attention features output by the attention module , ⊙ represents element-by-element multiplication, represents the Sigmoid activation function in PyTorch, represents the channel attention weight matrix, represents the spatial attention weight matrix, and Respectively and The two bias terms of Represents input features the number of rows, Represents input features The number of columns, Indicates the number of columns The index of Indicates the number of columns The index of S2.5, the feature mapping layer includes convolution layer, ReLU activation function, and pooling layer in sequence; Among them, the convolution kernel size of the convolution layer is 1*1, the number of convolution kernels is 512, the stride is 1, and the same padding is used; the first pooling layer uses average pooling, the pooling window size is 2*2, and the stride is 1; The third encoding feature Input to the feature mapping layer, output mapping features ; S2.6. Mapping features Input to the first mamba module, the first mamba module consists of M mamba layers in parallel, the results of the M mamba layers are added after the Softmax operation, and then combined with the mapping feature The square root of is normalized to get the output of the first mamba module , the specific process is as follows: , in, Represents the features of the first mamba module output, set M=4, denote the learnable width matrix, height matrix, and channel matrix of the mth mamba layer in the first mamba module, respectively. Represents the channel matrix The dimension of represents the learnable mamba feature selection matrix of the mth mamba layer, and P represents the feature The position code, Represents the activation function Operation, Represents a normalization operation; S2.7. Features Input to the second mamba module, the second mamba module consists of N mamba layers in parallel, the results of the N mamba layers after the Softmax operation are added, and then combined with the mapping feature The cube root of is normalized to get the output of the second mamba module , the specific process is as follows: , in, Represents the features output by the second mamba module, set N=3, denote the learnable width matrix, height matrix, and channel matrix of the nth mamba layer in the second mamba module, respectively. Represents the width matrix The dimension of Represents the height matrix The dimension of represents the learnable mamba feature selection matrix of the nth mamba layer, and P represents the feature The position code, Represents the activation function Operation, Represents a normalization operation; S2.8, the characteristics Input to the third mamba module, the third mamba module consists of Q mamba layers in parallel, the results of the Q mamba layers after the Softmax operation are added, and then combined with the mapping feature The fourth root of the phase is normalized to get the output of the third mamba module , the specific process is as follows: , in, Represents the characteristics of the output of the third mamba module, set Q=1, denote the learnable width matrix, height matrix, and channel matrix of the qth mamba layer in the third mamba module, respectively. , represents the learnable mamba feature selection matrix of the qth mamba layer, and P represents the feature The position code, Represents the activation function Operation, Represents a normalization operation.

[0011] S2.9, the first feature decoder includes, in sequence, a first transposed convolutional layer, a ReLU activation function, a second transposed convolutional layer, a ReLU activation function, a third transposed convolutional layer, and a ReLU activation function; Among them, the convolution kernel size of the first transposed convolution layer is 1*1, the number of convolution kernels is 512, the stride is 1, and the same padding is used; the convolution kernel size of the second transposed convolution layer is 3*3, the number of convolution kernels is 512, the stride is 1, and the same padding is used; the convolution kernel size of the third transposed convolution layer is 3*3, the number of convolution kernels is 256, the stride is 2, and the same padding is used; The characteristics and mapping features After addition, it is input into the first transposed convolution layer, ReLU activation function, second transposed convolution layer, ReLU activation function of the first feature decoder in turn, and then combined with the third encoded feature Dimension matching is performed, and then the sum is input into the third transposed convolution layer and ReLU activation function of the first feature decoder in turn, and the first decoded feature is output. ; S2.10, the second feature decoder includes, in sequence, a first convolutional layer, a ReLU activation function, a first pooling layer, a second convolutional layer, a ReLU activation function, and a second pooling layer; Among them, the convolution kernel size of the first convolution layer is 3*3, the number of convolution kernels is 256, the stride is 1, and the same padding is used; the first pooling layer adopts maximum pooling, the pooling window size is 1*1, and the stride is 1; the convolution kernel size of the second convolution layer is 3*3, the number of convolution kernels is 512, the stride is 1, and the same padding is used; the second pooling layer adopts maximum pooling, the pooling window size is 2*2, and the stride is 1; The characteristics and the first decoding feature After addition, it is input into the first convolution layer, ReLU activation function, and first pooling layer of the second feature decoder in turn, and then combined with the attention feature Dimension matching is performed, and then the sum is input into the second convolution layer, ReLU activation function, and second pooling layer of the second feature decoder in turn, and the second decoding feature is output. ; S2.11, the third feature decoder includes, in sequence, a first convolutional layer, a ReLU activation function, a first pooling layer, a second convolutional layer, a ReLU activation function, a second pooling layer, and a classifier; Among them, the convolution kernel size of the first convolution layer is 3*3, the number of convolution kernels is 512, the stride is 1, and the same padding is used; the first pooling layer adopts maximum pooling, the pooling window size is 1*1, and the stride is 1; the convolution kernel size of the second convolution layer is 3*3, the number of convolution kernels is 1024, the stride is 1, and the same padding is used; the second pooling layer adopts maximum pooling, the pooling window size is 2*2, and the stride is 1; The classifier is composed of a flattening layer, a first fully connected layer, a second fully connected layer, and a third fully connected layer in sequence. The flattening layer flattens the added data into a one-dimensional vector along the channel direction. The number of units in the first fully connected layer is 512, the number of units in the second fully connected layer is 128, and the number of units in the third fully connected layer is 1. Will and the second decoding feature After addition, they are input into the first convolution layer, ReLU activation function, and first pooling layer of the third feature decoder in sequence, and then combined with the first encoded feature Dimension matching is performed, and then the data is added and input into the second convolution layer, ReLU activation function, second pooling layer, and classifier of the third feature decoder to output the original image data. The prediction results .

[0012] In a specific implementation manner, S3 is as follows: The raw image data output by the Mamba architecture-based acute respiratory failure prediction model is measured by the cross entropy loss function The prediction results With the original image data The difference between the real labels is used to iteratively train the model through the Adam optimizer to reduce the loss function value; The test set The original image data in is input into the optimized model to obtain the final prediction result.

[0013] The effects provided in the content of the invention are only the effects of the embodiments, rather than all the effects of the invention. The above technical solution has the following advantages or beneficial effects: The present invention proposes a method for predicting acute respiratory failure based on the mamba architecture, which can solve the problem of early prediction of acute respiratory failure. The mamba architecture is innovatively used to optimize the performance of the method, thereby achieving higher prediction accuracy and response speed in medical scenarios. The method collects the patient's physiological data and combines the deep learning model to predict the patient's respiratory state, so that possible acute respiratory failure risks can be discovered at an early stage. By using the mamba architecture, the method improves the accuracy of processing complex multidimensional data, optimizes the efficiency of the method, effectively improves the accuracy of prediction, and reduces false alarms, thereby improving the reliability of the model; at the same time, the mamba architecture also improves the speed of data processing and model inference, so that the method can be fed back in real time, which is particularly suitable for acute respiratory failure scenarios that require rapid intervention. In addition, the method architecture is easy to integrate and deploy, and can be quickly applied in hospital information systems, providing clinical personnel with a convenient risk warning tool; in general, the present invention provides an efficient, accurate and practical method for predicting acute respiratory failure, which helps to improve the timeliness and effectiveness of acute disease management. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] The accompanying drawings are used to provide further understanding of the present invention and constitute a part of the specification. They are used to explain the present invention together with the embodiments of the present invention and do not constitute a limitation of the present invention.

[0015] Figure 1 It is a schematic diagram of the model structure in the present invention. Figure 2 This is a CT image of the lungs. DETAILED DESCRIPTION

[0016] In order to clearly illustrate the technical features of the present invention, the present invention is described in detail below through specific implementation methods and in conjunction with the accompanying drawings. The following disclosure provides many different embodiments or examples for implementing different structures of the present invention. In order to simplify the disclosure of the present invention, the components and settings of specific examples are described below. Example 1 Combination Figure 1 As shown, the present invention provides an acute respiratory failure prediction method based on the mamba architecture, which is as follows: S1. Obtain raw image data from the existing Lung Phantom Dataset lung lesion dataset and construct a dataset , then the dataset Divide into training set and test set ; S2. Construct an acute respiratory failure prediction model based on the mamba architecture. The model includes three feature encoders, an attention module, a feature mapping layer, three feature decoders, and three mamba modules. The original image data is input into the module to obtain the prediction result; S3. Optimize and train the acute respiratory failure prediction model based on the mamba architecture, and then use the test set The original image data in is input into the optimized model to obtain the final prediction result.

[0017] In a specific implementation manner, S1 is as follows: The image is histogram-equalized using the equalizeHist function in the OpenCV library, and then image data is obtained from the LungPhantom Dataset. Contains several original image data, the training set Any original image data is recorded as .

[0018] In a specific implementation manner, S2 is as follows: The training set Any original image data Input into the acute respiratory failure prediction model based on the mamba architecture, the acute respiratory failure prediction model based on the mamba architecture specifically includes a first feature encoder, a second feature encoder, a third feature encoder, an attention module, a feature mapping layer, a first feature decoder, a second feature decoder, a third feature decoder, a first mamba module, a second mamba module and a third mamba module.

[0019] S2.1, the first feature encoder includes a first convolution layer, a ReLU activation function, a first pooling layer, a second convolution layer, a ReLU activation function, a second pooling layer, a third convolution layer, a ReLU activation function, and a third pooling layer in sequence; Among them, the convolution kernel size of the first convolution layer is 1*1, the number of convolution kernels is 3, the stride is 1, and the same padding is used; the first pooling layer adopts maximum pooling, the pooling window size is 1*1, and the stride is 1; the convolution kernel size of the second convolution layer is 3*3, the number of convolution kernels is 32, the stride is 1, and the same padding is used; the second pooling layer adopts maximum pooling, the pooling window size is 2*2, and the stride is 2; the convolution kernel size of the third convolution layer is 3*3, the number of convolution kernels is 64, the stride is 2, and the same padding is used; the third pooling layer adopts maximum pooling, the pooling window size is 2*2, and the stride is 2; Will Input into the first feature encoder and output the first encoded feature ; S2.2, the second feature encoder includes a first convolution layer, a ReLU activation function, a first pooling layer, a second convolution layer, a ReLU activation function, a second pooling layer, and a whale operator in sequence; Among them, the convolution kernel size of the first convolution layer is 3*3, the number of convolution kernels is 128, the stride is 1, and the same padding is used; the first pooling layer adopts maximum pooling, the pooling window size is 1*1, and the stride is 1; the convolution kernel size of the second convolution layer is 3*3, the number of convolution kernels is 256, the stride is 1, and the same padding is used; the second pooling layer adopts maximum pooling, the pooling window size is 2*2, and the stride is 1; The calculation formula of the whale operator is as follows: , in, represents the feature map output by the second pooling layer in the second feature encoder, Representation feature map exist The feature points of the location, Representation feature map At the feature point The gradient amplitude of The first encoding feature Input to the second feature encoder, output the second encoded feature ; S2.3, the third feature encoder includes a first convolution layer, a ReLU activation function, a second convolution layer, a ReLU activation function, a third convolution layer, a Tanh activation function, and a pooling layer in sequence; Among them, the convolution kernel size of the first convolution layer is 3*3, the number of convolution kernels is 256, the stride is 1, and the same padding is used; the convolution kernel size of the second convolution layer is 3*3, the number of convolution kernels is 512, the stride is 1, and the same padding is used; the convolution kernel size of the third convolution layer is 3*3, the number of convolution kernels is 512, the stride is 2, and the same padding is used; the pooling layer uses average pooling, the pooling window size is 2*2, and the stride is 2; The second encoding feature Input to the third feature encoder, output the third encoded feature .

[0020] S2.4, the second coding feature Input to the attention module, the specific process is as follows: , in, Represents the attention features output by the attention module , ⊙ represents element-by-element multiplication, represents the Sigmoid activation function in PyTorch, represents the channel attention weight matrix, represents the spatial attention weight matrix, and Respectively and The two bias terms of Represents input features the number of rows, Represents input features The number of columns, Indicates the number of columns The index of Indicates the number of columns The index of S2.5, the feature mapping layer includes convolution layer, ReLU activation function, and pooling layer in sequence; Among them, the convolution kernel size of the convolution layer is 1*1, the number of convolution kernels is 512, the stride is 1, and the same padding is used; the first pooling layer uses average pooling, the pooling window size is 2*2, and the stride is 1; The third encoding feature Input to the feature mapping layer, output mapping features ; S2.6. Mapping features Input to the first mamba module, the first mamba module consists of M mamba layers in parallel, the results of the M mamba layers are added after the Softmax operation, and then combined with the mapping feature The square root of is normalized to get the output of the first mamba module , the specific process is as follows: , in, Represents the features of the first mamba module output, set M=4, denote the learnable width matrix, height matrix, and channel matrix of the mth mamba layer in the first mamba module, respectively. Represents the channel matrix The dimension of represents the learnable mamba feature selection matrix of the mth mamba layer, and P represents the feature The position code, Represents the activation function Operation, Represents a normalization operation; S2.7. Features Input to the second mamba module, the second mamba module consists of N mamba layers in parallel, the results of the N mamba layers after the Softmax operation are added, and then combined with the mapping feature The cube root of is normalized to get the output of the second mamba module , the specific process is as follows: , in, Represents the features output by the second mamba module, set N=3, denote the learnable width matrix, height matrix, and channel matrix of the nth mamba layer in the second mamba module, respectively. Represents the width matrix The dimension of Represents the height matrix The dimension of represents the learnable mamba feature selection matrix of the nth mamba layer, and P represents the feature The position code, Represents the activation function Operation, Represents a normalization operation; S2.8, the characteristics Input to the third mamba module, the third mamba module consists of Q mamba layers in parallel, the results of the Q mamba layers after the Softmax operation are added, and then combined with the mapping feature The fourth root of the phase is normalized to get the output of the third mamba module , the specific process is as follows: , in, Represents the characteristics of the output of the third mamba module, set Q=1, denote the learnable width matrix, height matrix, and channel matrix of the qth mamba layer in the third mamba module, respectively. , represents the learnable mamba feature selection matrix of the qth mamba layer, and P represents the feature The position code, Represents the activation function Operation, Represents a normalization operation.

[0021] S2.9, the first feature decoder includes, in sequence, a first transposed convolutional layer, a ReLU activation function, a second transposed convolutional layer, a ReLU activation function, a third transposed convolutional layer, and a ReLU activation function; Among them, the convolution kernel size of the first transposed convolution layer is 1*1, the number of convolution kernels is 512, the stride is 1, and the same padding is used; the convolution kernel size of the second transposed convolution layer is 3*3, the number of convolution kernels is 512, the stride is 1, and the same padding is used; the convolution kernel size of the third transposed convolution layer is 3*3, the number of convolution kernels is 256, the stride is 2, and the same padding is used; The characteristics and mapping features After addition, it is input into the first transposed convolution layer, ReLU activation function, second transposed convolution layer, ReLU activation function of the first feature decoder in turn, and then combined with the third encoded feature Dimension matching is performed, and then the sum is input into the third transposed convolution layer and ReLU activation function of the first feature decoder in turn, and the first decoded feature is output. ; S2.10, the second feature decoder includes, in sequence, a first convolutional layer, a ReLU activation function, a first pooling layer, a second convolutional layer, a ReLU activation function, and a second pooling layer; Among them, the convolution kernel size of the first convolution layer is 3*3, the number of convolution kernels is 256, the stride is 1, and the same padding is used; the first pooling layer adopts maximum pooling, the pooling window size is 1*1, and the stride is 1; the convolution kernel size of the second convolution layer is 3*3, the number of convolution kernels is 512, the stride is 1, and the same padding is used; the second pooling layer adopts maximum pooling, the pooling window size is 2*2, and the stride is 1; The characteristics and the first decoding feature After addition, it is input into the first convolution layer, ReLU activation function, and first pooling layer of the second feature decoder in turn, and then combined with the attention feature Dimension matching is performed, and then the sum is input into the second convolution layer, ReLU activation function, and second pooling layer of the second feature decoder in turn, and the second decoding feature is output. ; S2.11, the third feature decoder includes, in sequence, a first convolutional layer, a ReLU activation function, a first pooling layer, a second convolutional layer, a ReLU activation function, a second pooling layer, and a classifier; Among them, the convolution kernel size of the first convolution layer is 3*3, the number of convolution kernels is 512, the stride is 1, and the same padding is used; the first pooling layer adopts maximum pooling, the pooling window size is 1*1, and the stride is 1; the convolution kernel size of the second convolution layer is 3*3, the number of convolution kernels is 1024, the stride is 1, and the same padding is used; the second pooling layer adopts maximum pooling, the pooling window size is 2*2, and the stride is 1; The classifier is composed of a flattening layer, a first fully connected layer, a second fully connected layer, and a third fully connected layer in sequence. The flattening layer flattens the added data into a one-dimensional vector along the channel direction. The number of units in the first fully connected layer is 512, the number of units in the second fully connected layer is 128, and the number of units in the third fully connected layer is 1. Will and the second decoding feature After addition, they are input into the first convolution layer, ReLU activation function, and first pooling layer of the third feature decoder in sequence, and then combined with the first encoded feature Dimension matching is performed, and then the data is added and input into the second convolution layer, ReLU activation function, second pooling layer, and classifier of the third feature decoder to output the original image data. The prediction results .

[0022] In a specific implementation manner, S3 is as follows: The raw image data output by the Mamba architecture-based acute respiratory failure prediction model is measured by the cross entropy loss function The prediction results With the original image data The difference between the real labels is used to iteratively train the model through the Adam optimizer to reduce the loss function value; The test set The original image data in is input into the optimized model to obtain the final prediction result.

[0023] Example 2 In order to demonstrate the beneficial effects of the present invention, the following comparative experiments were conducted. The experimental data set was tested using the medical records and monitoring data of patients with acute respiratory failure provided by a hospital. The experimental environment used Python 3.8, TensorFlow 2.6, and the GPU used NVIDIA 4090 24G. The present invention was compared with the existing mainstream prediction methods and implemented under a unified experimental platform. First, the traditional support vector machine (SVM) is used. SVM has become a common method in many medical prediction tasks due to its superior performance in small samples and high-dimensional space. Secondly, the LSTM method is used. LSTM is a deep learning model that can capture time series features and is suitable for processing medical data containing time series information. Table 1 shows the comparison results between the method of the present invention and the existing methods. The evaluation indicators include accuracy, precision, recall and F1-score. Accuracy indicates the ratio of correctly predicted samples to the total number of samples, precision indicates the ratio of samples predicted as positive to samples that are actually positive, recall indicates the ratio of samples that are actually positive to samples that are correctly predicted as positive, and F1-score indicates the harmonic mean of precision and recall, which measures the balance of the model between the two. As can be seen from Table 1, the method of the present invention performs well in all indicators, with an accuracy rate of up to 94.5%, showing the effectiveness of the model in overall classification. In addition, the precision rate and recall rate are 93.7% and 92.8% respectively, which means that the method can better distinguish positive and negative samples and can effectively identify most positive samples. The F1-score reaches 93.2%, further confirming the advantage of the method in balancing precision and recall. In contrast, the performance of SVM and LSTM is significantly inferior. The accuracy rate of SVM is only 79.4%, while the precision rate and recall rate are 78.5% and 77.7% respectively, and the overall effect is not good. Although LSTM has improved to an accuracy rate of 81.2%, it is still not comparable to the method of the present invention in other indicators. Its F1-score is 80.1%. These results show that SVM and LSTM have certain limitations in dealing with practical problems, especially in terms of false positives and missed detections. In summary, the method of the present invention is significantly superior to existing methods in medical risk prediction performance, with higher accuracy and better sample recognition ability, which makes it have great application potential in scenarios requiring high accuracy, such as medical diagnosis or medical risk assessment. At the same time, despite its excellent performance, the possibility of further optimization can still be explored in the future, such as ensemble learning or new feature selection, in order to further improve model performance.

[0024] Table 1 Comparison results between the method of the present invention and the existing method Example 3 like Figure 2 , which is a lung CT image of a patient with malignant lung nodules. According to the evaluation of a professional organization, the risk of acute respiratory failure is medium-high risk. The image is input into the acute respiratory failure prediction model trained in the present invention, and the result obtained is 0.786, which is classified as medium-high risk, which is consistent with the evaluation of the professional organization. It can be seen that the present invention can accurately predict the risk of acute respiratory failure. Applying the present invention in practice is helpful to improve the timeliness and effectiveness of acute disease management.

[0025] Although the above describes the specific implementation mode of the invention in conjunction with the drawings, it is not intended to limit the scope of protection of the invention. Based on the technical solution of the present invention, various modifications or variations that can be made by those skilled in the art without creative work are still within the scope of protection of the present invention.

Claims

1. A method for predicting acute respiratory failure based on the mamba architecture, characterized in that: The following steps are involved: S1. Obtain raw image data from the existing Lung Phantom Dataset lung lesion dataset and construct a dataset , then the dataset Divide into training set and test set ; S2. Construct an acute respiratory failure prediction model based on the mamba architecture. The model includes three feature encoders, an attention module, a feature mapping layer, three feature decoders, and three mamba modules. The original image data is input into the module to obtain the prediction result; S3. Optimize and train the acute respiratory failure prediction model based on the mamba architecture, and then use the test set The original image data in is input into the optimized model to obtain the final prediction result.

2. The method for predicting acute respiratory failure based on the mamba architecture according to claim 1, characterized in that: S1 is as follows: The image is histogram-equalized using the equalizeHist function in the OpenCV library, and then image data is obtained from the LungPhantom Dataset. Contains several original image data, the training set Any original image data is recorded as .

3. A method for predicting acute respiratory failure based on mamba architecture according to claim 2, characterized in that S2 The details are as follows: The training set Any original image data Input into the acute respiratory failure prediction model based on the mamba architecture, the acute respiratory failure prediction model based on the mamba architecture specifically includes a first feature encoder, a second feature encoder, a third feature encoder, an attention module, a feature mapping layer, a first feature decoder, a second feature decoder, a third feature decoder, a first mamba module, a second mamba module and a third mamba module.

4. The method for predicting acute respiratory failure based on the mamba architecture according to claim 3 is characterized in that: S2.1, the first feature encoder includes a first convolution layer, a ReLU activation function, a first pooling layer, a second convolution layer, a ReLU activation function, a second pooling layer, a third convolution layer, a ReLU activation function, and a third pooling layer in sequence; Among them, the convolution kernel size of the first convolution layer is 1*1, the number of convolution kernels is 3, the stride is 1, and the same padding is used; the first pooling layer adopts maximum pooling, the pooling window size is 1*1, and the stride is 1; the convolution kernel size of the second convolution layer is 3*3, the number of convolution kernels is 32, the stride is 1, and the same padding is used; the second pooling layer adopts maximum pooling, the pooling window size is 2*2, and the stride is 2; the convolution kernel size of the third convolution layer is 3*3, the number of convolution kernels is 64, the stride is 2, and the same padding is used; the third pooling layer adopts maximum pooling, the pooling window size is 2*2, and the stride is 2; Will Input into the first feature encoder and output the first encoded feature ; S2.2, the second feature encoder includes a first convolution layer, a ReLU activation function, a first pooling layer, a second convolution layer, a ReLU activation function, a second pooling layer, and a whale operator in sequence; Among them, the convolution kernel size of the first convolution layer is 3*3, the number of convolution kernels is 128, the stride is 1, and the same padding is used; the first pooling layer adopts maximum pooling, the pooling window size is 1*1, and the stride is 1; the convolution kernel size of the second convolution layer is 3*3, the number of convolution kernels is 256, the stride is 1, and the same padding is used; the second pooling layer adopts maximum pooling, the pooling window size is 2*2, and the stride is 1; The calculation formula of the whale operator is as follows: , in, represents the feature map output by the second pooling layer in the second feature encoder, Representation feature map exist The feature points of the location, Representation feature map At the feature point The gradient amplitude of The first encoding feature Input to the second feature encoder, output the second encoded feature ; S2.3, the third feature encoder includes a first convolution layer, a ReLU activation function, a second convolution layer, a ReLU activation function, a third convolution layer, a Tanh activation function, and a pooling layer in sequence; Among them, the convolution kernel size of the first convolution layer is 3*3, the number of convolution kernels is 256, the stride is 1, and the same padding is used; the convolution kernel size of the second convolution layer is 3*3, the number of convolution kernels is 512, the stride is 1, and the same padding is used; the convolution kernel size of the third convolution layer is 3*3, the number of convolution kernels is 512, the stride is 2, and the same padding is used; the pooling layer uses average pooling, the pooling window size is 2*2, and the stride is 2; The second encoding feature Input to the third feature encoder, output the third encoded feature .

5. The method for predicting acute respiratory failure based on the mamba architecture according to claim 4 is characterized in that: S2.4, the second coding feature Input to the attention module, the specific process is as follows: , in, Represents the attention features output by the attention module , ⊙ represents element-by-element multiplication, represents the Sigmoid activation function in PyTorch, represents the channel attention weight matrix, represents the spatial attention weight matrix, and Respectively and The two bias terms of Represents input features the number of rows, Represents input features The number of columns, Indicates the number of columns The index of Indicates the number of columns The index of S2.5, the feature mapping layer includes convolution layer, ReLU activation function, and pooling layer in sequence; Among them, the convolution kernel size of the convolution layer is 1*1, the number of convolution kernels is 512, the stride is 1, and the same padding is used; the first pooling layer uses average pooling, the pooling window size is 2*2, and the stride is 1; The third encoding feature Input to the feature mapping layer, output mapping features ; S2.

6. Mapping features Input to the first mamba module, the first mamba module consists of M mamba layers in parallel, the results of the M mamba layers are added after the Softmax operation, and then combined with the mapping feature The square root of is normalized to get the output of the first mamba module , the specific process is as follows: , in, Represents the features of the first mamba module output, set M=4, denote the learnable width matrix, height matrix, and channel matrix of the mth mamba layer in the first mamba module, respectively. Represents the channel matrix The dimension of represents the learnable mamba feature selection matrix of the mth mamba layer, and P represents the feature The position code, Represents the activation function Operation, Represents a normalization operation; S2.

7. Features Input to the second mamba module, the second mamba module consists of N mamba layers in parallel, the results of the N mamba layers after the Softmax operation are added, and then combined with the mapping feature The cube root of is normalized to get the output of the second mamba module , the specific process is as follows: , in, Represents the features output by the second mamba module, set N=3, denote the learnable width matrix, height matrix, and channel matrix of the nth mamba layer in the second mamba module, respectively. Represents the width matrix The dimension of Represents the height matrix The dimension of represents the learnable mamba feature selection matrix of the nth mamba layer, and P represents the feature The position code, Represents the activation function Operation, Represents a normalization operation; S2.8, the characteristics Input to the third mamba module, the third mamba module consists of Q mamba layers in parallel, the results of the Q mamba layers after the Softmax operation are added, and then combined with the mapping feature The fourth root of the phase is normalized to get the output of the third mamba module , the specific process is as follows: , in, Represents the characteristics of the output of the third mamba module, set Q=1, denote the learnable width matrix, height matrix, and channel matrix of the qth mamba layer in the third mamba module, respectively. , represents the learnable mamba feature selection matrix of the qth mamba layer, and P represents the feature The position code, Represents the activation function Operation, Represents a normalization operation.

6. The method for predicting acute respiratory failure based on the mamba architecture according to claim 5, characterized in that: S2.9, the first feature decoder includes, in sequence, a first transposed convolutional layer, a ReLU activation function, a second transposed convolutional layer, a ReLU activation function, a third transposed convolutional layer, and a ReLU activation function; Among them, the convolution kernel size of the first transposed convolution layer is 1*1, the number of convolution kernels is 512, the stride is 1, and the same padding is used; the convolution kernel size of the second transposed convolution layer is 3*3, the number of convolution kernels is 512, the stride is 1, and the same padding is used; the convolution kernel size of the third transposed convolution layer is 3*3, the number of convolution kernels is 256, the stride is 2, and the same padding is used; The characteristics and mapping features After addition, it is input into the first transposed convolution layer, ReLU activation function, second transposed convolution layer, ReLU activation function of the first feature decoder in turn, and then combined with the third encoded feature Dimension matching is performed, and then the sum is input into the third transposed convolution layer and ReLU activation function of the first feature decoder in turn, and the first decoded feature is output. ; S2.10, the second feature decoder includes, in sequence, a first convolutional layer, a ReLU activation function, a first pooling layer, a second convolutional layer, a ReLU activation function, and a second pooling layer; Among them, the convolution kernel size of the first convolution layer is 3*3, the number of convolution kernels is 256, the stride is 1, and the same padding is used; the first pooling layer adopts maximum pooling, the pooling window size is 1*1, and the stride is 1; the convolution kernel size of the second convolution layer is 3*3, the number of convolution kernels is 512, the stride is 1, and the same padding is used; the second pooling layer adopts maximum pooling, the pooling window size is 2*2, and the stride is 1; The characteristics and the first decoding feature After addition, it is input into the first convolution layer, ReLU activation function, and first pooling layer of the second feature decoder in turn, and then combined with the attention feature Dimension matching is performed, and then the sum is input into the second convolution layer, ReLU activation function, and second pooling layer of the second feature decoder in turn, and the second decoding feature is output. ; S2.11, the third feature decoder includes, in sequence, a first convolutional layer, a ReLU activation function, a first pooling layer, a second convolutional layer, a ReLU activation function, a second pooling layer, and a classifier; Among them, the convolution kernel size of the first convolution layer is 3*3, the number of convolution kernels is 512, the stride is 1, and the same padding is used; the first pooling layer adopts maximum pooling, the pooling window size is 1*1, and the stride is 1; the convolution kernel size of the second convolution layer is 3*3, the number of convolution kernels is 1024, the stride is 1, and the same padding is used; the second pooling layer adopts maximum pooling, the pooling window size is 2*2, and the stride is 1; The classifier is composed of a flattening layer, a first fully connected layer, a second fully connected layer, and a third fully connected layer in sequence. The flattening layer flattens the added data into a one-dimensional vector along the channel direction. The number of units in the first fully connected layer is 512, the number of units in the second fully connected layer is 128, and the number of units in the third fully connected layer is 1. Will and the second decoding feature After addition, they are input into the first convolution layer, ReLU activation function, and first pooling layer of the third feature decoder in sequence, and then combined with the first encoded feature Dimension matching is performed, and then the data is added and input into the second convolution layer, ReLU activation function, second pooling layer, and classifier of the third feature decoder to output the original image data. The prediction results .

7. The method for predicting acute respiratory failure based on the mamba architecture according to claim 6, characterized in that S3 The details are as follows: The raw image data output by the Mamba architecture-based acute respiratory failure prediction model is measured using the cross entropy loss function The prediction results With the original image data The difference between the real labels is used to iteratively train the model through the Adam optimizer to reduce the loss function value; The test set The original image data in is input into the optimized model to obtain the final prediction result.