Climbing state identification method and device

By acquiring acceleration and air pressure data, and using altitude and time differences to eliminate interference scenarios, the accuracy of the terminal device in identifying the climbing state is improved, and the problem of low accuracy in the existing technology is solved.

CN117367487BActive Publication Date: 2024-09-10HONOR DEVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210770042.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-01
Publication Date
2024-09-10
Estimated Expiration
2042-07-01

AI Technical Summary

Technical Problem

Existing terminal equipment has low accuracy in identifying the climbing state, and is easily misjudged as climbing state by interference scenes.

Method used

By obtaining acceleration data and air pressure data, it is determined whether the terminal device is in a walking and climbing state, and the altitude difference and time difference are used to eliminate interference scenarios and improve the accuracy of climbing state recognition.

Benefits of technology

It effectively avoids the impact of interference scenes on the recognition of climbing status, improves the accuracy of walking climbing status recognition, and is suitable for the recognition of multiple climbing statuses.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117367487B
    Figure CN117367487B
Patent Text Reader

Abstract

The embodiment of the present application provides a method and device for identifying a climbing state, which relates to the field of terminal technology. The method includes: determining whether a first terminal device is in a first state based on acceleration data, wherein the first state is used to indicate that the first terminal device is located at different altitudes at at least two moments when the first terminal device is in the first state; when the first terminal device is not in the first state, determining that the first terminal device is in a walking climbing state based on first air pressure data obtained at a first moment and second air pressure data obtained at a second moment; wherein the first terminal device in the walking climbing state is located at different altitudes at the first moment and the second moment. In this way, the first terminal device can detect the first state, avoid the first state affecting the identification of the walking climbing state, and thus improve the accuracy of the method for identifying the climbing state.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of terminal technology, and in particular to a method and device for identifying a climbing state. Background Art

[0002] With the popularization and development of the Internet, people's functional requirements for terminal devices are becoming more and more diverse. For example, in order to meet users' demand for sports health functions, terminal devices can usually detect basic sports data such as exercise time, exercise calories consumed, average exercise pace, average exercise speed, exercise frequency, average exercise stride, and exercise steps when detecting user exercise, and display them in the terminal device interface, so that users can observe various data of the entire exercise process.

[0003] Generally, in addition to detecting the above basic motion data, the terminal device can also identify the climbing state. For example, the terminal device can identify whether the terminal device is in the climbing state based on a pre-built model.

[0004] However, the accuracy of the above climbing state recognition method is low. Summary of the invention

[0005] The embodiments of the present application provide a method and apparatus for identifying a climbing state, so that a terminal device can detect a first state, thereby preventing the first state from affecting the identification of a walking climbing state, thereby improving the accuracy of the climbing state identification method.

[0006] In the first aspect, the embodiment of the present application provides a method for identifying a climbing state, the method comprising: acquiring acceleration data; the acceleration data is data acquired within a preset time period; the preset time period includes a first moment and a second moment; based on the acceleration data, determining whether the first terminal device is in a first state, the first state is used to indicate that the first terminal device is located at different altitudes at at least two moments when the first terminal device is in the first state; when the first terminal device is not in the first state, determining that the first terminal device is in a walking climbing state based on first air pressure data acquired at the first moment and second air pressure data acquired at the second moment; wherein the first terminal device in the walking climbing state is located at different altitudes at the first moment and the second moment. In this way, the first terminal device can detect the first state, avoid the first state affecting the identification of the walking climbing state, and thereby improve the accuracy of the method for identifying the climbing state.

[0007] In a possible implementation, determining that the first terminal device is in a walking climbing state based on the first air pressure data obtained at the first moment and the second air pressure data obtained at the second moment includes: determining the difference between the altitude corresponding to the first air pressure data and the altitude corresponding to the second air pressure data to obtain the altitude difference; when the altitude difference is greater than a first threshold, determining that the first terminal device is in a walking climbing state. In this way, the first terminal device can determine whether the altitude has increased based on the altitude difference between the first air pressure data and the second air pressure data.

[0008] In a possible implementation, the first state includes one or more of the following: a flying climbing state, an elevator climbing state, a car climbing state, a riding climbing state, a scooter climbing state, or a balance car climbing state. In this way, the first terminal device can recognize a variety of other climbing states that affect the walking climbing state, and improve the accuracy of the walking climbing state recognition.

[0009] In a possible implementation, the first air pressure data is the changed data collected by the second terminal device after detecting the change in air pressure. In this way, when the first terminal device does not include a barometer, the climbing state can be identified based on the air pressure data collected by the second terminal device, so that the climbing state identification method provided in the embodiment of the present application can be applied to more types of first terminal devices. Among them, the second terminal device can be the wearable device described in the embodiment of the present application.

[0010] In a possible implementation, the method further includes: obtaining pedometer data corresponding to the third moment; the pedometer data corresponding to the third moment is the data corresponding to the first change in the number of steps after the first moment; determining the difference between the first moment and the third moment to obtain the time difference; when the altitude difference is greater than the first threshold, determining that the first terminal device is in a walking climbing state, including: when the altitude difference is greater than the first threshold and the time difference is less than the second threshold, determining that the first terminal device is in a walking climbing state. It can be understood that since the change in air pressure data will inevitably be accompanied by a change in the number of steps during the walking climbing process, the difference between the first moment and the third moment must be less than the time threshold. Based on this, the terminal device can exclude the situation where the change time of the air pressure data in the non-climbing state is large in difference with the change time of the number of steps by determining the difference between the first moment and the third moment and the relationship between the time threshold, thereby improving the accuracy of the walking climbing state recognition.

[0011] In a possible implementation, the method further includes: obtaining multiple base station number information between the first moment and the second moment; when the number of changes in the multiple base station number information exceeds a third threshold, the altitude difference is less than or equal to the first threshold, and / or the time difference is greater than or equal to the second threshold, determining that the first terminal device is not in a walking climbing state. It is understandable that since the user's climbing height increases slowly when walking, it is difficult for the base station to switch multiple times in a short period of time. Therefore, by determining the number of base station switches within a time threshold, the scene that does not belong to the climbing state can be excluded, thereby improving the accuracy of climbing state recognition.

[0012] In a possible implementation, the method further includes: when determining that the first terminal device is in a walking climbing state, determining the sum of the first pedometer data and the second pedometer data to obtain a step accumulation value; wherein the first pedometer data is the pedometer data obtained at the first moment, and the second pedometer data is the pedometer data obtained at the second moment; when the step accumulation value is greater than the product of the altitude difference and the fourth threshold, determining the altitude difference as the climbing height in the walking climbing state. It can be understood that in the process of walking without height, there is a certain corresponding relationship between the climbing steps and the climbing height, for example, the higher the climbing height, the more climbing steps, so in order to avoid unreasonable situations such as fewer climbing steps and higher climbing height or more climbing steps and less climbing height, the terminal device can use the relationship between the step accumulation value and the altitude difference to screen out a climbing height that is more in line with the actual scene.

[0013] In a possible implementation, the method further includes: displaying a first interface; the first interface includes a first control for indicating the start of exercise recording; when an operation on the first control is received, displaying a second interface; wherein the second interface includes the climbing height. In this way, the first terminal device can realize real-time display of the climbing height, thereby improving the user's experience of using the exercise recording function.

[0014] In a possible implementation, the method further includes: when the first terminal device receives an operation to end the exercise record, displaying a third interface; wherein the third interface includes information for indicating the highest climbing height and a second control for viewing an exercise chart; when the first terminal device receives an operation for the second control, displaying a fourth interface; the fourth interface includes: a chart for indicating the change in climbing height. In this way, the first terminal device can display the highest climbing height and the change in climbing height during the walking process after the exercise record is ended, so that the user can grasp the overall situation of the exercise process, thereby improving the user's experience of using the exercise recording function.

[0015] In a possible implementation, the method further includes: when the first terminal device is in the first state, determining that the first terminal device is not in a walking climbing state. In this way, the first terminal device can eliminate interference from the first state.

[0016] In a possible implementation, the first terminal device includes: a Bluetooth hardware abstraction layer BT HAL, a connection service module and a preset HAL, wherein the BT HAL and the preset HAL are located in the HAL, and the connection service module is located in the application framework layer, and the method further includes: the BT HAL obtains the first air pressure data and the second air pressure data; the first air pressure data and the second air pressure data are both sent by the second terminal device based on Bluetooth; the BT HAL sends the first air pressure data and the second air pressure data to the connection service module; the connection service module sends the first air pressure data and the second air pressure data to the preset HAL; based on the first air pressure data obtained at the first moment and the second air pressure data obtained at the second moment, determining that the first terminal device is in a walking and climbing state includes: the preset HAL determines that the first terminal device is in a walking and climbing state based on the first air pressure data and the second air pressure data. In this way, when there is no barometer in the first terminal device, the first terminal device can obtain the air pressure data from the second device, and transmit the air pressure data to the preset HAL that can perform walking and climbing state recognition based on multiple modules in the first terminal device, so that the climbing state recognition method provided in the embodiment of the present application can be applied to more types of first terminal devices.

[0017] In a possible implementation, the first terminal device further includes: a preset sensor control center sensorhub, which determines whether the first terminal device is in the first state based on acceleration data, including: the preset sensor hub determines whether the first terminal device is in the first state based on acceleration data. In this way, the sensor hub can acquire and process sensor data in low-power scenarios, so that the climbing state recognition method provided in the embodiment of the present application can be applied to the first terminal device in more scenarios.

[0018] In a possible implementation, the HAL further includes: a modem HAL, and the method further includes: the modem HAL obtains multiple base station number information between the first moment and the second moment; the modem HAL sends the multiple base station number information to the preset HAL; when the number of changes in the multiple base station number information exceeds the third threshold, the altitude difference is less than or equal to the first threshold, and / or the time difference is greater than or equal to the second threshold, the preset HAL determines that the first terminal device is not in a walking climbing state. Therefore, by determining the number of base station switching times within a time threshold, the scene that does not belong to the climbing state can be excluded, thereby improving the accuracy of the climbing state recognition.

[0019] In a second aspect, an embodiment of the present application provides a method for identifying a climbing state, the method comprising: establishing a communication connection with a second terminal device; sending a first instruction to the second terminal device; the first instruction is used to instruct the second terminal device to obtain first air pressure data and second air pressure data collected after the air pressure changes; receiving the first air pressure data and the second air pressure data from the second terminal device; obtaining acceleration data; the acceleration data is data obtained within a preset time period; the preset time period includes a first moment and a second moment; based on the acceleration data, determining whether the first terminal device is in a first state; the first state is used to indicate that the first terminal device is located at different altitudes at at least two moments when the first terminal device is in the first state; when the first terminal device is not in the first state, determining that the first terminal device is in a walking climbing state based on the first air pressure data obtained at the first moment and the second air pressure data obtained at the second moment; wherein the first terminal device in the walking climbing state is located at different altitudes at the first moment and the second moment. In this way, in the case where the terminal device does not have a barometer, the first terminal device obtains air pressure data from the second device based on the indication message, so that the climbing state identification method provided in the embodiment of the present application can be applied to more types of first terminal devices.

[0020] In a third aspect, an embodiment of the present application provides a climbing state identification device, including an acquisition unit for acquiring acceleration data; the acceleration data is data acquired within a preset time period; the preset time period includes a first moment and a second moment; a processing unit for determining whether a first terminal device is in a first state based on the acceleration data, the first state being used to indicate that when the first terminal device is in the first state, the first terminal device is located at different altitudes at at least two moments; when the first terminal device is not in the first state, the processing unit is further used to determine that the first terminal device is in a walking climbing state based on first air pressure data acquired at the first moment and second air pressure data acquired at the second moment; wherein the first terminal device in the walking climbing state is located at different altitudes at the first moment and the second moment.

[0021] In a possible implementation, the processing unit is specifically used to determine the difference between the altitude corresponding to the first air pressure data and the altitude corresponding to the second air pressure data to obtain the altitude difference; when the altitude difference is greater than a first threshold, the processing unit is also specifically used to determine that the first terminal device is in a walking climbing state.

[0022] In a possible implementation, the first state includes one or more of the following: a flying climbing state, an elevator climbing state, a car climbing state, a riding climbing state, a scooter climbing state, or a balance car climbing state.

[0023] In a possible implementation, the first air pressure data is changed data collected by the second terminal device after detecting a change in air pressure.

[0024] In a possible implementation, the acquisition unit is further used to acquire pedometer data corresponding to a third moment; the pedometer data corresponding to the third moment is data corresponding to the first change in the number of steps after the first moment; the processing unit is further used to determine the difference between the first moment and the third moment to obtain a time difference; when the altitude difference is greater than a first threshold, when the altitude difference is greater than the first threshold, and when the time difference is less than a second threshold, the processing unit is further used to determine that the first terminal device is in a walking climbing state.

[0025] In a possible implementation, the acquisition unit is also used to obtain multiple base station number information between the first moment and the second moment; when the number of changes in the multiple base station number information exceeds a third threshold, the altitude difference is less than or equal to the first threshold, and / or the time difference is greater than or equal to the second threshold, the processing unit is also used to determine that the first terminal device is not in a walking climbing state.

[0026] In one possible implementation, when it is determined that the first terminal device is in a walking and climbing state, the processing unit is further used to determine the sum of the first pedometer data and the second pedometer data to obtain an accumulated step value; wherein the first pedometer data is the pedometer data obtained at the first moment, and the second pedometer data is the pedometer data obtained at the second moment; when the accumulated step value is greater than the product of the altitude difference and the fourth threshold value, the processing unit is further used to determine that the altitude difference is the climbing height in the walking and climbing state.

[0027] In one possible implementation, the display unit is also used to display a first interface; the first interface includes a first control for indicating the start of exercise recording; when an operation on the first control is received, the display unit is also used to display a second interface; wherein the second interface includes climbing height.

[0028] In one possible implementation, when the first terminal device receives an operation to end the exercise record, the display unit is also used to display a third interface; wherein the third interface includes information for indicating the maximum climbing height and a second control for viewing the exercise chart; when the first terminal device receives an operation for the second control, the display unit is also used to display a fourth interface; the fourth interface includes: a chart for indicating changes in climbing height.

[0029] In a possible implementation manner, the method further includes: when the first terminal device is in the first state, the processing unit is further configured to determine that the first terminal device is not in a walking climbing state.

[0030] In a possible implementation, the first terminal device includes: a Bluetooth hardware abstraction layer BT HAL, a connection service module and a preset HAL, the BT HAL and the preset HAL are located in the HAL, the connection service module is located in the application framework layer, and the processing unit is also used to: obtain first air pressure data and second air pressure data; the first air pressure data and the second air pressure data are both sent by the second terminal device based on Bluetooth; send the first air pressure data and the second air pressure data to the connection service module; send the first air pressure data and the second air pressure data to the preset HAL; determine that the first terminal device is in a walking and climbing state based on the first air pressure data and the second air pressure data.

[0031] In a possible implementation, the first terminal device further includes: a preset sensor control center sensorhub, and a processing module, which is specifically used to determine whether the first terminal device is in the first state based on acceleration data.

[0032] In a possible implementation, the HAL also includes: a modem HAL, an acquisition module, further used to obtain multiple base station number information between the first moment and the second moment; a processing module, further used to: send the multiple base station number information to a preset HAL; when the number of changes in the multiple base station number information exceeds a third threshold, the altitude difference is less than or equal to the first threshold, and / or the time difference is greater than or equal to the second threshold, it is determined that the first terminal device is not in a walking climbing state.

[0033] In a fourth aspect, an embodiment of the present application provides a method for identifying a climbing state, the method comprising: a communication unit, used to establish a communication connection with a second terminal device; the communication unit, also used to send a first instruction to the second terminal device; the first instruction is used to instruct the second terminal device to obtain first air pressure data and second air pressure data collected after the air pressure changes; the communication unit, used to receive the first air pressure data and the second air pressure data from the second terminal device; an acquisition unit, used to acquire acceleration data; the acceleration data is data acquired within a preset time period; the preset time period includes a first moment and a second moment; a processing unit, used to determine whether the first terminal device is in a first state based on the acceleration data; the first state is used to indicate that when the first terminal device is in the first state, the first terminal device is located at different altitudes at at least two moments; when the first terminal device is not in the first state, the processing unit, further used to determine that the first terminal device is in a walking climbing state based on the first air pressure data obtained at the first moment and the second air pressure data obtained at the second moment; wherein the first terminal device in the walking climbing state is located at different altitudes at the first moment and the second moment.

[0034] In a fifth aspect, an embodiment of the present application provides a terminal device, comprising a processor and a memory, the memory being used to store code instructions; the processor being used to run the code instructions, so that the terminal device executes the method described in the first aspect or any one of the implementations of the first aspect, so that the terminal device executes the method described in the second aspect or any one of the implementations of the second aspect.

[0035] In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores instructions. When the instructions are executed, the computer executes the method described in the first aspect or any one of the implementations of the first aspect, and the terminal device executes the method described in the second aspect or any one of the implementations of the second aspect.

[0036] In the seventh aspect, a computer program product comprises a computer program, which, when executed, enables a computer to execute a method as described in the first aspect or any one of the implementations of the first aspect, and enables a terminal device to execute a method as described in the second aspect or any one of the implementations of the second aspect.

[0037] It should be understood that the third to seventh aspects of the present application correspond to the technical solutions in the first to second aspects of the present application, and the beneficial effects achieved by each aspect and the corresponding feasible implementation methods are similar and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] Figure 1 A schematic diagram of a scenario provided for an embodiment of the present application;

[0039] Figure 2 A schematic diagram of the hardware structure of a terminal device provided in an embodiment of the present application;

[0040] Figure 3 A schematic diagram of the software structure of a terminal device provided in an embodiment of the present application;

[0041] Figure 4 A flowchart of a method for identifying a climbing state provided in an embodiment of the present application;

[0042] Figure 5 A schematic diagram of an interface for starting a movement provided in an embodiment of the present application;

[0043] Figure 6 A schematic diagram of an interface for real-time display of climbing height provided in an embodiment of the present application;

[0044] Figure 7 A schematic diagram of an interface for prompting a user to enter a preset function provided in an embodiment of the present application;

[0045] Figure 8A schematic diagram of the structure of a climbing state recognition device provided in an embodiment of the present application;

[0046] Fig. 9 A schematic diagram of the hardware structure of another terminal device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0047] In order to facilitate the clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, words such as "first" and "second" are used to distinguish between identical or similar items with substantially the same functions and effects. For example, the first value and the second value are only used to distinguish different values, and their order is not limited. Those skilled in the art can understand that words such as "first" and "second" do not limit the quantity and execution order, and words such as "first" and "second" do not necessarily limit them to be different.

[0048] It should be noted that, in this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in this application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.

[0049] In the present application, "at least one" means one or more, and "plurality" means two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can mean: a, b, c, a and b, a and c, b and c, or a, b and c, where a, b, c can be single or multiple.

[0050] It is understandable that the climbing state recognition can be used to realize the recognition of the user's motion state in climbing scenes such as mountain climbing or climbing stairs, and the climbing state recognition method described in the embodiment of the present application can be used to realize the recognition of the walking climbing state. Among them, the walking climbing state can be understood as the increase in the altitude of the terminal device caused by the change in the number of steps when the user carrying the terminal device is walking or running, or it can be understood that the altitude of the terminal device increases with the increase in the number of steps of the user.

[0051] In one implementation, some terminal devices with air pressure sensors can recognize the climbing state based on the model for recognizing the climbing state. However, since the terminal device cannot solve the influence of the interference scene on the climbing state during the climbing state recognition process, the terminal device may misjudge the interference scene as the climbing state, resulting in low accuracy of the climbing state recognition.

[0052] The interference scenario may also be referred to as the first state, and the first state is used to indicate that when the terminal device is in the first state, the terminal device is located at different altitudes at at least two moments. It can be understood that when the altitude of the terminal device changes, and it is determined based on the acceleration data that the terminal device belongs to any of the following states: flying, riding, riding, elevator, scooter, or balance car, it can be determined that the terminal device meets the first state.

[0053] For example, the first state may include one or more of the following: airplane scene (or flying climbing state), car scene (or car climbing state), cycling scene (or cycling climbing state), elevator scene (or elevator climbing state), scooter scene (or scooter climbing state), or balance car scene (or balance car climbing state), etc. The interference scene may include other contents according to actual conditions, which is not limited in the embodiments of the present application.

[0054] It can be understood that the flying climbing state can be understood as the increase in altitude of the terminal device caused by the ascent of the airplane (or aircraft, etc.) when the terminal device is in the process of ascending; the riding climbing state can be understood as the increase in altitude of the terminal device caused by the movement of the vehicle when the terminal device is in the process of climbing a slope by riding a car; the riding climbing state can be understood as the increase in altitude of the terminal device caused by the movement of the bicycle when the user carries the terminal device to ride uphill; the elevator climbing state can be understood as the increase in altitude of the terminal device caused by the ascent of the elevator when the terminal device is in the process of ascending; the scooter climbing state can be understood as the increase in altitude of the terminal device caused by the sliding motion when the user carries the terminal device and uses the scooter to slide to a higher place; the balance car climbing state can be understood as the increase in altitude of the terminal device caused by the movement of the balance car when the user carries the terminal device and drives the balance car to climb a slope.

[0055] In view of this, the embodiment of the present application provides a method for identifying a climbing state, wherein a first terminal device acquires acceleration data; the acceleration data is data acquired within a preset time period, and the preset time period includes a first moment and a second moment; based on the acceleration data, it is determined whether the first terminal device is in a first state, and the first state is used to indicate that the first terminal device is located at different altitudes at at least two moments when the first terminal device is in the first state; when the first terminal device is not in the first state, it is determined that the first terminal device is in a walking climbing state based on the first air pressure data acquired at the first moment and the second air pressure data acquired at the second moment; wherein the first terminal device in the walking climbing state is located at different altitudes at the first moment and the second moment. In this way, the first terminal device can avoid mistaking the first state for the climbing state by identifying the first state that affects the identification of the climbing state, thereby improving the accuracy of the identification of the climbing state. wherein the first terminal device may be the terminal device described in the embodiment of the present application.

[0056] In another implementation, some terminal devices that do not have an air pressure sensor find it difficult to independently identify the climbing status.

[0057] In view of this, the embodiment of the present application provides another method for identifying a climbing state, wherein a first terminal device establishes a communication connection with a second terminal device; the first terminal device sends a first instruction to the second terminal device; the first instruction is used to instruct the second terminal device to obtain air pressure data collected after the air pressure changes; the first terminal device receives the air pressure data from the second terminal device; the first terminal device obtains acceleration data; the first terminal device determines whether the first terminal device is in a first state according to the acceleration data; the first state is used to indicate that the first terminal device is located at different altitudes at at least two moments when the first terminal device is in the first state; and then the first terminal device can identify whether the first terminal device is in a climbing state based on the first air pressure data and the second air pressure data. In this way, the first terminal device can avoid mistaking the first state for the climbing state by identifying the first state that affects the identification of the climbing state; and then the second terminal device can obtain the air pressure data and send the air pressure data to the first terminal device, so that the first terminal device can improve the accuracy of the identification of the climbing state based on the identification of the air pressure data and the interference scene. Wherein, the second terminal device can be the wearable device described in the embodiment of the present application.

[0058] It is understandable that for a terminal device that does not have an air pressure sensor, it can obtain air pressure data through a wearable device connected to the terminal device, and then identify the climbing status based on the air pressure data.

[0059] For example, for a terminal device that cannot obtain air pressure data, the terminal device can be based on Figure 1 The corresponding embodiments obtain other motion data during the motion process. Figure 1 A schematic diagram of a scenario provided in an embodiment of the present application. Figure 1 In the corresponding embodiments, a mobile phone as the terminal device is used as an example for illustration, and this example does not constitute a limitation on the embodiments of the present application.

[0060] When the user is climbing a mountain or stairs, the user can use the sports health application of the terminal device to record various sports data in outdoor running and other scenes. For example, when the user opens the outdoor running function in the sports health application and triggers the corresponding control to start sports recording, the terminal device can detect the user's running status and display the detected sports data in the terminal device. For example, the terminal device can detect the sports data of the user running 38'46", and the terminal device can display the following. Figure 1 The interface shown in a in the figure may include: text information indicating that the GPS is searching, controls for starting music, controls for taking photos, maps, information indicating the running length, information indicating the running time, information indicating the running calories consumed, information indicating the running pace, information indicating the running pace, information indicating the running heart rate change, controls for locking the screen, controls for setting the volume, and controls for pausing recording, etc. This allows the user to Figure 1 In the interface shown in a, you can check the status information of the exercise process at any time.

[0061] When the terminal device receives the user's operation of triggering the end of exercise, the terminal device can display all exercise data of the entire exercise process. For example, when the terminal device receives the user's operation of viewing running details, it can display Figure 1 The interface shown in b in the figure. Figure 1 The interface shown in b in FIG. 1 may include: a control for viewing a running track, a control for viewing a pace, a control for viewing a chart, and a control for viewing running details, etc., and the control for viewing running details is in a selected state. Figure 1 The interface shown in b in also includes: controls for sharing running data, information indicating running length, information indicating exercise time, information indicating exercise calories consumed, information indicating average exercise pace, information indicating average exercise speed, information indicating exercise cadence, information indicating average exercise stride, and basic exercise data such as information indicating the number of exercise steps.

[0062] It is understandable that the above terminal devices may also be referred to as terminals, user equipment (UE), mobile stations (MS), mobile terminals (MT), etc. The terminal devices may be mobile phones, smart TVs, wearable devices, tablet computers (Pad), computers with wireless transceiver functions, virtual reality (VR) terminal devices, augmented reality (AR) terminal devices, wireless terminals in industrial control, wireless terminals in self-driving, wireless terminals in remote medical surgery, wireless terminals in smart grids, wireless terminals in transportation safety, wireless terminals in smart cities, wireless terminals in smart homes, etc.

[0063] The above-mentioned wearable device may be: a smart watch, a smart bracelet, a smart glove, etc. The embodiments of the present application do not limit the specific technology and specific device form adopted by the wearable device.

[0064] Therefore, in order to better understand the embodiment of the present application, the structure of the terminal device of the embodiment of the present application is introduced below. Figure 2 A schematic diagram of the structure of a terminal device provided in an embodiment of the present application.

[0065] The terminal device may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, an indicator 192, a camera 193, and a display screen 194, etc.

[0066] The sensor module 180 may include: an acceleration sensor 180E, a touch sensor 180K, and a pedometer 180N. In a possible implementation, the sensor module 180 may also include: a pressure sensor, a gyroscope sensor, a magnetic sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, an ambient light sensor, a bone conduction sensor, etc. ( Figure 2 not shown).

[0067] In a possible implementation, in a scenario where the terminal device can independently perform climbing status recognition, the sensor module 180 may include an air pressure sensor 180C. Alternatively, in a scenario where the terminal device cannot independently perform climbing status recognition, the sensor module 180 may not include the air pressure sensor 180C. It is understood that at this time, the terminal device can use the air pressure sensor in other devices (such as wearable devices) to assist the terminal device in completing the process of climbing status recognition.

[0068] It is to be understood that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the terminal device. In other embodiments of the present application, the terminal device may include more or fewer components than shown in the figure, or combine certain components, or split certain components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0069] The processor 110 may include one or more processing units. Different processing units may be independent devices or integrated into one or more processors. The processor 110 may also be provided with a memory for storing instructions and data.

[0070] The USB interface 130 is an interface that complies with the USB standard specification, and can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the terminal device, and can also be used to transfer data between the terminal device and peripheral devices. It can also be used to connect headphones to play audio through the headphones. The interface can also be used to connect other electronic devices, such as AR devices, etc.

[0071] The charging management module 140 is used to receive charging input from a charger, which may be a wireless charger or a wired charger. The power management module 141 is used to connect the charging management module 140 to the processor 110 .

[0072] The wireless communication function of the terminal device can be implemented through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor.

[0073] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. The antenna in the terminal device can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of the antenna.

[0074] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to terminal devices. The mobile communication module 150 can include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, etc. the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation.

[0075] The wireless communication module 160 can provide wireless communication solutions applied to terminal devices, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), etc.

[0076] The terminal device realizes the display function through the GPU, the display screen 194, and the application processor. The GPU is a microprocessor for image processing, connecting the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering.

[0077] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. In some embodiments, the terminal device may include 1 or N display screens 194, where N is a positive integer greater than 1.

[0078] The terminal device can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.

[0079] The camera 193 is used to capture static images or videos. In some embodiments, the terminal device may include 1 or N cameras 193, where N is a positive integer greater than 1.

[0080] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the terminal device. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as music and videos can be stored in the external memory card.

[0081] The internal memory 121 can be used to store computer executable program codes, and the executable program codes include instructions. The internal memory 121 can include a program storage area and a data storage area.

[0082] The terminal device can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor.

[0083] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. Speaker 170A, also known as "speaker", is used to convert audio electrical signals into sound signals. The terminal device can listen to music or listen to hands-free calls through speaker 170A. Receiver 170B, also known as "earpiece", is used to convert audio electrical signals into sound signals. When the terminal device answers a call or voice message, the voice can be answered by placing receiver 170B close to the human ear. Headphone interface 170D is used to connect wired headphones. Microphone 170C, also known as "microphone" or "microphone", is used to convert sound signals into electrical signals. In an embodiment of the present application, the terminal device may have a microphone 170C.

[0084] The air pressure sensor 180C is used to measure air pressure. In some embodiments, the terminal device can calculate the altitude (or also referred to as height) through the air pressure data measured by the air pressure sensor 180C to assist in positioning and navigation. In the embodiment of the present application, the air pressure data measured by the air pressure sensor 180C can also be used to enable the terminal device to identify the climbing state.

[0085] The acceleration sensor 180E may be a three-axis (including x-axis, y-axis and z-axis) acceleration sensor, and the acceleration sensor 180E may be used to detect acceleration data of the terminal device in three directions. In the embodiment of the present application, the acceleration data detected by the acceleration sensor 180E may be used by the terminal device to detect interference scenarios.

[0086] The touch sensor 180K is also called a “touch control device”. The touch sensor 180K can be disposed on the display screen 194 , and the touch sensor 180K and the display screen 194 form a touch screen, or a “touch control screen”.

[0087] The button 190 includes a power button, a volume button, etc. The button 190 may be a mechanical button. It may also be a touch button. The terminal device may receive the button input and generate a key signal input related to the user settings and function control of the terminal device. The indicator 192 may be an indicator light, which may be used to indicate the charging status, power change, message, missed call, notification, etc.

[0088] The pedometer 180N can be used to detect the number of steps taken by the user when the user carries the terminal device, such as the number of steps taken by the user when walking, the number of steps taken by the user when running, the number of steps taken by the user when climbing a mountain or stairs, etc.

[0089] The software system of the terminal device can adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture, etc., which will not be elaborated here.

[0090] The embodiment of the present application takes the Android system with a layered architecture as an example to illustrate the software structure of the terminal device. Figure 3 A schematic diagram of the software structure of a terminal device provided in an embodiment of the present application.

[0091] like Figure 3 As shown, the layered architecture divides the software into several layers, each layer has a clear role and division of labor. The layers communicate 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 hardware abstraction layer (HAL), and the sensor hub layer. It is understandable that the layered architecture can include other layers according to the actual scenario, which will not be repeated in the embodiments of the present application.

[0092] The application layer may include a series of applications. For example, the application layer may include: sports health application, which can be used to record the sports status of the user when carrying the terminal device for exercise. It is understandable that the application layer may also include: camera, calendar, phone, map, phone, music, settings, mailbox, video, social and other applications ( Figure 3 (not shown in the figure), which is not limited in the embodiments of the present application.

[0093] The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. The application framework layer includes some predefined functions.

[0094] like Figure 3 As shown, the application framework layer may include: a connection service module (or iconnect service module), etc. The iconnect service module is used to send the hardware data received in the BT HAL module in the HAL layer to the preset HAL in the HAL layer. It can be understood that the application framework layer may also include: a window manager, a content provider, a resource manager, a view system, and a notification manager, etc. ( Figure 3 not shown).

[0095] For example, the window manager is used to manage window programs. The window manager can obtain the size of the display screen, determine whether there is a status bar, lock the screen, touch the screen, drag the screen, capture the screen, etc. The content provider is used to store and obtain data and make the data accessible to applications. The data can include video, images, audio, calls made and received, browsing history and bookmarks, phone books, etc. The view system includes visual controls, such as controls for displaying text, controls for displaying pictures, etc. The view system can be used to build applications. The display interface can be composed of one or more views. For example, the display interface including the SMS notification icon can include a view for displaying text and a view for displaying pictures. The resource manager provides various resources for applications, such as localized strings, icons, pictures, layout files, video files, etc. The notification manager enables applications to display notification information in the status bar, which can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also be a notification that appears in the system top status bar in the form of an icon or scroll bar text, such as a notification of an application running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message may be displayed in the status bar, a prompt tone may be emitted, the terminal device may vibrate, an indicator light may flash, etc.

[0096] like Figure 3 As shown, the purpose of the HAL layer is to abstract the hardware, and can provide a unified interface for querying hardware devices for upper-layer applications, or can also provide data storage services for upper-layer applications, or provide data processing services for upper-layer applications. In the embodiment of the present application, the HAL layer may include: a preset HAL, a modem HAL, and a BTHAL.

[0097] The preset HAL can be the management layer of the sensor, and the preset HAL can be used to fuse the data of each sensor to achieve multi-modal data fusion and calculation in high-power consumption scenarios; the preset HAL can be run alone to achieve the stability of the algorithm, or the preset HAL can also be coupled with other modules in the HAL layer to run.

[0098] In the embodiment of the present application, the preset HAL is used to implement the climbing algorithm in the climbing state recognition method, and the fusion and calculation of each sensor data are realized in the climbing algorithm. In possible implementations, other algorithms can also be implemented in the preset HAL, such as Algorithm 1, ..., Algorithm N, etc., which are not limited in the embodiment of the present application.

[0099] The modem HAL is used to send the acquired modem information to the preset HAL. The modem information may include: cell identity (CID) information, and radio access technology (RAT) information. The CID information can be used to indicate the switching status of the base station, and the RAT information is used to indicate the network status of the terminal device, such as the terminal device accessing 3G, 4G or 5G.

[0100] BT HAL is used to forward the hardware data transmitted by Bluetooth to the iconnect service module. For example, BT HAL can be used to forward the air pressure data transmitted by the wearable device to the terminal device via Bluetooth to the iconnect service module.

[0101] The sensor hub is used to control sensors in low-power scenarios, acquire, fuse and process sensor data, and the sensor hub may include a preset sensor hub. In an embodiment of the present application, the preset sensor hub can be used to acquire pedometer data and acceleration data, etc.; the preset sensor hub can also be used to recognize interference scenarios such as airplane scenarios, car scenarios, cycling scenarios, elevator scenarios, scooter scenarios, and balance car scenarios based on acceleration data; and the preset sensor hub can send the acquired pedometer data and the identified interference scenarios to the preset HAL, so that the preset HAL can execute the climbing algorithm based on the pedometer data and the interference scenarios to recognize the climbing state and detect the climbing height.

[0102] It is understandable that even when the terminal device is in a low-power state such as the screen is off, the preset sensor hub can still realize the functions of acquiring, fusing and processing the above-mentioned sensor data.

[0103] Exemplary, combined Figure 3 In a corresponding embodiment, when the sports health application receives the user's operation of starting exercise recording in the outdoor running function or other sports, the sports health application can send instruction information for executing the climbing algorithm to the preset HAL, and then the preset HAL can calculate the climbing algorithm based on the pedometer data and interference scene recognition data obtained from the preset sensor hub, the CID information obtained from the modem HAL, and the air pressure data obtained from the iconnect service module, and obtain information such as the climbing status and climbing height. Furthermore, the preset HAL can send the climbing status and climbing height to the sports health application, so that the sports health application can be displayed in the interface corresponding to the outdoor running function.

[0104] It is understandable that the software structure of the terminal device may also include other layers and other modules, and the specific form of the software structure of the terminal device is not limited in the embodiments of the present application.

[0105] The following specific embodiments are used to describe in detail the technical solution of the present application and how the technical solution of the present application solves the above technical problems. The following specific embodiments can be implemented independently or in combination with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.

[0106] In an embodiment of the present application, when the terminal device includes a pedometer but not an air pressure sensor, and the wearable device that establishes a communication connection with the terminal device includes an air pressure sensor, the terminal device and the wearable device can jointly execute the climbing state identification method described in the embodiment of the present application (such as scenario one); or, when the terminal device includes a pedometer and an air pressure sensor, the terminal device can independently execute the climbing state identification method described in the embodiment of the present application (such as scenario two); or, when the wearable device includes an embedded-subscriber identity module (eSIM), an air pressure sensor, and a pedometer, and the wearable device has the hardware capability to execute the climbing algorithm in a high-power consumption scenario, the wearable device can also independently execute the climbing state identification method described in the embodiment of the present application (such as scenario three).

[0107] It is understandable that the execution entity of the climbing status identification method may include other devices according to the actual scenario, and this is not specifically limited in the embodiments of the present application.

[0108] Scenario 1, the terminal device and the wearable device can jointly execute the climbing state recognition method described in the embodiment of the present application. Among them, in the embodiment corresponding to scenario 1, the terminal device includes a pedometer and the wearable device includes an air pressure sensor.

[0109] For example, when a user carries a terminal device and a wearable device to climb a mountain, the terminal device and the wearable device can collaborate to identify the user's climbing status during the climbing process. Figure 4 A flowchart of a method for identifying a climbing state provided in an embodiment of the present application is shown below. Figure 4 As shown, the climbing state recognition method may include the following steps:

[0110] S401: The terminal device establishes a communication connection with the wearable device.

[0111] Exemplarily, the terminal device and the wearable device can establish a communication connection via a wired manner; or, the terminal device and the wearable device can also establish a communication connection via a wireless manner. For example, the terminal device and the wearable device can establish a communication connection via Bluetooth, WIFI, or wirelessly connected to the same cloud account, and the embodiment of the present application does not limit the manner in which the terminal device and the wearable device establish a communication connection.

[0112] S402: The terminal device sends a message for obtaining air pressure data to the wearable device.

[0113] Suitably, the wearable device can obtain the message for obtaining the air pressure data sent by the terminal device. In the embodiment of the present application, the terminal device can send the message for obtaining the air pressure data to the wearable device via Bluetooth or other methods.

[0114] For example, the terminal device can be based on Figure 5 The corresponding embodiment triggers the step shown in S402. Figure 5 A schematic diagram of an interface for starting a movement provided in an embodiment of the present application.

[0115] When the terminal device receives a message from the user that the outdoor running function in the sports health application is turned on, the terminal device can display the following information: Figure 5 The interface shown in a in the figure may include: a control 501 for indicating the start of recording exercise data, a control for indicating warm-up, a control for indicating starting music, a text box for searching content, a control corresponding to an outdoor running function (the control corresponding to the outdoor running function is selected), a control corresponding to an indoor running function, a control corresponding to a yoga function, a control corresponding to a fitness function, a control corresponding to a walking function, a recommended course card, information indicating cumulative running (kilometers), and a control for setting a running goal. Figure 5 The interface shown in a also includes: controls in the task bar at the bottom of the sports health application, such as health controls, sports controls, discovery controls, device controls, and my controls for viewing other functions in sports health.

[0116] In such Figure 5 In the interface shown in a of FIG. 1 , when the terminal device receives a trigger operation of the user on the control 501, the terminal device can perform a motion countdown and display the following at the end of the countdown: Figure 5 The interface shown in b in FIG. 1 is then used to send a message to the wearable device for obtaining air pressure data. The air pressure data can be used to identify the climbing state and calculate the climbing height. Figure 5 The interface shown in b in FIG. 1 may include: information 502 for indicating the climbing height; other contents displayed in the interface may refer to Figure 1The description of the interface shown in a in the figure is not repeated here. The trigger operation can be a click operation, a long press operation, a sliding operation or a voice operation, etc., which is not limited in the embodiment of the present application.

[0117] It is understandable that since I just started running records, Figure 5 The climbing altitude may not be displayed temporarily in the information 502 indicating the climbing altitude in the interface shown in b; further, the terminal device may identify the climbing state and calculate the climbing altitude based on the steps shown in S403-S414, and display the calculated climbing altitude in the information 502 indicating the climbing altitude, thereby realizing real-time display of the climbing altitude.

[0118] It is understandable that the method of triggering the terminal device to execute the step shown in S402 is not limited to Figure 5 The corresponding embodiments are not limited to this in the embodiments of the present application.

[0119] In a possible implementation, the wearable device may also send N air pressure data generated when the air pressure data changes to the terminal device in real time, so the terminal device may not need to execute the step of sending an indication message to the wearable device in S402.

[0120] For example, since the wearable device can send N air pressure data generated when the air pressure data changes to the terminal device in real time, when the terminal device receives the user's Figure 5 When the control 501 is triggered in the interface shown in a, the terminal device can execute the steps shown in S405-S414 based on N air pressure data to perform climbing status identification and climbing height detection.

[0121] S403: When the wearable device determines that the air pressure data has changed, the wearable device collects N air pressure data.

[0122] In the embodiment of the present application, the value of N can be 2, 10, 50, 60, or 80, etc., N is greater than or equal to 2, and the wearable device can collect N air pressure data once every 5 seconds, or it can also collect N air pressure data once every 2 seconds. In the embodiment of the present application, the time for collecting air pressure data is not limited.

[0123] Exemplarily, the wearable device may obtain air pressure data based on an air pressure sensor. When receiving a message for obtaining air pressure data from a terminal device and detecting that the air pressure data has changed, the wearable device collects N air pressure data.

[0124] In a possible implementation, when the wearable device receives a message for obtaining air pressure data, the wearable device can directly send a large amount of air pressure data collected by the wearable device to the terminal device, and the terminal device determines whether the air pressure data has changed, and collects N air pressure data when it is determined that the air pressure data has changed.

[0125] S404: The wearable device sends N air pressure data and the collection times corresponding to the N air pressure data to the terminal device.

[0126] Exemplarily, the wearable device can send N air pressure data and the collection time corresponding to the N air pressure data to the terminal device in a Bluetooth manner. Suitably, the terminal device receives the N air pressure data and the collection time corresponding to the N air pressure data from the wearable device.

[0127] Possible implementations include Figure 3 As shown, the BT HAL in the terminal device can receive N air pressure data and the collection time corresponding to the N air pressure data from the wearable device; then, the BT HAL can forward the N air pressure data and the collection time corresponding to the N air pressure data to the preset HAL via the iconnect service module.

[0128] S405. The terminal device determines the altitude corresponding to the first air pressure data among the N air pressure data, the first time corresponding to the first air pressure data, and the third time corresponding to the change in the number of steps in the N pedometer data.

[0129] In the embodiment of the present application, the N air pressure data may include: the first air pressure data (or may also be referred to as the first air pressure data, the first air pressure data is obtained at the first moment), the second air pressure data, ..., and the Nth air pressure data (or may also be referred to as the second air pressure data); since there is a corresponding relationship between the air pressure data and the height, any air pressure data may correspond to one height data. Among them, when N is 2, the second air pressure data may also be referred to as the second air pressure data.

[0130] In the embodiment of the present application, the N pedometer data may be obtained by the terminal device based on the pedometer collection, and any pedometer data among the N pedometer data may be used to indicate the change in the number of steps. For example, when the change in the number of steps at the second collection moment relative to the first collection moment is 5, the pedometer data corresponding to the second collection moment may be 5.

[0131] Exemplarily, when the terminal device receives N air pressure data and the collection times corresponding to the N air pressure data from the wearable device, the terminal device can obtain the pedometer data obtained by the pedometer at the same collection time according to the collection times corresponding to the N air pressure data, and obtain N pedometer data corresponding to the N collection times.

[0132] S406: The terminal device obtains acceleration data.

[0133] Exemplarily, the terminal device may acquire acceleration data in real time based on an acceleration sensor. For example, the terminal device may acquire acceleration data within a preset time period to perform interference scene recognition, wherein the preset time period may include: a first moment and a second moment.

[0134] It can be understood that when the terminal device determines based on the acceleration data that the interference scenario is not met within the preset time length, the terminal device can continue to execute the steps in the climbing state identification method based on the air pressure data at the first moment and the air pressure data at the second moment.

[0135] For example, the frequency at which the terminal device can collect acceleration data may be 100 Hz (hz), which can be understood as collecting acceleration data 100 times in 1 second, or collecting acceleration data once every 10 milliseconds (ms).

[0136] The acceleration data obtained by the terminal device can be:

[0137] The Acc(t) may be a three-axis timing array that has been synchronized through time stamp calibration.

[0138] S407: The terminal device determines whether an interference scenario is satisfied based on the acceleration data.

[0139] It can be understood that since the climbing state identification method described in the embodiment of the present application can be used to realize the identification of walking climbing scenes, the terminal device can identify interference scenes other than walking that can cause changes in altitude at at least two moments, and eliminate the influence of changes in air pressure data caused by the interference scene on the walking climbing state identification.

[0140] In an embodiment of the present application, when the terminal device determines that the interference scenario is met based on the acceleration data, the terminal device can execute the steps shown in S411; or, when the terminal device determines that the interference scenario is met based on the acceleration data, the terminal device can execute the steps shown in S408 to further identify the climbing status.

[0141] Exemplarily, the terminal device can extract features from the acceleration data and determine whether the interference scenario is satisfied based on the extracted features. For example, the terminal device can extract features such as fast Fourier transform (FFT) feature vectors, variance, mean, first-order difference (such as variance, mean, and zero crossing in the first-order difference), and second-order difference from the acceleration data; and input the above features into a preset model to obtain a recognition result.

[0142] Taking the preset model as a decision tree model as an example for illustration, the decision data module can be used to implement binary classification. Exemplarily, for N interference scenes such as airplane scenes, car scenes, riding scenes, elevator scenes, scooter scenes, and balance car scenes, the terminal device can establish N decision trees. For example, for the above 6 interference scenes, the terminal device can establish 6 decision trees, such as: airplane scenes and non-aircraft scenes, car scenes and non-car scenes, riding scenes and non-riding scenes, elevator scenes and non-elevator scenes, scooter scenes and non-scooter scenes, balance car scenes and non-balance car scenes, etc. Further, the terminal device can obtain the scene corresponding to the maximum value of the output results of the 6 decision trees to obtain the recognition result. For example, when the output results of the airplane scene and the non-aircraft scene, the riding scene and the non-riding scene, the elevator scene and the non-elevator scene, the scooter scene and the non-scooter scene, and the balance car scene and the non-balance car scene are all close to 0, and the output results of the car scene and the non-car scene are 1, the terminal device can determine that the recognition result of the interference scene is the car scene.

[0143] It is understandable that the method for identifying interference scenarios may not be limited to the above-mentioned decision tree model, but may also be other machine learning models, which is not limited in the embodiments of the present application.

[0144] Possible implementations include Figure 3 As shown, the preset sensor hub in the terminal device can be used to perform the step of performing interference scene identification in the step shown in S407; and then the preset sensor hub can send the identified interference scene to the preset HAL; so that the preset HAL can determine the climbing state based on the interference scene. Among them, the preset sensor hub can detect the interference scene in real time, and send the detected interference scene or non-interference scene to the preset HAL in real time.

[0145] It is understandable that, since the interference scene may cause the climbing height to increase, when the terminal device cannot identify the interference scene, it is easy to mistake the climbing height caused by the interference scene for the climbing height generated when the user walks, thereby affecting the recognition of the climbing state or the detection of the climbing height. Therefore, in the embodiment of the present application, accurate recognition of the interference scene can be achieved, and the interference scene can be determined as a non-climbing state, thereby achieving accurate detection of the climbing state.

[0146] In a possible implementation, the terminal device may first execute the steps shown in S409-S410 to determine whether the initial climbing height is greater than the height threshold, and when it is determined that the initial climbing height is greater than the height threshold, instruct the preset sensor hub to execute the steps shown in S406-S407 to judge the interference scene based on the acceleration data.

[0147] S408. The terminal device determines whether the difference between the first moment and the third moment is less than a time threshold.

[0148] In the embodiment of the present application, when the terminal device determines that the difference between the first moment and the third moment is less than the time threshold, the terminal device may execute the step shown in S409; or, when the terminal device determines that the difference between the first moment and the third moment is greater than or equal to the time threshold, the terminal device may execute the step shown in S411. The difference between the first moment and the third moment may be the difference obtained by subtracting the third moment from the first moment, or may be the difference obtained by subtracting the first moment from the third moment.

[0149] In a possible implementation, when the terminal device determines that the difference between the first moment and the third moment is less than the time threshold, the terminal device can also execute the step shown in S412; or it can be understood that the step shown in S408 can also be used independently for identifying the climbing status.

[0150] It is understandable that, since the change of air pressure data is necessarily accompanied by the change of the number of steps during mountain climbing, the difference between the first moment and the third moment must be less than the time threshold. Based on this, the terminal device can exclude the situation where the time difference between the change of air pressure data and the change of the number of steps in the non-climbing state is large by determining the relationship between the difference between the first moment and the third moment and the time threshold.

[0151] Exemplarily, a time threshold of 2 minutes is used as an example for illustration. For example, when the first moment recorded when the air pressure data changes is 12 noon, and the third moment recorded when the number of steps changes is 5 pm, the difference between the first moment and the third moment is 5 hours. Since 5 hours is greater than the time threshold of 2 minutes, the terminal device can determine that the current state is non-climbing. Among them, the time threshold can also be taken as 3 minutes, 5 minutes, etc., which is not limited in the embodiments of the present application.

[0152] S409. The terminal device determines an initial climbing altitude based on the altitude corresponding to the first air pressure data among the N air pressure data and the altitude corresponding to the Nth air pressure data among the N air pressure data.

[0153] Exemplarily, the initial climbing altitude may be a value obtained by subtracting the altitude corresponding to the first air pressure data from the altitude corresponding to the Nth air pressure data.

[0154] S410. The terminal device determines whether the initial climbing altitude is greater than the altitude threshold.

[0155] In an embodiment of the present application, when the terminal device determines that the initial climbing height is greater than the height threshold, the terminal device can execute the steps shown in S412; or, when the terminal device determines that the initial climbing height is less than or equal to the height threshold, the terminal device can execute the steps shown in S411.

[0156] It can be understood that, through the relationship between the climbing height and the height threshold, interference caused by slight changes in the climbing height can be eliminated, thereby improving the accuracy of identifying the climbing state.

[0157] In a possible implementation, the step shown in S410 can also be used independently for identifying the climbing state.

[0158] It is understandable that, based on the descriptions of the steps shown in S407, S408, and S410, the terminal device can identify the climbing state based on one or more of the steps shown in S407, S408, and S410. In addition, during the process of identifying the climbing state, the terminal device does not limit the execution order of S407, S408, and S410.

[0159] In a possible implementation, when the terminal device determines that the air pressure data has not changed within a time threshold (for example, 2 minutes or other numerical values), the terminal device can determine that the climbing state is not met at this time; then, the terminal device can re-acquire N air pressure data, for example, the terminal device can re-execute the steps shown in S402-S404, and re-perform climbing state identification and climbing height detection based on the steps shown in S405-S414.

[0160] In a possible implementation, when the terminal device determines that the number of base station switching times within a time threshold exceeds a certain number threshold, the terminal device can determine that the climbing state is not satisfied at this time, and then execute the step shown in S411. For example, the terminal device can determine the number of base station switching times based on CID information. For example, when the terminal device determines that the CID information changes more than 3 times within 1 minute, or determines that the CID information changes more than 5 times within 3 minutes, the terminal device can determine that the climbing state is not satisfied.

[0161] Exemplarily, the terminal device may determine the number of changes in the CID information between the first moment and the second moment, and when the number of changes exceeds a number threshold, determine that the climbing state is not satisfied. Alternatively, the terminal device may also periodically detect changes in the CID information after the first moment, and when it is determined that the number of changes exceeds a number threshold, determine that the climbing state is not satisfied. The number threshold may be a value such as 1 or 2.

[0162] Among them, the terminal device's judgment on the number of base station switching times within a period of time cannot be used alone as a condition for satisfying the climbing state recognition. Therefore, the terminal device can combine S407, S408 and S410 to jointly perform climbing state recognition to improve the accuracy of climbing state recognition.

[0163] Possible implementations include Figure 3 As shown, the modem HAL can send the acquired CID information to the preset HAL, and then the preset HAL uses the CID information to determine whether the terminal device meets the climbing state.

[0164] It is understandable that since the climbing height increases slowly when the user is climbing, it is difficult for the base station to switch multiple times in a short period of time. Therefore, by determining the number of base station switches within a time threshold, the scenes that do not belong to the climbing state can be excluded, thereby improving the accuracy of climbing state recognition.

[0165] S411. The terminal device determines that the climbing state is not satisfied.

[0166] S412: The terminal device determines that the climbing state is met.

[0167] S413: The terminal device determines the actual number of climbing steps based on the N pedometer data.

[0168] Exemplarily, the terminal device may obtain the sum of N pedometer data as the actual climbing steps.

[0169] In a possible implementation, the terminal device determines whether there are M stable air pressure data among the N air pressure data. When the terminal device determines that there are M stable air pressure data among the N air pressure data, the terminal device can obtain the sum of the M pedometer data and the sum of the N pedometer data, and subtract the sum of the M pedometer data from the sum of the N pedometer data to obtain the actual number of steps climbed. Wherein, M is less than N, and the value of M can be 5, 8, or 10, etc., which is not limited in the embodiments of the present application. Wherein, the M pedometer data can be the pedometer data corresponding to the M air pressure data.

[0170] Exemplarily, the terminal device may determine whether there are M stable air pressure data among N air pressure data based on the variances corresponding to the air pressure data (or the changes in the air pressure data, or the mean of the air pressure data), etc. For example, when the terminal device determines that the variance is less than the variance threshold, the terminal device may determine that the air pressure data is stable; or, when the terminal device determines that the variance is greater than or equal to the variance threshold, the terminal device may determine that the air pressure data is unstable. Among them, the variance of the Qth air pressure data among the N air pressure data may be the variance determined based on Q air pressure data between the first air pressure data to the Qth air pressure data, and Q is less than or equal to N.

[0171] It is understandable that since users often stop and walk during the mountain climbing process, the N collected air pressure data may have relatively stable air pressure data. Therefore, the terminal device can identify the stability of the air pressure data, for example, identify M stable air pressure data, and when calculating the actual number of climbing steps, remove the influence of the M pedometer data in a stable state on the climbing height, thereby enhancing the accuracy of the climbing height calculation.

[0172] S414: When the terminal device determines that the actual number of climbing steps is greater than the initial climbing height×the preset threshold, the terminal device determines the initial climbing height as the final climbing height.

[0173] It is understandable that during the mountain climbing process, there is a certain corresponding relationship between the number of climbing steps and the climbing height. For example, the higher the climbing height, the more climbing steps are required. Therefore, in order to avoid unreasonable situations such as climbing height with fewer steps but higher climbing height or climbing height with more steps but lower climbing height, the terminal device can use the relationship between the actual number of climbing steps and the initial climbing height to screen out a climbing height that is more in line with the actual scenario.

[0174] Exemplarily, when the terminal device determines the final climbing height corresponding to N air pressure data, the terminal device can display the final climbing height in real time in the interface, so that the user can check the climbing height from the starting position to the current position at any time during the climbing process; or, the terminal device can also display the maximum climbing height during the climbing process and the changing curve of the climbing height during the exercise in the interface when receiving the user's operation to end the exercise record.

[0175] In a possible implementation, the final climbing height in the step shown in S414 can be understood as the first final climbing height corresponding to the first acquisition of N air pressure data; after S414, the terminal device can also continue to execute the steps shown in S402-S410, and calculate the second initial climbing height and the second actual climbing steps based on the N air pressure data acquired for the second time; further, in the step shown in S414, when the terminal device determines that the second actual climbing steps are greater than the product of the second initial climbing height and the preset threshold, the final climbing height is determined to be the cumulative value of the first final climbing height and the second initial climbing height. It is understandable that the terminal device can determine the final climbing height based on the cumulative value of the climbing heights corresponding to multiple air pressure data.

[0176] For example, Figure 6 A schematic diagram of an interface for real-time display of climbing height provided in an embodiment of the present application. When the terminal device detects the climbing height corresponding to N air pressure data, the climbing height can be displayed in real time on a computer such as Figure 6 In the interface shown in a. Figure 6 As shown in a in the figure, the information 601 in the interface indicating the climbing height can be displayed as 2 meters, the information in the interface indicating the running time can be displayed as 5 seconds, and other contents displayed in the interface can be referred to Figure 1 The interface shown in a in FIG. 1 is not described in detail here.

[0177] When the user reaches the top of the mountain at 1:30:46, the terminal device can display the following Figure 6 The interface shown in b in the figure can display that the climbing distance is 7.02 kilometers, the time is 1:30:46, the calories consumed are 804 kcal, and the climbing height is 1200 meters.

[0178] When the user finishes exercising, the terminal device can display Figure 6 The interface shown in c in the figure can display: the exercise ended at 16:58 on June 8, 2022, the exercise time was 1:30:46, the calories consumed were 804 kcal, the average pace was 12'34" / km, the average speed was 4.67 km / h, the average cadence was 153 steps / min, the average stride was 31 cm, the number of steps was 22775, and the highest climbing height during the climbing process was 1200 meters. Other contents displayed in this interface can be the same as Figure 1 The interface shown in b is similar and will not be repeated here.

[0179] In such Figure 6 In the interface shown in c in FIG. 1 , when the terminal device receives the user's operation on the control 602 for viewing the chart, the terminal device may display the following Figure 6 The interface shown in d in the figure. Figure 6The interface shown in d in the figure may include: a chart corresponding to the cadence, a chart 603 corresponding to the climbing height, an average cadence information of 153, a maximum cadence information of 182, and a maximum climbing height information of 1200 meters. The chart 603 may indicate the overall climbing height during the climbing process, for example, the maximum climbing height is reached after about 90 minutes of climbing.

[0180] It is understandable that the terminal device can be based on Figure 6 The corresponding embodiment displays the climbing height in real time, and can also display the overall climbing height during the climbing process when the operation is finished, so that the user can check it at any time, thereby increasing the user experience of the sports health application.

[0181] Possible implementations include Figure 3 As shown, the preset HAL can execute the steps shown in S408-SS414 to identify the climbing status and detect the climbing height, and when the climbing height is detected, the climbing height is sent to the sports health application, so that the sports health application can display the acquired climbing height in the interface for user viewing.

[0182] Based on this, the terminal device and the wearable device can identify the climbing status and calculate the climbing height through data interaction; and the terminal device can avoid the influence of the interference scene on the recognition of the climbing status based on the recognition of the interference scene, thereby improving the accuracy of the recognition of the climbing status.

[0183] Scenario 2: When the terminal device includes a pedometer and an air pressure sensor, the terminal device can independently execute the climbing status identification method described in the embodiment of the present application.

[0184] See also Figure 4 In a corresponding embodiment, the terminal device may obtain N air pressure data when the air pressure data changes based on the air pressure sensor of the terminal device before S405, and then execute the steps shown in S405-SS414.

[0185] Based on this, the terminal device can independently execute the climbing status identification method described in the embodiment of the present application; and the terminal device can also avoid the influence of interference scenes on climbing status identification based on the identification of interference scenes, thereby improving the accuracy of climbing status identification.

[0186] Scenario three: When the wearable device includes an embedded-subscriber identity module (eSIM), an air pressure sensor, and a pedometer, and the wearable device has the hardware capability to execute the climbing algorithm in a high-power consumption scenario, the wearable device can also independently execute the climbing state identification method described in the embodiments of the present application.

[0187] It is understandable that when the wearable device includes an eSIM, the wearable device can implement the identification of whether the terminal device meets the climbing state by using the number of base station switching times in step S410 based on the eSIM. Among them, the CID information used to indicate the number of base station switching times can be obtained by the eSIM in the wearable device.

[0188] See also Figure 4 In a corresponding embodiment, the wearable device may execute the steps of the terminal device performing climbing status identification and climbing height detection in S405-SS414.

[0189] For example, the wearable device can be based on Figure 5 In the corresponding embodiment, a preset function in the sports health application (such as an outdoor running function) is turned on, and the recognition of the climbing state is realized in the preset function.

[0190] In a possible implementation, the wearable device may also automatically identify the user's motion status, and when it is identified that the user's motion status meets a preset function, an interface for prompting the user to enter the preset function is displayed.

[0191] For example, Figure 7 A schematic diagram of an interface for prompting a user to enter a preset function provided in an embodiment of the present application. Figure 7 In the corresponding embodiment, the preset function is taken as an outdoor running function as an example for illustration. It can be understood that the wearable device can perform climbing status recognition in the outdoor running function.

[0192] When the wearable device detects that the user may be running based on the acceleration data, the wearable device can display the following Figure 7 The interface shown in a. Figure 7 The interface shown in a in the figure may include: prompt information, a control 701 for entering the outdoor running function, a control for entering the indoor running function, and a control for ignoring the outdoor running function or the indoor running function. The prompt information may be displayed as: Are you running?

[0193] In such Figure 7 In the interface shown in a of FIG. 1 , when the wearable device receives a trigger operation of the user on the control 701, the wearable device may display the following Figure 7 The interface shown in b in the figure. Figure 7 The interface shown in b in the figure may include: information indicating the accumulated running (kilometers), a control 702 for indicating the start of recording exercise data, a control for indicating warm-up, and a control for indicating starting music, etc.

[0194] In such Figure 7In the interface shown in b, when the wearable device receives a trigger operation from the user on the control 702, the wearable device can collect air pressure data, pedometer data, acceleration data, etc., and start climbing status recognition and climbing height detection.

[0195] It is understandable that the method for the wearable device to trigger the recognition of entering the climbing state may not be limited to Figure 7 The corresponding embodiments are not limited to this in the embodiments of the present application.

[0196] Based on this, the wearable device can independently execute the climbing status identification method described in the embodiment of the present application; and, the wearable device can also avoid the influence of interference scenes on climbing status identification based on the identification of interference scenes, thereby improving the accuracy of climbing status identification.

[0197] It should be understood that the interface described in the embodiments of the present application is merely an example and does not constitute a limitation on the embodiments of the present application.

[0198] Combined with the above Figure 4-Figure 7 , the method provided in the embodiment of the present application is described, and the device for executing the above method provided in the embodiment of the present application is described below. Figure 8 As shown, Figure 8 A schematic diagram of the structure of a climbing status identification device provided in an embodiment of the present application. The climbing status identification device can be a terminal device in an embodiment of the present application, or a chip or chip system in the terminal device.

[0199] like Figure 8 As shown, the climbing state recognition device 80 can be used in a communication device, a circuit, a hardware component or a chip, and the climbing state recognition device includes: an acquisition unit 801 and a processing unit 803. The acquisition unit 801 is used to support the climbing state recognition device 80 to perform the step of data acquisition, and the processing unit 803 is used to support the climbing state recognition device 80 to perform the step of data processing.

[0200] In a possible embodiment, the climbing state recognition device 80 may further include: a display unit 802 , and the display unit 802 is used to support the display step performed by the climbing state recognition device 80 .

[0201] Specifically, an embodiment of the present application provides a climbing state identification device 80, an acquisition unit 801, used to acquire acceleration data; the acceleration data is data acquired within a preset time period, and the preset time period includes a first moment and a second moment; a processing unit 803, used to determine whether the first terminal device is in a first state based on the acceleration data, and the first state is used to indicate that the first terminal device is located at different altitudes at at least two moments when the first terminal device is in the first state; when the first terminal device is not in the first state, the processing unit 803 is also used to determine that the first terminal device is in a walking climbing state based on first air pressure data obtained at the first moment and second air pressure data obtained at the second moment; wherein the first terminal device in the walking climbing state is located at different altitudes at the first moment and the second moment.

[0202] In a possible implementation, the climbing state recognition device 80 may also include a communication unit 804. Specifically, the communication unit 804 is used to support the climbing state recognition device 80 to perform the steps of sending data and receiving data. The communication unit 804 may be an input or output interface, a pin or a circuit.

[0203] In a possible embodiment, the climbing state recognition device 80 may further include: a storage unit 805. The processing unit 803 and the storage unit 805 are connected via a line. The storage unit 805 may include one or more memories, and the memory may be a device used to store programs or data in one or more devices or circuits. The storage unit 805 may exist independently and be connected to the processing unit 803 of the climbing state recognition device via a communication line. The storage unit 805 may also be integrated with the processing unit 803.

[0204] The storage unit 805 can store computer-executable instructions of the method in the terminal device so that the processing unit 803 executes the method in the above embodiment. The storage unit 805 can be a register, a cache, or a RAM, etc. The storage unit 805 can be integrated with the processing unit 803. The storage unit 805 can be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, and the storage unit 805 can be independent of the processing unit 803.

[0205] Fig. 9 A schematic diagram of the hardware structure of another terminal device provided in an embodiment of the present application is shown in FIG. Fig. 9 As shown, the terminal device includes a processor 901, a communication line 904 and at least one communication interface ( Fig. 9 The communication interface 903 is used as an example for explanation).

[0206] The processor 901 may be a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of the program of the present application.

[0207] Communications link 904 may include circuitry to transmit information between the above-described components.

[0208] The communication interface 903 uses any transceiver or other device for communicating with other devices or communication networks, such as Ethernet, wireless local area networks (WLAN), etc.

[0209] Possibly, the terminal device may further include a memory 902 .

[0210] The memory 902 may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, an optical disc storage (including a compressed optical disc, a laser disc, an optical disc, a digital versatile disc, a Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of an instruction or data structure and can be accessed by a computer, but is not limited thereto. The memory may exist independently and be connected to the processor via a communication line 904. The memory may also be integrated with the processor.

[0211] The memory 902 is used to store computer-executable instructions for executing the solution of the present application, and the execution is controlled by the processor 901. The processor 901 is used to execute the computer-executable instructions stored in the memory 902, thereby realizing the climbing state recognition method provided in the embodiment of the present application.

[0212] Possibly, the computer-executable instructions in the embodiments of the present application may also be referred to as application code, and the embodiments of the present application do not specifically limit this.

[0213] In a specific implementation, as an embodiment, the processor 901 may include one or more CPUs, such as Fig. 9 CPU0 and CPU1 in.

[0214] In a specific implementation, as an embodiment, the terminal device may include multiple processors, such as Fig. 9 901 and processor 905 in the embodiment of the present invention. Each of these processors may be a single-CPU processor or a multi-CPU processor. The processor herein may refer to one or more devices, circuits, and / or processing cores for processing data (e.g., computer program instructions).

[0215] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on the computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL) or wireless (e.g., infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that a computer can store or a data storage device such as a server or data center that includes one or more available media integrated. For example, the available medium can include a magnetic medium (e.g., a floppy disk, a hard disk or a tape), an optical medium (e.g., a digital versatile disc (digital versatile disc, DVD)), or a semiconductor medium (e.g., a solid state drive (solid state disk, SSD)), etc.

[0216] The present application also provides a computer-readable storage medium. The methods described in the above embodiments can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. Computer-readable media may include computer storage media and communication media, and may also include any medium that can transfer a computer program from one place to another. The storage medium may be any target medium that can be accessed by a computer.

[0217] As a possible design, the computer readable medium may include a compact disc read-only memory (CD-ROM), RAM, ROM, EEPROM or other optical disc storage; the computer readable medium may include a magnetic disk storage or other magnetic disk storage device. Moreover, any connection line may also be appropriately referred to as a computer readable medium. For example, if the software is transmitted from a website, server or other remote source using a coaxial cable, fiber optic cable, twisted pair, DSL or wireless technology (such as infrared, radio and microwave), the coaxial cable, fiber optic cable, twisted pair, DSL or wireless technology such as infrared, radio and microwave are included in the definition of medium. Disk and disc as used herein include compact disc (CD), laser disc, optical disc, digital versatile disc (DVD), floppy disk and Blu-ray disc, where disks usually reproduce data magnetically, while optical discs reproduce data optically using lasers.

[0218] The above combinations should also be included in the scope of computer-readable media. The above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.

Claims

1. A method for identifying a climbing state, characterized in that: The method comprises: Acquire acceleration data; the acceleration data is data acquired within a preset time period, and the preset time period includes a first moment and a second moment; Based on the acceleration data, determining whether the first terminal device is in a first state, the first state being used to indicate that the first terminal device is located at different altitudes at at least two moments when the first terminal device is in the first state; When the first terminal device is not in the first state, it is determined that the first terminal device is in a walking climbing state based on the first air pressure data obtained at the first moment and the second air pressure data obtained at the second moment; wherein, The first terminal device in the walking climbing state is located at different altitudes at the first moment and the second moment.

2. The method according to claim 1, characterized in that The determining that the first terminal device is in a walking climbing state based on the first air pressure data obtained at the first moment and the second air pressure data obtained at the second moment includes: Determine a difference between the altitude corresponding to the first air pressure data and the altitude corresponding to the second air pressure data to obtain an altitude difference; When the altitude difference is greater than a first threshold, it is determined that the first terminal device is in the walking climbing state.

3. The method according to claim 1 or 2, characterized in that: The first state includes one or more of the following: a flying climbing state, an elevator climbing state, a car climbing state, a riding climbing state, a scooter climbing state, or a balance car climbing state.

4. The method according to claim 1 or 2, characterized in that: The first air pressure data is the changed data collected by the second terminal device after detecting that the air pressure has changed.

5. The method according to claim 2, characterized in that: The method further comprises: Acquire pedometer data corresponding to a third moment; the pedometer data corresponding to the third moment is data corresponding to the first change in the number of steps after the first moment; Determine a difference between the first moment and the third moment to obtain a time difference; The determining that the first terminal device is in the walking climbing state when the altitude difference is greater than a first threshold value includes: determining that the first terminal device is in the walking climbing state when the altitude difference is greater than the first threshold value and the time difference is less than a second threshold value.

6. The method according to claim 5, characterized in that The method further comprises: Acquire multiple base station number information between the first moment and the second moment; When the number of changes in the multiple base station number information exceeds a third threshold, the altitude difference is less than or equal to the first threshold, and / or the time difference is greater than or equal to the second threshold, it is determined that the first terminal device is not in the walking climbing state.

7. The method according to any one of claims 2, 5-6, characterized in that: The method further comprises: When it is determined that the first terminal device is in the walking climbing state, determine the sum of the first pedometer data and the second pedometer data to obtain a step accumulation value; wherein the first pedometer data is the pedometer data obtained at the first moment, and the second pedometer data is the pedometer data obtained at the second moment; When the accumulated value of the number of steps is greater than the product of the altitude difference and the fourth threshold, the altitude difference is determined to be the climbing height in the walking climbing state.

8. The method according to claim 7, characterized in that The method further comprises: Displaying a first interface; the first interface includes a first control for instructing to start exercise recording; When an operation on the first control is received, a second interface is displayed; wherein the second interface includes the climbing height.

9. The method according to claim 8, characterized in that The method further comprises: When the first terminal device receives an operation to end the exercise record, a third interface is displayed; wherein the third interface includes information for indicating the maximum climbing height and a second control for viewing an exercise chart; When the first terminal device receives an operation on the second control, a fourth interface is displayed; the fourth interface includes: a chart for indicating the change of the climbing height.

10. The method according to any one of claims 1-2, 5-6, 8-9, characterized in that: The method further comprises: When the first terminal device is in the first state, it is determined that the first terminal device is not in the walking and climbing state.

11. The method according to claim 1, characterized in that: The first terminal device includes: a Bluetooth hardware abstraction layer BT HAL, a connection service module and a preset HAL, the BT HAL and the preset HAL are located in the HAL, the connection service module is located in the application framework layer, and the method further includes: The BT HAL obtains the first air pressure data and the second air pressure data; the first air pressure data and the second air pressure data are both sent by the second terminal device based on Bluetooth; The BT HAL sends the first air pressure data and the second air pressure data to the connection service module; The connection service module sends the first air pressure data and the second air pressure data to a preset HAL; Determining that the first terminal device is in the walking and climbing state based on the first air pressure data obtained at the first moment and the second air pressure data obtained at the second moment includes: the preset HAL determines that the first terminal device is in the walking and climbing state based on the first air pressure data and the second air pressure data.

12. The method according to claim 11, characterized in that The first terminal device also includes: a preset sensor hub, and the determining whether the first terminal device is in the first state based on the acceleration data includes: The preset sensor hub determines whether the first terminal device is in the first state based on the acceleration data.

13. The method according to claim 11, characterized in that The HAL also includes: a modem HAL, and the method further includes: The modem HAL obtains multiple base station number information between the first moment and the second moment; The modem HAL sends the plurality of base station number information to the preset HAL; When the number of changes in the multiple base station number information exceeds a third threshold, the altitude difference is less than or equal to the first threshold, and / or the time difference is greater than or equal to the second threshold, the preset HAL determines that the first terminal device is not in the walking climbing state; the altitude difference is the difference between the altitude corresponding to the first air pressure data and the altitude corresponding to the second air pressure data; the time difference is the difference between the first moment and the third moment, and the third moment is the moment when the number of steps changes for the first time after the first moment.

14. A method for identifying a climbing state, characterized in that: The method comprises: Establishing a communication connection with a second terminal device; Sending a first instruction to the second terminal device; the first instruction is used to instruct the second terminal device to obtain first air pressure data and second air pressure data collected after the air pressure changes; receiving the first air pressure data and the second air pressure data from the second terminal device; Acquire acceleration data; the acceleration data is data acquired within a preset time period; the preset time period includes a first moment and a second moment; Based on the acceleration data, determining whether the first terminal device is in a first state; the first state is used to indicate that the first terminal device is located at different altitudes at at least two moments when the first terminal device is in the first state; When the first terminal device is not in the first state, it is determined that the first terminal device is in a walking climbing state based on the first air pressure data obtained at the first moment and the second air pressure data obtained at the second moment; wherein, The first terminal device in the walking climbing state is located at different altitudes at the first moment and the second moment.

15. A terminal device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the terminal device executes the method according to any one of claims 1 to 13, or executes the method according to claim 14.

16. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the computer executes the method according to any one of claims 1 to 13, or executes the method according to claim 14.