Gas flow rate calculation method and device in breathing state, equipment and storage medium
By acquiring the square wave diagram of the breathing signal and combining it with the turbine blade rotation cycle data, an airflow time function is generated, and airflow interference data is calculated. This solves the error problem in calculating gas flow velocity under breathing conditions and achieves higher calculation accuracy.
Patent Information
- Application Number
- CN202411364368.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-27
- Publication Date
- 2025-12-26
- Estimated Expiration
- 2044-09-27
AI Technical Summary
Existing methods for calculating gas flow rate under respiratory conditions have errors, mainly due to air resistance and respiratory interference factors, which cause inaccurate gas flow rate data acquired by sensors.
By acquiring the square wave diagram of the breathing signal transmitted by the sensor, the breathing state is predicted, the target breathing state is determined, and based on the turbine fan blade rotation cycle data and the initial gas flow velocity value, the airflow time function is generated, the airflow interference data is calculated, and finally the target flow velocity is calculated.
It improves the accuracy of gas flow rate calculation under respiratory conditions and reduces errors caused by interference factors.
Smart Images

Figure CN119366902B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data processing, and particularly relates to a gas flow rate calculation method and device in a breathing state, electronic equipment and a storage medium. BACKGROUND
[0002] At present, a common gas flow rate calculation method in a breathing state usually takes gas flow rate data obtained by a sensor as a target gas flow rate in a breathing state. However, in actual calculation of the gas flow rate, there are usually various interference factors, such as air resistance and breathing state, which cause errors in the gas flow rate data obtained by the sensor. Therefore, how to improve the calculation accuracy of the gas flow rate in a breathing state has become a technical problem to be solved. SUMMARY
[0003] The main purpose of the embodiments of the present application is to provide a gas flow rate calculation method and device in a breathing state, electronic equipment and a storage medium, which aims to improve the calculation accuracy of the gas flow rate in a breathing state.
[0004] To achieve the above purpose, a first aspect of the embodiments of the present application provides a gas flow rate calculation method in a breathing state, which comprises the following steps.
[0005] Obtaining a breathing signal square wave graph of a user transmitted by a sensor;
[0006] Based on the breathing signal square wave graph, predicting a breathing state of the user to obtain a target breathing state of the user;
[0007] Based on the breathing signal square wave graph, obtaining turbine fan blade rotation period data and an initial gas flow rate value of the airflow;
[0008] Based on the turbine fan 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 represent a mapping relationship between the flow rate of the airflow and time;
[0009] Based on the turbine fan blade rotation period data and the airflow time function, determining airflow interference data of the airflow;
[0010] Based on the airflow time function and the airflow interference data, performing target flow rate calculation on the airflow in the target breathing state.
[0011] In some embodiments, the breathing signal square wave graph comprises a first square wave graph and a second square wave graph, and the step of predicting a breathing state of the user based on the breathing signal square wave graph to obtain a target breathing state of the user comprises the following steps.
[0012] obtaining 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 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] determining the target respiratory state based on the square wave signal values.
[0016] In some embodiments, the square wave signal values include a first signal value and a second signal value of the first step point, a third signal value and a fourth signal value of the second step point, a fifth signal value and a sixth signal value of the third step point, and a seventh signal value and an eighth signal value of the fourth step point, and the determining the target respiratory state based on the square wave signal values 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 respiratory transition representation data, and performing data packaging on the respiratory transition representation data to obtain the target respiratory state, wherein the respiratory transition representation data is used to represent a change in the user's respiratory state within a 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, generating inhalation representation data, and performing data packaging on the inhalation representation data to obtain the target respiratory state, wherein the inhalation representation data is used to represent that the user is in an inhalation state within 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 respiratory signal square wave graph, generating exhalation representation data, and performing data packaging on the exhalation representation data to obtain the target respiratory state, wherein the exhalation representation data is used to represent that the user is in an exhalation state within a time period from the first step point to the fourth step point.
[0020] In some embodiments, the determining the airflow time function of the airflow based on the turbine fan blade rotation period data and the initial gas flow rate value includes:
[0021] filtering, from the turbofan blade rotation period data, current period data of a target moment and historical period data of a previous moment, wherein the target moment is a time point adjacent to the previous moment;
[0022] filtering, from the initial gas flow rate value, a current gas flow rate value of the target moment and a historical gas flow rate value of the previous moment;
[0023] calculating a function curve slope based on the current period data, the historical period data, the current gas flow rate value and the historical gas flow rate value;
[0024] determining the airflow time function based on the function curve slope and the initial gas flow rate value.
[0025] In some embodiments, the determining, based on the turbofan blade rotation period data and the airflow time function, airflow disturbance data of the airflow, comprises:
[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 a damping coefficient of the airflow based on the turbofan blade rotation period data;
[0029] calculating turbofan blade inertia based on the function curve slope and the airflow time function;
[0030] multiplying and combining the target air density, the air resistance data, the damping coefficient and the turbofan blade inertia to obtain the airflow disturbance data.
[0031] In some embodiments, the performing target flow rate calculation on the airflow in the target breathing state based on the airflow time function and the airflow disturbance data, comprises:
[0032] calculating a time length of the target breathing state to obtain a target time length;
[0033] performing integral operation on the airflow time function and the airflow disturbance data based on the target time length to obtain a target gas flow rate.
[0034] In some embodiments, the sensor comprises a first sensor and a second sensor, and the obtaining a breathing signal square wave graph of a user transmitted by a sensor comprises:
[0035] obtaining a first breathing square wave signal of the user received by the first sensor;
[0036] obtaining 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 subjected to signal side-by-side display processing to obtain the respiratory signal square wave graph.
[0038] To achieve the above object, a second aspect of the embodiment of the present application provides a gas flow rate calculation device in a respiratory state, the device comprising:
[0039] A respiratory signal acquisition module is configured to acquire a respiratory signal square wave graph of a user transmitted by a sensor.
[0040] A respiratory state prediction module is configured to predict a respiratory state of the user based on the respiratory signal square wave graph to obtain a target respiratory state of the user.
[0041] A gas flow parameter acquisition module is configured to acquire turbine fan blade rotation period data and an initial gas flow rate value of a gas flow based on the respiratory signal square wave graph.
[0042] A gas flow function generation module is configured to determine a gas flow time function of the gas flow based on the turbine fan blade rotation period data and the initial gas flow rate value, wherein the gas flow time function is used to represent a mapping relationship between a flow rate and time of the gas flow.
[0043] An interference data calculation module is configured to determine gas flow interference data of the gas flow based on the turbine fan blade rotation period data and the gas flow time function.
[0044] A target flow rate calculation module is configured to calculate a target flow rate of the gas flow in the target respiratory state based on the gas flow time function and the gas flow interference data.
[0045] To achieve the above object, a third aspect of the embodiment of the present application provides an electronic device, comprising a memory and a processor, the memory stores a computer program, and the processor implements the method of the first aspect when executing the computer program.
[0046] To achieve the above object, a fourth aspect of the embodiment of the present application provides a computer readable storage medium, the computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the method of the first aspect.
[0047] The gas flow rate calculation method and device in the breathing state, the electronic equipment and the storage medium provided by the present application, by acquiring the breathing signal square wave chart of the user transmitted by the sensor, the breathing state of the user is predicted, so as to determine the target breathing state of the user at present, so as to improve the calculation accuracy of the gas flow rate of the user in the breathing state. Further, according to the obtained turbine fan blade rotation period data and the initial gas flow rate value of the airflow, the airflow time function representing the mapping relationship between the flow rate of the airflow and the time is determined, and according to the turbine fan blade rotation period data and the airflow time function, the airflow interference data of the airflow is determined, so as to determine the interference factors of the gas flow rate. Finally, according to the airflow time function and the airflow interference data, the target flow rate of the airflow in the target breathing state is calculated, and the calculation accuracy of the gas flow rate in the breathing state is improved. BRIEF DESCRIPTION OF DRAWINGS
[0048] Figure 1 is the flow chart of the gas flow rate calculation method in the breathing state provided by the present application;
[0049] Figure 2 is Figure 1 the flow chart of step S101 in
[0050] Figure 3 is Figure 1 the flow chart of step S102 in
[0051] Figure 4 is Figure 3 the flow chart of step S304 in
[0052] Figure 5 is Figure 1 the flow chart of step S104 in
[0053] Figure 6 is Figure 1 the flow chart of step S105 in
[0054] Figure 7 is Figure 1 the flow chart of step S106 in
[0055] Figure 8 is the structural schematic diagram of the gas flow rate calculation device in the breathing state provided by the present application;
[0056] Figure 9 is the hardware structure schematic diagram of the electronic equipment provided by the present application. DETAILED DESCRIPTION
[0057] In order to make the purposes, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the drawings and embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application and not 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 sequence is shown in the flowchart, in some cases, the steps shown or described can be performed in a manner different from the module division in the device or the sequence in the flowchart. The terms "first", "second", etc. in the specification and claims and the above drawings are used to distinguish similar objects, and do not necessarily describe a specific order or sequence.
[0059] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which the present application belongs. The terms used herein are only for the purpose of describing the embodiments of the present application and are not intended to limit the present application.
[0060] First, the meanings of several terms involved in the present application are analyzed:
[0061] Turbine spirometer: Turbine spirometer is a medical device used to measure and evaluate lung function, especially air flow rate and lung capacity. By recording the air flow data of patients during forced breathing through turbine sensors, 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 environments.
[0062] At present, the common gas flow rate calculation method under the respiratory state is usually to take the gas flow rate data obtained by the sensor as the target gas flow rate under the respiratory state, but in actual, there are often various interference factors in the calculation process of the gas flow rate, such as air resistance, respiratory state and other interference factors, which cause the gas flow rate data obtained by the sensor to have errors, therefore, how to improve the calculation accuracy of the gas flow rate under the respiratory state has become a technical problem to be solved.
[0063] Based on this, the embodiments of the present application provide a gas flow rate calculation method and device under the respiratory state, an electronic device and a storage medium, aiming to improve the calculation accuracy of the gas flow rate under the respiratory state.
[0064] The gas flow rate calculation method and device under the respiratory state, the electronic device and the storage medium provided by the embodiments of the present application are specifically described as follows, first, the gas flow rate calculation method under the respiratory state in the embodiments of the present application is described.
[0065] The embodiments of the present application can acquire and process related data based on artificial intelligence technology. The artificial intelligence (AI) is to use a digital computer or a machine controlled by a digital computer to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use the knowledge to obtain the best results.
[0066] The artificial intelligence basic technology generally includes technologies such as sensors, special artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction system, mechatronics, etc. The artificial intelligence software technology mainly includes computer vision technology, robot technology, biometric technology, speech processing technology, natural language processing technology, and machine learning / deep learning, etc.
[0067] The gas flow rate calculation method in the breathing state provided by the embodiments of the present application relates to the technical field of data processing. The gas flow rate calculation method in the breathing state provided by the embodiments of the present application can be applied to a terminal, can also be applied to a server end, and can also be software running in the terminal or the server end. In some embodiments, the terminal can be a smart phone, a tablet computer, a notebook computer, a desktop computer, etc.; the server end can be configured as an independent physical server, can also be configured as a server cluster or a distributed system composed of multiple physical servers, can also be configured as a cloud server providing basic cloud computing services such as cloud service, cloud database, cloud computing, cloud function, cloud storage, network service, cloud communication, middleware service, domain name service, security service, CDN, and big data and artificial intelligence platform; and the software can be an application implementing the gas flow rate calculation method in 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 devices or portable devices, tablet devices, multi-processor 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 a distributed computing environment in which tasks are performed by remote processing devices connected by 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 gas flow rate calculation method in a breathing state provided by an embodiment of the present application, and the method can be applied to a turbine type lung function tester, Figure 1 The method in the method can include but is not limited to steps S101 to S106.
[0070] Step S101, acquiring a breathing signal square wave chart of a user transmitted by a sensor;
[0071] Step S102, predicting a breathing state of the user based on the breathing signal square wave chart to obtain a target breathing state of the user;
[0072] Step S103, acquiring turbine fan blade rotation period data and an initial gas flow rate value of the gas flow based on the breathing signal square wave chart;
[0073] Step S104, determining a gas flow time function of the gas flow based on the turbine fan blade rotation period data and the initial gas flow rate value, wherein the gas flow time function is used to represent a mapping relationship between a flow rate of the gas flow and time;
[0074] Step S105, determining gas flow interference data of the gas flow based on the turbine fan blade rotation period data and the gas flow time function;
[0075] Step S106, calculating a target flow rate of the gas flow in the target breathing state based on the gas flow time function and the gas flow interference data.
[0076] The steps S101 to S106 shown in the embodiments of the present application are used to obtain the breathing signal square wave graph of the user received by the sensor outside the turbine type lung function tester, predict the breathing state of the user, determine the target breathing state of the user, further obtain the turbine fan blade rotation period data and the initial gas flow rate value of the airflow in the time period according to the time period in the breathing signal square wave graph, then determine the airflow time function representing the mapping relationship between the flow rate of the airflow and time according to the turbine fan blade rotation period data and the initial gas flow rate value, and determine the airflow disturbance data of the airflow according to the turbine fan blade rotation period data and the airflow time function, and finally calculate the target flow rate of the airflow under the target breathing state according to the airflow time function and the airflow disturbance data. Therefore, the present application realizes the prediction of the breathing state of the user by obtaining the breathing signal square wave graph of the user transmitted by the sensor, thereby determining the target breathing state of the user at present, so as to improve the calculation accuracy of the gas flow rate under the breathing state of the user, further determine the airflow time function representing the mapping relationship between the flow rate of the airflow and time according to the obtained turbine fan blade rotation period data and the initial gas flow rate value of the airflow, and determine the airflow disturbance data of the airflow according to the turbine fan blade rotation period data and the airflow time function, thereby determining the interference factors of the gas flow rate, and finally calculating the target flow rate of the airflow under the target breathing state according to the airflow time function and the airflow disturbance data, thereby improving the calculation accuracy of the gas flow rate under the breathing state.
[0077] In step S101 of some embodiments, the sensor can be a gas flow rate oscilloscope located outside the turbine type lung function tester, which can be used to measure the speed of the gas flow through the sensor when the user breathes. The turbine type lung function tester can be a medical device for evaluating and measuring lung function, and the turbine type lung function tester includes a fan blade, a gas flow rate oscilloscope, a fan blade rotation period sensor, and a gas flow rate sensor. The fan blade rotation period sensor is used to monitor the period of one rotation of the fan blade, and the gas flow rate sensor is used to monitor the size of the gas flow rate through the turbine type lung function tester.
[0078] It should be noted that, in order to predict the breathing state of the user when using the turbine type lung function tester, two sensors can be arranged in the turbine type lung 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 near the mouth of the user, and the second sensor is located away from the mouth of the user.
[0079] The application can obtain 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, obtain the breathing square wave signals of the two users, and perform signal side-by-side display processing on the first breathing square wave signal and the second breathing square wave signal in the same graph to obtain the breathing signal square wave graph of the user.
[0080] In detail, please refer to Figure 2 In some embodiments, step S101 can include but is not limited to steps S201 to S203:
[0081] Step S201, obtaining the first breathing square wave signal of the user received by the first sensor;
[0082] Step S202, obtaining the second breathing square wave signal of the user received by the second sensor;
[0083] Step S203, performing signal side-by-side display processing on the first breathing square wave signal and the second breathing square wave signal to obtain the breathing signal square wave graph.
[0084] In steps S201 and S202 of some embodiments, the first breathing square wave signal is obtained by monitoring the speed of the gas flowing through the sensor when the user breathes, and the second breathing square wave signal is obtained by monitoring the speed of the gas flowing through the sensor when the user breathes.
[0085] In step S203 of some embodiments, the first breathing square wave signal and the second breathing square wave signal are displayed side by side in the same coordinate axis, and the breathing signal square wave graph of the user can be obtained, wherein the horizontal axis of the coordinate axis is the time axis.
[0086] In steps S201 to S203 of the embodiment, 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 are used, and the first breathing square wave signal and the second breathing square wave signal are processed by signal side-by-side display to obtain the breathing signal square wave graph, which can facilitate the comparison of the differences between the first breathing square wave signal and the second breathing square wave signal, thereby realizing the prediction of the breathing state of the user.
[0087] In step S102 of some embodiments, by analyzing the signal value of the step point of the first square wave graph and the second square wave graph in the breathing signal square wave graph, the breathing state of the user in the time period in the breathing signal square wave graph, i.e., the target breathing state, can be determined.
[0088] In detail, please refer to Figure 3 In some embodiments, step S102 can include but is not limited to steps S301 to S304:
[0089] In step S301, a first step point and a second step point of the first square wave graph are obtained, wherein the first step point is adjacent to the second step point.
[0090] In step S302, a third step point and a fourth step point of the second square wave graph are obtained, 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.
[0091] In step S303, square wave signal values of the first step point, the second step point, the third step point and the fourth step point are obtained.
[0092] In step S304, a target breathing state is determined based on the square wave signal values.
[0093] In steps S301 and 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 contained between the first step point and the second step point is found in 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 steps S303 and 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 square wave graph of the breathing signal, and then the signal values of the corresponding first square wave graph and second square wave graph are found 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 step to 1, at this time, the second square wave graph signal value is 0, and the square wave signal value of the first step point is (1, 0). Further, according to the specific numerical value of the obtained square wave signal value, the breathing state of the user can be estimated to obtain the target breathing state of the user.
[0095] In detail, please refer to Figure 4 In some embodiments, step S304 can include but is not limited to steps S401 to S403:
[0096] In 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, a breathing transition representation data is generated, and the breathing transition representation data is data-encapsulated to obtain a target breathing state, wherein the breathing transition representation data is used to represent that the breathing state of the user changes in 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 chart, generate the inhalation characterization data, and perform data encapsulation on the inhalation characterization data to obtain the target respiratory state, wherein the inhalation characterization data is used to represent that the user is in the inhalation state within the 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 respiratory signal square wave chart, generate the exhalation characterization data, and perform data encapsulation on the exhalation characterization data to obtain the target respiratory state, wherein the exhalation characterization data is used to represent that the user is in the exhalation state within 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 a signal value corresponding to the first step point in the first sensor, the third signal is a signal value corresponding to the second step point in the first sensor, the fifth signal is a signal value corresponding to the third step point in the first sensor, the seventh signal is a signal value corresponding to the fourth step point in the first sensor, the second signal is a signal value corresponding to the first step point in the second sensor, the fourth signal is a signal value corresponding to the second step point in the second sensor, the sixth signal is a signal value corresponding to the third step point in the second sensor, and the eighth signal is a signal value corresponding to the fourth step point in the second sensor.
[0100] The present application indicates that the respiratory state of the user changes within the time period from the first step point to the fourth step point 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, for example, from the exhalation state to the inhalation state, from the inhalation state to the exhalation state, etc. At this moment, the turbo-type lung function tester can generate the respiratory conversion characterization data, and then perform data encapsulation on the respiratory conversion characterization data to obtain the target respiratory state of the user. When 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 chart, it indicates that the user is always in the inhalation state. At this moment, the turbo-type lung function tester can generate the inhalation characterization data, and then perform data encapsulation on the inhalation characterization data to obtain the target respiratory state of the user. When the first signal value, the second signal value, the fourth signal value and the seventh signal value are all peak values of the respiratory signal square wave chart, it indicates that the user is always in the exhalation state. At this moment, the turbo-type lung function tester can generate the exhalation characterization data, and then perform data encapsulation on the exhalation characterization data to obtain the target respiratory state of the user.
[0101] In steps S401 to S403 shown in the 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 is compared with the preset mapping table of the breathing state and the signal value, the target breathing state of the user can be determined, the influence of the breathing state on the calculation of the gas flow rate is reduced, and the calculation accuracy of the gas flow rate under the breathing state is improved.
[0102] In steps S301 to S304 shown in the embodiment, the first step point and the second step point adjacent to each other are obtained in the first square wave graph, the third step point located between the first step point and the second step point and the fourth step point adjacent to the third step point in the second square wave graph are obtained in the second square wave graph, the signal values of each step point in the first square wave graph and the second square wave graph are obtained, the square wave signal values of the first step point, the second step point, the third step point and the fourth step point are obtained, and finally, the target breathing state of the user is determined according to the square wave signal values, the prediction accuracy of the breathing state is improved, and the calculation accuracy of the gas flow rate under the breathing state is improved.
[0103] In step S103 of some embodiments, after obtaining the breathing signal square wave graph, the turbine fan blade rotation period data and the initial gas flow rate value of the gas flow are obtained according to the time period occupied by the square wave signal in the breathing signal square wave graph, so as to realize the acquisition of the turbine fan blade rotation period data and the initial gas flow rate value of the gas flow. It should be noted that the turbine fan blade rotation period data and the initial gas flow rate value of the gas flow can be obtained by a specific sensor, wherein the turbine fan blade rotation period data can be obtained by a fan blade rotation period sensor, and the initial gas flow rate value of the gas flow can be obtained by a gas flow rate sensor.
[0104] In step S104 of some embodiments, the gas flow time function representing the mapping relationship between the flow rate of the gas flow and time can be generated according to the obtained turbine fan blade rotation period data and the initial gas flow rate value.
[0105] In detail, please refer to Figure 5 In some embodiments, step S104 can include but is not limited to steps S501 to S504:
[0106] Step S501, the current period data of the target time and the historical period data of the last time are selected from the turbine fan blade rotation period data, wherein the target time is the adjacent time point of the last time;
[0107] Step S502, the current gas flow rate value of the target time and the historical gas flow rate value of the last time are selected from the initial gas flow rate value;
[0108] Step S503, based on the current cycle data, historical cycle data, current gas flow rate value and historical gas flow rate value, the function curve slope is calculated;
[0109] Step S504, based on the function curve slope and the initial gas flow rate value, the gas flow time function is determined.
[0110] In step S501 and step S502 of some embodiments, by screening the adjacent time turbine fan blade rotation cycle data in the turbine fan blade rotation cycle data, the current cycle data at the target time and the historical cycle data at the last time are obtained, and by screening the adjacent time initial gas flow rate value in the initial gas flow rate value, the current gas flow rate value at the target time and the historical gas flow rate value at the last time are obtained.
[0111] In step S503 of some embodiments, the current gas flow rate value and the historical gas flow rate value are calculated by difference, to obtain the gas flow rate difference value, and then the current cycle data and the historical cycle data are calculated by difference, to obtain the turbine fan blade rotation cycle difference value, and finally, the gas flow rate difference value and the turbine fan blade rotation cycle difference value are calculated by division, to obtain the slope of the gas flow time function, that is, the function curve slope.
[0112] The application can calculate the function curve slope of the gas flow time function by using the following formula:
[0113]
[0114] Wherein, B represents the function curve slope, q represents the time corresponding to the square wave signal in the square wave graph of the respiratory signal, B[q] represents the function curve slope of the gas flow time function at time q, FT[q] represents the initial gas flow rate value at time q, FT[q-1] represents the initial gas flow rate value at time q-1, HT[q-1] represents the turbine fan blade rotation cycle data at time q-1, and HT[q] represents the turbine fan blade rotation cycle data at time q.
[0115] In step S504 of some embodiments, according to the above function curve slope, the time data occupied by the square wave signal in the square wave graph of the respiratory signal and the initial gas flow rate value, the gas flow time function of the gas flow can be generated.
[0116] The application can calculate the gas flow time function by using the following formula:
[0117] F(q)=B[q]*q+FT[q] (2)
[0118] Wherein, F(q) represents the airflow time function, B[q] represents the function curve slope of the airflow time function at time q, q represents the time corresponding to the square wave signal in the square wave chart of the breathing signal, and FT[q] represents the initial gas flow rate value at time q.
[0119] In steps S501 to S504 shown in the embodiment, the current gas flow rate value at the target time and the historical gas flow rate value at the last time are selected from the initial gas flow rate value by selecting the current period data at the target time and the historical period data at the last time from the turbofan blade rotation period data, the function curve slope is calculated according to the current period data, the historical period data, the current gas flow rate value and the historical gas flow rate value, and further, the airflow time function is determined according to the function curve slope and the initial gas flow rate value, so as to clearly determine the mapping relationship between the initial gas flow rate value and the time, thereby facilitating the subsequent accurate calculation of the gas flow rate.
[0120] In step S105 of some embodiments, the interference data affecting the gas flow rate is calculated one by one according to the obtained airflow time function and the turbofan blade rotation period data, so as to obtain the airflow interference data.
[0121] In detail, please refer to Figure 6 In some embodiments, step S105 can include but is not limited to steps S601 to S605:
[0122] Step S601, obtaining a 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 a damping coefficient of the airflow based on the turbofan blade rotation period data;
[0125] Step S604, calculating a turbofan blade inertia based on the function curve slope and the airflow time function;
[0126] Step S605, multiplying and combining the target air density, the air resistance data, the damping coefficient and the turbofan blade inertia to obtain the airflow interference data.
[0127] In step S601 of some embodiments, the target air density under the current condition can be calculated by measuring the oral gas temperature of the user and the air density under the international reference temperature.
[0128] Specifically, the target air density under the current condition can be calculated by the following formula:
[0129] P=p0*(1-a*(Tn-T0)) (3)
[0130] where 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 oral air temperature of the user, and To represents the international reference temperature.
[0131] In steps S602 to S604 of some embodiments, multiplying the airflow time function by the first parameter data simulated by the gas flow simulator can obtain the air resistance data of the airflow, multiplying the turbine blade rotation period data by the second parameter data simulated by the gas flow simulator can obtain the damping coefficient of the airflow, and calculating the turbine blade inertia of the turbine-type lung function tester according to the function curve slope and the airflow time function, wherein the gas flow simulator can obtain the first parameter data, the second parameter data, and the third parameter data by simulating the flow rate curve of the airflow at a flow rate of 0 L / min-850 L / min.
[0132] The application can calculate the air resistance data of the airflow by using the following formula:
[0133] R=k1*F(q) (4)
[0134] where R represents the air resistance data, k1 represents the first parameter data, and F(q) represents the airflow time function.
[0135] The application can calculate the damping coefficient of the airflow by using the following formula:
[0136] D=k2*HT[q] (5)
[0137] where 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 calculate the turbine blade inertia by using the following formula:
[0139]
[0140] where I represents the turbine blade inertia, B[q] represents the function curve slope of the airflow time function at time q, B[q-1] represents the function curve slope of the airflow time function at time q-1, F(q) represents the airflow time function, and k3 represents the third parameter data.
[0141] In step S605 of some embodiments, multiplying the target air density, the air resistance data, the damping coefficient, and the turbine blade inertia can obtain the airflow disturbance data of the airflow.
[0142] The application can calculate the airflow disturbance data by using the following formula:
[0143] G(q) = R * D * I * P (7)
[0144] Wherein, G(q) represents the airflow interference data at time q, R represents the air resistance data, D represents the damping coefficient, I represents the turbine fan blade inertia, and P represents the target air density.
[0145] In steps S601 to S605 shown in the embodiment, the target air density of the airflow is obtained, 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 fan blade rotation period data, the turbine fan blade inertia is calculated according to the function curve slope and the airflow time function, and finally the target air density, the air resistance data, the damping coefficient and the turbine fan blade inertia are multiplied and combined, so that the airflow interference data affecting the gas flow rate can be obtained, thereby eliminating the calculation interference degree of the airflow interference data on the gas flow rate and 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 a target time length, and then the airflow time function and the airflow interference data are integrated according to the target time length to obtain the target gas flow rate.
[0147] In detail, please refer to Figure 7 In some embodiments, step S106 can include but is not limited to steps S701 to S702:
[0148] Step S701: calculating the time length of the target breathing state to obtain a target time length;
[0149] Step S702: based on the target time length, integrating the airflow time function and the airflow interference data to obtain the target gas flow rate.
[0150] In step S701 of some embodiments, the time length of the target breathing state is recorded to obtain a target time length.
[0151] In step S702 of some embodiments, the airflow time function is multiplied by the airflow interference data to obtain gas flow rate monomer data, and then the gas flow rate monomer data is integrated according to the target time length to obtain the target gas flow rate of the user in the target breathing state.
[0152] The target gas flow rate can be calculated by the following formula:
[0153] V t =∫0 t F(q)*G(q)dq (8)
[0154] Wherein, V tWherein, q represents target gas flow rate, t represents target time length, F(q) represents gas flow time function, and G(q) represents gas flow interference data of time q.
[0155] In steps S701-S702 shown in the embodiment, the target gas flow rate of the user in the target breathing state is obtained by performing integral operation on the gas flow time function and the gas flow interference data in the time length of the target breathing state, and the influence of the gas flow interference factor on the gas flow rate is eliminated, thereby improving the calculation accuracy of the gas flow rate.
[0156] The present application realizes prediction of the breathing state of the user by obtaining the breathing signal square wave graph of the user transmitted by the sensor, thereby determining the target breathing state of the user, improving the calculation accuracy of the gas flow rate of the user in the breathing state, further determining the gas flow time function representing the mapping relationship between the flow rate and time of the gas flow according to the obtained turbine fan blade rotation period data and initial gas flow rate value of the gas flow, and determining the gas flow interference data of the gas flow according to the turbine fan blade rotation period data and the gas flow time function, thereby determining the interference factor of the gas flow rate, and finally performing target flow rate calculation on the gas flow in the target breathing state according to the gas flow time function and the gas flow interference data, thereby improving the calculation accuracy of the gas flow rate in the breathing state.
[0157] Please refer to Figure 8 The present application also provides a gas flow rate calculation device in a breathing state, which can realize the above-mentioned gas flow rate calculation method in the breathing state, and the device comprises:
[0158] The breathing signal acquisition module 801 is configured to obtain the breathing signal square wave graph of the user transmitted by the sensor.
[0159] The breathing state prediction module 802 is configured to perform breathing state prediction on the user based on the breathing signal square wave graph, and obtain the target breathing state of the user.
[0160] The gas flow parameter acquisition module 803 is configured to obtain the turbine fan blade rotation period data and the initial gas flow rate value of the gas flow based on the breathing signal square wave graph.
[0161] The gas flow function generation module 804 is configured to determine the gas flow time function of the gas flow based on the turbine fan blade rotation period data and the initial gas flow rate value, wherein the gas flow time function is used to represent the mapping relationship between the flow rate and time of the gas flow.
[0162] The interference data calculation module 805 is configured to determine the gas flow interference data of the gas flow based on the turbine fan blade rotation period data and the gas flow time function.
[0163] The target flow rate calculation module 806 is configured to calculate a target flow rate of the airflow in the target respiratory state based on the airflow time function and the airflow interference data.
[0164] The specific implementation of the gas flow rate calculation device in the respiratory state is basically the same as the specific implementation of the gas flow rate calculation method in the respiratory state, and will not be repeated here.
[0165] The embodiments of the present application also provide an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor implements the gas flow rate calculation method in the respiratory state when executing the computer program. The electronic device can be any intelligent terminal including a tablet computer, a vehicle-mounted computer, etc.
[0166] Please refer to Figure 9 , Figure 9 The hardware structure of the electronic device of another embodiment is illustrated, which includes:
[0167] The processor 901 can be implemented in a general-purpose CPU (Central Processing Unit), a microprocessor, an ASIC (Application Specific Integrated Circuit), or one or more integrated circuits, etc., and is used to execute related programs to implement the technical solutions provided by the embodiments of the present application.
[0168] The memory 902 can be implemented in the form of a ROM (ReadOnly Memory), a static storage device, a dynamic storage device, or a RAM (Random Access Memory), etc. The memory 902 can store an operating system and other application programs. When the technical solutions provided by the embodiments of the present application are implemented by software or firmware, the related program codes are stored in the memory 902 and are called and executed by the processor 901 to implement the gas flow rate calculation method in the respiratory state.
[0169] The input / output interface 903 is used to realize information input and output.
[0170] The communication interface 904 is used to realize the communication interaction between the device and other devices. The communication can be realized by a wired manner (for example, a USB, a network cable, etc.) or a wireless manner (for example, a mobile network, WIFI, Bluetooth, etc.).
[0171] The bus 905 is used to transmit information between various components (for example, the processor 901, the memory 902, the input / output interface 903, and the communication interface 904) of the device.
[0172] The processor 901, the memory 902, the input / output interface 903, and the communication interface 904 are communicatively connected with each other through the bus 905.
[0173] The embodiment of the present application also provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to realize the gas flow rate calculation method in the breathing state.
[0174] The memory is a non-transitory computer readable storage medium, and can be used to store a non-transitory software program and a non-transitory computer executable program. In addition, the memory can include a high-speed random access memory, and can also include a non-transitory memory, for example, at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state memory device. In some embodiments, the memory can optionally include a memory remotely arranged relative to the processor, and the remote memory can be connected to the processor through a network. Examples of the network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.
[0175] The gas flow rate calculation method in the breathing state, the gas flow rate calculation device in the breathing state, the electronic device and the storage medium provided by the embodiment of the present application are applied to a turbo type lung function tester, a breathing signal square wave graph of a user received by a sensor outside the turbo type lung function tester is acquired, the breathing state of the user is predicted, the target breathing state of the user is determined, further, according to a time period in the breathing signal square wave graph, turbo fan blade rotation period data and an initial gas flow rate value of the airflow in the time period are acquired, then, according to the turbo fan blade rotation period data and the initial gas flow rate value, an airflow time function representing a mapping relationship between the flow rate of the airflow and time is determined, and according to the turbo fan blade rotation period data and the airflow time function, airflow interference data of the airflow is determined, finally, according to the airflow time function and the airflow interference data, a target flow rate of the airflow in the target breathing state is calculated.
[0176] The embodiments described in the embodiment of the present application are used to more clearly illustrate the technical solutions of the embodiment of the present application, and do not constitute a limitation on the technical solutions provided by the embodiment of the present application. Those skilled in the art can know that, with the evolution of technology and the appearance of new application scenarios, the technical solutions provided by the embodiment of the present application are also applicable to similar technical problems.
[0177] Those skilled in the art can understand that the technical solutions shown in the figure do not constitute a limitation on the embodiment of the present application, and can include more or fewer steps than the figure, or combine certain steps, or different steps.
[0178] The apparatus embodiments described above are merely exemplary, and units described as separate components may or may not be physically separate, i.e., may be located in one place, or may be distributed over multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purposes of the embodiments.
[0179] Those skilled in the art can understand that all or some of the steps in the method disclosed above, the functional modules / units in the system and the device can be implemented as software, firmware, hardware and appropriate combinations thereof.
[0180] The terms "first", "second", "third", "fourth" and the like in the description of the application and in the claims of the foregoing drawings, if any, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the use of the terms so construed can be interchanged, such that, for example, without departing from the scope of the application, the embodiments described herein can be carried out in a different order than the one illustrated or described herein. In addition, the terms "comprising", "having" and any variations thereof are intended to cover a non-exclusive inclusion, for example, a process, method, system, product or apparatus that comprises a list of steps or units not necessarily limited to those explicitly listed, but can include other not expressly listed or inherent to such processes, methods, products or apparatus.
[0181] It should be understood that in this application, "at least one" means one or more, and "multiple" means two or more. "And / or" is used to describe the relationship between associated objects, which means that there can be three relationships, for example, "A and / or B" can mean that there are three cases: only A, only B, and A and B at the same time, where A and B can be singular or plural. The character " / " generally represents an "or" relationship between the associated objects. "At least one of the following" or similar expressions means any combination of these items, including any combination of single or multiple 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, and c can be single or multiple.
[0182] In several embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented by other manners. For example, the apparatus embodiments described above are merely illustrative, for example, the division of the above units is merely a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. The coupling or direct coupling or communication connection between the units or components shown or discussed can be indirect coupling or communication connection through some interfaces, apparatuses or units, and can be electrical, mechanical or other forms.
[0183] The units described above as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they can be located in one place or distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.
[0184] In addition, the functional units in each embodiment of the present application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.
[0185] If the integrated unit is realized 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 solutions of the present application essentially or the part of the prior art that makes a contribution or the whole or part of the technical solutions can be embodied in the form of a software product, which is stored in a storage medium and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method of each embodiment of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various program storage media.
[0186] The preferred embodiments of the embodiments of the present application are described above with reference to the accompanying drawings, but this does not limit the scope of the rights of the embodiments of the present application. Any modifications, equivalent replacements and improvements made by those skilled in the art without departing from the scope and essence of the embodiments of the present application shall be within the scope of the rights of the embodiments of the present application.
Claims
1. A method of calculating a flow rate of a gas in a respiratory state, characterized by, The method comprises: acquiring a user's breathing signal square wave chart transmitted by a sensor; based on the breathing signal square wave chart, predicting the user's breathing state to obtain the user's target breathing state; based on the breathing signal square wave chart, acquiring turbine fan blade rotation period data and an initial gas flow rate value of the airflow; based on the turbine fan 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 represent the mapping relationship between the airflow rate and time of the airflow; based on the turbine fan blade rotation period data and the airflow time function, determining airflow interference data of the airflow; based on the airflow time function and the airflow interference data, calculating a target flow rate of the airflow under the target breathing state; The sensor comprises a first sensor and a second sensor, and the acquisition of the user's breathing signal square wave chart transmitted by the sensor comprises: acquiring a first breathing square wave signal of the user received by the first sensor; acquiring a second breathing square wave signal of the user received by the second sensor; performing signal side-by-side display processing on the first breathing square wave signal and the second breathing square wave signal to obtain the breathing signal square wave chart, specifically, placing the first breathing square wave signal and the second breathing square wave signal in the same coordinate axis for side-by-side display to obtain the breathing signal square wave chart, wherein the horizontal axis of the coordinate axis is a time axis; The breathing signal square wave chart comprises a first square wave chart and a second square wave chart, the first square wave chart represents the first breathing square wave signal, and the second square wave chart represents the second breathing square wave signal, and the prediction of the user's breathing state based on the breathing signal square wave chart to obtain the user's target breathing state comprises: acquiring a first step point and a second step point of the first square wave chart, wherein the first step point is adjacent to the second step point; acquiring a third step point and a fourth step point of the second square wave chart, wherein the third step point is located in the middle of 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 chart; acquiring square wave signal values of the first step point, the second step point, the third step point and the fourth step point; determining the target breathing state based on the square wave signal values.
2. The method of claim 1, wherein, The determination of the airflow time function of the airflow based on the turbine fan blade rotation period data and the initial gas flow rate value comprises: screening current period data of a target time and historical period data of a previous time from the turbine fan blade rotation period data, wherein the target time is an adjacent time point of the previous time; screening a current gas flow rate value of the target time and a historical gas flow rate value of the previous time from the initial gas flow rate value; calculating a function curve slope based on the current period data, the historical period data, the current gas flow rate value and the historical gas flow rate value; determining the airflow time function based on the function curve slope and the initial gas flow rate value.
3. The method of claim 2, wherein, The turbine fan blade rotation period data and the airflow time function are used to determine airflow disturbance data of the airflow, including: Obtaining the target air density of the airflow; Based on the airflow time function, the air resistance data of the airflow is calculated; Based on the turbine fan blade rotation period data, the damping coefficient of the airflow is calculated; Based on the function curve slope and the airflow time function, the turbine fan blade inertia is calculated; The target air density, the air resistance data, the damping coefficient and the turbine fan blade inertia are multiplied and combined to obtain the airflow disturbance data.
4. The method according to any one of claims 1 to 3, characterized in that, The target airflow velocity calculation of the airflow under the target breathing state based on the airflow time function and the airflow disturbance data, including: The length of time of the target breathing state is calculated to obtain the target time length; Based on the target time length, the airflow time function and the airflow disturbance data are integrated to obtain the target gas flow velocity.
5. A respiratory gas flow rate calculation device for implementing the respiratory gas flow rate calculation method according to claim 1, characterized by, The device includes: A breathing signal acquisition module for acquiring a user's breathing signal square wave chart transmitted by a sensor; A breathing state prediction module for predicting the breathing state of the user based on the breathing signal square wave chart to obtain the target breathing state of the user; An airflow parameter acquisition module for acquiring turbine fan blade rotation period data and initial gas flow velocity values of the airflow based on the breathing signal square wave chart; An airflow function generation module for determining the airflow time function of the airflow based on the turbine fan blade rotation period data and the initial gas flow velocity values, wherein the airflow time function is used to represent the mapping relationship between the flow velocity and the time of the airflow; An interference data calculation module for determining the airflow disturbance data of the airflow based on the turbine fan blade rotation period data and the airflow time function; A target flow velocity calculation module for calculating the target flow velocity of the airflow under the target breathing state based on the airflow time function and the airflow disturbance data.
6. An electronic device, comprising: The electronic device includes a memory and a processor, the memory stores a computer program, and the processor executes the computer program to realize the breathing state gas flow velocity calculation method of any one of claims 1-4.
7. A computer-readable storage medium storing a computer program, wherein the computer program comprises the following steps of: receiving a request for a resource from a client; determining whether the client is authorized to access the resource; and if the client is authorized to access the resource, providing the resource to the client. The computer program is executed by the processor to realize the breathing state gas flow velocity calculation method of any one of claims 1-4.
Citation Information
Patent Citations
Detection of sleep condition
CN102665546A
Recognition method and device of breathing waveform, equipment and storage medium
CN114832193A