Breathing state detection method and device, equipment and storage medium
By setting an inertial measurement unit in the body part of the target object, obtaining breathing position data and calculating the target distance change value, the problem of insufficient accuracy and convenience of breathing state detection in the prior art is solved, and a more efficient and reliable breathing state is achieved Test.
Patent Information
- Application Number
- CN202310988114.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-07
- Publication Date
- 2025-02-14
AI Technical Summary
In the prior art, the accuracy and convenience of respiratory state detection are low, rely on image monitoring and require multiple devices, which are affected by the shooting angle.
By setting an inertial measurement unit in the body part of the target object, breathing position data is obtained, and the target distance change value is calculated to determine the breathing state.
It improves the accuracy and convenience of respiratory status detection, reduces dependence on equipment, and enhances the reliability of detection results.
Smart Images

Figure CN119423736A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of medical equipment, and in particular to a method, device, equipment and storage medium for detecting a respiratory state. Background Art
[0002] Respiration is an important physiological activity of the human body, and respiratory monitoring plays an important role in many fields such as medicine, health, and entertainment. In the existing technology, the monitoring of human respiration mainly relies on image monitoring, and the respiratory state is judged by monitoring the ups and downs of human respiration in the video. This method has the disadvantages of poor monitoring accuracy, the need to equip multiple monitoring devices, and dependence on shooting angles. Summary of the invention
[0003] In view of the above-mentioned defects of the prior art, the technical problem to be solved by the present invention is to improve the accuracy and convenience of respiratory state detection.
[0004] In order to solve at least one of the technical problems mentioned above, the present invention discloses a method, device, equipment and storage medium for detecting a respiratory state.
[0005] According to one aspect of the present disclosure, a method for detecting a respiratory state is provided, comprising:
[0006] Acquire first respiratory position data of the target object in each dimension within a preset time; the first respiratory position data is acquired based on an inertial measurement unit arranged on the target object; the first respiratory position data represents the respiratory fluctuation position of the target object corresponding to the detection time node;
[0007] Acquire second respiratory position data of the target object in each dimension at the current detection time node; the second respiratory position data is acquired based on an inertial measurement unit arranged on the target object; the second respiratory position data represents the respiratory fluctuation position of the target object corresponding to the current detection time node;
[0008] A distance calculation is performed based on the origin position data, the third respiratory position data and the second respiratory position data to obtain a target distance change value; the third respiratory position data is data corresponding to the last detection time node within the preset time; the target distance change value represents the distance between the second respiratory position data and the origin, and the distance change between the third respiratory position data and the origin;
[0009] The breathing state of the target object at the current detection time node is determined based on the target distance change value.
[0010] In some possible embodiments, performing distance calculation based on the third respiratory position data, the origin position data, and the second respiratory position data to obtain a target distance change value includes:
[0011] Calculate the distance between the origin position data and the second breathing position data to obtain the target breathing distance; the target breathing distance represents the distance between the breathing fluctuation position of the target object corresponding to the current detection time node and the origin;
[0012] Calculate the distance between the origin position data and the third respiratory position data to obtain a respiratory distance value corresponding to the third respiratory position data; the respiratory distance value corresponding to the third respiratory position data represents the distance between the respiratory fluctuation position corresponding to the last detection time node within the preset time and the origin;
[0013] The target distance change value is obtained by calculating a difference between the target breathing distance and a breathing distance value corresponding to the third breathing position data.
[0014] In some possible embodiments, determining the breathing state of the target object at the current detection time node based on the target distance change value includes:
[0015] When the target distance change value is equal to a preset distance threshold, determining that the target object is in a breathing conversion gap at the current detection time node;
[0016] When the target distance change value is greater than the preset distance threshold, determining that the target object is in an inhalation state at the current detection time node;
[0017] When the target distance change value is less than the preset distance threshold, it is determined that the target object is in the exhalation state at the current detection time node.
[0018] In some possible embodiments, the first respiratory position data includes multiple groups of data;
[0019] After determining the breathing state of the target object at the current detection time node based on the target distance change value, the method includes:
[0020] Perform distance calculation based on the origin position data and the first respiratory position data to determine a maximum respiratory distance and a minimum respiratory distance;
[0021] Acquire second respiratory speed data of the target object at the current detection time node; the second respiratory speed data is acquired based on an inertial measurement unit set on the target object; the second respiratory speed data represents the respiratory fluctuation change speed of the target object corresponding to the current detection time node;
[0022] A relative position calculation is performed based on the maximum breathing distance, the minimum breathing distance and the target breathing distance to obtain a breathing percentile value; the breathing percentile value represents the amplitude of the breathing fluctuation of the target object in a breathing cycle;
[0023] A breathing display image of the target object at the current detection time node is generated based on the target distance change value, the breathing percentile value and the second breathing speed data; the breathing display image represents the breathing state of the target object at the current detection time node.
[0024] In some possible embodiments, the preset time includes a plurality of detection time nodes;
[0025] The performing distance calculation based on the origin position data and the first respiratory position data to determine the maximum respiratory distance and the minimum respiratory distance includes:
[0026] Calculate the distance between the position data corresponding to each of the detection time nodes in the first respiratory position data and the origin position data to obtain a plurality of respiratory distance values corresponding to each position data;
[0027] The breathing distance maximum value and the breathing distance minimum value are determined from the plurality of breathing distance values.
[0028] In some possible embodiments, performing relative position calculation based on the maximum breathing distance, the minimum breathing distance, and the target breathing distance to obtain a breathing percentile value includes:
[0029] Calculating the difference between the target breathing distance and the minimum breathing distance to obtain a first distance difference;
[0030] Calculate the difference between the maximum breathing distance and the minimum breathing distance to obtain a second distance difference;
[0031] The ratio between the first distance difference and the second distance difference is calculated to obtain the respiratory percentile value.
[0032] In some possible embodiments, generating a respiratory display image of the target object at the current detection time node based on the target distance change value, the respiratory percentile value, and the second respiratory speed data includes:
[0033] Determine the flow direction of the image particle flow based on the target distance change value; the flow direction of the image particle flow includes a first flow direction and a second flow direction; the first flow direction corresponds to an inhalation state; the second flow direction corresponds to an exhalation state; the first flow direction is opposite to the second flow direction;
[0034] Performing breathing speed calculation on the second breathing speed data to obtain an absolute value of the breathing speed of the target object at the current detection time node;
[0035] determining a flow velocity of the image particle flow based on the absolute value of the breathing velocity; and matching the flow velocity of the image particle flow with the second breathing velocity data;
[0036] A display image of the respiratory state is generated based on the flow direction of the image particle flow, the percentile value, and the flow speed of the image particle flow.
[0037] According to a second aspect of the present disclosure, a device for detecting a respiratory state is provided, the device comprising:
[0038] A first data acquisition module is used to acquire first respiratory position data of a target object in each dimension within a preset time; the first respiratory position data is acquired based on an inertial measurement unit arranged on the target object; the first respiratory position data represents a respiratory fluctuation position of the target object corresponding to a detection time node;
[0039] A second data acquisition module is used to acquire second respiratory position data of the target object in each dimension at a current detection time node; the second respiratory position data is acquired based on an inertial measurement unit arranged on the target object; the second respiratory position data represents the respiratory fluctuation position corresponding to the target object at the current detection time node;
[0040] A target distance determination module is used to perform a first distance calculation based on the origin position data, the third respiratory position data and the second respiratory position data to obtain a target distance change value; the third respiratory position data is the data corresponding to the last detection time node within the preset time; the target distance change value represents the distance between the second respiratory position data and the origin, and the distance change between the third respiratory position data and the origin;
[0041] A breathing state determination module is used to determine the breathing state of the target object at the current detection time node based on the target distance change value.
[0042] According to a third aspect of the present disclosure, an electronic device is provided, comprising a processor and a memory, wherein the memory stores at least one instruction and at least one program, and the at least one instruction and the at least one program are loaded and executed by the processor to implement the respiratory state detection method as described above.
[0043] According to a fourth aspect of the present disclosure, a computer storage medium is provided, in which at least one instruction and at least one program are stored, and the at least one instruction and the at least one program are loaded and executed by a processor to implement the respiratory state detection method as described above.
[0044] The implementation of the present invention has the following beneficial effects:
[0045] The present invention realizes breathing detection of the target object by arranging an inertial measurement unit on the body part of the target object, which can improve the convenience of breathing state detection; before performing breathing detection, first breathing position data within a preset time is collected, and after waiting for the breathing state of the target object to stabilize, second breathing position data corresponding to the current detection time node is obtained, which can improve the reliability and accuracy of the breathing state detection result of the target object; based on the second breathing position data, the third breathing position data corresponding to the last detection time node within the preset time, and the origin position data, the target distance change value is calculated, and the breathing state of the target object is judged according to the distance change of the target object during the breathing process, which can improve the accuracy and convenience of determining the breathing state. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] In order to more clearly illustrate the technical solution of the present invention, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0047] Figure 1 A schematic diagram of a flow chart corresponding to a method for detecting a respiratory state provided in an embodiment of the present invention;
[0048] Figure 2 A schematic diagram of a flow chart corresponding to the target distance change value calculation provided by an embodiment of the present invention;
[0049] Figure 3 A schematic diagram of a process flow corresponding to the visual display of the respiratory state provided in an embodiment of the present invention;
[0050] Figure 4 A schematic diagram of a process flow corresponding to distance extreme value calculation provided in an embodiment of the present invention;
[0051] Figure 5A schematic diagram of a flow chart corresponding to the calculation of respiratory quantile values provided in an embodiment of the present invention;
[0052] Figure 6 A schematic diagram of a corresponding process for generating a respiratory display image provided by an embodiment of the present invention;
[0053] Figure 7 A schematic diagram of a process flow corresponding to respiratory state detection and image display provided by a specific embodiment of the present invention;
[0054] Figure 8 A respiratory display image provided by a specific embodiment of the present invention;
[0055] Fig. 9 A schematic diagram of the structure of a breathing detection device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0056] The following will be combined with the drawings in the embodiments of this specification to clearly and completely describe the technical solutions in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0057] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention 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 invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product, or server that includes 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.
[0058] Various exemplary embodiments, features and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. The same reference numerals in the accompanying drawings represent elements with the same or similar functions. Although various aspects of the embodiments are shown in the accompanying drawings, the drawings are not necessarily drawn to scale unless otherwise specified.
[0059] The word “exemplary” is used exclusively herein to mean “serving as an example, example, or illustration.” Any embodiment described herein as “exemplary” is not necessarily to be construed as preferred or advantageous over other embodiments.
[0060] The term "and / or" herein is only a description of the association relationship of the associated objects, indicating that there may be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the term "at least one" herein represents any combination of at least two of any one or more of a plurality of. For example, including at least one of A, B, and C can represent including any one or more elements selected from the set consisting of A, B, and C.
[0061] In addition, in order to better illustrate the present disclosure, numerous specific details are given in the following specific embodiments. It should be understood by those skilled in the art that the present disclosure can also be implemented without certain specific details. In some examples, methods, means, components and circuits well known to those skilled in the art are not described in detail in order to highlight the subject matter of the present disclosure.
[0062] Figure 1 A schematic diagram showing a flow chart corresponding to the method for detecting a breathing state provided in an embodiment of the present invention is shown; the execution subject may be a breathing detection system that can be equipped with an inertial measurement unit and can execute the method for detecting a breathing state; please refer to Figure 1 , a method for detecting a respiratory state, comprising:
[0063] Step S101: obtaining first respiratory position data of the target object in each dimension within a preset time; the first respiratory position data is obtained based on an inertial measurement unit arranged on the target object; the first respiratory position data characterizes the respiratory fluctuation position corresponding to the target object at a detection time node, the target object has respiratory fluctuations in a respiratory cycle, the respiratory fluctuation is the movement change from the highest point of the respiratory position to the lowest point of the respiratory position in a respiratory cycle, the respiratory fluctuation position is a position between the highest point of the respiratory position and the lowest point of the respiratory position corresponding to a detection time node of the target object, and correspondingly, the position data of this position obtained based on the inertial measurement unit is the respiratory position data.
[0064] In a specific embodiment, in order to improve the accuracy and reliability of respiratory state detection, before detecting the user's respiratory state at a certain moment, it is necessary to first obtain the first respiratory position data of the target object within a preset time, wherein the first respiratory position data includes multiple sets of data in multiple dimensions, and the first respiratory position data represents the respiratory fluctuation position corresponding to the target object at the detection time node.
[0065] The inertial measurement unit can be set on any body part of the target user, such as the head, chest, and abdomen. The inertial measurement unit is used to obtain and save respiratory position data and respiratory speed data; each dimension can include three dimensions, X represents the dimension corresponding to the left and right direction, Y represents the dimension corresponding to the front and back direction, and Z represents the dimension corresponding to the up and down direction; the first respiratory position data of each dimension within a preset time is obtained, that is, multiple groups (X, Y, Z) are obtained, and the data recording frequency can be 30Hz-90Hz.
[0066] Specifically, when the target object is in the transition interval of the breathing state or is not breathing, it is the initial state of breathing detection, and the breathing position data of the target object is set to (0,0,0); when the target object is breathing, as the body rises and falls during the breathing process, the breathing position data will change corresponding to the breathing state, so the first breathing position data used to characterize the breathing fluctuation position corresponding to the target object at the detection time node is obtained, which can be used to detect the breathing state of the target object.
[0067] In another specific embodiment, while obtaining the first respiratory position data corresponding to a plurality of detection time nodes within a preset time, the first respiratory speed data corresponding to a plurality of detection time nodes within the preset time may also be obtained.
[0068] Step S102: obtaining second respiratory position data of the target object in each dimension at the current detection time node; the second respiratory position data is obtained based on an inertial measurement unit arranged on the target object; the second respiratory position data represents the respiratory fluctuation position of the target object corresponding to the current detection time node;
[0069] In a specific embodiment, in order to detect the breathing state of the target object at the current detection time node, it is necessary to obtain a set of breathing position data (X) of the target object. m ,Y m ,Z m ), m represents the current detection time node, that is, obtaining the second respiratory position data of the target object at the current detection time node; the second respiratory position data includes position data of multiple dimensions; like the above-mentioned first respiratory position data, the second respiratory position data is used to characterize the respiratory fluctuation position corresponding to the target object at the current detection time node, so obtaining the second respiratory position data can be used to detect the respiratory state of the target object; the current detection time node can be any moment after a preset time, or it can be the next detection time node of the last detection time node among the multiple detection time nodes included in the preset time. In an embodiment of the present invention, the current detection time node is the next detection time node of the last detection time node among the multiple detection time nodes included in the preset time.
[0070] Step S103: performing distance calculation based on the origin position data, the third respiratory position data and the second respiratory position data to obtain a target distance change value; the third respiratory position data is data corresponding to the last detection time node within the preset time; the target distance change value represents the distance between the second respiratory position data and the origin, and the distance change between the third respiratory position data and the origin;
[0071] In a specific embodiment, the third respiratory position data may be the respiratory position data corresponding to the previous detection time node adjacent to the current detection time node. Since in the embodiment of the present invention, the current detection time node is the next detection time node of the last detection time node among the multiple detection time nodes included in the preset time, therefore, in the embodiment of the present invention, the detection time node corresponding to the third respiratory position data is the position data corresponding to the last detection time node within the preset time; as mentioned above, m represents the current detection time node, then the detection time node corresponding to the third respiratory position data is m-1, and the third respiratory position data is (X m-1 ,Y m-1 ,Z m-1 ).
[0072] By calculating the distance between the third respiratory position data and the origin, and calculating the distance between the second respiratory position data and the origin, the respiratory fluctuation position changes generated by the target object during the breathing process between the previous detection time node and the current detection time node are further calculated, thereby determining the breathing state of the target object at the current detection time node; wherein the origin can be any fixed point in space, and the corresponding origin position data is (0,0,0), and the embodiment of the present invention does not limit the determination of the origin.
[0073] In another specific embodiment, after obtaining the second respiratory position data of the target object in each dimension of the current detection time node, the first respiratory position data is updated according to the second respiratory position data to obtain updated first respiratory position data, and the number of detection time nodes corresponding to the updated first respiratory position data is consistent with the number of detection time nodes within the preset time.
[0074] Specifically, the first respiratory position data acquired in advance includes multiple groups of position data of multiple dimensions, that is, multiple groups (X, Y, Z), and each group (X, Y, Z) corresponds to a detection time node; the first respiratory position data is updated based on the second respiratory position data corresponding to the newly acquired current detection time node, specifically: the first acquired position data in the first respiratory position data is deleted, and the second respiratory position data is added to obtain the updated first respiratory position data; for the update of the first respiratory position data, it is necessary to always keep the number of detection time nodes corresponding to the updated first respiratory position data consistent with the number of detection time nodes included in the preset time. The first respiratory position data is updated in real time according to the first-in-first-out principle, so as to obtain distance data that is closer to the current respiratory state, so as to improve the real-time and accuracy of respiratory detection.
[0075] Specifically, as described in the above embodiment, the multiple groups (X, Y, Z) in the first respiratory position data may include 7 groups of motion data, including (x 1 ,y 1 ,z 1 )、(x 2 ,y 2 ,z 2 )···to(x 7 ,y 7 ,z 7 ), (x 1 ,y 1 ,z 1 ) corresponds to the detection time node t 1 ,(x 2 ,y 2 ,z 2 ) corresponds to the detection time node t 2 ···To(x 7 ,y 7 ,z 7 ) corresponds to the detection time node t 7 , the time sequence is t 1 to 7 ; The second breathing position data is (x 0 ,y 0 ,z 0 ), the corresponding detection time node is t 0 ; and t 0 Time is t 7 The next moment of the moment; get (x 0 ,y 0 ,z 0 ) and then delete the first respiratory position data. 1 The position data corresponding to the time (x 1 ,y 1 ,z 1), and add t 0 The second respiratory position data corresponding to the moment (x 0 ,y 0 ,z 0 ), obtain the updated first breathing position data;
[0076] The updated first respiratory position data includes seven sets of position data, which are sorted in chronological order as follows: 2 ,y 2 ,z 2 ),(x 3 ,y 3 ,z 3 ),(x 4 ,y 4 ,z 4 ),(x 5 ,y 5 ,z),(x 6 ,y 6 ,z 6 ),(x 7 ,y 7 ,z 7 ),(x 0 ,y 0 ,z 0 ).
[0077] Step S104: determining the breathing state of the target object at the current detection time node based on the target distance change value.
[0078] In a specific embodiment, the breathing state of the target object at the current detection time node is determined according to the target distance change value. That is, the breathing state can be determined by only using the distance change value obtained based on the breathing position data, without the need for more complex data processing. This can reduce the data processing process in the breathing state detection process, thereby improving the efficiency of the breathing state detection while saving computing resources.
[0079] In an embodiment of the present invention, the present invention realizes breathing detection of the target object by setting an inertial measurement unit on the body part of the target object, which can improve the convenience of breathing state detection; before performing breathing detection, the first breathing position data within a preset time is collected, and after waiting for the breathing state of the target object to stabilize, the second breathing position data corresponding to the current detection time node is obtained, which can improve the reliability and accuracy of the breathing state detection result of the target object; based on the second breathing position data, the third breathing position data corresponding to the last detection time node within the preset time, and the origin position data, the target distance change value is calculated, and the breathing state of the target object is judged according to the distance change of the target object during the breathing process, which can improve the accuracy and convenience of determining the breathing state.
[0080] Figure 2 The following is a flow chart of the target distance change value calculation corresponding to the embodiment of the present invention; Figure 2 As shown, the distance calculation is performed based on the third respiratory position data, the origin position data and the second respiratory position data to obtain the target distance change value, including:
[0081] Step S201: Calculate the distance between the origin position data and the second breathing position data to obtain the target breathing distance; the target breathing distance represents the distance between the breathing fluctuation position of the target object corresponding to the current detection time node and the origin;
[0082] In a specific embodiment, as described above, the origin position data is (0,0,0), and the second respiratory position data is (X m ,Y m ,Z m ), the distance between the origin position data and the second breathing position data is D m, That is, the target breathing distance is D m ;
[0083] in
[0084] Step S202: Calculate the distance between the origin position data and the third respiratory position data to obtain a respiratory distance value corresponding to the third respiratory position data; the respiratory distance value corresponding to the third respiratory position data represents the distance between the respiratory fluctuation position corresponding to the last detection time node within the preset time and the origin;
[0085] In a specific embodiment, as described above, the third respiratory position data is (X m-1 ,Y m-1 ,Z m-1 ), the distance between the origin position data and the third respiratory position data is Dm, that is, the respiratory distance value corresponding to the third respiratory position data is D m-1 ;
[0086] in
[0087] Step S203: Calculate the difference between the target breathing distance and the breathing distance value corresponding to the third breathing position data to obtain the target distance change value.
[0088] In a specific embodiment, the target distance change value is the difference between the distance between the respiratory position data corresponding to the current detection time node and the origin and the distance between the respiratory position data corresponding to the previous detection time node and the origin, that is, the target distance change value is ΔD m =D m-D m-1 .
[0089] In another specific embodiment, the target distance change value ΔD is obtained. m After that, according to ΔD m Determine whether the target object's breathing position corresponding to the current detection time node has shifted dramatically. Specifically: by comparing the target distance change value ΔD m The value of the preset breathing change distance is used to determine whether the breathing position of the target object corresponding to the current detection time node has shifted sharply; when the target distance change value ΔD m When the respiratory position is greater than a preset respiratory variation distance value, an offset is calculated to correct the first respiratory position data.
[0090] Specifically, the difference between the motion data of the second respiratory position data in each dimension and the motion data of the third respiratory position data in each dimension is calculated to obtain the data offset value corresponding to each dimension; the offsets in the corresponding dimensions are respectively added to the multiple groups (X, Y, Z) in the first respiratory position data, so as to realize the correction of the first respiratory position data, and the corrected first respiratory position data includes multiple groups of positions (X+ΔX, Y+ΔY, Z+ΔZ).
[0091] Specifically, the first respiratory position data includes multiple groups (X, Y, Z), and the second respiratory position data is (X m ,Y m ,Z m ), the third breathing position data is (X m-1 ,Y m-1 ,Z m-1 ); When it is determined that the respiratory position of the target object is significantly offset, it is necessary to calculate the offset Δ of each dimension, Δ including ΔX, ΔY and ΔZ, so as to correct the first respiratory position data; wherein ΔX=X m -X m-1 ,ΔY=Y m -Y m-1 ,ΔZ=Z m -Z m-1 .
[0092] The data correction method adopted in the embodiment of the present invention selects the position data corresponding to a moment closest to the current detection time node, and calculates the difference between the position data corresponding to the current detection time node, which can ensure that the offset of the target object during the breathing process is minimized to the greatest extent. The offset calculated between the two position data closest in time is more accurate than other offset calculation methods. The embodiment of the present invention does not limit the calculation of the offset, and can achieve the correction of the first respiratory position data.
[0093] In an embodiment of the present invention, by calculating the distance between the origin and the breathing position corresponding to the current detection time node, as well as the distance between the breathing positions corresponding to the previous detection time node, the change in the distance between the two can determine the breathing fluctuations of the target user at the current detection time node relative to when the breathing process has not started, thereby judging the breathing state, and reducing the data processing process in the breathing state detection process, thereby improving the efficiency of the breathing state detection while saving computing resources.
[0094] The determining the breathing state of the target object at the current detection time node based on the target distance change value includes:
[0095] When the target distance change value is equal to a preset distance threshold, determining that the target object is in a breathing conversion gap at the current detection time node;
[0096] In a specific embodiment, the preset distance threshold is 0, and the target distance change value is equal to the preset distance threshold, that is, ΔD m =0, indicating that at the current detection time node, the breathing fluctuation position of the target object has not changed relative to the breathing fluctuation position of the initial state of the breathing detection, and it can be determined that the target object is in the breathing conversion gap.
[0097] When the target distance change value is greater than the preset distance threshold, determining that the target object is in an inhalation state at the current detection time node;
[0098] In a specific embodiment, the target distance change value is greater than a preset distance threshold, namely ΔD m >0, indicating that at the current detection time node, the target object's breathing fluctuation position has increased relative to the breathing fluctuation position in the initial state of the breathing detection. Since the inhalation can reach the highest point of the breathing fluctuation change during the breathing process, the target object's breathing fluctuation position has increased relative to the breathing fluctuation position in the initial state of the breathing detection. m When >0, it can be determined that the target object is in the inhalation state.
[0099] When the target distance change value is less than the preset distance threshold, it is determined that the target object is in the exhalation state at the current detection time node.
[0100] In a specific embodiment, the target distance change value is less than a preset distance threshold, that is, ΔD m <0, indicating that at the current detection time node, the target object's breathing fluctuation position is lower than the breathing fluctuation position in the initial state of the breathing detection. Since exhalation can reach the lowest point of breathing fluctuation during the breathing process, the breathing fluctuation position is lower than the breathing fluctuation position in the initial state of the breathing detection. m When <0, it can be determined that the target object is in the exhalation state.
[0101] In another specific embodiment, in order to further improve the accuracy of breathing judgment, multiple inertial measurement units can be set on the target object, and correspondingly, the first breathing position data includes multiple groups of data corresponding to each inertial measurement unit; the second breathing position data includes multiple groups of data corresponding to each inertial measurement unit; since users have different breathing methods, different breathing methods will produce different position changes in the three-dimensional direction of the user's body part. Therefore, when judging the breathing state, the inertial measurement units in different parts should also be assigned different weights, that is, measurement weight data W, and the size of the measurement weight data W is determined based on the variation amplitude, that is, in a set of variation amplitude data, the measurement weight data W corresponding to the inertial measurement unit with a large variation amplitude is greater than the measurement weight data W corresponding to the inertial measurement unit with a small variation amplitude. In addition, the method for determining the measurement weight data is not limited in the embodiment of the present invention.
[0102] Specifically, for multiple measurement units, the target distance change value ΔD corresponding to each inertial measurement unit is calculated. m , that is, for each inertial measurement unit disposed at different parts of the body, the target distance change value ΔD is calculated according to the above steps S101 to S103 respectively. m ; According to the target distance change value ΔD of each inertial measurement unit m By determining the breathing judgment value H, the breathing state of the target object detected at different positions can be obtained respectively. m >0, H=1, ΔD m <0, H = -1, for the inertial measurement unit corresponding to H = 1, calculate its quantile value Q 1 , Q 1 is the average value of the quantiles corresponding to multiple inertial measurement units.
[0103] Based on the measurement weight data W of each inertial measurement unit and the corresponding breathing judgment value H, the sum of H*W of multiple inertial measurement units is calculated, that is, the breathing change value of each inertial measurement unit and the measurement weight data are multiplied, and each multiplied data is added to determine whether it is greater than 0. If it is greater than 0, it is the first breathing state, and if it is less than 0, it is the second breathing state.
[0104] In an embodiment of the present invention, the breathing state of the target object at the current detection time node is judged by the relationship between the target distance change value and the preset distance threshold, which can reduce the breathing detection differences caused by different users and realize standardized breathing detection; and the judgment of the existence of breathing conversion gaps can further improve the accuracy of breathing state detection.
[0105] Figure 3 A schematic diagram of a flow chart corresponding to the visual display of the respiratory state provided in an embodiment of the present invention; the first respiratory position data includes multiple groups of data; Figure 3 As shown, after determining the breathing state of the target object at the current detection time node based on the target distance change value, the method includes:
[0106] Step S301: performing distance calculation based on the origin position data and the first respiratory position data to determine a maximum respiratory distance and a minimum respiratory distance;
[0107] In a specific embodiment, the distance calculation is performed based on the origin position data and the first respiratory position data, that is, the distance D between the origin and the position data corresponding to multiple detection time nodes within the preset time is calculated, and the maximum respiratory distance D is determined from the multiple Ds. max and D min .
[0108] Step S302: obtaining second respiratory speed data of the target object at the current detection time node; the second respiratory speed data is obtained based on an inertial measurement unit set on the target object; the second respiratory speed data represents the respiratory fluctuation change speed of the target object corresponding to the current detection time node;
[0109] In a specific embodiment, the breathing fluctuation change speed is the speed of the target object's movement from the highest point of the breathing position to the lowest point of the breathing distance in a breathing cycle. According to the breathing fluctuation change speed of multiple breathing cycles, it is possible to determine whether the user's breathing state is stable or whether there are abnormal fluctuations; the breathing change frequency of the target object at the current detection time node can be obtained from the breathing display image, so it is necessary to obtain the target object's breathing speed, thereby further reflecting the breathing change frequency in the breathing display image.
[0110] Step S303: performing relative position calculation based on the maximum breathing distance, the minimum breathing distance and the target breathing distance to obtain a breathing percentile value; the breathing percentile value represents the amplitude of breathing fluctuation of the target object in a breathing cycle;
[0111] In a specific embodiment, the breathing fluctuation amplitude is the amplitude of the movement change of the target object from the highest breathing position and the lowest breathing position in a breathing cycle. According to the breathing fluctuation amplitude of multiple breathing cycles, it is possible to determine whether the user's breathing state is stable or whether there are abnormal fluctuations; the breathing percentile value Q can represent the relative position of the target breathing distance in the distance interval between the minimum breathing distance and the maximum breathing distance. By calculating the breathing percentile value, the breathing fluctuation change of the target object at the current detection time node can be determined, thereby further judging whether there is abnormality in the breathing state of the target object.
[0112] Step S304: generating a breathing display image of the target object at the current detection time node based on the target distance change value, the breathing percentile value and the second breathing speed data; the breathing display image represents the breathing state of the target object at the current detection time node.
[0113] In a specific embodiment, the breathing state, breathing change frequency and breathing change amplitude of the target object at the current detection time node can be obtained from the breathing display image, that is, according to the breathing display image, it can be determined whether the target object is in the breathing transition gap, exhalation state or inhalation state at the current detection time node, the speed of the target object's breathing can be determined, and the breathing amplitude change of the target object can be determined.
[0114] In the embodiment of the present invention, after judging the respiratory state, a respiratory display image matching the respiratory data is generated, which can improve the intuitiveness of the respiratory state display; the respiratory display image is determined by multiple respiratory data, which improves the correlation between the respiratory state display and the respiratory data.
[0115] Figure 4 A schematic diagram of the process flow corresponding to the distance extreme value calculation provided by an embodiment of the present invention is shown; the preset time includes multiple detection time nodes; Figure 4 As shown, the distance calculation is performed based on the origin position data and the first respiratory position data to determine the maximum value and the minimum value of the respiratory distance, including:
[0116] Step S401: calculating the distance between the position data corresponding to each of the detection time nodes in the first respiratory position data and the origin position data, and obtaining a plurality of respiratory distance values corresponding to each position data;
[0117] In a specific embodiment, the distance between the position data corresponding to each detection time node in the first respiratory position data and the origin position data is calculated, that is, the respiratory distance values D between multiple (X, Y, Z) and the origin (0, 0, 0) are calculated respectively;
[0118] in
[0119] Step S402: determining the maximum breathing distance and the minimum breathing distance from the multiple breathing distance values.
[0120] In a specific embodiment, among multiple D, the maximum D is determined to be D max , the minimum D is D min .
[0121] In another specific embodiment, after obtaining multiple Ds, data processing can be performed on the multiple Ds; specifically, the data processing includes smoothing processing and filtering processing; after obtaining multiple Ds, the multiple Ds are firstly smoothed. The present invention does not limit the method of smoothing processing. In the embodiment of the present invention, a sliding average method can be used to implement smoothing processing, by calculating the average value of the data in the window within a certain length, and sliding the window along the data sequence as the data sequence progresses, thereby obtaining a series of average values, that is, obtaining multiple sliding averaged D'.
[0122] Further, the D' after the multiple sliding averages is filtered. The present invention does not limit the filtering method. In the embodiment of the present invention, a Butterworth filter can be used to filter D', so as to filter out the noise caused by non-respiratory movement and obtain multiple filtered D'; D is determined from the multiple D' max and D min .
[0123] In an embodiment of the present invention, by determining the maximum value and the minimum value of the breathing distance, the breathing fluctuation position change interval of the target user when the breathing state is normal is determined, so that it is judged whether the breathing state is abnormal based on the change interval, which can improve the efficiency and convenience of breathing state judgment; at the same time, generating a breathing display image based on the change interval can improve the correlation between the breathing display image and the breathing state, as well as the accuracy of the generation of the breathing display image.
[0124] Figure 5 A schematic diagram of a flow chart corresponding to the calculation of respiratory quantile values provided in an embodiment of the present invention; Figure 5 As shown, the relative position calculation is performed based on the maximum breathing distance, the minimum breathing distance and the target breathing distance to obtain the breathing percentile value, including:
[0125] Step S501: Calculate the difference between the target breathing distance and the minimum breathing distance to obtain a first distance difference;
[0126] In a specific embodiment, the difference between the target breathing distance and the minimum breathing distance is calculated to obtain a first distance difference, that is, to calculate D m -D min .
[0127] Step S502: Calculate the difference between the maximum breathing distance and the minimum breathing distance to obtain a second distance difference;
[0128] In a specific embodiment, the difference between the maximum breathing distance and the minimum breathing distance is calculated to obtain a second distance difference, that is, to calculate D max -Dmin .
[0129] Step S503: Calculate the ratio between the first distance difference and the second distance difference to obtain the respiratory percentile value.
[0130] In a specific embodiment, the respiratory quantile value is represented by Q,
[0131] For example, the highest point of breathing position is (X H ,Y H ,Z H ), the lowest point of breathing position is (X L ,Y L ,Z L ), the breathing position corresponding to the current detection time node is (X m ,Y m ,Z m );but
[0132]
[0133] By calculating D m and D min The difference between the breathing position and the lowest point of the breathing position of the target object at the current detection time node is obtained, and the breathing change corresponding to the target object at the current detection time node can be further obtained, thereby determining the amplitude of the breathing change.
[0134] In the embodiment of the present invention, by calculating the percentile value, the relative position of the target object in the breathing fluctuation position change interval during the breathing process is determined, and calculating the breathing percentile value can improve the accuracy and reliability of image generation.
[0135] Figure 6 FIG. 2 is a schematic diagram showing a corresponding process flow of generating a respiratory display image provided by an embodiment of the present invention; Figure 6 As shown, the generating of the breathing display image of the target object at the current detection time node based on the target distance change value, the breathing percentile value and the second breathing speed data includes:
[0136] Step S601: determining a flow direction of the image particle flow based on the target distance change value; the flow direction of the image particle flow includes a first flow direction and a second flow direction; the first flow direction corresponds to an inhalation state; the second flow direction corresponds to an exhalation state; the first flow direction is opposite to the second flow direction;
[0137] In a specific embodiment, the respiratory display image includes respiratory feedback information, and the respiratory state of the target object at the current detection time node can be obtained from the respiratory display image based on the respiratory feedback information; specifically, the respiratory feedback information includes but is not limited to image, sound and other information.
[0138] In an embodiment of the present invention, the respiratory feedback information is an image particle flow, and the flow direction of the image particle flow represents the respiratory state of the target object; based on the target distance change value, the respiratory state of the target object at the current detection time node can be determined, and therefore, the flow direction of the image particle flow can be determined according to the target distance change value; for example, the flow direction of the image particle flow includes a first flow direction and a second flow direction, and the first flow direction is opposite to the second flow direction, that is, when the first flow direction corresponds to the inhalation state, the second flow direction corresponds to the exhalation state, or when the first flow direction corresponds to the exhalation state, the second flow direction corresponds to the inhalation state; when the image particle flow is stationary or does not change, the target object is in a respiratory conversion gap.
[0139] In another specific embodiment, the breathing feedback information may also be sound information; for example, a first prompt tone is set to correspond to an exhalation state, a second prompt tone is set to correspond to an inhalation state, and silence indicates a breathing transition interval. The present invention does not impose too many restrictions on the breathing feedback information, as long as it can distinguish the breathing states.
[0140] Step S602: Calculate the breathing speed of the second breathing speed data to obtain the absolute value of the breathing speed of the target object at the current detection time node;
[0141] In a specific embodiment, obtaining the second respiratory rate is to obtain (V xm ,V ym ,V zm ), absolute value of breathing rate
[0142] Step S603: determining the flow velocity of the image particle flow based on the absolute value of the breathing velocity; the flow velocity of the image particle flow matches the second breathing velocity data;
[0143] In a specific embodiment, the flow velocity V of the image particle flow is determined according to the absolute value of the breathing velocity |V|, V=K 1 *|V|, where K 1 is the breathing rate coefficient.
[0144] Specifically, the respiratory rate coefficient K 1 The default value is 1, that is, by default V = |V|, the breathing speed coefficient K 1The value can change with the user's breathing status during the breathing detection process; it can also be changed according to the user's actual needs during the breathing detection process; it can also be set to a fixed value and remain unchanged during the breathing detection process.
[0145] Step S604: generating a display image of the respiratory state based on the flow direction of the image particle flow, the percentile value, and the flow speed of the image particle flow.
[0146] In a specific embodiment, a respiratory display image is generated according to the flow direction, the quantile value, and the flow speed of the image particle flow.
[0147] In another specific embodiment, the display position P of the image particle flow in the respiratory display image can also be combined with the respiratory position coefficient K 2 Further confirm that P = K 2 *Q, that is, multiplying the percentile value by the respiratory position coefficient K 2 Determine the display position of the image particle flow in the respiratory display image. The respiratory position coefficient K 2 It can be set according to the actual needs of the user, or it can be set to a fixed value that does not change during the breathing detection process.
[0148] In an embodiment of the present invention, based on the respiratory display image, the respiratory state, respiratory change speed and respiratory fluctuation of the target object at the current detection node can be viewed, and the user's respiratory state can be visualized, thereby improving the intuitiveness of respiratory state viewing.
[0149] Figure 7 A schematic diagram showing a process flow of respiratory state detection and image display corresponding to a specific embodiment of the present invention is shown; Figure 8 FIG. 4 shows a respiratory display image provided by a specific embodiment of the present invention; Figure 7 as well as Figure 8 As shown, in a specific embodiment, while obtaining the first respiratory position data of the target object within a preset time, the first respiratory speed data of the preset time can also be obtained, the distance between the first respiratory position data within the preset time and the origin is calculated, and the respiratory distance extreme value is determined, wherein the respiratory distance extreme value includes the maximum value and the minimum value of the respiratory distance; the second respiratory position data and the second respiratory speed data of the target object at the current detection time node are obtained, the target distance change value corresponding to the current detection time node is calculated, and the relationship between the target distance change value and the preset distance threshold is determined, so as to determine the respiratory state of the target object at the current detection time node; and a respiratory display image is generated in combination with the respiratory speed data, the target distance change value and the respiratory distance extreme value; Figure 8Point a is the breathing feedback information, that is, the image particle flow, b and c are used to indicate the flow direction of the particle flow, corresponding to the breathing state. In the initial state, point a is located at point 0. As the target object breathes, point a moves to the left or right. Figure 8 The moving direction of point a can determine the breathing state at a certain detection time node, and multiple continuous breathing display images can determine the breathing speed and breathing change amplitude. In addition, when the target distance change value is detected to be greater than the preset breathing change distance value, the first breathing position data is corrected.
[0150] In another specific embodiment, the respiratory state detection method disclosed in the present invention can be combined with VR (Virtual Reality) technology and applied to the field of breathing meditation; the user actively wears a VR device associated with the respiratory state detection system, and after starting meditation, the respiratory state detection system detects the user's current respiratory state, calculates the respiratory percentile value, determines the flow direction of the image particle flow according to the respiratory state, determines the movement speed of the image particle flow according to the respiratory speed data, and calculates the display position of the image particle flow in the respiratory display image according to the respiratory percentile value, thereby constructing a respiratory display image that matches the current respiratory meditation state for the user; the user understands his current respiratory state through the respiratory display image observed by the VR glasses, and can adjust his own breathing accordingly in combination with his actual meditation situation. The combination of the respiratory state detection method and the field of breathing meditation expands the application field of respiratory state detection, thereby improving the extensiveness of respiratory detection application. In addition, the user actively adjusts his breathing through the observed respiratory state, which can improve the effect of breathing meditation.
[0151] The embodiment of the present invention also provides a breathing state detection device, such as Fig. 9 As shown, the device comprises:
[0152] The first data acquisition module 910 is used to acquire first respiratory position data of the target object in each dimension within a preset time; the first respiratory position data is acquired based on an inertial measurement unit set on the target object; the first respiratory position data represents the respiratory fluctuation position of the target object corresponding to the detection time node;
[0153] A second data acquisition module 920 is used to acquire second respiratory position data of the target object in each dimension at the current detection time node; the second respiratory position data is acquired based on an inertial measurement unit set on the target object; the second respiratory position data represents the respiratory fluctuation position corresponding to the target object at the current detection time node;
[0154] The target distance determination module 930 is used to perform a first distance calculation based on the origin position data, the third respiratory position data and the second respiratory position data to obtain a target distance change value; the third respiratory position data is the data corresponding to the last detection time node within the preset time; the target distance change value represents the distance between the second respiratory position data and the origin, and the distance change between the third respiratory position data and the origin;
[0155] The breathing state determination module 940 is used to determine the breathing state of the target object at the current detection time node based on the target distance change value.
[0156] In some other embodiments, the target distance determination module 930 further includes:
[0157] A first distance calculation module is used to calculate the distance between the origin position data and the second breathing position data to obtain the target breathing distance; the target breathing distance represents the distance between the breathing fluctuation position of the target object corresponding to the current detection time node and the origin;
[0158] A second distance calculation module is used to calculate the distance between the origin position data and the third respiratory position data to obtain a respiratory distance value corresponding to the third respiratory position data; the respiratory distance value corresponding to the third respiratory position data represents the distance between the respiratory fluctuation position corresponding to the last detection time node within the preset time and the origin;
[0159] The third distance calculation module is used to calculate the difference between the target breathing distance and the breathing distance value corresponding to the third breathing position data to obtain the target distance change value.
[0160] In some other embodiments, the respiratory state determination module 940 further includes:
[0161] A first breathing state determination module is used to determine that the target object is in a breathing transition gap at the current detection time node when the target distance change value is equal to a preset distance threshold;
[0162] A second breathing state determination module, configured to determine that the target object is in an inhalation state at the current detection time node when the target distance change value is greater than the preset distance threshold;
[0163] The third breathing state determination module is used to determine that the target object is in the exhalation state at the current detection time node when the target distance change value is less than the preset distance threshold.
[0164] In another embodiment, the apparatus further comprises:
[0165] A distance extreme value calculation module, used for performing distance calculation based on the origin position data and the first respiratory position data to determine a maximum respiratory distance and a minimum respiratory distance;
[0166] A breathing speed acquisition module, used to acquire second breathing speed data of the target object at the current detection time node; the second breathing speed data is acquired based on an inertial measurement unit set on the target object; the second breathing speed data represents the breathing fluctuation change speed of the target object corresponding to the current detection time node;
[0167] A breathing quantile value determination module, used to perform relative position calculation based on the maximum breathing distance, the minimum breathing distance and the target breathing distance to obtain a breathing quantile value; the breathing quantile value represents the amplitude of breathing fluctuation of the target object in a breathing cycle;
[0168] A display image generation module is used to generate a respiratory display image of the target object at the current detection time node based on the target distance change value, the respiratory percentile value and the second respiratory speed data; the respiratory display image represents the respiratory state of the target object at the current detection time node.
[0169] In some other embodiments, the distance extreme value calculation module further includes:
[0170] a fourth distance calculation module, used for calculating the distance between the position data corresponding to each of the detection time nodes in the first respiratory position data and the origin position data, and obtaining a plurality of respiratory distance values corresponding to each position data;
[0171] The distance extreme value determination module is used to determine the maximum breathing distance and the minimum breathing distance from the multiple breathing distance values.
[0172] In some other embodiments, the respiratory percentile value determination module further includes:
[0173] A first difference calculation module, used for calculating the difference between the target breathing distance and the minimum breathing distance to obtain a first distance difference;
[0174] A second difference calculation module is used to calculate the difference between the maximum breathing distance and the minimum breathing distance to obtain a second distance difference;
[0175] The percentile value calculation module is used to calculate the ratio between the first distance difference and the second distance difference to obtain the respiratory percentile value.
[0176] In some other embodiments, the display image generation module further includes:
[0177] A flow direction determination module, used to determine the flow direction of the image particle flow based on the target distance change value; the flow direction of the image particle flow includes a first flow direction and a second flow direction; the first flow direction corresponds to an inhalation state; the second flow direction corresponds to an exhalation state; the first flow direction is opposite to the second flow direction;
[0178] a breathing speed absolute value calculation module, used to calculate the breathing speed of the second breathing speed data to obtain the absolute value of the breathing speed of the target object at the current detection time node;
[0179] A flow velocity determination module, used to determine the flow velocity of the image particle flow based on the absolute value of the breathing velocity; the flow velocity of the image particle flow matches the second breathing velocity data;
[0180] The display image determination module is used to generate a display image of the respiratory state based on the flow direction of the image particle flow, the percentile value and the flow speed of the image particle flow.
[0181] The device and method embodiments in the device embodiment are based on the same inventive concept and are used to implement the above-mentioned breathing detection method.
[0182] An embodiment of the present invention also provides a device for detecting a respiratory state, the device comprising: a processor and a memory, the memory storing at least one instruction, at least one program, a code set or an instruction set, the at least one instruction, the at least one program, the code set or the instruction set being loaded and executed by the processor to implement a method for detecting a respiratory state as described in any one of the method embodiments.
[0183] An embodiment of the present invention also provides a storage medium, which can be set in a server to store at least one instruction, at least one program, a code set or an instruction set for implementing a data management method in a method embodiment. The at least one instruction, the at least one program, the code set or the instruction set are loaded and executed by the processor to implement a respiratory state detection method as described in any one of the method embodiments.
[0184] Optionally, in an embodiment of the present invention, the above-mentioned storage medium may be located in at least one of a plurality of network servers of a computer network. Optionally, in an embodiment of the present invention, the above-mentioned storage medium may include, but is not limited to, various media that can store program codes, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.
[0185] It can be seen from the embodiments provided by the present invention that the present invention realizes breathing detection of the target object by setting an inertial measurement unit on the body part of the target object, which can improve the convenience of breathing state detection; before performing breathing detection, the first breathing position data within a preset time is collected, and after waiting for the breathing state of the target object to stabilize, the second breathing position data corresponding to the current detection time node is obtained, which can improve the reliability and accuracy of the breathing state detection result of the target object; the target distance change value is calculated based on the second breathing position data, the third breathing position data corresponding to the last detection time node within the preset time, and the origin position data, and the breathing state of the target object is judged according to the distance change of the target object during the breathing process, which can improve the accuracy and convenience of breathing state determination; in addition, the combination of the breathing state detection method of the present invention and the field of breathing meditation expands the application field of breathing state detection, thereby improving the wide application of breathing detection.
[0186] It should be noted that various embodiments of the present disclosure have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes are obvious to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The choice of terms used in this article is intended to best explain the principles of the embodiments, practical applications, or technical improvements in the market, or to enable other ordinary skill in the art to understand the embodiments disclosed herein.
Claims
1. A method for detecting a respiratory state, characterized in that: The method comprises: Acquire first respiratory position data of the target object in each dimension within a preset time; the first respiratory position data is acquired based on an inertial measurement unit arranged on the target object; the first respiratory position data represents the respiratory fluctuation position of the target object corresponding to the detection time node; Acquire second respiratory position data of the target object in each dimension at the current detection time node; the second respiratory position data is acquired based on an inertial measurement unit arranged on the target object; the second respiratory position data represents the respiratory fluctuation position of the target object corresponding to the current detection time node; A distance calculation is performed based on the origin position data, the third respiratory position data and the second respiratory position data to obtain a target distance change value; the third respiratory position data is data corresponding to the last detection time node within the preset time; the target distance change value represents the distance between the second respiratory position data and the origin, and the distance change between the third respiratory position data and the origin; The breathing state of the target object at the current detection time node is determined based on the target distance change value.
2. A method for detecting a respiratory state according to claim 1, characterized in that: The performing distance calculation based on the third respiratory position data, the origin position data and the second respiratory position data to obtain a target distance change value includes: Calculate the distance between the origin position data and the second breathing position data to obtain the target breathing distance; the target breathing distance represents the distance between the breathing fluctuation position of the target object corresponding to the current detection time node and the origin; Calculate the distance between the origin position data and the third respiratory position data to obtain a respiratory distance value corresponding to the third respiratory position data; the respiratory distance value corresponding to the third respiratory position data represents the distance between the respiratory fluctuation position corresponding to the last detection time node within the preset time and the origin; The target distance change value is obtained by calculating a difference between the target breathing distance and a breathing distance value corresponding to the third breathing position data.
3. A method for detecting a respiratory state according to claim 1, characterized in that: The determining the breathing state of the target object at the current detection time node based on the target distance change value includes: When the target distance change value is equal to a preset distance threshold, determining that the target object is in a breathing conversion gap at the current detection time node; When the target distance change value is greater than the preset distance threshold, determining that the target object is in an inhalation state at the current detection time node; When the target distance change value is less than the preset distance threshold, it is determined that the target object is in the exhalation state at the current detection time node.
4. A method for detecting a respiratory state according to claim 2, characterized in that: The first respiratory position data includes multiple groups of data; After determining the breathing state of the target object at the current detection time node based on the target distance change value, the method includes: Perform distance calculation based on the origin position data and the first respiratory position data to determine a maximum respiratory distance and a minimum respiratory distance; Acquire second respiratory speed data of the target object at the current detection time node; the second respiratory speed data is acquired based on an inertial measurement unit set on the target object; the second respiratory speed data represents the respiratory fluctuation change speed of the target object corresponding to the current detection time node; A relative position calculation is performed based on the maximum breathing distance, the minimum breathing distance and the target breathing distance to obtain a breathing percentile value; the breathing percentile value represents the amplitude of the breathing fluctuation of the target object in a breathing cycle; A breathing display image of the target object at the current detection time node is generated based on the target distance change value, the breathing percentile value and the second breathing speed data; the breathing display image represents the breathing state of the target object at the current detection time node.
5. A method for detecting a respiratory state according to claim 4, characterized in that: The preset time includes a plurality of detection time nodes; The performing distance calculation based on the origin position data and the first respiratory position data to determine the maximum respiratory distance and the minimum respiratory distance includes: Calculate the distance between the position data corresponding to each of the detection time nodes in the first respiratory position data and the origin position data to obtain a plurality of respiratory distance values corresponding to each position data; The breathing distance maximum value and the breathing distance minimum value are determined from the plurality of breathing distance values.
6. A method for detecting a respiratory state according to claim 5, characterized in that: The relative position calculation based on the maximum breathing distance, the minimum breathing distance and the target breathing distance is performed to obtain the breathing percentile value, including: Calculating the difference between the target breathing distance and the minimum breathing distance to obtain a first distance difference; Calculate the difference between the maximum breathing distance and the minimum breathing distance to obtain a second distance difference; The ratio between the first distance difference and the second distance difference is calculated to obtain the respiratory percentile value.
7. A method for detecting a respiratory state according to claim 6, characterized in that: The generating of the breathing display image of the target object at the current detection time node based on the target distance change value, the breathing percentile value and the second breathing speed data includes: Determine the flow direction of the image particle flow based on the target distance change value; the flow direction of the image particle flow includes a first flow direction and a second flow direction; the first flow direction corresponds to an inhalation state; the second flow direction corresponds to an exhalation state; the first flow direction is opposite to the second flow direction; Performing breathing speed calculation on the second breathing speed data to obtain an absolute value of the breathing speed of the target object at the current detection time node; determining a flow velocity of the image particle flow based on the absolute value of the breathing velocity; and matching the flow velocity of the image particle flow with the second breathing velocity data; A display image of the respiratory state is generated based on the flow direction of the image particle flow, the percentile value, and the flow speed of the image particle flow.
8. A breathing state detection device, characterized in that: The device comprises: A first data acquisition module is used to acquire first respiratory position data of a target object in each dimension within a preset time; the first respiratory position data is acquired based on an inertial measurement unit arranged on the target object; the first respiratory position data represents a respiratory fluctuation position of the target object corresponding to a detection time node; A second data acquisition module is used to acquire second respiratory position data of the target object in each dimension at a current detection time node; the second respiratory position data is acquired based on an inertial measurement unit arranged on the target object; the second respiratory position data represents the respiratory fluctuation position corresponding to the target object at the current detection time node; A target distance determination module is used to perform a first distance calculation based on the origin position data, the third respiratory position data and the second respiratory position data to obtain a target distance change value; the third respiratory position data is the data corresponding to the last detection time node within the preset time; the target distance change value represents the distance between the second respiratory position data and the origin, and the distance change between the third respiratory position data and the origin; A breathing state determination module is used to determine the breathing state of the target object at the current detection time node based on the target distance change value.
9. An electronic device, comprising a processor and a memory, wherein the memory stores at least one instruction and at least one program, and the at least one instruction and the at least one program are loaded and executed by the processor to implement the respiratory state detection method as described in any one of claims 1-7.
10. A computer storage medium, wherein at least one instruction and at least one program are stored in the computer storage medium, wherein the at least one instruction and the at least one program are loaded and executed by a processor to implement the respiratory state detection method as described in any one of claims 1 to 7.