A method, device and computer device for predicting respiratory signals
By constructing a preset respiratory signal sample library and determining the optimal complete prediction model, matching the target model based on the similarity of the respiratory signal to be predicted, high accuracy prediction of the respiratory signal is achieved, and the problem of low accuracy of prediction results in the prior art is solved.
Patent Information
- Application Number
- CN202411259980.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-10
- Publication Date
- 2025-06-24
- Estimated Expiration
- 2044-09-10
AI Technical Summary
In the prior art, in the prediction of respiratory signal, the accuracy of the prediction results is low and there is a lack of effective solutions.
By constructing a preset respiratory signal sample library and determining the optimal complete prediction model for each respiratory signal sample, the respiratory signal prediction model is performed based on the similarity between the respiratory signal to be predicted and the target prediction model in the sample library.
The accuracy of respiratory signal prediction is improved, and the problem of low accuracy of prediction results in the prior art is solved.
Smart Images

Figure CN118797365B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of signal prediction, and particularly to a method, device and computer equipment for predicting respiratory signals. Background Art
[0002] During radiotherapy, the tumors in the chest and abdomen will change with respiratory movement. If the treatment is intervened according to the real-time measured position of the target area, there will be a time delay of hundreds of milliseconds, resulting in the target area being missed and affecting the treatment effect. In addition, after obtaining the position of the tumor target area, the treatment system needs a certain time to respond. Therefore, it is necessary to predict the position of the target area after the time delay by predicting respiratory movement, and adjust the position of the target area in advance to improve the accuracy of radiotherapy. And the respiratory signal is a direct feedback signal of respiratory movement. Therefore, accurate prediction of respiratory signals is very important.
[0003] In the prior art, mainly a certain preset respiratory signal prediction model is used to predict the respiratory signal to be predicted. However, when using a certain respiratory signal prediction model to predict the respiratory signal, the prediction effect of the respiratory signal depends heavily on the experience of the model builder. If the preset respiratory signal prediction model is not applicable to predict the respiratory signal to be predicted, there will be a situation where the accuracy of the prediction result of the respiratory signal is low.
[0004] In view of the problem of low accuracy of the prediction result of the respiratory signal in the prior art, no effective solution has been proposed yet. Summary of the Invention
[0005] Based on this, it is necessary to provide a method, device and computer equipment for predicting respiratory signals in view of the above technical problems.
[0006] In a first aspect, the present application provides a method for predicting respiratory signals. The method includes the following steps:
[0007] Obtain the respiratory signal to be predicted;
[0008] According to the similarity between the respiratory signal to be predicted and each respiratory signal sample in the preset respiratory signal sample library, use the optimal complete prediction model corresponding to the respiratory signal sample with the highest similarity to the respiratory signal to be predicted as the target prediction model matched by the respiratory signal to be predicted; the optimal complete prediction model corresponding to the respiratory signal sample is the complete prediction model corresponding to the optimal prediction result obtained by using multiple complete prediction models corresponding to the respiratory signal sample to predict the respiratory signal sample respectively;
[0009] Use the target prediction model to perform respiratory prediction on the respiratory signal to be predicted.
[0010] In one embodiment, the method further includes the following steps:
[0011] Obtain a plurality of respiratory signal samples, and construct the respiratory signal sample library based on the obtained plurality of respiratory signal samples;
[0012] Use a plurality of complete prediction models corresponding to each of the respiratory signal samples in the respiratory signal sample library to respectively predict each of the respiratory signal samples in the respiratory signal sample library, and obtain a plurality of prediction results for each of the respiratory signal samples;
[0013] Select the complete prediction model corresponding to the optimal prediction result among the plurality of prediction results of each of the respiratory signal samples as the optimal complete prediction model corresponding to each of the respiratory signal samples.
[0014] In one embodiment, before using a plurality of complete prediction models corresponding to each of the respiratory signal samples in the respiratory signal sample library to respectively predict each of the respiratory signal samples in the respiratory signal sample library and obtain a plurality of prediction results for each of the respiratory signal samples, the following steps are included:
[0015] For each of the respiratory signal samples in the respiratory signal sample library, train each of the preset multiple initial prediction models respectively to obtain a plurality of the complete prediction models corresponding to each of the respiratory signal samples in the respiratory signal sample library.
[0016] In one embodiment, the step of training each of the preset multiple initial prediction models respectively for each of the respiratory signal samples in the respiratory signal sample library to obtain a plurality of the complete prediction models corresponding to each of the respiratory signal samples in the respiratory signal sample library includes the following steps:
[0017] For each of the respiratory signal samples in the respiratory signal sample library, perform hyperparameter optimization on each of the preset multiple initial prediction models respectively to obtain hyperparameter optimization results of the multiple initial prediction models corresponding to each of the respiratory signal samples;
[0018] Based on the hyperparameter optimization results of the multiple initial prediction models corresponding to each of the respiratory signal samples, train the multiple initial prediction models corresponding to each of the respiratory signal samples respectively to obtain a plurality of the complete prediction models corresponding to each of the respiratory signal samples in the respiratory signal sample library.
[0019] In one embodiment, for each of the respiratory signal samples in the respiratory signal sample library, hyperparameter optimization is respectively performed on each of the preset multiple initial prediction models to obtain the hyperparameter optimization results of the multiple initial prediction models corresponding to each respiratory signal sample, including the following steps:
[0020] For each of the respiratory signal samples in the respiratory signal sample library, the MOPSO method is used to respectively perform hyperparameter optimization on each of the preset multiple initial prediction models to obtain the hyperparameter optimization results of the multiple initial prediction models corresponding to each respiratory signal sample.
[0021] In one embodiment, according to the similarity between the respiratory signal to be predicted and each respiratory signal sample in the preset respiratory signal sample library, the optimal complete prediction model corresponding to the respiratory signal sample with the highest similarity to the respiratory signal to be predicted is used as the target prediction model matched by the respiratory signal to be predicted, including the following steps:
[0022] Calculate the similarity between the respiratory signal to be predicted and each respiratory signal sample in the preset respiratory signal sample library to obtain the respective similarity results between the respiratory signal to be predicted and each respiratory signal sample in the preset respiratory signal sample library;
[0023] Based on the respective similarity results between the respiratory signal to be predicted and each respiratory signal sample in the preset respiratory signal sample library, determine the respiratory signal sample in the respiratory signal sample library with the highest similarity to the respiratory signal to be predicted;
[0024] Determine the optimal complete prediction model corresponding to the respiratory signal sample in the respiratory signal sample library with the highest similarity to the respiratory signal to be predicted as the target prediction model matched by the respiratory signal to be predicted.
[0025] In one embodiment, using the target prediction model to perform respiratory prediction on the respiratory signal to be predicted includes the following steps:
[0026] Use the respiratory signal to be predicted to train the target prediction model to obtain a complete target prediction model;
[0027] Use the complete target prediction model to predict the respiratory signal to be predicted.
[0028] In one embodiment, after using the target prediction model to perform respiratory prediction on the respiratory signal to be predicted, it includes the following steps:
[0029] Obtain a real-time respiratory signal homologous to the respiratory signal to be predicted;
[0030] Use the target prediction model to predict the obtained real-time respiratory signal to obtain a real-time prediction result;
[0031] When the real-time prediction result is less than the preset prediction result threshold, use the optimal complete prediction model corresponding to the respiratory signal sample with the second highest similarity to the respiratory signal to be predicted in the respiratory signal sample library as the new target prediction model, and repeat the process of obtaining the real-time prediction result until the real-time prediction result is greater than or equal to the preset prediction result threshold, or until the number of times of obtaining the real-time prediction result meets the preset number threshold.
[0032] In a second aspect, the present application also provides a respiratory signal prediction device. The device includes:
[0033] A signal acquisition module for acquiring a respiratory signal to be predicted;
[0034] A model determination module for, according to the similarity between the respiratory signal to be predicted and each respiratory signal sample in a preset respiratory signal sample library, using the optimal complete prediction model corresponding to the respiratory signal sample with the highest similarity to the respiratory signal to be predicted as the target prediction model matched to the respiratory signal to be predicted; the optimal complete prediction model corresponding to the respiratory signal sample is the complete prediction model corresponding when using multiple complete prediction models corresponding to the respiratory signal sample to predict the respiratory signal sample respectively to obtain the optimal prediction result;
[0035] And a prediction module for using the target prediction model to perform respiratory prediction on the respiratory signal to be predicted.
[0036] In a third aspect, the present application also provides a computer device. The computer device includes a memory and a processor, the memory stores a computer program, and when the processor executes the computer program, it implements the respiratory signal prediction method described in the first aspect above.
[0037] The above-mentioned respiratory signal prediction method, device and computer equipment preset a preset respiratory signal sample library in advance and determine the optimal complete prediction model for each respiratory signal sample in the preset respiratory signal sample library in advance. Therefore, when obtaining the respiratory signal to be predicted, the similarity between each respiratory signal sample in the preset respiratory signal sample library and the respiratory signal to be predicted can be directly calculated, and the optimal complete prediction model corresponding to the respiratory signal sample with the highest similarity to the respiratory signal to be predicted is used as the target prediction model matched by the respiratory signal to be predicted. Since the target prediction model is the optimal complete prediction model for the respiratory signal sample with the highest similarity to the respiratory signal to be predicted, the target prediction model can accurately predict the respiratory signal to be predicted, solving the problem of low accuracy of the prediction result of the respiratory signal in the prior art.
[0038] Details of one or more embodiments of the present application are set forth in the following drawings and description to make other features, objects, and advantages of the present application more concise and understandable. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments and descriptions thereof of the present application are used to explain the present application and do not constitute an improper limitation of the present application. In the drawings:
[0040] Figure 1 It is a hardware structure block diagram of a terminal for the respiratory signal prediction method provided by an embodiment of the present application;
[0041] Figure 2 It is a flowchart of the respiratory signal prediction method provided by an embodiment of the present application;
[0042] Figure 3 It is a flowchart of the respiratory signal prediction method provided by a preferred embodiment of the present application;
[0043] Figure 4 It is a structure block diagram of the respiratory signal prediction device provided by an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0044] To more clearly understand the purpose, technical solution and advantages of the present application, the present application will be described and explained below with reference to the drawings and embodiments.
[0045] Unless otherwise defined, technical or scientific terms used in this application shall have the ordinary meanings understood by those of ordinary skill in the technical field to which this application belongs. In this application, words such as "a", "an", "one kind", "the", "these", etc. do not indicate a limitation in quantity and can be singular or plural. The terms "including", "comprising", "having" and any variations thereof used in this application are intended to cover non-exclusive inclusion; for example, a process, method, system, product or device that includes a series of steps or modules (units) is not limited to the listed steps or modules (units), but may include unlisted steps or modules (units), or may include other steps or modules (units) inherent in these processes, methods, products or devices. The terms "connected", "coupled", etc. used in this application do not limit to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The term "plurality" used in this application means two or more. "And / or" describes the association relationship of associated objects and indicates that three relationships may exist. For example, "A and / or B" may represent: A exists alone, A and B exist simultaneously, and B exists alone. Usually, the character " / " indicates that the objects associated before and after are in an "or" relationship. The terms "first", "second", "third", etc. used in this application only distinguish similar objects and do not represent a specific order for the objects.
[0046] The method embodiment provided in this embodiment can be executed on a terminal, a computer or a similar computing device. For example, it runs on radiotherapy equipment. Figure 1 It is a hardware structure block diagram of the terminal of the respiratory signal prediction method in this embodiment. As Figure 1 shown, the terminal may include one or more ( Figure 1 only one is shown in the figure) processors 102 and a memory 104 for storing data. Among them, the processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA. The above terminal may also include a transmission device 106 for communication functions and an input / output device 108. Those of ordinary skill in the art can understand that Figure 1 the structure shown is only schematic and does not limit the structure of the above terminal. For example, the terminal may also include more or fewer components than Figure 1 shown in the figure, or have a different configuration from Figure 1 shown.
[0047] The memory 104 can be used to store computer programs, such as software programs and modules of application software, such as the computer program corresponding to the respiratory signal prediction method in this embodiment. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, implements the above method. The memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memories. In some instances, the memory 104 may further include a memory remotely disposed relative to the processor 102, and these remote memories can be connected to the terminal through a network. Examples of the above network include but are not limited to the Internet, intranet, local area network, mobile communication network, and combinations thereof.
[0048] The transmission device 106 is used to receive or send data via a network. The above network includes a wireless network provided by a communication provider of the terminal. In one instance, the transmission device 106 includes a network adapter (abbreviated as NIC), which can be connected to other network devices through a base station and thus can communicate with the Internet. In one instance, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0049] In this embodiment, a respiratory signal prediction method is provided. Figure 2 is a flowchart of the respiratory signal prediction method of this embodiment, as Figure 2 shown, and this process includes the following steps:
[0050] Step S210, obtain the respiratory signal to be predicted.
[0051] The above respiratory signal to be predicted can be a respiratory signal that needs to be predicted or analyzed through an algorithm or model. The specific way to obtain the respiratory signal to be predicted can be to obtain the respiratory signal to be predicted through one or more of a respiratory flowmeter, a thoracic impedance sensor, an abdominal band sensor, an RPM (Remote Patient Monitoring) system, etc.
[0052] Step S220: According to the similarity between the respiratory signal to be predicted and each respiratory signal sample in the preset respiratory signal sample library, the optimal complete prediction model corresponding to the respiratory signal sample with the highest similarity to the respiratory signal to be predicted is used as the target prediction model matched by the respiratory signal to be predicted; the optimal complete prediction model corresponding to the respiratory signal sample is the complete prediction model corresponding to the time when the optimal prediction result is obtained by using multiple complete prediction models corresponding to the respiratory signal sample to predict the respiratory signal sample respectively.
[0053] In this step, the above-mentioned preset respiratory signal sample library is a sample library determined by respiratory signal samples of multiple users collected in advance. It should be noted that to ensure that the respiratory signal to be predicted can obtain a matching sample with a similarity meeting the conditions in the preset respiratory signal sample library, it is necessary to ensure that the number of respiratory signal samples in the preset respiratory signal sample library is large enough. The similarity between the respiratory signal to be predicted and each respiratory signal sample in the preset respiratory signal sample library can be characterized by calculating the similarity between the respiratory signal to be predicted with a preset time length and each respiratory signal sample in the preset respiratory signal sample library. The multiple complete prediction models corresponding to the respiratory signal sample can be obtained by training each initial prediction model in a preset variety of initial prediction models respectively according to the respiratory signal sample.
[0054] Step S230: Use the target prediction model to perform respiratory prediction on the respiratory signal to be predicted.
[0055] In the above steps S210 to S230, by presetting the preset respiratory signal sample library in advance and determining the optimal complete prediction model of each respiratory signal sample in the preset respiratory signal sample library in advance, therefore, when the respiratory signal to be predicted is obtained, the similarity between each respiratory signal sample in the preset respiratory signal sample library and the respiratory signal to be predicted can be directly calculated, and the optimal complete prediction model corresponding to the respiratory signal sample with the highest similarity to the respiratory signal to be predicted is used as the target prediction model matched by the respiratory signal to be predicted. Since the target prediction model is the optimal complete prediction model for the respiratory signal sample with the highest similarity to the respiratory signal to be predicted, the target prediction model can accurately predict the respiratory signal to be predicted, solving the problem of low accuracy of the prediction result of the respiratory signal in the prior art.
[0056] Among them, in one embodiment, the above-mentioned respiratory signal prediction method further includes the following steps:
[0057] Step S240: Obtain a plurality of respiratory signal samples, and construct a respiratory signal sample library based on the obtained plurality of respiratory signal samples.
[0058] To ensure that the constructed respiratory signal sample library has good generalization ability, that is, it represents respiratory signals in different situations, it is necessary to ensure the diversity of the respiratory signals in the respiratory signal sample library. Based on this, to obtain diverse respiratory signal samples, it is necessary to ensure diversity in sources, states, environments, and methods during the process of obtaining respiratory signal samples. The above-mentioned source diversity can be to ensure that the obtained respiratory signal samples contain data of different populations with different ages, genders, races, health conditions, regions, etc., so as to cover as many individual differences as possible. The above-mentioned state diversity can be to ensure that the obtained respiratory signal samples contain various respiratory states such as normal breathing, abnormal breathing (such as breathing caused by asthma, chronic obstructive pulmonary disease, etc.), post-exercise breathing, and post-diet breathing. The above-mentioned environmental diversity can be to ensure that the obtained respiratory signal samples contain respiratory data under different environmental conditions, such as respiratory data in a quiet environment, a noisy environment, an outdoor environment, etc. The above-mentioned method diversity can be to ensure that the sources of the obtained respiratory signal samples include multiple respiratory signal acquisition methods. For example, the sources of the obtained respiratory signal samples include respiratory data collected by various methods such as a respiratory flowmeter, a thoracic impedance sensor, an abdominal belt sensor, or an RPM system.
[0059] Preferably, when the number of acquired respiratory signal samples is too large, it may lead to an excessive number of respiratory signal samples in the constructed preset respiratory signal sample library. At this time, a large amount of computing resources will be consumed in the process of calculating the similarity between the respiratory signal to be predicted and each respiratory signal sample in the preset respiratory signal sample library. Based on this, the acquired respiratory signal samples can be clustered to remove excessive redundant samples in the acquired respiratory signal samples. Specifically, it can be to first calculate the similarity between each respiratory signal sample in the acquired respiratory signal samples and other respiratory signal samples except itself in the acquired respiratory signal samples to obtain a similarity result. Based on the similarity result, the respiratory signal samples that meet the preset similarity threshold condition are clustered into the same cluster. Furthermore, any one of the respiratory signal samples in each cluster is retained, and the other respiratory signal samples are deleted to achieve redundancy removal of the acquired respiratory signal samples and obtain a respiratory signal sample library. It should be noted that the above-mentioned preset similarity threshold condition can be specifically set according to specific requirements. In order to ensure the distinctiveness between the respiratory signal samples in the respiratory signal sample library, the preset similarity threshold condition can be set to a relatively small value, such as 80%. In order to ensure the diversity of the samples in the respiratory signal sample library, the preset similarity condition can be set to a relatively large value, such as 99%. For example, if the preset similarity threshold condition is 95%, it can be to cluster the respiratory signal samples with a similarity greater than or equal to 95% in the acquired respiratory signal samples into one cluster.
[0060] Preferably, in order to facilitate subsequent training of the respiratory signal model, multiple acquired respiratory signal samples can be converted to the same coordinate system, and the multiple acquired respiratory signal samples can be normalized so that all data of the multiple acquired respiratory signal samples are normalized to the range of [-1, 1], obtaining multiple normalized respiratory signal samples. Furthermore, a preset filtering algorithm can be used to perform smoothing filtering on the multiple normalized respiratory signal samples, obtaining multiple smoothed respiratory signal samples. The above-mentioned preset filtering algorithm can be one of SG (Savitzky Golay, smoothing filtering based on polynomial regression) filtering, MAF (Moving Average Filter) filtering, low-pass filter, etc. It should be noted that the above-mentioned preset filtering algorithm is not specifically limited in this embodiment, as long as it can perform smoothing filtering on the multiple normalized respiratory signal samples through the preset filtering algorithm to obtain multiple smoothed respiratory signal samples. Additionally, it should be noted that in order to ensure the accuracy of the prediction results for the subsequent respiratory signal to be predicted, after the respiratory signal to be predicted is acquired, it only needs to be converted to the coordinate system where the respiratory signal samples in the respiratory signal sample library are located and normalized, without performing smoothing filtering on the respiratory signal to be predicted.
[0061] By acquiring multiple respiratory signal samples as described above, a respiratory signal sample library with generalization is constructed, which facilitates subsequent selection of respiratory signal samples in the preset respiratory signal sample library whose similarity to the respiratory signal to be predicted meets the preset conditions.
[0062] Step S250: Use multiple complete prediction models corresponding to each respiratory signal sample in the respiratory signal sample library to respectively predict each respiratory signal sample in the respiratory signal sample library, obtaining multiple prediction results for each respiratory signal sample.
[0063] In this step, the above-mentioned prediction result can be one of the prediction accuracy rate or prediction error of the respiratory signal, etc.
[0064] The above process of using multiple complete prediction models corresponding to each respiratory signal sample in the respiratory signal sample library to respectively predict each respiratory signal sample in the respiratory signal sample library and obtaining multiple prediction results for each respiratory signal sample can be to pre-train multiple complete prediction models corresponding to each respiratory signal sample in the respiratory signal sample library. Furthermore, use the trained multiple complete prediction models corresponding to each respiratory signal sample in the respiratory signal sample library to respectively predict each respiratory signal sample in the respiratory signal sample library to obtain multiple prediction results for each respiratory signal sample.
[0065] The following is an example to illustrate this process:
[0066] For example, there are three respiratory signal samples, namely respiratory signal sample A, respiratory signal sample B, and respiratory signal sample C, in the preset respiratory signal sample library, and there are two respiratory signal models, namely respiratory signal model D and respiratory signal model E.
[0067] Among them, respiratory signal sample A corresponds to the first complete respiratory signal model D and the first complete respiratory signal model E, respiratory signal sample B corresponds to the second complete respiratory signal model D and the second complete respiratory signal model E, and respiratory signal sample C corresponds to the third complete respiratory signal model D and the third complete respiratory signal model E. The first complete respiratory signal model D and the first complete respiratory signal model E are respectively used to predict respiratory signal sample A, the second complete respiratory signal model D and the second complete respiratory signal model E are used to predict respiratory signal sample B, and the third complete respiratory signal model D and the third complete respiratory signal model E are used to predict respiratory signal sample C, so as to obtain the first prediction result and the second prediction result of respiratory signal sample A, the first prediction result and the second prediction result of respiratory signal sample B, and the first prediction result and the second prediction result of respiratory signal sample C.
[0068] Among them, the first prediction result of the above-mentioned respiratory signal sample A is the prediction result obtained by predicting the respiratory signal sample A using the first complete respiratory signal model D. The second prediction result of the above-mentioned respiratory signal sample A is the prediction result obtained by predicting the respiratory signal sample A using the first complete respiratory signal model E. The first prediction result of the above-mentioned respiratory signal sample B is the prediction result obtained by predicting the respiratory signal sample B using the second complete respiratory signal model D. The second prediction result of the above-mentioned respiratory signal sample B is the prediction result obtained by predicting the respiratory signal sample B using the second complete respiratory signal model E. The first prediction result of the above-mentioned respiratory signal sample C is the prediction result obtained by predicting the respiratory signal sample C using the third complete respiratory signal model D. The second prediction result of the above-mentioned respiratory signal sample C is the prediction result obtained by predicting the respiratory signal sample C using the third complete respiratory signal model E. The above-mentioned first complete respiratory signal model D is a complete respiratory signal model that meets the preset requirements obtained by training the respiratory signal model D according to the respiratory signal sample A. The above-mentioned first complete respiratory signal model E is a complete respiratory signal model that meets the preset requirements obtained by training the respiratory signal model E according to the respiratory signal sample A. The above-mentioned second complete respiratory signal model D is a complete respiratory signal model that meets the preset requirements obtained by training the respiratory signal model D according to the respiratory signal sample B. The above-mentioned second complete respiratory signal model E is a complete respiratory signal model that meets the preset requirements obtained by training the respiratory signal model E according to the respiratory signal sample B. The above-mentioned third complete respiratory signal model D is a complete respiratory signal model that meets the preset requirements obtained by training the respiratory signal model D according to the respiratory signal sample C. The above-mentioned third complete respiratory signal model E is a complete respiratory signal model that meets the preset requirements obtained by training the respiratory signal model E according to the respiratory signal sample C. The above-mentioned preset requirements can be specifically set according to the specific model and sample.
[0069] Step S260: Select the complete prediction model corresponding to the optimal prediction result among the multiple prediction results of each respiratory signal sample as the optimal complete prediction model corresponding to each respiratory signal sample.
[0070] The optimal prediction result among the above-mentioned multiple prediction results can be the prediction result with the highest accuracy rate among the multiple prediction results, or the prediction result with the smallest error among the multiple prediction results.
[0071] For example, the respiratory signal sample A corresponds to the first complete respiratory signal model D and the first complete respiratory signal model E. Using the first complete respiratory signal model D and the first complete respiratory signal model E to predict the respiratory signal sample A, the first prediction result of the respiratory signal sample A (prediction accuracy rate is 99%) and the second prediction result of the respiratory signal sample A (prediction accuracy rate is 80%) are obtained. Then, the first prediction result of the respiratory signal sample A is the optimal prediction result of the respiratory signal sample A, and the first complete respiratory signal model D is the optimal complete prediction model of the respiratory signal sample A.
[0072] In the above steps S240 to S260, by obtaining a plurality of respiratory signal samples, and based on the obtained plurality of respiratory signal samples, a respiratory signal sample library is constructed. Then, using a plurality of complete prediction models corresponding to each respiratory signal sample in the respiratory signal sample library, each respiratory signal sample in the respiratory signal sample library is predicted respectively, and a plurality of prediction results of each respiratory signal sample are obtained. The complete prediction model corresponding to the optimal prediction result among the plurality of prediction results of each respiratory signal sample is selected as the optimal complete prediction model corresponding to each respiratory signal sample. Through the determination of the optimal complete prediction model corresponding to each respiratory signal sample, it is convenient to, after determining the respiratory signal sample with the highest similarity between the preset respiratory signal sample library and the respiratory signal to be predicted, use the optimal complete prediction model corresponding to the respiratory signal sample with the highest similarity between the preset respiratory signal sample library and the respiratory signal to be predicted as the target prediction model matched by the respiratory signal to be predicted, be able to quickly determine the target prediction model matched by the respiratory signal to be predicted, and be able to ensure the prediction accuracy rate when using the target prediction model to predict the respiratory signal to be predicted.
[0073] Specifically, in one embodiment, before step S250, the following steps are included:
[0074] Step S252, for each respiratory signal sample in the respiratory signal sample library, each initial prediction model in a preset variety of initial prediction models is trained respectively, and a plurality of complete prediction models corresponding to each respiratory signal sample in the respiratory signal sample library are obtained.
[0075] To ensure that among the multiple initial prediction models preset, each initial prediction model is trained to obtain multiple complete prediction models corresponding to each respiratory signal sample in the respiratory signal sample library, and there is a complete prediction model that can meet the preset prediction accuracy requirement, it is necessary to ensure that the initial prediction models among the preset multiple initial prediction models can cover all models that can be used for respiratory signal prediction. Based on this, the preset multiple initial prediction models adopted in this embodiment can cover all the relatively mainstream regression prediction models and other models related to respiratory signal prediction involved in the related technologies. Among them, the mainstream regression prediction models specifically include: 6 regression models (multivariate adaptive regression splines, linear regression, logistic regression, least squares regression, local scatterplot smoothing estimation, and stepwise regression), regression and classification tree models, 4 regularization models (least absolute shrinkage and selection operator, elastic net, least angle regression, and ridge regression), 3 Kalman filter models (Kalman filter, extended Kalman filter, and unscented Kalman filter), 5 ensemble methods (adaptive boosting, random forest, bagging algorithm, gradient boosting tree, and extreme gradient boosting), support vector regression model, 17 neural network (deep learning) models (multi-layer perceptron network, deep Boltzmann machine, deep belief network, convolutional neural network, stacked autoencoder, long short-term memory network, generalized regression neural network, radial basis function network, Hopfield network, grey neural network, probabilistic neural network, fuzzy neural network, learning vector quantization network, Elman recurrent network, self-organizing neural network, recurrent neural network, and temporal convolutional network), autoregressive integrated moving average model, and 5 Bayesian models (naive Bayes, Gaussian naive Bayes, multinomial naive Bayes, Bayesian belief network, and Bayesian network), a total of 44 models. In addition, other models related to respiratory signal prediction involved in the related technologies include models such as extended Kalman filter and recurrent neural network, particle algorithm and neural network, genetic algorithm and neural network, and adaptive boosting and multi-layer perceptron.
[0076] The process of training each initial prediction model among the preset multiple initial prediction models respectively for each respiratory signal sample in the respiratory signal sample library to obtain multiple complete prediction models corresponding to each respiratory signal sample in the respiratory signal sample library can be illustrated by examples:
[0077] For example, there are three respiratory signal samples, namely respiratory signal sample A, respiratory signal sample B, and respiratory signal sample C, in the preset respiratory signal sample library, and there are two respiratory signal models, namely respiratory signal model D and respiratory signal model E, in the preset respiratory signal prediction model. First, according to respiratory signal sample A, respiratory signal model D and respiratory signal model E are respectively trained to obtain the first complete respiratory signal model D and the first complete respiratory signal model E corresponding to respiratory signal sample A. According to respiratory signal sample B, respiratory signal model D and respiratory signal model E are respectively trained to obtain the second complete respiratory signal model D and the second complete respiratory signal model E corresponding to respiratory signal sample B. According to respiratory signal sample C, respiratory signal model D and respiratory signal model E are respectively trained to obtain the third complete respiratory signal model D and the third complete respiratory signal model E corresponding to respiratory signal sample C.
[0078] In this step, for each respiratory signal sample in the respiratory signal sample library, each initial prediction model in a variety of preset initial prediction models is respectively trained to obtain a plurality of complete prediction models corresponding to each respiratory signal sample in the respiratory signal sample library. By obtaining a plurality of complete prediction models corresponding to each respiratory signal sample in the respiratory signal sample library, it is convenient to subsequently use the plurality of complete prediction models corresponding to each respiratory signal sample in the respiratory signal sample library to respectively predict each respiratory signal sample in the respiratory signal sample library to obtain multiple prediction results for each respiratory signal sample, so as to select the complete prediction model corresponding to the optimal prediction result among the multiple prediction results of each respiratory signal sample as the optimal complete prediction model corresponding to each respiratory signal sample.
[0079] In addition, in one embodiment, based on step S252, for each respiratory signal sample in the respiratory signal sample library, each initial prediction model in a variety of preset initial prediction models is respectively trained to obtain a plurality of complete prediction models corresponding to each respiratory signal sample in the respiratory signal sample library, including the following steps:
[0080] Step S2522: For each respiratory signal sample in the respiratory signal sample library, hyperparameter optimization is respectively performed on each initial prediction model in a variety of preset initial prediction models to obtain the hyperparameter optimization results of the multiple initial prediction models corresponding to each respiratory signal sample.
[0081] For each respiratory signal sample in the respiratory signal sample library, hyperparameter optimization is performed on each initial prediction model among a plurality of preset initial prediction models. It can be that for each respiratory signal sample in the respiratory signal sample library, using a preset hyperparameter optimization method, hyperparameter optimization is performed on each initial prediction model among a plurality of preset initial prediction models. The above-mentioned preset hyperparameter optimization method can include one or more of methods such as network search method, random search method, Bayesian optimization method, genetic algorithm, evolutionary strategy, etc.
[0082] Step S2524: Based on the hyperparameter optimization results of the multiple initial prediction models corresponding to each respiratory signal sample, train the multiple initial prediction models corresponding to each respiratory signal sample respectively to obtain multiple complete prediction models corresponding to each respiratory signal sample in the respiratory signal sample library.
[0083] Among them, based on the hyperparameter optimization results of the multiple initial prediction models corresponding to each respiratory signal sample, training the multiple initial prediction models corresponding to each respiratory signal sample respectively to obtain multiple complete prediction models corresponding to each respiratory signal sample in the respiratory signal sample library can be to first determine the hyperparameter optimization results of each initial prediction model corresponding to each respiratory signal sample, initialize each initial prediction model corresponding to each respiratory signal sample, and set the best hyperparameters obtained after optimization for each initial prediction model corresponding to each respiratory signal sample. Furthermore, use the respiratory signal sample to train the initial prediction model after setting the best hyperparameters to obtain each complete prediction model corresponding to the respiratory signal sample.
[0084] In the above steps S2522 to S2524, by performing hyperparameter optimization on each initial prediction model among a plurality of preset initial prediction models for each respiratory signal sample in the respiratory signal sample library, and then based on the hyperparameter optimization results of the multiple initial prediction models corresponding to each respiratory signal sample, training the multiple initial prediction models corresponding to each respiratory signal sample respectively to obtain multiple complete prediction models corresponding to each respiratory signal sample in the respiratory signal sample library. By obtaining multiple complete prediction models corresponding to each respiratory signal sample in the respiratory signal sample library, it is convenient to subsequently use the multiple complete prediction models corresponding to each respiratory signal sample in the respiratory signal sample library to predict each respiratory signal sample in the respiratory signal sample library respectively to obtain multiple prediction results for each respiratory signal sample, so as to select the complete prediction model corresponding to the optimal prediction result among the multiple prediction results of each respiratory signal sample as the optimal complete prediction model corresponding to each respiratory signal sample.
[0085] In one embodiment, in step S2522, for each respiratory signal sample in the respiratory signal sample library, hyperparameter optimization is respectively performed on each of the preset multiple initial prediction models to obtain the hyperparameter optimization results of the multiple initial prediction models corresponding to each respiratory signal sample, including the following steps:
[0086] Step S25222: For each respiratory signal sample in the respiratory signal sample library, use the MOPSO (Multi-Objective Particle Swarm Optimization) method to respectively perform hyperparameter optimization on each of the preset multiple initial prediction models to obtain the hyperparameter optimization results of the multiple initial prediction models corresponding to each respiratory signal sample.
[0087] In this step, the above-mentioned MOPSO method is a metaheuristic evolutionary algorithm with fast global search ability. The main advantages of using the MOPSO method to respectively perform hyperparameter optimization on each of the preset multiple initial prediction models are as follows: First, the MOPSO method can optimize multiple objective functions simultaneously, so the MOPSO method can balance multiple conflicting objectives, such as accuracy, model complexity, training time, etc. Second, when using the MOPSO method to perform hyperparameter optimization on each of the preset multiple initial prediction models, a set of non-dominated solutions, that is, Pareto optimal solutions, can be found, providing an optimal solution in a certain situation for the hyperparameter optimization results of the initial prediction models. Third, when using the MOPSO method to perform hyperparameter optimization on each of the preset multiple initial prediction models, it tends to perform global search, can effectively avoid falling into local optima, and the MOPSO method can explore the solution space through the collaborative effect of the particle swarm, and can better cover different regions of the solution space. Fourth, the MOPSO algorithm is very suitable for parallel processing. Therefore, using the MOPSO method to perform hyperparameter optimization on each of the preset multiple initial prediction models can reduce the optimization time through parallel processing. Fifth, the parameters of the MOPSO method (such as the number of particles, inertia weight, etc.) can be flexibly set and adjusted according to the actual problem and are easy to implement. Based on this, using the MOPSO method to respectively perform hyperparameter optimization on each of the preset multiple initial prediction models can not only quickly and efficiently obtain the hyperparameter optimization results of the multiple initial prediction models corresponding to each respiratory signal sample, but also be simple and easy to implement.
[0088] In addition, in one embodiment, based on step S220, according to the similarity between the respiratory signal to be predicted and each respiratory signal sample in the preset respiratory signal sample library, the optimal complete prediction model corresponding to the respiratory signal sample with the highest similarity to the respiratory signal to be predicted is used as the target prediction model matched by the respiratory signal to be predicted, including the following steps:
[0089] Step S222, calculate the similarity between the respiratory signal to be predicted and each respiratory signal sample in the preset respiratory signal sample library, and obtain each similarity result between the respiratory signal to be predicted and each respiratory signal sample in the preset respiratory signal sample library.
[0090] In this step, calculating the similarity between the respiratory signal to be predicted and each respiratory signal sample in the preset respiratory signal sample library may be to calculate the similarity between the respiratory signal to be predicted and each respiratory signal sample in the preset respiratory signal sample library by using a preset similarity evaluation method. It should be noted that after obtaining the respiratory signal to be predicted, in order not to introduce more delay time, the calculation process of the similarity between the respiratory signal to be predicted and each respiratory signal sample in the preset respiratory signal sample library needs to be fast and accurate. Therefore, the calculation process of the similarity between the respiratory signal to be predicted and each respiratory signal sample in the preset respiratory signal sample library should adopt a simple algorithm to minimize the calculation amount. Based on this, the above preset similarity evaluation method may be one or more of Euclidean distance, correlation coefficient, cosine similarity, etc.
[0091] Step S224, based on each similarity result between the respiratory signal to be predicted and each respiratory signal sample in the preset respiratory signal sample library, determine the respiratory signal sample in the respiratory signal sample library with the highest similarity to the respiratory signal to be predicted.
[0092] Step S226, determine the optimal complete prediction model corresponding to the respiratory signal sample with the highest similarity to the respiratory signal to be predicted in the respiratory signal sample library as the target prediction model matched by the respiratory signal to be predicted.
[0093] In the above steps S222 to S226, by calculating the similarity between the respiration signal to be predicted and each respiration signal sample in the preset respiration signal sample library, and based on each similarity result between the respiration signal to be predicted and each respiration signal sample in the preset respiration signal sample library, the respiration signal sample with the highest similarity to the respiration signal to be predicted in the respiration signal sample library is determined, and the optimal complete prediction model corresponding to the respiration signal sample with the highest similarity to the respiration signal to be predicted in the respiration signal sample library is determined as the target prediction model matched by the respiration signal to be predicted. By determining the target prediction model matched by the respiration signal to be predicted, it is convenient to accurately predict the respiration signal to be predicted by using the target prediction model subsequently, and solves the problem of low accuracy of the prediction result of the respiration signal in the prior art.
[0094] Among them, in one embodiment, based on step S230, using the target prediction model to perform respiration prediction on the respiration signal to be predicted includes the following steps:
[0095] Step S232, using the respiration signal to be predicted to train the target prediction model to obtain a complete target prediction model.
[0096] It should be noted that since the target prediction model is the optimal complete prediction model corresponding to the respiration signal sample with the highest similarity to the respiration signal to be predicted in the respiration signal sample library, therefore, in order to avoid inaccurate prediction results when directly using the target prediction model to predict the respiration signal to be predicted, the target prediction model can be trained first before performing respiration prediction on the respiration signal to be predicted to obtain a complete target prediction model. The above complete target prediction model can be a target prediction model that meets the preset accuracy requirement or the training iteration times reach the preset iteration times threshold after training the target prediction model based on the respiration signal to be predicted. The above preset accuracy requirement can be specifically set according to specific needs. For example, the preset accuracy requirement can be set to 90%.
[0097] Step S234, using the complete target prediction model to predict the respiration signal to be predicted.
[0098] In the above steps S232 to S234, by using the respiration signal to be predicted to train the target prediction model to obtain a complete target prediction model, and then using the complete target prediction model to predict the respiration signal to be predicted, it ensures the accuracy of the prediction of the respiration signal to be predicted by retraining the target prediction model.
[0099] Furthermore, in one embodiment, after step S230, it includes the following steps:
[0100] Step S270: Obtain a real-time respiratory signal homologous to the respiratory signal to be predicted.
[0101] The above real-time respiratory signal homologous to the respiratory signal to be predicted can be a real-time respiratory signal that is continuous with the respiratory signal to be predicted, from the same user, and collected by the same device. To ensure the prediction accuracy during the process of predicting the respiratory signal, it is necessary to collect in real time a real-time respiratory signal homologous to the respiratory signal to be predicted, and use the collected real-time respiratory signal homologous to the respiratory signal to be predicted as the new respiratory signal to be predicted. By updating the respiratory signal to be predicted, it is convenient to subsequently supervise the prediction accuracy of the respiratory signal to be predicted, so that in the case where the target prediction model cannot accurately predict the respiratory signal to be predicted, the target prediction model matching the new respiratory signal to be predicted can be updated in a timely manner.
[0102] Step S280: Use the target prediction model to predict the obtained real-time respiratory signal to obtain a real-time prediction result.
[0103] The above real-time prediction result can be the prediction accuracy in real time.
[0104] Step S290: When the real-time prediction result is less than the preset prediction result threshold, use the optimal complete prediction model corresponding to the respiratory signal sample with the second highest similarity to the respiratory signal to be predicted in the respiratory signal sample library as the new target prediction model, and repeat the process of obtaining the real-time prediction result until the real-time prediction result is greater than or equal to the preset prediction result threshold, or until the number of times of obtaining the real-time prediction result meets the preset number threshold.
[0105] The above preset prediction result threshold can be specifically set according to specific circumstances. For example, the preset prediction result threshold can be 90%. When the above real-time prediction result is less than the preset prediction result threshold, the prediction accuracy of the instant prediction result is less than 90%. The above process of repeatedly obtaining the real-time prediction result can be the process of repeating steps S270 to S280. The above preset number threshold can be specifically set according to specific circumstances. It should be noted that in order to avoid introducing too much delay, the above preset number threshold can be set to a relatively small value. For example, the preset number threshold can be set to 10 times.
[0106] Preferably, when the number of times of obtaining real-time prediction results meets a preset number threshold, the target prediction model in the last process of obtaining real-time prediction results can be selected to continue predicting the obtained real-time respiration signal to obtain real-time prediction results. Alternatively, a preset global optimal prediction model can be selected to predict the obtained real-time respiration signal to obtain real-time prediction results. The above-mentioned preset global optimal prediction model can be the best model found after considering all possible model configurations and hyperparameters. This model may not have the best prediction effect for individual respiration signal samples, but it can ensure the best prediction effect when predicting all respiration signal samples.
[0107] In the above steps S270 to S290, by obtaining a real-time respiration signal homologous to the respiration signal to be predicted, and using the real-time respiration signal homologous to the respiration signal to be predicted to judge the prediction accuracy of the target prediction model. If the prediction accuracy of the current target prediction model does not meet the requirements, the target prediction model is updated until the preset requirements are met. By updating the respiration signal to be predicted and the target prediction model, it ensures the prediction effect during the entire prediction process, and avoids excessive prediction errors caused by the subsequent signal change of the respiration signal to be predicted being too large while the target prediction model cannot be updated in time.
[0108] The following describes and illustrates this embodiment through preferred embodiments.
[0109] Figure 3 is a flowchart of a respiration signal prediction method provided by a preferred embodiment of the present application. As Figure 3 shown, the respiration signal prediction method includes the following steps:
[0110] Step S310, obtain a plurality of respiration signal samples, and based on the obtained plurality of respiration signal samples, construct a respiration signal sample library;
[0111] Step S320, for each respiration signal sample in the respiration signal sample library, train each initial prediction model among a plurality of preset initial prediction models respectively to obtain a plurality of complete prediction models corresponding to each respiration signal sample in the respiration signal sample library;
[0112] Step S330, use the plurality of complete prediction models corresponding to each respiration signal sample in the respiration signal sample library to predict each respiration signal sample in the respiration signal sample library respectively to obtain a plurality of prediction results for each respiration signal sample;
[0113] Step S340, select the complete prediction model corresponding to the optimal prediction result among the plurality of prediction results of each respiration signal sample as the optimal complete prediction model corresponding to each respiration signal sample;
[0114] Step S350: Obtain the respiratory signal to be predicted;
[0115] Step S360: According to the similarity between the respiratory signal to be predicted and each respiratory signal sample in the preset respiratory signal sample library, use the optimal complete prediction model corresponding to the respiratory signal sample with the highest similarity to the respiratory signal to be predicted as the target prediction model matched by the respiratory signal to be predicted;
[0116] Step S370: Use the target prediction model to perform respiratory prediction on the respiratory signal to be predicted.
[0117] In the above steps S310 to S370, by presetting the preset respiratory signal sample library in advance and determining the optimal complete prediction model of each respiratory signal sample in the preset respiratory signal sample library in advance, when the respiratory signal to be predicted is obtained, the similarity between each respiratory signal sample in the preset respiratory signal sample library and the respiratory signal to be predicted can be directly calculated, and the optimal complete prediction model corresponding to the respiratory signal sample with the highest similarity to the respiratory signal to be predicted is used as the target prediction model matched by the respiratory signal to be predicted. Since the target prediction model is the optimal complete prediction model for the respiratory signal sample with the highest similarity to the respiratory signal to be predicted, the target prediction model can accurately predict the respiratory signal to be predicted, solving the problem of low accuracy of the prediction result of the respiratory signal in the prior art.
[0118] It should be understood that although the steps in the flowcharts involved in the above-described embodiments are shown in sequence according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise clearly stated in this article, the execution of these steps has no strict order limit, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-described embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be executed alternately or alternately with at least a part of other steps or steps or stages in other steps.
[0119] Based on the same inventive concept, in this embodiment, a respiratory signal prediction device is further provided. This device is used to implement the above embodiments and preferred implementation manners, and those that have been described will not be repeated. The following terms "module", "unit", "sub-unit", etc. can be a combination of software and / or hardware that can achieve a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware is also possible and contemplated.
[0120] In one embodiment, Figure 4 is a structural block diagram of a respiratory signal prediction device provided by an embodiment of the present application. As Figure 4 shown, the respiratory signal prediction device includes:
[0121] A signal acquisition module 42, configured to acquire a respiratory signal to be predicted;
[0122] A model determination module 44, configured to, according to the similarity between the respiratory signal to be predicted and each respiratory signal sample in a preset respiratory signal sample library, use the optimal complete prediction model corresponding to the respiratory signal sample with the highest similarity to the respiratory signal to be predicted as the target prediction model matched by the respiratory signal to be predicted; the optimal complete prediction model corresponding to a respiratory signal sample is the complete prediction model corresponding when using multiple complete prediction models corresponding to the respiratory signal sample to respectively predict the respiratory signal sample and obtaining the optimal prediction result;
[0123] And a prediction module 46, configured to use the target prediction model to perform respiratory prediction on the respiratory signal to be predicted.
[0124] For the above-mentioned respiratory signal prediction device, by presetting a preset respiratory signal sample library in advance and determining the optimal complete prediction model of each respiratory signal sample in the preset respiratory signal sample library in advance, therefore, when the respiratory signal to be predicted is acquired, the similarity between each respiratory signal sample in the preset respiratory signal sample library and the respiratory signal to be predicted can be directly calculated, and the optimal complete prediction model corresponding to the respiratory signal sample with the highest similarity to the respiratory signal to be predicted is used as the target prediction model matched by the respiratory signal to be predicted. Because the target prediction model is the optimal complete prediction model for the respiratory signal sample with the highest similarity to the respiratory signal to be predicted, therefore, the target prediction model can accurately predict the respiratory signal to be predicted, solving the problem of low accuracy of the prediction result of the respiratory signal in the prior art.
[0125] In one of the embodiments, the respiratory signal prediction device further includes a sample library construction module:
[0126] The sample library construction module is used to obtain a plurality of respiratory signal samples, and construct the respiratory signal sample library based on the obtained plurality of respiratory signal samples; use a plurality of complete prediction models corresponding to each of the respiratory signal samples in the respiratory signal sample library to respectively predict each of the respiratory signal samples in the respiratory signal sample library, and obtain a plurality of prediction results for each of the respiratory signal samples; and select the complete prediction model corresponding to the optimal prediction result among the plurality of prediction results of each of the respiratory signal samples as the optimal complete prediction model corresponding to each of the respiratory signal samples.
[0127] In one embodiment, the respiratory signal prediction device further includes a complete prediction model training module;
[0128] The complete prediction model training module is used to train each of the initial prediction models in a plurality of preset initial prediction models for each of the respiratory signal samples in the respiratory signal sample library, and obtain a plurality of complete prediction models corresponding to each of the respiratory signal samples in the respiratory signal sample library.
[0129] In one embodiment, the complete prediction model training module includes an optimization unit and a complete prediction model training unit;
[0130] The optimization unit is used to perform hyperparameter optimization on each of the initial prediction models in the plurality of preset initial prediction models for each of the respiratory signal samples in the respiratory signal sample library, and obtain the hyperparameter optimization results of the plurality of initial prediction models corresponding to each of the respiratory signal samples.
[0131] The complete prediction model training unit is used to train the plurality of initial prediction models corresponding to each of the respiratory signal samples based on the hyperparameter optimization results of the plurality of initial prediction models corresponding to each of the respiratory signal samples, and obtain a plurality of complete prediction models corresponding to each of the respiratory signal samples in the respiratory signal sample library.
[0132] In one embodiment, the optimization unit uses the MOPSO method to perform hyperparameter optimization on each of the initial prediction models in the plurality of preset initial prediction models for each of the respiratory signal samples in the respiratory signal sample library, and obtain the hyperparameter optimization results of the plurality of initial prediction models corresponding to each of the respiratory signal samples.
[0133] In one embodiment, the model determination module includes a similarity calculation unit, a similarity result determination unit, and a target prediction model determination unit;
[0134] The similarity calculation unit is configured to calculate the similarity between the to-be-predicted respiratory signal and each of the respiratory signal samples in the preset respiratory signal sample library, so as to obtain each similarity result between the to-be-predicted respiratory signal and each of the respiratory signal samples in the preset respiratory signal sample library;
[0135] The similarity result determination unit is configured to determine, based on each of the similarity results between the to-be-predicted respiratory signal and each of the respiratory signal samples in the preset respiratory signal sample library, the respiratory signal sample in the respiratory signal sample library that has the highest similarity with the to-be-predicted respiratory signal;
[0136] The target prediction model determination unit is configured to determine the optimal complete prediction model corresponding to the respiratory signal sample in the respiratory signal sample library that has the highest similarity with the to-be-predicted respiratory signal as the target prediction model matched by the to-be-predicted respiratory signal.
[0137] In one embodiment, the prediction module is configured to use the to-be-predicted respiratory signal to train the target prediction model to obtain a complete target prediction model; and use the complete target prediction model to predict the to-be-predicted respiratory signal.
[0138] In one embodiment, the respiratory signal prediction device further includes a real-time prediction module;
[0139] The real-time prediction module is configured to, after using the target prediction model to perform respiratory prediction on the to-be-predicted respiratory signal, obtain a real-time respiratory signal homologous to the to-be-predicted respiratory signal, use the target prediction model to predict the obtained real-time respiratory signal to obtain a real-time prediction result; and when the real-time prediction result is less than the preset prediction result threshold, use the optimal complete prediction model corresponding to the respiratory signal sample in the respiratory signal sample library that has the second highest similarity with the to-be-predicted respiratory signal as the new target prediction model, and repeat the process of obtaining the real-time prediction result until the real-time prediction result is greater than or equal to the preset prediction result threshold, or until the number of times of obtaining the real-time prediction result meets the preset number threshold.
[0140] It should be noted that the above-mentioned each module can be a functional module or a program module, and can be implemented either by software or by hardware. For the modules implemented by hardware, the above-mentioned each module can be located in the same processor; or the above-mentioned each module can also be located in different processors in any combination form.
[0141] In one embodiment, a computer device is provided, including a memory and a processor. A computer program is stored in the memory, and when the processor executes the computer program, any one of the breathing signal prediction methods in the above embodiments is implemented.
[0142] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, database, or other medium provided in the embodiments of the present application can include at least one of non-volatile and volatile memories. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The databases involved in the embodiments of the present application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., without limitation. The processors involved in the embodiments of the present application can be general-purpose processors, central processors, graphics processors, digital signal processors, programmable logic devices, data processing logics based on quantum computing, etc., without limitation.
[0143] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope described in this specification.
[0144] The above-described embodiments merely represent several implementation manners of the present application. The description thereof is relatively specific and detailed, but it should not be construed as a limitation to the patent scope of the present application. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all fall within the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the appended claims.
Claims
1. A respiratory signal prediction method, characterized in that: The method comprises: Acquire a respiratory signal to be predicted; Using a preset similarity evaluation method, the similarity between the respiratory signal to be predicted and each respiratory signal sample in a preset respiratory signal sample library is calculated to obtain each similarity result between the respiratory signal to be predicted and each respiratory signal sample in the preset respiratory signal sample library; the preset similarity evaluation method is one or more methods selected from the group consisting of Euclidean distance, correlation coefficient, and cosine similarity; the respiratory signal samples in the respiratory signal sample library are diverse samples; according to the similarity between the respiratory signal to be predicted and each respiratory signal sample in the preset respiratory signal sample library, the optimal complete prediction model corresponding to the respiratory signal sample with the highest similarity to the respiratory signal to be predicted is used as the target prediction model matched with the respiratory signal to be predicted; the optimal complete prediction model corresponding to the respiratory signal sample is a complete prediction model corresponding to the optimal prediction result obtained by respectively predicting the respiratory signal sample using multiple complete prediction models corresponding to the respiratory signal sample; The target prediction model is used to perform respiration prediction on the respiration signal to be predicted.
2. The respiratory signal prediction method according to claim 1, characterized in that: The method further comprises: Acquire a plurality of respiratory signal samples, and construct the respiratory signal sample library based on the acquired plurality of respiratory signal samples; Using a plurality of complete prediction models corresponding to each of the breathing signal samples in the breathing signal sample library, respectively predict each of the breathing signal samples in the breathing signal sample library to obtain a plurality of prediction results for each of the breathing signal samples; The complete prediction model corresponding to the best prediction result among the multiple prediction results of each of the breathing signal samples is selected as the best complete prediction model corresponding to each of the breathing signal samples.
3. The respiratory signal prediction method according to claim 2, characterized in that: Before using a plurality of complete prediction models corresponding to each of the breathing signal samples in the breathing signal sample library to predict each of the breathing signal samples in the breathing signal sample library respectively to obtain a plurality of prediction results for each of the breathing signal samples, the method comprises: For each of the breathing signal samples in the breathing signal sample library, each of the preset multiple initial prediction models is trained respectively to obtain a plurality of the complete prediction models corresponding to each of the breathing signal samples in the breathing signal sample library.
4. The respiratory signal prediction method according to claim 3, characterized in that: The method of training each of the plurality of preset initial prediction models for each of the respiratory signal samples in the respiratory signal sample library to obtain a plurality of complete prediction models corresponding to each of the respiratory signal samples in the respiratory signal sample library comprises: For each of the respiratory signal samples in the respiratory signal sample library, respectively perform hyperparameter optimization on each of the preset multiple initial prediction models to obtain hyperparameter optimization results of the multiple initial prediction models corresponding to each of the respiratory signal samples; Based on the hyperparameter optimization results of the multiple initial prediction models corresponding to each of the breathing signal samples, the multiple initial prediction models corresponding to each of the breathing signal samples are trained respectively to obtain multiple complete prediction models corresponding to each of the breathing signal samples in the breathing signal sample library.
5. The respiratory signal prediction method according to claim 4, characterized in that: For each of the respiratory signal samples in the respiratory signal sample library, respectively performing hyperparameter optimization on each of the preset multiple initial prediction models to obtain hyperparameter optimization results of the multiple initial prediction models corresponding to each of the respiratory signal samples, including: For each of the respiratory signal samples in the respiratory signal sample library, the MOPSO method is used to perform hyperparameter optimization on each of the preset multiple initial prediction models, and the hyperparameter optimization results of the multiple initial prediction models corresponding to each of the respiratory signal samples are obtained.
6. The respiratory signal prediction method according to claim 1, characterized in that: According to the similarity between the respiratory signal to be predicted and each respiratory signal sample in the preset respiratory signal sample library, the optimal complete prediction model corresponding to the respiratory signal sample with the highest similarity to the respiratory signal to be predicted is used as the target prediction model matched by the respiratory signal to be predicted, including: Based on the similarity results between the respiratory signal to be predicted and each of the respiratory signal samples in the preset respiratory signal sample library, determining the respiratory signal sample in the respiratory signal sample library having the highest similarity with the respiratory signal to be predicted; The optimal complete prediction model corresponding to the respiratory signal sample with the highest similarity to the respiratory signal to be predicted in the respiratory signal sample library is determined as the target prediction model matched by the respiratory signal to be predicted.
7. The respiratory signal prediction method according to claim 1, characterized in that: The step of using the target prediction model to perform respiration prediction on the respiration signal to be predicted includes: Using the respiratory signal to be predicted, the target prediction model is trained to obtain a complete target prediction model; The respiratory signal to be predicted is predicted using the complete target prediction model.
8. The respiratory signal prediction method according to claim 1, characterized in that: After performing respiration prediction on the respiration signal to be predicted by using the target prediction model, the method further comprises: Acquiring a real-time respiratory signal homologous to the respiratory signal to be predicted; Using the target prediction model to predict the acquired real-time respiratory signal to obtain a real-time prediction result; When the real-time prediction result is less than the preset prediction result threshold, the optimal complete prediction model corresponding to the breathing signal sample with the second highest similarity to the breathing signal to be predicted in the breathing signal sample library is used as the new target prediction model, and the process of obtaining the real-time prediction result is repeated until the real-time prediction result is greater than or equal to the preset prediction result threshold, or until the number of times the real-time prediction result is obtained meets the preset number threshold.
9. A respiratory signal prediction device, characterized in that: The device comprises: A signal acquisition module, used for acquiring a respiratory signal to be predicted; A model determination module is used to calculate the similarity between the respiratory signal to be predicted and each respiratory signal sample in a preset respiratory signal sample library using a preset similarity evaluation method, and obtain each similarity result between the respiratory signal to be predicted and each respiratory signal sample in the preset respiratory signal sample library; the preset similarity evaluation method is one or more methods selected from the group consisting of Euclidean distance, correlation coefficient, and cosine similarity; the respiratory signal samples in the respiratory signal sample library are samples with diversity; according to the similarity between the respiratory signal to be predicted and each respiratory signal sample in the preset respiratory signal sample library, the optimal complete prediction model corresponding to the respiratory signal sample with the highest similarity to the respiratory signal to be predicted is used as the target prediction model matched with the respiratory signal to be predicted; the optimal complete prediction model corresponding to the respiratory signal sample is the complete prediction model corresponding to the optimal prediction result obtained when the respiratory signal sample is predicted by using multiple complete prediction models corresponding to the respiratory signal sample; and a prediction module, which is used to perform respiration prediction on the respiration signal to be predicted by using the target prediction model.
10. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the breathing signal prediction method according to any one of claims 1 to 8 are implemented.
Citation Information
Patent Citations
Data predicting model selecting device and method
CN104679754A
Time sequence prediction method based on time convolution and LSTM
CN108764460A