Respiration fluctuation prediction method and system and storage medium

By collecting and encoded breath fluctuation data in real time and optimizing the fine-tuning weight of the breath prediction model, the problems of breath fluctuation prediction accuracy and data differences among devices in the prior art are solved, and accurate breath fluctuation prediction for different groups is achieved.

CN119791639APending Publication Date: 2025-04-11JUYI TECH SHANGHAI CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411988155.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2025-04-11

AI Technical Summary

Technical Problem

The accuracy of existing respiratory fluctuation prediction methods is difficult to guarantee when facing groups with different respiratory characteristics and health conditions, and the sampling intervals and data differences between devices lead to different prediction results.

Method used

By collecting breath fluctuation data in real time and encoding it in time, the initial prediction results of the preset breath prediction model are obtained, the loss value is calculated and the fine-tuning weight is adjusted until the preset conditions are met, the target fine-tuning weight is determined, and then the prediction is made.

Benefits of technology

Accurate respiratory fluctuation prediction for groups with different respiratory characteristics and health conditions is achieved, eliminating the impact of respiratory habits and device sampling intervals on the prediction results, and improving the accuracy of model predictions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119791639A_ABST
    Figure CN119791639A_ABST
Patent Text Reader

Abstract

The invention discloses a respiratory fluctuation prediction method and system and a storage medium, and the method comprises the steps: collecting first respiratory fluctuation data at different times in real time, and carrying out the time coding of the first respiratory fluctuation data, and obtaining second respiratory fluctuation data; obtaining an initial prediction result of a preset respiration prediction model for the respiration training data at different times, calculating a loss value of the initial prediction result and the second respiration fluctuation data, adjusting a fine adjustment weight based on the loss value until the loss value meets a preset condition, and determining a target fine adjustment weight; and performing prediction based on the target fine adjustment weight to obtain a target prediction result, and decoding the target prediction result to obtain a breathing fluctuation result. The method can eliminate the influence of the breathing habit of the testee and the equipment sampling interval on the prediction result, and achieves the accurate prediction of the breathing fluctuation data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of time series prediction, and in particular to a method, system and storage medium for predicting respiratory fluctuations. Background Art

[0002] Respiratory fluctuations are the biggest uncertainty factor in the process of radiotherapy for chest tumors. They not only cause the position of the target tissue in the chest to change, but also further affect the upper abdominal organs, including the lungs, pancreas, liver, etc., as well as other tumors located in the chest and abdomen, which will all move with respiratory fluctuations.

[0003] At present, the commonly used respiratory fluctuation prediction methods mainly include Kalman filtering, linear extrapolation, GRU neural network model, etc. These methods show high accuracy in predicting respiratory fluctuations of some healthy adult individuals. However, the accuracy of these methods is highly dependent on the breathing habits of the predicted person and the fixed sampling frequency of the equipment used. When facing groups with different respiratory characteristics and health conditions such as adolescents, infants and patients with respiratory diseases, the pressure and speed of respiratory airflow show significant differences, which in turn affects the accuracy of the prediction results. In addition, the sampling intervals and sampling data between different devices are also different, resulting in significant differences in the prediction results obtained by different devices. Summary of the invention

[0004] The present application provides a method, system and storage medium for predicting respiratory fluctuations, so as to eliminate the influence of the breathing habits of the subject and the sampling interval of the equipment on the prediction results, and realize accurate prediction of the respiratory fluctuation data.

[0005] In a first aspect, the present application provides a method for predicting respiratory fluctuations, comprising:

[0006] collecting first respiratory fluctuation data at different times in real time, and time-coding the first respiratory fluctuation data to obtain second respiratory fluctuation data;

[0007] Obtaining initial prediction results of a preset respiratory prediction model for respiratory training data at different times, and calculating a loss value between the initial prediction result and the second respiratory fluctuation data, adjusting the fine-tuning weight based on the loss value until the loss value meets a preset condition, and then determining a target fine-tuning weight;

[0008] Prediction is performed based on the target fine-tuning weight to obtain a target prediction result, and the target prediction result is decoded to obtain a respiratory fluctuation result.

[0009] The embodiment of the present application can accurately obtain the breathing state of the subject in different time periods by real-time acquisition of the first respiratory fluctuation data at different times, which is helpful for the subsequent analysis of changes in breathing habits; by time encoding the first respiratory fluctuation data, the first respiratory fluctuation data can be converted into a unified time series format, which is convenient for the prediction of the subsequent respiratory prediction model; by calculating the loss value of the initial prediction result and the second respiratory fluctuation data, the prediction performance of the respiratory prediction model for the current subject can be evaluated, and the loss value can be used as the basis for fine-tuning the weight. By continuously optimizing the fine-tuning weight, the parameters of the respiratory prediction model can be optimized to make the model better adapt to different groups of subjects, and the influence of the subject's breathing habits and the device sampling interval on the prediction results can be gradually eliminated, thereby improving the accuracy of the model prediction; by predicting based on the target fine-tuning weight, it can adapt to the breathing habits of the current subject and realize accurate prediction of respiratory fluctuation data. Compared with the prior art, the present application can eliminate the influence of the subject's breathing habits and the device sampling interval on the prediction results and realize accurate prediction of respiratory fluctuation data.

[0010] Further, the first respiratory fluctuation data includes a sampling frequency, respiratory data and a sampling time, and the first respiratory fluctuation data is time-encoded to obtain the second respiratory fluctuation data, specifically:

[0011] Performing a sine function transformation on the sampling time to obtain a first processing result;

[0012] Sorting the respiratory data in chronological order to obtain a sorting result, and performing feature extraction on the sorting result to obtain a second processing result;

[0013] Cascading the first processing result and the second processing result to obtain a third processing result;

[0014] The third processing result is data-filled based on the sampling frequency to obtain second respiratory fluctuation data.

[0015] In this way, by time encoding the first respiratory fluctuation data, the first respiratory fluctuation data can be converted into a unified time series format, which is convenient for subsequent prediction of the respiratory prediction model.

[0016] Furthermore, the initial prediction results of the preset breathing prediction model for the breathing training data at different times are obtained, specifically:

[0017] Performing time coding on breathing training data at different times to obtain coding data, and sequentially inputting the coding data into a first fully connected layer feedforward network and a first softmax function to obtain sampling coding, wherein the breathing training data includes time sampling data;

[0018] The sampling code is cascaded with the time sampling data to obtain a cascade result, and the cascade result is sequentially input into a second fully connected layer feedforward network and a second softmax function to obtain an initial prediction result, wherein the initial prediction result includes a respiratory fluctuation result and a time node result.

[0019] In this way, by obtaining the initial prediction results of the preset breathing prediction model for the breathing training data at different times, it is convenient to subsequently calculate the loss value of the initial prediction results of the breathing prediction model and the second breathing fluctuation data, and then adjust the breathing prediction model to suit the current subject.

[0020] Further, the loss value between the initial prediction result and the second respiratory fluctuation data is calculated, and the fine-tuning weight is adjusted based on the loss value, specifically:

[0021] Inputting the initial prediction result into a fully connected layer to normalize the initial prediction result through a sigmod function to obtain an output result;

[0022] The output result and the second respiratory fluctuation data are input into a preset loss function to obtain a loss value. After receiving the loss value, the fully connected layer determines the gradient of the fine-tuning weight based on the loss value, and adjusts the fine-tuning weight according to the gradient.

[0023] In this way, by calculating the loss value between the initial prediction result of the respiratory prediction model and the second respiratory fluctuation data, the prediction performance of the respiratory prediction model for the current subject can be evaluated, and the loss value can be used as the basis for fine-tuning the weight. By continuously optimizing the fine-tuning weights, the parameters of the respiratory prediction model can be optimized to make the model better adapt to different test populations, and the influence of the test person's breathing habits and the equipment sampling interval on the prediction results can be gradually eliminated, thereby improving the accuracy of the model prediction.

[0024] Furthermore, before adjusting the fine-tuning weight based on the loss value, the method further includes:

[0025] The fine-tuning weight at the current moment is obtained, a corresponding weight change is determined based on a preset initial fine-tuning weight and the fine-tuning weight, and the magnitude of the weight change is controlled within a preset range.

[0026] In this way, by controlling the amplitude of the weight change within a preset range, it can be ensured that the model can fully learn the characteristics of the second respiratory fluctuation data, thereby improving the stability of the training.

[0027] In a second aspect, the present application provides a respiratory fluctuation prediction system, comprising: a collection module, a regulation module and a prediction module;

[0028] The acquisition module is used to acquire first respiratory fluctuation data at different times in real time, and time-code the first respiratory fluctuation data to obtain second respiratory fluctuation data;

[0029] The adjustment module is used to obtain the initial prediction results of the preset breathing prediction model for the breathing training data at different times, and calculate the loss value between the initial prediction result and the second breathing fluctuation data, and adjust the fine-tuning weight based on the loss value until the loss value meets the preset condition, and then determine the target fine-tuning weight;

[0030] The prediction module is used to make predictions based on the target fine-tuning weights to obtain target prediction results, and decode the target prediction results to obtain respiratory fluctuation results.

[0031] The embodiment of the present application can accurately obtain the breathing state of the subject in different time periods by real-time acquisition of the first respiratory fluctuation data at different times, which is helpful for the subsequent analysis of changes in breathing habits; by time encoding the first respiratory fluctuation data, the first respiratory fluctuation data can be converted into a unified time series format, which is convenient for the prediction of the subsequent respiratory prediction model; by calculating the loss value of the initial prediction result and the second respiratory fluctuation data, the prediction performance of the respiratory prediction model for the current subject can be evaluated, and the loss value can be used as the basis for fine-tuning the weight. By continuously optimizing the fine-tuning weight, the parameters of the respiratory prediction model can be optimized to make the model better adapt to different groups of subjects, and the influence of the subject's breathing habits and the device sampling interval on the prediction results can be gradually eliminated, thereby improving the accuracy of the model prediction; by predicting based on the target fine-tuning weight, it can adapt to the breathing habits of the current subject and realize accurate prediction of respiratory fluctuation data. Compared with the prior art, the present application can eliminate the influence of the subject's breathing habits and the device sampling interval on the prediction results and realize accurate prediction of respiratory fluctuation data.

[0032] Further, the acquisition module includes: a first processing unit, a second processing unit, a third processing unit and a fourth processing unit, wherein the first respiratory fluctuation data includes a sampling frequency, respiratory data and a sampling time;

[0033] The first processing unit is used to perform a sine function transformation on the sampling time to obtain a first processing result;

[0034] The second processing unit is used to sort the respiratory data in chronological order to obtain a sorting result, and perform feature extraction on the sorting result to obtain a second processing result;

[0035] The third processing unit is used to cascade the first processing result and the second processing result to obtain a third processing result;

[0036] The fourth processing unit is used to perform data filling on the third processing result based on the sampling frequency to obtain second respiratory fluctuation data.

[0037] Further, the adjustment module includes: an encoding unit and a prediction unit;

[0038] The encoding unit is used to perform time encoding on the breathing training data at different times to obtain encoded data, and sequentially input the encoded data into the first fully connected layer feedforward network and the first softmax function to obtain sampling codes, wherein the breathing training data includes time sampling data;

[0039] The prediction unit is used to cascade the sampling code with the time sampling data to obtain a cascade result, and input the cascade result into the second fully connected layer feedforward network and the second softmax function in sequence to obtain an initial prediction result, wherein the initial prediction result includes a respiratory fluctuation result and a time node result.

[0040] Further, the adjustment module further includes: a fifth processing unit and an adjustment unit;

[0041] The fifth processing unit is used to input the initial prediction result into a fully connected layer to normalize the initial prediction result through a sigmod function to obtain an output result;

[0042] The adjustment unit is used to input the output result and the second respiratory fluctuation data into a preset loss function to obtain a loss value. After receiving the loss value, the fully connected layer determines the gradient of the fine-tuning weight based on the loss value and adjusts the fine-tuning weight according to the gradient.

[0043] In a third aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method for predicting respiratory fluctuations as described in the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] Figure 1 It is a flow chart of an embodiment of a method for predicting respiratory fluctuations provided by the present application;

[0045] Figure 2 It is a schematic diagram of a module for time encoding breathing training data provided by the present application;

[0046] Figure 3 It is a schematic diagram of a module for decoding the result of breathing training data provided by the present application;

[0047] Figure 4It is a schematic diagram of a module for adjusting fine-tuning weights provided by the present application;

[0048] Figure 5 It is a structural schematic diagram of an embodiment of a respiratory fluctuation prediction system provided by the present application. DETAILED DESCRIPTION

[0049] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0050] It should be understood that the step numbers used in this article are only for the convenience of description and are not intended to limit the order in which the steps are executed.

[0051] It should be understood that the terms used in the present specification are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the present specification and the appended claims, the singular forms "a", "an" and "the" are intended to include plural forms unless the context clearly indicates otherwise.

[0052] The terms “include” and “comprising” indicate the presence of described features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.

[0053] The term "and / or" means and includes any and all possible combinations of one or more of the associated listed items.

[0054] Respiratory fluctuations are the biggest uncertainty factor in chest tumor radiotherapy, which can cause displacement of target tissues and upper abdominal organs. Existing prediction methods (such as Kalman filtering, linear extrapolation, and GRU models) are relatively accurate for healthy adult individuals, but they all rely on breathing habits and device sampling frequency. When faced with groups with different breathing characteristics and health conditions such as adolescents, infants, and patients with respiratory diseases, the accuracy of prediction is difficult to guarantee; and sampling differences between devices will also lead to different prediction results.

[0055] Next, the nouns involved in this application are analyzed:

[0056] Artificial intelligence (AI) is a new technical science that studies and develops theories, methods, technologies and application systems for simulating, extending and expanding human intelligence. AI is a branch of computer science that attempts to understand the essence of intelligence and produce a new type of intelligent machine that can respond in a similar way to human intelligence. Research in this field includes robotics, speech recognition, image recognition, natural language processing and expert systems. AI can simulate the information process of human consciousness and thinking. AI is also a theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.

[0057] Adapter is a lightweight fine-tuning strategy that is implemented by adding additional small network layers between specific layers of the pre-trained model. The adapter layer only fine-tunes the specific task to train various methods to optimize the number of parameters of the model.

[0058] Based on this, the embodiments of the present application provide a method, system and storage medium for predicting respiratory fluctuations to eliminate the influence of the breathing habits of the subject and the sampling interval of the equipment on the prediction results, and achieve accurate prediction of respiratory fluctuation data.

[0059] A method, system and storage medium for predicting respiratory fluctuations provided in an embodiment of the present application are specifically illustrated through the following embodiments. First, a method for predicting respiratory fluctuations in an embodiment of the present application is described.

[0060] A method for predicting respiratory fluctuations provided in an embodiment of the present application relates to the field of time series prediction technology. A method for predicting respiratory fluctuations provided in an embodiment of the present application can be applied to a terminal, can be applied to a server side, or can be software running in a terminal or a server side. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, etc.; the server side can be configured as an independent physical server, or can be configured as a server cluster or a distributed system composed of multiple physical servers, or can be configured as a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms; the software can be an application that implements a method for predicting respiratory fluctuations, etc., but is not limited to the above forms.

[0061] The present application can also be used in numerous general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.

[0062] Embodiment 1

[0063] Please refer to Figure 1 , Figure 1 It is a flowchart of an embodiment of a method for predicting respiratory fluctuations provided by the present application, including steps S101 to S103;

[0064] Step S101, collecting first respiratory fluctuation data at different times in real time, and time-coding the first respiratory fluctuation data to obtain second respiratory fluctuation data;

[0065] In some embodiments, the first respiratory fluctuation data at different times are collected in real time. Specifically, a biosignal sensor needs to be placed on the chest or abdomen of the subject, and the sensor is connected to a respiratory sampling device so that the respiratory sampling device can receive the first respiratory fluctuation data. Then, the data sampling rate of the respiratory sampling device is set. At this time, the respiratory sampling device will obtain the first respiratory fluctuation data according to the preset data sampling rate, wherein the first fluctuation data includes multiple segments of data with an interval of 1 second, and the first respiratory fluctuation data includes a sampling frequency, respiratory data and sampling time.

[0066] In some embodiments, the sampling frequency is the number of times the breathing sampling device acquires breathing fluctuation data within 1 second.

[0067] In some embodiments, the respiratory data may be, but is not limited to, fluctuation data such as flow rate and pressure of respiratory gas obtained by a sensor.

[0068] In some embodiments, the sampling time may be, but is not limited to, the time difference between when the breathing data is acquired during the breathing process and when the device starts to operate.

[0069] In some embodiments, the time encoding of the first respiratory fluctuation data to obtain the second respiratory fluctuation data includes: performing a sinusoidal function transform on the sampling time to obtain a first processing result; sorting the respiratory data in chronological order to obtain a sorting result, and performing feature extraction on the sorting result to obtain a second processing result; cascading the first processing result and the second processing result to obtain a third processing result; and filling the third processing result with data based on the sampling frequency to obtain the second respiratory fluctuation data. Specifically, first, an array or list of all sampling times is obtained, and this array or list is used as a parameter of the sine function input to transform the sine value, i.e., the first processing result, so that the infinite value can be constrained between 0 and 1 and has a certain periodicity; secondly, the respiratory data is sorted according to the sampling time to form an ordered sorting result and useful features are extracted from the sorting result, i.e., the second processing result; thirdly, the first processing result and the second processing result are merged to form a set of sampling time and respiratory fluctuation value pairs, and then all respiratory fluctuation data within one second are spliced ​​to obtain the third processing result; finally, since different numbers of respiratory data may appear in a sampling interval of 1 second, if they are directly spliced ​​and cascaded, the scale of the data will be different, which will lead to model calculation errors. Therefore, it is necessary to perform length padding on the respiratory fluctuation data, that is, to pad respiratory fluctuation data of different lengths according to different sampling frequencies to calibrate the relative time of each respiratory fluctuation, and then obtain the second respiratory fluctuation data. Exemplarily, 1 millisecond of respiratory fluctuation data is used as the minimum time unit, and a sine transform is performed on each millisecond of sampling time. Then, the corresponding respiratory fluctuation data is mapped according to the sampling time. If the sampling frequency is greater than 1KHz: If the sampling frequency is greater than 1KHz, the calculated respiratory fluctuation data is directly used. If the sampling frequency is less than 1KHz, zeros are filled in the remaining sampling time.

[0070] In some embodiments, since the sampling time interval is in milliseconds, but data acquisition is usually measured in seconds, 1 second should be taken as a complete input. Therefore, in the design of the formula, by adjusting the fixed parameters, 1 second is taken as a complete sinusoidal cycle, so the formula is: y=sin(2πx×100).

[0071] In some embodiments, the second processing result includes but is not limited to statistical features (such as mean, standard deviation), time domain features (such as respiratory cycle, respiratory amplitude change) or frequency domain features (such as spectrum analysis).

[0072] In some embodiments, respiratory fluctuation data of different lengths are filled, including: using a linear interpolation method to insert new data points between data points with low sampling frequency. Specifically, intermediate values ​​are generated by linear interpolation to form a standard code with the same sequence length and sampling data information.

[0073] In this way, by time encoding the first respiratory fluctuation data, the first respiratory fluctuation data can be converted into a unified time series format, which is convenient for subsequent prediction of the respiratory prediction model.

[0074] Step S102, obtaining the initial prediction results of the preset breathing prediction model for the breathing training data at different times, and calculating the loss value between the initial prediction result and the second breathing fluctuation data, adjusting the fine-tuning weight based on the loss value until the loss value meets the preset condition, and then determining the target fine-tuning weight;

[0075] In some embodiments, the method of obtaining the initial prediction results of the breathing training data at different times by the preset breathing prediction model includes: time encoding the breathing training data at different times to obtain the encoded data, and sequentially inputting the encoded data into the first fully connected layer feedforward network and the first softmax function to obtain the sampling code, wherein the breathing training data includes time sampling data; cascading the sampling code with the time sampling data to obtain the cascade result, and sequentially inputting the cascade result into the second fully connected layer feedforward network and the second softmax function to obtain the initial prediction result, wherein the initial prediction result includes the breathing fluctuation result and the time node result. Specifically, first, it is necessary to time encode the breathing training data at different times to obtain the encoded data, and input the encoded data as the model training data into the pre-trained breathing prediction model, and convert the encoded data into a high-dimensional vector that can perform neural network operations, namely, the sampling code, through the first fully connected layer feedforward network and the first softmax function. The module schematic diagram for time encoding the breathing training data is shown as follows. Figure 2 As shown; secondly, the sampling code is cascaded with the time sampling data to calibrate the relative time of each respiratory fluctuation, and then the cascade results are sequentially input into the second fully connected layer feedforward network and the second softmax function for calculation to obtain two sets of initial prediction results with the same parameter scale, which respectively include: the fluctuation size of subsequent breathing, i.e., the respiratory fluctuation result, and the switching time node of the respiratory state, i.e., the time node result, wherein the module schematic diagram for decoding the result of the respiratory training data is shown as follows Figure 3 shown.

[0076] It should be noted that the specific steps of time coding have been explained in detail above, so they will not be repeated here.

[0077] In some embodiments, the breathing prediction model is compiled using Python language and built using the pytorch library. The breathing prediction model includes an encoding module, a decoding module, and a fine-tuning module. The encoding module builds 4 sets of standard residual layer neural networks, and the convolution kernel scale is 2*2. Rule is used as an activation function between each neural network. The input scale of the encoding module is a two-dimensional matrix of 2×100. After 4 times of processing by the residual module, the prediction code is finally obtained, and the prediction code is sent to the decoding module to obtain the initial prediction result. The decoding module is mainly composed of a self-attention module and a fully connected layer. The input and output of the two-layer structure are connected using a residual module. The module is composed of four deconvolution layers. Rule is used as an activation function between each neural network. The convolution kernel scale is 2*2. At the same time, the time node of the code and the fluctuation size of the predicted breathing are deconvolved, and the parameters in the convolution kernel are adjusted through parameter training to obtain the initial prediction result. The fine-tuning module consists of a fine-tunable fully connected layer and a decoding module, wherein the fully connected layer can adjust the fine-tuning weights, and the decoding module can decode the target prediction results to obtain respiratory fluctuation data.

[0078] It should be noted that in the process of training the breathing prediction model, the mean square error is used to describe the size of the loss value and is used as the basis for adjusting the back propagation parameters to obtain an accurate breathing prediction model.

[0079] It should be noted that in the initialization stage of training, the Gaussian model is used to initialize the parameters of all fully connected layers.

[0080] In this way, by obtaining the initial prediction results of the preset breathing prediction model for the breathing training data at different times, it is convenient to subsequently calculate the loss value of the initial prediction results of the breathing prediction model and the second breathing fluctuation data, and then adjust the breathing prediction model to suit the current subject.

[0081] In some embodiments, the calculation of the loss value of the initial prediction result and the second respiratory fluctuation data, and adjusting the fine-tuning weight based on the loss value, include: inputting the initial prediction result into a fully connected layer to normalize the initial prediction result through a sigmoid function to obtain an output result; inputting the output result and the second respiratory fluctuation data into a preset loss function to obtain a loss value, and after receiving the loss value, the fully connected layer determines the gradient of the fine-tuning weight based on the loss value, and adjusts the fine-tuning weight according to the gradient. Specifically, the initial prediction result is input into the fully connected layer to normalize the initial prediction result through the sigmoid function to obtain an output result, and the mean square error MSE loss value between the output result and the second respiratory fluctuation data is calculated. The loss value is propagated back to the fully connected layer through the network, and then the gradient of each fine-tuning weight is calculated through the back propagation algorithm, and the fine-tuning weight is updated according to the gradient descent method, so as to achieve the effect of model fine-tuning. This method will determine the corresponding fine-tuning weight according to the user's breathing habits and write it into the respiratory prediction model in real time, so as to better predict respiratory fluctuations. The module schematic diagram for adjusting the fine-tuning weight is shown in FIG. Figure 4 shown.

[0082] It should be noted that when adjusting the fine-tuning weights, the parameters of the pre-training weights will not be affected, wherein the pre-training weights are determined according to the trained breathing prediction model, including encoding weights and decoding weights.

[0083] In this way, by calculating the loss value between the initial prediction result and the second respiratory fluctuation data, the fine-tuning weight is adjusted based on the loss value until the loss value meets the preset conditions, and then the target fine-tuning weight is determined. In this way, by calculating the loss value between the initial prediction result of the respiratory prediction model and the second respiratory fluctuation data, the prediction performance of the respiratory prediction model for the current subject can be evaluated, and the loss value is used as the basis for fine-tuning the weight. By continuously optimizing the fine-tuning weight, the parameters of the respiratory prediction model can be optimized, so that the model can better adapt to different subjects, and the influence of the subjects' breathing habits and the equipment sampling interval on the prediction results can be gradually eliminated, thereby improving the accuracy of the model prediction.

[0084] In some embodiments, until the loss value satisfies a preset condition, the target fine-tuning weight is determined, and when the loss value is less than a preset value, the target fine-tuning weight can be determined.

[0085] In some embodiments, before the fine-tuning weight is adjusted based on the loss value, it also includes: obtaining the fine-tuning weight at the current moment, determining the corresponding weight change based on the preset initial fine-tuning weight and the fine-tuning weight, and controlling the amplitude of the weight change within a preset range. Specifically, the initial fine-tuning weight needs to be set in advance, and then in each iteration step, the fine-tuning weight at the current moment needs to be obtained, and the difference between the fine-tuning weight at the current moment and the initial fine-tuning weight is compared to obtain the weight change. After that, check whether the amplitude of the weight change exceeds the preset range. If it exceeds, the two parameters of the weight change parameter range and the change step size can be modified to ensure that it remains within the preset range. Finally, the adjusted weight change is applied to the current weight to update the fine-tuning weight of the model.

[0086] In some embodiments, the range of parameter changes can be further limited by, but not limited to, pre-stopping, limiting the maximum number of iterations, and other techniques to improve the overall computational efficiency of the model.

[0087] It should be noted that the preset range can be set according to the preset settings and this application does not impose any restrictions.

[0088] In this way, by controlling the amplitude of the weight change within a preset range, it can be ensured that the model can fully learn the characteristics of the second respiratory fluctuation data, thereby improving the stability of the training.

[0089] Step S103, predicting based on the target fine-tuning weight to obtain a target prediction result, and decoding the target prediction result to obtain a respiratory fluctuation result.

[0090] In some embodiments, after the fine-tuning weight of the subject is determined, the encoded second fluctuation data can be predicted to calculate a target prediction result, and then the target prediction result is decoded using a decoding module to obtain a respiratory fluctuation result.

[0091] It should be noted that the parameter optimization of the present application includes two steps: model training parameter optimization and parameter fine-tuning when using prediction. (1) For parameter optimization of model training, first, forward propagation is performed to pass the input data into the neural network, and the output result is obtained after calculation at each layer. During the forward propagation process, the output of the neuron can be nonlinearly transformed by the activation function. Secondly, the cost function is calculated. According to the output result and the actual target value, the cost function of the neural network (such as mean square error, cross entropy, etc.) is calculated to evaluate the accuracy of the model prediction result. Then, the model is back-propagated according to the cost value, and the partial derivatives of the parameters (weights and biases) of each layer in the neural network are calculated through the back-propagation algorithm to facilitate subsequent optimization and update. In this process, according to the calculated partial derivatives, the optimization algorithm (such as gradient descent, Adam, etc.) is used to continuously update the parameters in the neural network so that the model prediction result is closer to the actual target value to obtain a trained respiratory fluctuation prediction model. (2) For parameter fine-tuning during prediction, the Adapter method can be used for fine-tuning. The adapter layer only fine-tunes the specific task and trains various methods to optimize the parameters of the model. The fine-tunable module includes the residual network and the fully connected layer. Each layer performs multiplication and concatenation operations on the input matrix. It should be noted that parameter fine-tuning during prediction has been detailed above and will not be repeated here.

[0092] The embodiment of the present application can accurately obtain the breathing state of the subject in different time periods by real-time acquisition of the first respiratory fluctuation data at different times, which is helpful for the subsequent analysis of changes in breathing habits; by time encoding the first respiratory fluctuation data, the first respiratory fluctuation data can be converted into a unified time series format, which is convenient for the prediction of the subsequent respiratory prediction model; by calculating the loss value of the initial prediction result of the respiratory prediction model and the second respiratory fluctuation data, the prediction performance of the respiratory prediction model for the current subject can be evaluated, and the loss value can be used as the basis for fine-tuning the weight. By continuously optimizing the fine-tuning weight, the parameters of the respiratory prediction model can be optimized, so that the model can better adapt to different groups of subjects, and the influence of the subject's breathing habits and the device sampling interval on the prediction results can be gradually eliminated, and the accuracy of the model prediction can be improved; by predicting based on the target fine-tuning weight, it can adapt to the breathing habits of the current subject and realize accurate prediction of respiratory fluctuation data. Compared with the prior art, the present application can eliminate the influence of the subject's breathing habits and the device sampling interval on the prediction results, and realize accurate prediction of respiratory fluctuation data.

[0093] Embodiment 2

[0094] Please refer to Figure 5 , Figure 5 It is a flow chart of an embodiment of a respiratory fluctuation prediction system provided by the present application, including a collection module 100, an adjustment module 200 and a prediction module 300;

[0095] The acquisition module 100 is used to acquire first respiratory fluctuation data at different times in real time, and time-code the first respiratory fluctuation data to obtain second respiratory fluctuation data;

[0096] In some embodiments, the first respiratory fluctuation data at different times are collected in real time. Specifically, a biosignal sensor needs to be placed on the chest or abdomen of the subject, and the sensor is connected to a respiratory sampling device so that the respiratory sampling device can receive the first respiratory fluctuation data. Then, the data sampling rate of the respiratory sampling device is set. At this time, the respiratory sampling device will obtain the first respiratory fluctuation data according to the preset data sampling rate, wherein the first fluctuation data includes multiple segments of data with an interval of 1 second, and the first respiratory fluctuation data includes a sampling frequency, respiratory data and sampling time.

[0097] In some embodiments, the sampling frequency is the number of times the breathing sampling device acquires breathing fluctuation data within 1 second.

[0098] In some embodiments, the respiratory data may be, but is not limited to, fluctuation data such as flow rate and pressure of respiratory gas obtained by a sensor.

[0099] In some embodiments, the sampling time may be, but is not limited to, the time difference between when the breathing data is acquired during the breathing process and when the device starts to operate.

[0100] In some embodiments, the acquisition module 100 includes: a first processing unit, a second processing unit, a third processing unit and a fourth processing unit, wherein the first respiratory fluctuation data includes a sampling frequency, respiratory data and a sampling time; the first processing unit is used to perform a sine function transform on the sampling time to obtain a first processing result; the second processing unit is used to sort the respiratory data in chronological order to obtain a sorting result, and perform feature extraction on the sorting result to obtain a second processing result; the third processing unit is used to cascade the first processing result and the second processing result to obtain a third processing result; the fourth processing unit is used to perform data filling on the third processing result based on the sampling frequency to obtain second respiratory fluctuation data. Specifically, first, an array or list of all sampling times is obtained, and this array or list is used as a parameter of the sine function input to transform the sine value, i.e., the first processing result, so that the infinite value can be constrained between 0 and 1 and has a certain periodicity; secondly, the respiratory data is sorted according to the sampling time to form an ordered sorting result and useful features are extracted from the sorting result, i.e., the second processing result; thirdly, the first processing result and the second processing result are merged to form a set of sampling time and respiratory fluctuation value pairs, and then all respiratory fluctuation data within one second are spliced ​​to obtain the third processing result; finally, since different numbers of respiratory data may appear in a sampling interval of 1 second, if they are directly spliced ​​and cascaded, the scale of the data will be different, which will lead to model calculation errors. Therefore, it is necessary to perform length padding on the respiratory fluctuation data, that is, to pad respiratory fluctuation data of different lengths according to different sampling frequencies to calibrate the relative time of each respiratory fluctuation, and then obtain the second respiratory fluctuation data. Exemplarily, 1 millisecond of respiratory fluctuation data is used as the minimum time unit, and a sine transform is performed on each millisecond of sampling time. Then, the corresponding respiratory fluctuation data is mapped according to the sampling time. If the sampling frequency is greater than 1KHz: If the sampling frequency is greater than 1KHz, the calculated respiratory fluctuation data is directly used. If the sampling frequency is less than 1KHz, zeros are filled in the remaining sampling time.

[0101] In some embodiments, since the sampling time interval is in milliseconds, but data acquisition is usually measured in seconds, 1 second should be taken as a complete input. Therefore, in the design of the formula, by adjusting the fixed parameters, 1 second is taken as a complete sinusoidal cycle, so the formula is: y=sin(2πx×100).

[0102] In some embodiments, the second processing result includes but is not limited to statistical features (such as mean, standard deviation), time domain features (such as respiratory cycle, respiratory amplitude change) or frequency domain features (such as spectrum analysis).

[0103] In some embodiments, respiratory fluctuation data of different lengths are filled, including: using a linear interpolation method to insert new data points between data points with low sampling frequency. Specifically, intermediate values ​​are generated by linear interpolation to form a standard code with the same sequence length and sampling data information.

[0104] In this way, by time encoding the first respiratory fluctuation data, the first respiratory fluctuation data can be converted into a unified time series format, which is convenient for subsequent prediction of the respiratory prediction model.

[0105] The adjustment module 200 is used to obtain the initial prediction results of the preset respiratory prediction model for the respiratory training data at different times, and calculate the loss value between the initial prediction result and the second respiratory fluctuation data, and adjust the fine-tuning weight based on the loss value until the loss value meets the preset condition, and then determine the target fine-tuning weight;

[0106] In some embodiments, the adjustment module 200 includes: a coding unit and a prediction unit; the coding unit is used to perform time coding on the breathing training data at different times to obtain coding data, and the coding data is sequentially input into the first fully connected layer feedforward network and the first softmax function to obtain sampling coding, wherein the breathing training data includes time sampling data; the prediction unit is used to cascade the sampling coding with the time sampling data to obtain a cascade result, and the cascade result is sequentially input into the second fully connected layer feedforward network and the second softmax function to obtain an initial prediction result, wherein the initial prediction result includes a breathing fluctuation result and a time node result. Specifically, first, it is necessary to perform time coding on the breathing training data at different times to obtain coding data, and the coding data is input into the pre-trained breathing prediction model as model training data, and the coding data is converted into a high-dimensional vector that can perform neural network operations, namely, sampling coding, through the first fully connected layer feedforward network and the first softmax function. The module schematic diagram for time coding the breathing training data is shown as follows. Figure 2 As shown; secondly, the sampling code is cascaded with the time sampling data to calibrate the relative time of each respiratory fluctuation, and then the cascade results are sequentially input into the second fully connected layer feedforward network and the second softmax function for calculation to obtain two sets of initial prediction results with the same parameter scale, which respectively include: the fluctuation size of subsequent breathing, i.e., the respiratory fluctuation result, and the switching time node of the respiratory state, i.e., the time node result, wherein the module schematic diagram for decoding the result of the respiratory training data is shown as follows Figure 3 shown.

[0107] It should be noted that the specific steps of time coding have been explained in detail above, so they will not be repeated here.

[0108] In some embodiments, the breathing prediction model is compiled using Python language and built using the pytorch library. The breathing prediction model includes an encoding module, a decoding module, and a fine-tuning module. The encoding module builds 4 sets of standard residual layer neural networks, and the convolution kernel scale is 2*2. Rule is used as an activation function between each neural network. The input scale of the encoding module is a two-dimensional matrix of 2×100. After 4 times of processing by the residual module, the prediction code is finally obtained, and the prediction code is sent to the decoding module to obtain the initial prediction result. The decoding module is mainly composed of a self-attention module and a fully connected layer. The input and output of the two-layer structure are connected using a residual module. The module is composed of four deconvolution layers. Rule is used as an activation function between each neural network. The convolution kernel scale is 2*2. At the same time, the time node of the code and the fluctuation size of the predicted breathing are deconvolved, and the parameters in the convolution kernel are adjusted through parameter training to obtain the initial prediction result. The fine-tuning module consists of a fine-tunable fully connected layer and a decoding module, wherein the fully connected layer can adjust the fine-tuning weights, and the decoding module can decode the target prediction results to obtain respiratory fluctuation data.

[0109] It should be noted that in the process of training the breathing prediction model, the mean square error is used to describe the size of the loss value and is used as the basis for adjusting the back propagation parameters to obtain an accurate breathing prediction model.

[0110] It should be noted that in the initialization stage of training, the Gaussian model is used to initialize the parameters of all fully connected layers.

[0111] In this way, by obtaining the initial prediction results of the preset breathing prediction model for the breathing training data at different times, it is convenient to subsequently calculate the loss value of the initial prediction results of the breathing prediction model and the second breathing fluctuation data, and then adjust the breathing prediction model to suit the current subject.

[0112] In some embodiments, the adjustment module 200 also includes: a fifth processing unit and an adjustment unit; the fifth processing unit is used to input the initial prediction result into a fully connected layer to normalize the initial prediction result through a sigmoid function to obtain an output result; the adjustment unit is used to input the output result and the second respiratory fluctuation data into a preset loss function to obtain a loss value, and after receiving the loss value, the fully connected layer determines the gradient of the fine-tuning weight based on the loss value, and adjusts the fine-tuning weight according to the gradient. Specifically, the initial prediction result is input into the fully connected layer to normalize the initial prediction result through the sigmoid function to obtain an output result, and the mean square error MSE loss value between the output result and the second respiratory fluctuation data is calculated. The loss value is propagated back to the fully connected layer through the network, and then the gradient of each fine-tuning weight is calculated through the back propagation algorithm, and the fine-tuning weight is updated according to the gradient descent method, so as to achieve the effect of model fine-tuning. This method will determine the corresponding fine-tuning weight according to the user's breathing habits and write it into the respiratory prediction model in real time, so as to better predict respiratory fluctuations. The module schematic diagram for adjusting the fine-tuning weight is shown in FIG. Figure 4 shown.

[0113] It should be noted that when adjusting the fine-tuning weights, the parameters of the pre-training weights will not be affected, wherein the pre-training weights are determined according to the trained breathing prediction model, including encoding weights and decoding weights.

[0114] In this way, by calculating the loss value between the initial prediction result and the second respiratory fluctuation data, the fine-tuning weight is adjusted based on the loss value until the loss value meets the preset conditions, and then the target fine-tuning weight is determined. In this way, by calculating the loss value between the initial prediction result of the respiratory prediction model and the second respiratory fluctuation data, the prediction performance of the respiratory prediction model for the current subject can be evaluated, and the loss value is used as the basis for fine-tuning the weight. By continuously optimizing the fine-tuning weight, the parameters of the respiratory prediction model can be optimized, so that the model can better adapt to different subjects, and the influence of the subjects' breathing habits and the equipment sampling interval on the prediction results can be gradually eliminated, thereby improving the accuracy of the model prediction.

[0115] In some embodiments, until the loss value satisfies a preset condition, the target fine-tuning weight is determined, and when the loss value is less than a preset value, the target fine-tuning weight can be determined.

[0116] In some embodiments, before the fine-tuning weight is adjusted based on the loss value, it also includes: obtaining the fine-tuning weight at the current moment, determining the corresponding weight change based on the preset initial fine-tuning weight and the fine-tuning weight, and controlling the amplitude of the weight change within a preset range. Specifically, the initial fine-tuning weight needs to be set in advance, and then in each iteration step, the fine-tuning weight at the current moment needs to be obtained, and the difference between the fine-tuning weight at the current moment and the initial fine-tuning weight is compared to obtain the weight change. After that, check whether the amplitude of the weight change exceeds the preset range. If it exceeds, the two parameters of the weight change parameter range and the change step size can be modified to ensure that it remains within the preset range. Finally, the adjusted weight change is applied to the current weight to update the fine-tuning weight of the model.

[0117] In some embodiments, the range of parameter changes can be further limited by, but not limited to, pre-stopping, limiting the maximum number of iterations, and other techniques to improve the overall computational efficiency of the model.

[0118] It should be noted that the preset range can be set according to the preset settings and this application does not impose any restrictions.

[0119] In this way, by controlling the amplitude of the weight change within a preset range, it can be ensured that the model can fully learn the characteristics of the second respiratory fluctuation data, thereby improving the stability of the training.

[0120] The prediction module 300 is used to perform prediction based on the target fine-tuning weight to obtain a target prediction result, and decode the target prediction result to obtain a respiratory fluctuation result.

[0121] In some embodiments, after the fine-tuning weight of the subject is determined, the encoded second fluctuation data can be predicted to calculate a target prediction result, and then the target prediction result is decoded using a decoding module to obtain a respiratory fluctuation result.

[0122] It should be noted that the parameter optimization of the present application includes two steps: model training parameter optimization and parameter fine-tuning when using prediction. (1) For parameter optimization of model training, first, forward propagation is performed to pass the input data into the neural network, and the output result is obtained after calculation at each layer. During the forward propagation process, the output of the neuron can be nonlinearly transformed by the activation function. Secondly, the cost function is calculated. According to the output result and the actual target value, the cost function of the neural network (such as mean square error, cross entropy, etc.) is calculated to evaluate the accuracy of the model prediction result. Then, the model is back-propagated according to the cost value, and the partial derivatives of the parameters (weights and biases) of each layer in the neural network are calculated through the back-propagation algorithm to facilitate subsequent optimization and update. In this process, according to the calculated partial derivatives, the optimization algorithm (such as gradient descent, Adam, etc.) is used to continuously update the parameters in the neural network so that the model prediction result is closer to the actual target value to obtain a trained respiratory fluctuation prediction model. (2) For parameter fine-tuning during prediction, the Adapter method can be used for fine-tuning. The adapter layer only fine-tunes the specific task and trains various methods to optimize the parameters of the model. The fine-tunable module includes the residual network and the fully connected layer. Each layer performs multiplication and concatenation operations on the input matrix. It should be noted that parameter fine-tuning during prediction has been detailed above and will not be repeated here.

[0123] The embodiment of the present application can accurately obtain the breathing state of the subject in different time periods by real-time acquisition of the first respiratory fluctuation data at different times, which is helpful for the subsequent analysis of changes in breathing habits; by time encoding the first respiratory fluctuation data, the first respiratory fluctuation data can be converted into a unified time series format, which is convenient for the prediction of the subsequent respiratory prediction model; by calculating the loss value of the initial prediction result of the respiratory prediction model and the second respiratory fluctuation data, the prediction performance of the respiratory prediction model for the current subject can be evaluated, and the loss value can be used as the basis for fine-tuning the weight. By continuously optimizing the fine-tuning weight, the parameters of the respiratory prediction model can be optimized, so that the model can better adapt to different groups of subjects, and the influence of the subject's breathing habits and the device sampling interval on the prediction results can be gradually eliminated, and the accuracy of the model prediction can be improved; by predicting based on the target fine-tuning weight, it can adapt to the breathing habits of the current subject and realize accurate prediction of respiratory fluctuation data. Compared with the prior art, the present application can eliminate the influence of the subject's breathing habits and the device sampling interval on the prediction results, and realize accurate prediction of respiratory fluctuation data.

[0124] The device embodiments described above are merely illustrative, wherein the modules described as separate components may or may not be physically separated, i.e., may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the method of this embodiment.

[0125] The present invention also provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, a method for predicting respiratory fluctuations as described in the first embodiment above is implemented.

[0126] A person skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-monitorable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.

[0127] The specific embodiments described above further illustrate the purpose, technical solutions and beneficial effects of the present application in detail. It should be understood that the above description is only a specific embodiment of the present application and is not intended to limit the scope of protection of the present application.

[0128] It is particularly pointed out that for those skilled in the art, any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of this application should be included in the protection scope of this application.

Claims

1. A method for predicting respiratory fluctuations, characterized in that: include: collecting first respiratory fluctuation data at different times in real time, and time-coding the first respiratory fluctuation data to obtain second respiratory fluctuation data; Obtaining initial prediction results of a preset respiratory prediction model for respiratory training data at different times, and calculating a loss value between the initial prediction result and the second respiratory fluctuation data, adjusting the fine-tuning weight based on the loss value until the loss value meets a preset condition, and then determining a target fine-tuning weight; Prediction is performed based on the target fine-tuning weight to obtain a target prediction result, and the target prediction result is decoded to obtain a respiratory fluctuation result.

2. The method for predicting respiratory fluctuations according to claim 1, characterized in that: The first respiratory fluctuation data includes a sampling frequency, respiratory data and a sampling time, and the first respiratory fluctuation data is time-coded to obtain the second respiratory fluctuation data, specifically: Performing a sine function transformation on the sampling time to obtain a first processing result; Sorting the respiratory data in chronological order to obtain a sorting result, and performing feature extraction on the sorting result to obtain a second processing result; Cascading the first processing result and the second processing result to obtain a third processing result; The third processing result is data-filled based on the sampling frequency to obtain second respiratory fluctuation data.

3. The method for predicting respiratory fluctuations according to claim 1, characterized in that: The initial prediction results of the preset breathing prediction model for the breathing training data at different times are obtained, specifically: Performing time coding on breathing training data at different times to obtain coding data, and sequentially inputting the coding data into a first fully connected layer feedforward network and a first softmax function to obtain sampling coding, wherein the breathing training data includes time sampling data; The sampling code is cascaded with the time sampling data to obtain a cascade result, and the cascade result is sequentially input into a second fully connected layer feedforward network and a second softmax function to obtain an initial prediction result, wherein the initial prediction result includes a respiratory fluctuation result and a time node result.

4. The method for predicting respiratory fluctuations according to claim 1, characterized in that: The calculating of the loss value between the initial prediction result and the second respiratory fluctuation data, and adjusting the fine-tuning weight based on the loss value, is specifically as follows: Inputting the initial prediction result into a fully connected layer to normalize the initial prediction result through a sigmoid function to obtain an output result; The output result and the second respiratory fluctuation data are input into a preset loss function to obtain a loss value. After receiving the loss value, the fully connected layer determines the gradient of the fine-tuning weight based on the loss value, and adjusts the fine-tuning weight according to the gradient.

5. The method for predicting respiratory fluctuations according to claim 4, characterized in that: Before adjusting the fine-tuning weight based on the loss value, the method further includes: The fine-tuning weight at the current moment is obtained, a corresponding weight change is determined based on a preset initial fine-tuning weight and the fine-tuning weight, and the magnitude of the weight change is controlled within a preset range.

6. A respiratory fluctuation prediction system, characterized in that: include: Acquisition module, adjustment module and prediction module; The acquisition module is used to acquire first respiratory fluctuation data at different times in real time, and time-code the first respiratory fluctuation data to obtain second respiratory fluctuation data; The adjustment module is used to obtain the initial prediction results of the preset breathing prediction model for the breathing training data at different times, and calculate the loss value between the initial prediction result and the second breathing fluctuation data, and adjust the fine-tuning weight based on the loss value until the loss value meets the preset condition, and then determine the target fine-tuning weight; The prediction module is used to make predictions based on the target fine-tuning weights to obtain target prediction results, and decode the target prediction results to obtain respiratory fluctuation results.

7. The respiratory fluctuation prediction system according to claim 6, characterized in that: The acquisition module includes: a first processing unit, a second processing unit, a third processing unit and a fourth processing unit, wherein the first respiratory fluctuation data includes a sampling frequency, respiratory data and a sampling time; The first processing unit is used to perform a sine function transformation on the sampling time to obtain a first processing result; The second processing unit is used to sort the respiratory data in chronological order to obtain a sorting result, and perform feature extraction on the sorting result to obtain a second processing result; The third processing unit is used to cascade the first processing result and the second processing result to obtain a third processing result; The fourth processing unit is used to perform data filling on the third processing result based on the sampling frequency to obtain second respiratory fluctuation data.

8. The respiratory fluctuation prediction system according to claim 6, characterized in that: The adjustment module includes: a coding unit and a prediction unit; The encoding unit is used to perform time encoding on the breathing training data at different times to obtain encoded data, and sequentially input the encoded data into the first fully connected layer feedforward network and the first softmax function to obtain sampling codes, wherein the breathing training data includes time sampling data; The prediction unit is used to cascade the sampling code with the time sampling data to obtain a cascade result, and input the cascade result into the second fully connected layer feedforward network and the second softmax function in sequence to obtain an initial prediction result, wherein the initial prediction result includes a respiratory fluctuation result and a time node result.

9. The respiratory fluctuation prediction system according to claim 6, characterized in that: The adjustment module further includes: a fifth processing unit and an adjustment unit; The fifth processing unit is used to input the initial prediction result into a fully connected layer to normalize the initial prediction result through a sigmoid function to obtain an output result; The adjustment unit is used to input the output result and the second respiratory fluctuation data into a preset loss function to obtain a loss value. After receiving the loss value, the fully connected layer determines the gradient of the fine-tuning weight based on the loss value and adjusts the fine-tuning weight according to the gradient.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for predicting respiratory fluctuations according to any one of claims 1 to 5 is implemented.

Citation Information

Cited By

  • Respiration-related displacement prediction method based on attention embedded expansion convolution

    CN122074970A