Expiration guiding method and device, electronic equipment and storage medium
By collecting and analyzing the sound signals when the user exhale during the force lung function test and outputting target information, it helps the user regulate exhalation movements, solving the problem that the user cannot perform exhalation movements correctly and improving the test accuracy.
Patent Information
- Application Number
- CN202311354430.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-18
- Publication Date
- 2025-04-18
AI Technical Summary
In the forced lung function test, most users cannot perform exhalation movements that meet the test standards correctly, which affects the test accuracy.
By detecting that the user starts exhaling, collects sound signals, determines target information based on the signal amplitude and duration, and outputs this information to help the user regulate exhalation movements.
This allows users to intuitively perceive the expiratory speed and duration, thereby improving the testing accuracy of forced lung function tests.
Smart Images

Figure CN119837515A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of electronic equipment, and in particular to an exhalation guidance method, device, electronic equipment and storage medium. Background Art
[0002] Forced lung function test is the gold standard for diagnosing chronic obstructive pulmonary disease (COPD). Different from other physiological index detection methods such as electrocardiogram and blood oxygen, forced lung function test is an active measurement. During the test, the user needs to exhale quickly and explosively after reaching the maximum inhalation.
[0003] The forced lung function test is an active measurement, but in practice it is found that most users cannot correctly perform the exhalation action that meets the test standards, which in turn affects the test accuracy of the forced lung function test. Summary of the invention
[0004] The embodiments of the present application provide an exhalation guidance method, device, electronic device and storage medium, which are helpful to standardize the exhalation action of the user during the forced lung function test.
[0005] A first aspect of an embodiment of the present application provides an exhalation guidance method, comprising:
[0006] When detecting that the user starts to exhale, collecting a sound signal generated by the user during the exhalation process;
[0007] Determining target information according to the signal amplitude and / or duration of the sound signal; wherein the signal amplitude is positively correlated with the exhalation speed of the user;
[0008] The target information is output.
[0009] A second aspect of an embodiment of the present application provides an exhalation guiding device, comprising:
[0010] A signal collection unit, configured to collect a sound signal generated by the user during the exhalation process when detecting that the user starts to exhale;
[0011] An information determination unit, configured to determine target information according to a signal amplitude and / or a duration of the sound signal; wherein the signal amplitude is positively correlated with an exhalation speed of the user;
[0012] An information output unit is used to output the target information.
[0013] A third aspect of the present application provides an electronic device, comprising:
[0014] A memory storing executable program code;
[0015] and a 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 described in the first aspect of the embodiment of the present application.
[0017] A fourth aspect of an embodiment of the present application provides a computer-readable storage medium having executable program code stored thereon. When the executable program code is executed by a processor, the method described in the first aspect of the embodiment of the present application is implemented.
[0018] A fifth aspect of an embodiment of the present application discloses a computer program product. When the computer program product runs on a computer, the computer executes the method described in the first aspect of the embodiment of the present application.
[0019] A sixth aspect of an embodiment of the present application discloses an application publishing platform, which is used to publish a computer program product. When the computer program product runs on a computer, the computer executes the method described in the first aspect of the embodiment of the present application.
[0020] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:
[0021] In an embodiment of the present application, when it is detected that the user starts to exhale, the sound signal generated by the user during the exhalation process is collected; the 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 speed; and the target information is output.
[0022] By implementing the method, target information is determined based on the signal amplitude and / or duration of the sound signal generated by the user during the exhalation process, and the target information is output. Since the signal amplitude of the sound signal is positively correlated with the user's exhalation speed, the output of the target information can enable the user to intuitively perceive the exhalation speed and / or duration, thereby helping to standardize the user's exhalation action during the forced pulmonary function test. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments and the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application, and other drawings can be obtained based on these drawings.
[0024] Figure 1 It is a scenario diagram of the exhalation guidance method disclosed in the embodiment of the present application;
[0025] Figure 2 It is a flowchart of the exhalation guidance method disclosed in the embodiment of the present application;
[0026] Figure 3 is another flowchart of the exhalation guidance method disclosed in the embodiment of the present application;
[0027] Figures 4A-9B is a diagram of an animation disclosed in an embodiment of the present application;
[0028] Figure 10A-10B is a diagram of an animation effect curve disclosed in an embodiment of the present application;
[0029] Fig.11 It is another flowchart of the exhalation guidance method disclosed in the embodiment of the present application;
[0030] Figures 12A-12F is a diagram of an exhalation guidance interface disclosed in an embodiment of the present application;
[0031] Fig.13 is a diagram of an exhalation guiding device disclosed in an embodiment of the present application;
[0032] Fig.14 It is a structural diagram of an electronic device disclosed in an embodiment of the present application. DETAILED DESCRIPTION
[0033] The embodiments of the present application provide an exhalation guidance method, device, electronic device and storage medium, which can enable the user to intuitively perceive the exhalation speed and / or duration, and help standardize the user's exhalation action during forced lung function testing.
[0034] In order to make the technical personnel in the technical field better understand the scheme of the present application, the technical scheme in the embodiment of the present application will be described below in conjunction with the drawings in the embodiment of the present application. Obviously, the described embodiment is only a part of the embodiment of the present application, not all of the embodiments. Based on the embodiments in the present application, they should all fall within the scope of protection of the present application.
[0035] It should be noted that, in this application, words such as "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 interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplarily" or "for example" is intended to present related concepts in a specific way.
[0036] "At least one" means one or more, and "plurality" means two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the associated objects before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b 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, c can be single or plural.
[0037] The following first explains the special terms involved in this application:
[0038] Forced lung function test is the gold standard for diagnosing chronic obstructive pulmonary disease (COPD). Different from other physiological index detection methods such as electrocardiogram and blood oxygen, forced lung function test is an active measurement. During the test, the user needs to exhale quickly and explosively after the maximum inhalation.
[0039] See also Figure 1 , Figure 1 It is a scenario diagram of the exhalation guidance method disclosed in the embodiment of the present application. Figure 1 The illustrated scene diagram includes an electronic device 10 and a user 20, and the exhalation guidance method can be applied to the electronic device 10. The electronic device 10 has a lung function assessment function, and can support the user 20 to perform a forced lung function test.
[0040] Among them, the electronic device 10 may include general handheld screen electronic devices, such as mobile phones, smart phones, portable terminals, terminals, personal digital assistants (PDA), portable multimedia players (Personal Media Player, PMP) devices, laptop computers, notebooks (Note Pad), wireless broadband (Wireless Broadband, Wibro) terminals, tablet computers (Personal Computer, PC), smart PCs, sales terminals (Point of Sales, POS) and car computers, etc.
[0041] The electronic device 10 may also include a wearable device. A wearable device is a portable electronic device that can be worn directly on the user or integrated into the user's clothes or accessories. Wearable devices are not only hardware devices, but can also realize powerful intelligent functions through software support, data interaction, and cloud server interaction, such as: computing function, positioning function, and alarm function. At the same time, they can also connect to mobile phones and various terminals. Wearable devices may include but are not limited to watches supported by wrists (such as watches, wrists, etc.), shoes supported by feet (such as shoes, socks or other products worn on the legs), glasses supported by the head (such as glasses, helmets, headbands, etc.), and various non-mainstream product forms such as smart clothing, school bags, crutches, accessories, etc.
[0042] The electronic device 10 may also include a large-scale pulmonary function meter used in a hospital, a portable pulmonary function meter, and the like.
[0043] Among them, the forced pulmonary function test is an active measurement, but in practice it is found that most users cannot correctly perform the exhalation action that meets the test standards. For example, when users undergo a forced pulmonary function test in a hospital, the doctor in charge of the test usually instructs the user on how to exhale correctly through verbal explanations and action demonstrations. However, many people still cannot correctly perform the exhalation action that meets the test standards due to limited understanding, physical fitness and other reasons. For another example, when using a portable spirometer or other portable device for a forced pulmonary function test, compared to a hospital, it is more difficult for users to perform the correct exhalation action due to the lack of guidance and supervision from professional doctors.
[0044] In the technical solution of the present application, the electronic device 10 can determine the target information according to the signal amplitude and / or duration of the sound signal generated by the user 20 during the exhalation process when detecting the user 20 exhaling, and output the target information. Since the signal amplitude of the sound signal is positively correlated with the exhalation speed of the user 20, the output of the target information can enable the user 20 to intuitively perceive the exhalation speed and / or duration, which helps to standardize the exhalation action of the user 20 during the forced pulmonary function test.
[0045] See also Figure 2 , Figure 2 FIG. 1 is a flowchart of the exhalation guidance method disclosed in the embodiment of the present application. Figure 2 The exhalation guidance method shown may include the following steps:
[0046] 201. When the electronic device detects that the user starts to exhale, it collects the sound signal 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 the exhalation process through a microphone of the electronic device.
[0048] Among them, the microphone may include a microphone element and a microphone cable. The microphone element is a capacitive micro-element, which is composed of a film and a group of electrodes. When the sound wave vibrates the film, the electrode will vibrate 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 detects whether the user begins to exhale, which may include:
[0050] The electronic device determines whether a designated action is received. If the designated action is received, it is determined that the user starts to exhale. If the designated action is not received, it is determined that the user does not start to exhale.
[0051] The designated action may include but is not limited to designated gestures, touching a target button, etc. The target button is a physical or virtual button used to trigger the collection of sound signals.
[0052] It has been found in practice that exhaling for a sufficiently long time is also the key to the forced lung function test. In some embodiments, the electronic device can also start a countdown to the target duration when it detects that the user begins to exhale, which can serve to prompt the user to keep exhaling for a long time.
[0053] In some embodiments, the electronic device may also start a countdown to the target duration when detecting that the user's exhalation speed exceeds a speed threshold (eg, an air flow threshold) for the first time.
[0054] The countdown may be in the form of audio or text representing time, which is not limited in the embodiments of the present application.
[0055] Currently, the forced lung function test is required to last for more than 6 seconds (s). Exemplarily, the target duration may be 6s, 7s, or 8s, etc. Exemplarily, the target duration is 6s, and the electronic device may start a 6-second countdown on the display screen of the electronic device when it detects that the user begins to exhale (for example, the user's exhalation speed exceeds the speed threshold for the first time).
[0056] In order to ensure the accuracy of the forced lung function test results, it is often required that the user and the device are relatively still, the distance between the user's mouth and the device is appropriate, and the environment is as quiet as possible.
[0057] Before step 201, the electronic device may also determine the motion state of the user relative to the electronic device; if the motion state indicates that the user is stationary relative to the electronic device, breath detection is initiated.
[0058] Furthermore, the electronic device may also output first prompt information for instructing the user to remain still relative to the electronic device when the motion state indicates that the user is in motion relative to the electronic device.
[0059] Before step 201, the electronic device may also determine the distance between the user's mouth and the electronic device; if the distance is within a specified distance interval, the exhalation detection is initiated.
[0060] Exemplarily, the specified distance interval is 10 centimeters (cm)-20 cm.
[0061] Furthermore, the electronic device may also output second prompt information for instructing 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 interval.
[0062] Before step 201, the electronic device may also determine whether the current ambient volume is lower than a volume threshold; if the current ambient volume is lower than the volume threshold, the exhalation detection is initiated.
[0063] Furthermore, the electronic device may also output third prompt information indicating 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 may also guide the user to perform forceful exhalation training in advance by displaying a candle animation. The candle animation may include a candle with a lit flame, and the size of the flame may vary with the user's exhalation speed. The faster the exhalation speed, the smaller the flame.
[0065] For example, when the electronic device detects that the exhalation speed is greater than the speed threshold, the electronic device displays a candle with an extinguished flame; when the electronic device detects that the exhalation speed is less than or equal to the speed threshold, the electronic device displays a candle with a lit flame. 202. The electronic device determines the target information according to the signal amplitude and / or duration of the sound signal.
[0066] The signal amplitude is positively correlated with the user's exhalation speed. The larger the signal amplitude is, the faster the user's exhalation speed is.
[0067] The target information may be used to reflect the exhalation speed and / or duration.
[0068] In some embodiments, the target information may include visual information and / or audio information, wherein the visual information may include but is not limited to at least one of the following: animation frames, texts, 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 the present application.
[0070] 203. The electronic device outputs target information.
[0071] The electronic device outputting target information may include:
[0072] The electronic device outputs visual information through a display screen;
[0073] and / or,
[0074] The electronic device outputs audio information through the speaker.
[0075] By implementing this method, target information is determined based on the signal amplitude and / or duration of the sound signal generated by the user during the exhalation process, and the target information is output. Since the signal amplitude of the sound signal is positively correlated with the user's exhalation speed, the output of the target information can enable the user to intuitively perceive the exhalation speed and / or duration, which helps to standardize the user's exhalation action during the forced pulmonary function test.
[0076] See also Figure 3 , Figure 3 FIG. 1 is another flowchart of the exhalation guidance method disclosed in the embodiment of the present application. Figure 3 The target information in the exhalation guidance method shown may include animation frames. Figure 3 The exhalation guidance method shown may include the following steps:
[0077] 301. When the electronic device detects that the user starts to exhale, it collects the sound signal generated by the user during the exhalation process.
[0078] For a detailed description of step 301, see Figure 2 The description below step 201 is not repeated here.
[0079] 302. The electronic device determines an effect parameter according to a signal amplitude and / or duration of the sound signal.
[0080] Among them, the signal amplitude and duration can be positively correlated with the effect parameter. It can be understood that the longer the signal amplitude and duration, the greater the effect parameter.
[0081] In the embodiment of the present application, the effect parameter may include but is not limited to at least one of the following:
[0082] the height of the avatar's ascent;
[0083] the longitudinal distance travelled by the avatar;
[0084] The fill height of the target pattern.
[0085] 303. The electronic device determines a first animation frame according to the effect parameter.
[0086] The display effect parameters corresponding to the first animation frame may be the display effect parameters of the previous animation frame plus the effect parameters obtained in step 302. The display effect parameters of the animation frame may refer to the effect parameters finally presented by the animation frame.
[0087] 304. The electronic device outputs a first animation frame.
[0088] In some embodiments, the output of the animation frame may be continuously executed during the entire exhalation process of the user, or may be continuously executed only for a period of time immediately before the start of exhalation, which is not limited in the embodiments of the present application.
[0089] In the case where the output of the animation frame is only executed for a period of time immediately before the start of exhalation, the electronic device determines the effect parameters based on the signal amplitude and / or duration of the sound signal, which may include: within the specified time period, the electronic device determines the effect parameters based on the signal amplitude and / or duration of the sound signal.
[0090] The specified time length refers to a period of time immediately before the start of exhalation. Exemplarily, the specified time length is within the first second (s), within the first 1.5s, or within the first 2s of the sound signal collection.
[0091] It should be noted that regardless of whether the output of the first animation frame is continuously executed during the entire exhalation process of the user or only for a period of time before the start of exhalation, the process of the electronic device determining the effect parameters based on the signal amplitude and / or duration of the sound signal can be referred to the following introduction.
[0092] In some embodiments, the electronic device determines the effect parameters according to the signal amplitude of the sound signal, which may include: the electronic device determines the effect parameters according to 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 parameter.
[0093] The amplitude relationship table may include multiple amplitude intervals and effect parameters corresponding to each amplitude interval. The electronic device may search for the target amplitude interval where the signal amplitude of the sound signal is located from the multiple amplitude intervals in the amplitude relationship table, and obtain the effect parameters corresponding to the target amplitude interval.
[0094] In some embodiments, the electronic device determines the effect parameters according to the duration, which may include: the electronic device determines the effect parameters according to the duration and a duration relationship table; wherein the duration relationship table may include a correspondence between the duration and the effect parameters.
[0095] The duration relationship table may include multiple duration intervals and effect parameters corresponding to each duration interval. The electronic device may search for the target duration interval where the above-mentioned duration is located 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 the effect parameter based on the signal amplitude and duration of the sound signal, which may include: the electronic device determines a first effect parameter component based on the signal amplitude of the sound signal; and, determines a second effect parameter component based on the duration; and, obtains the effect parameter based on the first effect parameter component and the second effect parameter component.
[0097] Among them, the determination method of the first effect parameter component and the second effect parameter component can be referred to the above description, which will not be repeated here. The effect parameter can be obtained by averaging, weighting, or summing the first effect parameter component and the second effect parameter component, which is not limited in the embodiment of the present application.
[0098] In some embodiments, during the entire exhalation process of the user, if the user stops exhaling or the exhalation speed is too slow, the animation presents a fallback effect. For details, see the following description:
[0099] In some embodiments, within a specified time period, the electronic device determines the effect parameters based on the signal amplitude and / or duration of the sound signal, which may include: within the specified time period, if the electronic device detects that the user has stopped exhaling, the initial effect parameters are used as the effect parameters; within the specified time period, if the electronic device detects that the user has not stopped exhaling, the effect parameters are determined based on the signal amplitude and / or duration of the sound signal.
[0100] When the effect parameter obtained in step 302 is not the initial effect parameter, the corresponding display effect parameter of the first animation frame may be the effect parameter obtained in step 302 accumulated on the basis of the display effect parameter of the previous animation frame.
[0101] When the effect parameters obtained in step 302 are initial effect parameters, the display effect parameters corresponding to the first animation frame are the initial effect parameters.
[0102] The initial effect parameter may be a preset parameter, and the animation frame corresponding to the initial effect parameter may be the initial animation frame of the animation. Exemplarily, when the effect parameter is the rising height of the avatar, the initial effect parameter includes the rising height being 0. Exemplarily, when the effect parameter is the longitudinal travel distance of the avatar, the initial effect parameter includes the longitudinal travel distance being 0. Exemplarily, when the effect parameter is the filling height of the target pattern, the initial effect parameter includes the filling height being 0.
[0103] It can be understood that if the user continues to exhale within a specified time period, the display effect parameters can continue to increase with the change of the signal amplitude and / or duration of the sound signal. If the user stops exhaling within the specified time period, the display effect parameters return to the initial effect parameters.
[0104] By implementing this method, if the user stops exhaling within a period of time before the start of exhalation, the displayed effect parameters return to the initial effect parameters, which can force the user to exhale quickly and explosively to the maximum extent.
[0105] For example, when the effect parameter is the rising height of the virtual image, the virtual image is a balloon, and the specified duration is within the first second:
[0106] If the user continues to exhale, the balloon height corresponding to the next animation frame is greater than the balloon height corresponding to the previous animation frame, and the animation presented is that the balloon continues to rise. This animation can be seen in Figure 4A ,like Figure 4A 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 is smaller than the balloon height corresponding to animation frame 2.
[0107] If the user stops exhaling, the balloon height corresponding to the animation frame when the exhalation is interrupted is 0, and the balloon height corresponding to the animation frame before the exhalation is interrupted is greater than 0. The animation presented is that the balloon falls back to 0. This animation can be seen in Figure 4B ,like Figure 4B 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 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 avatar, the avatar is a car, and the specified time duration is within the first second:
[0109] If the user continues to exhale, the distance traveled by the car in the next animation frame is greater than the distance traveled by the car in the previous animation frame, and the animation presented is that the car keeps moving forward. Figure 5A ,like Figure 5A The animation shown includes two consecutive animation frames, namely animation frame 1 and animation frame 2, wherein the driving distance of the car in animation frame 1 is shorter than the driving distance of the car in animation frame 2.
[0110] If the user stops exhaling, the distance traveled by the car in the animation frame when exhaling is interrupted is 0, that is, when exhaling is interrupted, the car is at the starting position. The distance traveled by the car in the animation frame before exhaling is interrupted is greater than 0, and the animation presented is the car returning to the starting position. This animation can be seen in Figure 5B ,like Figure 5B The animation shown includes two consecutive animation frames, namely animation frame 1 and animation frame 2, wherein the driving distance of the car in animation frame 1 is greater than 0, and the driving distance of the car in animation frame 2 is equal to 0.
[0111] For example, when the effect parameter is the fill height of the target pattern, the target pattern is a rectangle, and the specified duration is within the first second:
[0112] If the user continues to exhale, the filling height corresponding to the next animation frame is greater than the filling height corresponding to the previous animation frame, and the animation presented is that the height of the rectangular filling continues to increase. This animation can be seen in Fig. 6A ,like Fig. 6A The animation shown includes two consecutive animation frames, namely animation frame 1 and animation frame 2, wherein the filling height of the rectangle in animation frame 1 is smaller than the filling height of the rectangle in animation frame 2.
[0113] If the user stops exhaling, the fill height of the animation frame when the exhalation is interrupted is 0, and the fill height of the animation frame before the exhalation is interrupted is greater than 0. The animation presented is that the height of the rectangular fill falls back to 0. This animation can be seen in Figure 6B ,like Figure 6B The animation shown includes two consecutive animation frames, namely animation frame 1 and animation frame 2, wherein the filling height of the rectangle in animation frame 1 is greater than 0 and less than the filling height of the rectangle in animation frame 2 which is equal to 0.
[0114] In some embodiments, when the output of animation frames is continuously executed during the entire exhalation process of the user, the electronic device can also, 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 signal amplitude of the current sound signal is less than or equal to the first amplitude threshold; and continue to display the first animation frame at the end of the specified duration if the signal amplitude of the current sound signal is greater than the first amplitude threshold.
[0115] The first amplitude threshold may be preset by the electronic device and is used to define the speed of exhalation. If the signal amplitude of the sound signal is greater than the first amplitude threshold, it means that the exhalation speed is fast, otherwise, it means that the exhalation speed is slow. The second animation frame may refer to the initial frame of the animation.
[0116] It can be understood that after the specified time, if the exhalation speed is fast, the first animation frame corresponding to the end of the specified time is maintained, and if the exhalation speed is slow, the first animation frame corresponding to the end of the specified time is switched to the second animation frame.
[0117] For example, when the effect parameter is the rising height of the virtual image, the virtual image is a balloon, and the specified duration is within the first second:
[0118] If the user continues to exhale quickly after 1 second, the balloon's rising height remains unchanged. Fig. 7A ,like Fig. 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 is the same as the balloon height corresponding to animation frame 2.
[0119] If the user's exhalation speed slows down after 1 second, the balloon will fall back to 0. For the corresponding animation, see Figure 7B ,like Figure 7B The animation shown includes two consecutive animation frames, namely animation frame 1 and animation frame 2, wherein animation frame 1 is the animation frame before the exhalation speed slows down, and the corresponding balloon height is greater than 0, and 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 avatar, the avatar is a car, and the specified time duration is within the first second:
[0121] If the user continues to exhale quickly after 1 second, the car's driving distance remains unchanged. Fig. 8A ,like Fig. 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 is the same as the driving distance corresponding to animation frame 2.
[0122] If the user's exhalation speed slows down after 1 second, the car returns to the starting position. For the corresponding animation, see Figure 8B ,like Figure 8B The animation shown includes two consecutive animation frames, namely animation frame 1 and animation frame 2, wherein animation frame 1 is the animation frame before the exhalation speed slows down, and the corresponding driving distance is greater than 0, and animation frame 2 is the animation frame when the exhalation speed slows down, and the corresponding driving distance is 0.
[0123] For example, when the effect parameter is the fill height of the target pattern, the target pattern is a rectangle, and the specified duration is within the first second:
[0124] If the user continues to exhale quickly after 1 second, the filling height of the target pattern will remain unchanged. Fig. 9A ,like Fig. 9AThe animation shown includes two consecutive animation frames, namely animation frame 1 and animation frame 2, wherein the filling height corresponding to animation frame 1 and the filling height corresponding to animation frame 2 are the same.
[0125] If the user's exhalation speed slows down after 1 second, the filling height of the target pattern will drop back to 0. For the corresponding animation, please refer to Fig. 9B ,like Fig. 9B The animation shown includes two consecutive animation frames, namely animation frame 1 and animation frame 2, wherein animation frame 1 is the animation frame before the exhalation speed slows down, and the corresponding filling height is greater than 0, and animation frame 2 is the animation frame when the exhalation speed slows down, and the corresponding filling height is 0.
[0126] In some embodiments, during the entire exhalation process of the user, the animation effect presented by the animation frame is a continuously positively changing animation, that is, there is no drop in the display effect parameters.
[0127] Exemplarily, when the effect parameter is the rising height of the virtual image, the virtual image is a balloon, and the balloon continues to rise during the entire exhalation process of the user.
[0128] Exemplarily, when the effect parameter is the longitudinal travel distance of the virtual image, the virtual image is a car, and the car keeps moving forward during the entire exhalation process of the user.
[0129] Exemplarily, when the effect parameter is the filling height of the target pattern, the target pattern is a rectangle, and the rectangle is continuously filled during the entire exhalation process of the user.
[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 parameter according to the signal amplitude of the sound signal, which may include:
[0132] Within the specified time period, the electronic device determines the effect parameter according to the signal amplitude of the sound signal and the first amplitude relationship table;
[0133] After the specified time, the electronic device determines the effect parameter according to the signal amplitude of the sound signal and the second amplitude relationship table; wherein, for the same signal amplitude, the corresponding effect parameter in the first amplitude relationship table is greater than the corresponding effect parameter in the second amplitude relationship table.
[0134] By implementing this method, the effect parameters within the specified time length change quickly, and the effect parameters after the specified time length change slowly, thereby achieving the purpose of prompting the user to exhale as quickly as possible within the specified time length.
[0135] The electronic device determines the effect parameters according to the signal amplitude or duration of the sound signal, which may include:
[0136] Within a specified time period, the electronic device determines the effect parameter according to the signal amplitude of the sound signal;
[0137] After the specified duration, the electronic device determines the effect parameter according to the duration of the sound signal.
[0138] It is understandable that within a specified duration, the effect parameter may continuously change with changes in the signal amplitude of the sound signal, and after the specified duration, the effect parameter may continuously change with changes in the duration.
[0139] In order to ensure that the user performs an effective forced lung function test, the electronic device can also output exhalation rule information before the test begins.
[0140] In some embodiments, the electronic device may further display a touch button for triggering the start of the test before the test starts.
[0141] In some embodiments, after step 302, the electronic device may also determine the parameter coordinates corresponding to the current moment according to the effect parameters, and update the guidance curve according to the parameter coordinates.
[0142] The horizontal and vertical coordinates of the parameter coordinates corresponding to the current moment are time and cumulative effect parameters. For the explanation of the cumulative effect parameter, please refer to the above description for the explanation of the above display effect parameter, which will not be repeated here. The guide curve represents the changing relationship between time and cumulative effect parameters.
[0143] See also Fig. 10A , Fig. 10A It is a diagram of the animation effect curve disclosed in the embodiment of this application. Fig. 10A There is a moment when the cumulative effect parameter falls back in the animation effect curve shown, where the cumulative effect parameter is represented by s.
[0144] See also Fig. 10B , Fig. 10B is another illustration of the animation effect curve disclosed in the embodiment of the present application. Fig. 10B There is no moment when the cumulative effect parameter falls back in the animation effect curve shown. The cumulative effect parameter is represented by s.
[0145] By implementing this method, the electronic device can also guide the user to standardize the exhalation action through a changing curve, with a small amount of calculation, more timely guidance, and better effect of standardizing the user's exhalation action.
[0146] Since the forced pulmonary function test is required to last for more than 6 seconds (s), in some embodiments, when the user stops exhaling, if the continuous exhalation duration corresponding to the current moment is less than the duration threshold, an indication message instructing re-exhalation is output.
[0147] By implementing the above method, the exhalation speed and / or duration can be displayed to the user in an image-based and interesting way by outputting animation frames, which further helps to standardize the user's exhalation action during the forced lung function test.
[0148] See also Fig.11 , Fig.11 FIG. 1 is another flowchart of the exhalation guidance method disclosed in the embodiment of the present application. Fig.11 The exhalation guidance method shown may include the following steps:
[0149] 1101. When the electronic device detects that the user starts to exhale, the electronic device collects the sound signal generated by the user during the exhalation process.
[0150] For a detailed description of step 1101, see Figure 2 The description below step 201 is not repeated here.
[0151] 1102. The electronic device determines a target score according to a signal amplitude and / or duration of the sound signal.
[0152] Among them, step 1102 can be executed by the electronic device when it detects that the user starts to exhale, or it can be executed by the electronic device when it determines that the signal amplitude of the current sound signal is greater than the first amplitude threshold (that is, after the user starts to exhale forcefully).
[0153] 1103. The electronic device outputs the target score.
[0154] The target score is used to indicate the qualified level of exhalation. The higher the target score is, the higher the qualified level of exhalation is.
[0155] In some embodiments, the electronic device may pre-set a score update cycle, and during the user's exhalation or after the user begins to exhale forcefully, the electronic device may update the target score once in each score update cycle. Exemplarily, the score update cycle is 0.5s.
[0156] In some embodiments, the update of the target score in each score update cycle is related to the amplitude and / or duration of the sound signal. The electronic device determines the target score according to the signal amplitude and / or duration of the sound signal, which may include:
[0157] The electronic device obtains a score increment corresponding to the first score update period according to the signal amplitude and / or duration of each sound signal in the first score update period; wherein the signal amplitude and / or duration of each sound signal in the first score update period is 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 period according to the target score in the previous score update period of the first score update period and the score increment.
[0159] The first score update period is 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 of the first score update period is 0.
[0160] In some embodiments, the electronic device obtains the score increment corresponding to the first score update period according to 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 corresponding to each sound signal according to the signal amplitude and / or duration of each sound signal within the first score update period;
[0162] The electronic device accumulates the score increment corresponding to each sound signal to obtain the score increment corresponding to the first score update period.
[0163] The electronic device may pre-set a first score table and / or a second score table, wherein the first score table includes a correspondence between signal amplitude and score, and in the first score table, the score is positively correlated with the signal amplitude. The second score table may include a correspondence between duration and score, and in the second score table, the score is positively correlated with duration. The electronic device may determine the score increment corresponding to each sound signal based on the first score table and / or the second score table.
[0164] In some embodiments, the electronic device obtains the score increment corresponding to the first score update period according to the signal amplitude and / or duration of each sound signal within the first score update period, which may include:
[0165] The electronic device obtains a parameter increment corresponding to the first score update period according to the signal amplitude and / or duration of each sound signal within the first score update period;
[0166] The electronic device determines the score increment corresponding to the first score update period according to the parameter increment.
[0167] The electronic device may pre-set a third score table, which may include multiple parameter increment intervals and scores corresponding to each parameter increment interval. The electronic device may search the third score table for a score that matches the parameter increment corresponding to the first score update period, and use the score as the score increment corresponding to the first score update period.
[0168] It should be noted that in the third scoring table, the parameter increment and the score increment are positively correlated.
[0169] In some embodiments, after the user starts to exhale or after the user starts to exhale forcefully, the parameter increment corresponding to the score update period may 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 period according to the signal amplitude of each sound signal within the first score update period, which may include but is not limited to the following methods:
[0171] Mode 1: The electronic device obtains a parameter increment corresponding to the first score update period according to the signal amplitude of each sound signal in the first score update period and the amplitude relationship table.
[0172] It is understandable that after the user starts to exhale or after the user starts to exhale forcefully, the parameter increment corresponding to each score update cycle is determined according to a unique amplitude relationship table.
[0173] The electronic device obtains the parameter increment corresponding to the first score update period according to the signal amplitude of each sound signal in the first score update period and the amplitude relationship table, which may include:
[0174] The electronic device determines the effect parameter corresponding to each sound signal in the first score update period according to the signal amplitude of each sound signal in the first score update period and the amplitude relationship table;
[0175] According to the effect parameter corresponding to each sound signal in the first score update period, a parameter increment corresponding to the first score update period is determined.
[0176] Among them, the parameter increment corresponding to the first score update period can be obtained by averaging, summing or median-calculating the effect parameter corresponding to each sound signal within the first score update period, and the embodiment of the present application is not limited thereto.
[0177] Method 2: Within a specified time period, the electronic device obtains a 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 the first amplitude relationship table; after the specified time period, the electronic device obtains a 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 the second amplitude relationship table; wherein, for the same signal amplitude, the corresponding effect parameter in the first amplitude relationship table is greater than the corresponding effect parameter in the first amplitude relationship table.
[0178] It is understandable that after the user starts to exhale or after the user starts to exhale forcefully, the parameter increment corresponding to each score update period is determined according to the first amplitude relationship table within the specified time, and after the specified time, the parameter increment corresponding to each score update period is determined according to the second amplitude relationship table. Since for the same signal amplitude, the corresponding effect parameter in the first amplitude relationship table is greater than the corresponding effect parameter in the second amplitude relationship table, it can be seen that compared with after the specified time, the target score within the specified time increases faster, which can not only prompt the user to exhale quickly and explosively.
[0179] In some embodiments, after the user starts to exhale or after the user starts to exhale forcefully, the parameter increment corresponding to the score update period may 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 period according to the signal amplitude or duration of each sound signal in the first score update period, which may include:
[0181] Within the specified time period, the electronic device obtains a parameter increment corresponding to the first score update period according to the signal amplitude of each sound signal within the first score update period;
[0182] After the specified time period, the electronic device obtains the parameter increment corresponding to the first score update period according to the duration corresponding to the first score update period.
[0183] Among them, regarding the electronic device obtaining the parameter increment corresponding to the first score update period according to the signal amplitude of each sound signal within the first score update period, please refer to the above description, which will not be repeated here.
[0184] The duration corresponding to the first score update cycle may include: the duration of continuous exhalation corresponding to the end time corresponding to the first score update cycle. Exemplarily, if the first score update cycle is the first score update cycle, then the duration corresponding to the first score update cycle is the duration of continuous exhalation corresponding to the end time of the first score update cycle, that is, a complete score update cycle.
[0185] The electronic device obtains the parameter increment corresponding to the first score update period according to the duration corresponding to the first score update period, which may include: the electronic device obtains the parameter increment corresponding to the first score update period according to the duration corresponding to the first score update period and a duration relationship table.
[0186] The duration relationship table may include multiple duration intervals and effect parameters corresponding to each duration interval. The electronic device may search for a target duration interval in which the duration corresponding to the first score update period is located from the multiple duration intervals in the duration relationship table, obtain the effect parameter corresponding to the target duration interval, and use the effect parameter as the parameter increment corresponding to the first score update period.
[0187] It can be understood that during the entire exhalation process of the user, or after the user begins to exhale forcefully, the parameter increment corresponding to each score update period is determined according to the signal amplitude of the sound signal within a specified time period, and after the specified time period, the parameter increment is determined according to the duration corresponding to the score update period. Since the signal amplitude and the 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, which can not only promote the user to exhale quickly and explosively, but also promote the user to exhale for a long 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 basis for updating the target score in each score update cycle can be the maximum score increment within the specified duration. In this way, the user can be encouraged not only to exhale as quickly as possible within the specified duration, but also to continue to exhale for as long as possible.
[0189] Based on this, the electronic device obtains the score increment corresponding to the first score update period according to the signal amplitude and / or duration of each sound signal in the first score update period, which may include:
[0190] Within the specified time period, according to the signal amplitude and / or duration of each sound signal within the first score update period, obtain a score increment corresponding to the first score update period;
[0191] The electronic device may also, after the specified time period, use the highest score increment within the specified time period as the score increment corresponding to the second score update period;
[0192] The target score corresponding to the second score update period is determined according to the target score in the previous score update period of the second score update period and the score increment corresponding to the second score update period.
[0193] Among them, for the description of how the electronic device obtains the score corresponding to the first score update period based on the signal amplitude and / or duration of each sound signal in the first score update period within the specified time period, please refer to 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 are fixedly added in each score update cycle.
[0195] In some embodiments, the electronic device may also output a score increment corresponding to each score update cycle.
[0196] In some embodiments, the target score may be output after the user finishes exhaling, and the electronic device determines the target score based on the signal amplitude and duration of the sound signal, which may include: the electronic device determines the target score based on the duration 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 the target score according to the duration of the user's end of exhalation and the signal amplitude of each sound signal within the specified duration, which may include:
[0198] The electronic device determines a first score according to the duration of the user finishing exhaling;
[0199] The electronic device determines a second score according to the signal amplitude of each sound signal within the specified time period;
[0200] The electronic device accumulates the first score and the second score to obtain a target score.
[0201] Among them, the duration is positively correlated with the first score.
[0202] In some embodiments, the electronic device determines the second score according to the signal amplitude of each sound signal within the specified time period, which may include but is not limited to the following methods:
[0203] Method 1: The electronic device determines the maximum signal amplitude according to the signal amplitude of each sound signal within a specified time period, and determines the second score according to the maximum signal amplitude; wherein the signal amplitude and the second score are positively correlated.
[0204] Method 2: The electronic device obtains the number of sound signals whose corresponding signal amplitudes are greater than the second amplitude threshold within a specified time period, and determines the second score according to 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 may also determine whether the target score is greater than a score threshold. If so, a target gift matching the target score is obtained from the virtual gift pool and the target gift is output.
[0207] The score threshold is preset by the electronic device and is used to measure whether the target score is a qualified score, and the exhalation corresponding to the qualified score is a qualified exhalation. It can be understood that when the target score is greater than the score threshold, the target score is a qualified score, and when the target score is less than or equal to the qualified score, the target score is an unqualified score.
[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 is helpful to improve the fun of the test.
[0209] In some embodiments, the electronic device may also evaluate the test result of the forced pulmonary function test based on the sound signal generated by the user during the exhalation process when the target score is greater than the score threshold.
[0210] In some embodiments, the electronic device may also output indication information indicating that the exhalation is unqualified when the target score is less than or equal to the score threshold.
[0211] By implementing this method, during the user's exhalation process, the electronic device can also update the score based on the exhalation speed and / or duration, which can play an explicit encouraging role and further help to standardize the user's exhalation action.
[0212] In some embodiments, the target information includes animation frames, target scores, and score increments.
[0213] For example, when the effect parameter is the rising height of the balloon, during the user's exhalation, the exhalation guidance interface displayed by the electronic device can refer to Figure 12A-12E .in, Fig. 12A This is the exhalation guidance interface before the test starts. Fig. 12A The exhalation guidance interface shown includes a virtual button 1201 for triggering the test; Fig. 12B This is the exhalation guidance interface at the beginning of the test, when the balloon is at the starting position 0 below the red line; Fig. 12C It is the exhalation guidance interface at 1 second. The score increment at 1 second is 10 points, and the target score is 50 points. Fig.12D It is the exhalation guidance interface at 3 seconds. The score increment at 3 seconds is 10 points, and the target score is 70 points. Fig.12E It 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, Figure 12B-12E The exhalation guide interface shown also displays a plurality of grids arranged from top to bottom for calibrating the height of the balloon so that the user can intuitively know the height change of the balloon within 1 second.
[0215] In some embodiments, the fill color of the grid may be darker from bottom to top.
[0216] It is understandable that the user enters the virtual Fig. 12B At this time, the user starts to exhale quickly, and the balloon continues to rise within 1s. Within 1s-6s, the user keeps exhaling quickly, and the balloon height on the exhalation guide interface within 1s-6s is the same as the balloon height on the exhalation guide interface at 1s. At 6s, the user stops exhaling, and the balloon height on the exhalation guide interface drops back to 0 at 6s.
[0217] Exemplarily, 12F is another exhalation guide 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 within 1s-3s, the user always maintains a fast exhalation speed, and at 3s, the user stops exhaling or the exhalation speed is too slow.
[0219] See also Fig.13 , Fig.13 is a diagram of the exhalation guiding device disclosed in the embodiment of the present application. Fig.13 The exhalation guiding device shown may include a signal acquisition unit 1301, an information determination unit 1302 and an information output unit 1303, wherein:
[0220] The signal collection unit 1301 is used to collect the sound signal generated by the user during the exhalation process when it is detected that the user starts to exhale;
[0221] The information determination unit 1302 is used to determine the target information according to the signal amplitude and / or duration of the sound signal; wherein the signal amplitude is positively correlated with the user's exhalation speed;
[0222] The information output unit 1303 is used to output target information.
[0223] In some embodiments, the information determining unit 1302 may determine the target information according to the signal amplitude and / or duration of the sound signal by:
[0224] The information determining unit 1302 is used to determine the effect parameter according to the signal amplitude and / or duration of the sound signal; and determine the first animation frame according to the effect parameter;
[0225] Furthermore, the information output unit 1303 may be used to output the 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 information determining unit 1302 is configured to determine the effect parameter according to the signal amplitude and / or duration of the sound signal, and the method may specifically include:
[0227] The information determination unit 1302 is used to determine the effect parameter according to 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 also used to switch the first animation frame at the end of the specified duration to the second animation frame corresponding to the initial effect parameters after the specified duration ends, if the signal amplitude of the current sound signal is less than or equal to the first amplitude threshold; 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 parameter includes any of the following:
[0230] the height of the avatar's ascent;
[0231] the longitudinal distance travelled by the avatar;
[0232] The fill height of the target pattern.
[0233] In some embodiments, the information determining unit 1302 may determine the target information according to the signal amplitude and / or duration of the sound signal by:
[0234] An information determination unit 1302, configured to determine a target score according to a signal amplitude and / or duration of a sound signal;
[0235] Furthermore, the manner in which the information output unit 1303 is used to output the target information may specifically include: the information output unit 1303 is used to output the target score.
[0236] In some embodiments, the information determining unit 1302 may determine the target score according to the signal amplitude and / or duration of the sound signal in the following manner:
[0237] The information determination unit 1302 is used to obtain a score increment corresponding to the first score update period according to 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 according to the target score in the previous score update period of the first score update period and the score increment corresponding to the first score update period.
[0238] In some embodiments, the information determining unit 1302 is configured to obtain the score increment corresponding to the first score update period according to the signal amplitude and / or duration of each sound signal within the first score update period, which may specifically include:
[0239] The information determination unit 1302 is used to obtain a parameter increment corresponding to the first score update period according to the signal amplitude and / or duration of each sound signal within the first score update period; and determine the score increment corresponding to the first score update period according to the parameter increment.
[0240] In some embodiments, the information determining unit 1302 is configured to obtain the parameter increment corresponding to the first score update period according to the signal amplitude of each sound signal within the first score update period, which may specifically include:
[0241] The information determination unit 1302 is used to obtain the parameter increment corresponding to the first score update period within a specified time period based on the signal amplitude of each sound signal within the first score update period and the 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 the second amplitude relationship table; wherein, for the same signal amplitude, the corresponding effect parameter in the first amplitude relationship table is greater than the corresponding effect parameter in the second amplitude relationship table.
[0242] In some embodiments, the information determining unit 1302 is configured to obtain the parameter increment corresponding to the first score update period according to the signal amplitude or duration of each sound signal within the first score update period, which may specifically include:
[0243] The information determination unit 1302 is used to obtain the parameter increment corresponding to the first score update period according to the signal amplitude of each sound signal within the first score update period within the specified time length; and after the specified time length, obtain the parameter increment corresponding to the first score update period according to the duration corresponding to the first score update period.
[0244] In some embodiments, in some embodiments, the information determination unit 1302 is used to obtain the score increment corresponding to the first score update period according to the signal amplitude and / or duration of each sound signal in the first score update period, which may specifically include:
[0245] The information determining unit 1302 is used to obtain a score increment corresponding to the first score update period according to the signal amplitude and / or duration of each sound signal in the first score update period within a specified time period;
[0246] The information determination unit 1302 is further used to, after a specified time period, use 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 in the previous score update period of the second score update period and the score increment corresponding to the second score update period.
[0247] In some embodiments, the information determining unit 1302 may determine the target score according to the signal amplitude and duration of the sound signal in the following manner:
[0248] The information determination unit 1302 is used to determine the target score according to the duration of the user's end of exhalation and the signal amplitude of each sound signal within a specified duration.
[0249] In some embodiments, the information determination unit 1302 is used to determine the target score according to the signal amplitude and / or duration of the sound signal, which can be performed when it is determined that the signal amplitude of the current sound signal is greater than the first amplitude threshold.
[0250] In some embodiments, the information output unit 1303 is further configured to start a countdown to a target duration when it is detected that the user starts to exhale.
[0251] In some embodiments, Fig.13 The exhalation guiding device may further include a detection unit ( Fig.13 (not shown), a detection unit is used to determine the motion state of the user relative to the electronic device before the signal acquisition unit 1301 acquires the sound signal generated by the user during the exhalation process; and if the motion state indicates that the user is in a stationary state relative to the electronic device, the exhalation detection is started.
[0252] In some embodiments, the detection unit is also used 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 the exhalation process; and if the distance is within a specified distance interval, start the exhalation detection.
[0253] In some embodiments, the detection unit is also used to determine whether the current ambient volume is lower than the volume threshold before the signal acquisition unit 1301 acquires the sound signal generated by the user during the exhalation process; and if the current ambient volume is lower than the volume threshold, start the exhalation detection.
[0254] See also Fig.14 , Fig.14 FIG. 1 is a structural diagram of an electronic device disclosed in an embodiment of the present application. Fig.14 The electronic device shown includes: a processor 1410, a memory 140, a display unit 1430, an input unit 1440, a sensor 1450, an audio circuit 1460 and other components.
[0255] The processor 1410 is the control center of the electronic device, which uses various interfaces and lines to connect various parts of the entire electronic device, and executes various functions of the electronic device and processes data by running or executing software programs and / or modules stored in the memory 1420, and calling data stored in the memory 1420, so as to monitor the electronic device as a whole. Optionally, the processor 1410 may include one or more processing units; optionally, the processor 1410 may integrate an application processor, which mainly processes operating devices, user interfaces, and application programs, etc. Of course, other processors may also be included, which are not listed here one by one.
[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, wherein the program storage area may store operating devices, applications required for at least one function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device (such as audio data, phone book, etc.), etc. In addition, the memory 1420 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0257] The display unit 1430 can be used to display information input by the user or information provided to the user and various menus of the electronic device. The display unit 1430 may include a display panel. Optionally, the display panel may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), etc. Further, the touch panel may cover the display panel. When the touch panel detects a touch operation on or near it, it is transmitted to the processor 1410 to determine the type of touch event. Subsequently, the processor 1410 provides a corresponding visual output on the display panel according to the type of touch event. Among them, the touch panel and the display panel are not in contact with each other. Fig.14 The touch panel and the display panel can be used as two independent components to realize the input and output functions of the electronic device, or the touch panel and the display panel can be integrated to realize the input and output functions of the electronic device.
[0258] The input unit 1440 can be used to receive input digital or character information, and to generate key signal input related to user settings and function control of the electronic device. Specifically, the input unit 1440 may include a touch panel and other input devices. A touch panel, also known as a touch screen, can collect user touch operations on or near it (such as operations performed by a user using any suitable object or accessory such as a finger, stylus, etc. on or near the touch panel), and drive the corresponding connection device according to a pre-set program. In addition, a variety of types such as resistive, capacitive, infrared, and surface acoustic waves can be used to implement the touch panel. In addition to the touch panel, the 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 keys, switch keys, etc.), trackballs, joysticks, etc.
[0259] The electronic device may also include at least one sensor 1450, such as a magnetometer, a gyroscope sensor, a motion sensor, and other sensors. Specifically, the magnetometer is used to determine the orientation of the electronic device, and the gyroscope sensor can be used to determine the motion posture of the electronic device. It can be used for anti-shake shooting, and can also be used for navigation and somatosensory game scenes. As a type of motion sensor, the acceleration sensor can detect the magnitude of acceleration in all directions, and can detect the magnitude and direction of gravity when stationary. It can be used for applications that identify the posture of the electronic device, such as horizontal and vertical screen switching, related games, magnetometer posture calibration, etc.; as for other sensors that the electronic device can also be configured with, such as pressure gauges, barometers, hygrometers, thermometers, infrared sensors, etc., they will not be repeated here.
[0260] The audio circuit 1460 may include a speaker and a microphone, and may provide an audio interface between a user and an electronic device. The audio circuit 1460 may transmit the electrical signal converted from the received audio data to the speaker, which is converted into a sound signal for output; on the other hand, the microphone converts the collected sound signal into an electrical signal, which is received by the audio circuit 1460 and converted into audio data, and then the audio data is output to the processor 1410 for processing, and then sent to another device through the video circuit, or the audio data is output to the memory 1420 for further processing.
[0261] Although not shown, the electronic device may further include a power supply and a camera. Optionally, the camera may be located at the front or rear of the electronic device, which is not limited in the present embodiment.
[0262] It is to be understood that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the electronic device. In other embodiments of the present application, the electronic device may include more or fewer components than shown in the figure, or combine certain components, or split certain components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0263] In the embodiment of the present application, the processor 1410 also has the following functions:
[0264] When it is detected that the user starts to exhale, the sound signal generated by the user during the exhalation process is collected;
[0265] Determining target information according to the signal amplitude and / or duration of the sound signal; wherein the signal amplitude is positively correlated with the user's exhalation speed;
[0266] Output target information.
[0267] In the embodiment of the present application, the processor 1410 also has the following functions:
[0268] Determining effect parameters according to the signal amplitude and / or duration of the sound signal;
[0269] Determine the first animation frame according to the effect parameters;
[0270] Output the first animation frame.
[0271] In the embodiment of the present application, the processor 1410 also has the following functions:
[0272] The effect parameter is determined according to the signal amplitude and / or duration of the sound signal within a specified time period.
[0273] In the embodiment of the present application, the processor 1410 also has the following functions:
[0274] After the specified duration ends, if the signal amplitude of the current sound signal 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 signal amplitude of the current sound signal is greater than the first amplitude threshold, the first animation frame at the end of the specified duration continues to be displayed.
[0275] In the embodiment of the present application, the effect parameter includes any of the following:
[0276] the height of the avatar's ascent;
[0277] the longitudinal distance travelled by the avatar;
[0278] The fill height of the target pattern.
[0279] In the embodiment of the present application, the processor 1410 also has the following functions:
[0280] Determine a target score according to the signal amplitude and / or duration of the sound signal;
[0281] Output the target score.
[0282] In the embodiment of the present application, the processor 1410 also has the following functions:
[0283] Obtaining a score increment corresponding to the first score update period according to 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;
[0284] The target score corresponding to the first score update period is determined according to the target score in the previous score update period of the first score update period and the score increment corresponding to the first score update period.
[0285] In the embodiment of the present application, the processor 1410 also has the following functions:
[0286] Obtaining a parameter increment corresponding to the first score update period according to the signal amplitude and / or duration of each sound signal within the first score update period;
[0287] According to the parameter increment, a score increment corresponding to the first score update period is determined.
[0288] In the embodiment of the present application, the processor 1410 also has the following functions:
[0289] Within the specified time length, according to the signal amplitude of each sound signal within the first score update period and the first amplitude relationship table, obtaining the parameter increment corresponding to the first score update period;
[0290] After the specified time length, the parameter increment corresponding to the first score update period is obtained according to 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 corresponding effect parameter in the first amplitude relationship table is greater than the corresponding effect parameter in the second amplitude relationship table.
[0291] In the embodiment of the present application, the processor 1410 also has the following functions:
[0292] Within the specified time length, according to the signal amplitude of each sound signal within the first score update period, obtain the parameter increment corresponding to the first score update period;
[0293] After the specified duration, the parameter increment corresponding to the first score update period is obtained according to the duration corresponding to the first score update period.
[0294] In the embodiment of the present application, the processor 1410 also has the following functions:
[0295] Within the specified time period, according to the signal amplitude and / or duration of each sound signal within the first score update period, obtain a score increment corresponding to the first score update period;
[0296] After the specified time period, the highest score increment within the specified time period is used as the score increment corresponding to the second score update period;
[0297] The target score corresponding to the second score update period is determined according to the target score in the previous score update period of the second score update period and the score increment corresponding to the second score update period.
[0298] In the embodiment of the present application, the processor 1410 also has the following functions:
[0299] The target score is determined according to the duration of the user's exhalation and the signal amplitude of each sound signal within the specified time.
[0300] In the embodiment of the present application, the operation of determining the target score according to 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 the embodiment of the present application, the processor 1410 also has the following functions:
[0302] When the user starts to exhale, a countdown to the target duration is started.
[0303] In the embodiment of the present application, the processor 1410 also has the following functions:
[0304] determining a motion state of a user relative to the electronic device;
[0305] If the motion status indicates that the user is stationary relative to the electronic device, breath detection is initiated.
[0306] In the embodiment of the present application, the processor 1410 also has the following functions:
[0307] determining a distance between a user's mouth and the electronic device;
[0308] If the distance is within the specified distance range, breath detection is activated.
[0309] In the embodiment of the present application, the processor 1410 also has the following functions:
[0310] Determine whether the current ambient volume is below the volume threshold;
[0311] If the current ambient volume is lower than the volume threshold, the breath detection is activated.
[0312] The embodiment of the present application discloses a computer-readable storage medium on which executable program codes are stored. When the executable program codes are executed by a processor, the method described in the electronic device in the embodiment of the present application is implemented.
[0313] The embodiment of the present application discloses a computer program product. When the computer program product is executed on a computer, the computer implements the method described in the electronic device in the embodiment of the present application.
[0314] An embodiment of the present application discloses an application publishing platform, which is used to publish a computer program product. When the computer program product runs on a computer, the computer implements the method described in the electronic device in the embodiment of the present application.
[0315] It should be noted here that the description of the above storage medium and device embodiments is similar to the description of the above method embodiments, and has similar beneficial effects as the method embodiments. For technical details not disclosed in the storage medium, storage medium and device embodiments of this application, please refer to the description of the method embodiments of this application for understanding.
[0316] It should be understood that "one embodiment" or "an embodiment" or "some embodiments" mentioned throughout the specification means that specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, "in one embodiment" or "in one embodiment" or "in some embodiments" appearing throughout the specification may not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in various embodiments of the present application, the size of the sequence number of the above-mentioned processes does not mean the order of execution, and 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 embodiment of the present application. The above-mentioned sequence numbers of the embodiments of the present application are only for description and do not represent the advantages and disadvantages of the embodiments. The above description of each embodiment tends to emphasize the differences between the various embodiments, and the same or similar aspects can be referenced to each other. For the sake of brevity, this article will not repeat them.
[0317] The term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there may be three relationships. For example, object A and / or object B can represent three situations: object A exists alone, object A and object B exist at the same time, and object B exists alone.
[0318] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0319] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The embodiments described above are only schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation, such as: multiple modules or components can be combined, or can be integrated into another system, or some features can be ignored, or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or modules can be electrical, mechanical or other forms.
[0320] The modules described above as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules; they may be located in one place or distributed on multiple network units; some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment.
[0321] In addition, all functional modules in the embodiments of the present application may be integrated into one processing unit, or each module may be a separate unit, or two or more modules may be integrated into one unit; the above-mentioned integrated modules may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0322] A person skilled in the art can understand that all or part of the steps of implementing the above method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above method embodiment; and the aforementioned storage medium includes: mobile storage devices, read-only memories (ROM), magnetic disks or optical disks, etc., various media that can store program codes.
[0323] Alternatively, if the above-mentioned integrated unit of the present application is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application can essentially or in other words, the part that contributes to the relevant technology can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for enabling an electronic device to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROMs, magnetic disks, or optical disks.
[0324] The methods disclosed in several method embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments.
[0325] The features disclosed in several product embodiments provided in this application can be arbitrarily combined without conflict to obtain new product embodiments.
[0326] The features disclosed in several method or device embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments or device embodiments.
[0327] The above is only an implementation method of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. An exhalation guiding method, characterized in that: include: When detecting that the user starts to exhale, collecting the sound signal generated by the user during the exhalation process; Determining target information according to the signal amplitude and / or duration of the sound signal; wherein the signal amplitude is positively correlated with the exhalation speed of the user; The target information is output.
2. The method according to claim 1, characterized in that: The determining of target information according to the signal amplitude and / or duration of the sound signal comprises: Determining effect parameters according to the signal amplitude and / or duration of the sound signal; Determining a first animation frame according to the effect parameters; Wherein, the outputting the target information includes: The first animation frame is output.
3. The method according to claim 2, characterized in that Determining the effect parameter according to the signal amplitude and / or duration of the sound signal includes: Within a specified time period, the effect parameter is determined according to the signal amplitude and / or duration of the sound signal.
4. The method according to claim 3, characterized in that The method further comprises: After the specified duration ends, if the signal amplitude of the current sound signal 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 signal amplitude of the current sound signal is greater than the first amplitude threshold, the first animation frame at the end of the specified duration continues to be displayed.
5. The method according to any one of claims 2 to 4, characterized in that: The effect parameters include any of the following: the height of the avatar's ascent; the longitudinal distance travelled by the avatar; The fill height of the target pattern.
6. The method according to claim 1, characterized in that The determining of target information according to the signal amplitude and / or duration of the sound signal comprises: Determining a target score according to the signal amplitude and / or duration of the sound signal; Wherein, the outputting the target information includes: The target score is output.
7. The method according to claim 6, characterized in that Determining the target score according to the signal amplitude and / or duration of the sound signal includes: Obtaining a score increment corresponding to the first score update period according to 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; The target score corresponding to the first score update period is determined according to the target score in the previous score update period of the first score update period and the score increment corresponding to the first score update period.
8. The method according to claim 7, characterized in that The step of obtaining a score increment corresponding to the first score update period according to the signal amplitude and / or duration of each sound signal within the first score update period includes: Obtaining a parameter increment corresponding to the first score update period according to the signal amplitude and / or duration of each sound signal within the first score update period; A score increment corresponding to the first score update period is determined according to the parameter increment.
9. The method according to claim 8, characterized in that Obtaining a parameter increment corresponding to the first score update period according to the signal amplitude of each sound signal within the first score update period, including: Within a specified time period, according to the signal amplitude of each sound signal within the first score update period and the first amplitude relationship table, obtaining a parameter increment corresponding to the first score update period; After the specified time length, 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 corresponding effect parameter in the first amplitude relationship table is greater than the corresponding effect parameter in the second amplitude relationship table.
10. The method according to claim 8, characterized in that Obtaining a parameter increment corresponding to the first score update period according to the signal amplitude or duration of each sound signal within the first score update period includes: Within a specified time period, according to the signal amplitude of each sound signal within a first score update period, obtaining a parameter increment corresponding to the first score update period; After the specified time period, a parameter increment corresponding to the first score update period is obtained according to the duration corresponding to the first score update period.
11. The method according to claim 7, characterized in that The step of obtaining a score increment corresponding to the first score update period according to the signal amplitude and / or duration of each sound signal within the first score update period includes: Within a specified time period, according to the signal amplitude and / or duration of each sound signal within the first score update period, obtaining a score increment corresponding to the first score update period; The method further comprises: After the specified time period, the highest score increment within the specified time period is used as the score increment corresponding to the second score update period; The target score corresponding to the second score update period is determined according to the target score in the score update period last before the second score update period and the score increment corresponding to the second score update period.
12. The method according to claim 6, characterized in that Determining a target score according to the signal amplitude and duration of the sound signal includes: The target score is determined according to the duration of the user's end of exhalation and the signal amplitude of each sound signal within a specified duration.
13. The method according to claim 6, characterized in that The operation of determining the target score according to 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.
14. The method according to claim 1, characterized in that The method further comprises: When the user starts to exhale, a countdown to the target duration is started.
15. The method according to claim 1, characterized in that When detecting that the user starts to exhale, before collecting the sound signal generated by the user during the exhalation process, the method includes: determining a motion state of a user relative to the electronic device; If the motion status indicates that the user is stationary relative to the electronic device, breath detection is initiated.
16. The method according to claim 1, characterized in that When detecting that the user starts to exhale, before collecting the sound signal generated by the user during the exhalation process, the method further includes: determining a distance between the user's mouth and the electronic device; If the distance is within a specified distance interval, breath detection is initiated.
17. The method according to claim 1, characterized in that When detecting that the user starts to exhale, before collecting the sound signal generated by the user during the exhalation process, the method further includes: Determine whether the current ambient volume is below the volume threshold; If the current ambient volume is lower than the volume threshold, the exhalation detection is started.
18. An exhalation guiding device, characterized in that: include: A signal collection unit, configured to collect a sound signal generated by the user during the exhalation process when detecting that the user starts to exhale; An information determination unit, configured to determine target information according to a signal amplitude and / or a duration of the sound signal; wherein the signal amplitude is positively correlated with an exhalation speed of the user; An information output unit is used to output the target information.
19. An electronic device, characterized in that: include: A memory storing executable program code; and a 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 according to any one of claims 1 to 17.
20. A computer-readable storage medium having executable program code stored thereon, characterized in that: When the executable program code is executed by a processor, the method according to any one of claims 1 to 17 is implemented.
Citation Information
Patent Citations
Method and system and browser for carrying out interaction with webpage through microphone
CN102981738A
Intelligent respiratory training implementation system and method
CN112354154A
Portable electronic device with breath analyzer
EP2762880A1
Method for detecting user input to a breath input configured user interface
GB202112710D0
Alcohol concentration measuring device
JP2009254399A