Data processing method and device, storage medium and electronic equipment

CN122548237APending Publication Date: 2026-08-11SUUNTO SPORTS TECHNOLOGY (DONGGUAN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-07
Publication Date
2026-08-11

AI Technical Summary

Technical Problem

[0003]本申请提供一种数据处理方法、装置、存储介质以及电子设备,可以解决相关技术中难以准确计算海拔变化量的技术问题

Benefits of technology

[0014]本申请一些实施例提供的技术方案带来的有益效果至少包括:

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122548237A_ABST
    Figure CN122548237A_ABST
Patent Text Reader

Abstract

This application discloses a data processing method, apparatus, storage medium, and electronic device. First, altitude data is constructed into an ordered sequence. Based on this, a corresponding vertical distance threshold is dynamically calculated according to the degree of change in altitude trajectory segments. This threshold is negatively correlated with the degree of change, achieving a dynamic balance between feature point extraction accuracy and noise suppression capability. Next, data points are compared with the dynamic vertical distance threshold of their respective trajectory segments to filter out feature points that meet the criteria. Finally, altitude change feature data of the altitude trajectory is determined and output based on the altitude change characteristics between adjacent feature points. This application improves feature point extraction accuracy and achieves accurate, real-time, and stable calculation of altitude changes under complex terrain and dynamic motion conditions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of altitude calculation, and more particularly to a data processing method, apparatus, storage medium, and electronic device. Background Technology

[0002] In existing technologies, barometric pressure data processing often employs fixed-parameter filtering, and ascent and descent calculations rely on fixed altitude thresholds. Furthermore, curve simplification methods such as the Douglas-Peucker algorithm (DP algorithm) have not been effectively applied in real-time altitude processing. This is because current fixed-parameter thresholds and algorithmic mechanisms cannot dynamically adjust parameters based on the rate of change in barometric pressure, nor can they effectively identify abrupt changes in barometric pressure. The ascent and descent calculations neglect the trend and duration of altitude changes, and the separation of external signal quality from the calculation strategy leads to inaccurate altitude change identification results in scenarios involving complex terrain and signal fluctuations. Summary of the Invention

[0003] This application provides a data processing method, apparatus, storage medium, and electronic device, which can solve the technical problem of difficulty in accurately calculating altitude changes in related technologies.

[0004] In a first aspect, embodiments of this application provide a data processing method, the method comprising: The received multiple altitude data points are identified as an altitude data sequence to be processed; Based on the degree of change of each altitude trajectory segment in the above altitude data sequence, the vertical distance threshold corresponding to each altitude trajectory segment is dynamically calculated. The above vertical distance threshold is negatively correlated with the degree of change of the altitude trajectory segment. The vertical distance between the data point in the above altitude data sequence and the reference benchmark corresponding to the altitude trajectory segment where the data point is located is compared with the vertical distance threshold corresponding to the altitude trajectory segment where the data point is located, and the data point is retained as a feature point based on the comparison result. For each feature point retained in the above altitude data sequence, the altitude change feature data of the altitude trajectory is determined and output based on the altitude change characteristics between adjacent feature points.

[0005] In one possible implementation, before determining the received multiple altitude data as the altitude data sequence to be processed, the method further includes: acquiring real-time collected raw air pressure data and sampling time intervals; calculating the current air pressure change based on the raw air pressure data and the air pressure data output from the previous filtering; calculating a dynamic threshold based on the sampling time interval, historical air pressure changes, and preset dynamic adjustment parameters; determining corresponding filtering parameters based on the proportional relationship between the current air pressure change and the dynamic threshold, so that the filtering intensity during filtering is negatively correlated with the magnitude of the current air pressure change; filtering the raw air pressure data based on the adjusted filtering parameters, and generating the altitude data based on the filtered air pressure data.

[0006] In one possible implementation, after filtering the original air pressure data based on the adjusted filtering parameters, the method further includes: calculating the trend characteristics of air pressure changes based on the statistical characteristics of multiple historical air pressure changes; identifying and removing abnormal air pressure data based on the current air pressure change and the trend characteristics; and updating the filter output when the air pressure data is determined to be reliable.

[0007] In one possible implementation, before determining the received multiple altitude data as an altitude data sequence to be processed, the method further includes: obtaining the current quality level of the external positioning signal, determining the vertical distance threshold corresponding to the current quality level, wherein the vertical distance threshold is negatively correlated with the quality of the external positioning signal; and suspending the calculation of altitude change when the current quality level of the external positioning signal is lower than a preset threshold.

[0008] In one possible implementation, after determining whether to retain the data point as a feature point based on the comparison result, the method further includes: performing anomaly identification on the extracted feature points and removing the abnormal feature points.

[0009] In one possible implementation, determining the received multiple altitude data as an altitude data sequence to be processed includes: storing each received altitude data sequentially into an altitude trajectory buffer to form an altitude data sequence to be processed, wherein the number of data contained in the altitude trajectory buffer is fixed and updated based on the first-in-first-out principle.

[0010] In one possible implementation, the above-mentioned determination and output of altitude change feature data of the altitude trajectory based on the altitude change characteristics between adjacent feature points includes: analyzing the direction and amount of altitude change of adjacent feature points in the feature point set to determine the ascending and descending segments of the altitude trajectory; accumulating the altitude change amounts of each adjacent feature point in the ascending segment to obtain the ascending height, and accumulating the corresponding time span to obtain the ascending time; accumulating the altitude change amounts of each adjacent feature point in the descending segment to obtain the descending height, and accumulating the corresponding time span to obtain the descending time; the method further includes: smoothing the ascending height, ascending time, descending height, and descending time to obtain the altitude change data set to be output; and visually rendering and displaying the altitude change data set on the user device's display interface.

[0011] Secondly, embodiments of this application provide a data processing apparatus, the apparatus comprising: The altitude data acquisition module is used to determine the multiple received altitude data into an altitude data sequence to be processed. The threshold dynamic adjustment module is used to dynamically calculate the vertical distance threshold corresponding to each altitude trajectory segment based on the degree of change of each altitude trajectory segment in the above altitude data sequence. The vertical distance threshold is negatively correlated with the degree of change of the altitude trajectory segment. The feature point extraction module is used to compare the vertical distance between the data point in the above altitude data sequence and the reference benchmark corresponding to the altitude trajectory segment where the data point is located with the vertical distance threshold corresponding to the altitude trajectory segment where the data point is located, and to determine whether to retain the data point as a feature point based on the comparison result. The altitude feature processing module is used to determine and output the altitude change feature data of the altitude trajectory based on the altitude change features between adjacent feature points for each feature point retained in the above altitude data sequence.

[0012] Thirdly, embodiments of this application provide a computer storage medium storing a plurality of instructions adapted for loading by a processor and executing the steps of the method described above.

[0013] Fourthly, embodiments of this application provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is adapted to be loaded by the processor and to execute the steps of the method described above.

[0014] The beneficial effects of the technical solutions provided in some embodiments of this application include at least the following: This application provides a data processing method that identifies multiple received altitude data points as an altitude data sequence to be processed. It dynamically calculates the vertical distance threshold corresponding to each altitude trajectory segment based on the degree of change in each segment, with the vertical distance threshold being negatively correlated with the degree of change in the corresponding altitude trajectory segment. The method compares the vertical distance between a data point in the altitude data sequence and the reference benchmark corresponding to its altitude trajectory segment with the vertical distance threshold corresponding to that data point's altitude trajectory segment, and determines whether to retain the data point as a feature point based on the comparison result. For each retained feature point in the altitude data sequence, the method determines and outputs the altitude change feature data of the altitude trajectory based on the altitude change characteristics between adjacent feature points. Firstly, the altitude data to be processed is identified as an ordered sequence, providing a structured data foundation for subsequent trajectory analysis and feature extraction. It also provides a unified data access paradigm for sliding window management and incremental calculation in real-time data processing scenarios. Based on this, the vertical distance threshold corresponding to each altitude trajectory segment is dynamically calculated according to the degree of change in each altitude trajectory segment in the altitude data sequence. This vertical distance threshold is then negatively correlated with the degree of change in the corresponding altitude trajectory segment, achieving a dynamic association between the vertical distance threshold and the local degree of change in the trajectory segment. This allows the threshold to adaptively adjust with the trajectory shape, using a larger threshold in flat sections to effectively filter noise interference and a smaller threshold in drastically changing sections to accurately capture altitude inflection points. This achieves a dynamic balance between feature point extraction accuracy and noise suppression performance, significantly improving the adaptability of feature point extraction to complex terrain conditions. Furthermore, the vertical distance between a feature point and the reference benchmark corresponding to its altitude trajectory segment is compared in real time with its dynamic vertical distance threshold within the trajectory segment. This enables online filtering and incremental updates of feature points, allowing the system to simplify the trajectory in real time during continuous altitude data input, ensuring real-time response for subsequent ascent and descent calculations. Finally, the elevation change feature data is calculated based on the elevation change characteristics between adjacent feature points in the feature point set. Since the feature points themselves have been filtered by dynamic thresholds, points with real turning significance in the trajectory are retained. Therefore, the elevation change between adjacent feature points can accurately reflect the real rising and falling trends. Based on the cumulative calculation method of feature points and the complete preservation of time series information, the effect of accurate, real-time and stable calculation of elevation change under complex terrain and dynamic movement conditions is finally achieved. Attached Figure Description

[0015] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0016] Figure 1 An exemplary system architecture diagram of a data processing method provided in this application embodiment; Figure 2 A flowchart illustrating a data processing method provided in an embodiment of this application; Figure 3 A flowchart illustrating a data processing method provided in an embodiment of this application; Figure 4 A flowchart illustrating a data processing method provided in an embodiment of this application; Figure 5 A structural block diagram of a data processing apparatus provided in an embodiment of this application; Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0017] To make the features and advantages of this application more apparent and understandable, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0018] In the following description, when referring to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims. Furthermore, in the description of the embodiments of this application, unless otherwise stated, " / " means "or," for example, A / B can mean A or B; the word "and / or" in the text is merely a description of the relationship between related objects, indicating that three relationships can exist, for example, A and / or B can represent: A alone, A and B simultaneously, and B alone. Additionally, in the description of the embodiments of this application, "multiple" refers to two or more.

[0019] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as implying or suggesting relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature.

[0020] In existing technologies, barometric pressure data processing commonly employs fixed-parameter filtering algorithms to smooth sensor outputs, aiming to suppress noise interference with measurement results. Meanwhile, the calculation of altitude gain and loss typically relies on a preset fixed altitude change threshold; when continuously observed altitude changes exceed this threshold, the system begins accumulating the gain or loss value. Furthermore, the Douglas-Peucker algorithm, a classic curve simplification method in geographic information systems, focuses on iteratively extracting and retaining key feature points in the curve, achieving data simplification while maintaining the overall curve shape. It is currently widely used for simplifying static geographic trajectories.

[0021] However, due to the dynamic and complex nature of air pressure signals and altitude changes in real-world motion scenarios, the aforementioned existing technical approaches have a series of inherent defects in practical applications. Specifically, fixed-parameter filtering algorithms cannot dynamically adjust the filtering intensity according to the drastic changes in air pressure, resulting in a lag in filtering response during rapid air pressure changes, failing to track real altitude changes in a timely manner; while during relatively stable air pressure phases, over-filtering may weaken the effective signal, affecting the accurate representation of the data. This lack of filtering modes directly restricts the accuracy of subsequent ascent and descent calculations. In scenarios of sudden air pressure changes, existing technologies also lack effective identification and processing mechanisms. When sensors experience instantaneous air pressure jumps due to drastic changes in the external environment or equipment malfunctions, the system struggles to distinguish whether such jumps truly reflect altitude changes, often directly incorporating them into the calculation process, leading to misjudgments. Such situations occur frequently, especially in complex terrain or outdoor environments with variable weather conditions, further amplifying the unreliability of the calculation results.

[0022] In addition, the fixed threshold strategy relied upon for ascent and descent calculations also has limitations. This method only focuses on whether the elevation change in a single direction exceeds a preset threshold, without considering the comprehensive impact on the overall trend and duration of elevation changes. This simplified logic is generally usable under flat terrain or stable signal conditions, but when faced with complex terrain with frequent undulations and uneven changes, it is prone to false triggering or missed detection of ascent and descent states, leading to a serious discrepancy between the accumulated altitude data and the actual movement. Moreover, external positioning signals such as those from the Global Navigation Satellite System often fluctuate in complex environments, and their quality directly affects the reliability of the elevation data. However, traditional algorithms separate the external signal quality from the ascent and descent calculation strategy, failing to dynamically adjust the calculation threshold and validity judgment based on signal quality. This results in the output of calculation results even when the signal is poor, lacking corresponding fault tolerance and degradation mechanisms, further weakening the overall robustness of the system. Although the Douglas-Peucker algorithm has excellent feature extraction and curve simplification capabilities in static geographic data processing, it is still relatively weak in calculating ascent and descent in real-time elevation data. Originally designed for offline processing of static, complete trajectory data, this algorithm lacks targeted optimization for the dynamics, temporal continuity, and noise characteristics of real-time data streams. Therefore, it cannot directly meet the processing needs of real-time altitude data in outdoor sports, and its potential in high-precision feature point extraction has not been fully utilized.

[0023] In summary, these shortcomings not only make it difficult to balance computational accuracy and response speed, but also cause the system to exhibit significant lack of adaptability and decreased reliability in real-world application scenarios such as complex terrain, variable weather, or unstable signals. Therefore, this application provides a data processing method to solve the above-mentioned technical problems.

[0024] Please see Figure 1 , Figure 1 An exemplary system architecture diagram of a data processing method provided in an embodiment of this application.

[0025] like Figure 1 As shown, the system architecture may include electronic device 101, network 102, and server 103. Network 102 serves as the medium for providing a communication link between electronic device 101 and server 103. Network 102 may include various types of wired or wireless communication links, such as: wired communication links including fiber optic, twisted-pair, or coaxial cable; and wireless communication links including Bluetooth, Wireless-Fidelity (Wi-Fi), or microwave communication links, etc.

[0026] Electronic device 101 can interact with server 103 via network 102 to receive messages from or send messages to server 103. Alternatively, electronic device 101 can interact with server 103 via network 102 to receive messages or data sent to server 103 by other users. Electronic device 101 can be hardware or software. When electronic device 101 is hardware, it can be various terminal devices, including but not limited to smartwatches and smartphones. When electronic device 101 is software, it can be installed in the aforementioned electronic devices, and can be implemented as multiple software programs or software modules (e.g., to provide distributed services) or as a single software program or software module; no specific limitation is made here.

[0027] In this embodiment, the electronic device 101 first determines the received multiple altitude data as an altitude data sequence to be processed; further, the electronic device 101 dynamically calculates the vertical distance threshold corresponding to each altitude trajectory segment based on the degree of change of each altitude trajectory segment in the altitude data sequence, and the vertical distance threshold is negatively correlated with the degree of change of the altitude trajectory segment; the vertical distance between the data point in the altitude data sequence and the reference benchmark corresponding to the altitude trajectory segment is compared with the vertical distance threshold corresponding to the altitude trajectory segment of the data point, and the comparison result determines whether to retain the data point as a feature point; finally, for each feature point retained in the altitude data sequence, the electronic device 101 determines and outputs the altitude change feature data of the altitude trajectory based on the altitude change characteristics between each adjacent feature point.

[0028] Server 103 can be a server that provides various services. It should be noted that server 103 can be hardware or software. When server 103 is hardware, it can be implemented as a distributed server cluster consisting of multiple servers, or as a single server. When server 103 is software, it can be implemented as multiple software programs or software modules (e.g., used to provide distributed services), or as a single software program or software module; no specific limitations are made here.

[0029] Alternatively, the system architecture may not include server 103. In other words, server 103 may be an optional device in the embodiments of this specification. That is, the method provided in the embodiments of this specification can be applied to a system structure that only includes electronic device 101. The embodiments of this application do not limit this.

[0030] It should be understood that Figure 1 The number of electronic devices, networks, and servers shown is only illustrative; the number of electronic devices, networks, and servers can be any number depending on the implementation requirements.

[0031] Please see Figure 2 , Figure 2 This is a flowchart illustrating a data processing method provided in an embodiment of this application. The execution entity in this embodiment can be an electronic device performing data processing, a processor within an electronic device performing the data processing method, or a data processing service within an electronic device performing the data processing method. For ease of description, the following uses a processor within an electronic device as an example to describe the specific execution process of the data processing method.

[0032] like Figure 2 As shown, the data processing method may include at least: S202. The received multiple altitude data are identified as an altitude data sequence to be processed.

[0033] Optionally, in traditional methods for calculating altitude changes, systems typically treat altitude data from positioning modules such as barometric pressure sensors or global navigation satellite systems as independent discrete sampling points. These methods often truncate altitude data based on fixed time windows or fixed data volumes, and then filter the truncated data points in an isolated manner. In this processing mode, the discrete data organization makes it difficult to reflect the temporal dimension and spatial continuity information during the altitude change process. Based on this, the embodiments of this application determine the received multiple altitude data as an altitude data sequence to be processed. The core of this operation is that the system can organize continuous altitude data into a serialized data structure with a clear sequence, providing a structured data foundation for subsequent trajectory analysis and feature extraction, and also providing a unified data access paradigm for altitude change calculation in real-time data processing scenarios.

[0034] In the specific implementation, when the system continuously receives altitude data from the barometric pressure sensor or positioning module, it does not simply send each new data point directly to the subsequent calculation module. Instead, it first stores the data sequentially in a preset buffer according to the receiving time, forming a complete altitude data sequence. This sequence is constructed strictly according to the data's temporal order, ensuring that each data point has a clear temporal association with its preceding and following data points. This provides a unified and reliable contextual framework for subsequent trajectory segment division, local feature analysis, and dynamic threshold calculation. In one feasible implementation, the altitude data sequence can be managed using a sliding window mechanism. The window length can be configured according to the system's computing resources and real-time requirements. The window always retains a certain number of the latest altitude data points, ensuring both the timeliness of data processing and providing sufficient contextual information for local feature analysis of trajectory segments. Through this data sequence caching mechanism, the system incorporates discrete sampling points into a unified temporal framework, laying the data foundation for subsequent differentiated processing based on local trajectory features.

[0035] S204. Calculate the vertical distance threshold corresponding to each altitude trajectory segment dynamically based on the degree of change of each altitude trajectory segment in the altitude data sequence. The vertical distance threshold is negatively correlated with the degree of change of the altitude trajectory segment.

[0036] Optionally, in traditional feature point extraction and trajectory simplification schemes, the system typically uses a globally fixed vertical distance threshold for feature point filtering. Specifically, when processing static geographic trajectories, traditional algorithms pre-set a fixed vertical distance threshold and iteratively simplify the entire trajectory based on this threshold. The specific process involves recursive segmentation and distance threshold judgment to eliminate redundant points while preserving the overall shape of the curve, thereby achieving data compression. Generally, the algorithm steps include at least: (1) Connecting the beginning and end points: drawing a straight line (called a "chord") between the starting and ending points of the curve; (2) Calculating the maximum distance: finding the vertical distance from all intermediate points on the curve to the chord and identifying the maximum distance d. max and its corresponding data points; (3) Comparison with the threshold: if d max If the vertical distance threshold is less than the threshold, it means that all intermediate points are close enough to the straight line and can be discarded, keeping only the first and last points. If d max If the vertical distance threshold is ≥, then the farthest point needs to be retained and the original curve is divided into two segments from this point; (4) Recursive processing: repeat the above process for each sub-curve until it can no longer be divided (i.e., the maximum distance of all sub-segments is less than the threshold), thus obtaining all feature points of the simplified curve.

[0037] However, in outdoor sports scenarios, altitude trajectories can exhibit drastically different characteristics at different times. For example, altitude changes are small and fluctuations are low on flat sections, while steep sections or areas with complex terrain may experience dramatic elevation jumps and rapid turns. Therefore, when using a fixed threshold, if the threshold is set too low, many small fluctuations caused by sensor noise will be misidentified as key feature points on flat sections, leading to feature point redundancy and wasted computational resources. If the threshold is set too high, true altitude turning points may be missed on sections with dramatic changes, causing subsequent ascent and descent calculations to lose crucial information and resulting in a significant deviation between the accumulated altitude and the actual situation. It can be seen that the fixed threshold mechanism cannot perceive the drastic changes in local trajectories and lacks the ability to dynamically adjust to adapt to the trajectory shape.

[0038] Furthermore, to achieve more accurate ascent and descent calculations, this application employs a dynamic adjustment mechanism for the vertical distance threshold. Specifically, it dynamically calculates the vertical distance threshold corresponding to each altitude trajectory segment based on the degree of change in different altitude trajectory segments within the altitude data sequence, and sets a negative correlation between the vertical distance threshold and the degree of change in the corresponding altitude trajectory segment. Based on this, the system no longer relies on a single globally fixed threshold, but instead divides the entire altitude trajectory into several trajectory segments, independently calculates the degree of local change for each trajectory segment, and generates a vertical distance threshold specific to that trajectory segment, thereby achieving a dynamic correlation between the vertical distance threshold and the degree of local change in the trajectory segment.

[0039] In practical implementation, the degree of change in elevation trajectory segments can be quantified in various ways, such as calculating the standard deviation, variance, average or maximum elevation change between adjacent points of the elevation data points within the trajectory segment, or by fitting more complex statistical features such as the rate of change of local slope. Understandably, the negative correlation between the vertical distance threshold and the degree of change means that a larger vertical distance threshold will be used in trajectory segments with gentle changes, effectively filtering out false feature points caused by sensor noise or minor fluctuations; while a smaller vertical distance threshold will be used in trajectory segments with drastic changes, preserving key points at rapid elevation transitions. This dynamic threshold generation mechanism allows the accuracy of feature point extraction to automatically adjust with changes in trajectory morphology, achieving a dynamic balance between noise suppression capability and feature preservation accuracy, significantly improving the adaptability of feature point extraction to complex terrain conditions.

[0040] S206. Compare the vertical distance between the data point in the altitude data sequence and the reference benchmark corresponding to the altitude trajectory segment where the data point is located with the vertical distance threshold corresponding to the altitude trajectory segment where the data point is located, and determine whether to retain the data point as a feature point based on the comparison result.

[0041] Optionally, based on the vertical distance threshold calculated above, the system further compares the vertical distance between a data point in the altitude data sequence and the reference benchmark corresponding to its altitude trajectory segment with the vertical distance threshold corresponding to the altitude trajectory segment containing the data point, and determines whether to retain the current data point as a feature point based on the comparison result. During this operation, relying on the real-time update mechanism of the altitude data sequence, the feature point set maintained by the system is also dynamic. That is, whenever a new altitude data point arrives, it is not immediately determined whether it becomes a feature point, but rather it is incorporated into the context of the current trajectory segment for comprehensive judgment.

[0042] Specifically, the system calculates the vertical distance between the current data point and the reference benchmark corresponding to its altitude trajectory segment, and compares this distance with the dynamic vertical distance threshold corresponding to that trajectory segment. This reference benchmark is a geometric reference object determined for data points within the altitude trajectory segment, used to calculate the vertical distance from the data point in the trajectory to the geometric reference object. The calculation method for the reference benchmark includes at least: a straight line connecting the first and last endpoints of the trajectory segment, or a fitted curve obtained by fitting the data points within the trajectory segment. Understandably, the reference benchmark can illustrate the reasonable fluctuation pattern of this trajectory segment. Therefore, the vertical distance from the data point to the geometric reference object reflects the "significance" of the data point within its trajectory segment. Thus, if the vertical distance is greater than or equal to the current vertical distance threshold, it indicates that the data point has a significant deviation characteristic relative to the current trajectory segment, belonging to a key turning point that can characterize changes in trajectory shape, and is therefore retained as a feature point. If the vertical distance is less than the current vertical distance threshold, it indicates that the data point is located within a simplified area of ​​the trajectory segment, having a small impact on the overall trajectory shape, and can therefore be filtered out. Through this online comparison and incremental judgment mechanism, the system can complete feature point screening in real time during the continuous input of altitude data, ensuring a real-time response for subsequent ascent and descent calculations.

[0043] S208. For each feature point retained in the altitude data sequence, determine and output the altitude change feature data of the altitude trajectory based on the altitude change characteristics between each adjacent feature point.

[0044] Optionally, in traditional methods for calculating ascent and descent, the system typically triggers the accumulation of ascent or descent based on raw altitude data or data after simple filtering, using a preset fixed altitude change threshold. However, due to the unavoidable noise and short-term fluctuations in the raw data, the fixed threshold struggles to distinguish between the true movement trend and instantaneous disturbances, easily misjudging minute fluctuations caused by noise as the start or end boundary of ascent or descent, leading to a significant deviation between the accumulated result and the user's actual movement trajectory. Furthermore, the fixed threshold mechanism lacks the ability to perceive the overall trend of altitude changes. Under complex terrain conditions, when the altitude shows a gradual, continuous increase but the single-step change does not exceed the threshold, the system may fail to correctly identify and accumulate the increase in altitude, resulting in missed judgments. Based on this, the embodiments of this application consider that the obtained feature points have already undergone dynamic threshold filtering, retaining points in the trajectory that have true turning significance. Therefore, the altitude changes between adjacent feature points can accurately reflect the true ascent and descent trends. Consequently, based on the altitude change characteristics between adjacent feature points, the altitude change characteristic data of the altitude trajectory can be accurately determined and output. For example, when quantifying altitude change characteristics, the altitude change characteristic data specifically includes at least the altitude and time of ascent in the ascending segment and the altitude and time of descent in the descending segment of the altitude trajectory.

[0045] Specifically, this application's embodiments base ascent and descent calculations on feature point sequence analysis, determining the motion phase through the altitude change relationship between feature points. For example, when the altitude changes of multiple consecutive adjacent feature point pairs are all positive, it is determined to be an ascent segment; when the altitude changes of multiple consecutive adjacent feature point pairs are all negative, it is determined to be a descent segment. After determining the ascent segment, the system accumulates the altitude changes between each adjacent feature point within that segment to obtain the ascent height, and simultaneously accumulates the corresponding time span to obtain the ascent time; similarly, the descent segment is accumulated to obtain the descent height and descent time. Ultimately, the system output not only includes the altitude change but also the corresponding time consumption, providing complete quantitative indicators to support motion analysis and performance evaluation in outdoor sports scenarios.

[0046] In this embodiment, a data processing method is provided, which determines multiple received altitude data as an altitude data sequence to be processed; dynamically calculates the vertical distance threshold corresponding to each altitude trajectory segment based on the degree of change of each altitude trajectory segment in the altitude data sequence, wherein the vertical distance threshold is negatively correlated with the degree of change of the altitude trajectory segment; compares the vertical distance between a data point in the altitude data sequence and the reference benchmark corresponding to its altitude trajectory segment with the vertical distance threshold corresponding to the altitude trajectory segment of the data point, and determines whether to retain the data point as a feature point based on the comparison result; for each feature point retained in the altitude data sequence, the altitude change feature data of the altitude trajectory is determined and output based on the altitude change characteristics between adjacent feature points. First, the altitude data to be processed is determined as an ordered sequence, which provides a structured data foundation for subsequent trajectory analysis and feature extraction, and also provides a unified data access paradigm for sliding window management and incremental calculation in real-time data processing scenarios. Based on this, the vertical distance threshold corresponding to each altitude trajectory segment is dynamically calculated according to the degree of change in each altitude trajectory segment in the altitude data sequence. This vertical distance threshold is then negatively correlated with the degree of change in the corresponding altitude trajectory segment, achieving a dynamic association between the vertical distance threshold and the local degree of change in the trajectory segment. This allows the threshold to adaptively adjust with the trajectory shape, using a larger threshold in flat sections to effectively filter noise interference and a smaller threshold in drastically changing sections to accurately capture altitude inflection points. This achieves a dynamic balance between feature point extraction accuracy and noise suppression performance, significantly improving the adaptability of feature point extraction to complex terrain conditions. Furthermore, the vertical distance between a feature point and the reference benchmark corresponding to its altitude trajectory segment is compared in real time with its dynamic vertical distance threshold within the trajectory segment. This enables online filtering and incremental updates of feature points, allowing the system to simplify the trajectory in real time during continuous altitude data input, ensuring real-time response for subsequent ascent and descent calculations. Finally, the elevation change feature data is calculated based on the elevation change characteristics between adjacent feature points in the feature point set. Since the feature points themselves have been filtered by dynamic thresholds, points with real turning significance in the trajectory are retained. Therefore, the elevation change between adjacent feature points can accurately reflect the real rising and falling trends. Based on the cumulative calculation method of feature points and the complete preservation of time series information, the effect of accurate, real-time and stable calculation of elevation change under complex terrain and dynamic movement conditions is finally achieved.

[0047] Please see Figure 3 , Figure 3 This is a flowchart illustrating a data processing method provided in an embodiment of this application.

[0048] like Figure 3 As shown, the data processing method may include at least: S302. Obtain the raw air pressure data collected in real time and the sampling time interval.

[0049] Optionally, considering that the sampling frequency of the barometric pressure sensor may fluctuate under different motion states due to system resource scheduling or sensor hardware characteristics—for example, the system may use different sampling intervals depending on the mode set by the user in the device (a longer sampling interval in "power saving mode" and a shorter sampling interval in "standard mode")—this indicates that the sampling time interval is not a constant value. Therefore, to reduce filtering errors, this embodiment not only acquires the raw barometric pressure data but also simultaneously acquires the sampling time interval between the current sampling time and the previous sampling time. This sampling time interval can be the difference between the current time and the previous sampling time calculated in real time, or it can be a set value directly obtained from the sampling module. This data acquisition step explicitly incorporates time dimension information into the filtering process, providing key input parameters for subsequent dynamic threshold calculation.

[0050] It should be noted that in the initial stage of the barometric pressure data filtering process, the system also initializes a series of related parameters and modules involved in the filtering process, including but not limited to resetting the filtering state, dynamically adjusting parameters, and caching the previous filtering output results, i.e., historical data. It also sets an initial time reference point to calculate the current sampling time interval when needed.

[0051] S304. Calculate the current pressure change based on the original air pressure data and the air pressure data output from the previous filter.

[0052] Furthermore, in this embodiment, the currently input raw air pressure data is compared with the air pressure data output from the previous filter, and the difference between the two is calculated as the current air pressure change. This step takes into account that the raw data before filtering has not been smoothed and may contain high-frequency noise. If the calculation is directly based on the raw historical air pressure data sampled previously, the noise disturbance will be amplified. Therefore, the previous filtered output value, which has already undergone wave filtering, is used as a reference to ensure the accuracy of subsequent calculations. Since the previous filtered output has undergone smoothing processing in the preceding filtering stage, it can more accurately reflect the steady-state value or trend value of air pressure. Therefore, the air pressure change calculated based on this can reflect the real air pressure change trend, effectively suppressing the interference of sensor noise on the change calculation, and providing more reliable basic data for subsequent dynamic threshold generation and filter parameter adjustment.

[0053] S306. Calculate the dynamic threshold based on the sampling time interval, historical air pressure changes, and preset dynamic adjustment parameters.

[0054] Optionally, in a fixed-threshold filtering scheme, the system typically sets a constant threshold for the amount of change to determine whether the current air pressure data represents an abnormal fluctuation, and accordingly decides whether and how to adjust the filtering parameters. The drawback of this fixed-threshold mechanism is that it ignores the dynamic characteristics of air pressure changes and the influence of the sampling time interval. For example, with a long sampling interval, even if the actual rate of change in air pressure is small, the pressure change between adjacent sampling points may be large due to the cumulative effect over time; conversely, with a short sampling interval, even if the actual air pressure changes drastically, the change between adjacent sampling points may be small. The fixed threshold cannot adapt to the scale changes in change caused by fluctuations in the sampling interval, leading to inconsistent judgments about the same physical trend at different sampling frequencies.

[0055] Optionally, to achieve adaptive adjustment of the filtering parameters, this embodiment of the application comprehensively calculates the dynamic threshold by considering the sampling time interval, historical air pressure changes, and preset dynamic adjustment parameters. Specifically, using the sampling time interval as a key input factor for threshold calculation allows the threshold to adaptively scale with changes in the sampling frequency, thereby eliminating the influence of sampling interval fluctuations on the threshold determination scale. The preset dynamic adjustment parameters are used to control the overall baseline level of the threshold's sensitivity to air pressure changes and can be configured according to equipment characteristics or application scenarios. In addition, the calculation of the dynamic threshold also incorporates the statistical characteristics of historical air pressure changes, such as using the smoothed mean or variance of historical changes to help determine the reasonable range of the current threshold, thereby further reducing the impact of short-term fluctuations on the threshold calculation. This ensures that the final dynamic threshold reflects both the current trend and historical statistical patterns, achieving more robust dynamic adjustment.

[0056] S308. Determine the corresponding filtering parameters based on the ratio between the current air pressure change and the dynamic threshold, so that the filtering intensity during filtering is negatively correlated with the magnitude of the current air pressure change.

[0057] Optionally, considering that a stronger filter intensity helps suppress noise and improve data stability when the air pressure is stable, while a weaker filter intensity helps improve response speed when the air pressure changes rapidly and fluctuates drastically, the system can dynamically determine the filter parameters based on the ratio between the current air pressure change and the dynamic threshold, making the filter intensity negatively correlated with the magnitude of the current air pressure change, thereby transforming the filter parameters from static configuration to dynamic adaptive adjustment.

[0058] Specifically, the system first calculates the ratio of the current air pressure change amount to the dynamic threshold, and this ratio reflects the deviation degree of the current change amount relative to the normal fluctuation range. When the current air pressure change amount is small, it indicates that the current air pressure change is gentle and within the normal fluctuation range. At this time, the system uses a larger smoothing factor to enhance the filtering intensity, deeply smooth the input data, effectively suppress the sensor noise, and output a stable air pressure value. When the current air pressure change amount is large, it indicates that the current air pressure change is剧烈 (should be "severe" or "intense" in English), and it may correspond to a rapid real altitude change. At this time, the system uses a relatively small smoothing factor to reduce the filtering intensity, reduce the lag effect brought by filtering, enable the filtering output to quickly follow the change of the original signal, and improve the response speed. To ensure the smoothness of the adjustment of the filtering parameters, the system can also limit the change rate of the filtering parameters to avoid the output jitter caused by parameter mutation, thereby achieving the dynamic optimal balance between the filtering effect and the response speed.

[0059] In a feasible implementation manner, the current air pressure change amount is represented as diff, and the dynamic threshold is represented as limit. The system can set the mapping relationship between the ratio of diff to limit and the smoothing factor as follows: when diff < limit, the smoothing factor is 0.25; when limit ≤ diff < 2×limit, the smoothing factor is 0.01; when 2×limit ≤ diff < 4×limit, the smoothing factor is 0.005; when 4×limit ≤ diff < 8×limit, the smoothing factor is 0.001. It can be seen that the larger the current air pressure change amount is compared to the dynamic threshold, the smaller the corresponding smoothing factor and the lower the filtering intensity, while the smaller the current air pressure change amount, the larger the corresponding smoothing factor and the stronger the filtering intensity.

[0060] S310. Filter the original air pressure data based on the adjusted filtering parameters, and calculate and generate altitude data according to the filtered air pressure data.

[0061] Optionally, based on the already adjusted filtering parameters, further filter the currently input original air pressure data to obtain the filtered air pressure data, and then convert it into the altitude data required for the calculation of the subsequent altitude change amount. Specifically, the specific implementation of the filtering process can adopt various forms of digital filters, such as first-order low-pass filtering, weighted moving average, or Kalman filtering, etc. The filtered air pressure data eliminates the high-frequency noise interference and at the same time retains the real air pressure change trend. Then, through the standard air pressure-altitude conversion formula, stable and accurate altitude data can be obtained. Through this step, the system realizes the complete processing link from the original air pressure input to the altitude data output, providing high-quality data input for the subsequent up and down calculations.

[0062] S312. Calculate the trend characteristics of air pressure changes based on the statistical characteristics of multiple historical air pressure changes; identify and remove abnormal air pressure data based on the current air pressure change and trend characteristics; update the filter output when the air pressure data is determined to be reliable.

[0063] Optionally, when a barometric pressure sensor experiences a momentary jump due to physical shock, sudden environmental changes, or hardware malfunction, traditional filters treat these abnormal values ​​as normal signals and smooth them out, leading to undue fluctuations in the filtered output and consequently causing errors in altitude calculation. Therefore, to identify and remove unreliable barometric pressure data, the system introduces a multi-condition mutation detection mechanism before filtering the output. This mechanism comprehensively assesses the reliability of the input data before updating the filtered output, serving as a supplement and enhancement to the adaptive filtering.

[0064] In its implementation, the system calculates the trend characteristics of air pressure changes using statistical methods such as moving averages. For example, it calculates the moving average of air pressure changes at several past sampling points to characterize the overall trend of recent air pressure changes. Subsequently, the system performs multi-condition abrupt change judgment: on the one hand, it compares the current air pressure change with historical data to determine whether the current air pressure data significantly deviates from the historical statistical distribution, i.e., whether there is an abnormal abrupt change; on the other hand, it comprehensively evaluates the reliability of the current air pressure data by combining the instantaneous value of the air pressure change with its trend characteristics. For example, if the current air pressure change is much larger than the standard deviation of historical changes and is inconsistent with the direction of the trend characteristics, it is judged as an abnormal abrupt change. The system only performs the filter output update operation when the air pressure data is judged to be reliable; if it is judged as an unreliable abrupt change, the system ignores the current data, keeps the previous filter output unchanged, or uses the predicted value as a substitute. Through this mechanism, the system can effectively identify and filter false air pressure jumps caused by sensor anomalies or environmental abrupt changes, avoiding abnormal data contaminating the filter output, thereby significantly enhancing the robustness of altitude calculation to abnormal situations.

[0065] This application provides a data processing method that addresses the limitations of traditional fixed-parameter filtering in barometric pressure data processing by introducing dynamic adaptive filtering and a mutation detection mechanism. First, it acquires real-time raw barometric pressure data and sampling time intervals, and calculates barometric pressure changes based on historical filter outputs, providing a reliable basis for subsequent parameter adjustments. Then, based on the ratio of current barometric pressure change to a dynamic threshold, the filtering intensity is negatively correlated with the magnitude of the change. Filtering is enhanced to suppress noise when barometric pressure is stable, and the filtering intensity is reduced to improve response speed when barometric pressure changes rapidly, achieving a dynamic balance between smoothness and responsiveness. Furthermore, a multi-condition mutation detection mechanism, combined with historical statistical characteristics and current changes, effectively identifies and filters out false jumps caused by sensor anomalies or environmental mutations, using only reliable data for filter updates and avoiding interference from outliers in altitude calculations. In summary, this solution significantly improves response speed and anti-interference capabilities in complex dynamic environments while ensuring the smoothness of barometric pressure data, providing high-quality, highly reliable data input for subsequent altitude calculations.

[0066] Please see Figure 4 , Figure 4 This is a flowchart illustrating a data processing method provided in an embodiment of this application.

[0067] like Figure 4 As shown, the data processing method may include at least: S402. Obtain the current quality level of the external positioning signal and determine the vertical distance threshold corresponding to the current quality level. The vertical distance threshold is negatively correlated with the quality of the external positioning signal. When the current quality level of the external positioning signal is lower than the preset threshold, stop the calculation of altitude change.

[0068] Optionally, in traditional ascent and descent calculation schemes, the system typically relies solely on barometric pressure sensor data for altitude calculation, without considering the impact of external positioning signal quality on the calculation results. In this processing mode, when the quality of the external positioning signal (such as a Global Navigation Satellite System) is poor, the altitude value calculated based on barometric pressure data may accumulate errors due to the lack of effective reference calibration. If feature point extraction and ascent / descent accumulation are still performed according to the threshold under normal conditions, the calculation results will deviate significantly from the actual motion trajectory. Therefore, to improve the accuracy of altitude data, the embodiments of this application incorporate the quality information of the external positioning signal as an adaptive parameter into the decision chain of the calculation strategy.

[0069] Specifically, the system first acquires the current quality level of the external positioning signal (such as GNSS). This quality level can be comprehensively and quantitatively evaluated through indicators such as signal-to-noise ratio, number of satellites, and positioning accuracy factor, or it can be obtained directly from the configuration information transmitted by the external positioning signal source. Based on a preset mapping relationship, the system determines the vertical distance threshold corresponding to the current quality level. This threshold is negatively correlated with signal quality; that is, the better the signal quality, the smaller the threshold, thus retaining more feature points for high-precision calculation; conversely, the worse the signal quality, the larger the threshold, thus filtering out more noise points to ensure calculation stability. Furthermore, when the quality of the external positioning signal is lower than the preset threshold, the system actively stops calculating the altitude change. In one feasible implementation, quality level classification rules and the mapping relationship between each quality level and the vertical distance threshold can be preset. When the current quality level of the external positioning signal is determined, the vertical distance threshold value corresponding to that level is directly used in the subsequent calculation link. This mechanism can use the quality of external positioning signals as a preliminary criterion for calculating reliability. When the signal is unreliable, it can proactively downgrade or suspend calculations, thus avoiding the output of false calculation results when the data source is unreliable. This improves the robustness of the system and the reliability of the results in complex environments.

[0070] S404. The received altitude data are sequentially stored in the altitude trajectory buffer to form an altitude data sequence to be processed. The number of data contained in the altitude trajectory buffer is fixed and updated based on the first-in-first-out principle.

[0071] Furthermore, the system continuously maintains a fixed-capacity altitude trajectory buffer. Whenever new altitude data arrives, it is sequentially stored at the end of the altitude trajectory buffer. When the buffer capacity reaches its limit, the oldest data point is removed according to the first-in, first-out (FIFO) principle, thus ensuring that the buffer always stores a continuous sequence of altitude data from the most recent period. This operation transforms the traditional offline batch processing mode into an online streaming processing mode. The sliding window mechanism allows the system to continuously perform feature point extraction within a limited data window, ensuring both the data foundation for computation and controlling the time complexity of the algorithm, providing data organization guarantees for subsequent real-time feature point extraction. Simultaneously, through configurable window length, the system can flexibly balance computational accuracy and real-time response, adapting to the processing needs of different motion scenarios.

[0072] S406. Dynamically calculate the vertical distance threshold corresponding to each altitude trajectory segment based on the degree of change of each altitude trajectory segment in the altitude data sequence; compare the vertical distance between the data point in the altitude data sequence and the reference benchmark corresponding to the altitude trajectory segment to which the data point is located with the vertical distance threshold corresponding to the altitude trajectory segment to which the data point is located, and determine whether to retain the data point as a feature point based on the comparison result; perform anomaly identification on the extracted feature points and remove abnormal feature points.

[0073] In one feasible implementation, this application employs an improved Douglas-Peucker algorithm (DP algorithm) for feature point extraction, where the reference datum corresponding to the elevation trajectory segment where the data point is located can be represented as the reference chord in the algorithm. When determining whether to retain a data point as a feature point, the algorithm specifically selects data points whose vertical distance from the reference datum corresponding to their elevation trajectory segment is greater than or equal to the vertical distance threshold corresponding to that elevation trajectory segment as feature points.

[0074] During implementation, based on the vertical distance threshold dynamically determined according to the quality of external signals, further dynamic adjustments were made according to the degree of local change in the trajectory segment. The specific dynamic adjustment logic can be found in steps S204-S206, and will not be elaborated here. This dynamic adjustment logic allows the system to use a larger threshold in smooth trajectory segments and a smaller threshold in segments with drastic trajectory changes. Furthermore, for the current data point, the vertical distance between it and its corresponding reference chord is calculated. If the absolute value of this vertical distance is greater than or equal to the vertical distance threshold corresponding to the current trajectory segment, the point is retained as a feature point; otherwise, it is filtered out. Through this mechanism, the system can online filter out key turning points of the altitude trajectory in the real-time data stream. Based on this, the system further performs anomaly identification on the extracted feature points. For example, by analyzing whether the altitude change rate of the feature point exceeds the physically possible range, or whether it contradicts the change direction of the preceding and following feature points, unreliable feature points caused by abnormal factors such as sudden changes in air pressure are identified and removed, ensuring the accuracy and reliability of the feature point set.

[0075] In a preferred embodiment, this application also specifically optimizes the time complexity of the algorithm to improve the real-time performance of the computation process. In the traditional Douglas-Pock algorithm, its core computational process uses a recursive approach to segment the trajectory. The time complexity of this recursive mechanism can reach O(n²) in the worst case, where n is the number of data points in the trajectory. When this algorithm is applied to real-time altitude data processing, since the altitude data arrives continuously in a streaming manner, the trajectory length increases over time. If the recursive calculation is re-executed on the complete trajectory every time new data arrives, the computational load will increase quadratically with data accumulation. This can not only lead to computational lag but also significantly increase power consumption, affecting device battery life. Therefore, this application also introduces a multi-dimensional complexity optimization strategy in the improved Douglas-Pock algorithm. Feasible specific operations include: First, by combining a sliding window buffer mechanism, the processing range of the algorithm is limited to a data window of fixed length. Through a fixed-capacity buffer, the upper limit of the amount of data processed by the algorithm in each execution is kept constant. Regardless of the duration of the movement, the time complexity of the algorithm is controlled to the order of O(k), where k is the buffer capacity, a constant. This mechanism decouples the computation time of a single feature point extraction from the total trajectory length, eliminating the problem of computational load increasing with the accumulation of movement time. Second, an incremental feature point update strategy can be adopted. When new altitude data arrives, the system does not re-execute the complete feature extraction process for all data points in the buffer, but only performs local judgment on the new data point and its neighboring area, triggering recalculation of the local range only when necessary. This incremental processing mode can further reduce the computational load required for a single data update, enabling the algorithm to complete the processing of new data faster. Through optimization of time complexity, the improved Douglas-Pock algorithm can efficiently complete the processing of a single new data point, meeting the stringent requirements for real-time response in outdoor sports scenarios. Meanwhile, effective control of computational load also reduces the processor utilization and power consumption of terminal devices, ensuring stable operation and battery life of the system during long-term motion monitoring.

[0076] S408. Analyze the direction and amount of elevation change of adjacent feature points in the feature point set to determine the ascending and descending segments of the elevation trajectory; accumulate the elevation changes of each adjacent feature point in the ascending segment to obtain the ascending height, and accumulate the corresponding time span to obtain the ascending time; accumulate the elevation changes of each adjacent feature point in the descending segment to obtain the descending height, and accumulate the corresponding time span to obtain the descending time.

[0077] Optionally, after obtaining the feature points, the system further performs specific calculations for ascent and descent. The system first acquires a filtered and updated set of feature points, where the elevation changes between adjacent feature points accurately reflect the actual movement trend. Then, the system traverses the feature point sequence, analyzing the direction of elevation changes between adjacent feature points to identify continuous changes in the direction of movement. Specifically, when the elevation changes of multiple consecutive pairs of adjacent feature points are all positive, it is determined to be an ascent segment; when they are all negative, it is determined to be a descent segment; when the direction of change reverses, it signifies the end of the current movement segment and the beginning of a new one. After determining an ascent segment, the system accumulates the elevation changes between adjacent feature points within that segment to obtain the ascent height, and simultaneously accumulates the corresponding time span to obtain the ascent time; similarly, it accumulates the elevation changes for descent segments to obtain the descent height and descent time. Through this accumulation method based on the feature point sequence, the system can accurately capture the start and end boundaries of each continuous ascent or descent, avoiding false triggers caused by local fluctuations, while preserving complete time information and providing comprehensive quantitative indicators for motion analysis.

[0078] S410: Smooth the ascent altitude, ascent time, descent altitude, and descent time to obtain the set of altitude change data to be output; visualize and render the set of altitude change data and display it on the user device's display interface.

[0079] Furthermore, to reduce the interference of short-term fluctuations, the system smooths the accumulated altitude, ascent time, descent altitude, and descent time. This smoothing can be achieved using various filtering methods, such as first-order lag filtering or weighted moving average, to suppress output jitter caused by misjudgment of feature points or short-term fluctuations, making the changes in the accumulated results smoother and more continuous. The smoothed data forms the altitude change data set to be output, which contains complete statistics on ascent and descent. Finally, the system displays this data set on the user's device display interface using visualization rendering technology. Specifically, on the user's electronic devices (such as mobile terminals, smartwatches, etc.), various visualization forms such as numerical dashboards, line graphs, or bar charts can be used to intuitively present key indicators such as altitude, ascent time, descent altitude, and descent time to the user. Through this step, the system not only completes the complete data processing loop from raw data collection to calculation result output, but also transforms abstract data into motion information that users can intuitively perceive through visualization, improving user experience and data usability.

[0080] This application provides a data processing method that addresses the problems of poor adaptability, low accuracy, and insufficient real-time performance of traditional ascent and descent calculations in dynamic environments by introducing external signal quality adaptation and a pre-optimized Douglas-Puk algorithm. First, the vertical distance threshold is dynamically adjusted based on the quality of the external positioning signal. When the signal is good, more feature points are retained to improve accuracy; when the signal is poor, the threshold is increased to filter noise. The calculation is actively stopped when the signal quality falls below a preset threshold, avoiding contamination of the results by unreliable data sources and significantly enhancing robustness in complex environments. Based on this, the ascent and descent segments are analyzed based on feature point sequence analysis. By accumulating the elevation changes and time spans between adjacent feature points, the ascent height, ascent time, descent height, and descent time are accurately calculated, effectively avoiding misjudgments of local fluctuations and omissions of gentle slope changes inherent in traditional fixed-threshold methods. Finally, the accumulated results are smoothed and visualized, improving the stability of the data display and the user experience.

[0081] Please see Figure 5 , Figure 5 This is a structural block diagram of a data processing apparatus provided in an embodiment of this application. Figure 5 As shown, the data processing apparatus 500 includes: The altitude data acquisition module 510 is used to determine multiple received altitude data as an altitude data sequence to be processed. The threshold dynamic adjustment module 520 is used to dynamically calculate the vertical distance threshold corresponding to each altitude trajectory segment based on the degree of change of each altitude trajectory segment in the altitude data sequence. The vertical distance threshold is negatively correlated with the degree of change of the altitude trajectory segment. The feature point extraction module 530 is used to compare the vertical distance between a data point in the altitude data sequence and the reference benchmark corresponding to the altitude trajectory segment where the data point is located with the vertical distance threshold corresponding to the altitude trajectory segment where the data point is located, and to determine whether to retain the data point as a feature point based on the comparison result. The altitude feature processing module 540 is used to determine and output the altitude change feature data of the altitude trajectory based on the altitude change features between adjacent feature points for each feature point retained in the altitude data sequence.

[0082] Optionally, the data processing device 500 further includes: an adaptive pressure filtering module, used to acquire real-time raw pressure data and sampling time intervals; calculate the current pressure change based on the raw pressure data and the pressure data output from the previous filtering; calculate a dynamic threshold based on the sampling time interval, historical pressure changes, and preset dynamic adjustment parameters; determine the corresponding filtering parameters based on the proportional relationship between the current pressure change and the dynamic threshold, so that the filtering intensity during filtering is negatively correlated with the magnitude of the current pressure change; filter the raw pressure data based on the adjusted filtering parameters, and calculate and generate altitude data based on the filtered pressure data.

[0083] Optionally, the data processing device 500 further includes: a mutation detection module, used to calculate the trend characteristics of air pressure changes based on the statistical characteristics of multiple historical air pressure changes; identify and remove abnormal air pressure data according to the current air pressure change and trend characteristics; and update the filtered output when the air pressure data is determined to be reliable.

[0084] Optionally, the data processing device 500 further includes: an external signal quality adaptation module, used to obtain the current quality level of the external positioning signal, determine the vertical distance threshold corresponding to the current quality level, wherein the vertical distance threshold is negatively correlated with the quality of the external positioning signal; and to stop the calculation of altitude change when the current quality level of the external positioning signal is lower than the preset threshold.

[0085] Optionally, the data processing device 500 further includes an abnormal feature removal module, used to identify anomalies in the extracted feature points and remove abnormal feature points.

[0086] Optionally, the altitude data acquisition module 510 is also used to store the received altitude data into the altitude trajectory buffer in sequence to form an altitude data sequence to be processed. The number of data contained in the altitude trajectory buffer is fixed and updated based on the first-in-first-out principle.

[0087] Optionally, the altitude feature processing module 540 is further used to analyze the direction and amount of altitude change of adjacent feature points in the feature point set, determine the ascending and descending segments of the altitude trajectory; accumulate the altitude changes of each adjacent feature point in the ascending segment to obtain the ascending height, and accumulate the corresponding time span to obtain the ascending time; accumulate the altitude changes of each adjacent feature point in the descending segment to obtain the descending height, and accumulate the corresponding time span to obtain the descending time; the data processing device 500 further includes: a visualization display module, used to smooth the ascending height, ascending time, descending height, and descending time to obtain the altitude change data set to be output; and visualize and display the altitude change data set on the display interface of the user device.

[0088] This application provides a computer program product containing instructions that, when run on a computer or processor, cause the computer or processor to perform the steps of any of the methods described in the above embodiments.

[0089] This application also provides a computer storage medium that can store multiple instructions adapted for loading by a processor and executing the steps of any of the methods described in the above embodiments.

[0090] Please see Figure 6 , Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 6 As shown, the electronic device 600 may include: at least one electronic device processor 601, at least one network interface 604, user interface 603, memory 605, at least one communication bus 602, barometric pressure sensor 606, and positioning module 607.

[0091] The communication bus 602 is used to enable communication between these components.

[0092] The user interface 603 may include a display screen and a camera. Optionally, the user interface 603 may also include a standard wired interface and a wireless interface.

[0093] The network interface 604 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface).

[0094] Among them, the barometric pressure sensor 606 is used to collect raw barometric pressure data in real time to generate altitude data, and the positioning module 607 is used to provide the quality level of the external positioning signal to assist in dynamically adjusting the vertical distance threshold during the data processing process.

[0095] The electronic device processor 601 may include one or more processing cores. The electronic device processor 601 connects to various parts within the electronic device 600 using various interfaces and lines. It executes various functions and processes data by running or executing instructions, programs, code sets, or instruction sets stored in the memory 605, and by calling data stored in the memory 605. Optionally, the electronic device processor 601 may be implemented using at least one hardware form selected from Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The electronic device processor 601 may integrate one or more of the following: a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), and a modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the content required for display; and the modem handles wireless communication. It is understood that the modem may also be implemented as a separate chip without being integrated into the electronic device processor 601.

[0096] The memory 605 may include random access memory (RAM) or read-only memory (ROM). Optionally, the memory 605 may include a non-transitory computer-readable storage medium. The memory 605 may be used to store instructions, programs, code, code sets, or instruction sets. The memory 605 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as touch function, sound playback function, image playback function, etc.), instructions for implementing the above-described method embodiments, etc.; the data storage area may store data involved in the above-described method embodiments, etc. Optionally, the memory 605 may also be at least one storage device located remotely from the aforementioned electronic device processor 601. Figure 6 As shown, the memory 605, which serves as a computer storage medium, may include an operating system, a network communication module, a user interface module, and a data processing program.

[0097] exist Figure 6In the illustrated electronic device 600, the user interface 603 is mainly used to provide an input interface for the user and to acquire user input data; while the electronic device processor 601 can be used to call the data processing program stored in the memory 605 and specifically perform the following operations: The received multiple altitude data points are identified as an altitude data sequence to be processed; The vertical distance threshold corresponding to each altitude trajectory segment is dynamically calculated based on the degree of change of each altitude trajectory segment in the altitude data sequence. The vertical distance threshold is negatively correlated with the degree of change of the altitude trajectory segment. The vertical distance between a data point in the altitude data sequence and the reference benchmark corresponding to the altitude trajectory segment it belongs to is compared with the vertical distance threshold corresponding to the altitude trajectory segment where the data point belongs, and the data point is retained as a feature point based on the comparison result. For each feature point preserved in the altitude data sequence, the altitude change feature data of the altitude trajectory is determined and output based on the altitude change characteristics between each adjacent feature point.

[0098] In some embodiments, before determining the received multiple altitude data as an altitude data sequence to be processed, the electronic device processor 601 further performs the following steps: acquiring the real-time collected raw air pressure data and the sampling time interval; calculating the current air pressure change based on the raw air pressure data and the air pressure data output by the previous filtering; calculating a dynamic threshold based on the sampling time interval, historical air pressure changes, and preset dynamic adjustment parameters; determining the corresponding filtering parameters based on the proportional relationship between the current air pressure change and the dynamic threshold, so that the filtering intensity during filtering is negatively correlated with the magnitude of the current air pressure change; filtering the raw air pressure data based on the adjusted filtering parameters, and generating altitude data based on the filtered air pressure data.

[0099] In some embodiments, after the electronic device processor 601 performs filtering processing on the raw air pressure data based on the adjusted filtering parameters, it further performs the following steps: calculating the trend characteristics of air pressure changes based on the statistical characteristics of multiple historical air pressure changes; identifying and removing abnormal air pressure data based on the current air pressure change and trend characteristics; and updating the filtering output when the air pressure data is determined to be reliable.

[0100] In some embodiments, before determining the received multiple altitude data as an altitude data sequence to be processed, the electronic device processor 601 further performs the following steps: obtaining the current quality level of the external positioning signal, determining the vertical distance threshold corresponding to the current quality level, wherein the vertical distance threshold is negatively correlated with the quality of the external positioning signal; and suspending the calculation of altitude change when the current quality level of the external positioning signal is lower than a preset threshold.

[0101] In some embodiments, after the electronic device processor 601 determines whether to retain the data point as a feature point based on the comparison result, it further performs the following steps: anomaly identification of the extracted feature points and removal of abnormal feature points.

[0102] In some embodiments, when the electronic device processor 601 determines multiple received altitude data as an altitude data sequence to be processed, it specifically performs the following steps: storing each received altitude data in an altitude trajectory buffer in sequence to form an altitude data sequence to be processed. The number of data contained in the altitude trajectory buffer is fixed and updated based on the first-in-first-out principle.

[0103] In some embodiments, the electronic device processor 601, when executing the process of determining and outputting altitude change feature data of an altitude trajectory based on the altitude change characteristics between adjacent feature points, specifically performs the following steps: analyzing the direction and amount of altitude change of adjacent feature points in the feature point set to determine the ascending and descending segments of the altitude trajectory; accumulating the altitude changes of adjacent feature points in the ascending segment to obtain the ascending height, and accumulating the corresponding time span to obtain the ascending time; accumulating the altitude changes of adjacent feature points in the descending segment to obtain the descending height, and accumulating the corresponding time span to obtain the descending time; the electronic device processor 601 also specifically performs the following steps: smoothing the ascending height, ascending time, descending height, and descending time to obtain a set of altitude change data to be output; and visually rendering and displaying the altitude change data set on the user device's display interface.

[0104] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or modules may be electrical, mechanical, or other forms.

[0105] The modules described as separate components may or may not be physically separate. Similarly, the components shown as modules may or may not be physical modules; they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of this embodiment, depending on actual needs.

[0106] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions. When these computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this specification are generated. 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 or transmitted through a computer-readable storage medium. The computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media. The aforementioned available media can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., Digital Versatile Discs (DVDs)), or semiconductor media (e.g., Solid State Disks (SSDs)).

[0107] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.

[0108] Furthermore, it should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.), and signals involved in the embodiments of this application are all authorized by the user or fully authorized by all parties, and the collection, use, and processing of related data must comply with the relevant laws, regulations, and standards of the relevant countries and regions. For example, the air pressure data and altitude data involved in this application were obtained with full authorization.

[0109] The foregoing has described specific embodiments of this application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired results. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0110] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0111] The above is a description of a data processing method, apparatus, storage medium, and electronic device provided in this application. For those skilled in the art, based on the ideas of the embodiments of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A data processing method, characterized in that, The method includes: The received multiple altitude data points are identified as an altitude data sequence to be processed; Based on the degree of change of each altitude trajectory segment in the altitude data sequence, the vertical distance threshold corresponding to each altitude trajectory segment is dynamically calculated, and the vertical distance threshold is negatively correlated with the degree of change of the altitude trajectory segment. The vertical distance between a data point in the altitude data sequence and the reference benchmark corresponding to the altitude trajectory segment it belongs to is compared with the vertical distance threshold corresponding to the altitude trajectory segment where the data point belongs, and a determination is made based on the comparison result as to whether to retain the data point as a feature point. For each feature point retained in the altitude data sequence, the altitude change feature data of the altitude trajectory is determined and output based on the altitude change characteristics between adjacent feature points.

2. The method according to claim 1, characterized in that, Before determining the multiple received altitude data as an altitude data sequence to be processed, the method further includes: Acquire the raw air pressure data collected in real time and the sampling time interval; Calculate the current pressure change based on the original air pressure data and the air pressure data output from the previous filter. The dynamic threshold is calculated based on the sampling time interval, historical air pressure changes, and preset dynamic adjustment parameters. The corresponding filtering parameters are determined based on the proportional relationship between the current air pressure change and the dynamic threshold, so that the filtering intensity during filtering is negatively correlated with the magnitude of the current air pressure change. The original air pressure data is filtered based on the adjusted filtering parameters, and the altitude data is calculated based on the filtered air pressure data.

3. The method according to claim 2, characterized in that, After filtering the raw air pressure data based on the adjusted filtering parameters, the process further includes: The trend characteristics of air pressure changes are calculated based on the statistical characteristics of multiple historical air pressure changes. Abnormal air pressure data is identified and removed based on the current air pressure change and the trend characteristics. When the air pressure data is determined to be reliable, the filter output is updated.

4. The method according to claim 1, characterized in that, Before determining the multiple received altitude data as an altitude data sequence to be processed, the method further includes: The current quality level of the external positioning signal is obtained, and the vertical distance threshold corresponding to the current quality level is determined. The vertical distance threshold is negatively correlated with the quality of the external positioning signal. When the current quality level of the external positioning signal is lower than a preset threshold, the calculation of altitude change is stopped.

5. The method according to claim 1 or 4, characterized in that, After determining whether to retain the data point as a feature point based on the comparison result, the process further includes: The extracted feature points are anomaly identified and the abnormal feature points are removed.

6. The method according to claim 1, characterized in that, The step of determining the received multiple altitude data as an altitude data sequence to be processed includes: The received altitude data are sequentially stored in the altitude trajectory buffer to form an altitude data sequence to be processed. The number of data contained in the altitude trajectory buffer is fixed and updated based on the first-in-first-out principle.

7. The method according to claim 1, characterized in that, The step of determining and outputting altitude change feature data of the altitude trajectory based on the altitude change characteristics between adjacent feature points includes: Analyze the direction and amount of elevation change of adjacent feature points in the feature point set to determine the ascending and descending segments of the elevation trajectory; The elevation change of each adjacent feature point in the ascending segment is accumulated to obtain the ascent height, and the corresponding time span is accumulated to obtain the ascent time. The elevation changes of adjacent feature points in the descent segment are summed to obtain the descent height, and the corresponding time spans are summed to obtain the descent time. The method further includes: The ascent height, ascent time, descent height, and descent time are smoothed to obtain a set of altitude change data to be output. The data set of altitude changes is visualized, rendered, and displayed on the user's device interface.

8. A data processing apparatus, characterized in that, The device includes: The altitude data acquisition module is used to determine the multiple received altitude data into an altitude data sequence to be processed. The threshold dynamic adjustment module is used to dynamically calculate the vertical distance threshold corresponding to each altitude trajectory segment based on the degree of change of each altitude trajectory segment in the altitude data sequence. The vertical distance threshold is negatively correlated with the degree of change of the altitude trajectory segment. The feature point extraction module is used to compare the vertical distance between a data point in the altitude data sequence and the reference benchmark corresponding to the altitude trajectory segment where the data point is located with the vertical distance threshold corresponding to the altitude trajectory segment where the data point is located, and to determine whether to retain the data point as a feature point based on the comparison result. The altitude feature processing module is used to determine and output the altitude change feature data of the altitude trajectory based on the altitude change features between adjacent feature points for each feature point retained in the altitude data sequence.

9. A computer storage medium, characterized in that, The computer storage medium stores a plurality of instructions adapted for loading by a processor and executing the steps of the method as described in any one of claims 1 to 7.

10. An electronic device, characterized in that, It includes a barometric pressure sensor, a positioning module, a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the method as described in any one of claims 1 to 7.