Exhalation guidance method, apparatus, electronic device, and storage medium
Patent Information
- Application Number
- CN202311354430.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-18
- Publication Date
- 2026-10-27
- Estimated Expiration
- 2043-10-18
AI Technical Summary
[0003]用力肺功能测试属于主动式测量,但在实践中发现,大多数用户不能正确执行符合测试标准的呼气动作,进而影响用力肺功能测试的测试精度
[0021]在本申请实施例中,在检测到用户开始呼气时,采集用户在呼气过程中产生的声音信号;根据声音信号的信号幅值和/或持续时长确定目标信息;其中,信号幅值与用户的呼气速度呈正相关;输出目标信息。
Smart Images

Figure CN119837515B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of electronic equipment technology, and in particular to an exhalation guidance method, device, electronic equipment and storage medium. Background Technology
[0002] Forced pulmonary function (FPF) testing is the gold standard for diagnosing chronic obstructive pulmonary disease (COPD). Unlike other physiological indicators such as electrocardiogram (ECG) and blood oxygen saturation, FPF is an active measurement. During the test, the user needs to exhale rapidly and explosively after reaching maximum inhalation.
[0003] Forced lung function testing is an active measurement, but in practice, it has been found that most users cannot correctly perform the exhalation action that meets the testing standards, which affects the accuracy of the forced lung function test. Summary of the Invention
[0004] This application provides an exhalation guidance method, device, electronic device, and storage medium, which helps to standardize the user's exhalation movements during forced lung function tests.
[0005] The first aspect of this application provides an exhalation guidance method, including:
[0006] When the user begins to exhale, the sound signal generated by the user during the exhalation process is collected;
[0007] Target information is determined based on the signal amplitude and / or duration of the sound signal; wherein the signal amplitude is positively correlated with the user's exhalation rate;
[0008] Output the target information.
[0009] A second aspect of this application provides an exhalation guidance device, comprising:
[0010] The signal acquisition unit is used to acquire the sound signal generated by the user during the exhalation process when the user is detected to have started exhaling.
[0011] An information determination unit is configured to determine target information based on the signal amplitude and / or duration of the sound signal; wherein the signal amplitude is positively correlated with the user's exhalation rate;
[0012] An information output unit is used to output the target information.
[0013] A third aspect of this application provides an electronic device, including...
[0014] Memory containing executable program code;
[0015] and the processor coupled to the memory;
[0016] The processor calls the executable program code stored in the memory, and when the executable program code is executed by the processor, the processor implements the method as described in the first aspect of the embodiments of this application.
[0017] A fourth aspect of this application provides a computer-readable storage medium having executable program code stored thereon, wherein when the executable program code is executed by a processor, it implements the method described in the first aspect of this application.
[0018] The fifth aspect of this application discloses a computer program product that, when run on a computer, causes the computer to execute the method described in the first aspect of this application.
[0019] The sixth aspect of this application discloses an application publishing platform for publishing computer program products, wherein when the computer program product is run on a computer, the computer executes the method described in the first aspect of this application.
[0020] As can be seen from the above technical solutions, the embodiments of this application have the following advantages:
[0021] In this embodiment of the application, when the user begins to exhale, the sound signal generated by the user during the exhalation process is collected; target information is determined based on the signal amplitude and / or duration of the sound signal; wherein the signal amplitude is positively correlated with the user's exhalation rate; and the target information is output.
[0022] By implementing this method, target information is determined and output based on the signal amplitude and / or duration of the sound signal generated by the user during exhalation. Since the signal amplitude of the sound signal is positively correlated with the user's exhalation rate, the output of the target information allows the user to intuitively perceive the exhalation rate and / or duration, thereby helping to standardize the user's exhalation movements during forced lung function tests. Attached Figure Description
[0023] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments and the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application, and other drawings can be obtained based on these drawings.
[0024] Figure 1 This is a scene illustration of the exhalation guidance method disclosed in the embodiments of this application;
[0025] Figure 2 This is a flowchart illustrating an exhalation guidance method disclosed in an embodiment of this application;
[0026] Figure 3 This is another flowchart illustrating the exhalation guidance method disclosed in the embodiments of this application;
[0027] Figures 4A-9B These are illustrations of the animations disclosed in the embodiments of this application;
[0028] Figures 10A-10B This is a diagram illustrating the animation effect curves disclosed in the embodiments of this application;
[0029] Figure 11 This is another flowchart illustrating the exhalation guidance method disclosed in the embodiments of this application;
[0030] Figures 12A-12F This is an illustration of the exhalation guidance interface disclosed in the embodiments of this application;
[0031] Figure 13 This is an illustration of an exhalation guidance device disclosed in an embodiment of this application;
[0032] Figure 14 This is a structural illustration of an electronic device disclosed in an embodiment of this application. Detailed Implementation
[0033] This application provides an exhalation guidance method, device, electronic device, and storage medium, which allows users to intuitively perceive the exhalation speed and / or duration, helping to standardize the user's exhalation actions during forced lung function tests.
[0034] To enable those skilled in the art to better understand the present application, the technical solutions of the embodiments of the present application will be described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. All embodiments based on the present application should fall within the scope of protection of the present application.
[0035] It should be noted that, in this application, the words "exemplarily" or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design described as "exemplarily" or "for example" in this application should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of words such as "exemplarily" or "for example" is intended to present the relevant concepts in a specific manner.
[0036] "At least one" means one or more, while "more" means two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can mean: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, and c can mean: a, or b, or c, or a and b, or a and c, or b and c, or a, b, and c, where a, b, and c can be single or multiple.
[0037] The following is a brief explanation of the specialized terms used in this application:
[0038] Forced pulmonary function (FPF) testing is the gold standard for diagnosing chronic obstructive pulmonary disease (COPD). Unlike other physiological indicators such as electrocardiogram (ECG) and blood oxygen saturation, FPF is an active measurement. During the test, the user needs to exhale rapidly and explosively after a maximal inhalation.
[0039] Please see Figure 1 , Figure 1 This is a scene illustration of the exhalation guidance method disclosed in an embodiment of this application. For example... Figure 1 The illustrated scenario includes an electronic device 10 and a user 20, and the expiratory guidance method can be applied to the electronic device 10. The electronic device 10 has a lung function assessment function, enabling the user 20 to perform forced lung function tests.
[0040] Among them, electronic device 10 may include general handheld screen electronic devices, such as mobile phones, smartphones, portable terminals, terminals, personal digital assistants (PDAs), portable multimedia players (PMPs), laptops, notebooks, wireless broadband (Wibro) terminals, tablet computers (PCs), smart PCs, point of sales (POS) terminals, and in-vehicle computers, etc.
[0041] Electronic device 10 may also include wearable devices. Wearable devices are portable electronic devices that can be worn directly on the user's body or integrated into the user's clothing or accessories. Wearable devices are not just hardware devices; they can also achieve powerful intelligent functions through software support, data interaction, and cloud server interaction, such as computing, positioning, and alarm functions. They can also connect to mobile phones and various terminals. Wearable devices can include, but are not limited to, wrist-supported devices (such as watches, wristbands, etc.), foot-supported devices (such as shoes, socks, or other leg-wearing products), head-supported devices (such as glasses, helmets, headbands, etc.), as well as smart clothing, backpacks, canes, accessories, and other non-mainstream product forms.
[0042] Electronic device 10 may also include large-scale pulmonary function instruments for hospitals, portable pulmonary function instruments, etc.
[0043] Forced lung function testing (FLP) is an active measurement, but in practice, it has been found that most users cannot correctly perform the exhalation movements that meet the testing standards. For example, when users undergo FLP in hospitals, the doctors usually guide them on how to exhale correctly through verbal explanations and demonstrations. However, many people still cannot perform the exhalation movements correctly due to limited comprehension or physical limitations. Furthermore, when using portable spirometers or other portable devices for FLP testing, compared to hospitals, the lack of professional medical guidance and supervision makes it even more difficult for users to perform the correct exhalation movements.
[0044] In the technical solution of this application, the electronic device 10 can determine target information based on the signal amplitude and / or duration of the sound signal generated by the user 20 during exhalation when the user 20 is detected to be exhaling, and then output the target information. Since the signal amplitude of the sound signal is positively correlated with the exhalation rate of the user 20, the output of the target information allows the user 20 to intuitively perceive the exhalation rate and / or duration, which helps to standardize the user 20's exhalation actions during the forced lung function test.
[0045] Please see Figure 2 , Figure 2 This is a flowchart illustrating an exhalation guidance method disclosed in an embodiment of this application. Figure 2 The expiratory guidance method shown may include the following steps:
[0046] 201. When the electronic device detects that the user has started to exhale, it collects the sound signals generated by the user during the exhalation process.
[0047] In some embodiments, the electronic device may periodically collect sound signals generated by the user during exhalation through its microphone.
[0048] The microphone may include a microphone element and a microphone cable. The microphone element is a miniature capacitor consisting of a thin film and a set of electrodes. When a sound wave vibrates the thin film, the electrodes will oscillate and generate an electrical signal. The microphone cable transmits the electrical signal to the recording device of the electronic device for amplification and recording to obtain a sound signal.
[0049] In some embodiments, the electronic device detecting whether a user has begun to exhale may include:
[0050] The electronic device determines whether it has received a specified action. If it has received the specified action, it determines that the user has started exhaling. If it has not received the specified action, it determines that the user has not started exhaling.
[0051] The specified action may include, but is not limited to, a specified gesture or touching a target button. The target button is a physical or virtual button used to trigger the sound signal acquisition.
[0052] In practice, it has been found that a sufficiently long exhalation time is also key to the forced lung function test. In some embodiments, the electronic device can also start a countdown for the target duration when it detects that the user has started exhaling, which can serve as a reminder for the user to maintain a long exhalation time.
[0053] In some embodiments, the electronic device may also start a countdown for the target duration when it detects that the user’s exhalation rate first exceeds a speed threshold (e.g., an exhalation flow rate threshold).
[0054] The countdown can be represented by audio or text representing time, and this application does not limit the specific time.
[0055] Currently, forced pulmonary function tests require a duration of at least 6 seconds (s). For example, the target duration could be 6 seconds, 7 seconds, or 8 seconds. For example, with a target duration of 6 seconds, the electronic device could start a 6-second countdown on its display screen when it detects that the user has begun exhaling (e.g., when the user's exhalation rate first exceeds a speed threshold).
[0056] To ensure the accuracy of forced lung function test results, it is generally required that the user and the device remain relatively still, that the distance between the user's mouth and the device be appropriate, and that the environment be as quiet as possible. Based on this,
[0057] Before step 201, the electronic device can also determine the user's motion state relative to the electronic device; if the motion state indicates that the user is stationary relative to the electronic device, then exhalation detection is initiated.
[0058] Furthermore, when the motion state indicates that the user is in motion relative to the electronic device, the electronic device can output a first prompt message to instruct the user to remain stationary relative to the electronic device.
[0059] Before step 201, the electronic device can also determine the distance between the user's mouth and the electronic device; if the distance is within a specified distance range, then exhalation detection is initiated.
[0060] For example, a distance range of 10 centimeters (cm) to 20 centimeters is specified.
[0061] Furthermore, the electronic device can also output a second prompt message to instruct the user to adjust the distance between the user's mouth and the electronic device when the distance between the user's mouth and the electronic device is not within a specified distance range.
[0062] Before step 201, the electronic device can also determine whether the current ambient volume is lower than the volume threshold; if the current ambient volume is lower than the volume threshold, then breath detection is initiated.
[0063] In addition, the electronic device can also output a third prompt message to indicate that the ambient noise is too loud when the current ambient volume is greater than or equal to the volume threshold.
[0064] Before step 201, the electronic device can also guide the user to perform forced exhalation training by displaying a candle animation. The candle animation can include a lit candle with a flame whose size changes according to the user's exhalation speed; the faster the exhalation, the smaller the flame.
[0065] For example, when the electronic device detects that the exhalation rate is greater than a speed threshold, it displays a candle with its flame extinguished; when the electronic device detects that the exhalation rate is less than or equal to the speed threshold, it displays a candle with its flame on. 202. The electronic device determines target information based on the signal amplitude and / or duration of the sound signal.
[0066] Among them, the signal amplitude is positively correlated with the user's exhalation rate; the larger the signal amplitude, the faster the user's exhalation rate.
[0067] The target information can be used to reflect the exhalation rate and / or duration.
[0068] In some embodiments, the target information may include visual information and / or audio information. The visual information may include, but is not limited to, at least one of the following: animation frames, text, and numbers.
[0069] In some embodiments, the target information may be generated periodically during the user's exhalation process; or, it may be generated at the end of exhalation, which is not limited in the embodiments of this application.
[0070] 203. The electronic device outputs target information.
[0071] The target information output by the electronic device may include:
[0072] Electronic devices output visual information through a display screen;
[0073] And / or,
[0074] Electronic devices output audio information through speakers.
[0075] By implementing this method, target information is determined and output based on the signal amplitude and / or duration of the sound signal generated by the user during exhalation. Since the signal amplitude of the sound signal is positively correlated with the user's exhalation rate, the output of the target information allows the user to intuitively perceive the exhalation rate and / or duration, which helps to standardize the user's exhalation movements during forced pulmonary function tests.
[0076] Please see Figure 3 , Figure 3 This is another flowchart illustrating the exhalation guidance method disclosed in the embodiments of this application. For example... Figure 3 The target information in the illustrated exhalation guidance method may include animation frames. For example... Figure 3 The expiratory guidance method shown may include the following steps:
[0077] 301. When the electronic device detects that the user has started to exhale, it collects the sound signals generated by the user during the exhalation process.
[0078] For a detailed description of step 301, please refer to [link / reference]. Figure 2 The following description of step 201 will not be repeated here.
[0079] 302. Electronic devices determine effect parameters based on the signal amplitude and / or duration of the sound signal.
[0080] Both signal amplitude and duration are positively correlated with the effect parameters. It's understandable that the longer the signal amplitude and duration, the larger the effect parameters.
[0081] In the embodiments of this application, the effect parameters may include, but are not limited to, at least one of the following:
[0082] The rise of virtual avatars;
[0083] The longitudinal travel distance of the virtual avatar;
[0084] The fill height of the target pattern.
[0085] 303. The electronic device determines the first animation frame based on the effect parameters.
[0086] The display effect parameters corresponding to the first animation frame can be the effect parameters obtained in step 302, which are accumulated based on the display effect parameters of the previous animation frame. The display effect parameters of the animation frame can refer to the final effect parameters presented by the animation frame.
[0087] 304. The electronic device outputs the first animation frame.
[0088] In some embodiments, the output of the animation frame may be continuously executed throughout the user's entire exhalation process, or it may be continuously executed only for a period of time shortly after the start of exhalation; the embodiments of this application do not impose any limitations.
[0089] When the output of the animation frame is only executed for a period of time shortly after the start of exhalation, the electronic device determines the effect parameters based on the signal amplitude and / or duration of the sound signal. This may include: within a specified duration, the electronic device determines the effect parameters based on the signal amplitude and / or duration of the sound signal.
[0090] The specified duration refers to the period of time shortly after the start of exhalation. For example, the specified duration may be within the first second (s) of sound signal acquisition, the first 1.5s, or the first 2s.
[0091] It should be noted that, regardless of whether the output of the first animation frame is continuously executed throughout the user's entire exhalation process or only for a short period of time shortly after the start of exhalation, the process by which the electronic device determines the effect parameters based on the signal amplitude and / or duration of the sound signal can be found in the following description.
[0092] In some embodiments, the electronic device determines the effect parameters based on the signal amplitude of the sound signal, which may include: the electronic device determining the effect parameters based on the signal amplitude of the sound signal and an amplitude relationship table; wherein the amplitude relationship table may include the correspondence between the signal amplitude and the effect parameters.
[0093] The amplitude relationship table can include multiple amplitude intervals and the corresponding effect parameters for each amplitude interval. Electronic devices can find the target amplitude interval of the sound signal from the multiple amplitude intervals in the amplitude relationship table and obtain the corresponding effect parameters for the target amplitude interval.
[0094] In some embodiments, the electronic device determines the effect parameters based on the duration, which may include: the electronic device determining the effect parameters based on the duration and a duration relationship table; wherein the duration relationship table may include the correspondence between the duration and the effect parameters.
[0095] The duration relationship table can include multiple duration intervals and the corresponding effect parameters for each duration interval. The electronic device can find the target duration interval containing the above-mentioned duration from the multiple duration intervals in the duration relationship table and obtain the effect parameters corresponding to the target duration interval.
[0096] In some embodiments, the electronic device determines effect parameters based on the signal amplitude and duration of the sound signal, which may include: the electronic device determining a first effect parameter component based on the signal amplitude of the sound signal; determining a second effect parameter component based on the duration; and obtaining the effect parameters based on the first effect parameter component and the second effect parameter component.
[0097] The method for determining the first and second effect parameter components can be found in the above description and will not be repeated here. The effect parameters can be obtained by averaging, weighting, or summing the first and second effect parameter components; this application does not limit this.
[0098] In some embodiments, if the user stops exhaling or exhales too slowly during the entire exhalation process, the animation will show a falling-back effect. See the following description for details:
[0099] In some embodiments, within a specified duration, the electronic device determines the effect parameter based on the signal amplitude and / or duration of the sound signal, which may include: within the specified duration, if the electronic device detects that the user has terminated exhalation, then using the initial effect parameter as the effect parameter; within the specified duration, if the electronic device detects that the user has not terminated exhalation, then determining the effect parameter based on the signal amplitude and / or duration of the sound signal.
[0100] If the effect parameters obtained in step 302 are not the initial effect parameters, the corresponding display effect parameters of the first animation frame can be the effect parameters obtained in step 302 accumulated on the display effect parameters of the previous animation frame.
[0101] If the effect parameters obtained in step 302 are the initial effect parameters, then the display effect parameters corresponding to the first animation frame are the initial effect parameters.
[0102] The initial effect parameters can be preset parameters, and the animation frame corresponding to the initial effect parameters can be the initial animation frame of the animation. For example, when the effect parameter is the rising height of the virtual character, the initial effect parameter includes a rising height of 0. For example, when the effect parameter is the vertical travel distance of the virtual character, the initial effect parameter includes a vertical travel distance of 0. For example, when the effect parameter is the fill height of the target pattern, the initial effect parameter includes a fill height of 0.
[0103] Understandably, if the user continues to exhale within the specified duration, the displayed effect parameters can continuously increase as the amplitude and / or duration of the sound signal changes. If the user stops exhaling within the specified duration, the displayed effect parameters will revert to the initial effect parameters.
[0104] By implementing this method, if the user stops exhaling within a short period after the start of exhalation, the displayed effect parameters will return to the initial effect parameters, which can maximize the forced rapid and explosive exhalation of the user.
[0105] For example, when the effect parameter is the rising height of the virtual avatar, and the virtual avatar is a balloon, and the specified duration is within the first second:
[0106] If the user continues to exhale, the balloon height in the next animation frame will be greater than the balloon height in the previous animation frame, resulting in an animation of the balloon continuously rising. This animation can be seen in [reference needed]. Figure 4A ,like Figure 4A The animation shown includes two consecutive animation frames, namely animation frame 1 and animation frame 2, wherein the height of the balloon corresponding to animation frame 1 is less than the height of the balloon corresponding to animation frame 2.
[0107] If the user interrupts exhalation, the balloon height corresponding to the animation frame at the moment of interruption is 0, while the balloon height corresponding to the animation frame before the interruption is greater than 0. The resulting animation shows the balloon falling back to 0. This animation can be found in [reference needed]. Figure 4B ,like Figure 4B The animation shown includes two consecutive animation frames, namely animation frame 1 and animation frame 2. The balloon height corresponding to animation frame 1 is greater than 0, and the balloon height corresponding to animation frame 2 is equal to 0.
[0108] For example, when the effect parameter is the longitudinal travel distance of the virtual avatar, and the virtual avatar is a car, within the specified duration of the first second:
[0109] If the user continues to exhale, the distance the car travels in the next animation frame will be greater than the distance the car travels in the previous animation frame, resulting in an animation where the car appears to be moving forward continuously. This animation can be seen in [reference needed]. Figure 5A ,like Figure 5A The animation shown includes two consecutive animation frames, namely animation frame 1 and animation frame 2. The distance the car travels in animation frame 1 is less than the distance the car travels in animation frame 2.
[0110] If the user interrupts exhalation, the car's distance traveled in the animation frame at the moment of interruption is 0, meaning the car's position is at the starting position. In the animation frames before the exhalation is interrupted, the car's distance traveled is greater than 0, resulting in an animation where the car returns to its starting position. This animation can be found in [reference needed]. Figure 5B ,like Figure 5B The animation shown includes two consecutive animation frames, namely animation frame 1 and animation frame 2. In animation frame 1, the distance the car travels is greater than 0, while in animation frame 2, the distance the car travels is equal to 0.
[0111] For example, when the effect parameter is the fill height of the target pattern, and the target pattern is a rectangle, and the specified duration is within the first second:
[0112] If the user continues to exhale, the fill height of the subsequent animation frame will be greater than the fill height of the previous animation frame. The resulting animation will show the rectangle's fill height continuously increasing. This animation can be seen in [reference needed]. Figure 6A ,like Figure 6A The animation shown includes two consecutive animation frames, namely animation frame 1 and animation frame 2. The fill height of the rectangle in animation frame 1 is smaller than the fill height of the rectangle in animation frame 2.
[0113] If the user interrupts exhalation, the fill height corresponding to the animation frame at the moment of interruption is 0, and the fill height corresponding to the animation frame before the interruption is greater than 0. The resulting animation shows the rectangle's fill height returning to 0. This animation can be seen in [reference needed]. Figure 6B ,like Figure 6B The animation shown includes two consecutive animation frames, namely animation frame 1 and animation frame 2. The fill height of the rectangle in animation frame 1 is greater than 0 and less than the fill height of the rectangle in animation frame 2, which is equal to 0.
[0114] In some embodiments, when the output of the animation frame is continuously executed throughout the user's entire exhalation process, the electronic device may, after the specified duration ends, switch the first animation frame at the end of the specified duration to the second animation frame corresponding to the initial effect parameters if the current signal amplitude of the sound signal is less than or equal to the first amplitude threshold; and if the current signal amplitude of the sound signal is greater than the first amplitude threshold, continue to display the first animation frame at the end of the specified duration.
[0115] The first amplitude threshold can be a pre-set benchmark by the electronic device to define the speed of exhalation. If the amplitude of the sound signal is greater than the first amplitude threshold, it indicates a fast exhalation speed; conversely, it indicates a slow exhalation speed. The second animation frame can refer to the initial frame of the animation.
[0116] Understandably, after a specified duration, if the exhalation rate is fast, the first animation frame corresponding to the end of the specified duration will be retained; if the exhalation rate is slow, the first animation frame corresponding to the end of the specified duration will be switched to the second animation frame.
[0117] For example, when the effect parameter is the rising height of the virtual avatar, and the virtual avatar is a balloon, and the specified duration is within the first second:
[0118] If the user continues to exhale rapidly after 1 second, the balloon's height will remain unchanged. See the corresponding animation for reference. Figure 7A ,like Figure 7A The animation shown includes two consecutive animation frames, namely animation frame 1 and animation frame 2, wherein the balloon height corresponding to animation frame 1 and the balloon height corresponding to animation frame 2 are the same.
[0119] If the user's exhalation rate slows down after 1 second, the balloon will drop back to 0. See the corresponding animation for details. Figure 7B ,like Figure 7B The animation shown includes two consecutive animation frames, namely animation frame 1 and animation frame 2. Animation frame 1 is the animation frame before the exhalation speed slows down, and the corresponding balloon height is greater than 0. Animation frame 2 is the animation frame when the exhalation speed slows down, and the corresponding balloon height is 0.
[0120] For example, when the effect parameter is the longitudinal travel distance of the virtual avatar, and the virtual avatar is a car, within the specified duration of the first second:
[0121] If the user continues to exhale rapidly after 1 second, the car's travel distance will remain unchanged. See the corresponding animation for details. Figure 8A ,like Figure 8A The animation shown includes two consecutive animation frames, namely animation frame 1 and animation frame 2, wherein the driving distance corresponding to animation frame 1 and the driving distance corresponding to animation frame 2 are the same.
[0122] If the user's exhalation rate slows down after 1 second, the car returns to the starting position. See the corresponding animation for details. Figure 8B ,like Figure 8B The animation shown includes two consecutive animation frames, namely animation frame 1 and animation frame 2. Animation frame 1 is the animation frame before the exhalation speed slows down, and the corresponding travel distance is greater than 0. Animation frame 2 is the animation frame when the exhalation speed slows down, and the corresponding travel distance is 0.
[0123] For example, when the effect parameter is the fill height of the target pattern, and the target pattern is a rectangle, and the specified duration is within the first second:
[0124] If the user continues to exhale rapidly after 1 second, the fill height of the target pattern will remain unchanged. See the corresponding animation for details. Figure 9A ,like Figure 9AThe animation shown includes two consecutive animation frames, namely animation frame 1 and animation frame 2, wherein the fill height corresponding to animation frame 1 and the fill height corresponding to animation frame 2 are the same.
[0125] If the user's exhalation rate slows down after 1 second, the fill height of the target pattern will drop back to 0. See the corresponding animation for details. Figure 9B ,like Figure 9B The animation shown includes two consecutive animation frames, namely animation frame 1 and animation frame 2. Animation frame 1 is the animation frame before the exhalation speed slows down, and the corresponding fill height is greater than 0. Animation frame 2 is the animation frame when the exhalation speed slows down, and the corresponding fill height is 0.
[0126] In some embodiments, the animation effect presented by the animation frame is a continuously positive change throughout the user's entire exhalation process, that is, the display effect parameters do not drop.
[0127] For example, when the effect parameter is the rising height of the virtual avatar, the virtual avatar is a balloon that rises continuously throughout the user's exhalation.
[0128] For example, when the effect parameter is the longitudinal travel distance of the virtual avatar, the virtual avatar is a car, and the car moves forward continuously throughout the user's exhalation.
[0129] For example, when the effect parameter is the fill height of the target pattern, the target pattern is a rectangle that is continuously filled throughout the user's exhalation.
[0130] The method for determining the effect parameters corresponding to any animation frame is described below:
[0131] In some embodiments, the electronic device determines the effect parameters based on the signal amplitude of the sound signal, which may include:
[0132] Within a specified time period, the electronic device determines the effect parameters based on the signal amplitude of the sound signal and the first amplitude relationship table;
[0133] After a specified duration, the electronic device determines the effect parameters based on the signal amplitude of the sound signal and the second amplitude relationship table; wherein, for the same signal amplitude, the effect parameter corresponding to the first amplitude relationship table is greater than the effect parameter corresponding to the second amplitude relationship table.
[0134] By implementing this method, the effect parameters change rapidly within a specified time period and slowly after the specified time period, which can achieve the goal of prompting users to exhale as quickly as possible within the specified time period.
[0135] Electronic devices determine effect parameters based on the signal amplitude or duration of the sound signal, which may include:
[0136] Within a specified time period, the electronic device determines the effect parameters based on the signal amplitude of the sound signal;
[0137] After a specified duration, the electronic device determines the effect parameters based on the duration of the sound signal.
[0138] Understandably, within a specified duration, the effect parameters can change continuously with the change in the amplitude of the sound signal, and after the specified duration, the effect parameters can change continuously with the change in duration.
[0139] To ensure that users can perform effective forced lung function tests, the electronic device can also output exhalation rule information before the test begins.
[0140] In some embodiments, the electronic device may also display a touch button for triggering the start of the test before the test begins.
[0141] In some embodiments, after step 302, the electronic device can also determine the parameter coordinates corresponding to the current moment based on the effect parameters, and update the guide curve based on the parameter coordinates.
[0142] The horizontal and vertical axes of the parameter coordinates corresponding to the current moment represent time and the cumulative effect parameter, respectively. For an explanation of the cumulative effect parameter, please refer to the above description; for an explanation of the display effect parameters, please refer to the above description as well, which will not be repeated here. The guide curve represents the relationship between time and the cumulative effect parameter.
[0143] Please see Figure 10A , Figure 10A This is a diagram illustrating an animation effect curve disclosed in an embodiment of this application. Figure 10A The animation effect curve shown contains moments where the cumulative effect parameter drops. The cumulative effect parameter is represented by 's'.
[0144] Please see Figure 10B , Figure 10B This is another illustration of the animation effect curve disclosed in the embodiments of this application. Figure 10B The animation curve shown does not show a moment when the cumulative effect parameter drops back. The cumulative effect parameter is represented by 's'.
[0145] By implementing this method, electronic devices can also guide users to regulate their exhalation movements through changing curves. This requires less computation, provides more timely guidance, and achieves better results in regulating users' exhalation movements.
[0146] Since the forced lung function test requires a duration of more than 6 seconds, in some embodiments, when the user terminates exhalation, if the duration of continuous exhalation at the current moment is less than the duration threshold, an instruction to exhale again is output.
[0147] By implementing the above method and outputting animated frames, the exhalation speed and / or duration can be displayed to users in a vivid and interesting way, which further helps to standardize the user's exhalation movements during forced lung function tests.
[0148] Please see Figure 11 , Figure 11 This is another flowchart illustrating the exhalation guidance method disclosed in the embodiments of this application. For example... Figure 11 The expiratory guidance method shown may include the following steps:
[0149] 1101. When the electronic device detects that the user has started to exhale, it collects the sound signal generated by the user during the exhalation process.
[0150] For a detailed description of step 1101, please refer to [link / reference]. Figure 2 The following description of step 201 will not be repeated here.
[0151] 1102. Electronic devices determine the target score based on the signal amplitude and / or duration of the sound signal.
[0152] Step 1102 can be executed by the electronic device when it detects that the user has started exhaling, or it can be executed by the electronic device when it determines that the amplitude of the current sound signal is greater than the first amplitude threshold (i.e., after the user has started to exhale forcefully).
[0153] 1103. The target score is output by the electronic device.
[0154] The target score indicates the acceptable level of exhalation; the higher the target score, the higher the acceptable level of exhalation.
[0155] In some embodiments, the electronic device may be pre-set with a score update cycle, during which the target score is updated once within each score update cycle, either during the user's exhalation or after the user begins to exhale forcefully. For example, the score update cycle is 0.5 seconds.
[0156] In some embodiments, the update of the target score within each score update cycle is related to the amplitude and / or duration of the sound signal. The electronic device determines the target score based on the signal amplitude and / or duration of the sound signal, which may include:
[0157] The electronic device obtains the score increment corresponding to the first score update period based on the signal amplitude and / or duration of each sound signal within the first score update period; wherein, the signal amplitude and / or duration of each sound signal within the first score update period are proportional to the score increment corresponding to the first score update period.
[0158] The electronic device determines the target score corresponding to the first score update cycle based on the target score in the previous score update cycle and the score increment.
[0159] The first score update period can be any score update period. It should be noted that when the first score update period is the first score update period, the target score in the previous score update period is 0.
[0160] In some embodiments, the electronic device obtains the score increment corresponding to the first score update period based on the signal amplitude and / or duration of each sound signal within the first score update period, which may include:
[0161] The electronic device determines the score increment for each sound signal based on the signal amplitude and / or duration of each sound signal within the first score update cycle.
[0162] The electronic device accumulates the score increment corresponding to each sound signal to obtain the score increment corresponding to the first score update cycle.
[0163] The electronic device can pre-set a first score table and / or a second score table. The first score table includes the correspondence between signal amplitude and score, where the score is positively correlated with the signal amplitude. The second score table may include the correspondence between duration and score, where the score is positively correlated with the duration. The electronic device can determine the score increment for each sound signal based on the first and / or second score tables.
[0164] In some embodiments, the electronic device obtains the score increment corresponding to the first score update period based on the signal amplitude and / or duration of each sound signal within the first score update period, which may include:
[0165] The electronic device obtains the parameter increment corresponding to the first score update cycle based on the signal amplitude and / or duration of each sound signal within the first score update cycle;
[0166] The electronic device determines the score increment corresponding to the first score update cycle based on the parameter increment.
[0167] The electronic device can pre-set a third score table, which may include multiple parameter increment intervals and the score corresponding to each parameter increment interval. The electronic device can search the third score table for the score that matches the parameter increment corresponding to the first score update cycle, and use that score as the score increment corresponding to the first score update cycle.
[0168] It should be noted that in the third value table, the parameter increment and the score increment are positively correlated.
[0169] In some embodiments, after the user begins to exhale or after the user begins to exhale forcefully, the parameter increment corresponding to the score update period can be related to the signal amplitude of the sound signal within the score update period.
[0170] Based on this, the electronic device obtains the parameter increment corresponding to the first score update cycle according to the signal amplitude of each sound signal within the first score update cycle, which may include, but is not limited to, the following methods:
[0171] Method 1: The electronic device obtains the parameter increment corresponding to the first score update cycle based on the signal amplitude and amplitude relationship table of each sound signal within the first score update cycle.
[0172] Understandably, after the user begins to exhale or begins to exhale forcefully, the parameter increment corresponding to each value update cycle is determined based on a unique amplitude relationship table.
[0173] The electronic device obtains the parameter increment corresponding to the first score update cycle based on the signal amplitude and amplitude relationship table of each sound signal within the first score update cycle, which may include:
[0174] The electronic device determines the effect parameters corresponding to each sound signal in the first score update period based on the signal amplitude and amplitude relationship table of each sound signal in the first score update period;
[0175] Based on the effect parameters corresponding to each sound signal within the first score update cycle, determine the parameter increment corresponding to the first score update cycle.
[0176] The parameter increment corresponding to the first score update cycle can be obtained by averaging, summing, or taking the median of the effect parameters corresponding to each sound signal within the first score update cycle, and this application embodiment does not limit it.
[0177] Method 2: Within a specified time period, the electronic device obtains the parameter increment corresponding to the first score update cycle based on the signal amplitude of each sound signal within the first score update cycle and the first amplitude relationship table; after the specified time period, the electronic device obtains the parameter increment corresponding to the first score update cycle based on the signal amplitude of each sound signal within the first score update cycle and the second amplitude relationship table; wherein, for the same signal amplitude, the effect parameter corresponding to the first amplitude relationship table is greater than the effect parameter corresponding to the first amplitude relationship table.
[0178] Understandably, after the user begins to exhale or begins to exhale forcefully, the parameter increment corresponding to each score update cycle is determined according to the first amplitude relationship table within a specified time period. After the specified time period, the parameter increment corresponding to each score update cycle is determined according to the second amplitude relationship table. Since the effect parameter corresponding to the first amplitude relationship table is greater than the effect parameter corresponding to the second amplitude relationship table for the same signal amplitude, it is evident that the target score increases faster within the specified time period compared to after the specified time period. This not only encourages the user to exhale quickly and explosively.
[0179] In some embodiments, after the user begins to exhale or after the user begins to exhale forcefully, the parameter increment corresponding to the score update period can be related to the signal amplitude or duration of the sound signal within the score update period.
[0180] Based on this, the electronic device obtains the parameter increment corresponding to the first score update cycle according to the signal amplitude or duration of each sound signal within the first score update cycle, which may include:
[0181] Within a specified time period, the electronic device obtains the parameter increment corresponding to the first score update cycle based on the signal amplitude of each sound signal within the first score update cycle.
[0182] After a specified period of time, the electronic device obtains the parameter increment corresponding to the first score update cycle based on the duration corresponding to the first score update cycle.
[0183] The method by which the electronic device obtains the parameter increment corresponding to the first score update cycle based on the signal amplitude of each sound signal within the first score update cycle can be found in the above description and will not be repeated here.
[0184] The duration of the first score update cycle may include the duration of continuous exhalation at the end of the first score update cycle. For example, if the first score update cycle is the first score update cycle, then the duration of the first score update cycle is the duration of continuous exhalation at the end of the first score update cycle, which is a complete score update cycle.
[0185] The electronic device obtains the parameter increment corresponding to the first score update cycle based on the duration corresponding to the first score update cycle. This may include: the electronic device obtaining the parameter increment corresponding to the first score update cycle based on the duration corresponding to the first score update cycle and the duration relationship table.
[0186] The duration relationship table can include multiple duration intervals and the corresponding effect parameters for each duration interval. The electronic device can find the target duration interval where the duration corresponding to the first score update cycle is located from the multiple duration intervals in the duration relationship table, obtain the effect parameters corresponding to the target duration interval, and use these effect parameters as the parameter increment for the first score update cycle.
[0187] Understandably, during the user's entire exhalation process, or after the user begins to exhale forcefully, the parameter increment corresponding to each score update cycle is determined based on the signal amplitude of the sound signal within a specified time. After the specified time, the parameter increment is determined based on the duration corresponding to the score update cycle. Since both the signal amplitude and duration are positively correlated with the parameter increment, the larger the amplitude signal and the longer the duration, the larger the target score will be. This can not only encourage the user to exhale quickly and explosively, but also encourage the user to exhale for a longer period of time.
[0188] In some embodiments, within a specified duration, the update of the target score in each score update cycle is related to the amplitude and / or duration of the sound signal. After the specified duration, the update of the target score in each score update cycle can be based on the largest score increment within the specified duration. This not only encourages users to exhale as quickly as possible within the specified duration, but also encourages users to continue exhaling for as long as possible.
[0189] Based on this, the electronic device obtains the score increment corresponding to the first score update cycle according to the signal amplitude and / or duration of each sound signal within the first score update cycle, which may include:
[0190] Within a specified time period, the score increment corresponding to the first score update period is obtained based on the signal amplitude and / or duration of each sound signal within the first score update period.
[0191] The electronic device can also use the highest score increment within the specified time period as the score increment for the second score update cycle after a specified time period.
[0192] The target score for the second score update period is determined based on the target score in the previous score update period and the score increment corresponding to the second score update period.
[0193] The description of how the electronic device obtains the score corresponding to the first score update cycle based on the signal amplitude and / or duration of each sound signal within the first score update cycle within a specified time period can be found in the above description and will not be repeated here.
[0194] For example, if the specified time period includes score update cycle 1 and score update cycle 2, where 7 points are added in score update cycle 1 and 5 points are added in score update cycle 2, then after the specified time period, 7 points will be added in each score update cycle.
[0195] In some embodiments, the electronic device may also output the score increment corresponding to each score update cycle.
[0196] In some embodiments, the target score can be output after the user finishes exhaling. The electronic device determines the target score based on the signal amplitude and duration of the sound signal. This may include: the electronic device determining the target score based on the duration of the sound signal when the user finishes exhaling and the signal amplitude of each sound signal within a specified duration.
[0197] In some embodiments, the electronic device determines a target score based on the duration of the user's exhalation and the signal amplitude of each sound signal within a specified duration, which may include:
[0198] The electronic device determines a first score based on the duration of the user's exhalation.
[0199] The electronic device determines the second score based on the signal amplitude of each sound signal within a specified time period;
[0200] The electronic device accumulates the first and second scores to obtain the target score.
[0201] Among them, the duration and the first score are positively correlated.
[0202] In some embodiments, the electronic device determines a second score based on the signal amplitude of each sound signal within a specified duration, which may include, but is not limited to, the following methods:
[0203] Method 1: The electronic device determines the maximum signal amplitude based on the signal amplitude of each sound signal within a specified time period, and determines the second score based on the maximum signal amplitude; wherein the signal amplitude and the second score are positively correlated.
[0204] Method 2: The electronic device acquires the number of sound signals with corresponding signal amplitudes greater than the second amplitude threshold within a specified time period, and determines the second score based on the number; wherein the number and the second score are positively correlated.
[0205] The second amplitude threshold is greater than the first amplitude threshold.
[0206] In some embodiments, after step 1103, the electronic device can also determine whether the target score is greater than the score threshold. If it is greater, it can obtain a target gift that matches the target score from the virtual gift pool and output the target gift.
[0207] The score threshold is preset by the electronic device and is used to measure whether the target score is a qualified score. A qualified score corresponds to a qualified exhalation. In other words, when the target score is greater than the score threshold, the target score is considered qualified; when the target score is less than or equal to the qualified score, the target score is considered unqualified.
[0208] By implementing this method, when the target score is greater than the score threshold, a virtual gift matching the target score can be output, which helps to increase the fun of the test.
[0209] In some embodiments, the electronic device may also evaluate the test results of the forced lung function test based on the sound signals generated by the user during exhalation, provided that the target score is greater than a score threshold.
[0210] In some embodiments, the electronic device may also output an indication message indicating that the exhalation is not up to standard when the target score is less than or equal to the score threshold.
[0211] By implementing this method, the electronic device can also update the score based on the exhalation speed and / or duration during the user's exhalation process, which can play an explicit encouraging role and further help to standardize the user's exhalation behavior.
[0212] In some embodiments, the target information includes animation frames, target scores, and score increments.
[0213] For example, when the effect parameter is the height of the balloon's ascent, the exhalation guidance interface displayed by the electronic device during the user's exhalation can be found in [reference needed]. Figures 12A-12E .in, Figure 12A This is the exhalation guidance interface before the test begins, such as... Figure 12A The exhalation guidance interface shown includes a virtual button 1201 for triggering the test; Figure 12B This is the exhalation guidance interface at the start of the test, where the balloon is at the starting position 0 below the red line; Figure 12C This is the exhalation guidance interface at 1 second. The score increment is 10 points at 1 second, and the target score is 50 points. Figure 12D This is the exhalation guidance interface at 3 seconds. The score increment is 10 points at 3 seconds, and the target score is 70 points. Figure 12E This is the exhalation guidance interface at the end of continuous exhalation (6s). At this time, the target score is 100 points, the score increment is 10 points, and the balloon falls back to 0 (that is, the starting position below the red line).
[0214] in, Figures 12B-12E The exhalation guidance interface also displays multiple grids arranged from top to bottom to indicate the height of the balloon, so that users can intuitively know the height change of the balloon within 1 second.
[0215] In some embodiments, the fill color of the grid can be progressively darker from bottom to top.
[0216] Understandably, users access the system by pressing the virtual 1201 button on the touchscreen. Figure 12B At this point, the user begins to exhale rapidly, and the balloon rises continuously within 1 second. From 1 second to 6 seconds, the user maintains a rapid exhalation speed. During the 1 second to 6 seconds, the height of the balloon on the exhalation guidance interface is the same as the height of the balloon on the exhalation guidance interface at 1 second. At 6 seconds, the user stops exhaling, and the height of the balloon on the exhalation guidance interface drops back to 0.
[0217] For example, 12F is another exhalation guidance interface at 3 seconds, as shown in the figure. The score increment at 3 seconds is 10 points, the target score is 70 points, and the balloon height drops back to 0.
[0218] It is understandable that the user maintains a rapid exhalation rate for 1-3 seconds, and stops exhaling or exhales too slowly at 3 seconds.
[0219] Please see Figure 13 , Figure 13 This is an illustration of an exhalation guidance device disclosed in an embodiment of this application. Figure 13 The exhalation guidance device shown may include a signal acquisition unit 1301, an information determination unit 1302, and an information output unit 1303: wherein:
[0220] The signal acquisition unit 1301 is used to acquire the sound signal generated by the user during the exhalation process when the user starts to exhale.
[0221] The information determination unit 1302 is used to determine target information based on the signal amplitude and / or duration of the sound signal; wherein the signal amplitude is positively correlated with the user's exhalation rate;
[0222] The information output unit 1303 is used to output target information.
[0223] In some embodiments, the method by which the information determining unit 1302 determines target information based on the signal amplitude and / or duration of the sound signal may specifically include:
[0224] The information determination unit 1302 is used to determine effect parameters based on the signal amplitude and / or duration of the sound signal; and to determine the first animation frame based on the effect parameters.
[0225] Furthermore, the information output unit 1303 may be used to output target information in a specific manner, including: the information output unit 1303 is used to output the first animation frame.
[0226] In some embodiments, the method by which the information determining unit 1302 determines the effect parameters based on the signal amplitude and / or duration of the sound signal may specifically include:
[0227] The information determination unit 1302 is used to determine effect parameters based on the signal amplitude and / or duration of the sound signal within a specified time period.
[0228] In some embodiments, the information output unit 1303 is further configured to, after the specified duration has ended, if the signal amplitude of the current sound signal is less than or equal to the first amplitude threshold, switch the first animation frame at the end of the specified duration to the second animation frame corresponding to the initial effect parameters; and if the signal amplitude of the current sound signal is greater than the first amplitude threshold, continue to display the first animation frame at the end of the specified duration.
[0229] In some embodiments, the effect parameters include any of the following:
[0230] The rise of virtual avatars;
[0231] The longitudinal travel distance of the virtual avatar;
[0232] The fill height of the target pattern.
[0233] In some embodiments, the method by which the information determining unit 1302 determines target information based on the signal amplitude and / or duration of the sound signal may specifically include:
[0234] The information determination unit 1302 is used to determine the target score based on the signal amplitude and / or duration of the sound signal;
[0235] Furthermore, the information output unit 1303 may be used to output target information in a specific manner, including: the information output unit 1303 is used to output the target score.
[0236] In some embodiments, the method by which the information determining unit 1302 determines the target score based on the signal amplitude and / or duration of the sound signal may specifically include:
[0237] The information determination unit 1302 is configured to obtain the score increment corresponding to the first score update period based on the signal amplitude and / or duration of each sound signal within the first score update period; wherein the signal amplitude and / or duration of each sound signal within the first score update period is proportional to the score increment corresponding to the first score update period; and to determine the target score corresponding to the first score update period based on the target score within the previous score update period and the score increment corresponding to the first score update period.
[0238] In some embodiments, the method by which the information determining unit 1302 obtains the score increment corresponding to the first score update period based on the signal amplitude and / or duration of each sound signal within the first score update period may specifically include:
[0239] The information determination unit 1302 is used to obtain the parameter increment corresponding to the first score update period based on the signal amplitude and / or duration of each sound signal within the first score update period; and to determine the score increment corresponding to the first score update period based on the parameter increment.
[0240] In some embodiments, the method by which the information determining unit 1302 obtains the parameter increment corresponding to the first score update period based on the signal amplitude of each sound signal within the first score update period may specifically include:
[0241] The information determination unit 1302 is configured to, within a specified time period, obtain the parameter increment corresponding to the first score update period based on the signal amplitude of each sound signal within the first score update period and a first amplitude relationship table; and, after the specified time period, obtain the parameter increment corresponding to the first score update period based on the signal amplitude of each sound signal within the first score update period and a second amplitude relationship table; wherein, for the same signal amplitude, the effect parameter corresponding to the first amplitude relationship table is greater than the effect parameter corresponding to the second amplitude relationship table.
[0242] In some embodiments, the method by which the information determining unit 1302 obtains the parameter increment corresponding to the first score update period based on the signal amplitude or duration of each sound signal within the first score update period may specifically include:
[0243] The information determination unit 1302 is configured to obtain the parameter increment corresponding to the first score update cycle based on the signal amplitude of each sound signal within the first score update cycle within a specified time period; and to obtain the parameter increment corresponding to the first score update cycle based on the duration corresponding to the first score update cycle after the specified time period.
[0244] In some embodiments, the method by which the information determining unit 1302 obtains the score increment corresponding to the first score update period based on the signal amplitude and / or duration of each sound signal within the first score update period may specifically include:
[0245] The information determination unit 1302 is used to obtain the score increment corresponding to the first score update cycle within a specified time period based on the signal amplitude and / or duration of each sound signal in the first score update cycle.
[0246] The information determination unit 1302 is further configured to, after a specified period of time, take the highest score increment within the specified period of time as the score increment corresponding to the second score update cycle; and to determine the target score corresponding to the second score update cycle based on the target score in the previous score update cycle and the score increment corresponding to the second score update cycle.
[0247] In some embodiments, the method by which the information determining unit 1302 determines the target score based on the signal amplitude and duration of the sound signal may specifically include:
[0248] The information determination unit 1302 is used to determine the target score based on the duration of the user's exhalation and the signal amplitude of each sound signal within the specified duration.
[0249] In some embodiments, the operation of the information determination unit 1302 to determine the target score based on the signal amplitude and / or duration of the sound signal may be performed when it is determined that the signal amplitude of the current sound signal is greater than a first amplitude threshold.
[0250] In some embodiments, the information output unit 1303 is further configured to start a countdown for the target duration when it detects that the user has begun to exhale.
[0251] In some embodiments, such as Figure 13 The exhalation guidance device may also include a detection unit ( Figure 13 (Not shown in the image), a detection unit is used to determine the user's motion state relative to the electronic device before the signal acquisition unit 1301 acquires the sound signal generated by the user during exhalation; and if the motion state indicates that the user is stationary relative to the electronic device, then exhalation detection is initiated.
[0252] In some embodiments, the detection unit is further configured to determine the distance between the user's mouth and the electronic device before the signal acquisition unit 1301 acquires the sound signal generated by the user during exhalation; and to initiate exhalation detection if the distance is within a specified distance range.
[0253] In some embodiments, the detection unit is further configured to determine whether the current ambient volume is lower than a volume threshold before the signal acquisition unit 1301 acquires the sound signal generated by the user during exhalation; and if the current ambient volume is lower than the volume threshold, then start exhalation detection.
[0254] Please see Figure 14 , Figure 14 This is a structural illustration of an electronic device disclosed in an embodiment of this application. For example... Figure 14 The electronic device shown includes components such as a processor 1410, a memory 140, a display unit 1430, an input unit 1440, a sensor 1450, and an audio circuit 1460.
[0255] The processor 1410 is the control center of the electronic device. It connects various parts of the electronic device via various interfaces and lines. By running or executing software programs and / or modules stored in the memory 1420, and by calling data stored in the memory 1420, it performs various functions and processes data, thereby providing overall monitoring of the electronic device. Optionally, the processor 1410 may include one or more processing units; optionally, the processor 1410 may integrate an application processor, which mainly handles operating devices, user interfaces, and application programs. Of course, it may also include other processors, which are not listed here.
[0256] The memory 1420 can be used to store software programs and modules. The processor 1410 executes various functional applications and data processing of the electronic device by running the software programs and modules stored in the memory 1420. The memory 1420 may mainly include a program storage area and a data storage area. The program storage area may store the operating device and application programs required for at least one function (such as sound playback function, image playback function, etc.); the data storage area may store data created according to the use of the electronic device (such as audio data, telephone book, etc.). In addition, the memory 1420 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device.
[0257] The display unit 1430 can be used to display information input by the user or information provided to the user, as well as various menus of the electronic device. The display unit 1430 may include a display panel, optionally configured as a Liquid Crystal Display (LCD), Organic Light-Emitting Diode (OLED), or similar display panel. Furthermore, a touch panel may cover the display panel. When the touch panel detects a touch operation on or near it, it transmits the information to the processor 1410 to determine the type of touch event. Subsequently, the processor 1410 provides corresponding visual output on the display panel according to the type of touch event. The touch panel and the display panel are not located on the same surface. Figure 14 As shown above, the touch panel and display panel can be used as two separate components to realize the input and output functions of the electronic device, or they can be integrated to realize the input and output functions of the electronic device.
[0258] Input unit 1440 can be used to receive input numerical or character information and generate key signal inputs related to user settings and function control of the electronic device. Specifically, input unit 1440 may include a touch panel and other input devices. A touch panel, also known as a touchscreen, can collect touch operations performed by the user on or near it (such as operations performed by the user using a finger, stylus, or any suitable object or accessory on or near the touch panel) and drive corresponding connected devices according to a pre-set program. Furthermore, touch panels can be implemented using various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch panel, input unit 1440 may also include other input devices. Specifically, other input devices may include, but are not limited to, one or more of function keys (such as volume control buttons, power buttons, etc.), trackballs, joysticks, etc.
[0259] Electronic devices may also include at least one sensor 1450, such as a magnetometer, gyroscope, motion sensor, and other sensors. Specifically, a magnetometer is used to determine the orientation of the electronic device, and a gyroscope can be used to determine the motion posture of the electronic device, which can be used for image stabilization, navigation, and motion-sensing game scenarios. As a type of motion sensor, an accelerometer can detect the magnitude of acceleration in various directions and, when stationary, can detect the magnitude and direction of gravity, which can be used for applications that identify the posture of the electronic device, such as landscape / portrait switching, related games, and magnetometer posture calibration. Other sensors that may be configured in electronic devices, such as pressure gauges, barometers, hygrometers, thermometers, and infrared sensors, will not be elaborated here.
[0260] Audio circuitry 1460 may include a speaker and a microphone, providing an audio interface between the user and the electronic device. Audio circuitry 1460 can convert received audio data into electrical signals and transmit them to the speaker, where the speaker converts them into sound signals for output. Conversely, the microphone converts collected sound signals into electrical signals, which are then received by audio circuitry 1460, converted back into audio data, and processed by processor 1410 before being transmitted via video circuitry to, for example, another device, or output to memory 1420 for further processing.
[0261] Although not shown, the electronic device may also include a power supply and a camera. Optionally, the camera may be positioned in the front or rear of the electronic device, and this application embodiment does not limit this.
[0262] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device. In other embodiments of this application, the electronic device may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0263] In this embodiment of the application, the processor 1410 also has the following functions:
[0264] When the user begins to exhale, the sound signal generated by the user during the exhalation process is collected;
[0265] Target information is determined based on the amplitude and / or duration of the sound signal; whereby the signal amplitude is positively correlated with the user's exhalation rate.
[0266] Output target information.
[0267] In this embodiment of the application, the processor 1410 also has the following functions:
[0268] Determine the effect parameters based on the signal amplitude and / or duration of the sound signal;
[0269] Determine the first animation frame based on the effect parameters;
[0270] Output the first animation frame.
[0271] In this embodiment of the application, the processor 1410 also has the following functions:
[0272] Within a specified duration, the effect parameters are determined based on the signal amplitude and / or duration of the sound signal.
[0273] In this embodiment of the application, the processor 1410 also has the following functions:
[0274] After the specified duration ends, if the current sound signal amplitude is less than or equal to the first amplitude threshold, the first animation frame at the end of the specified duration will be switched to the second animation frame corresponding to the initial effect parameters; if the current sound signal amplitude is greater than the first amplitude threshold, the first animation frame at the end of the specified duration will continue to be displayed.
[0275] In the embodiments of this application, the effect parameters include any one of the following:
[0276] The rise of virtual avatars;
[0277] The longitudinal travel distance of the virtual avatar;
[0278] The fill height of the target pattern.
[0279] In this embodiment of the application, the processor 1410 also has the following functions:
[0280] The target score is determined based on the amplitude and / or duration of the sound signal.
[0281] Output the target score.
[0282] In this embodiment of the application, the processor 1410 also has the following functions:
[0283] The score increment corresponding to the first score update period is obtained based on the signal amplitude and / or duration of each sound signal within the first score update period; wherein, the signal amplitude and / or duration of each sound signal within the first score update period are proportional to the score increment corresponding to the first score update period.
[0284] The target score for the first score update period is determined based on the target score in the previous score update period and the score increment corresponding to the first score update period.
[0285] In this embodiment of the application, the processor 1410 also has the following functions:
[0286] Based on the signal amplitude and / or duration of each sound signal within the first score update cycle, the parameter increment corresponding to the first score update cycle is obtained;
[0287] Based on the parameter increment, determine the score increment corresponding to the first score update cycle.
[0288] In this embodiment of the application, the processor 1410 also has the following functions:
[0289] Within a specified time period, the parameter increment corresponding to the first score update cycle is obtained based on the signal amplitude of each sound signal within the first score update cycle and the first amplitude relationship table.
[0290] After a specified period of time, the parameter increment corresponding to the first score update period is obtained based on the signal amplitude of each sound signal within the first score update period and the second amplitude relationship table; wherein, for the same signal amplitude, the effect parameter corresponding to the first amplitude relationship table is greater than the effect parameter corresponding to the second amplitude relationship table.
[0291] In this embodiment of the application, the processor 1410 also has the following functions:
[0292] Within a specified time period, the parameter increment corresponding to the first score update cycle is obtained based on the signal amplitude of each sound signal within the first score update cycle.
[0293] After a specified duration, the parameter increment corresponding to the first score update cycle is obtained based on the duration corresponding to the first score update cycle.
[0294] In this embodiment of the application, the processor 1410 also has the following functions:
[0295] Within a specified time period, the score increment corresponding to the first score update period is obtained based on the signal amplitude and / or duration of each sound signal within the first score update period.
[0296] After a specified period of time, the highest score increment within that period of time will be used as the score increment for the second score update cycle.
[0297] The target score for the second score update period is determined based on the target score in the previous score update period and the score increment corresponding to the second score update period.
[0298] In this embodiment of the application, the processor 1410 also has the following functions:
[0299] The target score is determined based on the duration of the user's exhalation and the signal amplitude of each sound signal within the specified duration.
[0300] In this embodiment of the application, the operation of determining the target score based on the signal amplitude and / or duration of the sound signal is performed when it is determined that the signal amplitude of the current sound signal is greater than the first amplitude threshold.
[0301] In this embodiment of the application, the processor 1410 also has the following functions:
[0302] When the user begins to exhale, a countdown for the target duration is started.
[0303] In this embodiment of the application, the processor 1410 also has the following functions:
[0304] Determine the user's motion state relative to the electronic device;
[0305] If the motion status indicates that the user is stationary relative to the electronic device, then breath detection is initiated.
[0306] In this embodiment of the application, the processor 1410 also has the following functions:
[0307] Determine the distance between the user's mouth and the electronic device;
[0308] If the distance is within the specified distance range, then breath detection is initiated.
[0309] In this embodiment of the application, the processor 1410 also has the following functions:
[0310] Determine if the current ambient volume is below the volume threshold;
[0311] If the current ambient volume is below the volume threshold, then breath detection is initiated.
[0312] This application discloses a computer-readable storage medium storing executable program code thereon. When the executable program code is executed by a processor, it implements the method described in the electronic device of this application.
[0313] This application discloses a computer program product that, when run on a computer, enables the computer to implement the method described by the electronic device in this application.
[0314] This application discloses an application publishing platform for publishing computer program products. When the computer program product is run on a computer, the computer enables the computer to implement the method described by the electronic device in this application.
[0315] It should be noted that the descriptions of the storage medium and device embodiments above are similar to the descriptions of the method embodiments above, and have similar beneficial effects. For technical details not disclosed in the storage medium, storage medium, and device embodiments of this application, please refer to the descriptions of the method embodiments of this application for understanding.
[0316] It should be understood that the phrases "one embodiment," "an embodiment," or "some embodiments" mentioned throughout the specification mean that a specific feature, structure, or characteristic related to an embodiment is included in at least one embodiment of this application. Therefore, "in one embodiment," "in one embodiment," or "in some embodiments" appearing throughout the specification do not necessarily refer to the same embodiment. Furthermore, these specific features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. It should be understood that in the various embodiments of this application, the sequence numbers of the above-described processes do not imply a sequential order of execution; the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application. The sequence numbers of the above-described embodiments are merely for descriptive purposes and do not represent the superiority or inferiority of the embodiments. The descriptions of the various embodiments above tend to emphasize the differences between the various embodiments; their similarities or commonalities can be referred to mutually, and for the sake of brevity, they will not be repeated here.
[0317] In this article, the term "and / or" is merely a description of the relationship between related objects, indicating that there can be three kinds of relationships. For example, object A and / or object B can represent three situations: object A exists alone, object A and object B exist simultaneously, and object B exists alone.
[0318] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0319] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. The embodiments described above are merely illustrative. For example, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods, such as: multiple modules or components can be combined, or integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the various components shown or discussed can be through some interfaces, and the indirect coupling or communication connection between devices or modules can be electrical, mechanical, or other forms.
[0320] The modules described above as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules. They may be located in one place or distributed across multiple network units. Some or all of the modules may be selected to achieve the purpose of this embodiment according to actual needs.
[0321] In addition, each functional module in the various embodiments of this application can be integrated into one processing unit, or each module can be a separate unit, or two or more modules can be integrated into one unit; the integrated modules can be implemented in hardware or in the form of hardware plus software functional units.
[0322] Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps of the above method embodiments. The aforementioned storage medium includes various media that can store program code, such as mobile storage devices, read-only memory (ROM), magnetic disks, or optical disks.
[0323] Alternatively, if the integrated units described above are implemented as software functional modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, or the parts that contribute to related technologies, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause an electronic device to execute all or part of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, ROMs, magnetic disks, or optical disks.
[0324] The methods disclosed in the several method embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments.
[0325] The features disclosed in the several product embodiments provided in this application can be arbitrarily combined without conflict to obtain new product embodiments.
[0326] The features disclosed in the several method or device embodiments provided in this application can be arbitrarily combined without conflict to obtain new method or device embodiments.
[0327] The above description is merely an embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for guiding exhalation, characterized in that, include: When the user begins to exhale, a countdown is started for a target duration, which is the duration required for the forced lung function test. Collect the sound signals generated by the user during exhalation; Within a specified time period, effect parameters are determined based on the signal amplitude of the sound signal; wherein, the signal amplitude is positively correlated with the user's exhalation rate; After the specified duration, effect parameters are determined based on the duration of the sound signal; The target information is determined based on the effect parameters, and the target information includes the first animation frame; Output the target information; After the specified duration ends, if the current sound signal amplitude is less than or equal to the first amplitude threshold, the first animation frame at the end of the specified duration is switched to the second animation frame corresponding to the initial effect parameters; if the current sound signal amplitude is greater than the first amplitude threshold, the first animation frame at the end of the specified duration continues to be displayed.
2. The method according to claim 1, characterized in that, The effect parameters include any of the following: The rise of virtual avatars; The longitudinal travel distance of the virtual avatar; The fill height of the target pattern.
3. The method according to claim 1, characterized in that, The method further includes: The target score is determined based on the signal amplitude and / or duration of the sound signal; The output of the target information includes: Output the target score.
4. The method according to claim 3, characterized in that, The step of determining the target score based on the signal amplitude and / or duration of the sound signal includes: The score increment corresponding to the first score update period is obtained based on the signal amplitude and / or duration of each sound signal within the first score update period; wherein, the signal amplitude and / or duration of each sound signal within the first score update period are proportional to the score increment corresponding to the first score update period. The target score corresponding to the first score update period is determined based on the target score in the previous score update period and the score increment corresponding to the first score update period.
5. The method according to claim 4, characterized in that, The step of obtaining the score increment corresponding to the first score update period based on the signal amplitude and / or duration of each sound signal within the first score update period includes: Based on the signal amplitude and / or duration of each sound signal within the first score update period, the parameter increment corresponding to the first score update period is obtained. Based on the parameter increment, determine the score increment corresponding to the first score update cycle.
6. The method according to claim 5, characterized in that, Based on the signal amplitude of each sound signal within the first score update period, the parameter increment corresponding to the first score update period is obtained, including: Within a specified time period, the parameter increment corresponding to the first score update cycle is obtained based on the signal amplitude of each sound signal within the first score update cycle and the first amplitude relationship table. After the specified duration, the parameter increment corresponding to the first score update period is obtained based on the signal amplitude of each sound signal within the first score update period and the second amplitude relationship table; wherein, for the same signal amplitude, the effect parameter corresponding to the first amplitude relationship table is greater than the effect parameter corresponding to the second amplitude relationship table.
7. The method according to claim 5, characterized in that, Based on the signal amplitude or duration of each sound signal within the first score update period, the parameter increment corresponding to the first score update period is obtained, including: Within a specified time period, the parameter increment corresponding to the first score update cycle is obtained based on the signal amplitude of each sound signal within the first score update cycle. After the specified duration, the parameter increment corresponding to the first score update cycle is obtained based on the duration corresponding to the first score update cycle.
8. The method according to claim 4, characterized in that, The step of obtaining the score increment corresponding to the first score update period based on the signal amplitude and / or duration of each sound signal within the first score update period includes: Within a specified time period, the score increment corresponding to the first score update period is obtained based on the signal amplitude and / or duration of each sound signal within the first score update period. The method further includes: After the specified time period, the highest score increment within the specified time period is taken as the score increment corresponding to the second score update cycle; The target score for the second score update period is determined based on the target score in the previous score update period and the score increment corresponding to the second score update period.
9. The method according to claim 3, characterized in that, The target score is determined based on the signal amplitude and duration of the sound signal, including: The target score is determined based on the duration of the user's exhalation and the signal amplitude of each sound signal within the specified duration.
10. The method according to claim 3, characterized in that, The operation of determining the target score based on the signal amplitude and / or duration of the sound signal is performed when it is determined that the signal amplitude of the current sound signal is greater than the first amplitude threshold.
11. The method according to claim 1, characterized in that, Before collecting the sound signal generated by the user during exhalation when the user begins to exhale, the process includes: Determine the user's motion state relative to the electronic device; If the motion status indicates that the user is stationary relative to the electronic device, then breath detection is initiated.
12. The method according to claim 1, characterized in that, Before initiating a countdown for the target duration upon detecting that the user has begun exhaling, the method further includes: Determine the distance between the user's mouth and the electronic device; If the distance is within the specified distance range, then exhalation detection is initiated.
13. The method according to claim 1, characterized in that, Before initiating a countdown for the target duration upon detecting that the user has begun exhaling, the method further includes: Determine if the current ambient volume is below the volume threshold; If the current ambient volume is lower than the volume threshold, then exhalation detection is initiated.
14. A method for guiding exhalation, characterized in that, include: When the user begins to exhale, the sound signal generated by the user during the exhalation process is collected; Based on the signal amplitude and / or duration of each sound signal within the first score update period, the parameter increment corresponding to the first score update period is obtained. Based on the parameter increment, the score increment corresponding to the first score update cycle is determined; wherein, the signal amplitude and / or duration of each sound signal within the first score update cycle are proportional to the score increment corresponding to the first score update cycle. The target score corresponding to the first score update period is determined based on the target score in the previous score update period and the score increment corresponding to the first score update period. Output the target score corresponding to the first score update period.
15. The method according to claim 14, characterized in that, Based on the signal amplitude of each sound signal within the first score update period, the parameter increment corresponding to the first score update period is obtained, including: Within a specified time period, the parameter increment corresponding to the first score update cycle is obtained based on the signal amplitude of each sound signal within the first score update cycle and the first amplitude relationship table. After the specified duration, the parameter increment corresponding to the first score update period is obtained based on the signal amplitude of each sound signal within the first score update period and the second amplitude relationship table; wherein, for the same signal amplitude, the effect parameter corresponding to the first amplitude relationship table is greater than the effect parameter corresponding to the second amplitude relationship table.
16. The method according to claim 14, characterized in that, Based on the signal amplitude or duration of each sound signal within the first score update period, the parameter increment corresponding to the first score update period is obtained, including: Within a specified time period, the parameter increment corresponding to the first score update cycle is obtained based on the signal amplitude of each sound signal within the first score update cycle. After the specified duration, the parameter increment corresponding to the first score update cycle is obtained based on the duration corresponding to the first score update cycle.
17. A method for guiding exhalation, characterized in that, include: When the user begins to exhale, the sound signal generated by the user during the exhalation process is collected; Within a specified time period, the score increment corresponding to the first score update period is obtained based on the signal amplitude and / or duration of each sound signal within the first score update period; wherein, the signal amplitude and / or duration of each sound signal within the first score update period are proportional to the score increment corresponding to the first score update period. The target score corresponding to the first score update period is determined based on the target score in the previous score update period and the score increment corresponding to the first score update period. After the specified time period, the highest score increment within the specified time period is taken as the score increment corresponding to the second score update cycle; The target score for the second score update period is determined based on the target score in the previous score update period and the score increment corresponding to the second score update period. Output the target score corresponding to the second score update period.
18. An exhalation guidance device, characterized in that, include: The signal acquisition unit is used to start a countdown for a target duration when it detects that the user has started exhaling, and to acquire the sound signals generated by the user during the exhalation process, wherein the target duration is the duration required by the forced lung function test; An information determination unit is used to determine effect parameters based on the signal amplitude of the sound signal within a specified time period; wherein the signal amplitude is positively correlated with the user's exhalation rate; The information determining unit is further configured to determine effect parameters based on the duration of the sound signal after the specified duration. The information determining unit is further configured to determine target information based on the effect parameters, wherein the target information includes a first animation frame; An information output unit is used to output the target information; The information output unit is further configured to, after the specified duration ends, if the signal amplitude of the current sound signal is less than or equal to the first amplitude threshold, switch the first animation frame at the end of the specified duration to the second animation frame corresponding to the initial effect parameters; if the signal amplitude of the current sound signal is greater than the first amplitude threshold, continue to display the first animation frame at the end of the specified duration.
19. An exhalation guidance device, characterized in that, include: The signal acquisition unit is used to acquire the sound signal generated by the user during the exhalation process when the user is detected to have started exhaling. An information determination unit is configured to obtain a parameter increment corresponding to the first score update cycle based on the signal amplitude and / or duration of each sound signal within the first score update cycle; and to determine a score increment corresponding to the first score update cycle based on the parameter increment; wherein the signal amplitude and / or duration of each sound signal within the first score update cycle is proportional to the score increment corresponding to the first score update cycle; and to determine a target score corresponding to the first score update cycle based on the target score within the previous score update cycle of the first score update cycle and the score increment corresponding to the first score update cycle. The information output unit is used to output the target score corresponding to the first score update cycle.
20. An exhalation guidance device, characterized in that, include: The signal acquisition unit is used to acquire the sound signal generated by the user during the exhalation process when the user is detected to have started exhaling. An information determination unit is configured to, within a specified time period, obtain the score increment corresponding to the first score update period based on the signal amplitude and / or duration of each sound signal within the first score update period; wherein the signal amplitude and / or duration of each sound signal within the first score update period is proportional to the score increment corresponding to the first score update period; and, determine the target score corresponding to the first score update period based on the target score within the previous score update period of the first score update period and the score increment corresponding to the first score update period; and, after the specified time period, take the highest score increment within the specified time period as the score increment corresponding to the second score update period; and, determine the target score corresponding to the second score update period based on the target score within the previous score update period of the second score update period and the score increment corresponding to the second score update period. The information output unit is used to output the target score corresponding to the second score update cycle.
21. An electronic device, characterized in that, include: Memory containing executable program code; and the processor coupled to the memory; The processor calls the executable program code stored in the memory, and when the executable program code is executed by the processor, the processor implements the method as described in any one of claims 1-13, 14-16, and 17.
22. A computer-readable storage medium having executable program code stored thereon, characterized in that, When the executable program code is executed by the processor, it implements the method as described in any one of claims 1-13, 14-16, and 17.
Citation Information
Patent Citations
Method and system and browser for carrying out interaction with webpage through microphone
CN102981738A
Alcohol concentration measuring device
JP2009254399A
Telephone device including ambient sound adaptive incoming call notification function
JP2012039492A
Blow tracking user interface system and method
US20120075462A1
Electronic device and method for controlling operation of display in same
US20200264684A1