A respiratory guidance method and related apparatus

By recognizing user movements and outputting different types of prompts through electronic devices, the shortcomings of breathing guidance in the field of sports and health are solved, the rhythm of breathing is matched with the rhythm of movement, and the exercise effect and health check efficiency are improved.

CN115703003BActive Publication Date: 2026-07-21HUAWEI TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HUAWEI TECH CO LTD
Filing Date
2021-08-13
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

The lack of effective breathing guidance solutions in existing technologies makes it impossible to scientifically guide users' breathing rhythm in the fields of exercise and health, resulting in poor exercise effects and low efficiency of health checkups.

Method used

By collecting sensor data through electronic devices, the system identifies the user's action type and outputs different types of prompts to guide the user to inhale or exhale during different actions, including through vibration, voice, text, and images, to ensure that the breathing rhythm matches the action rhythm.

Benefits of technology

It improved exercise effectiveness and health check efficiency, reduced user physical exertion, enhanced user experience, and improved the effectiveness of respiratory rehabilitation training.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115703003B_ABST
    Figure CN115703003B_ABST
Patent Text Reader

Abstract

The application provides a breathing guidance method and related device. The method comprises: when the electronic device monitors a first action, prompting the user to perform an inhaling action in a first prompting mode; and when the electronic device monitors a second action, prompting the user to perform an exhaling action in a second prompting mode. The first action and the second action can be actions of the user monitored by the electronic device. The first action and the second action can be actions of other electronic devices (such as exercise equipment and medical equipment) monitored by the electronic device. The first action and the second action can also be actions of other electronic devices monitored by other electronic devices. Through the method, the electronic device can prompt the user when to inhale and when to exhale through different prompting modes, so that the rhythm of the action matches the rhythm of the user's breathing, saves physical energy, and improves the user's exercise ability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of mobile terminal technology, and in particular to a breathing guidance method and related device. Background Technology

[0002] Breathing is one of the most important behaviors in daily human life. Proper breathing is crucial for both exercise and health. However, in some situations, users forget to breathe at a reasonable rhythm. For example, in the field of sports, how can regulating breathing help achieve safer exercise and improved performance? In the field of healthcare, how can breathing guidance help achieve better rehabilitation?

[0003] Currently, there are no solutions for providing breathing guidance to users in the sports and health fields. How to provide scientific breathing guidance to users in these areas is an urgent problem to be solved. Summary of the Invention

[0004] This application provides a breathing guidance method and related device, which enables electronic devices to prompt users when to inhale and when to exhale through different prompting methods, so that the rhythm of the movement matches the user's breathing rhythm.

[0005] In a first aspect, this application provides a breathing guidance method, the method comprising: a first electronic device acquiring sensor data;

[0006] The first electronic device determines the user's action type based on sensor data; when the first electronic device determines that the user's action type is a first action type, the first electronic device outputs a first prompt, which prompts the user to perform an inhalation action; when the first electronic device determines that the user's action type is a second action type, the first electronic device outputs a second prompt, which prompts the user to perform an exhalation action, and the first prompt and the second prompt are different.

[0007] The first electronic device can be a mobile phone, wearable device, headphones, smart glasses, augmented reality (AR) device, virtual reality (VR) device, etc. Wearable devices can be wrist-supported devices, such as smartwatches, smart bracelets, smart wristbands, etc. Wearable devices can also be ankle-supported devices, such as smart ankle bracelets, smart shoes, smart socks, or other devices worn on the legs. Wearable devices can also be head-supported devices, such as smart helmets, smart headbands (also known as smart headbands).

[0008] The first electronic device can also be medical equipment and fitness equipment, etc. Medical equipment can include, but is not limited to, ventilators, nebulizers, endoscopes, chest X-ray equipment, etc. Fitness equipment can include, but is not limited to, boats, rowing machines, elliptical trainers, barbells, etc.

[0009] In one possible implementation, a third electronic device collects sensor data and determines the user's action type based on the sensor data. When the third electronic device determines that the user's action type is a first action type, the third electronic device sends a first instruction to the first electronic device. After receiving the first instruction, the first electronic device outputs a first prompt, which prompts the user to perform an inhalation action. When the third electronic device determines that the user's action type is a second action type, the third electronic device sends a second instruction to the first electronic device. After receiving the second instruction, the first electronic device outputs a second prompt, which prompts the user to perform an exhalation action. The first and second prompts are different.

[0010] Using the method provided in the first aspect, electronic devices can prompt users in different ways to indicate when to inhale and when to exhale, so that the rhythm of the movement matches the user's breathing rhythm, saving energy and improving the user's exercise ability.

[0011] In conjunction with the first aspect, in one possible implementation, the type of the first prompt is any one or more of the following: vibration, voice, text, and image; the type of the second prompt is any one or more of the following: vibration, voice, text, and image.

[0012] In conjunction with the first aspect, in one possible implementation, the first prompt is different from the second prompt, specifically including: the vibration frequency of the first prompt is different from the vibration frequency of the second prompt.

[0013] In conjunction with the first aspect, in one possible implementation, the first prompt is different from the second prompt, specifically including: the voice content of the first prompt is different from the voice content of the second prompt.

[0014] In conjunction with the first aspect, in one possible implementation, the first prompt differs from the second prompt, specifically including: the type of the first prompt is any one or more of the following: vibration, voice, text, image; the second prompt does not output any content; or, the first prompt does not output any content; the type of the second prompt is any one or more of the following: vibration, voice, text, image.

[0015] In conjunction with the first aspect, in one possible implementation, before the first electronic device begins guiding the user's breathing, it may display guiding actions on a screen. These guiding actions are used to indicate the breathing actions corresponding to different types of user movements.

[0016] In conjunction with the first aspect, in one possible implementation, the first electronic device may display an animation on its screen before it begins to guide the user's breathing. This animation serves to indicate the breathing movements corresponding to different types of user actions.

[0017] In conjunction with the first aspect, in one possible implementation, the first electronic device may play a voice prompt before it begins guiding the user's breathing. This voice prompt instructs the user on breathing actions corresponding to different types of movements.

[0018] In conjunction with the first aspect, in one possible implementation, the method further includes: simultaneously with the first electronic device outputting the first prompt, the first electronic device sends a first instruction to the second electronic device, the first instruction instructing the second electronic device to output a third prompt, the third prompt prompting the user to perform an inhalation action; wherein the type of the third prompt is any one or more of the following: vibration, voice, text, and image. In this way, while the first electronic device outputs the first prompt, it can also output the third prompt through other connected electronic devices (the second electronic device being headphones or a mobile phone, etc.).

[0019] In other possible implementations, the first electronic device may not output any content, but instead output a third prompt through other connected electronic devices (such as headphones or mobile phones).

[0020] In conjunction with the first aspect, in one possible implementation, when the first electronic device determines that the user's action type is a first action type, the electronic device outputs a first prompt, specifically including: when the first electronic device determines that the user's action type is a first action type n times consecutively, the electronic device outputs a first prompt, where n is a positive integer greater than or equal to 1.

[0021] When the first electronic device determines that the user's action type is the second action type, the electronic device outputs a second prompt. Specifically, when the first electronic device determines that the user's action type is the second action type m times consecutively, the electronic device outputs a second prompt, where m is a positive integer greater than or equal to 1. The first electronic device can monitor multiple first or second actions and prompt the user to perform one inhalation or one exhalation. For example, "one step, one exhale" in running, or "two arm strokes corresponding to one breath" in swimming. In this way, the breathing rhythm provided by the first electronic device varies according to different types of exercise, reflecting the flexibility of breathing guidance.

[0022] In conjunction with the first aspect, in one possible implementation, after the first electronic device outputs the first prompt and before it outputs the second prompt, the method further includes: when the first electronic device determines that the user's action type is a third action type, the first electronic device outputs a fourth prompt, which prompts the user to perform a breath-holding action; wherein the type of the fourth prompt is any one or more of the following: vibration, voice, text, and image. For example, in weightlifting, after completing the first action, the user holds the barbell at its highest point for a period of time; this period of time can be considered the third action. For example, in swimming, after completing the first action, the user holds their arm still for a period of time; this user action can also be considered the third action. In one possible implementation, when the user performs the third action, the first electronic device prompts the user to hold their breath via the fourth prompt. In other possible implementations, the first electronic device prompts the user to perform one or more short sets of inhalation and exhalation movements via the fourth prompt.

[0023] In conjunction with the first aspect, in one possible implementation, when the first electronic device determines that the user's action type is a first action type, the first electronic device outputs a first prompt. This first prompt is used to prompt the user to perform an inhalation action. Specifically, when the first electronic device determines that the user's action type is the first action type and detects that the user has completed the first action, the first electronic device outputs the first prompt, which prompts the user to perform an inhalation action. For example, in a swimming application scenario, the user's head can only emerge from the water and perform an inhalation action after completing the first action.

[0024] In other possible implementations, when the first electronic device determines that the user's action type is the second action type, and the first electronic device detects that the user has completed the second action, the first electronic device outputs a second prompt, which prompts the user to exhale. For example, in a swimming application scenario, after the user completes the second action, the first electronic device prompts the user to exhale.

[0025] In conjunction with the first aspect, in one possible implementation, before the first electronic device acquires sensor data, the method further includes: the first electronic device receiving and responding to a first input operation, and determining a first exercise mode; the first exercise mode is any one of the following: running mode, swimming mode, weightlifting mode, elliptical machine exercise mode, rowing machine exercise mode, or rowing mode; the first electronic device determines the user's action type based on the sensor data, specifically including: the first electronic device determining the user's action type based on the sensor data in the first exercise mode. In this way, the first electronic device can activate different exercise modes before exercise and provide different breathing guidance schemes in different exercise modes.

[0026] In other possible implementations, the first electronic device may adaptively activate the first motion mode based on the acquired motion sensor data.

[0027] After the first electronic device adaptively activates the first motion mode, it displays a first interface with a first control. The first electronic device receives and responds to user input on the first control, and then deactivates the first motion mode. This prevents the first electronic device from accidentally activating the first motion mode, thus avoiding increased power consumption.

[0028] In conjunction with the first aspect, in one possible implementation, before the first electronic device acquires the sensor data, the method further includes: the first electronic device receiving sensor data sent by a third electronic device.

[0029] The third electronic device can be either fitness equipment or medical devices. In other words, the first electronic device establishes a communication connection with itself. The third electronic device collects motion sensor data from its own sensors in real time and transmits this data back to the first electronic device in real time.

[0030] In conjunction with the first aspect, in one possible implementation, the sensor data includes one or more of acceleration data, gyroscope data, image data, gravity data, and pressure data.

[0031] In conjunction with the first aspect, in one possible implementation, the first electronic device pauses acquiring sensor data for a short period after determining the first motion mode. This allows the first electronic device to pause the breathing guidance function after guiding the user's breathing for a period of time, thus saving power consumption.

[0032] In conjunction with the first aspect, in one possible implementation, after the first electronic device pauses acquiring sensor data, if the first electronic device detects that the user's heart rate is greater than a preset heart rate value and / or the user's respiratory rate is greater than a preset frequency, the first electronic device continues to acquire sensor data. This demonstrates the flexibility of the first electronic device in providing breathing guidance.

[0033] In a second aspect, this application provides an electronic device comprising: one or more processors and one or more memories; the one or more memories being coupled to the one or more processors, the one or more memories being used to store computer program code, the computer program code including computer instructions, and the one or more processors invoking the computer instructions to cause the electronic device to perform the method described in any of the first aspects above.

[0034] Thirdly, this application provides a computer-readable storage medium including instructions, characterized in that, when the instructions are executed on an electronic device, the electronic device causes the electronic device to perform the method described in any of the first aspects above.

[0035] Fourthly, this application provides a computer program product, characterized in that, when the computer program product is run on an electronic device, it causes the electronic device to perform the method described in any of the first aspects above. Attached Figure Description

[0036] Figure 1 A schematic diagram of the hardware structure of an electronic device 100 provided in an embodiment of this application;

[0037] Figure 2 A software structure block diagram of an electronic device 100 provided in this application embodiment;

[0038] Figures 3A-3E A set of UI diagrams showing an electronic device 100 activating running mode, provided in an embodiment of this application;

[0039] Figure 4 UI diagram of a motion sensor for activating running mode in an electronic device 100 provided in this application embodiment;

[0040] Figures 5A-5O UI diagrams related to a breathing guidance scheme during running provided in the embodiments of this application;

[0041] Figures 6A-6B A schematic diagram of a first and second motion in breaststroke provided for an embodiment of this application;

[0042] Figure 7A and Figure 7B A schematic diagram of a first and second movement in freestyle swimming provided for an embodiment of this application;

[0043] Figures 8A-8B A schematic diagram of a first and second motion in backstroke provided for an embodiment of this application;

[0044] Figures 9A-9B A schematic diagram of a first and second motion in a butterfly stroke provided for an embodiment of this application;

[0045] Figures 10A-10B A schematic diagram of a first and second movement in a weightlifting exercise provided for an embodiment of this application;

[0046] Figures 11A-11B A schematic diagram of a first and second action in a rowing motion provided for an embodiment of this application;

[0047] Figures 12A-12B A set of schematic diagrams illustrating the first and second movements when exercising with a rowing machine, provided for embodiments of this application;

[0048] Figures 13A-13B A set of schematic diagrams illustrating the first and second actions of using an elliptical machine for exercise, provided for embodiments of this application;

[0049] Figures 14A-14C A set of schematic diagrams for determining the type of movement in weightlifting using acceleration data, provided as an embodiment of this application;

[0050] Figures 15A-15C A set of schematic diagrams for determining the type of motion in rowing using acceleration data is provided as an embodiment of this application;

[0051] Figures 16A-16C A set of schematic diagrams provided for embodiments of this application, illustrating the determination of the type of motion during exercise using a rowing machine based on acceleration data;

[0052] Figures 17A-17C A set of schematic diagrams provided for embodiments of this application to determine the type of motion performed using an elliptical machine based on acceleration data;

[0053] Figure 18 This is a schematic diagram of a scene during a gastroscopy examination provided in an embodiment of this application;

[0054] Figure 19 This is a schematic diagram of a scenario in a nebulized inhalation therapy provided in an embodiment of this application;

[0055] Figure 20 This is a schematic flowchart of a breathing guidance method provided in an embodiment of this application;

[0056] Figure 21 This is a schematic diagram illustrating how an electronic device 100 obtains a user's athletic ability based on the user's personal information, as provided in an embodiment of this application. Detailed Implementation

[0057] The technical solutions in the embodiments of this application will be clearly and thoroughly described below with reference to the accompanying drawings. In the description of the embodiments of this application, unless otherwise stated, " / " means "or," for example, A / B can mean A or B; the word "and / or" in the text is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Furthermore, in the description of the embodiments of this application, "multiple" refers to two or more than two.

[0058] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as implying or suggesting relative importance or implicitly indicating the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature, and in the description of the embodiments of this application, unless otherwise stated, "multiple" means two or more.

[0059] The term "user interface (UI)" used in the following embodiments of this application refers to the medium interface through which an application or operating system interacts and exchanges information with the user. It realizes the conversion between the internal form of information and the form that the user can accept. The user interface is source code written in a specific computer language such as Java or Extensible Markup Language (XML). The interface source code is parsed and rendered on the electronic device, ultimately presenting content that the user can recognize. A common form of user interface is the graphical user interface (GUI), which refers to a user interface related to computer operation displayed graphically. It can be visible interface elements such as text, icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, and widgets displayed on the screen of an electronic device.

[0060] Currently, in the sports field, with increasing public awareness of physical health, more and more people are participating in sports activities, leading to the emergence of numerous sports-related applications. These applications generally only record users' exercise data or provide offline articles or tutorials for reference before exercise. Alternatively, some electronic devices (such as wearable devices) have daily breathing training functions. For example, when users are tense, they can adjust their breathing rhythm according to breathing tutorials on their wearable devices to achieve relaxation. However, this breathing training is only for regulating the user's emotions and cannot guide the user's breathing rhythm during exercise to improve exercise effectiveness and performance.

[0061] In the health field, in some cases, due to poor cardiopulmonary function, breathing exercises are needed to improve it. Currently, this is generally done verbally by doctors, instructing users to perform breathing rehabilitation exercises at specific times and according to certain rules. However, verbal instructions are prone to being forgotten by patients with poor memory; furthermore, users performing breathing rehabilitation exercises from memory may deviate from the doctor's instructions, leading to poor training effectiveness.

[0062] Alternatively, in other situations, during certain health checkups, users need to coordinate their breathing rhythm with the doctor's examination. Currently, this is generally determined by the doctor's experience, informing the user when to inhale and when to exhale. However, this judgment is not without its limitations; furthermore, doctors perform examinations on many patients daily, and requiring them to remind users to breathe each time would significantly increase their workload.

[0063] Therefore, this application provides a breathing guidance method. The method includes: when the electronic device detects a first action, prompting the user to inhale in a first manner; and when the electronic device detects a second action, prompting the user to exhale in a second manner.

[0064] The first and second actions can be user actions detected by the electronic device. Alternatively, the first and second actions can be actions detected by other electronic devices (such as sports equipment and medical devices).

[0065] The first notification method can be any one or more of vibration, voice, text, and image. The second notification method can also be any one or more of vibration, voice, text, and image.

[0066] When both the first and second notification methods are vibration, the vibration frequencies of the first and second notification methods can be different. For example, the first notification method can be a continuous vibration, and the second notification method can be intermittent vibration. Alternatively, the vibration frequencies of the first and second notification methods can be the same; for example, the first notification method can vibrate only once, and the second notification method can also vibrate only once.

[0067] When both the first and second prompt types are voice prompts, the voice content of the first prompt type differs from that of the second prompt type. For example, the voice content of the first prompt type could be "Please inhale," while the voice content of the second prompt type could be "Please exhale."

[0068] When both the first and second prompt types are text-based, when the electronic device outputs the first prompt, it can display the text "Inhale" on the screen. The size, color, and shape of the text displayed on the screen can gradually change as the user inhales (e.g., the font gradually increases). For details, please refer to the following sections. Figures 5J-5L The described embodiment: When the electronic device outputs the second prompt, it can display the text "Exhale" on the screen, and the size, color, and shape of the text displayed on the screen can gradually change as the user exhales (e.g., the font gradually becomes smaller). For details, please refer to the following... Figure 5M-Figure 5OThe following are examples.

[0069] When both the first and second prompt types are images, when the electronic device outputs the first prompt, it can display an image on the screen, and the size, color, and shape of the image displayed on the screen can gradually change as the user inhales (e.g., the image gradually enlarges). When the electronic device outputs the second prompt, it can display an image on the screen, and the size, color, and shape of the image displayed on the screen can gradually change as the user exhales (e.g., the image gradually shrinks).

[0070] The first and second prompt methods can also be combinations of two or more of the aforementioned vibration, voice, text, and image prompts.

[0071] The first prompting method can be any one or more of vibration, voice, text, and image. The second prompting method does not output any prompt. For example, when the electronic device detects that the user is performing the first action, it prompts the user to inhale through vibration, voice, text, or image. When the electronic device detects that the user is performing the second action, it does not output any prompt.

[0072] The first type of prompt can be no prompt at all, while the second type can be any one or more of vibration, voice, text, and images. For example, when the electronic device detects the user performing the first action, it does not output any prompt. When the electronic device detects the user performing the second action, it prompts the user to inhale through vibration, voice, text, or images.

[0073] The first and second prompt methods can also be implemented in other ways. This application does not limit the specific implementation of the first and second prompt methods in the embodiments.

[0074] In this way, electronic devices can use different prompts to remind users when to inhale and when to exhale, so that the rhythm of the movement matches the user's breathing rhythm.

[0075] This method can be applied to the field of sports, where rhythmic breathing combined with rhythmic movement can significantly enhance training effectiveness. Specifically, when the electronic device detects the user's first movement, it prompts the user to inhale. When the device detects the user's second movement, it prompts the user to exhale. This method guides the user's breathing and movement rhythms, ensuring they match. It provides sufficient oxygen and energy to muscles during exercise, conserves energy, and enhances training results.

[0076] This method can be applied to the health field. On one hand, during some health examinations, when users need to coordinate their breathing rhythm with the doctor's examination, the electronic device prompts the user to inhale when it detects another electronic device (e.g., a medical device) performing its first action. When it detects a second action, it prompts the user to exhale. This allows the user's breathing rhythm to coordinate with the examination actions of other electronic devices (e.g., medical devices), improving the user's experience during the examination, reducing discomfort, and increasing the efficiency of the health examination. On the other hand, when patients need respiratory rehabilitation training, they can save an electronic version of the doctor's breathing guidance plan on their electronic device. The device can then periodically prompt the user to perform respiratory rehabilitation training based on this electronic version. This allows users to regularly perform respiratory rehabilitation training according to the guidance plan, improving the rehabilitation effect.

[0077] The electronic device provided in the embodiments of this application is described below.

[0078] Figure 1 A schematic diagram of the hardware structure of the electronic device 100 provided in an embodiment of this application is shown.

[0079] Electronic device 100 may be a mobile phone, tablet computer, desktop computer, laptop computer, handheld computer, notebook computer, ultra-mobile personal computer (UMPC), netbook, as well as cellular phone, personal digital assistant (PDA), augmented reality (AR) device, virtual reality (VR) device, artificial intelligence (AI) device, wearable device (smartwatch, smart bracelet), in-vehicle device, smart home device and / or smart city device. The embodiments of this application do not impose special restrictions on the specific type of electronic device.

[0080] Electronic device 100 may include processor 110, internal memory 120, wireless communication module 130, mobile communication module 140, sensor module 150, audio module 160, display screen 170, power switch 180, motor 190, and buttons 1000.

[0081] Processor 110 may include one or more processing units, such as application processors (APs), modem processors, graphics processing units (GPUs), image signal processors (ISPs), controllers, video codecs, digital signal processors (DSPs), baseband processors, and / or neural network processing units (NPUs). These different processing units may be independent devices or integrated into one or more processors.

[0082] Internal memory 120 may include one or more random access memory (RAM) and one or more non-volatile memory (NVM).

[0083] Random access memory can include static random-access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), and double data rate synchronous dynamic random access memory (DDR SDRAM, such as fifth-generation DDR SDRAM, which is generally called DDR5 SDRAM). Non-volatile memory can include disk storage devices and flash memory.

[0084] Flash memory can be classified according to its operating principle, including NOR FLASH, NAND FLASH, 3D NAND FLASH, etc.; according to the level of the storage cell, including single-level cell (SLC), multi-level cell (MLC), triple-level cell (TLC), quad-level cell (QLC), etc.; and according to the storage specification, including universal flash storage (UFS) and embedded multimedia card (eMMC), etc.

[0085] The random access memory can be directly read and written by the processor 110. It can be used to store executable programs (such as machine instructions) of the operating system or other running programs, as well as user and application data.

[0086] Non-volatile memory can also store executable programs and user and application data, and can be pre-loaded into random access memory for direct reading and writing by the processor 110.

[0087] The wireless communication function of electronic device 100 can be implemented through antenna 130A, antenna 140A, wireless communication module 130, mobile communication module 140, modem processor, and baseband processor.

[0088] Antennas 130A and 140A can be used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover one or more communication frequency bands. Different antennas can also be reused to improve antenna utilization.

[0089] The wireless communication module 130 can provide solutions for wireless communication applications on the electronic device 100, including wireless local area networks (WLAN), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR). The wireless communication module 130 can be one or more devices integrating at least one communication processing module. The wireless communication module 130 receives electromagnetic waves via antenna 130A, performs frequency modulation and filtering of the electromagnetic wave signal, and sends the processed signal to processor 110. The wireless communication module 130 can also receive signals to be transmitted from processor 110, perform frequency modulation and amplification, and convert them into electromagnetic waves for radiation via antenna 130A.

[0090] The mobile communication module 140 can provide solutions for wireless communication, including 2G / 3G / 4G / 5G, applied to the electronic device 100. The mobile communication module 140 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 140 can receive electromagnetic waves via antenna 140A, and perform filtering, amplification, and other processing on the received electromagnetic waves before transmitting them to a modem processor for demodulation. The mobile communication module 140 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation via antenna 140A.

[0091] The modem processor may include a modulator and a demodulator. The modulator modulates the low-frequency baseband signal to be transmitted into a mid-to-high frequency signal. The demodulator demodulates the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After processing by the baseband processor, the low-frequency baseband signal is transmitted to the application processor. The application processor outputs a sound signal through an audio device or displays an image or video through the display screen 170.

[0092] In some embodiments, the mobile communication module 140 and the wireless communication module 130 can be used to establish connections with other devices, acquire exercise data collected by other devices, including heart rate, calories, respiratory rate, etc., or control other devices to prompt the user to breathe, adjust movements, pause or continue exercise, etc. Other devices may refer to mobile phones, wristbands, body fat scales, computers, laptops, etc.

[0093] The sensor module 150 includes a gyroscope sensor 1501, an accelerometer sensor 1502, a distance sensor 1503, a temperature sensor 1504, a touch sensor 1505, a pressure sensor 1506, and a bone conduction sensor 1507.

[0094] The gyroscope sensor 1501 can be used to determine the motion posture of the electronic device 100. In some embodiments, the gyroscope sensor 1501 can determine the angular velocity of the electronic device 100 around three axes (i.e., the x, y, and z axes). The gyroscope sensor 1501 can be used for image stabilization. For example, when the shutter is pressed, the gyroscope sensor 1501 detects the angle of the electronic device 100's shake, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to counteract the shake of the electronic device 100 through reverse movement, thus achieving image stabilization. The gyroscope sensor 1501 can also be used in navigation and motion-sensing game scenarios.

[0095] Accelerometer 1502 can be used to detect the magnitude of acceleration of electronic device 100 in various directions (generally three axes). When electronic device 100 is stationary, it can detect the magnitude and direction of gravity. It can also be used to identify the posture of electronic device, and can be applied to applications such as screen orientation switching and pedometers.

[0096] The distance sensor 1503 can be used to measure distance. The electronic device 100 can measure distance via infrared or laser. In some embodiments, during a shooting scene, the electronic device 100 can utilize the distance sensor 1503 to measure distance for rapid focusing.

[0097] Temperature sensor 1504 is used to detect temperature. In some embodiments, electronic device 100 uses the temperature detected by temperature sensor 1504 to execute a temperature handling strategy. For example, when the temperature reported by temperature sensor 1504 exceeds a threshold, electronic device 100 performs thermal protection by reducing the performance of a processor located near temperature sensor 1504 to reduce power consumption. In other embodiments, when the temperature is below another threshold, electronic device 100 heats the battery to prevent abnormal shutdown of electronic device 100 due to low temperature. In still other embodiments, when the temperature is below yet another threshold, electronic device 100 boosts the battery's output voltage to prevent abnormal shutdown due to low temperature.

[0098] Touch sensor 1505 is also called a "touch device". Touch sensor 1505 can be disposed on display screen 170, and touch sensor 1505 and display screen 170 together form a touch screen, also called a "touchscreen". Touch sensor 1505 is used to detect touch operations applied to or near it. Touch sensor 1505 can transmit the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through display screen 170. In other embodiments, touch sensor 1505 may also be disposed on the surface of electronic device 100, in a different location than display screen 170.

[0099] Pressure sensor 1506 is used to sense pressure signals and can convert the pressure signals into electrical signals. In some embodiments, pressure sensor 1506 can be disposed on display screen 170. There are many types of pressure sensors 1506, such as resistive pressure sensors, inductive pressure sensors, and capacitive pressure sensors. A capacitive pressure sensor may include at least two parallel plates with conductive material. When force is applied to pressure sensor 1506, the capacitance between the electrodes changes. Electronic device 100 determines the pressure intensity based on the change in capacitance. When a touch operation is applied to display screen 170, electronic device 100 detects the intensity of the touch operation based on pressure sensor 1506. Electronic device 100 can also calculate the touch position based on the detection signal from pressure sensor 1506. In some embodiments, touch operations applied to the same touch position but with different touch operation intensities can correspond to different operation commands. For example: when a touch operation with an intensity less than a first pressure threshold is applied to the SMS application icon, a command to view an SMS is executed. When a touch operation with an intensity greater than or equal to the first pressure threshold is applied to the SMS application icon, a command to create a new SMS is executed.

[0100] Bone conduction sensor 1507 can acquire vibration signals. In some embodiments, bone conduction sensor 1507 can acquire vibration signals from vibrating bone segments in the human vocal cords. Bone conduction sensor 1507 can also contact the human pulse to receive blood pressure signals. In some embodiments, bone conduction sensor 1507 can also be incorporated into headphones to form bone conduction headphones. Audio module 160 can parse speech signals based on the vibration signals from vibrating bone segments in the vocal cords acquired by bone conduction sensor 1507 to achieve voice functionality. Application processor can parse heart rate information based on the blood pressure signals acquired by bone conduction sensor 1507 to achieve heart rate detection functionality.

[0101] The audio module 160 is used to convert digital audio information into analog audio signals for output, and also to convert analog audio input into digital audio signals. The audio module 160 can also be used for encoding and decoding audio signals. In some embodiments, the audio module 160 may be located in the processor 110, or some functional modules of the audio module 160 may be located in the processor 110.

[0102] The speaker 1601, also known as a "loudspeaker," is used to convert audio electrical signals into sound signals. The electronic device 100 can listen to music or make hands-free calls through the speaker 1601.

[0103] Microphone 1602, also known as a "microphone" or "voice transducer," is used to convert sound signals into electrical signals. When making a phone call or sending a voice message, the user can speak by bringing their mouth close to microphone 1602, inputting the sound signal into microphone 1602. Electronic device 100 may have at least one microphone 1602. In some embodiments, electronic device 100 may have two microphones 1602, which, in addition to collecting sound signals, can also perform noise reduction. In other embodiments, electronic device 100 may also have three, four, or more microphones 1602, which can collect sound signals, reduce noise, identify the sound source, and perform directional recording, etc.

[0104] Electronic device 100 implements display functions through a GPU, a display screen 170, and an application processor. The GPU is a microprocessor for image processing, connected to the display screen 170 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. Processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.

[0105] The display screen 170 is used to display images, videos, etc. The display screen 170 includes a display panel. The display panel may be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a miniature LED, a microLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include one or N displays 170, where N is a positive integer greater than 1.

[0106] The power switch 180 can be used to control the power supply to the electronic device 100.

[0107] Motor 190 can generate vibration alerts. Motor 190 can be used for incoming call vibration alerts or for touch vibration feedback. For example, different vibration feedback effects can be corresponding to touch operations applied to different applications (such as taking photos, playing audio, etc.). Motor 190 can also correspond to different vibration feedback effects for touch operations applied to different areas of the display screen 170. Different application scenarios (such as time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also be customized.

[0108] Buttons 1000 include a power button, volume buttons, etc. Buttons 1000 can be mechanical buttons or touch-sensitive buttons. Electronic device 1000 can receive button input and generate key signal inputs related to user settings and function control of electronic device 1000.

[0109] It is understood that the structures illustrated in the embodiments of the present invention do not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0110] Figure 2 This is a software structure block diagram of the electronic device 100 according to an embodiment of the present invention.

[0111] The software system of electronic device 100 can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. This embodiment of the invention uses the layered architecture Android system as an example to exemplify the software structure of electronic device 100.

[0112] A layered architecture divides software into several layers, each with a clear role and function. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom: the application layer, the application framework layer, the Android runtime and system libraries, and the kernel layer.

[0113] The application layer can include a series of application packages.

[0114] like Figure 2 As shown, the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, and SMS.

[0115] The application framework layer provides application programming interfaces (APIs) and a programming framework for applications in the application layer. The application framework layer includes some predefined functions.

[0116] like Figure 2 As shown, the application framework layer may include a window manager, content provider, view system, phone manager, resource manager, notification manager, etc.

[0117] The window manager is used to manage windowed applications. It can retrieve screen size, determine the presence of a status bar, lock the screen, and capture screenshots, among other things.

[0118] Content providers store and retrieve data, making that data accessible to applications. This data may include videos, images, audio, made and received phone calls, browsing history and bookmarks, phone books, etc.

[0119] A view system includes visual controls, such as controls for displaying text and controls for displaying images. View systems can be used to build applications. A display interface can consist of one or more views. For example, a display interface including a text notification icon could include views for displaying text and views for displaying images.

[0120] The phone manager is used to provide communication functions for electronic device 100. For example, it manages call status (including connection and disconnection).

[0121] The file explorer provides applications with various resources, such as localized strings, icons, images, layout files, video files, and more.

[0122] The notification manager allows applications to display notifications in the status bar. These notifications can be used to deliver informational messages and can disappear automatically after a short pause, requiring no user interaction. For example, the notification manager can be used to notify users of download completion or message alerts. The notification manager can also display notifications as icons or scrolling text in the top status bar, such as notifications from background applications, or as dialog boxes on the screen. Examples include displaying text messages in the status bar, emitting sounds, vibrating electronic devices, and flashing indicator lights.

[0123] The Android Runtime consists of core libraries and a virtual machine. The Android runtime is responsible for the scheduling and management of the Android system.

[0124] The core library consists of two parts: one part is the functionalities that need to be called by the Java language, and the other part is the Android core library.

[0125] The application layer and application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and application framework layer as binary files. The virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection.

[0126] System libraries can include multiple functional modules. For example: surface manager, media libraries, 3D graphics processing libraries (e.g., OpenGL ES), 2D graphics engines (e.g., SGL), etc.

[0127] The Surface Manager is used to manage the display subsystem and provides the blending of 2D and 3D layers for multiple applications.

[0128] The media library supports playback and recording of various common audio and video formats, as well as still image files. It supports multiple audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, and PNG.

[0129] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.

[0130] A 2D graphics engine is a graphics engine for 2D drawing.

[0131] The kernel layer is the layer between hardware and software. The kernel layer contains at least the display driver, camera driver, audio driver, and sensor driver.

[0132] The following describes in detail a breathing guidance method provided by the embodiments of this application, with reference to Embodiment 1 and Embodiment 2.

[0133] Example 1

[0134] Example 1 is a breathing guidance program for the field of sports.

[0135] Electronic device 100 can be a mobile phone, wearable device, headphones, smart glasses, augmented reality (AR) device, virtual reality (VR) device, etc. Wearable devices can be wrist-supported devices, such as smartwatches, smart bracelets, smart wristbands, etc. Wearable devices can also be ankle-supported devices, such as smart ankle bracelets, smart shoes, smart socks, or other devices worn on the legs. Wearable devices can also be head-supported devices, such as smart helmets, smart headbands (also known as smart headbands).

[0136] In the following embodiments, the electronic device 100 is described as a smart bracelet. The electronic device 100 can monitor user actions in real time. When the electronic device 100 detects the user performing a first action, it prompts the user to inhale via a first prompt. When the electronic device 100 detects the user performing a second action, it prompts the user to exhale via a second prompt. In this way, the user can control their breathing rhythm and exercise rhythm, matching them to improve exercise effectiveness.

[0137] Different types of exercise correspond to different user actions. Exercise types can be divided into exercises that combine fitness equipment and exercises that do not combine fitness equipment. Among them, exercises that combine fitness equipment can include, but are not limited to, running, swimming, etc. Exercises that combine fitness equipment can include, but are not limited to, rowing, rowing machine exercises, elliptical machine exercises, weightlifting, etc. Exercise types can also include other types of exercises, which are not limited in this embodiment of the application.

[0138] For exercises performed without the use of fitness equipment, the electronic device 100 collects motion sensor data and determines whether the user's movement is a first movement or a second movement based on the motion sensor data. After determining the user's movement, the electronic device 100 prompts the user to inhale through a first prompt and to exhale through a second prompt.

[0139] For exercises combined with fitness equipment, in one possible implementation, the fitness equipment (e.g., barbells, elliptical trainers, rowing machines, etc.) can replace the function of electronic device 100. That is, the fitness equipment collects motion sensor data and determines whether the user's movement is a first or second movement based on this data. After determining the user's movement, the fitness equipment prompts the user to inhale through a first prompt and to exhale through a second prompt.

[0140] In other possible implementations, the fitness equipment needs to establish a communication connection with the electronic device 100. The fitness equipment collects motion sensor data and determines whether the user's movement is a first movement or a second movement based on the motion sensor data. After the fitness equipment determines that the user's movement is the first movement, it sends instruction one to the electronic device 100. Upon receiving instruction one, the electronic device 100 prompts the user to inhale through a first prompt. After the fitness equipment determines that the user's movement is the second movement, it sends instruction two to the electronic device 100. Upon receiving instruction two, the electronic device 100 prompts the user to inhale through a second prompt.

[0141] In other possible implementations, the fitness equipment needs to establish a communication connection with the electronic device 100. The fitness equipment collects motion sensor data and sends this data to the electronic device 100 in real time. After receiving the motion sensor data, the electronic device 100 determines whether the user's action is a first action or a second action based on the data. Once the electronic device 100 determines the user's action, it prompts the user to inhale through a first prompt and to exhale through a second prompt.

[0142] The communication connection between the aforementioned fitness equipment and electronic device 100 can be wired or wireless. Wireless connections can include wireless local area network (WLAN), wireless fidelity (Wi-Fi), Bluetooth, infrared, near field communication (NFC), ZigBee, and other wireless communication technologies that emerge in future developments. The fitness equipment can also establish a long-distance connection with electronic device 100, including but not limited to long-distance connections based on 2G, 3G, 4G, 5G, and subsequent standard protocols on mobile networks. The fitness equipment and electronic device 100 can also log into the same user account (e.g., a Huawei account) and then establish a long-distance connection through a server.

[0143] Different types of sports require different user actions. For example, in running, the first action could be a forward arm swing, and the second action could be a backward arm swing. In swimming, the first action could be the arm movement when the user's head emerges from the water, and the second action could be the arm movement when the user's head submerges. In some embodiments, the first and second actions can also be leg movements; however, the following embodiments use hand movements as examples. The user actions corresponding to different sports will be described in detail in subsequent embodiments, and will not be repeated here.

[0144] Before the user starts exercising, the electronic device 100 needs to activate the corresponding exercise mode.

[0145] There are two ways for electronic device 100 to activate exercise mode. This embodiment of the application will illustrate this by taking the activation of running mode by electronic device 100 as an example.

[0146] Method 1:

[0147] In some embodiments, the electronic device 100 receives and responds to user input to activate running mode.

[0148] Figure 3A An example UI diagram of an electronic device 100 activating running mode is shown.

[0149] like Figure 3A As shown, when the electronic device 100 detects a long press operation on the touch control 301, the electronic device 100 can activate or deactivate the user-selected running mode. When the electronic device 100 has not activated the running mode, but detects a long press operation on the touch control 301, the electronic device 100 can activate the running mode after a vibration and a countdown of a certain time (e.g., three seconds). Once the running mode is activated, the electronic device 100 can display a running icon and the text "Running Mode" on the display screen. This serves as a notification to the user that the electronic device 100 has activated the running mode.

[0150] When the electronic device 100 has activated the running mode and detects a long press operation on the touch control 301, the electronic device 100 can end the running mode after a certain countdown time (e.g., three seconds) following the vibration.

[0151] In one possible implementation, after the electronic device 100 has been in running mode for a period of time (e.g., 1 minute or 2 minutes), the display screen can be automatically turned off, effectively saving power consumption. When a short press operation is detected on the touch control 301, the electronic device 100 can turn on the display screen. Once turned on, the display screen can show, for example... Figure 3A The icon for running and the text "Running Mode" are shown.

[0152] In other embodiments, after electronic device 100 establishes a communication connection with electronic device 200, electronic device 100 can also activate running mode by receiving a request from electronic device 200 to activate running mode.

[0153] like Figures 3B-3D An example UI diagram is shown where electronic device 100 activates running mode by sending a request to activate running mode via electronic device 200.

[0154] Electronic device 100 can establish a communication connection with electronic device 200 (such as a mobile phone, tablet computer, etc.). When a user operation to turn running mode on or off is detected, electronic device 200 can send a command to electronic device 100 to turn on running mode. When electronic device 100 receives the command to turn on running mode, electronic device 100 can turn on running mode.

[0155] like Figure 3BAs shown, electronic device 200 displays a main screen user interface 302. User interface 302 may include: a status bar 303, a tray 304 with icons of frequently used applications, and other application icons. The status bar 303 may include a time indicator, a battery status indicator, one or more signal strength indicators for wireless fidelity (Wi-Fi) signals, and one or more signal strength indicators for mobile communication signals (also known as cellular signals). The tray 304 with icons of frequently used applications may display: a camera icon, a phone icon, a contacts icon, and an SMS icon. Other application icons may include, for example: a clock icon, a calendar icon, a gallery icon, a memo icon, a Huawei Video icon, and a Health icon 305. Any application icon can be used to respond to a user action (e.g., a click action), causing electronic device 200 to launch the application corresponding to the icon. The Health icon 305 can be used to launch the Health application. The Health application can be used by electronic device 200 to establish a communication connection with electronic device 100. Electronic device 200 can display the user's exercise data to the user through the Health application.

[0156] Electronic device 200 receives and responds to user actions (e.g., clicks) on the fitness and health icon 305, and electronic device 200 can display, for example... Figure 3C The sports and health application interface 306 is shown.

[0157] like Figure 3C As shown, the application interface 306 may include a status bar 303 and interface viewing options 307. The interface viewing options 307 may include motion options, device options, discovery options, and a "My" option. Any option can be used to respond to a user action (e.g., a click), causing the electronic device 200 to display the corresponding content on the application interface 306. For example, the content corresponding to the device option may include information about devices already added to the electronic device and controls for adding new devices. When the electronic device 200 detects a user action (e.g., a click) applied to a device option, the electronic device 200 may display an "Added Device" option 308 and a "Device Added" option 309.

[0158] The device addition option 309 can be used to trigger the electronic device 200 to add a new device. This new device is the device with which the electronic device 200 establishes a communication connection for the first time. When the electronic device 200 detects a user operation (e.g., a click) on the device addition option 309, it can display an add device settings interface, allowing the electronic device 200 to establish a communication connection with the new device. This add device settings interface allows the user to search for new devices and specify the method of establishing a communication connection, such as Bluetooth connection. This embodiment does not limit the process by which the electronic device 200 establishes a communication connection with a new device.

[0159] The added device option 308 may contain identifiers for multiple electronic devices. All of these electronic devices have established a communication connection with electronic device 200. For example, electronic device 200 has established a communication connection with electronic device 100. When a user action (e.g., a click) is detected on any device option in the added device option 308, the electronic device can display relevant information corresponding to that device.

[0160] When electronic device 200 detects a user action (e.g., a click) applied to the identifier of electronic device 100 in the added device option 308, electronic device 200 can display as follows: Figure 3D The application interface shown is 310.

[0161] like Figure 3D As shown, the application interface 310 may include a status bar 303, a device status bar 311, motion data 312, and motion mode options 313. The device status bar 311 can be used to display the connection status between electronic device 100 and electronic device 200, as well as the battery level of electronic device 100. For example, when it is detected that electronic device 200 has established a communication connection with electronic device 100 via Bluetooth, the device status bar 311 can indicate that the connection method is Bluetooth and the connection status is "connected". Furthermore, electronic device 200 can obtain the battery information of electronic device 100. The device status bar 311 can indicate the current battery level of electronic device 100 (e.g., 77%). The content displayed by the device status bar 311 may also include more information, which is not limited in this embodiment. The motion data 312 may include the number of steps taken by the user, the calories burned, and the distance traveled, as recorded by electronic device 100. The data in motion data 312 is the user's data for a day recorded by electronic device 100 in working state (e.g., including the total number of steps taken, calories burned and distance traveled during daily activities such as walking and running).

[0162] The exercise mode option 313 can be used to turn running mode, swimming mode, and weightlifting mode on or off. Exercise mode option 313 may also include other modes, such as elliptical machine exercise mode, rowing machine exercise mode, rowing mode, etc., which are not shown in exercise mode option 313. Exercise mode option 313 may include a running mode icon 3131 and a control 3132 for turning on running mode, a swimming mode icon and a control for swimming mode, and a weightlifting mode icon and a control for turning on weightlifting mode. In response to a user operation (e.g., a click) on the control 3132 for turning on running mode, electronic device 200 can send a command to electronic device 100 to turn on running mode. Upon receiving the command from electronic device 200 to turn on running mode, electronic device 100 can turn on running mode after a certain time following vibration (e.g., a 3-second countdown). When running mode is turned on, electronic device 100 can display a running icon and the text "Running Mode" on the display screen. This indicates to the user that running mode has been turned on by electronic device 100.

[0163] When the electronic device 100 receives a command from the electronic device 200 to end the running mode, the electronic device 100 can end the running mode after a certain period of time (e.g., a 3-second countdown) following the vibration.

[0164] Additionally, when running mode is activated, electronic device 100 can automatically activate Do Not Disturb mode. For example, when Do Not Disturb mode is activated, if electronic device 200 receives an incoming call or message notification, electronic device 100 can block the notification instructions sent by the electronic device. That is, electronic device 100 will not alert the user to incoming calls or messages through vibration or ringing. Thus, when electronic device 100 is in running mode and there is an incoming call or message notification, electronic device 100 will not interfere with the user's running.

[0165] Method 2: Electronic device 100 automatically starts running mode based on the data collected by the sensor.

[0166] When the electronic device 100 has not activated the running mode but detects that the user is running, the electronic device 100 can automatically activate the running mode. The electronic device 100 determines that the user is running by having a motion sensor collect motion data, such as an accelerometer collecting acceleration data. The electronic device 100 then obtains an acceleration waveform feature map based on the acceleration data. The electronic device 100 inputs the acceleration waveform feature map into a classification model. The classification model is pre-trained and can analyze the input motion data to determine the user's type of movement (e.g., running, swimming). If the classification model determines that the user is running based on the acceleration waveform feature map, the electronic device 100 can confirm that the user is running.

[0167] In some other embodiments, the electronic device 100 may also directly input the acceleration data collected by the accelerometer into the classification model, and the classification model may directly output whether the user is running or doing other sports.

[0168] The electronic device 100 can also determine that the user is running in other ways, but this application embodiment does not limit this.

[0169] In some embodiments, when the electronic device 100 has other sports modes enabled, such as weightlifting mode, but detects that the user is running, the electronic device 100 can automatically switch the other sports modes to running mode.

[0170] In some embodiments, when the electronic device 100 activates the running mode and detects that the user is not running, the electronic device 100 can automatically end the running mode.

[0171] In this way, if a user forgets to turn on running mode while running, or selects the wrong exercise mode, the electronic device 100 can adaptively turn on running mode. Furthermore, if a user forgets to turn off running mode after turning it on, the electronic device 100 can adaptively turn off running mode, thereby reducing the power consumption of the electronic device 100.

[0172] In some cases, after the electronic device 100 adaptively activates the running mode, it can also receive user input to deactivate the running mode. Preventing the electronic device 100 from accidentally activating the running mode increases the power consumption of the device.

[0173] For example, if a user wears electronic device 100 on their wrist and jogs a few steps to cross the street quickly within a certain time limit, electronic device 100 might mistakenly interpret this as running and switch the user's exercise mode from walking mode to running mode. To prevent electronic device 100 from accidentally switching exercise modes, the undo control displayed on the screen of electronic device 100 can accept user input, causing electronic device 100 to switch the exercise mode back to the previous exercise mode.

[0174] like Figure 3E As shown, the electronic device 100 had previously activated walking mode, but mistakenly switched to running mode. The electronic device 100 displays the text "Running mode activated" and control 314 on its screen. The electronic device 100 can receive user input to control 314, and in response to the user's input, it switches back to walking mode.

[0175] The electronic device 100 may switch the motion mode back to the previous motion mode by receiving user input. Alternatively, the electronic device 100 may recognize the user's voice output and switch the motion mode back to the previous motion mode.

[0176] In addition to activating the running mode by monitoring user operations on the touch control 301 and by receiving commands sent by the electronic device 200, as well as adaptively activating the running mode, the electronic device 100 can also activate the running mode in other ways, such as by using motion-sensing gestures. This application does not limit the scope of the methods described herein.

[0177] In some embodiments, the electronic device 100 may detect whether the motion sensor is in operation before activating the motion mode.

[0178] For example, electronic device 100 can detect whether the accelerometer is working before activating running mode.

[0179] Figure 4 The UI diagram shows the motion sensor of the electronic device 100 when running mode is activated.

[0180] When a user action used to activate running mode is detected (e.g., an action performed on...), Figure 3A (A long press operation of the touch control 301 on the device), the electronic device 100 can display on the screen as follows: Figure 4 The user interface shown may include a prompt box 401, a confirmation control 402, and a cancellation control 403. Wherein:

[0181] The prompt box 401 includes a prompt message indicating that when running mode is activated, the motion sensor (such as an accelerometer) in the electronic device 100 will be activated to determine whether the user needs to activate running mode. The prompt message may include: "This function requires the accelerometer to be activated. Do you agree to activate it?"

[0182] The confirmation control 402 can be used to activate the running mode. In response to a user action (e.g., a click) on the confirmation control 402, the electronic device 100 can detect whether a motion sensor (such as an accelerometer) is active. If the motion sensor (such as an accelerometer) is not active, the electronic device 100 can automatically activate it. In this way, the electronic device 100 can activate the running mode and vibrate for a period of time (e.g., three seconds) to notify the user that the running mode has been activated.

[0183] Cancel control 403 can be used to disable the motion sensor in running mode. In response to a user action (e.g., a click) on cancel control 403, electronic device 100 disables the motion sensor in running mode.

[0184] It should be noted that the operation of the motion sensor when the electronic device 100 activates other sports modes is similar to the operation of the motion sensor when the electronic device 100 activates the running mode, as described above. The difference lies in the type of motion sensor involved in different sports. The types of motion sensors involved in different sports will be described one by one in subsequent embodiments, and will not be repeated in this embodiment.

[0185] After the electronic device 100 activates the user-selected exercise mode, it will monitor the user's movements in real time and provide breathing guidance based on the user's movements during exercise, so that the user's movements match the breathing rhythm.

[0186] Currently, exercise can be divided into exercise using fitness equipment and exercise without fitness equipment. Exercise using fitness equipment includes, but is not limited to, running and swimming. Exercise using fitness equipment also includes, but is not limited to, rowing, rowing machine exercises, elliptical machine exercises, weightlifting, etc.

[0187] The following sections provide detailed explanations of the breathing guidance protocols used in exercises that incorporate fitness equipment and those that do not.

[0188] I. Breathing guidance program during exercise without the use of fitness equipment

[0189] As the analysis above shows, exercises that do not involve fitness equipment can include, but are not limited to, running, swimming, etc.

[0190] 1. Breathing guidance during running

[0191] Figures 5A-5O An example is shown, illustrating the UI diagram involved in a breathing guidance scheme during running.

[0192] Figures 5A-5B An illustrative diagram shows the movement postures corresponding to the first and second movements during running.

[0193] The first action could be... Figure 5A The arm movement shown becomes Figure 5B The image shows the user's arm movement during the arm movement. Alternatively, the first movement can be described as the arm movement of the user wearing the electronic device 100 as they swing their arm forward.

[0194] The second action can be... Figure 5BThe arm movement shown becomes Figure 5A The image shows the user's arm movement during the arm movement. Alternatively, the first movement can be described as the arm movement of the user wearing the electronic device 100 swinging backward.

[0195] Optionally, the first action can also be the arm movement of a user wearing electronic device 100 swinging their arm backward, and the second action can also be the arm movement of a user wearing electronic device 100 swinging their arm forward.

[0196] Optionally, before the electronic device 100 begins detecting the user's movements, it can prompt the user via voice and / or text messages to indicate whether breathing guidance is needed. This allows the electronic device 100 to consult the user before starting to monitor their movements, respecting the user's wishes. In some embodiments, if the user selects running mode, the electronic device 100 will directly begin monitoring the user's movements after the user starts exercising, without needing to ask for the user's opinion.

[0197] In one possible implementation, the user selects running mode. Before the electronic device 100 begins detecting the user's movements, it plays a voice prompt: "Exercise is about to begin. Do you need breathing guidance?" When the user replies "yes," the electronic device 100 receives and responds to the user's voice response. After the user begins exercising, it monitors the user's movements and provides breathing guidance based on those movements. When the user replies "no," the electronic device 100 receives and responds to the user's voice response, but it does not provide breathing guidance during the user's exercise.

[0198] In some embodiments, users typically wear headphones while running. After the electronic device 100 is paired with the headphones, the user can play music stored on the electronic device 100 through the headphones to enhance the enjoyment of the run. The electronic device 100 can also play a voice prompt through the headphones saying, "Exercise is about to begin. Do you need breathing guidance?"

[0199] In other possible implementations, the user selected the running mode. Before the electronic device 100 begins detecting the user's movements, the electronic device 100 can display text information on its screen to prompt the user whether breathing guidance is needed.

[0200] Figure 5C An example UI diagram showing a text prompt displayed on an electronic device 100 is provided.

[0201] Electronic device 100 can display on the screen such as Figure 5CThe user interface shown may include a prompt box 501, a confirmation control 502, and a cancel control 503. Wherein:

[0202] The prompt box 501 includes a prompt message indicating that when running mode is activated, the electronic device 100 will enable the breathing guidance function. The text message may include "Do you need breathing guidance?".

[0203] The confirmation control 502 can be used to activate the breathing guidance function. In response to a user action (such as a click) on the confirmation control 502, the electronic device 100 can activate the breathing guidance function.

[0204] Cancel control 503 can be used to disable the breathing guidance function. In response to a user action (such as a click) on cancel control 503, electronic device 100 disables the breathing guidance function.

[0205] In other possible implementations, the electronic device 100 may combine the aforementioned voice and text information to prompt the user whether breathing guidance is needed. The electronic device 100 may also prompt the user whether breathing guidance is needed through other means, such as vibration. This application embodiment does not limit the method by which the electronic device 100 activates the breathing guidance function.

[0206] Optionally, after the breathing guidance function is enabled on the electronic device 100, the electronic device 100 can display images and text information on the display screen, which are used to prompt the user for the breathing actions corresponding to different running movements.

[0207] Figures 5D-5F An example output shows the UI diagram of an electronic device 100 displaying images and text information.

[0208] Before the user starts running, the electronic device 100 can display an image on the screen to indicate the breathing movements corresponding to different arm swing movements during the run.

[0209] like Figure 5D An example is shown of a user interface on an electronic device 100 that displays an image of an arm swinging motion corresponding to an inhalation motion. Figure 5D In the scenario where a user carrying electronic device 100 swings their arm (e.g., right arm) forward, their breathing action is inhalation. This can be understood as the user being in a force-exerting phase when their arm (e.g., right arm) swings forward; this requires muscle tension, and inhalation provides some support to the body. Figure 5EDuring the exercise, when the user carrying the electronic device 100 swings their arm (e.g., right arm) backward, the user is in a stress-relieving phase. During this stress-relieving phase, the muscles relax, reducing the user's burden. In this way, guiding the user to breathe correctly can provide the muscles with sufficient oxygen and energy, conserve the user's physical energy, help the user complete the exercise correctly and scientifically, and enhance the exercise effect.

[0210] Electronic device 100 can also display on the screen such as Figure 5F The user interface shown may include a prompt box 601. Wherein:

[0211] The prompt box 601 includes text information that indicates the breathing movements corresponding to different prompting methods. The text information may include phrases like "long vibration for inhalation, short vibration for exhalation." This allows users to perform corresponding breathing movements based on different vibration frequencies during running.

[0212] Optionally, after the breathing guidance function is enabled on the electronic device 100, the electronic device 100 can read the text information in the prompt box 601 by voice.

[0213] Optionally, after the breathing guidance function is enabled on the electronic device 100, the electronic device 100 can read the text information in the prompt box 601 by voice and display the text information in the prompt box 601 on the display screen.

[0214] Optionally, in addition to displaying images and text information on the screen to prompt the user for the breathing actions corresponding to different arm swinging movements, the electronic device 100 can also display images and text information on other devices (such as the electronic device 200) that are connected to the electronic device 100 to prompt the user for the breathing actions corresponding to different arm swinging movements.

[0215] After the electronic device 100 activates the breathing guidance function, it needs to monitor the user's movements (first and second movements) during the running process and provide specific breathing guidance plans based on the user's movements.

[0216] Next, we will explain how the electronic device 100 determines whether a user's arm movement is the first or second action based on motion data collected by the motion sensor.

[0217] Figure 5G-Figure 5I An exemplary diagram illustrates how an electronic device 100 determines whether a user's arm movement posture is a first action or a second action based on acceleration data.

[0218] In one possible implementation, the electronic device 100 can determine whether the user is performing a first action or a second action based on the acceleration data collected by the accelerometer.

[0219] The accelerometer in the electronic device 100 can collect acceleration data from the user's wrist and determine the user's arm movements based on this data. The electronic device 100 collects acceleration data in the X, Y, and Z axes. Based on this acceleration data, the electronic device 100 obtains total acceleration data and determines whether the user is performing a first or second action based on the magnitude of the total acceleration.

[0220] As mentioned above, the first action is the user's arm swinging forward, and the second action is the user's arm swinging backward.

[0221] Figure 5G An exemplary diagram illustrates the magnitude and direction of acceleration collected by electronic device 100 when a user's arm swings forward.

[0222] exist Figure 5G The example shows the magnitude and direction of the acceleration data in the X, Y, and Z axes.

[0223] Through geometric calculations, we can obtain the acceleration data P1 of the X-axis and Y-axis components. Then, through further geometric calculations, we can obtain the sum of acceleration data P1 and the Z-axis component, a1. This sum of acceleration data a1 represents the acceleration data in the X, Y, and Z axes.

[0224] Figure 5H An exemplary diagram illustrates the magnitude and direction of acceleration collected by the electronic device 100 when a user's arm swings backward.

[0225] exist Figure 5H The example illustrates the magnitude and direction of acceleration data along the X, Y, and Z axes. Through geometric operations, the acceleration data P2 for the X-axis and Y-axis components can be obtained. Then, through set operations, the sum of acceleration data P2 and the Z-axis component acceleration data a2 can be obtained. This sum of acceleration data a2 represents the sum of acceleration data along the X, Y, and Z axes.

[0226] In the following embodiments of this application, when a user's arm swings forward from a stationary state, the values ​​of acceleration and velocity gradually increase from zero to a maximum value. During the forward swing to the highest point, the acceleration and velocity values ​​gradually decrease from the maximum value to a positive minimum (e.g., 0.3). After the user's arm reaches the highest point, when the arm swings backward from the highest point, the acceleration and velocity values ​​gradually decrease from a positive minimum (e.g., 0.3) to a minimum value. During the backward swing to the highest point, the acceleration and velocity values ​​gradually increase from the minimum value to a negative maximum value (e.g., -0.2). Here, both acceleration and velocity are vector units. That is, acceleration and velocity represent not only the magnitude but also the direction of acceleration and velocity. As the foregoing analysis shows, when acceleration and velocity are greater than 0, it indicates that the user's arm is swinging forward. When acceleration and velocity are less than 0, it indicates that the user's arm is swinging backward. Thus, the electronic device 100 can determine whether the user's arm movement is a first or second movement by the sign of the acceleration and velocity data.

[0227] Figure 5I An exemplary diagram illustrates the acceleration collected by electronic device 100 during a user's running.

[0228] exist Figure 5I In the graph, the horizontal axis represents time, and the vertical axis represents the magnitude of acceleration. Figure 5F In the above calculation, when the sum of the acceleration and the periodic acceleration are greater than 0, it indicates that the user's arm is swinging forward; when the sum of the acceleration and the periodic acceleration are less than 0, it indicates that the user's arm is swinging backward. Because the user's arm swings back and forth periodically during running, the sum of the acceleration and the periodic acceleration collected by the electronic device 100 also change periodically, fluctuating between positive and negative values. For example, Figure 5G The acceleration data a1 shown can be Figure 5I The acceleration data a1 shown at time t1. Figure 5H The acceleration data a2 shown can be Figure 5I The acceleration data a2 shown at time t2.

[0229] In another possible implementation, the electronic device 100 can obtain the motion trajectory of the user's arm based on acceleration data, compare the motion trajectory with a template, and determine whether the user's arm movement is a first movement or a second movement. The electronic device 100 can also determine whether the user's arm movement is a first movement or a second movement using other methods, which are not limited to the embodiments described in this application.

[0230] During a user's run, when the electronic device 100 detects that the user's arm is swinging forward, it prompts the user to inhale using a first prompt. When the electronic device 100 detects that the user's arm is swinging backward, it prompts the user to exhale using a second prompt. In this way, the electronic device 100 can use different prompts to match the user's arm swing with their breathing rhythm during running, conserving the user's energy and improving their athletic performance.

[0231] The specific implementation methods of the first and second prompting methods have been described in detail in the foregoing embodiments, and will not be repeated here in the embodiments of this application.

[0232] Optionally, when both the first and second prompt types are text-based, when the electronic device outputs the first prompt, it can display the text "Inhale" on the screen, and the size, color, and shape of the text displayed on the screen can gradually change as the user inhales (e.g., the font gradually increases). When the electronic device outputs the second prompt, it can display the text "Exhale" on the screen, and the size, color, and shape of the text displayed on the screen can gradually change as the user exhales (e.g., the font gradually decreases). Figure 5J-Figure 5L As shown, when the electronic device 100 detects the user's first action and prompts the user to inhale, the font size of the text "Inhale" displayed on the screen of the electronic device 100 gradually increases. Figure 5M-Figure 5O As shown, when the electronic device 100 detects that the user is performing a second action and prompts the user to exhale, the font size of the text "exhale" displayed on the screen of the electronic device 100 gradually decreases.

[0233] When electronic device 100 guides the user's breathing based on the user's arm swing during running, it can continuously monitor n instances of the first movement and then prompt the user to inhale once via a first prompt. After continuously monitoring m instances of the second movement, it prompts the user to exhale once via a second prompt. Here, n and m are both positive integers greater than or equal to 1. For example, when n is 1 and n=2, it can be understood as "one inhale per step, one exhale per two steps," meaning that electronic device 100 prompts the user to inhale once for each first movement and prompts the user to exhale once for every two consecutive second movements. It is understandable that the breathing guidance provided by electronic device 100 based on the detected arm swing will vary depending on the running mode. The breathing rate during jogging is lower than that during sprinting. Electronic device 100 can provide users with different breathing guidance according to different running modes, which demonstrates the flexibility of electronic device 100's breathing guidance.

[0234] 2. Breathing guidance during swimming

[0235] Swimming styles can be categorized into breaststroke, freestyle, backstroke, and butterfly, among others. The movements required for each style differ. Therefore, the electronic device 100 can provide different breathing guidance based on the swimming style and the user's arm movements.

[0236] The following sections will explain the correspondence between the user's arm movements and the first and second movements in breaststroke, freestyle, backstroke, and butterfly stroke.

[0237] (1) Breaststroke

[0238] Figure 6A and Figure 6B An illustrative diagram of the first and second movements in the breaststroke is shown.

[0239] The first action could be... Figure 6A The arm movement shown becomes Figure 6B The image shows the user's arm stroke posture during the arm movement. Alternatively, the first movement can be described as the arm movement of the user wearing electronic device 100 as they stroke backward. When the user's arm strokes backward, their head can extend above the water surface, allowing them to inhale.

[0240] It should be noted that in breaststroke, after completing the first movement, the user will pause for a period of time (e.g., 2 seconds), ceasing the arm and leg strokes, which is about to end. Figure 6BThe posture shown is held for 2 seconds to conserve energy. That is, the user can only inhale after their head is above the water, following the completion of the first movement.

[0241] The second action can be... Figure 6B The arm movement shown becomes Figure 6A The image shows the user's arm stroke posture during the arm movement. Alternatively, the second movement can be described as the arm movement corresponding to the user's forward arm stroke when wearing electronic device 100. Correspondingly, when the user's arm strokes forward, the user's head can submerge in the water, at which point the user can exhale.

[0242] It should be noted that during swimming, after completing the second movement, the user will remain still for a period of time (e.g., 3 seconds), ceasing arm and leg strokes, which is... Figure 6A The posture shown is held for 3 seconds. This conserves energy. In one possible implementation, the user can exhale after completing the second movement. In another possible implementation, the user can exhale at the beginning of the second movement.

[0243] The third action can be defined as the moment when the user's arm remains still after completing the first action and before starting the second action. The arm movement corresponding to the third action is static.

[0244] When the user is still, that is, when the electronic device 100 detects that the user is performing a third action, the electronic device 100 can prompt the user to perform a breath-holding action, or prompt the user to perform one or more rapid sets of exhalation and inhalation actions, through a third prompt method. The type of third prompt method can be any one or more of vibration, voice, text, and images.

[0245] (2) Freestyle

[0246] Figure 7A and Figure 7B An illustrative diagram of the first and second movements in freestyle swimming is shown.

[0247] The first action could be... Figure 7A The arm movement shown becomes Figure 6B The image shows the user's arm stroke posture during the arm movement. Alternatively, the first movement can be described as the arm movement corresponding to the user's arm stroking upwards while wearing electronic device 100. Correspondingly, the user's head can extend above the water surface during this upward arm stroke, allowing the user to inhale.

[0248] It should be noted that in freestyle swimming, after completing the first stroke, the user will pause for a period of time (e.g., 2 seconds), ceasing the arm and leg strokes, which is about to end. Figure 7BThe posture shown is held for 2 seconds to conserve energy. That is, the user can only inhale after their head is above the water, following the completion of the first movement.

[0249] The second action can be... Figure 7B The arm movement shown becomes Figure 7A The image shows the user's arm stroke during the arm movement. Alternatively, the second movement can be described as the arm movement of a user wearing electronic device 100 as they stroke downwards. Correspondingly, as the user's arm strokes downwards, their head can submerge in the water, allowing them to inhale.

[0250] It should be noted that in freestyle swimming, after completing the second stroke, the user will pause for a period of time (e.g., 3 seconds), ceasing the arm and leg strokes, which is about to... Figure 7A Holding the posture shown in Example 3 for 3 seconds conserves energy. In one possible implementation, the user can exhale after completing the second action. In another possible implementation, the user can exhale at the beginning of the second action.

[0251] The third action can be defined as the moment when the user's arm remains still after completing the first action and before starting the second action. The arm movement corresponding to the third action is static.

[0252] When the user is still, that is, when the electronic device 100 detects that the user is performing a third action, the electronic device 100 can prompt the user to perform a breath-holding action, or prompt the user to perform one or more rapid sets of exhalation and inhalation actions, through a third prompt method. The type of third prompt method can be any one or more of vibration, voice, text, and images.

[0253] (3) Backstroke

[0254] Figure 8A and Figure 8B An illustrative diagram of the first and second movements in backstroke is shown.

[0255] The first action could be... Figure 8A The arm movement shown becomes Figure 8B The image shows the user's arm stroke posture during the arm movement. Alternatively, the first movement can be described as the arm motion corresponding to the user's arm stroking upwards while wearing electronic device 100. The user inhales while their arm is stroking upwards.

[0256] It should be noted that in backstroke, after completing the first movement, the user will remain still for a period of time (e.g., 2 seconds), ceasing the arm and leg strokes, which is about to end. Figure 8BThe posture shown is held for 2 seconds to conserve energy. In backstroke, the user's head remains above water. In one possible implementation, the user inhales after completing the first movement. In another possible implementation, the user may inhale at the very beginning of the first movement. The second movement can be... Figure 8B The arm movement shown becomes Figure 8A The image shows the user's arm stroke posture during the arm movement. Alternatively, the second movement can be described as the arm movement corresponding to the downward stroke of the user's arm while wearing electronic device 100. The user can inhale while their arm is stroking downwards.

[0257] Optionally, the first action can also be performed by Figure 8B The arm movement shown becomes Figure 8A During the arm movement shown, the user's arm stroke posture, the second movement can also be... Figure 8A The arm movement shown becomes Figure 8B The illustrated arm movement depicts the user's arm paddling motion. This embodiment is not limited to any particular aspect.

[0258] It should be noted that in backstroke, after completing the second movement, the user will pause for a period of time (e.g., 3 seconds), ceasing the arm and leg strokes, which is about to... Figure 8A The posture shown is held for 3 seconds to conserve energy. In backstroke, the user's head remains above water. In one possible implementation, the user inhales after completing the second movement. In another possible implementation, the user may inhale at the beginning of the second movement.

[0259] The third action can be defined as the moment when the user's arm remains still after completing the first action and before starting the second action. The arm movement corresponding to the third action is static.

[0260] When the user is still, that is, when the electronic device 100 detects that the user is performing a third action, the electronic device 100 can prompt the user to perform a breath-holding action, or prompt the user to perform one or more rapid sets of exhalation and inhalation actions, through a third prompt method. The type of third prompt method can be any one or more of vibration, voice, text, and images.

[0261] (4) Butterfly stroke

[0262] Figure 9A and Figure 9B An illustrative diagram of the first and second movements in butterfly stroke is shown.

[0263] The first action could be... Figure 9A The arm movement shown becomes Figure 9B The image shows the user's arm stroke posture during the arm movement. Alternatively, the first movement can be described as the downward arm stroke of the user wearing electronic device 100. The user inhales as their arm strokes downwards.

[0264] It should be noted that in butterfly stroke, after completing the first movement, the user will remain still for a period of time (e.g., 2 seconds), ceasing the arm and leg strokes, which is about to end. Figure 9B The posture shown is held for 2 seconds to conserve energy. That is, the user can only inhale after their head is above the water, following the completion of the first movement.

[0265] The second action can be... Figure 9B The arm movement shown becomes Figure 9A The image shows the user's arm stroke during the arm movement. Alternatively, the second movement can be described as the arm stroke corresponding to the upward stroke of the user wearing electronic device 100. The user inhales while their arm is stroking upwards. It should be noted that in butterfly stroke, after completing the second movement, the user will pause for a period of time (e.g., 3 seconds), ceasing the arm and leg strokes. Figure 9A The posture shown is held for 3 seconds, thus conserving energy. In one possible implementation, the user can exhale after completing the second movement. In another possible implementation, the user can also exhale at the beginning of the second movement.

[0266] The third action can be defined as the moment when the user's arm remains still after completing the first action and before starting the second action. The arm movement corresponding to the third action is static.

[0267] When the user is still, that is, when the electronic device 100 detects that the user is performing a third action, the electronic device 100 can prompt the user to perform a breath-holding action, or prompt the user to perform one or more rapid sets of exhalation and inhalation actions, through a third prompt method. The type of third prompt method can be any one or more of vibration, voice, text, and images.

[0268] Optionally, before the electronic device 100 begins detecting the user's movements, it can prompt the user via voice and / or text messages whether breathing guidance is needed. This allows the electronic device 100 to consult the user before monitoring their movements, respecting the user's wishes. In some embodiments, if the user selects swimming mode, the electronic device 100 will directly begin monitoring the user's movements after they start exercising, without needing to ask for the user's opinion. The description of how breathing guidance is activated in swimming mode can be referenced to the description of how breathing guidance is activated in running mode. The principle is similar, only the exercise mode is different, and will not be repeated here.

[0269] Optionally, after the breathing guidance function is activated on the electronic device 100, the electronic device 100 can display images and text information on the screen. These images and text information are used to prompt the user about the breathing movements corresponding to different swimming strokes. Here, the method by which the electronic device 100 prompts the user about the breathing movements corresponding to different swimming strokes can be referenced to how the electronic device 100 prompts the user about the breathing movements corresponding to different running strokes in running mode. The principle is similar, only the exercise mode is different, and this embodiment will not be described in detail here.

[0270] In one possible implementation, the electronic device 100 can determine whether the user's arm movement is a first movement or a second movement based on acceleration data collected by a motion sensor (e.g., an accelerometer).

[0271] In other possible implementations, the electronic device 100 can obtain a motion trajectory diagram of the user's arm based on acceleration data collected by a motion sensor (e.g., an accelerometer), compare the motion trajectory diagram of the user's arm with a template, and determine whether the user's arm movement is a first movement or a second movement. This application does not limit the scope of the embodiments described herein.

[0272] After the electronic device 100 activates the breathing guidance function, it needs to monitor the user's movements during swimming (first and second movements) and provide specific breathing guidance based on these movements. Unlike running, in swimming, after the user's arm strokes bring their head above water, they inhale, typically for a period of time (e.g., 2 seconds). Then, after the user's arm strokes bring their head back into the water, they exhale, also typically for a period of time (e.g., 2 seconds). This process is then repeated. Therefore, it can be understood that when the electronic device 100 detects the user performing the first movement, and the user's head emerges from the water after completing the first movement, the electronic device 100 prompts the user to inhale using the first prompt method. When the electronic device 100 detects the user just beginning the second movement, it prompts the user to exhale using the second prompt method; or, when the electronic device 100 detects the user performing the second movement, and the user completes the second movement, it prompts the user to exhale using the second prompt method.

[0273] The above Figure 6A and Figure 6B , Figure 7A and Figure 7B , Figure 8A and Figure 8B , Figure 9A and Figure 9B The examples used here all illustrate electronic device 100 as a smart bracelet, which collects arm movement data. In other embodiments, users typically do not wear smart bracelets while swimming. In this case, electronic device 100 can be any of the following: smart goggles, smart earbuds, headphones, or a smart swimming cap. These devices can collect head movement data and determine the type of user's movement based on that data.

[0274] Optionally, when the electronic device 100 is any one of smart swimming goggles, smart earbuds, headphones, or a smart swimming cap: When the user's head emerges from the water, the electronic device 100 determines that the user is performing a first action; when the user's head re-enters the water, the electronic device 100 determines that the user is performing a second action. Since the pressure inside the water is greater than the pressure outside, the electronic device 100 can collect pressure sensor data and determine whether the user is performing the first or second action based on this data. Specifically, when the electronic device 100 detects a sudden increase in pressure sensor data, it determines that the user is performing the first action, i.e., the user's head emerges from the water. When the electronic device 100 detects a sudden decrease in pressure sensor data, it determines that the user is performing the second action, i.e., the user's head re-enters the water.

[0275] Optionally, during exercise, the electronic device 100 can simultaneously monitor the user's breathing rate and cadence to determine if they are consistent. If they are inconsistent, the electronic device 100 will provide adjustment suggestions. Specifically, the electronic device 100 can collect the user's breathing rate through its built-in microphone, or it can connect to headphones and allow the user to listen to music while exercising. The electronic device 100 can also collect the user's breathing rate through the microphone on the headphones connected to it. The electronic device 100 can record the exercise status through fitness software (such as a fitness and health application), which includes, but is not limited to, the exercise trajectory, stride length, and cadence. When the electronic device 100 detects a mismatch between the user's breathing rate and cadence, it can prompt the user to adjust their breathing rate or cadence through voice, text, vibration, or other means.

[0276] Optionally, when the electronic device 100 guides the user's breathing based on the user's arm or head movements during swimming, the electronic device 100 can continuously monitor n first movements and then prompt the user to inhale once via a first prompt. After continuously monitoring m second movements, the electronic device 100 can prompt the user to exhale once via a second prompt, where n and m are positive integers greater than or equal to 1. For example, m can be 1 and n can be 1, i.e., "one arm stroke, one inhale". The electronic device 100 prompts the user to inhale once for each first movement and exhale once for each second movement. It's understandable that the breathing guidance provided by the electronic device 100 based on the detected arm or head movements will differ in different swimming modes. That is, the breathing frequency differs in breaststroke, backstroke, freestyle, and butterfly. The electronic device 100 can provide different breathing guidance according to different swimming modes, demonstrating the flexibility of its breathing guidance.

[0277] In this way, the electronic device 100 can use different prompts to match the user's arm swing movements with the rhythm of breathing during swimming, saving the user's energy and improving the user's swimming ability.

[0278] II. Breathing Guidance Program During Exercise Using Fitness Equipment

[0279] As mentioned above, exercises that combine fitness equipment can include, but are not limited to, weightlifting, rowing, rowing machine exercises, elliptical machine exercises, etc.

[0280] When a user is exercising with fitness equipment, they inhale when performing the first movement and exhale when performing the second movement. The electronic device 100 can detect when the user inhales during the first movement and exhale during the second movement. This matches the user's exercise rhythm with their breathing rhythm, improving their exercise performance.

[0281] The following sections will explain the movement postures corresponding to the user's movement types in weightlifting, rowing, rowing machine exercise, and elliptical machine exercise.

[0282] 1. The user's movement posture corresponding to the first and second movements during weightlifting.

[0283] Weightlifting can be divided into standing weightlifting, lying weightlifting, etc. The following embodiments of this application use lying weightlifting as an example for illustration.

[0284] In some embodiments, the first action and the second action may be the user's arm movements collected by the electronic device 100.

[0285] like Figure 10A As shown, Figure 10A An illustrative diagram of the first movement in a weightlifting process is shown.

[0286] During the barbell press, the user's wrists move perpendicularly to the ground from the lowest point to the highest point, changing the barbell's posture from posture 1001 to posture 1002. Posture 1002 is represented by solid lines, and posture 1001 by dashed lines. The first movement could be... Figure 10A The image shows the upward pushing motion of the arms during the process of changing the barbell position from 1001 to 1002.

[0287] like Figure 10B As shown, Figure 10B An illustrative diagram of the second movement during weightlifting is shown.

[0288] During the barbell pulldown, the user's wrists move perpendicularly to the ground from the highest point to the lowest point, changing the barbell's posture from posture 1002 to posture 1001. The barbell posture represented by the dotted line is posture 1002, and the barbell posture represented by the solid line is posture 1001. The second movement can be... Figure 10B The image shows the arm pulling down during the process of changing the barbell position from 1002 to 1001.

[0289] Optionally, the first movement can also be the arm pull-down motion during the transition from barbell position 1002 to position 1001. The second movement can also be the arm push-up motion during the transition from barbell position 1001 to position 1002.

[0290] It should be noted that during weightlifting, after the user completes the first movement, the barbell is at its highest point, with the barbell posture being posture 1002. Generally, the user will hold posture 1002 at its highest point for a period of time before performing the second movement, changing the barbell posture from posture 1002 to posture 1001. Therefore, the arm movement while holding the barbell in posture 1002 can be called the third movement. The arm movement corresponding to the third movement is static, with the user's wrist at its highest point. During the user's stillness, i.e., when the electronic device 100 detects the user performing the third movement, the electronic device 100 can prompt the user to hold their breath or perform one or more rapid sets of exhalation and inhalation through a third prompt method. The third prompt method can be any one or more of vibration, voice, text, and images.

[0291] 2. The user's first and second movements during rowing.

[0292] In some embodiments, the first action and the second action may be the user's arm movements collected by the electronic device 100.

[0293] like Figure 11A As shown, Figure 11A An illustrative diagram of the first action during rowing is shown.

[0294] like Figure 11A As shown, Figure 11A An illustrative diagram of a user's first action during rowing is shown.

[0295] As the user pulls the oar handle backward, their wrist moves backward from a stationary position, and their body moves accordingly. Therefore, the first movement could be... Figure 11A The image shows the user's arm movements as they move from the dashed line image to the solid line image; the first movement is a backward movement with the arm retracting.

[0296] like Figure 11B As shown, Figure 11B An illustrative diagram of a user's second action during rowing is shown.

[0297] As the user pushes the oar grip forward, their wrist moves forward from a stationary state, and their body moves accordingly. The second action could then be... Figure 11BThe user's arm movement is shown as they move from the dashed line image to the solid line image; the second movement is a forward movement with the arm extended.

[0298] Optionally, the first movement can be a forward movement with arms extended. The second movement can be a backward movement with arms retracted.

[0299] 3. The user's first and second movements during the rowing machine exercise, corresponding to their postures.

[0300] In some embodiments, the first action and the second action may be movements of the user's wrist collected by the electronic device 100.

[0301] like Figure 12A As shown, Figure 12A An illustrative diagram of the user's first action while using a rowing machine is shown.

[0302] As the user pulls the rowing machine handles backward, their wrists move backward from their initial position away from the machine, and their body moves accordingly. The first movement could be... Figure 11A The user's arm movements during the process of moving from the dashed image to the actual image are shown; the first movement is an arm movement that moves backward and away from the rowing machine.

[0303] like Figure 12B As shown, Figure 12B An illustrative diagram of a user's second action during the use of a rowing machine is shown.

[0304] As the user returns the rowing machine handles to their initial position, their wrist moves forward towards the machine, and their body moves forward along with the rowing machine's levers. The second movement could then be... Figure 11B The user's arm movement during the process of moving from the dashed image to the actual image is shown; the second movement is the arm movement of moving forward and approaching the rowing machine.

[0305] Alternatively, the first movement can be an arm movement that moves forward and closer to the rowing machine. The second movement can be an arm movement that moves backward and away from the rowing machine.

[0306] 4. The movement postures corresponding to the first and second movements of the user during exercise on the elliptical machine.

[0307] In some embodiments, the first action and the second action may be movements of the user's wrist collected by the electronic device 100.

[0308] Figures 13A-13BThe illustration shows the first and second actions of a user while using an elliptical machine.

[0309] As the user pulls the elliptical trainer's handrails backward, their wrists move backward from their initial position away from the trainer, and their body moves accordingly. Therefore, the first movement could be... Figure 13A The arm movement shown becomes Figure 13B The user's arm posture during the arm movement shown. The user can inhale when the arm moves backward.

[0310] As the user pushes the elliptical trainer's handrails forward, their wrists move forward and closer to the trainer, and their body moves accordingly. The second movement could then be... Figure 13B The arm movement shown becomes Figure 13A The user's arm posture during the arm movement shown. The user can exhale as the arm moves forward.

[0311] Optionally, the first movement can be an arm movement that moves forward and closer to the elliptical machine. The second movement can be an arm movement that moves backward and away from the elliptical machine.

[0312] Optionally, before the electronic device 100 begins detecting the user's movements, it can prompt the user via voice and / or text messages to indicate whether breathing guidance is needed. This allows the electronic device 100 to consult the user before starting to monitor their movements, respecting the user's wishes. In some embodiments, the user selects a corresponding exercise mode, and after the user begins the exercise, the electronic device 100 directly begins monitoring the user's movements without needing to ask for the user's opinion.

[0313] Here, for the above-mentioned methods of activating breathing guidance during exercise using fitness equipment, please refer to the description of how to activate breathing guidance in running mode. The principle is similar, only the exercise mode is different, and this application's embodiments will not repeat it here.

[0314] Optionally, after the electronic device 100 activates the breathing guidance function, it can display images and text information on the screen. These images and text information are used to prompt the user about the breathing movements corresponding to the arm movements in the aforementioned exercises combined with fitness equipment. Here, the method by which the electronic device 100 prompts the user about the breathing movements corresponding to the arm movements in the aforementioned exercises combined with fitness equipment can be referenced to how the electronic device 100 prompts the user about the breathing movements corresponding to different running movements in running mode. The principle is similar, only the exercise mode is different, and this embodiment will not be described in detail here.

[0315] After the electronic device 100 activates the breathing guidance function, it needs to monitor the user's movements during exercise (first movement and second movement) and provide specific breathing guidance plans based on the user's movements.

[0316] The following sections will explain how electronic device 100 determines whether the user is performing the first or second movement based on motion data collected by motion sensors in weightlifting, rowing, rowing machine exercise, and elliptical machine exercise.

[0317] I. In weightlifting, the electronic device 100 determines the specific implementation of the user's first, second, and third actions based on the motion data collected by the motion sensor.

[0318] Figures 14A-14C An exemplary diagram illustrates how an electronic device 100 determines a user's arm movement posture as a first action, a second action, and a third action based on acceleration data.

[0319] In one possible implementation, the electronic device 100 can determine whether the user is performing a first action, a second action, and a third action based on the acceleration data collected by the accelerometer.

[0320] The accelerometer in the electronic device 100 can collect acceleration data from the user's wrist and determine the user's arm movements based on this data. The electronic device 100 collects acceleration data in the X, Y, and Z axes. Based on this acceleration data, the electronic device 100 obtains total acceleration data and determines whether the user is performing a first or second action based on the magnitude of the total acceleration.

[0321] As mentioned above, the first movement is the upward pushing motion of the arms during the process of changing the barbell position from 1001 to 1002, and the second movement is the downward pulling motion of the arms during the process of changing the barbell position from 1002 to 1001.

[0322] In weightlifting, since the user's arms move up and down, ideally, the electronic device 100 can be understood to collect zero acceleration data in the X and Z axes. Therefore, the electronic device 100 only collects acceleration data in the Y axis direction.

[0323] Figure 14A An exemplary diagram illustrates the magnitude and direction of acceleration collected by the electronic device 100 during the upward push of a user's arm.

[0324] exist Figure 14AIn this process, the acceleration data along the Y-axis collected by the electronic device 100 is called acceleration data Y1. The direction of acceleration data Y1 is perpendicular to the horizontal plane and upwards. It can be understood that acceleration data Y1 is the sum of acceleration data along the X-axis, Y-axis, and Z-axis.

[0325] Figure 14B An exemplary diagram illustrates the magnitude and direction of acceleration collected by the electronic device 100 as the user's arm pulls down.

[0326] exist Figure 14B In this example, the acceleration data along the Y-axis collected by electronic device 100 is termed acceleration data Y2. The direction of acceleration data Y2 is perpendicular to the horizontal plane and points downwards. In essence, acceleration data Y2 is the sum of acceleration data along the X, Y, and Z axes.

[0327] In the following embodiments of this application, the acceleration data values ​​of the user's arm gradually increase from zero to a maximum value during the upward push, and gradually decrease from the maximum value to near zero during the highest point of the push. After the user's arm reaches the highest point, the barbell is held at the highest point for a period of time, during which the acceleration value is close to zero. Subsequently, when the user's arm pulls down from the highest point, the acceleration data values ​​gradually decrease from near zero to a minimum value, and gradually increase from the minimum value to near zero during the lowest point of the pull. Here, the acceleration data is in vector units. That is, the acceleration data represents not only the magnitude of the acceleration but also its direction. As can be seen from the foregoing analysis, when the acceleration data is greater than 0, it indicates that the user's arm is performing an upward push. When the acceleration data is less than 0, it indicates that the user's arm is performing a downward pull. When the acceleration data remains near zero for a period of time (e.g., 2 seconds), it indicates that the user's arm is performing a motion to hold the barbell at the highest point. In this way, the electronic device 100 can determine whether the user's arm movement is the first, second, or third movement by comparing the magnitude of the acceleration data.

[0328] Figure 14C An exemplary diagram illustrates the collection of acceleration data by electronic device 100 during a user's weightlifting process.

[0329] exist Figure 14CIn the diagram, the horizontal axis represents time, and the vertical axis represents the magnitude of the acceleration data. When the acceleration data is greater than 0, it indicates that the user's arms are performing an upward pushing motion; when the acceleration data is less than 0, it indicates that the user's arms are performing a downward pulling motion; when the acceleration data remains near 0 for a period of time (e.g., 2 seconds), it indicates that the user's arms are performing a motion to hold the barbell at its highest point. Because the user's arms are periodically pushing and pulling during weightlifting, the magnitude of the acceleration data collected by the electronic device 100 also changes periodically, fluctuating between positive and negative values. For example, Figure 14A The acceleration data Y1 shown can be Figure 14C The acceleration data Y1 shown at time t1. Figure 14B The acceleration data Y2 shown can be Figure 14C The acceleration data Y2 shown at time t4. Figure 14C In the process, the acceleration gradually decreases from the positive value to near 0 (the acceleration value corresponding to time t2). Between time t2 and time t3, the acceleration value remains at 0, and the difference between time t2 and time t3 is greater than the preset value. This indicates that the movement type between time t2 and time t3 is the user's arm performing the action of keeping the barbell at its highest point.

[0330] In another possible implementation, the electronic device 100 can obtain the motion trajectory of the user's arm based on acceleration data, compare the motion trajectory with a template, and determine whether the user's arm movement is a first movement, a second movement, or a third movement. The electronic device 100 can also determine whether the user's arm movement is a first movement, a second movement, or a third movement using other methods, which are not limited to the embodiments of this application.

[0331] Second, during rowing, the electronic device 100 determines the specific implementation of the user's first and second actions based on the motion data collected by the motion sensor.

[0332] Figures 15A-15C An exemplary diagram illustrates how an electronic device 100 determines whether a user's wrist movement posture is a first action or a second action based on acceleration data.

[0333] In one possible implementation, the electronic device 100 can determine whether the user is performing a first action or a second action based on the acceleration data collected by the accelerometer.

[0334] The accelerometer in the electronic device 100 can collect acceleration data from the user's wrist and determine the user's arm movements based on this data. The electronic device 100 collects acceleration data in the X, Y, and Z axes. Based on this acceleration data, the electronic device 100 obtains total acceleration data and determines whether the user is performing a first or second action based on the magnitude of the total acceleration.

[0335] As mentioned above, the first movement is a backward movement with the arm retracting, and the second movement is a forward movement with the arm extending.

[0336] During rowing, since the user's wrist moves back and forth, ideally, it can be understood that the acceleration data in the Y-axis and Z-axis directions collected by the electronic device 100 are all 0. Therefore, the electronic device 100 only collects the acceleration data in the X-axis direction.

[0337] Figure 15A An exemplary diagram illustrates the magnitude and direction of acceleration collected by electronic device 100 as a user pulls the paddle handle backward.

[0338] exist Figure 15A In this example, the acceleration data along the X-axis collected by electronic device 100 is termed acceleration data X1. The direction of acceleration data X1 is parallel to the horizontal plane and points to the left. In essence, acceleration data X1 is the sum of acceleration data along the X, Y, and Z axes.

[0339] Figure 15B An exemplary diagram illustrates the magnitude and direction of acceleration collected by electronic device 100 as a user grips the paddle handle and pushes the handle forward.

[0340] exist Figure 15B In this example, the acceleration data collected by electronic device 100 along the X-axis is termed acceleration data X2. The direction of acceleration data X2 is parallel to the horizontal plane and points to the right. In essence, acceleration data X2 is the sum of acceleration data along the X, Y, and Z axes.

[0341] In the following embodiments of this application, during the process of a user gripping the paddle handle and pulling it backward, the value of the acceleration data gradually increases from zero to a maximum value, and then gradually decreases from the maximum value to a positive minimum value (e.g., 0.3). During the process of pushing the paddle handle forward, the value of the acceleration data gradually decreases from a positive minimum value (e.g., 0.3) to a minimum value, and then gradually increases from the minimum value to a negative maximum value (e.g., -0.2). Here, the acceleration data is in vector units. That is, the acceleration data represents not only the magnitude of the acceleration but also its direction. As can be seen from the foregoing analysis, when the acceleration data is greater than 0, it indicates that the user is pulling the paddle handle backward. When the acceleration data is less than 0, it indicates that the user is pushing the paddle handle forward. Thus, the electronic device 100 can determine whether the user's arm movement is a first or second movement by the sign of the acceleration data.

[0342] Figure 15C An exemplary diagram illustrates the collection of acceleration data by electronic device 100 during a user's rowing process.

[0343] exist Figure 15C In the graph, the horizontal axis represents time, and the vertical axis represents the magnitude of the acceleration data. Figure 15C In the data, when the sum of acceleration and slack is greater than 0, it indicates that the user is pulling the grip backward; when the sum of acceleration and slack is less than 0, it indicates that the user is pushing the grip forward. Because the user's arms are periodically pulling the grip backward and pulling the grip during rowing, the sum of acceleration and slack data collected by the electronic device 100 also changes periodically, fluctuating between positive and negative values. For example, Figure 15A The acceleration data X1 shown can be Figure 15C The acceleration data X1 shown at time t1. Figure 15B The acceleration data X2 shown can be Figure 15C The acceleration data X2 shown at time t2.

[0344] In another possible implementation, the electronic device 100 can obtain the motion trajectory of the user's arm based on acceleration data, compare the motion trajectory with a template, and determine whether the user's arm movement is a first movement or a second movement. The electronic device 100 can also determine whether the user's arm movement is a first movement or a second movement using other methods, which are not limited to the embodiments described in this application.

[0345] Third, during the exercise using the rowing machine, the electronic device 100 determines the specific implementation of the user's first and second actions based on the motion data collected by the motion sensor.

[0346] Figures 16A-16C An exemplary diagram illustrates how an electronic device 100 determines whether a user's wrist movement posture is a first action or a second action based on acceleration data.

[0347] In one possible implementation, the electronic device 100 can determine whether the user is performing a first action or a second action based on the acceleration data collected by the accelerometer.

[0348] The accelerometer in the electronic device 100 can collect acceleration data from the user's wrist and determine the user's arm movements based on this data. The electronic device 100 collects acceleration data in the X, Y, and Z axes. Based on this acceleration data, the electronic device 100 obtains total acceleration data and determines whether the user is performing a first or second action based on the magnitude of the total acceleration.

[0349] As mentioned above, the first movement is an arm movement away from the rowing machine, and the second movement is an arm movement closer to the rowing machine.

[0350] During rowing machine exercise, since the user's wrists move back and forth, ideally, it can be understood that the acceleration data in the Y-axis and Z-axis directions collected by the electronic device 100 are all 0. Therefore, the electronic device 100 only collects the acceleration data in the X-axis direction.

[0351] Figure 16A An exemplary diagram illustrates the magnitude and direction of acceleration collected by electronic device 100 as a user pulls the handle of a rowing machine backward away from the machine.

[0352] exist Figure 16A In this example, the acceleration data along the X-axis collected by electronic device 100 is termed acceleration data X1. The direction of acceleration data X1 is parallel to the horizontal plane and points to the left. In essence, acceleration data X1 is the sum of acceleration data along the X, Y, and Z axes.

[0353] Figure 16B An exemplary diagram illustrates the magnitude and direction of acceleration collected by electronic device 100 as a user pulls the handle of a rowing machine forward toward the machine.

[0354] exist Figure 16B In this example, the acceleration data collected by electronic device 100 along the X-axis is termed acceleration data X2. The direction of acceleration data X2 is parallel to the horizontal plane and points to the right. In essence, acceleration data X2 is the sum of acceleration data along the X, Y, and Z axes.

[0355] In the following embodiments of this application, as the user moves the handle of the rowing machine to the maximum distance between the handle and the machine, the values ​​of the acceleration data gradually increase from zero to a maximum value, and then gradually decrease from the maximum value to near zero. Conversely, as the user moves the handle closer to the machine, the values ​​of the acceleration data gradually decrease from near zero to a minimum value, and then gradually increase from the minimum value to near zero. Here, the acceleration data is in vector units. That is, the acceleration data represents not only the magnitude of the acceleration but also its direction. As the foregoing analysis shows, when the acceleration data is greater than 0, it indicates that the user is moving backward and away from the rowing machine. When the acceleration data is less than 0, it indicates that the user is moving forward and closer to the machine. Thus, the electronic device 100 can determine whether the user's arm movement is a first or second movement based on the sign of the acceleration data.

[0356] Figure 16C An exemplary diagram illustrates the collection of acceleration data by electronic device 100 during a user's exercise using a rowing machine.

[0357] exist Figure 16C In the graph, the horizontal axis represents time, and the vertical axis represents the magnitude of the acceleration data. Figure 16C In the data, when the sum of acceleration and slack is greater than 0, it indicates that the user is making arm movements away from the rowing machine; when the sum of acceleration and slack is less than 0, it indicates that the user is making arm movements closer to the rowing machine. Because the user's arms periodically move backward and away from the rowing machine and forward and closer to it during use, the sum of acceleration and slack data collected by the electronic device 100 also changes periodically, fluctuating between positive and negative values. For example, Figure 16A The acceleration data X1 shown can be Figure 16C The acceleration data X1 shown at time t1. Figure 16B The acceleration data X2 shown can be Figure 16C The acceleration data X2 shown at time t2.

[0358] In another possible implementation, the electronic device 100 can obtain the motion trajectory of the user's arm based on acceleration data, compare the motion trajectory with a template, and determine whether the user's arm movement is a first movement or a second movement. The electronic device 100 can also determine whether the user's arm movement is a first movement or a second movement using other methods, which are not limited to the embodiments described in this application.

[0359] Fourth, during the use of the ellipse for motion, the electronic device 100 determines the specific implementation of the user's first and second actions based on the motion data collected by the motion sensor.

[0360] Figures 17A-17C An exemplary diagram illustrates how an electronic device 100 determines whether a user's wrist movement posture is a first action or a second action based on acceleration data.

[0361] In one possible implementation, the electronic device 100 can determine whether the user is performing a first action or a second action based on the acceleration data collected by the accelerometer.

[0362] The accelerometer in the electronic device 100 can collect acceleration data from the user's wrist and determine the user's arm movements based on this data. The electronic device 100 collects acceleration data in the X, Y, and Z axes. Based on this acceleration data, the electronic device 100 obtains total acceleration data and determines whether the user is performing a first or second action based on the magnitude of the total acceleration.

[0363] As mentioned above, the first action is the arm movement of pulling the elliptical machine's handrail backward, and the second action is the arm movement of pushing the elliptical machine's handrail forward.

[0364] During elliptical machine exercise, since the user's wrists move back and forth, ideally, it can be understood that the acceleration data in the Y-axis and Z-axis directions collected by the electronic device 100 are all 0. Therefore, the electronic device 100 only collects the acceleration data in the X-axis direction.

[0365] Figure 17A An exemplary diagram illustrates the magnitude and direction of acceleration collected by electronic device 100 as a user pulls the handrail of an elliptical machine backward away from the machine.

[0366] exist Figure 17A In this example, the acceleration data along the X-axis collected by electronic device 100 is termed acceleration data X1. The direction of acceleration data X1 is parallel to the horizontal plane and points to the left. In essence, acceleration data X1 is the sum of acceleration data along the X, Y, and Z axes.

[0367] Figure 17B An exemplary illustration shows a schematic diagram of the magnitude and direction of acceleration collected by electronic device 100 as a user pushes the handrail of an elliptical machine forward toward the machine.

[0368] exist Figure 17BIn this example, the acceleration data collected by electronic device 100 along the X-axis is termed acceleration data X2. The direction of acceleration data X2 is parallel to the horizontal plane and points to the right. In essence, acceleration data X2 is the sum of acceleration data along the X, Y, and Z axes.

[0369] In the following embodiments of this application, during the process of a user moving the armrest of an elliptical trainer to maximize the distance between the armrest and the trainer, the values ​​of the acceleration data gradually increase from zero to a maximum value, and then gradually decrease from the maximum value to near zero. During the process of the user moving the armrest closer to the trainer, the values ​​of the acceleration data gradually decrease from near zero to a minimum value, and then gradually increase from the minimum value to near zero. Here, the acceleration data is in vector units. That is, the acceleration data represents not only the magnitude of the acceleration but also its direction. As can be seen from the foregoing analysis, when the acceleration data is greater than 0, it indicates that the user is pulling the armrest of the elliptical trainer backward. When the acceleration data is less than 0, it indicates that the user is pushing the armrest of the elliptical trainer forward. Thus, the electronic device 100 can determine whether the user's arm movement is a first or second movement by the sign of the acceleration data.

[0370] Figure 17C An exemplary diagram illustrates the acceleration data collected by electronic device 100 during a user's exercise using an elliptical machine.

[0371] exist Figure 17C In the graph, the horizontal axis represents time, and the vertical axis represents the magnitude of the acceleration data. Figure 17C In the data, when the sum of acceleration and elliptical acceleration data is greater than 0, it indicates that the user is pulling the arm of the elliptical machine backward; when the sum of acceleration and elliptical acceleration data is less than 0, it indicates that the user is pushing the arm of the elliptical machine forward. Because the user's arm periodically moves backward and away from the elliptical machine and forward and towards the elliptical machine during use, the sum of acceleration and elliptical acceleration data collected by the electronic device 100 also changes periodically, fluctuating between positive and negative values. For example, Figure 17A The acceleration data X1 shown can be Figure 17C The acceleration data X1 shown at time t1. Figure 17B The acceleration data X2 shown can be Figure 17C The acceleration data X2 shown at time t2.

[0372] In another possible implementation, the electronic device 100 can obtain the motion trajectory of the user's arm based on acceleration data, compare the motion trajectory with a template, and determine whether the user's arm movement is a first movement or a second movement. The electronic device 100 can also determine whether the user's arm movement is a first movement or a second movement using other methods, which are not limited to the embodiments described in this application.

[0373] After the electronic device 100 activates the breathing guidance function, it needs to monitor the user's arm movements (first and second movements) during the above-mentioned exercises combined with fitness equipment, and provide specific breathing guidance plans based on the user's arm movements.

[0374] When the electronic device 100 guides the user's breathing based on the user's arm movements during exercise using fitness equipment, the electronic device 100 can continuously monitor the first movement n times and then prompt the user to perform an inhalation through a first prompt. After the electronic device 100 continuously monitors the second movement m times, it prompts the user to perform an exhalation through a second prompt.

[0375] In this way, the electronic device 100 can use different prompts to match the user's arm movements with the rhythm of breathing during exercise using fitness equipment, saving the user's energy and improving the user's fitness results.

[0376] Next, we will introduce breathing guidance programs for weightlifting, rowing, rowing machine exercises, and elliptical machine exercises.

[0377] I. Breathing Instructions During Weightlifting

[0378] Figures 14A-14C This describes how electronic device 100 determines a user's arm movement posture as a first, second, or third action based on motion sensor data collected by the electronic device 100. Specifically, electronic device 100 collects motion sensor data and determines the user's action type as a first, second, or third action based on the motion sensor data. After determining the first action, electronic device 100 prompts the user to inhale through a first prompt. After determining the second action, electronic device 100 prompts the user to exhale through a second prompt. After determining the third action, electronic device 100 prompts the user to hold their breath through a third prompt, or prompts the user to perform at least one short exhale and at least one short inhale consecutively through a third prompt.

[0379] Optionally, the barbell can replace the function of electronic device 100. That is, the barbell collects motion sensor data and, based on this data, determines whether the user's movement is a first, second, or third movement, and guides the user's breathing rhythm. Specifically, the barbell collects motion sensor data and determines whether the user's movement is a first, second, or third movement. After determining the first movement, the barbell prompts the user to inhale using a first prompt. After determining the second movement, the barbell prompts the user to exhale using a second prompt. After determining the third movement, the barbell prompts the user to hold their breath using a third prompt, or prompts the user to perform at least one short exhale and at least one short inhale consecutively using a third prompt.

[0380] Optionally, before the electronic device 100 begins guiding the user's breathing rhythm, it needs to establish a communication connection with the barbell. The barbell collects motion sensor data and sends it to the electronic device 100. After receiving the motion sensor data, the electronic device 100 determines the type of the user's movement—whether it's a first, second, or third movement—and guides the user's breathing rhythm accordingly. If the electronic device 100 determines it's a first movement, it prompts the user to inhale using a first prompt. If it determines it's a second movement, it prompts the user to exhale using a second prompt. If it determines it's a third movement, it prompts the user to hold their breath using a third prompt, or prompts the user to perform at least one short exhale and at least one short inhale consecutively using a third prompt.

[0381] Optionally, before the electronic device 100 begins guiding the user's breathing rhythm, the electronic device 100 needs to establish a communication connection with the barbell. The barbell collects motion sensor data and determines whether the user's movement is a first, second, or third movement based on the motion sensor data. After the barbell determines that the user's movement is a first movement, it sends instruction one to the electronic device 100. Upon receiving instruction one, the electronic device 100 prompts the user to inhale through a first prompt. After the barbell determines that the user's movement is a second movement, it sends instruction two to the electronic device 100. Upon receiving instruction two, the electronic device 100 prompts the user to exhale through a second prompt. After the barbell determines that the user's movement is a third movement, it sends instruction three to the electronic device 100. Upon receiving instruction three, the electronic device 100 prompts the user to hold their breath through a third prompt, or prompts the user to perform at least one short exhalation and at least one short inhalation consecutively through a third prompt.

[0382] The aforementioned communication connection can refer to wired or wireless connections. Wireless connections can include wireless local area network (WLAN) connections, wireless fidelity (Wi-Fi) connections, Bluetooth connections, infrared connections, near field communication (NFC) connections, ZigBee connections, and other short-range wireless communication technologies that may emerge in future developments. The barbell can also establish a long-range connection with electronic device 100, including but not limited to long-range connections based on mobile networks using 2G, 3G, 4G, 5G, and subsequent standard protocols. The barbell and electronic device 100 can also log into the same user account (e.g., a Huawei account) and then establish a long-range connection through a server.

[0383] The barbell prompts the user to inhale via a first prompting method, which is similar to the electronic device 100 prompting the user to inhale via a first prompting method. Therefore, the embodiments of this application will not be described in detail here.

[0384] The barbell prompts the user to inhale via a second prompting method, which is similar to the electronic device 100 prompting the user to exhale via a second prompting method. This embodiment will not be described in detail here.

[0385] The third type of prompt can be any one of vibration, voice, text, or image, or a combination of two or more of vibration, voice, text, and image.

[0386] II. Breathing Instructions for Rowing

[0387] Figures 15A-15C This describes how electronic device 100 determines whether a user's arm movement is a first or second action based on motion sensor data collected by the electronic device 100. Specifically, electronic device 100 collects motion sensor data and determines whether the user's action is a first or second action based on the motion sensor data. After determining that it is a first action, electronic device 100 prompts the user to inhale through a first prompt method. After determining that it is a second action, electronic device 100 prompts the user to exhale through a second prompt method.

[0388] Optionally, the hull (or the paddle on the hull) can replace the function of electronic device 100. That is, the hull collects motion sensor data and, based on this data, determines whether the user's action is a first or second action, and guides the user's breathing rhythm. Specifically, the hull collects motion sensor data and, based on this data, determines whether the user's action is a first, second, or third action. After determining the first action, the hull prompts the user to inhale using a first prompt. After determining the second action, the hull prompts the user to exhale using a second prompt.

[0389] Optionally, before the electronic device 100 begins guiding the user's breathing rhythm, it needs to establish a communication connection with the hull (or the oars on the hull). The hull collects motion sensor data and sends it to the electronic device 100. After receiving the motion sensor data, the electronic device 100 determines whether the user's action is a first action or a second action based on the motion sensor data, and guides the user's breathing rhythm accordingly. After determining the first action, the electronic device 100 prompts the user to inhale using a first prompt method. After determining the second action, the electronic device 100 prompts the user to exhale using a second prompt method.

[0390] Optionally, before the electronic device 100 begins guiding the user's breathing rhythm, it needs to establish a communication connection with the hull (or the oars on the hull). The hull collects motion sensor data and determines whether the user's movement is a first or second movement based on the motion sensor data. After the hull determines that the user's movement is the first movement, it sends Command 1 to the electronic device 100. Upon receiving Command 1, the electronic device 100 prompts the user to inhale through a first prompt. After the barbell determines that the user's movement is the second movement, the hull sends Command 2 to the electronic device 100. Upon receiving Command 2, the electronic device 100 prompts the user to exhale through a second prompt.

[0391] The aforementioned communication connection can refer to wired or wireless connections. Wireless connections can include wireless local area network (WLAN) connections, wireless fidelity (Wi-Fi) connections, Bluetooth connections, infrared connections, near field communication (NFC) connections, ZigBee connections, and other wireless communication technologies that emerge in future developments. The hull (or its paddles) can also establish long-distance connections with electronic device 100. Long-distance connections include, but are not limited to, long-distance connections based on mobile networks using 2G, 3G, 4G, 5G, and subsequent standard protocols. The hull (or its paddles) and electronic device 100 can also log into the same user account (e.g., a Huawei account) and then establish a long-distance connection through a server.

[0392] The above-mentioned hull (or the paddle on the hull) prompts the user to perform an inhalation action through a first prompt method, which is similar to the electronic device 100 prompting the user to perform an inhalation action through a first prompt method. The embodiments of this application will not be described in detail here.

[0393] The above-mentioned hull (or the paddle on the hull) prompts the user to inhale through a second prompting method, which is similar to the electronic device 100 prompting the user to exhale through a second prompting method. The embodiments of this application will not be described in detail here.

[0394] III. Breathing Instructions for Users Using Rowing Machines

[0395] Figures 16A-16C This describes how electronic device 100 determines whether a user's arm movement is a first or second action based on motion sensor data collected by the electronic device 100. Specifically, electronic device 100 collects motion sensor data and determines whether the user's action is a first or second action based on the motion sensor data. After determining that it is a first action, electronic device 100 prompts the user to inhale through a first prompt method. After determining that it is a second action, electronic device 100 prompts the user to exhale through a second prompt method.

[0396] Optionally, the rowing machine can replace the function of electronic device 100. That is, the rowing machine collects motion sensor data and, based on this data, determines whether the user's movement is a first or second movement, and guides the user's breathing rhythm. Specifically, the rowing machine collects motion sensor data and, based on this data, determines whether the user's movement is a first, second, or third movement. After determining the first movement, the rowing machine prompts the user to inhale using a first prompt. After determining the second movement, the rowing machine prompts the user to exhale using a second prompt.

[0397] Optionally, before the electronic device 100 begins guiding the user's breathing rhythm, it needs to establish a communication connection with the rowing machine. The rowing machine collects motion sensor data and sends it to the electronic device 100. After receiving the motion sensor data, the electronic device 100 determines whether the user's movement is a first or second movement based on the motion sensor data and guides the user's breathing rhythm. After determining the first movement, the electronic device 100 prompts the user to inhale using a first prompt method. After determining the second movement, the electronic device 100 prompts the user to exhale using a second prompt method.

[0398] Optionally, before the electronic device 100 begins guiding the user's breathing rhythm, it needs to establish a communication connection with the rowing machine. The rowing machine collects motion sensor data and determines whether the user's movement is a first movement or a second movement based on the motion sensor data. After determining that the user's movement is the first movement, the rowing machine sends instruction one to the electronic device 100. Upon receiving instruction one, the electronic device 100 prompts the user to inhale through a first prompt. After determining that the user's movement is the second movement, the rowing machine sends instruction two to the electronic device 100. Upon receiving instruction two, the electronic device 100 prompts the user to exhale through a second prompt.

[0399] In some embodiments, the rowing machine may have a display screen that shows text, images, or videos to prompt the user to perform either an inhalation or exhalation movement. Alternatively, the display screen may also show text, images, or videos to prompt the user to perform either the first or second movement.

[0400] The rowing machine prompts the user to inhale through a first prompt, which is similar to the electronic device 100 prompting the user to inhale through a first prompt. Therefore, the embodiments of this application will not be described in detail here.

[0401] The rowing machine prompts the user to inhale via a second prompting method, which is similar to the electronic device 100 prompting the user to exhale via a second prompting method. Therefore, the embodiments of this application will not be described in detail here.

[0402] The aforementioned communication connection can refer to wired or wireless connections. Wireless connections can include wireless local area network (WLAN) connections, wireless fidelity (Wi-Fi) connections, Bluetooth connections, infrared connections, near field communication (NFC) connections, ZigBee connections, and other short-range wireless communication technologies that have emerged in future developments. The rowing machine can also establish a long-range connection with electronic device 100, including but not limited to long-range connections based on mobile networks using 2G, 3G, 4G, 5G, and subsequent standard protocols. The rowing machine and electronic device 100 can also log into the same user account (e.g., a Huawei account) and then establish a long-range connection through a server.

[0403] IV. Breathing Guidance for Users Using Elliptical Trainers

[0404] Figures 17A-17C This describes how electronic device 100 determines whether a user's arm movement is a first or second action based on motion sensor data collected by the electronic device 100. Specifically, electronic device 100 collects motion sensor data and determines whether the user's action is a first or second action based on the motion sensor data. After determining that it is a first action, electronic device 100 prompts the user to inhale through a first prompt method. After determining that it is a second action, electronic device 100 prompts the user to exhale through a second prompt method.

[0405] Optionally, the elliptical trainer can replace the function of electronic device 100. That is, the elliptical trainer collects motion sensor data and, based on this data, determines whether the user's movement is a first or second movement, and guides the user's breathing rhythm. Specifically, the elliptical trainer collects motion sensor data and, based on this data, determines whether the user's movement is a first, second, or third movement. After determining the first movement, the elliptical trainer prompts the user to inhale using a first prompt method. After determining the second movement, the elliptical trainer prompts the user to exhale using a second prompt method.

[0406] Optionally, before the electronic device 100 begins guiding the user's breathing rhythm, it needs to establish a communication connection with the elliptical machine. The elliptical machine collects motion sensor data and sends it to the electronic device 100. After receiving the motion sensor data, the electronic device 100 determines whether the user's movement is a first or second movement based on the motion sensor data and guides the user's breathing rhythm. After determining the first movement, the electronic device 100 prompts the user to inhale using a first prompt method. After determining the second movement, the electronic device 100 prompts the user to exhale using a second prompt method.

[0407] Optionally, before the electronic device 100 begins guiding the user's breathing rhythm, it needs to establish a communication connection with the elliptical trainer. The elliptical trainer collects motion sensor data and determines whether the user's movement is a first or second movement based on the motion sensor data. After determining that the user's movement is the first movement, the elliptical trainer sends instruction one to the electronic device 100. Upon receiving instruction one, the electronic device 100 prompts the user to inhale using a first prompt method. After determining that the user's movement is the second movement, the elliptical trainer sends instruction two to the electronic device 100. Upon receiving instruction two, the electronic device 100 prompts the user to exhale using a second prompt method.

[0408] In some embodiments, the elliptical trainer may have a display screen that shows text, images, or videos to prompt the user to perform either an inhalation or exhalation movement. Alternatively, the display screen may also show text, images, or videos to prompt the user to perform either the first or second movement.

[0409] The elliptical machine prompts the user to perform an inhalation action through a first prompt method, which is similar to the electronic device 100 prompting the user to perform an inhalation action through a first prompt method. Therefore, the embodiments of this application will not be described in detail here.

[0410] The above-mentioned elliptical machine prompts the user to perform an inhalation action through a second prompting method, which is similar to the electronic device 100 prompting the user to perform an exhalation action through a second prompting method. Therefore, the embodiments of this application will not be described in detail here.

[0411] The aforementioned communication connection can refer to wired or wireless connections. Wireless connections can include wireless local area network (WLAN) connections, wireless fidelity (Wi-Fi) connections, Bluetooth connections, infrared connections, near field communication (NFC) connections, ZigBee connections, and other short-range wireless communication technologies that have emerged in future developments. The elliptical trainer can also establish a long-range connection with electronic device 100, including but not limited to long-range connections based on mobile networks using 2G, 3G, 4G, 5G, and subsequent standard protocols. The elliptical trainer and electronic device 100 can also log into the same user account (e.g., a Huawei account) and then establish a long-range connection through a server.

[0412] Example 2

[0413] Example 2 is a breathing guidance program in the field of health.

[0414] During medical and health examinations, when users need to coordinate their breathing rhythm with the doctor's examination and treatment, when electronic device 100 detects another electronic device (such as a medical device) performing its first action, electronic device 100 prompts the user to inhale via a first prompt. When electronic device 100 detects the medical device performing its second action, electronic device 100 prompts the user to exhale via a second prompt. This allows the user's breathing rhythm to coordinate with the medical device's examination movements, improving the user's experience during the examination, reducing discomfort, and also increasing the efficiency of the health examination.

[0415] Specifically, in one possible implementation, the electronic device 100 needs to establish a communication connection with the medical device. The medical device collects motion sensor data and sends this data to the electronic device 100 in real time. After receiving the motion sensor data, the electronic device 100 determines whether the medical device's action is a first action or a second action based on the data. After determining the action type, the electronic device 100 prompts the user to inhale using a first prompt method and to exhale using a second prompt method.

[0416] In another possible implementation, the electronic device 100 needs to establish a communication connection with the medical device. The medical device collects motion sensor data and determines whether the user's action is a first action or a second action based on the motion sensor data. After the medical device determines that the user's action is a first action, it sends instruction one to the electronic device 100. Upon receiving instruction one, the electronic device 100 prompts the user to inhale using a first prompt method. After determining that the user's action is a second action, it sends instruction two to the electronic device 100. Upon receiving instruction two, the electronic device 100 prompts the user to inhale using a second prompt method.

[0417] Optionally, the medical device in the following embodiments of this application can replace the function of the electronic device 100. That is, the medical device collects motion sensor data and determines whether the working type of the medical device is a first action or a second action based on the motion sensor data. After determining the action type, the medical device prompts the user to inhale through a first prompt and prompts the user to exhale through a second prompt.

[0418] The communication connection between the aforementioned medical device and electronic device 100 can be a wired connection or a wireless connection. Wireless connections can include wireless local area network (WLAN) connections, wireless fidelity (Wi-Fi) connections, Bluetooth connections, infrared connections, near field communication (NFC) connections, ZigBee connections, and other short-range wireless communication technologies that have emerged in subsequent developments. The medical device can also establish a long-range connection with electronic device 100, including but not limited to long-range connections based on mobile networks using 2G, 3G, 4G, 5G, and subsequent standard protocols. The medical device and electronic device 100 can also log into the same user account (e.g., a Huawei account) and then establish a long-range connection through a server. The aforementioned medical and health examinations can include, but are not limited to, gastroscopy, respiratory drug treatment, and respiratory disease (e.g., asthma) monitoring, etc.

[0419] I. Breathing Instructions During Gastroscopy

[0420] Figure 18 An exemplary schematic diagram of a scene during a gastroscopy is shown.

[0421] During a gastroscopy, a gastric tube is inserted through the patient's mouth, down the esophagus, and into the stomach. The user experience during this process is often poor, frequently accompanied by vomiting and breathing difficulties. Typically, during a gastroscopy, the doctor provides verbal breathing guidance to help maintain a proper breathing rhythm and reduce discomfort. To make breathing guidance during gastroscopy more intelligent, in the following embodiments of this application, the electronic device 100 or the main body of the gastric tube can provide breathing guidance based on the type of gastroscopy movement.

[0422] During a gastroscopy, the first action is the movement of the gastric tube along the esophagus into the stomach, and the second action is the pause in the movement of the gastric tube along the esophagus into the stomach.

[0423] When the main body of the gastric tube provides breathing guidance, it can replace the function of the electronic device 100. Specifically, the main body of the gastric tube can collect motion sensor data from the motion sensor on the gastric tube and determine the type of movement of the gastric tube based on the motion sensor data. When the main body of the gastric tube determines that the movement type is a first movement, that is, when the gastric tube begins to move deeper into the stomach along the esophagus, the main body of the gastric tube prompts the user to inhale through a first prompt. When the main body of the gastric tube determines that the movement type is a second movement, that is, when the gastric tube stops moving downward along the esophagus, the main body of the gastric tube prompts the user to exhale through a second prompt. The above-mentioned prompting of the user to inhale through the main body of the gastric tube is similar to the prompting of the user to inhale through the electronic device 100, and will not be described again in this embodiment.

[0424] The main body of the aforementioned gastric tube prompts the user to perform an inhalation action through a second prompting method, similar to how the electronic device 100 prompts the user to perform an exhalation action through a second prompting method. This embodiment of the application will not be described in detail here.

[0425] In some embodiments, the main body of the gastric tube may have a display screen that can display text, images, or videos to prompt the user to perform an inhalation or exhalation action. Alternatively, the display screen may also display text, images, or videos to prompt the user to perform the first action or the second action. Optionally, the main body of the endoscope may also prompt the user to inhale and exhale via voice or vibration.

[0426] When the electronic device 100 provides breathing guidance, it needs to establish a communication connection with the main body of the gastric tube before instructing the user's breathing rhythm. The main body of the gastric tube collects motion sensor data and sends it to the electronic device 100. After receiving the motion sensor data, the electronic device 100 determines whether the user's action is a first or second action and guides the user's breathing rhythm accordingly. When the electronic device 100 determines that the gastric tube's action is a first action, i.e., when the gastric tube begins to descend along the esophagus into the stomach, the electronic device 100 prompts the user to inhale using a first prompt. When the electronic device 100 determines that the gastric tube's action is a second action, i.e., when the gastric tube stops descending along the esophagus into the stomach, the electronic device 100 prompts the user to exhale using a second prompt.

[0427] When the electronic device 100 provides breathing guidance, it needs to establish a communication connection with the main body of the gastric tube before it begins guiding the user's breathing rhythm. The main body of the gastric tube collects motion sensor data and determines whether the gastric tube's movement is a first or second movement based on the motion sensor data. When the main body of the gastric tube determines that the user's movement is a first movement, i.e., when the gastric tube begins to extend into the stomach along the esophagus, the main body of the gastric tube sends instruction one to the electronic device 100. After receiving instruction one, the electronic device 100 prompts the user to inhale through a first prompt. When the main body of the gastric tube determines that the user's movement is a second movement, i.e., when the gastric tube stops extending into the stomach along the esophagus, the main body of the gastric tube sends instruction two to the electronic device 100. After receiving instruction two, the electronic device 100 prompts the user to exhale through a second prompt.

[0428] In this way, as the gastric tube is inserted into the patient's stomach, the user takes a deep breath to relax the whole body and expand the chest as much as possible. When the gastric tube pauses its insertion into the patient's stomach, the user can exhale slowly to reduce discomfort during the examination. The electronic device 100 provides prompts to match the patient's breathing rhythm with the insertion and pause of the gastric tube, minimizing discomfort during the gastroscopy.

[0429] Optionally, the breathing prompts given by the electronic device 100 may vary at different stages of the gastroscopy, i.e., at different positions of the gastric tube in the patient's esophagus.

[0430] For example, when the endoscope has just passed through the patient's mouth and reached the pharynx (i.e., the esophagus), the user's discomfort is at its strongest during the entire gastroscopy. At this time, the electronic device 100 can prompt the user to inhale through strong vibration. The frequency of the strong vibration of the electronic device 100 can be frequency three, which is greater than frequency one. Thus, the stronger the vibration frequency of the electronic device 100, the longer the user needs to inhale, which can reduce discomfort to some extent.

[0431] Optionally, the electronic device 100 can prompt the user to inhale at different stages of the endoscopy with different voice content. When the endoscope has just passed through the patient's mouth and reached the pharynx (i.e., the esophagus), the voice content can be "Inhale deeply through the nasal cavity and hold for a period of time (e.g., 5 seconds)".

[0432] Optionally, before the patient begins the examination, the electronic device 100 can display different prompts corresponding to different breathing actions. This allows the user to know in advance the prompts from the electronic device 100, specifying when to exhale and when to exhale. For details on the implementation, please refer to [link / reference needed]. Figures 5D-5F The embodiments are similar in principle, and will not be described again here.

[0433] II. Respiratory Guidance in Respiratory Drug Therapy

[0434] Respiratory drug therapy may include, but is not limited to, nebulized inhalation therapy, ventilator therapy, etc. The following embodiments of this application illustrate nebulized inhalation therapy as an example.

[0435] In respiratory drug therapy, the first action is the action of the nebulizer delivering the medication, and the second action is the action of the nebulizer pausing the medication delivery.

[0436] Figure 19 An exemplary schematic diagram of a scenario in nebulized inhalation therapy is shown.

[0437] In nebulized inhalation therapy, medication is transformed from a liquid state into a mist using a nebulizer or pump and then delivered to the throat through normal breathing to treat respiratory diseases.

[0438] Before starting nebulizer therapy, the nebulizer can have a display screen that shows text, images, or videos to remind the user when to start and stop medication delivery. Alternatively, the nebulizer can also provide voice prompts to the user about when to start and stop medication delivery.

[0439] Alternatively, before inhalation therapy begins, the electronic device 100 can establish a communication connection with the nebulizer. The nebulizer sends an electronic version of the user manual to the electronic device 100 via a communication module. The patient can then play the electronic user manual on the electronic device 100 to learn about precautions for using the nebulizer. For example, how to match the breathing rhythm with the nebulizer's medication delivery rhythm for better therapeutic effects. Alternatively, the electronic device 100 can also display different prompts corresponding to different breathing actions, etc.

[0440] When the nebulizer provides breathing instructions, it can replace the function of electronic device 100. When the nebulizer begins delivering medication, it prompts the user to inhale via a first prompt. This ensures the medication reaches the respiratory tract, improving therapeutic efficacy. When the nebulizer pauses delivery, it prompts the user to exhale via a second prompt. This allows the patient to exhale, promoting relaxation.

[0441] The above-mentioned atomizer prompts the user to perform an inhalation action through a first prompt method, which is similar to the electronic device 100 prompting the user to perform an inhalation action through a first prompt method. Therefore, the embodiments of this application will not be described in detail here.

[0442] The above-mentioned nebulizer prompts the user to perform an inhalation action through a second prompting method, which is similar to the electronic device 100 prompting the user to perform an exhalation action through a second prompting method. Therefore, the embodiments of this application will not be described in detail here.

[0443] In some embodiments, the nebulizer may have a display screen that shows text, images, or videos to prompt the user to inhale or exhale. Optionally, the nebulizer may also prompt the user to inhale or exhale via voice or vibration.

[0444] When the electronic device 100 provides breathing guidance, it needs to establish a communication connection with the nebulizer before instructing the user's breathing rhythm. When the nebulizer begins delivering medication, it sends Command 1 to the electronic device 100 via its communication module. Upon receiving Command 1, the electronic device 100 prompts the patient to begin inhaling. When the nebulizer pauses medication delivery, it sends Command 2 to the electronic device 100 via its communication module. Upon receiving Command 2, the electronic device 100 prompts the patient to begin exhaling. This ensures that the patient begins inhaling while the nebulizer is delivering medication, allowing the medication to reach the patient's respiratory tract and resulting in better therapeutic effects.

[0445] The communication connection between the aforementioned electronic device 100 and the atomizer can be a wired connection or a wireless connection. Wireless connections can include wireless local area network (WLAN) connections, wireless fidelity (Wi-Fi) connections, Bluetooth connections, infrared connections, near field communication (NFC) connections, ZigBee connections, and other wireless communication technologies that emerge in future developments. The atomizer can also establish a long-distance connection with the electronic device 100, including but not limited to long-distance connections based on 2G, 3G, 4G, 5G, and subsequent standard protocols of mobile networks. The atomizer and the electronic device 100 can also log into the same user account (e.g., a Huawei account) and then establish a long-distance connection through a server.

[0446] III. Monitoring of respiratory diseases (e.g., asthma)

[0447] Electronic device 100 can collect physiological data such as the user's heart rate, respiratory rate, blood oxygen level, and asthma sounds emitted from the lungs to determine whether the user's asthma is flaring up.

[0448] When the electronic device 100 detects an asthma attack in the user, it can provide breathing guidance to alleviate the symptoms of the asthma attack.

[0449] Optionally, before providing breathing guidance, the electronic device 100 may display text, images, or video tutorials on the screen to offer suggestions, or provide suggestions via voice, so that the user knows how to relieve symptoms during an asthma attack.

[0450] For example, electronic device 100 may use voice prompts to guide the user to take deep breaths, adjust their posture, or use relevant medications. The voice prompts could include phrases like "Deep inhale, slow exhale," "Choose a semi-recumbent or sitting position, unbutton any buttons near your neck to ensure smooth breathing," or "Please use a bronchodilator inhaler."

[0451] For example, electronic device 100 can display animations on the screen, and at the same time, electronic device 100 can prompt the user to follow the animations on the screen to perform actions, such as choosing the correct lying posture, how to control breathing rhythm, etc.

[0452] When the electronic device 100 provides breathing guidance, it can prompt the user to take a deep breath using a first prompt, followed by a certain interval (e.g., 2 seconds) and then prompt the user to exhale slowly using a second prompt. This rhythmic breathing can alleviate the user's asthma symptoms during an attack.

[0453] Optionally, the electronic device 100 can prompt the user to take the medicine via voice, text, or vibration, and display the corresponding medicine name and instructions on the screen of the electronic device 100.

[0454] Optionally, if the electronic device 100 detects that the user's physiological data is higher than normal, the electronic device 100 can ask the user if they need help via a voice module. If the voice recognition result is "yes," or if the electronic device 100 does not receive any response after a certain period of time, the electronic device 100 can assume that the user needs help. On one hand, the electronic device 100 stores the contact information of emergency contacts, and can directly send the user's physiological data and possible symptom information (such as asthma) to the emergency contacts. On the other hand, the electronic device 100 can send the user's current location, name, home address, medical history, contact number, physiological data, and possible symptom information to the server. The server calls a map service to find the nearest community health service center to the user's current location and obtains its name, on-duty staff, and contact number. The server then informs the nearest community health service center of the user's current location, name, home address, medical history, contact number, physiological data, and possible symptom information through an application or other means. Afterwards, if the on-duty staff at the nearest community health service center sees the user's information, they will contact the user via a phone call sent by the server to inquire if they need help and to take further first aid measures and assistance.

[0455] Figure 20 An exemplary schematic diagram of a breathing guidance method provided in an embodiment of this application is shown.

[0456] like Figure 20 As shown, the method includes:

[0457] S2001, Electronic device 100 (first electronic device) acquires sensor data and determines the user's action type based on the sensor data.

[0458] Electronic device 100 can be a mobile phone, wearable device, headphones, smart glasses, augmented reality (AR) device, virtual reality (VR) device, etc. Wearable devices can be wrist-supported devices, such as smartwatches, smart bracelets, smart wristbands, etc. Wearable devices can also be ankle-supported devices, such as smart ankle bracelets, smart shoes, smart socks, or other devices worn on the legs. Wearable devices can also be head-supported devices, such as smart helmets, smart headbands (also known as smart headbands).

[0459] Electronic equipment 100 can also include medical devices and fitness equipment, etc. Medical devices may include, but are not limited to, ventilators, nebulizers, endoscopes, chest X-ray equipment, etc. Fitness equipment may include, but is not limited to, boats, rowing machines, elliptical trainers, barbells, etc.

[0460] Sensor data includes one or more of the following: acceleration data, gyroscope data, image data, gravity data, and pressure data.

[0461] Before acquiring sensor data, the electronic device 100 receives and responds to a first input operation to determine a first exercise mode. The first exercise mode can be any of the following: running mode, swimming mode, weightlifting mode, elliptical trainer mode, rowing machine mode, or rowing mode. Based on the sensor data, the electronic device 100 determines the user's movement type within the first exercise mode. In this way, the electronic device 100 can activate different exercise modes before the user exercises and provide different breathing guidance schemes in different exercise modes. For details, please refer to... Figure 3A , Figures 3B-3D The embodiments shown are not repeated here.

[0462] In other possible implementations, the electronic device 100 can adaptively activate a first motion mode (e.g., running mode) based on collected motion sensor data. After the electronic device 100 adaptively activates the first motion mode, it displays a first interface with a first control. The electronic device 100 receives and responds to user input on the first control, and then deactivates the first motion mode. This prevents the electronic device 100 from accidentally activating the first motion mode, thus reducing the power consumption of the electronic device 100. The first interface can be... Figure 3E The user interface shown can have the first control as... Figure 3E The control shown is 314. For details, please refer to... Figures 3A-3E The embodiments shown are not repeated here.

[0463] Before acquiring sensor data, electronic device 100 receives sensor data sent by a third electronic device. The third electronic device can be a fitness equipment or a medical device. In other words, the first electronic device establishes a communication connection with itself. The third electronic device collects motion sensor data from its own sensors in real time and sends the motion sensor data back to the first electronic device in real time.

[0464] Optionally, before the electronic device 100 begins guiding the user's breathing, the electronic device 100 may display guiding actions on the display screen. These guiding actions are used to indicate the breathing actions corresponding to different types of user movements. For details, please refer to... Figures 5D-5F The illustrated embodiment

[0465] Optionally, before the electronic device 100 begins guiding the user's breathing, the electronic device 100 may display an animation on the screen. This animation is used to indicate the breathing actions corresponding to different types of user movements.

[0466] S2002. When the electronic device 100 determines that the user's action type is the first action type, the electronic device 100 outputs a first prompt, which is used to prompt the user to perform an inhalation action.

[0467] In one possible implementation, the first action can be determined by the electronic device 100 based on the user's motion data collected by the electronic device 100, which identifies the user's motion posture as the first action.

[0468] When the first action is a user's movement posture, it can be either an arm movement or a leg movement. During the movement, the arm and leg movements are coordinated and performed simultaneously. This embodiment of the application uses the user's arm movement as an example for illustration.

[0469] For descriptions and introductions of the first movement during exercise, please refer to... Figures 5A-5B , Figures 6A-6B , Figures 7A-7B , Figures 8A-8B , Figures 9A-9B , Figures 10A-10B , Figures 11A-11B , Figures 12A-12B , Figures 13A-13B The embodiments shown are not repeated here.

[0470] In other possible implementations, the first action could also be that the third electronic device determines its motion posture based on the motion data it collects, and then infers the user's motion posture from this motion posture. After inferring the user's motion posture, the third electronic device sends a command to the electronic device 100, which instructs the electronic device 100 to perform the first action.

[0471] Before the user begins exercising, the third electronic device needs to establish a communication connection with electronic device 100. This communication connection can be wired or wireless. Wireless connections can be short-range connections such as Wi-Fi, Bluetooth, infrared, NFC, and ZigBee, or long-range connections, including but not limited to those based on 2G, 3G, 4G, 5G, and subsequent standard protocols on mobile networks. For example, electronic device 100 and the third electronic device can log into the same user account (e.g., a Huawei account) and then establish a long-range connection through a server.

[0472] After the third electronic device infers that the user's movement posture is the first action, the third electronic device sends instruction one to electronic device 100. After receiving instruction one, electronic device 100 prompts the user to inhale through the first prompt method.

[0473] In other possible implementations, the first action is the movement posture of another electronic device (e.g., a medical device). The other electronic device determines its movement posture based on motion data collected by itself. When the other electronic device determines its movement posture as the first action, it sends a command to electronic device 100. Upon receiving the command, electronic device 100 prompts the user to inhale via a first prompt. This allows the user's breathing rhythm to match the movement posture of the other electronic device (e.g., the medical device), especially useful in health-related fields such as gastroscopy, nebulizer treatment, and chest X-rays. When the other electronic device's movement posture is the first action, it sends a command to electronic device 100. Upon receiving the command, i.e., upon detecting the other electronic device's movement posture as the first action, electronic device 100 prompts the user to inhale via a first prompt. This allows the user's breathing rhythm to match the medical device's movement, alleviating discomfort during health checks and improving treatment effectiveness. For more details, please refer to [link to relevant documentation]. Figures 18-19 The second embodiment described herein will not be repeated here.

[0474] S2003. When the electronic device 100 determines that the user's action type is the second action type, the electronic device 100 outputs a second prompt. The second prompt is used to prompt the user to perform an exhalation action. The first prompt is different from the second prompt.

[0475] The second action is similar to the first action. For details, please refer to the relevant explanation of the first action in S2002. The embodiments of this application will not be repeated here.

[0476] Optionally, while the electronic device 100 outputs the first prompt, it sends a first instruction to the second electronic device. This first instruction instructs the second electronic device to output a third prompt, which prompts the user to inhale. The third prompt can be any one or more of the following: vibration, voice, text, or image. In this way, the electronic device 100 can output the third prompt simultaneously with the first prompt via another connected electronic device (e.g., a headset or mobile phone). Alternatively, in other possible implementations, the electronic device 100 may not output any content, but instead output the third prompt via another connected electronic device (e.g., a headset or mobile phone).

[0477] Optionally, a third electronic device collects sensor data and determines the user's action type based on the sensor data. When the third electronic device determines that the user's action type is a first action type, the third electronic device sends instruction one to the first electronic device. After receiving instruction one, the first electronic device outputs a first prompt, which prompts the user to perform an inhalation action. When the third electronic device determines that the user's action type is a second action type, the third electronic device sends instruction two to the first electronic device. After receiving instruction two, the first electronic device outputs a second prompt, which prompts the user to perform an exhalation action. The first prompt and the second prompt are different.

[0478] The first notification method can be any one or more of the following: vibration, voice, text, or image.

[0479] The second prompt can be any one or more of the following: vibration, voice, text, or image.

[0480] For example, the vibration frequency of the first prompt is different from that of the second prompt. Or the voice content of the first prompt is different from that of the second prompt. Or the type of the first prompt is any one or more of the following: vibration, voice, text, image; the second prompt does not output any content; or the first prompt does not output any content; the type of the second prompt is any one or more of the following: vibration, voice, text, image.

[0481] In this way, the electronic device 100 can prompt the user when to inhale and when to exhale through different prompting methods, so that the rhythm of the movement matches the user's breathing rhythm, saving energy and improving the user's exercise ability.

[0482] Optionally, after the electronic device 100 outputs the first prompt and before it outputs the second prompt, when the electronic device 100 determines that the user's action type is a third action type, the electronic device 100 outputs a fourth prompt. The fourth prompt is used to prompt the user to perform a breath-holding action. The type of the fourth prompt can be any one or more of the following: vibration, voice, text, or image. For example, in weightlifting, after completing the first movement, the user holds the barbell at its highest point for a period of time; this period of time can be considered the third movement. Similarly, in swimming, after completing the first movement, the user holds their arm position still for a period of time; this can also be considered the third movement. In one possible implementation, when the user performs the third movement, the electronic device 100 prompts the user to hold their breath using the fourth prompt. In other possible implementations, the electronic device 100 prompts the user to perform one or more short sets of exhalation and inhalation movements using the fourth prompt.

[0483] Optionally, when the electronic device 100 determines that the user's action type is a first action type, and the electronic device 100 detects that the user has completed the first action, the electronic device 100 outputs a first prompt, which prompts the user to perform an inhalation action. For example, in a swimming application scenario, the user's head can only emerge from the water and perform an inhalation action after completing the first action. In other possible implementations, when the electronic device 100 determines that the user's action type is a second action type, and the electronic device 100 detects that the user has completed the second action, the electronic device 100 outputs a second prompt, which prompts the user to perform an exhalation action. For example, in a swimming application scenario, after the user completes the second action, the electronic device 100 prompts the user to exhale.

[0484] Optionally, the electronic device 100 can continuously provide breathing guidance to the user from the start of exercise until the end. This allows the electronic device 100 to provide breathing guidance throughout the user's exercise, enabling the user to better coordinate their movements and breathing rhythm. For example, during running, when the electronic device 100 detects the user's arm swinging forward, it prompts the user to inhale via a first prompt. When it detects the user's arm swinging backward, it prompts the user to exhale via a second prompt. The electronic device 100 stops guiding the user's breathing until the user finishes exercising. In this way, the electronic device 100 can continuously guide the user's breathing throughout running, allowing the user to better coordinate their arm movements and breathing rhythm.

[0485] Optionally, during exercise, the user can actively trigger the pause and / or resumption of the breathing guidance provided by the electronic device 100. For example, during running, the electronic device 100 can receive and respond to the user's voice, pausing or resuming guidance on breathing movements in conjunction with the user's arm swing. For instance, when the device 100 is guiding the user's breathing, the user can wake up the electronic device 100 by saying "Hey A, Hey A, pause breathing guidance." After recognizing the user's voice, the electronic device 100 will pause monitoring the user's arm movements while running, thus pausing the guidance on breathing movements. When the user wants to resume breathing guidance through the electronic device 100, they can wake up the device by saying "Hey A, Hey A, resume breathing guidance." After recognizing the user's voice, the electronic device 100 will resume monitoring the user's arm movements while running and provide further guidance on breathing movements in conjunction with these movements. This allows the user to flexibly control the electronic device 100 according to their needs, improving the user experience.

[0486] During user exercise, the electronic device 100 can adaptively pause its breathing guidance. For example, while the user is running, when the electronic device 100 detects the user's arm swinging forward, it prompts the user to inhale via a first prompt. When it detects the user's arm swinging backward, it prompts the user to exhale via a second prompt. After a period of time (the first time) following the user's breathing guidance, the electronic device 100 pauses monitoring the user's arm movements while running, and simultaneously pauses its breathing guidance. This saves the electronic device 100's power consumption compared to continuously guiding the user's breathing throughout the run.

[0487] Optionally, during user exercise, the electronic device 100 can pause its breathing guidance for the user, and then adaptively resume it. For example, after pausing the monitoring of the user's arm movements and breathing guidance, the electronic device 100 can collect the user's breathing rate through its built-in microphone, or, if headphones are connected to the electronic device 100 and the user is listening to music while exercising, the electronic device 100 can also collect the user's breathing rate through the microphone on the headphones connected to the electronic device 100. When the electronic device 100 determines that the user's breathing rate does not match the breathing rate in the running mode breathing guidance scheme, it can prompt the user whether breathing guidance is needed through voice, vibration, text, etc. Alternatively, when the electronic device 100 determines that the user's breathing rate is higher than the breathing rate in the running mode breathing guidance scheme, it can prompt the user to slow down their breathing rate. When the electronic device 100 determines that the user's breathing rate is lower than the breathing rate (preset frequency) in the running mode breathing guidance scheme, it can prompt the user to increase their breathing rate. After the electronic device 100 continues to monitor the user's arm movements and guide breathing for a period of time, if the electronic device 100 determines that the user's breathing rate matches the breathing rate in the running mode breathing guidance program, then the electronic device 100 can pause the monitoring of the user's arm movements and the guidance of breathing. This demonstrates the flexibility of the electronic device 100 in providing breathing guidance to the user.

[0488] Optionally, during exercise, the electronic device 100 can acquire the user's heart rate in real time and determine the user's rest time based on the heart rate. For example, during running, the electronic device 100 can acquire the user's heart rate in real time and determine the user's rest time based on the heart rate. Specifically, the electronic device 100 determines the user's metabolic mode based on heart rate changes, including: aerobic and anaerobic, or aerobic, anaerobic lactate, anaerobic lactate-free, etc. Different metabolic modes correspond to different rest times. After the user finishes a certain stage of exercise, the electronic device 100 can prompt the user for the rest time. Alternatively, if the electronic device 100 determines that the user's heart rate is outside the preset heart rate range (preset heart rate value) during running, the electronic device 100 can prompt the user to stop exercising and begin resting through voice, vibration, text, etc. Alternatively, during rest, the electronic device 100 can prompt the user to stop resting and resume exercise based on changes in the user's heart rate.

[0489] Optionally, during user movement, the electronic device 100 can pause monitoring the user's breathing, and then adaptively resume providing breathing guidance. For example, after pausing monitoring of the user's arm movements and providing breathing guidance, the electronic device 100 can collect the user's heart rate. If the electronic device 100 determines that the user's heart rate is outside the preset heart rate range, it can prompt the user via voice, vibration, or text to indicate whether breathing guidance is needed. Alternatively, after the electronic device 100 continues monitoring the user's arm movements and providing breathing guidance for a period of time, if it determines that the user's heart rate is within the preset heart rate range, it can pause monitoring of the user's arm movements and providing breathing guidance. This demonstrates the flexibility of the electronic device 100 in providing breathing guidance to the user.

[0490] Optionally, the electronic device 100 can determine the user's preset heart rate based on their exercise capacity. If the electronic device 100 pauses breathing guidance for the user, or if breathing guidance was not activated before the user started exercising, and the user's heart rate is higher than the preset heart rate, the electronic device 100 can adaptively activate breathing guidance. For example, during running, the electronic device 100 may pause breathing guidance for the user, or the user may not have activated breathing guidance before starting to run. The electronic device 100 can acquire the user's heart rate in real time during running. If the electronic device 100 detects that the user's heart rate is higher than the preset heart rate, it can ask the user whether they need to activate the breathing guidance function via voice, vibration, or text. Alternatively, the electronic device 100 can automatically activate the breathing guidance function and guide the user's breathing movements in conjunction with their running arm swing, ensuring that the user's arm swing movements match the rhythm of their breathing during running.

[0491] Optionally, during the user's exercise, the electronic device 100 may pause providing breathing guidance, or the electronic device 100 may not have activated the breathing guidance function before the user begins exercising. In this case, the electronic device 100 may prompt the user whether breathing guidance is needed after a period of time, based on the user's exercise ability and considering one or more factors such as exercise type, exercise goal, temperature, humidity, and air pressure.

[0492] Optionally, the electronic device 100 can prompt the user whether they need to rest after exercising for a period of time, based on the user's exercise capacity.

[0493] In one possible implementation, the electronic device 100 can determine the user's preset exercise time based on the user's exercise ability. If the user's running time exceeds the preset exercise time, the electronic device 100 can prompt the user whether they need to rest.

[0494] In other possible implementations, the electronic device 100 can determine the user's preset heart rate based on the user's exercise capacity. The electronic device 100 can acquire the user's heart rate in real time, and if the electronic device 100 detects that the user's heart rate is higher than the preset heart rate, the electronic device 100 can prompt the user whether they need to rest.

[0495] Next, we will explain how the electronic device 100 determines the user's motor ability.

[0496] Figure 21 An exemplary diagram illustrates how an electronic device 100 obtains a user's athletic ability based on the user's personal information.

[0497] First, the electronic device 100 acquires the user's personal information. This personal information includes, but is not limited to: gender, age, height and weight, VO2 max, resting heart rate, and maximum heart rate, etc. VO2 max can be the maximum value among the user's VO2 max data acquired by the electronic device 100 during previous exercise. Maximum heart rate can be the maximum value among the user's heart rate data acquired by the electronic device 100 during previous exercise. The user's personal data can be stored in the electronic device 100, entered by the user, or obtained from other connected devices.

[0498] Subsequently, the electronic device 100 assesses the user's athletic ability based on the user's personal information and a fuzzy evaluation system.

[0499] A fuzzy evaluation system refers to a system that uses fuzzy mathematics to assess the probability of an object receiving a certain evaluation based on a set of criteria, given that the object is influenced by multiple parameters. In other words, the output of the fuzzy evaluation system varies depending on the proportion of each parameter. The electronic device 100 can either set the proportion of each parameter input to the fuzzy evaluation system to be the same or different; this embodiment does not impose any limitations on this.

[0500] Every parameter in a user's personal information is related to their athletic ability. For example, men are generally more athletic than women. Young people are generally more athletic than teenagers and older adults. People with higher oxygen uptake are generally more athletic than those with lower oxygen uptake, and so on.

[0501] Electronic device 100 inputs the user's personal information into a fuzzy evaluation system, which then outputs the user's athletic ability. Athletic ability can be categorized into levels of weak, moderate, strong, and excellent. Of course, athletic ability can also be divided into more or fewer levels; this embodiment does not limit the scope of the application.

[0502] Because users' personal information changes, electronic device 100 needs to periodically update users' personal information. Therefore, electronic device 100 can also periodically update users' athletic abilities.

[0503] After the user begins exercising, the electronic device 100 can display the exercise results. The exercise results displayed by the electronic device 100 may include, but are not limited to, the following:

[0504] I. User Activity Data

[0505] User exercise data includes heart rate, calories burned, respiratory rate, exercise time, exercise date, number of exercise days, etc. This allows users to understand their exercise status in detail based on the results. Additionally, user exercise data can include current and historical data, allowing users to compare their current and past performance to see if they have made progress and whether their body has been properly exercised.

[0506] II. Dietary Precautions

[0507] Electronic device 100 can determine the nutrients a user needs to ingest after exercise based on data such as energy expenditure and exercise time. For example, electronic device 100 can display the user's nutrient intake ratio or recommended foods in the exercise results. This nutrient intake ratio can indicate the proportion of protein, carbohydrates, fats, dietary fiber, water, etc., that the user needs to consume after this exercise. Recommended foods may include milk, eggs, beef, etc., and electronic device 100 can recommend different foods based on the intensity of the user's exercise. This helps the user recover their energy more quickly and replenish the energy consumed during exercise.

[0508] It is understood that the exercise results are not limited to the above-mentioned content, and may also include data such as the user's basic information. This application embodiment does not limit this.

[0509] Furthermore, the electronic device 100 can also provide a sharing function, which allows users to share their exercise results to other devices or other social platforms.

[0510] The various embodiments of this application can be combined arbitrarily to achieve different technical effects.

[0511] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This program can be stored in a computer-readable storage medium, and when executed, it can include the processes described in the above method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM or random access memory (RAM), magnetic disks, or optical disks.

[0512] In summary, the above description is merely an embodiment of the technical solution of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made according to the disclosure of the present invention should be included within the scope of protection of the present invention.

Claims

1. A breathing guidance method, characterized in that, The method includes: The first electronic device acquires sensor data; The first electronic device determines the user's action type based on the sensor data; When the first electronic device determines that the user's action type is a first action type, the first electronic device outputs a first prompt, which prompts the user to perform an inhalation action. When the first electronic device determines that the user's action type is the second action type, the first electronic device outputs a second prompt, which prompts the user to perform an exhalation action. The first prompt is different from the second prompt. Specifically, the first electronic device acquires the sensor data including: The first electronic device receives and responds to the first input operation to determine the first motion mode; When the first motion mode includes a first type of motion, the first electronic device collects the sensor data to obtain the sensor data; When the first motion mode includes the second type of motion, the first electronic device establishes a communication connection with the third electronic device and receives sensor data collected by the sensors of the third electronic device as the sensor data, wherein the first type of motion and the second type of motion are different.

2. The method according to claim 1, characterized in that, The first notification can be any one or more of the following: vibration, voice, text, or image; The second prompt can be any one or more of the following: vibration, voice, text, or image.

3. The method according to claim 2, characterized in that, The first prompt differs from the second prompt in that it includes: The vibration frequency of the first prompt is different from that of the second prompt.

4. The method according to claim 2, characterized in that, The first prompt differs from the second prompt in that it includes: The audio content of the first prompt is different from the audio content of the second prompt.

5. The method according to claim 1, characterized in that, The first prompt differs from the second prompt in that it includes: The first notification can be any one or more of the following: vibration, voice, text, or image; The second prompt does not output any content; or, The first prompt does not output any content; The second prompt can be any one or more of the following: vibration, voice, text, or image.

6. The method according to any one of claims 1-5, characterized in that, The method further includes: While the first electronic device outputs the first prompt, the first electronic device sends a first instruction to the second electronic device. The first instruction is used to instruct the second electronic device to output a third prompt, which is used to prompt the user to perform an inhalation action. The type of the third prompt is any one or more of the following: vibration, voice, text, and image.

7. The method according to any one of claims 1-5, characterized in that, When the first electronic device determines that the user's action type is a first action type, the electronic device outputs a first prompt, specifically including: When the first electronic device determines that the user's action type is the first action type n times consecutively, the electronic device outputs the first prompt, where n is a positive integer greater than or equal to 1.

8. The method according to any one of claims 1-5, characterized in that, After the first electronic device outputs the first prompt and before the first electronic device outputs the second prompt, the method further includes: When the first electronic device determines that the user's action type is the third action type, the first electronic device outputs a fourth prompt, which is used to prompt the user to perform a breath-holding action; wherein, the type of the fourth prompt is any one or more of the following: vibration, voice, text, and image.

9. The method according to any one of claims 1-5, characterized in that, When the first electronic device determines that the user's action type is a first action type, the first electronic device outputs a first prompt, which prompts the user to perform an inhalation action, specifically including: When the first electronic device determines that the user's action type is the first action type, and the first electronic device detects that the user has completed the first action, the first electronic device outputs the first prompt, which is used to prompt the user to perform an inhalation action.

10. The method according to any one of claims 1-5, characterized in that, The first exercise mode is any one of the following: running mode, swimming mode, weightlifting mode, elliptical machine exercise mode, rowing machine exercise mode, or rowing mode; The first electronic device determines the user's action type based on the sensor data, specifically including: The first electronic device determines the user's action type in the first motion mode based on the sensor data.

11. The method according to claim 1, characterized in that, The sensor data includes one or more of the following: acceleration data, gyroscope data, image data, gravity data, and pressure data.

12. The method according to claim 10, characterized in that, The method further includes: Within a first period of time after the first electronic device determines the first motion mode, the first electronic device pauses the acquisition of the sensor data.

13. The method according to claim 12, characterized in that, The method further includes: After the first electronic device pauses acquiring the sensor data, if the first electronic device detects that the user's heart rate is greater than a preset heart rate value and / or the user's respiratory rate is greater than a preset frequency, the first electronic device continues to acquire the sensor data.

14. An electronic device, characterized in that, The electronic device includes: one or more processors and one or more memories; the one or more memories are coupled to the one or more processors, the one or more memories are used to store computer program code, the computer program code including computer instructions, and the one or more processors call the computer instructions to cause the electronic device to perform the method of any one of claims 1-13.

15. A computer-readable storage medium comprising instructions, characterized in that, When the instructions are executed on an electronic device, the electronic device causes the electronic device to perform the method as described in any one of claims 1-13.

16. A computer program product, characterized in that, When the computer program product is run on an electronic device, it causes the electronic device to perform the method as described in any one of claims 1-13.