Gas flow rate calculation method and device in breathing state, equipment and storage medium
By obtaining the cycle data of the respiratory signal square wave diagram and the turbine fan blade rotation cycle, combined with the airflow time function and interference data, the high accuracy calculation of the gas flow rate in the breathing state is realized, and the problem of large errors in the existing technology is solved.
Patent Information
- Application Number
- CN202411364368.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-27
- Publication Date
- 2025-01-28
- Estimated Expiration
- 2044-09-27
AI Technical Summary
The prior art has errors in calculating the gas flow rate in the respiratory state, mainly due to interference factors such as air resistance and respiratory state.
By obtaining the respiratory signal of the user transmitted by the sensor, the breathing state prediction is performed to determine the target breathing state. Then, based on the turbofan rotation cycle data and the initial gas flow rate value, determine the airflow time function and airflow interference data, and finally perform the target flow rate calculation.
The accuracy of the gas flow rate calculation in the breathing state is improved, and the error caused by the interference is reduced.
Smart Images

Figure CN119366902A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a method and device for calculating gas flow rate under breathing state, an electronic device and a storage medium. Background Art
[0002] At present, the common method for calculating gas flow rate under breathing state is usually to use the gas flow rate data obtained by the sensor as the target gas flow rate under breathing state. However, in practice, there are often many interference factors in the calculation process of gas flow rate, such as air resistance, breathing state and other interference factors, which lead to errors in the gas flow rate data obtained by the sensor. Therefore, how to improve the calculation accuracy of gas flow rate under breathing state has become a technical problem that needs to be solved urgently. Summary of the invention
[0003] The main purpose of the embodiments of the present application is to propose a method and device for calculating gas flow rate under breathing state, an electronic device and a storage medium, aiming to improve the calculation accuracy of gas flow rate under breathing state.
[0004] To achieve the above object, a first aspect of an embodiment of the present application provides a method for calculating gas flow rate under a breathing state, the method comprising:
[0005] Obtain a square wave graph of the user's breathing signal transmitted by the sensor;
[0006] Based on the respiratory signal square wave graph, predict the user's respiratory state to obtain the user's target respiratory state;
[0007] Based on the breathing signal square wave diagram, obtaining turbine fan blade rotation cycle data and initial gas flow rate value of the airflow;
[0008] Based on the turbine blade rotation period data and the initial gas flow rate value, determining an airflow time function of the airflow, wherein the airflow time function is used to characterize a mapping relationship between the flow rate and time of the airflow;
[0009] Determining airflow interference data of the airflow based on the turbine blade rotation period data and the airflow time function;
[0010] A target flow rate is calculated for the airflow under the target breathing state based on the airflow time function and the airflow interference data.
[0011] In some embodiments, the breathing signal square wave graph includes a first square wave graph and a second square wave graph, and the predicting of the breathing state of the user based on the breathing signal square wave graph to obtain the target breathing state of the user includes:
[0012] Acquire a first step point and a second step point of the first square wave graph, wherein the first step point is adjacent to the second step point;
[0013] Obtaining a third step point and a fourth step point of the second square wave graph, wherein the third step point is located between the first step point and the second step point, and the fourth step point is adjacent to the third step point in the second square wave graph;
[0014] Obtaining square wave signal values of the first step point, the second step point, the third step point, and the fourth step point;
[0015] Based on the square wave signal value, the target breathing state is determined.
[0016] In some embodiments, the square wave signal value includes a first signal value and a second signal value of a first step point, a third signal value and a fourth signal value of a second step point, a fifth signal value and a sixth signal value of a third step point, and a seventh signal value and an eighth signal value of a fourth step point, and determining the target respiratory state based on the square wave signal value includes:
[0017] If the first signal value, the second signal value, the fifth signal value and the sixth signal value are the same or the third signal value, the fourth signal value, the seventh signal value and the eighth signal value are the same, generating breathing conversion characterization data, and encapsulating the breathing conversion characterization data to obtain the target breathing state, wherein the breathing conversion characterization data is used to characterize that the breathing state of the user changes during the time period from the first step point to the fourth step point;
[0018] If the first signal value, the second signal value, the third signal value, and the eighth signal value are all peak values of the respiratory signal square wave graph, inhalation characterization data is generated, and the inhalation characterization data is data packaged to obtain the target respiratory state, wherein the inhalation characterization data is used to represent that the user is in an inhalation state during a time period from the first step point to the fourth step point;
[0019] If the first signal value, the second signal value, the fourth signal value and the seventh signal value are all peak values of the breathing signal square wave graph, exhalation characterization data is generated, and the exhalation characterization data is data packaged to obtain the target breathing state, wherein the exhalation characterization data is used to characterize that the user is in an exhalation state during the time period from the first step point to the fourth step point.
[0020] In some embodiments, determining the airflow time function of the airflow based on the turbine blade rotation period data and the initial gas flow rate value includes:
[0021] Filtering out the current cycle data of the target moment and the historical cycle data of the previous moment from the turbine blade rotation cycle data, wherein the target moment is an adjacent time point of the previous moment;
[0022] Filtering the current gas flow rate value at the target moment and the historical gas flow rate value at the previous moment from the initial gas flow rate value;
[0023] Calculating the slope of the function curve based on the current cycle data, the historical cycle data, the current gas flow rate value and the historical gas flow rate value;
[0024] The gas flow time function is determined based on the slope of the function curve and the initial gas flow rate value.
[0025] In some embodiments, determining the airflow interference data of the airflow based on the turbine blade rotation period data and the airflow time function includes:
[0026] obtaining a target air density of the airflow;
[0027] Calculating air resistance data of the airflow based on the airflow time function;
[0028] Calculating the damping coefficient of the airflow based on the turbine blade rotation period data;
[0029] Calculating the inertia of the turbine blade based on the slope of the function curve and the airflow time function;
[0030] The target air density, the air resistance data, the damping coefficient and the turbine blade inertia are multiplied and combined to obtain the airflow interference data.
[0031] In some embodiments, the calculating a target flow rate of the airflow under the target breathing state based on the airflow time function and the airflow interference data includes:
[0032] Calculating the duration of the target breathing state to obtain a target duration;
[0033] Based on the target duration, the airflow time function and the airflow interference data are integrated to obtain a target gas flow rate.
[0034] In some embodiments, the sensor includes a first sensor and a second sensor, and the step of obtaining a square wave diagram of a user's breathing signal transmitted by the sensor includes:
[0035] Acquire a first breathing square wave signal of the user received by the first sensor;
[0036] Acquire a second breathing square wave signal of the user received by the second sensor;
[0037] The first respiratory square wave signal and the second respiratory square wave signal are processed for displaying the signals side by side to obtain the respiratory signal square wave graph.
[0038] To achieve the above-mentioned purpose, a second aspect of an embodiment of the present application provides a gas flow rate calculation device under a breathing state, the device comprising:
[0039] A breathing signal acquisition module, used to acquire a square wave diagram of a user's breathing signal transmitted by a sensor;
[0040] A breathing state prediction module, used to predict the breathing state of the user based on the breathing signal square wave diagram to obtain a target breathing state of the user;
[0041] An airflow parameter acquisition module, used for acquiring turbine blade rotation cycle data and an initial gas flow rate value of the airflow based on the breathing signal square wave diagram;
[0042] an airflow function generating module, configured to determine an airflow time function of the airflow based on the turbine blade rotation period data and the initial gas flow rate value, wherein the airflow time function is used to characterize a mapping relationship between the flow rate and time of the airflow;
[0043] an interference data calculation module, for determining airflow interference data of the airflow based on the turbine blade rotation period data and the airflow time function;
[0044] The target flow rate calculation module is used to calculate the target flow rate of the airflow under the target breathing state based on the airflow time function and the airflow interference data.
[0045] To achieve the above objectives, a third aspect of an embodiment of the present application proposes an electronic device, which includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the method described in the first aspect is implemented.
[0046] To achieve the above-mentioned purpose, the fourth aspect of an embodiment of the present application proposes a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described in the first aspect is implemented.
[0047] The gas flow rate calculation method and device, electronic device and storage medium under the breathing state proposed in the present application predict the user's breathing state by acquiring the square wave diagram of the user's breathing signal transmitted by the sensor, thereby clarifying the user's current target breathing state to improve the calculation accuracy of the user's gas flow rate under the breathing state. Furthermore, based on the acquired turbine fan blade rotation cycle data and the initial gas flow rate value of the airflow, an airflow time function that characterizes the mapping relationship between the flow rate and time of the airflow is determined, and based on the turbine fan blade rotation cycle data and the airflow time function, the airflow interference data of the airflow is determined, thereby clarifying the interference factors of the gas flow rate. Finally, based on the airflow time function and the airflow interference data, the target flow rate of the airflow under the target breathing state is calculated, thereby improving the calculation accuracy of the gas flow rate under the breathing state. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] Figure 1 is a flow chart of a method for calculating gas flow rate under a breathing state provided in an embodiment of the present application;
[0049] Figure 2 yes Figure 1 Flow chart of step S101 in FIG.
[0050] Figure 3 yes Figure 1 Flow chart of step S102 in FIG.
[0051] Figure 4 yes Figure 3 Flow chart of step S304 in FIG.
[0052] Figure 5 yes Figure 1 Flow chart of step S104 in FIG.
[0053] Figure 6 yes Figure 1 Flow chart of step S105 in FIG.
[0054] Figure 7 yes Figure 1 Flow chart of step S106 in FIG.
[0055] Figure 8 is a schematic diagram of the structure of a gas flow rate calculation device under a breathing state provided in an embodiment of the present application;
[0056] Fig. 9 It is a schematic diagram of the hardware structure of the electronic device provided in the embodiment of the present application. DETAILED DESCRIPTION
[0057] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0058] It should be noted that, although the functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first", "second", etc. in the specification, claims and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0059] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0060] First, some nouns involved in this application are analyzed:
[0061] Turbine spirometer: A turbine spirometer is a medical device used to measure and evaluate lung function, especially airflow rate and lung capacity. By recording airflow data during forced breathing by a turbine sensor, it can provide important lung function indicators to help doctors diagnose and monitor respiratory diseases such as asthma and chronic obstructive pulmonary disease. The device is usually portable and suitable for clinical and home settings.
[0062] At present, the common method for calculating gas flow rate under breathing state is usually to use the gas flow rate data obtained by the sensor as the target gas flow rate under breathing state. However, in practice, there are often many interference factors in the calculation process of gas flow rate, such as air resistance, breathing state and other interference factors, which lead to errors in the gas flow rate data obtained by the sensor. Therefore, how to improve the calculation accuracy of gas flow rate under breathing state has become a technical problem that needs to be solved urgently.
[0063] Based on this, the embodiments of the present application provide a method and device for calculating the gas flow rate under a breathing state, an electronic device and a storage medium, aiming to improve the calculation accuracy of the gas flow rate under a breathing state.
[0064] The gas flow rate calculation method and device under breathing state, electronic device and storage medium provided in the embodiments of the present application are specifically illustrated through the following embodiments. First, the gas flow rate calculation method under breathing state in the embodiments of the present application is described.
[0065] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0066] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.
[0067] The gas flow rate calculation method under the breathing state provided in the embodiment of the present application relates to the field of data processing technology. The gas flow rate calculation method under the breathing state provided in the embodiment of the present application can be applied to the terminal, can also be applied to the server side, and can also be software running in the terminal or the server side. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, etc.; the server side can be configured as an independent physical server, or it can be configured as a server cluster or a distributed system composed of multiple physical servers, and can also be configured as a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms; the software can be an application that implements the gas flow rate calculation method under the breathing state, etc., but is not limited to the above forms.
[0068] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.
[0069] Figure 1is an optional flow chart of a method for calculating gas flow rate under breathing state provided in an embodiment of the present application, which can be applied to a turbine-type lung function tester. Figure 1 The method may include but is not limited to steps S101 to S106.
[0070] Step S101, obtaining a square wave diagram of a user's breathing signal transmitted by a sensor;
[0071] Step S102, predicting the user's breathing state based on the breathing signal square wave diagram to obtain the user's target breathing state;
[0072] Step S103, based on the square wave diagram of the breathing signal, obtaining the turbine blade rotation cycle data and the initial gas flow rate value of the airflow;
[0073] Step S104, determining an airflow time function of the airflow based on the turbine blade rotation cycle data and the initial gas flow rate value, wherein the airflow time function is used to characterize a mapping relationship between the flow rate and time of the airflow;
[0074] Step S105, determining airflow interference data of the airflow based on the turbine blade rotation cycle data and the airflow time function;
[0075] Step S106, calculating the target flow rate of the airflow under the target breathing state based on the airflow time function and the airflow interference data.
[0076] Steps S101 to S106 shown in the embodiment of the present application predict the user's breathing state and determine the user's target breathing state by acquiring a square wave graph of the user's breathing signal received by a sensor outside the turbine-type pulmonary function tester. Furthermore, based on the time period in the square wave graph of the breathing signal, the turbine blade rotation cycle data and the initial gas flow rate value of the airflow within the time period are acquired. Secondly, based on the turbine blade rotation cycle data and the initial gas flow rate value, an airflow time function that characterizes the mapping relationship between the flow rate and time of the airflow is determined. Based on the turbine blade rotation cycle data and the airflow time function, the airflow interference data of the airflow is determined. Finally, based on the airflow time function and the airflow interference data, the target flow rate of the airflow under the target breathing state is calculated. Therefore, the present application predicts the user's breathing state by acquiring a square wave graph of the user's breathing signal transmitted by a sensor, thereby clarifying the user's current target breathing state to improve the calculation accuracy of the gas flow rate of the user in the breathing state. Furthermore, based on the acquired turbine blade rotation cycle data and the initial gas flow rate value of the airflow, an airflow time function that characterizes the mapping relationship between the flow rate and time of the airflow is determined, and based on the turbine blade rotation cycle data and the airflow time function, the airflow interference data of the airflow is determined, thereby clarifying the interference factors of the gas flow rate. Finally, based on the airflow time function and the airflow interference data, the target flow rate of the airflow in the target breathing state is calculated, thereby improving the calculation accuracy of the gas flow rate in the breathing state.
[0077] In step S101 of some embodiments, the sensor may be a gas flow rate oscilloscope located outside the turbine-type pulmonary function tester, which may be used to measure the speed of gas flow through the sensor when the user breathes. The turbine-type pulmonary function tester may be a medical device for evaluating and measuring lung function. The turbine-type pulmonary function tester includes fan blades, a gas flow rate oscilloscope, a fan blade rotation cycle sensor, and a gas flow rate sensor, wherein the fan blade rotation cycle sensor is used to monitor the cycle of one rotation of the fan blade, and the gas flow rate sensor is used to monitor the size of the gas flow rate passing through the turbine-type pulmonary function tester.
[0078] It should be noted that in this application, in order to predict the user's breathing state when using the turbine-type pulmonary function tester, two sensors can be set in the turbine-type pulmonary function tester to determine the direction of the airflow, wherein the two sensors are a first sensor and a second sensor, the first sensor is located on the side close to the user's mouth, and the second sensor is located on the side away from the user's mouth.
[0079] The present application can obtain the breathing square wave signals of two users by acquiring the first breathing square wave signal of the user received by the first sensor and the second breathing square wave signal of the user received by the second sensor, and then display the first breathing square wave signal and the second breathing square wave signal side by side in the same graph to obtain the user's breathing signal square wave graph.
[0080] For details, see Figure 2 In some embodiments, step S101 may include but is not limited to steps S201 to S203:
[0081] Step S201, acquiring a first breathing square wave signal of a user received by a first sensor;
[0082] Step S202, obtaining a second breathing square wave signal of the user received by a second sensor;
[0083] Step S203 , performing signal side-by-side display processing on the first respiratory square wave signal and the second respiratory square wave signal to obtain a respiratory signal square wave diagram.
[0084] In steps S201 and S202 of some embodiments, a first sensor is used to monitor the flow rate of gas passing through the sensor when the user breathes to obtain a first breathing square wave signal, and a second sensor is used to monitor the flow rate of gas passing through the sensor when the user breathes to obtain a second breathing square wave signal.
[0085] In step S203 of some embodiments, the first respiratory square wave signal and the second respiratory square wave signal are placed on the same coordinate axis and displayed side by side, so as to obtain a user's respiratory signal square wave graph, wherein the horizontal axis of the coordinate axis is the time axis.
[0086] In steps S201 to S203 shown in the present embodiment, a first breathing square wave signal of the user is received by the first sensor, and a second breathing square wave signal of the user is received by the second sensor. The first breathing square wave signal and the second breathing square wave signal are processed to be displayed side by side to obtain a breathing signal square wave graph, which can facilitate comparison of the difference between the first breathing square wave signal and the second breathing square wave signal, thereby realizing prediction of the user's breathing state.
[0087] In step S102 of some embodiments, by analyzing the signal values of the step points of the first square wave graph and the second square wave graph in the respiratory signal square wave graph, the user's respiratory state in the time period in the respiratory signal square wave graph, that is, the target respiratory state, can be determined.
[0088] For details, see Figure 3 In some embodiments, step S102 may include but is not limited to steps S301 to S304:
[0089] Step S301, obtaining a first step point and a second step point of a first square wave graph, wherein the first step point is adjacent to the second step point;
[0090] Step S302, obtaining a third step point and a fourth step point of the second square wave graph, wherein the third step point is located between the first step point and the second step point, and the fourth step point and the third step point are adjacent in the second square wave graph;
[0091] Step S303, obtaining square wave signal values of the first step point, the second step point, the third step point and the fourth step point;
[0092] Step S304, determining the target breathing state based on the square wave signal value.
[0093] In step S301 and step S302 of some embodiments, the first step point and the second step point are obtained by marking two adjacent step points in the first square wave graph, and then the third step point included between the first step point and the second step point is searched from the second square wave graph, and the step point adjacent to the third step point in the second square wave graph is marked as the fourth step point.
[0094] In step S303 and step S304 of some embodiments, the time points represented by the first step point, the second step point, the third step point and the fourth step point can be marked in the breathing signal square wave graph, and then the signal values of the corresponding first square wave graph and the second square wave graph are searched according to the marked time points to obtain the square wave signal values. For example, the first step point is the time point when the first square wave graph jumps from 0 to 1. At this time, the signal value of the second square wave graph is 0, and the square wave signal value of the first step point is (1,0). Furthermore, according to the specific numerical value of the acquired square wave signal value, the user's breathing state can be estimated, thereby obtaining the user's target breathing state.
[0095] For details, see Figure 4 In some embodiments, step S304 may include but is not limited to steps S401 to S403:
[0096] Step S401, if the first signal value, the second signal value, the fifth signal value and the sixth signal value are the same or the third signal value, the fourth signal value, the seventh signal value and the eighth signal value are the same, then generating breathing conversion characterization data, and encapsulating the breathing conversion characterization data to obtain a target breathing state, wherein the breathing conversion characterization data is used to characterize that the user's breathing state changes during the time period from the first step point to the fourth step point;
[0097] Step S402, if the first signal value, the second signal value, the third signal value and the eighth signal value are all peak values of the respiratory signal square wave graph, then inhalation characterization data is generated, and the inhalation characterization data is data packaged to obtain a target respiratory state, wherein the inhalation characterization data is used to represent that the user is in an inhalation state during a time period from the first step point to the fourth step point;
[0098] Step S403: If the first signal value, the second signal value, the fourth signal value and the seventh signal value are all peak values of the square wave graph of the breathing signal, exhalation characterization data is generated, and the exhalation characterization data is packaged to obtain the target breathing state, wherein the exhalation characterization data is used to characterize that the user is in an exhalation state during the time period from the first step point to the fourth step point.
[0099] In steps S401 to S403 of some embodiments, the first signal is the signal value corresponding to the first step point in the first sensor, the third signal is the signal value corresponding to the second step point in the first sensor, the fifth signal is the signal value corresponding to the third step point in the first sensor, the seventh signal is the signal value corresponding to the fourth step point in the first sensor, the second signal is the signal value corresponding to the first step point in the second sensor, the fourth signal is the signal value corresponding to the second step point in the second sensor, the sixth signal is the signal value corresponding to the third step point in the second sensor, and the eighth signal is the signal value corresponding to the fourth step point in the second sensor.
[0100] In the present application, when the first signal value, the second signal value, the fifth signal value and the sixth signal value are the same, or the third signal value, the fourth signal value, the seventh signal value and the eighth signal value are the same, it indicates that the user's breathing state has changed in the time period from the first step point to the fourth step point, for example, from the exhalation state to the inhalation state, from the inhalation state to the exhalation state, etc. At this moment, the turbine-type pulmonary function tester can generate breathing conversion characterization data, and then data-encapsulate the breathing conversion characterization data to obtain the user's target breathing state. When the first signal value, the second signal value, the third signal value and the eighth signal value are all peak values of the breathing signal square wave graph, it indicates that the user has been in the inhalation state. At this moment, the turbine-type pulmonary function tester can generate inhalation characterization data, and then data-encapsulate the inhalation characterization data to obtain the user's target breathing state. When the first signal value, the second signal value, the fourth signal value and the seventh signal value are all peak values of the breathing signal square wave graph, it indicates that the user has been in the exhalation state. At this moment, the turbine-type pulmonary function tester can generate exhalation characterization data, and then data-encapsulate the exhalation characterization data to obtain the user's target breathing state.
[0101] In steps S401 to S403 shown in the present embodiment, the square wave signal value combination of the first signal value, the second signal value, the third signal value, the fourth signal value, the fifth signal value, the sixth signal value, the seventh signal value and the eighth signal value are compared with a pre-set mapping table of breathing states and signal values. This can clarify the target breathing state of the user, thereby reducing the influence of the breathing state on the calculation of the gas flow rate, and improving the calculation accuracy of the gas flow rate under the breathing state.
[0102] In steps S301 to S304 shown in the present embodiment, by acquiring adjacent first step points and second step points in the first square wave graph, acquiring a third step point located between the first step point and the second step point in the second square wave graph, and a fourth step point adjacent to the third step point in the second square wave graph, and then acquiring the signal value of each step point in the first square wave graph and the second square wave graph, square wave signal values of the first step point, the second step point, the third step point and the fourth step point are obtained. Finally, the target breathing state of the user is determined according to the square wave signal values, which can improve the accuracy of the prediction of the breathing state, thereby improving the accuracy of the calculation of the gas flow rate under the breathing state.
[0103] In step S103 of some embodiments, after obtaining the square wave graph of the breathing signal, the turbine blade rotation cycle data and the initial gas flow rate value of the airflow of the turbine-type pulmonary function tester are queried according to the time period occupied by the square wave signal in the square wave graph of the breathing signal, thereby achieving the acquisition of the turbine blade rotation cycle data and the initial gas flow rate value of the airflow. It should be noted that the turbine blade rotation cycle data and the initial gas flow rate value of the airflow can be acquired through specific sensors, among which the turbine blade rotation cycle data can be acquired through the blade rotation cycle sensor, and the initial gas flow rate value of the airflow can be acquired through the gas flow rate sensor.
[0104] In step S104 of some embodiments, an airflow time function representing a mapping relationship between the flow velocity and time of the airflow can be generated based on the acquired turbine blade rotation cycle data and the initial gas flow velocity value.
[0105] For details, see Figure 5 In some embodiments, step S104 may include but is not limited to steps S501 to S504:
[0106] Step S501, filtering out the current cycle data of the target moment and the historical cycle data of the previous moment from the turbine blade rotation cycle data, wherein the target moment is an adjacent time point of the previous moment;
[0107] Step S502, filtering out the current gas flow rate value at the target moment and the historical gas flow rate value at the previous moment from the initial gas flow rate value;
[0108] Step S503, calculating the slope of the function curve based on the current cycle data, the historical cycle data, the current gas flow rate value and the historical gas flow rate value;
[0109] Step S504, determining the airflow time function based on the slope of the function curve and the initial gas flow rate value.
[0110] In steps S501 and S502 of some embodiments, the turbine blade rotation cycle data of adjacent moments are filtered out from the turbine blade rotation cycle data to obtain the current cycle data of the target moment and the historical cycle data of the previous moment, and the initial gas flow rate values of adjacent moments are filtered out from the initial gas flow rate values to obtain the current gas flow rate value of the target moment and the historical gas flow rate value of the previous moment.
[0111] In step S503 of some embodiments, the difference between the current gas flow rate value and the historical gas flow rate value is calculated to obtain the gas flow rate difference, and then the difference between the current cycle data and the historical cycle data is calculated to obtain the turbine blade rotation cycle difference. Finally, the gas flow rate difference is divided by the turbine blade rotation cycle difference to obtain the slope of the airflow time function, that is, the slope of the function curve.
[0112] The application can use the following formula to calculate the slope of the function curve of the airflow time function:
[0113]
[0114] Among them, B represents the slope of the function curve, q represents the time q corresponding to the square wave signal in the respiratory signal square wave diagram, B[q] represents the slope of the function curve of the airflow time function when the time is q, FT[q] represents the initial gas flow rate value when the time is q, FT[q-1] represents the initial gas flow rate value when the time is q-1, HT[q-1] represents the turbine blade rotation cycle data when the time is q-1, and HT[q] represents the turbine blade rotation cycle data when the time is q.
[0115] In step S504 of some embodiments, an airflow time function of the airflow may be generated according to the slope of the function curve, the time data occupied by the square wave signal in the respiratory signal square wave diagram, and the initial gas flow rate value.
[0116] The application can use the following formula to calculate the airflow time function:
[0117] F(q)=B[q]*q+FT[q] (2)
[0118] Wherein, F(q) represents the airflow time function, B[q] represents the slope of the function curve of the airflow time function when the time is q, q represents the time q corresponding to the square wave signal in the respiratory signal square wave diagram, and FT[q] represents the initial gas flow rate value when the time is q.
[0119] In steps S501 to S504 shown in the present embodiment, the current cycle data of the target moment and the historical cycle data of the previous moment are screened out from the turbine blade rotation cycle data, and the current gas flow rate value of the target moment and the historical gas flow rate value of the previous moment are screened out from the initial gas flow rate value. Then, the slope of the function curve is calculated based on the current cycle data, the historical cycle data, the current gas flow rate value and the historical gas flow rate value. Furthermore, the airflow time function is determined based on the slope of the function curve and the initial gas flow rate value, which can clarify the mapping relationship between the initial gas flow rate value and time, so as to facilitate the subsequent accurate calculation of the gas flow rate.
[0120] In step S105 of some embodiments, interference data affecting the gas flow rate are calculated one by one based on the acquired airflow time function and turbine blade rotation period data, so as to obtain airflow interference data.
[0121] For details, see Figure 6 In some embodiments, step S105 may include but is not limited to steps S601 to S605:
[0122] Step S601, obtaining the target air density of the airflow;
[0123] Step S602, calculating air resistance data of the airflow based on the airflow time function;
[0124] Step S603, calculating the damping coefficient of the airflow based on the turbine blade rotation cycle data;
[0125] Step S604, calculating the inertia of the turbine blade based on the slope of the function curve and the airflow time function;
[0126] Step S605, multiply and combine the target air density, air resistance data, damping coefficient and turbine blade inertia to obtain airflow interference data.
[0127] In step S601 of some embodiments, the target air density under the current conditions can be calculated by measuring the user's oral gas temperature and the air density at the international reference temperature.
[0128] Specifically, the present application can use the following formula to calculate the target air density under the current conditions:
[0129] P=p0*(1-a*(Tn-T0)) (3)
[0130] Among them, P represents the target air density, p0 represents the air density at the international reference temperature, a represents the thermal expansion coefficient of air, Tn represents the user's oral gas temperature, and T0 represents the international reference temperature.
[0131] In steps S602 to S604 of some embodiments, the air flow time function is multiplied by the first parameter data simulated by the gas flow simulator to obtain the air resistance data of the air flow, and the turbine blade rotation period data is multiplied by the second parameter data simulated by the gas flow simulator to obtain the damping coefficient of the air flow. According to the slope of the function curve and the air flow time function, the inertia of the turbine blade of the turbine pulmonary function tester can be calculated, wherein the gas flow simulator can obtain the first parameter data, the second parameter data and the third parameter data by simulating the flow velocity curve of the air flow at a flow rate of 0L / min-850L / min.
[0132] This application can use the following formula to calculate the air resistance data of the airflow:
[0133] R=k1*F(q) (4)
[0134] Wherein, R represents air resistance data, k1 represents first parameter data, and F(q) represents airflow time function.
[0135] The damping coefficient of the airflow can be calculated using the following formula:
[0136] D=k2*HT[q] (5)
[0137] Wherein, D represents the damping coefficient, k2 represents the second parameter data, and HT[q] represents the turbine blade rotation period data.
[0138] The application can use the following formula to calculate the turbine blade inertia:
[0139]
[0140] Among them, I represents the inertia of the turbine blade, B[q] represents the slope of the function curve of the airflow time function when the time is q, B[q-1] represents the slope of the function curve of the airflow time function when the time is q-1, F(q) represents the airflow time function, and k3 represents the third parameter data.
[0141] In step S605 of some embodiments, the target air density, air resistance data, damping coefficient and turbine blade inertia are multiplied to obtain airflow interference data of the airflow.
[0142] This application can use the following formula to calculate the airflow interference data:
[0143] G(q)=R*D*I*P (7)
[0144] Among them, G(q) represents the airflow interference data at time q, R represents the air resistance data, D represents the damping coefficient, I represents the inertia of the turbine blade, and P represents the target air density.
[0145] In steps S601 to S605 shown in the present embodiment, the target air density of the airflow is obtained, and then the air resistance data of the airflow is calculated according to the airflow time function, the damping coefficient of the airflow is calculated according to the turbine blade rotation period data, and the turbine blade inertia is calculated according to the slope of the above function curve and the airflow time function. Finally, the target air density, air resistance data, damping coefficient and turbine blade inertia are multiplied and combined to obtain the airflow interference data that affects the gas flow rate, thereby eliminating the degree of interference of the airflow interference data on the calculation of the gas flow rate, thereby improving the calculation accuracy of the gas flow rate.
[0146] In step S106 of some embodiments, the time length of the target breathing state is calculated to obtain the target duration, and then the airflow time function and the airflow interference data are integrated according to the target duration to obtain the target gas flow rate.
[0147] For details, see Figure 7 In some embodiments, step S106 may include but is not limited to steps S701 to S702:
[0148] Step S701, calculating the duration of the target breathing state to obtain the target duration;
[0149] Step S702: Based on the target duration, the airflow time function and the airflow interference data are integrated to obtain the target gas flow rate.
[0150] In step S701 of some embodiments, the target duration can be obtained by recording the duration of the target breathing state.
[0151] In step S702 of some embodiments, the gas flow rate monomer data is obtained by multiplying the airflow time function with the airflow interference data, and then the gas flow rate monomer data is integrated according to the above-mentioned target duration to obtain the target gas flow rate of the user in the target breathing state.
[0152] This application can use the following formula to calculate the target gas flow rate:
[0153] V t =∫0 t F(q)*G(q)dq (8)
[0154] Among them, V trepresents the target gas flow rate, t represents the target duration, F(q) represents the airflow time function, and G(q) represents the airflow interference data at time q.
[0155] In steps S701 to S702 shown in the present embodiment, by integrating the flow-time function and the airflow interference data within the time length of the target breathing state, the target gas flow rate of the user in the target breathing state can be obtained, and the influence of the airflow interference factors on the gas flow rate is eliminated, thereby improving the calculation accuracy of the gas flow rate.
[0156] The present application predicts the user's breathing state by acquiring a square wave graph of the user's breathing signal transmitted by a sensor, thereby clarifying the user's current target breathing state to improve the calculation accuracy of the gas flow rate of the user in the breathing state. Furthermore, based on the acquired turbine blade rotation cycle data and the initial gas flow rate value of the airflow, an airflow time function that characterizes the mapping relationship between the flow rate and time of the airflow is determined, and based on the turbine blade rotation cycle data and the airflow time function, the airflow interference data of the airflow is determined to clarify the interference factors of the gas flow rate. Finally, based on the airflow time function and the airflow interference data, the target flow rate of the airflow in the target breathing state is calculated, thereby improving the calculation accuracy of the gas flow rate in the breathing state.
[0157] See also Figure 8 The embodiment of the present application further provides a gas flow rate calculation device under a breathing state, which can implement the gas flow rate calculation method under the breathing state, and the device includes:
[0158] A breathing signal acquisition module 801 is used to acquire a square wave diagram of a user's breathing signal transmitted by a sensor;
[0159] A breathing state prediction module 802 is used to predict the breathing state of the user based on the breathing signal square wave diagram to obtain the user's target breathing state;
[0160] The airflow parameter acquisition module 803 is used to acquire the turbine blade rotation cycle data and the initial gas flow rate value of the airflow based on the breathing signal square wave diagram;
[0161] The airflow function generating module 804 is used to determine the airflow time function of the airflow based on the turbine blade rotation cycle data and the initial gas flow rate value, wherein the airflow time function is used to characterize the mapping relationship between the flow rate and time of the airflow;
[0162] The interference data calculation module 805 is used to determine the airflow interference data of the airflow based on the turbine blade rotation period data and the airflow time function;
[0163] The target flow rate calculation module 806 is used to calculate the target flow rate of the airflow under the target breathing state based on the airflow time function and the airflow interference data.
[0164] The specific implementation of the gas flow rate calculation device under the breathing state is basically the same as the specific implementation of the gas flow rate calculation method under the breathing state mentioned above, and will not be repeated here.
[0165] The embodiment of the present application also provides an electronic device, the electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the gas flow rate calculation method under the breathing state when executing the computer program. The electronic device can be any smart terminal including a tablet computer, a car computer, etc.
[0166] See also Fig. 9 , Fig. 9 The hardware structure of an electronic device of another embodiment is illustrated, and the electronic device includes:
[0167] The processor 901 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;
[0168] The memory 902 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 902 can store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 902, and the processor 901 calls and executes the gas flow rate calculation method under the breathing state of the embodiment of this application;
[0169] Input / output interface 903, used to implement information input and output;
[0170] Communication interface 904, used to realize communication interaction between the device and other devices, which can be realized by wired mode (such as USB, network cable, etc.) or wireless mode (such as mobile network, WIFI, Bluetooth, etc.);
[0171] A bus 905 that transmits information between various components of the device (e.g., the processor 901, the memory 902, the input / output interface 903, and the communication interface 904);
[0172] The processor 901 , the memory 902 , the input / output interface 903 and the communication interface 904 are connected to each other in communication within the device via a bus 905 .
[0173] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the gas flow rate calculation method under the above-mentioned breathing state is implemented.
[0174] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0175] The gas flow rate calculation method under breathing state, the gas flow rate calculation device under breathing state, the electronic device and the storage medium provided in the embodiments of the present application are applied to a turbine-type pulmonary function tester. By acquiring the square wave graph of the user's breathing signal received by the sensor outside the turbine-type pulmonary function tester, the user's breathing state is predicted and the user's target breathing state is determined. Furthermore, according to the time period in the square wave graph of the breathing signal, the turbine fan blade rotation cycle data and the initial gas flow rate value of the airflow within the time period are acquired. Secondly, according to the turbine fan blade rotation cycle data and the initial gas flow rate value, the airflow time function that characterizes the mapping relationship between the flow rate and time of the airflow is determined, and according to the turbine fan blade rotation cycle data and the airflow time function, the airflow interference data of the airflow is determined. Finally, according to the airflow time function and the airflow interference data, the target flow rate of the airflow under the target breathing state is calculated.
[0176] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0177] Those skilled in the art will appreciate that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.
[0178] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0179] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.
[0180] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0181] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0182] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. The mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0183] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0184] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0185] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.
[0186] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.
Claims
1. A method for calculating gas flow rate under breathing state, characterized in that: The method comprises: Obtain a square wave graph of the user's breathing signal transmitted by the sensor; Based on the respiratory signal square wave graph, predict the user's respiratory state to obtain the user's target respiratory state; Based on the breathing signal square wave diagram, obtaining turbine fan blade rotation cycle data and initial gas flow rate value of the airflow; Based on the turbine blade rotation period data and the initial gas flow rate value, determining an airflow time function of the airflow, wherein the airflow time function is used to characterize a mapping relationship between the flow rate and time of the airflow; Determining airflow interference data of the airflow based on the turbine blade rotation period data and the airflow time function; A target flow rate is calculated for the airflow under the target breathing state based on the airflow time function and the airflow interference data.
2. The method according to claim 1, characterized in that: The breathing signal square wave graph includes a first square wave graph and a second square wave graph, and the user's breathing state is predicted based on the breathing signal square wave graph to obtain the user's target breathing state, including: Acquire a first step point and a second step point of the first square wave graph, wherein the first step point is adjacent to the second step point; Obtaining a third step point and a fourth step point of the second square wave graph, wherein the third step point is located between the first step point and the second step point, and the fourth step point is adjacent to the third step point in the second square wave graph; Obtaining square wave signal values of the first step point, the second step point, the third step point, and the fourth step point; Based on the square wave signal value, the target breathing state is determined.
3. The method according to claim 2, characterized in that The square wave signal values include a first signal value and a second signal value of a first step point, a third signal value and a fourth signal value of a second step point, a fifth signal value and a sixth signal value of a third step point, and a seventh signal value and an eighth signal value of a fourth step point. Determining the target respiratory state based on the square wave signal values includes: If the first signal value, the second signal value, the fifth signal value and the sixth signal value are the same or the third signal value, the fourth signal value, the seventh signal value and the eighth signal value are the same, generating breathing conversion characterization data, and encapsulating the breathing conversion characterization data to obtain the target breathing state, wherein the breathing conversion characterization data is used to characterize that the breathing state of the user changes during the time period from the first step point to the fourth step point; If the first signal value, the second signal value, the third signal value, and the eighth signal value are all peak values of the respiratory signal square wave graph, inhalation characterization data is generated, and the inhalation characterization data is data packaged to obtain the target respiratory state, wherein the inhalation characterization data is used to represent that the user is in an inhalation state during a time period from the first step point to the fourth step point; If the first signal value, the second signal value, the fourth signal value and the seventh signal value are all peak values of the breathing signal square wave graph, exhalation characterization data is generated, and the exhalation characterization data is data packaged to obtain the target breathing state, wherein the exhalation characterization data is used to characterize that the user is in an exhalation state during the time period from the first step point to the fourth step point.
4. The method according to claim 1, characterized in that: The step of determining the airflow time function of the airflow based on the turbine blade rotation period data and the initial gas flow rate value comprises: Filtering out the current cycle data of the target moment and the historical cycle data of the previous moment from the turbine blade rotation cycle data, wherein the target moment is an adjacent time point of the previous moment; Filtering the current gas flow rate value at the target moment and the historical gas flow rate value at the previous moment from the initial gas flow rate value; Calculating the slope of the function curve based on the current cycle data, the historical cycle data, the current gas flow rate value and the historical gas flow rate value; The gas flow time function is determined based on the slope of the function curve and the initial gas flow rate value.
5. The method according to claim 4, characterized in that The determining of the airflow interference data of the airflow based on the turbine blade rotation period data and the airflow time function comprises: obtaining a target air density of the airflow; Calculating air resistance data of the airflow based on the airflow time function; Calculating the damping coefficient of the airflow based on the turbine blade rotation period data; Calculating the inertia of the turbine blade based on the slope of the function curve and the airflow time function; The target air density, the air resistance data, the damping coefficient and the turbine blade inertia are multiplied and combined to obtain the airflow interference data.
6. The method according to any one of claims 1 to 5, characterized in that: The step of calculating a target flow rate of the airflow under the target breathing state based on the airflow time function and the airflow interference data includes: Calculating the duration of the target breathing state to obtain a target duration; Based on the target duration, the airflow time function and the airflow interference data are integrated to obtain a target gas flow rate.
7. The method according to any one of claims 1 to 5, characterized in that: The sensor includes a first sensor and a second sensor, and the step of obtaining a square wave diagram of a user's breathing signal transmitted by the sensor includes: Acquire a first breathing square wave signal of the user received by the first sensor; Acquire a second breathing square wave signal of the user received by the second sensor; The first respiratory square wave signal and the second respiratory square wave signal are processed for displaying the signals side by side to obtain the respiratory signal square wave graph.
8. A gas flow rate calculation device under breathing state, characterized in that: The device comprises: A breathing signal acquisition module, used to acquire a square wave diagram of a user's breathing signal transmitted by a sensor; A breathing state prediction module, used to predict the breathing state of the user based on the breathing signal square wave diagram to obtain a target breathing state of the user; An airflow parameter acquisition module, used for acquiring turbine blade rotation cycle data and an initial gas flow rate value of the airflow based on the breathing signal square wave diagram; An airflow function generating module, used for determining an airflow time function of the airflow based on the turbine blade rotation period data and the initial gas flow rate value, wherein the airflow time function is used for characterizing a mapping relationship between the flow rate and time of the airflow; an interference data calculation module, for determining airflow interference data of the airflow based on the turbine blade rotation period data and the airflow time function; The target flow rate calculation module is used to calculate the target flow rate of the airflow under the target breathing state based on the airflow time function and the airflow interference data.
9. An electronic device, characterized in that: The electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the gas flow rate calculation method under the breathing state described in any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method for calculating the gas flow rate under the breathing state according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Detection of sleep condition
CN102665546A
Recognition method and device of breathing waveform, equipment and storage medium
CN114832193A
Expiratory resistance calculation method and device, computer storage medium and electronic equipment
CN118121182A
System and method for providing a breathing gas
US20050268913A1
Methods and apparatus for respiratory therapy
US20220362498A1