Lung function instrument data processing method and system based on data analysis

Through the data processing method and system of lung function instruments based on data analysis, the XGBoost classification model is used to preprocess and analyze the lung function data of home users, which solves the problem of generating reliable test results reports and realizes high-reliability lung function examination and diagnostic suggestions.

CN119889668AActive Publication Date: 2025-04-25NANJING KEJIN INDAL

Patent Information

Application Number
CN202510353849.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-25
Publication Date
2025-04-25
Estimated Expiration
2045-03-25

AI Technical Summary

Technical Problem

The prior art is difficult to generate a more reliable report on lung function test results for home users, especially when processing user measurement data, there is a problem that wrong data affects the model prediction results.

Method used

The data processing method and system of pulmonary function instruments based on data analysis are adopted to obtain user measurement data through the expiratory peak flowmeter, and the F-V curve and V-T curve are fitted after preprocessing, and the characteristic vector is constructed with static indicators, and the training XGBoost classification model is used to predict ventilation disorders.

Benefits of technology

It effectively prevents the impact of user measurement error data on model prediction results, ensures the reliability of model prediction results, and provides intelligent lung function analysis and diagnostic suggestions for home users.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119889668A_ABST
    Figure CN119889668A_ABST
Patent Text Reader

Abstract

The invention relates to a pulmonary function instrument data processing method and system based on data analysis, and the system comprises a plurality of expiration peak flow meters and a cloud platform, and the cloud platform is connected with a plurality of medical systems. The expiration peak flow meter is used for measuring lung function parameters. A user table and a plurality of data tables are arranged in a database of the cloud platform, the user table is used for storing individual information input by a user and user marks, and the data tables are used for storing lung function parameters, measurement time, F-V curves, V-T curves and feature vectors constructed in combination with the individual information of the user. Wherein the latest data table in the multiple data tables is the first data table, and when the number of data stored in the first data table exceeds a first preset value, a second data table is created. And when the ventilation obstacle prediction result output by the trained XGBoost classification model is inconsistent with the actual result, marking the prediction result inconsistent with the actual result and the data table and the user corresponding to the prediction result so as to update the data table and the user table.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of medical assistance and pulmonary function examination, and in particular to a pulmonary function instrument data processing method and system based on data analysis. Background Art

[0002] In the examination and evaluation of pulmonary function, ventilation function is the most basic and most important content, and the simple pulmonary function test for ventilation function is also an important means for hospitals and departments at all levels, and is the main means of detection in primary hospitals or health examinations. Pulmonary function tests have the following characteristics: (1) It is of great significance for clinical diagnosis and treatment guidance; (2) It is non-invasive; (3) It is convenient for repeated testing; (4) It is highly sensitive; (5) It is cheap; (6) It is suitable for the management of chronic respiratory diseases. Its principle is: by measuring the respiratory capacity, flow rate, pressure, etc. and analyzing the composition of respiratory gases, the pulmonary ventilation function and gas exchange function can be judged, so as to understand the functional status of the organs and tissues of the respiratory system.

[0003] Therefore, patients can often use expiratory peak flow meters at home to perform lung function tests. However, for home users, how to generate a more reliable test result report based on these measured parameters is an urgent problem to be solved. Summary of the invention

[0004] In order to solve the deficiencies in the prior art, the purpose of the present invention is to solve the above-mentioned defects and further propose a pulmonary function instrument data processing method and system based on data analysis.

[0005] The present invention adopts the following technical solution.

[0006] The first aspect of the present invention discloses a pulmonary function instrument data processing system based on data analysis, the system comprising a plurality of expiratory peak flow meters and a cloud platform, the cloud platform being connected to a plurality of medical systems; The expiratory peak flow meter is used to measure lung function parameters; The database of the cloud platform has a user table and multiple data tables, the user table is used to store individual information and user tags input by the user, and the data table is used to store lung function parameters, measurement time, FV curve and VT curve, and feature vectors constructed in combination with user individual information; Wherein, the latest data table among the multiple data tables is the first data table, and when the amount of data stored in the first data table exceeds a first preset value, a second data table is created; When the ventilation disorder prediction result output by the trained XGBoost classification model is inconsistent with the actual result, the prediction result inconsistent with the actual result and its corresponding data table and user are marked to update the data table and user table.

[0007] The second aspect of the present invention discloses a pulmonary function instrument data processing method based on data analysis, which is implemented by the pulmonary function instrument data processing system based on data analysis described in the first aspect, and the method comprises: Acquiring user measurement data through an expiratory peak flow meter, and preprocessing the user measurement data; Fitting the FV curve and VT curve based on the preprocessed user measurement data, and selecting the correct lung function parameters from the user measurement data according to the FV curve and VT curve to construct a feature vector in combination with the static index; The real-time measurement data is used as input to the trained XGBoost classification model to output the prediction results of ventilation disorder; Among them, the static indicator is the individual information input by the user, and the trained XGBoost classification model is trained based on the feature vector and the corresponding ventilation disorder prediction result.

[0008] Furthermore, obtaining user measurement data through an expiratory peak flow meter and preprocessing the user measurement data include: constructing an original flow vector based on the lung function parameter, and performing moving average filtering on the original flow vector to construct a smoothed volume flow vector and a time volume vector; Calculate the flow changes of adjacent data points of the smoothed capacity flow vector, and calculate the standard deviation of all flow changes, so as to determine whether the capacity flow vector is smooth and continuous according to a set smoothing threshold, and perform a smoothness test on the capacity flow vector; The flow change is the difference between the capacity flow vector and an adjacent data point.

[0009] Furthermore, the method of obtaining user measurement data through an expiratory peak flow meter and preprocessing the user measurement data further includes: Extracting a first time capacity vector from the smoothed time capacity vector, and calculating adjacent increments of the first time capacity vector to calculate an average value of all adjacent increments to obtain an average capacity increment; Determine whether there are a first number of consecutive data points with an average capacity increment lower than a first threshold, and perform interruption detection on the time capacity vector to obtain an interruption detection result; Among them, the adjacent increment is the difference between the data points adjacent to the first time capacity vector and the first time capacity vector. When the average capacity increment of a first number of consecutive data points is lower than a first threshold, it is determined to be an interruption.

[0010] Furthermore, the method of fitting the FV curve and the VT curve based on the preprocessed user measurement data, and selecting the correct lung function parameters from the user measurement data according to the FV curve and the VT curve to construct a feature vector in combination with the static index includes: Extracting the key dynamic features from the measured data in the form of time series data, the key dynamic features including peak expiratory flow, the rate of volume increase during exhalation, the degree of deviation of the descending branch of the FV curve in the expiratory phase from the ideal straight line, and a platform advance index; A dynamic feature vector is constructed based on the key dynamic feature, and the key dynamic feature is combined with the basic information of the patient and the static index to construct a complete feature vector.

[0011] Furthermore, the real-time measurement data is used as input to the trained XGBoost classification model to output the prediction result of ventilation disorder, which previously includes: Constructing a training data set based on the feature vector, and establishing an XGBoost classification model according to the training data set, wherein the objective function of the XGBoost classification model is composed of a cross entropy loss and a tree complexity regularization term; The training data set is used as the input of the XGBoost classification model, cross-validation is used to adjust the parameters, and a decision tree is constructed through rounds of iterations. In each round of iteration, the residual is updated by the gradient boosting algorithm until the objective function converges, so as to train the XGBoost classification model; Among them, the hyperparameter settings of the XGBoost classification model include maximum depth, learning rate, subsampling ratio and number of iterations.

[0012] Furthermore, the real-time measurement data is used as input of the trained XGBoost classification model to output the prediction result of ventilation disorder, and the method also includes: Calculate the accuracy of the trained XGBoost classification model output through cross-validation, where the accuracy is the ratio between the number of correctly classified samples and the total number of samples, and complete the accuracy evaluation of the XGBoost classification model when the accuracy is not lower than a second threshold; The sensitivity and specificity of each category are calculated, where the sensitivity is the ratio of the number of true positives to the sum of the number of true positives and the number of false negatives, and the specificity is the ratio of the number of true negatives to the sum of the number of true negatives and the number of false positives. The sensitivity evaluation and specificity evaluation of the XGBoost classification model are completed when the sensitivity and specificity are not lower than the third threshold.

[0013] Furthermore, the types of ventilation disorders include obstructive ventilation disorders, restrictive ventilation disorders, and mixed ventilation disorders; The real-time measurement data is used as input to the trained XGBoost classification model to output the prediction results of ventilation disorder, including: The complete current feature vector of the current user is used as the input of the trained XGBoost classification model to call the trained XGBoost classification model to calculate and output the probability distribution of each obstacle and the highest probability value of each category; When the highest probability value of any category is lower than the fourth threshold, the highest probability value of the corresponding category is re-measured and recalculated until the highest probability value is not lower than the fourth threshold; The probability distribution of each obstacle includes the probability of obstructive ventilation obstacle, the probability of restrictive ventilation obstacle and the probability of mixed ventilation obstacle.

[0014] The third aspect of the present invention discloses a terminal, including a processor and a storage medium; the characteristics are: The storage medium is used to store instructions; The processor is used to operate according to the instructions to execute the steps of the method described in the second aspect.

[0015] The fourth aspect of the present invention discloses a computer-readable storage medium having a computer program stored thereon, characterized in that when the program is executed by a processor, the steps of the method described in the second aspect are implemented.

[0016] Beneficial effects of the present invention: (1) By fitting the FV curve and VT curve based on the preprocessed user measurement data, and selecting the correct lung function parameters from the user measurement data according to the FV curve and VT curve, and combining the static indicators to construct the feature vector, the influence of the erroneous data measured by the user on the model prediction results is effectively prevented, thus ensuring the reliability of the model prediction results.

[0017] (2) The trained XGBoost classification model is used to intelligently analyze the lung function parameters measured by the user, and corresponding analysis results and diagnostic suggestions are given. For users at home, it is more convenient to generate a more reliable test result report based on the parameters measured by the expiratory peak flow meter and provide corresponding diagnostic suggestions. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 It is a structural schematic diagram of a pulmonary function instrument data processing system based on data analysis; Figure 2 is a flow chart of a method for processing spirometer data based on data analysis; Figure 3 A pulmonary function examination table and a curve diagram of a pulmonary function instrument data processing method based on data analysis in a specific embodiment; Figure 4 A schematic diagram of a breathing requirement curve of a pulmonary function instrument data processing method based on data analysis in a specific embodiment; Figure 5 It is a schematic diagram of a measurement requirement curve of a pulmonary function meter data processing method based on data analysis in a specific embodiment. DETAILED DESCRIPTION

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

[0020] like Figure 1 As shown, in one embodiment, a pulmonary function meter data processing system based on data analysis includes multiple expiratory peak flow meters and a cloud platform, and the cloud platform is connected to multiple medical systems.

[0021] Expiratory peak flow meter was used to measure lung function parameters.

[0022] The database of the cloud platform has a user table and multiple data tables. The user table is used to store individual information and user tags entered by the user, and the data table is used to store lung function parameters, measurement time, FV curve and VT curve, and feature vectors constructed in combination with user individual information.

[0023] The latest data table among the multiple data tables is the first data table, and when the amount of data stored in the first data table exceeds a first preset value, a second data table is created.

[0024] When the ventilation disorder prediction results output by the trained XGBoost classification model are inconsistent with the actual results, the prediction results inconsistent with the actual results and their corresponding data tables and users are marked to update the data tables and user tables.

[0025] like Figure 2 As shown, in one embodiment, a method for processing pulmonary function instrument data based on data analysis comprises the following steps: Step S110, obtaining user measurement data through an expiratory peak flow meter, and preprocessing the user measurement data.

[0026] In some embodiments, the present invention provides a method for processing pulmonary function meter data based on data analysis, wherein step S110 specifically includes the following steps: Step S111, constructing an original flow vector based on the lung function parameters, and performing moving average filtering on the original flow vector to construct a smoothed volume flow vector and a time volume vector.

[0027] Step S112, calculate the flow changes of adjacent data points of the smoothed capacity flow vector, and calculate the standard deviation of all flow changes, so as to determine whether the capacity flow vector is smooth and continuous according to the set smoothing threshold, and perform smoothness detection on the capacity flow vector.

[0028] The flow change is the difference between the capacity flow vector and the adjacent data points.

[0029] In some embodiments, the present invention provides a method for processing pulmonary function meter data based on data analysis, wherein step S110 specifically further includes the following steps: Step S113, extracting the first time capacity vector from the smoothed time capacity vector, and calculating adjacent increments of the first time capacity vector to calculate the average value of all adjacent increments to obtain an average capacity increment.

[0030] Step S114, determining whether there are a first number of consecutive data points whose average capacity increment is lower than a first threshold, performing interruption detection on the time capacity vector, and obtaining an interruption detection result.

[0031] Among them, the adjacent increment is the difference between the data points adjacent to the first time capacity vector and the first time capacity vector. When the average capacity increment of a first number of consecutive data points is lower than a first threshold, it is determined to be an interruption.

[0032] Step S120, fitting the FV curve and the VT curve based on the preprocessed user measurement data, and selecting the correct lung function parameters from the user measurement data according to the FV curve and the VT curve, so as to construct a feature vector in combination with the static index.

[0033] The static index is the individual information input by the user. The pulmonary function parameters are measured using an expiratory peak flow meter, including respiratory capacity, flow rate, pressure, and respiratory gas composition used to determine pulmonary ventilation and gas exchange functions.

[0034] In some embodiments, the present invention provides a method for processing pulmonary function meter data based on data analysis, wherein step S120 specifically includes the following steps: Step S121, extracting key dynamic features from the measurement data in the form of time series data, the key dynamic features including peak expiratory flow, the rate of volume increase during exhalation, the degree of deviation of the descending branch of the expiratory phase of the FV curve from the ideal straight line, and a platform advance index.

[0035] Step S122, constructing a dynamic feature vector based on the key dynamic features, and combining the key dynamic features with the patient's basic information and static indicators to construct a complete feature vector.

[0036] Step S130, using the real-time measurement data as input to the trained XGBoost classification model to output a prediction result of ventilation disorder.

[0037] The trained XGBoost classification model is obtained by training based on the feature vector and the corresponding ventilation disorder prediction results. The types of ventilation disorders include obstructive ventilation disorder, restrictive ventilation disorder and mixed ventilation disorder.

[0038] In some embodiments, the present invention provides a method for processing pulmonary function meter data based on data analysis, which includes the following steps before step S130: Step S210, constructing a training data set based on the feature vector, and establishing an XGBoost classification model based on the training data set, wherein the objective function of the XGBoost classification model is composed of a cross entropy loss and a tree complexity regularization term.

[0039] Step S220, using the training data set as the input of the XGBoost classification model, using cross-validation to adjust the parameters, and building a decision tree through rounds of iterations. In each round of iteration, the residual is updated through the gradient boosting algorithm until the objective function converges to train the XGBoost classification model.

[0040] Among them, the hyperparameter settings of the XGBoost classification model include maximum depth, learning rate, subsampling ratio, and number of iterations.

[0041] In some embodiments, the present invention provides a method for processing pulmonary function meter data based on data analysis, and before step S130, further includes the following steps: Step S310, calculating the accuracy of the trained XGBoost classification model output through cross-validation, where the accuracy is the ratio between the number of correctly classified samples and the total number of samples, and completing the accuracy evaluation of the XGBoost classification model when the accuracy is not lower than a second threshold.

[0042] Step S320, calculate the sensitivity and specificity of each category, where the sensitivity is the ratio of the number of true positives to the sum of the number of true positives and the number of false negatives, and the specificity is the ratio of the number of true negatives to the sum of the number of true negatives and the number of false positives. When both the sensitivity and the specificity are not lower than the third threshold, the sensitivity evaluation and specificity evaluation of the XGBoost classification model are completed.

[0043] In some embodiments, the present invention provides a method for processing pulmonary function meter data based on data analysis, wherein step S130 specifically includes the following steps: Step S131, using the complete current feature vector of the current user as the input of the trained XGBoost classification model, so as to call the trained XGBoost classification model to calculate and output the probability distribution of each obstacle and the highest probability value of each category.

[0044] Step S132: when the highest probability value of any category is lower than the fourth threshold, the highest probability value of the corresponding category is re-measured and re-calculated until the highest probability value is not lower than the fourth threshold.

[0045] The probability distribution of each obstacle includes the probability of obstructive ventilation obstacle, the probability of restrictive ventilation obstacle and the probability of mixed ventilation obstacle.

[0046] In this embodiment, the obstructive ventilation disorder is determined based on the fact that the descending branch of the expiratory phase of the FV curve is concave toward the horizontal axis, the VT curve shows that the expiratory time is prolonged, and the flow index FEV1 / FVC decreases.

[0047] The basis for determining restrictive ventilation disorder is that the horizontal axis of the FV curve is narrow and long, the VT curve shows that the expiratory platform appears early and the vertical axis decreases, and the capacity index decreases.

[0048] The basis for determining mixed ventilation disorder is that the horizontal axis of the FV curve is narrowed and the descending branch of the expiratory phase is concave to the horizontal axis, the vertical axis of the VT curve is decreased and the expiratory time is prolonged, and various capacity and flow indicators are decreased.

[0049] The above-mentioned data analysis-based pulmonary function meter data processing method, by fitting the FV curve and VT curve based on the preprocessed user measurement data, and selecting the correct pulmonary function parameters from the user measurement data according to the FV curve and VT curve, and combining the static indicators to construct the feature vector, effectively prevents the influence of the erroneous data measured by the user on the model prediction results, and ensures the reliability of the model prediction results. In addition, the pulmonary function parameters measured by the user are intelligently analyzed through the trained XGBoost classification model, and the corresponding analysis results and diagnostic suggestions are given. For users at home, it is more convenient to generate a more reliable test result report based on the parameters measured by the expiratory peak flow meter and provide corresponding diagnostic suggestions.

[0050] In a specific embodiment, the present invention provides a pulmonary function meter data processing method based on data analysis, which is implemented on the basis of a pulmonary function meter data processing system based on data analysis, which system includes: multiple expiratory peak flow meters and a cloud platform, and the cloud platform is connected to various clinics and hospital systems.

[0051] The cloud platform database has a user table created for each user, which includes at least the following fields: userID: used to uniquely identify the user, usually the user's login account ID, or its mapping expression; password: login password; info: various basic information of the user.

[0052] The user's test data (such as FV curve and VT curve) will be stored in another table (such as data_1, data_2, data_3...). Usually data_i will have a general table datas to record the information of data_i. The general table datas usually includes at least the following fields: name: used to record the specific name of the current data_i (actually to determine the specific value of i); btm: the creation time of data_i; num: the number of data in data_i. And data_i includes the following fields: userID: user name; tm: user's test time; datas: test data information, in this case, it can be a complete feature vector X_user.

[0053] During the application process, the num corresponding to the latest data_i is determined. If its value exceeds the preset threshold 1 (usually 2000), a new data_j is created, j=i+1. The data in data_i is stored according to the time scale, which is mixed with the data of all users.

[0054] Once the prediction result is inconsistent with the diagnosis result, the information in data_i needs to be updated immediately (i.e., data backtracking). Therefore, storing X_user in datas is also critical for the choice of algorithm, which can contain all the user's data information as much as possible, making data backtracking more convenient.

[0055] The user table also includes the following fields: mark: used to mark the inconsistency between the prediction result and the diagnosis result, and the mark is designed to automatically increase by 1. For example, if the prediction result of the first user is inconsistent with the diagnosis result, the mark corresponding to the first user is 1; if the prediction result of the second user is inconsistent with the diagnosis result, the mark corresponding to the first user is 2, and so on.

[0056] When the value of the mark exceeds the preset threshold 2, data backtracking is started. This approach can minimize the number of data backtracking and reduce the storage pressure of the database. In this example, threshold 2 can be set to a fixed constant, such as 100, or it can be determined by the timing of model retraining. That is, when the model starts to retrain, it needs to obtain historical data information as training, so data backtracking will be started regardless of the value of the mark.

[0057] The relevant terms and their explanations involved in the following contents include: BTP: body temperature (37°C), saturated water vapor, and ambient pressure.

[0058] Peak expiratory flowrate (PEF) is the maximum flow rate during exhalation measured at the mouth when the lungs are inflated to their maximum and exhalation begins with maximum force.

[0059] Peak expiratory flow meter (PEFM): A device used to measure peak expiratory flow.

[0060] Step 1: Data preprocessing and data detection.

[0061] Combination Figure 3 As shown, pulmonary function tests include at least the following parameters: FEV1: forced expiratory volume in 1 second.

[0062] FVC: The maximum volume of air that can be exhaled during forced exhalation after maximal inspiration.

[0063] FEV6: forced expiratory volume in 6 seconds.

[0064] MMEF: forced mid-expiratory flow.

[0065] MVV: The maximum ventilation volume that an individual can breathe spontaneously in a unit of time (usually one minute).

[0066] IC: The maximum volume of gas that an individual can inhale at the end of quiet exhalation, which is the sum of tidal volume (TV) and inspiratory reserve volume (IRV).

[0067] ERV: The maximum amount of air a person can exhale at the end of a quiet exhalation.

[0068] Judging whether the user's measurement is correct mainly includes: Breathing requirements, see Figure 4 As shown: (1) The exhalation reaches the maximum effort, the PEF peak appears quickly, the extrapolated volume is less than 5% FVC or 0.15L, and the descending limb curve of the expiratory phase is smooth. (2) There is no interruption in the exhalation process, no coughing, no teeth or tongue blocking the mouthpiece, no air leakage, and no glottal closure that affects the test. (3) Exhale for at least 6 seconds. If the exhalation time is less than 6 seconds, the time-volume curve must show that the expiratory phase plateau appears and exceeds 1 second.

[0069] It should be noted that Figure 4Here, Flow means flow rate, Volume means volume, Cough means cough, Time means time, and Actual FVC means actual FVC.

[0070] For measurement requirements, see Figure 5 As shown in the following table: (1) During the measurement process, the subjects are required to measure at least 3 times (generally no more than 8 times). (2) The difference between the optimal and suboptimal values ​​of FEV1 and FVC is less than 0.15L.

[0071] It should be noted that Figure 5 Acceptable efforts refers to the acceptable range, and Good effort refers to the test that meets the requirements.

[0072] However, how to judge whether there is no interruption in the exhalation process, no coughing, no teeth or tongue blocking the mouthpiece, no air leakage, and no glottal closure that affects the test can be analyzed by combining the following steps: Step 1.1, data preprocessing and smoothing vector construction.

[0073] The original lung function parameters are noise filtered to construct a smoothed volume flow vector and a smoothed time capacity vector to ensure that the subsequent obstacle category prediction is not disturbed by noise.

[0074] Filtering and noise reduction: Moving average filtering is used on the vector, and its expression is: ;

[0075] In the formula, is the i-th smoothed flow value, is the i-th capacity flow vector, For the filtering window size, the recommended value range is 3~7 (determined by the sampling frequency). At the same time, the capacity in the time capacity vector is subjected to the same type of filtering to obtain a smooth time capacity vector. is the floor function, which is used to ensure that the window length is an integer.

[0076] For example, if the original flow vector , after using window W=3, the smoothed capacity flow vector can be obtained .

[0077] Step 1.2, smoothness detection (detection of flow continuity).

[0078] Determine whether the volume flow vector is smooth and continuous, thus reflecting the absence of abnormal interruptions or sharp fluctuations during exhalation (such as coughing or device obstruction).

[0079] Specifically, calculate the adjacent flow difference: for the smoothed capacity flow vector Calculate the flow change of adjacent data points , whose expression is: ;

[0080] In the formula, For Adjacent data points, i=1,2,...,n-1, n is the total number of data points.

[0081] Calculate all flow changes The standard deviation of is expressed as: ;

[0082] In the formula, is the standard deviation function.

[0083] Setting the smoothness threshold (Recommended range: 0.5~2.0L / s), if , the traffic data is considered smooth and satisfies the smoothness test.

[0084] Step 1.3, interruption detection (detecting abnormal interruptions in the capacity-time vector).

[0085] Determine whether there is an interruption in the exhalation process (such as coughing, obstruction or air leakage), that is, whether there are continuous abnormally low (close to zero) volume increments in the volume-time vector.

[0086] Specifically, for the smoothed time capacity vector , extract the capacity and calculate the adjacent increments , whose expression is: ;

[0087] In the formula, is the capacity increment from the i-th data point to the i+1-th data point, is the adjacent data point of , i=1,2,...,m-1, m is the total number of data points.

[0088] Calculate the average capacity increment, that is, find all The average , Represents the mean value function.

[0089] Interruption judgment: Define the judgment criteria for continuous interruption. If there is continuous data points, which All below 0.5× (which can be considered to be close to zero or abnormally low), it is considered that there is an interruption, that is, the interruption detection fails; otherwise, the interruption detection passes.

[0090] For example, suppose we calculate Liter, then 0.5× =0.025 liters, if there are 5 consecutive If both are less than 0.025 liters, it is considered that the interruption exists, otherwise the interruption detection passes.

[0091] Step 1.4, comprehensively judge whether the requirements of "no interruption in exhalation, no coughing, no blocking of the mouthpiece by teeth or tongue, no air leakage, no glottal closure that affects the test, etc." are met.

[0092] Combining the smoothness test result R1 with the intermediate test result R2, a comprehensive judgment is made as to whether the exhalation process is uninterrupted and free of abnormal interference, thereby determining whether it meets the requirements.

[0093] Specifically, define the end result for: ;

[0094] in, represents the smoothness test result, Indicates the interrupt detection result. , All indicate that the test has passed. It means that the requirements are met, that is, the exhalation process is not interrupted and there is no abnormal interference. Indicates that the requirement is not met.

[0095] Step 2: Analyze the correct measurement results of the user.

[0096] The results of the analysis mainly include: obstructive ventilation disorder, restrictive ventilation disorder and mixed ventilation disorder.

[0097] The characteristics of the above three ventilation disorders are as follows: Obstructive ventilation disorder: the descending branch of the FV curve in the expiratory phase is concave toward the horizontal axis; the VT curve shows that the expiratory time is prolonged; the flow index FEV1 / FVC decreases; FEV1 is normal → decreases.

[0098] Restrictive ventilation disorder: The horizontal axis of the FV curve narrows, and the curve becomes long and narrow; the vertical axis of the VT curve decreases, and the expiratory platform appears early; the volume index VC (FVC) decreases; FEV1 is normal → decreases.

[0099] Mixed ventilation disorder: The horizontal axis of the FV curve is narrowed, and the descending branch of the expiratory phase is concave toward the horizontal axis; the VT curve shows a decrease in the vertical axis and prolonged exhalation time; the volume and flow indicators FVC, FEV1 and FEV1 / FVC are all decreased.

[0100] In this embodiment, during the analysis, according to the capacity flow vector , that is, each element represents the instantaneous flow rate (liters / second) after filtering, and the time capacity vector , that is, each tuple element , is the time (seconds), The cumulative exhaled volume (liters) is combined with the patient's basic information and static lung function indicators, including: age, height, weight, gender (male = 1, female = 0); VC, TLC (allowed fluctuations of ± 20%); FRC, RV (allowed fluctuations of ± 20% ~ 35%, or even 40%); RV / TLC (20% ~ 35% for healthy young people, increasing with age); FEV1, FVC, PEF (static measurement values, reference lower limit is 80%); FEV1 / FVC (expected to be greater than 92%); MVV (≥ 75% is normal, 60% ~ 75% is a mild decrease, 40% ~ 60% is a moderate decrease, and < 40% is a severe decrease), output analysis results and diagnostic suggestions, point out that the patient has obstructive ventilation disorder, restrictive ventilation disorder or mixed ventilation disorder, and give further treatment instructions.

[0101] Specifically, step 2 includes the following steps: Step 2.1, feature extraction and data construction.

[0102] The key dynamic features reflecting the morphology of FV and VT curves are extracted from the time series data, and a complete feature vector is constructed in combination with static indicators to capture the clinical characteristics of various ventilation disorders.

[0103] First, extract the dynamic feature PEF (peak expiratory flow): , represents the peak flow during exhalation and is used to reflect the downward trend commonly seen in obstructive ventilatory disorders.

[0104] Next, calculate the average slope : ;

[0105] The average slope is used to reflect the volume during the entire exhalation process. The rate of increase over time is often manifested as a narrow and long curve with a large average slope for restrictive ventilatory disorders, while mixed ventilatory disorders are accompanied by both stenosis and prolonged expiratory time.

[0106] Concave curve index CI: It is defined as the deviation of the descending branch of the FV curve in the expiratory phase from the ideal straight line (from the starting point to the PEF point). The calculation formula is: ;

[0107] in, is the predicted flow rate of the jth data point on the straight line model (calculated by the straight line formed by the starting point and the PEF point), is the number of data points from the PEF point to the end, is the jth smoothed volume flow vector. In case of obstructive ventilation disorder, the descending branch of the expiratory phase is concave toward the horizontal axis, and the CI is higher. Mixed ventilation disorder also has concave performance.

[0108] Platform advance index PI: Define the time when the exhalation platform appears through the VT curve The starting time when the continuous volume change rate is lower than a certain threshold (for example, less than 50% of the average increment) and the total exhalation time ratio: ;

[0109] Restrictive ventilation disorders are often manifested as an early expiratory plateau, that is, a lower PI, while obstructive ventilation disorders are manifested as prolonged expiratory time and a higher PI.

[0110] The above dynamic features are constructed into vectors: , where each element is the peak expiratory flow, average slope, curve height index, and platform advance index. Afterwards, the dynamic features are combined with the above basic patient information and static indicators to construct a complete feature vector.

[0111] Step 2.2, XGBoost model construction and training.

[0112] Using the constructed training data set ( ) Build an XGBoost classification model to distinguish obstructive, restrictive, and mixed ventilatory disorders.

[0113] In this embodiment, the objective function of the XGBoost classification model is for: ;

[0114] In the formula, is the cross entropy loss (multi-classification), which is expressed as: ;

[0115] C=3, is the tree complexity regularization term.

[0116] Hyperparameter settings: Maximum learning rate Range 3~10; learning rate Range 0.01~0.3; subsampling ratio Range: 0.5~1.0; Number of iterations: 300 (adjusted according to the amount of data).

[0117] During model training, The XGBoost library was input, and cross-validation was used to adjust the parameters. The decision tree was constructed through iterations. The residual was updated using the gradient boosting method in each iteration until the objective function converged, so as to improve the accuracy and intelligence of the trained XGBoost classification model in distinguishing various types of ventilation disorders.

[0118] Step 2.3, model performance evaluation and verification.

[0119] The trained XGBoost classification model was rigorously evaluated through cross-validation to ensure that it has higher accuracy, sensitivity and specificity in distinguishing obstructive, restrictive and mixed ventilation disorders, and to generate a more reliable prediction result for home users based on the parameters measured by the expiratory peak flow meter and provide corresponding diagnostic suggestions.

[0120] Cross-validation calculation accuracy: Accuracy = number of correctly classified samples / total number of samples Calculate the sensitivity and specificity of each category: Sensitivity = TP / (TP+FN), Specificity = TN / (TN+FP) Among them, TP, FN, TN, and FP are the numbers of true positives, false negatives, true negatives, and false positives, respectively.

[0121] Index requirements: overall accuracy ≥ 80%, the target in this case is 90%; all types of sensitivity and specificity are ≥ 75%.

[0122] Step 2.4: User data prediction and diagnosis suggestion output.

[0123] The trained XGBoost classification model is used to predict the complete feature vector of the current user, output the specific lung function status classification results, and give detailed diagnostic suggestions based on the clinical curve characteristics.

[0124] Model prediction: The complete feature vector of the current user Bring in the trained XGBoost classification model, calculate and output the probability distribution of each category of obstacles : ;

[0125] in, represents the probability of predicting obstructive ventilation disorder, represents the probability of predicting restrictive ventilation obstruction, Represents the probability of predicting mixed ventilatory disorder.

[0126] The final predicted category result is the ventilation disorder category with the highest probability.

[0127] In this embodiment, the criteria for determining obstructive ventilation disorder are: the descending branch of the expiratory phase of the FV curve is concave toward the horizontal axis (higher concavity index CI), the VT curve shows prolonged expiratory time; and the flow index FEV1 / FVC decreases.

[0128] The criteria for determining restrictive ventilation disorder are: the horizontal axis of the FV curve is narrowed and long; the vertical axis of the VT curve decreases and the expiratory platform is advanced (lower PI); the volume indicators VC and FVC decrease.

[0129] The criteria for determining mixed ventilation disorder are: the presence of both a concave FV curve and a narrowed curve; the VT curve shows a decrease in the vertical axis and a prolonged exhalation time; and all capacity and flow indicators decrease.

[0130] According to the prediction results , the corresponding diagnostic suggestions are as follows: like (Obstructive), then the output is: "Suspected obstructive ventilation disorder. The descending branch of the FV curve in the expiratory phase is concave toward the horizontal axis, the VI curve shows prolonged expiratory time, and the flow index FEV1 / FVC decreases. Further detailed pulmonary function tests and respiratory etiology assessments are recommended." like (Restrictive), then the output is: "Suspected restrictive ventilation disorder. The horizontal axis of the FV curve is narrow and long, the VT curve shows that the expiratory platform appears early and the vertical axis decreases, and the capacity index (VC, FVC) decreases. It is recommended to check the chest, respiratory muscles and lung interstitium, and go to the hospital for reexamination if necessary." like (Mixed), then the output is: "Suspected mixed ventilation disorder. The FV curve shows a narrowing of the horizontal axis and the descending branch sinks back to the horizontal axis during the expiratory phase. The VT curve shows a decrease in the vertical axis and a prolonged expiratory time. At the same time, both volume and flow indicators (FVC, FEV1, FEV1 / FVC) are reduced. It is recommended to seek medical attention in time to confirm the diagnosis." Output prediction confidence: Output the highest probability value of the prediction category at the same time (such as confidence ≥ 70% is more reliable). If it is lower than this value, repeat the measurement and prediction.

[0131] In the description of the present invention, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. "Multiple" means two or more, unless otherwise clearly and specifically defined.

[0132] In the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", "fixed" and the like should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, it can be the internal connection of two elements or the interaction relationship between two elements. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0133] In the present invention, unless otherwise clearly specified and limited, a first feature being "above" or "below" a second feature may mean that the first and second features are in direct contact, or the first and second features are in indirect contact through an intermediate medium. Moreover, a first feature being "above", "above" or "above" a second feature may mean that the first feature is directly above or obliquely above the second feature, or simply means that the first feature is higher in level than the second feature. A first feature being "below", "below" or "below" a second feature may mean that the first feature is directly below or obliquely below the second feature, or simply means that the first feature is lower in level than the second feature.

[0134] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, unless they are contradictory.

[0135] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present invention includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by those skilled in the art to which the embodiments of the present invention belong.

[0136] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples (non-exhaustive list) of computer-readable media include the following: an electrical connection with one or more wires (electronic device), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways if necessary, and then stored in a computer memory.

[0137] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0138] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.

[0139] In addition, each functional unit in each embodiment of the present invention may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.

[0140] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.

Claims

1. A pulmonary function instrument data processing system based on data analysis, characterized in that: The system includes a plurality of expiratory peak flow meters and a cloud platform, wherein the cloud platform is connected to a plurality of medical systems; The expiratory peak flow meter is used to measure lung function parameters; The database of the cloud platform has a user table and multiple data tables, the user table is used to store individual information and user tags input by the user, and the data table is used to store lung function parameters, measurement time, FV curve and VT curve, and feature vectors constructed in combination with user individual information; Wherein, the latest data table among the multiple data tables is the first data table, and when the amount of data stored in the first data table exceeds a first preset value, a second data table is created; When the ventilation disorder prediction result output by the trained XGBoost classification model is inconsistent with the actual result, the prediction result inconsistent with the actual result and its corresponding data table and user are marked to update the data table and user table.

2. A method for processing pulmonary function instrument data based on data analysis, characterized in that: The method is implemented by the pulmonary function meter data processing system based on data analysis according to claim 1, and the method comprises: Acquiring user measurement data through an expiratory peak flow meter, and preprocessing the user measurement data; Fitting the FV curve and VT curve based on the preprocessed user measurement data, and selecting the correct lung function parameters from the user measurement data according to the FV curve and VT curve to construct a feature vector in combination with the static index; The real-time measurement data is used as input to the trained XGBoost classification model to output the prediction results of ventilation disorder; Among them, the static indicator is the individual information input by the user, and the trained XGBoost classification model is trained based on the feature vector and the corresponding ventilation disorder prediction result.

3. The method for processing pulmonary function instrument data based on data analysis according to claim 2, characterized in that: The step of obtaining user measurement data through an expiratory peak flow meter and preprocessing the user measurement data includes: constructing an original flow vector based on the lung function parameter, and performing moving average filtering on the original flow vector to construct a smoothed volume flow vector and a time volume vector; Calculate the flow changes of adjacent data points of the smoothed capacity flow vector, and calculate the standard deviation of all flow changes, so as to determine whether the capacity flow vector is smooth and continuous according to a set smoothing threshold, and perform a smoothness test on the capacity flow vector; The flow change is the difference between the capacity flow vector and an adjacent data point.

4. The method for processing pulmonary function instrument data based on data analysis according to claim 3, characterized in that: The method of obtaining user measurement data through an expiratory peak flow meter and preprocessing the user measurement data further includes: Extracting a first time capacity vector from the smoothed time capacity vector, and calculating adjacent increments of the first time capacity vector to calculate an average value of all adjacent increments to obtain an average capacity increment; Determine whether there are a first number of consecutive data points with an average capacity increment lower than a first threshold, and perform interruption detection on the time capacity vector to obtain an interruption detection result; Among them, the adjacent increment is the difference between the data points adjacent to the first time capacity vector and the first time capacity vector. When the average capacity increment of a first number of consecutive data points is lower than a first threshold, it is determined to be an interruption.

5. The method for processing pulmonary function instrument data based on data analysis according to claim 2, characterized in that: The method of fitting the FV curve and the VT curve based on the preprocessed user measurement data, and selecting the correct lung function parameters from the user measurement data according to the FV curve and the VT curve to construct a feature vector in combination with the static index includes: Extracting the key dynamic features from the measured data in the form of time series data, the key dynamic features including peak expiratory flow, the rate of volume increase during exhalation, the degree of deviation of the descending branch of the FV curve in the expiratory phase from the ideal straight line, and a platform advance index; A dynamic feature vector is constructed based on the key dynamic feature, and the key dynamic feature is combined with the basic information of the patient and the static index to construct a complete feature vector.

6. The method for processing pulmonary function instrument data based on data analysis according to claim 5, characterized in that: The real-time measurement data is used as the input of the trained XGBoost classification model to output the prediction results of ventilation disorder, which previously included: Constructing a training data set based on the feature vector, and establishing an XGBoost classification model according to the training data set, wherein the objective function of the XGBoost classification model is composed of a cross entropy loss and a tree complexity regularization term; The training data set is used as the input of the XGBoost classification model, cross-validation is used to adjust the parameters, and a decision tree is constructed through rounds of iterations. In each round of iteration, the residual is updated by the gradient boosting algorithm until the objective function converges, so as to train the XGBoost classification model; Among them, the hyperparameter settings of the XGBoost classification model include maximum depth, learning rate, subsampling ratio and number of iterations.

7. The method for processing pulmonary function instrument data based on data analysis according to claim 6, characterized in that: The real-time measurement data is used as the input of the trained XGBoost classification model to output the prediction result of ventilation disorder, and the previous method also includes: Calculate the accuracy of the trained XGBoost classification model output through cross-validation, where the accuracy is the ratio between the number of correctly classified samples and the total number of samples, and complete the accuracy evaluation of the XGBoost classification model when the accuracy is not lower than a second threshold; The sensitivity and specificity of each category are calculated, where the sensitivity is the ratio of the number of true positives to the sum of the number of true positives and the number of false negatives, and the specificity is the ratio of the number of true negatives to the sum of the number of true negatives and the number of false positives. The sensitivity evaluation and specificity evaluation of the XGBoost classification model are completed when the sensitivity and specificity are not lower than the third threshold.

8. The method for processing pulmonary function instrument data based on data analysis according to claim 7, characterized in that: Types of ventilation disorders include obstructive ventilation disorder, restrictive ventilation disorder and mixed ventilation disorder; The real-time measurement data is used as input to the trained XGBoost classification model to output the prediction results of ventilation disorder, including: The complete current feature vector of the current user is used as the input of the trained XGBoost classification model to call the trained XGBoost classification model to calculate and output the probability distribution of each obstacle and the highest probability value of each category; When the highest probability value of any category is lower than the fourth threshold, the highest probability value of the corresponding category is re-measured and recalculated until the highest probability value is not lower than the fourth threshold; The probability distribution of each obstacle includes the probability of obstructive ventilation obstacle, the probability of restrictive ventilation obstacle and the probability of mixed ventilation obstacle.

9. A terminal comprising a processor and a storage medium; characterized in that: The storage medium is used to store instructions; The processor is configured to operate according to the instructions to execute the steps of the method according to any one of claims 2-8.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method according to any one of claims 2 to 8 are implemented.

Citation Information

Patent Citations

  • Forced expiration total amount prediction method

    CN113469227A

  • Lung function measuring method based on human body form phenotype

    CN114242242A

  • System and method for assisting in diagnosis, therapy and / or monitoring of a functional lung disease

    US20030013946A1

  • Computer-based data optimization and sensitivity analysis

    US20100306639A1

Cited By

  • Lung function specific disease interpretation device and computer equipment

    CN120198428A