CN-122019977-A - Efficient riding motion trail cleaning and optimizing algorithm
Abstract
The invention provides a high-efficiency riding motion trail cleaning and optimizing algorithm, which belongs to the technical field of motion trail data processing, and comprises the following steps of S1, collecting original positioning data in the riding process through a positioning module according to the frequency of 1 second/time, S2, identifying abnormal data, judging whether the original positioning data is abnormal or not based on a preset abnormal threshold, wherein the abnormality comprises drift abnormality and overspeed abnormality, S3, correcting abnormal data, S4, optimizing and screening track points, screening effective track points according to the time interval of 3 seconds, meanwhile, forcedly keeping characteristic points in the riding process, S5, carrying out track smoothing, and S6, recovering the track data. The method solves the problems that the existing riding track processing algorithm is incomplete in abnormal identification, low in track precision, poor in positioning continuity and incapable of effectively recovering the track interruption, and realizes efficient cleaning, optimization and complete recording of riding track data.
Inventors
- LIU MIN
- LIU WEI
- LIU SHIWEI
Assignees
- 上海启明软件股份有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20260202
Claims (9)
- 1. An efficient riding motion trajectory cleaning and optimizing algorithm comprises the following steps: s1, acquiring original positioning data in the riding process according to the frequency of 1 second/time through a positioning module, wherein the original positioning data comprise longitude and latitude, speed, altitude and time stamp, and acquiring pedal frequency and power data through a sensor; S2, identifying abnormal data, namely judging whether the original positioning data is abnormal or not based on a preset abnormal threshold value, wherein the abnormality comprises drift abnormality and overspeed abnormality, the judgment condition of the drift abnormality is that the distance difference between two adjacent positioning points is larger than 1000m, and the judgment condition of the overspeed abnormality is that the speed of the positioning point is larger than 19.444445m/S; S3, correcting the abnormal data, namely replacing the current abnormal point coordinates with the coordinates of the previous effective locating point for the identified drifting abnormal data, and correcting the current point speed to be 0.9 times of the historical maximum speed for the identified overspeed abnormal data; S4, track point optimization screening, namely screening effective track points according to a time interval of 3 seconds, and meanwhile, forcedly reserving characteristic points in the riding process, wherein the characteristic points comprise a maximum speed point, a maximum pedal frequency point, a maximum power point, a highest elevation point and a lowest elevation point; s5, track smoothing, namely smoothing the screened effective track points by adopting a moving average algorithm to obtain an optimized riding motion track; and S6, when the riding application is restarted after being abnormally exited, reading a unique identifier RecordID of the riding record from a local database, acquiring corresponding track point data, sensor data and riding state data through the RecordID, and performing splicing recovery on the interrupted track.
- 2. The efficient cleaning and optimizing algorithm for the riding motion trail according to claim 1, wherein the positioning modules in the step S1 comprise a Goodyear positioning module and a system positioning module, 13 seconds switching countdown is set between the two positioning modules, and when one positioning module does not acquire effective positioning data within 13 seconds, the other positioning module is automatically switched to perform positioning.
- 3. The efficient riding motion trajectory cleaning and optimizing algorithm according to claim 1, wherein the step S2 of identifying abnormal data further comprises identifying abnormal altitude data, wherein the condition for judging the abnormal altitude data is that the altitude difference between two adjacent positioning points is larger than 5m, and when the altitude data is detected to exceed the threshold value for 3 times continuously, the altitude data is judged to be valid and no correction is performed.
- 4. The efficient riding motion track cleaning and optimizing algorithm according to claim 1, wherein the specific process of track point optimization screening in the step S4 is that track point sequences are extracted from original positioning data and are ordered according to time stamps, a track point screening counter is initialized, one track point is reserved every 3 seconds from a first track point, the track point sequences are traversed, feature points are identified and are forcedly reserved, and if the feature points are repeated with the track points screened according to time intervals, only one track point is reserved.
- 5. The efficient cleaning and optimizing algorithm for the riding motion trail according to claim 1, wherein the window size of the sliding average algorithm in the step S5 is 3 trail points, and the longitude and latitude average value of the trail points in the window is calculated as the optimized coordinates of the central trail point of the window.
- 6. The efficient riding motion trajectory cleaning and optimizing algorithm according to claim 1, wherein when the trajectory data is recovered in the step S5, if the interval between the current time and the riding interruption time exceeds 8 hours, a continuous riding confirmation popup window is popped up, and when the user selects to continue riding, the continuous timestamp ContinueTime is updated as the current time, and newly collected trajectory data is spliced with historical trajectory data.
- 7. The efficient riding motion trail washing and optimizing algorithm of claim 1, further comprising a trail data format conversion step of converting proprietary format coordinates output by the Goldpositioning module into standard GPS format coordinates and uniformly storing the standard GPS format coordinates in a local database.
- 8. The efficient riding motion trajectory cleaning and optimizing algorithm according to claim 1, wherein the sensor in the step S1 comprises an A001 pedal frequency power meter, the A001 pedal frequency power meter is calibrated before data acquisition, calibration parameters comprise equipment weight and a centering AD value, and a normal interval of the centering AD value is 4096+/-100.
- 9. The efficient riding motion trail cleaning and optimizing algorithm of claim 1, further comprising a trail data reporting step of binding the optimized riding trail data, motion data and equipment information, wherein the equipment information comprises an equipment SN number and a firmware version number, and the equipment information is uploaded to a server through a network.
Description
Efficient riding motion trail cleaning and optimizing algorithm Technical Field The invention provides a high-efficiency riding motion trail cleaning and optimizing algorithm, and belongs to the technical field of motion trail data processing. Background Along with popularization of outdoor exercises, riding exercises become one of popular body-building modes, various riding exercises are also developed, and accurate recording and analysis of riding exercise tracks are core functions of riding applications. In the riding process, the positioning module is easily influenced by factors such as environmental shielding, signal interference and the like, so that the acquired original positioning data have abnormal conditions such as drifting, overspeed and the like, meanwhile, the data such as treading frequency, power and the like acquired by the sensor also have errors due to equipment shake and signal transmission problems, in addition, the riding application can be stopped due to unexpected withdrawal caused by equipment failure and system abnormality, and if the track recovery cannot be realized, the riding track data are incomplete. Meanwhile, the traditional algorithm does not consider the switching adaptation of a plurality of positioning modules, has poor positioning continuity and insufficient precision of track smoothing processing, and also lacks a perfect track interruption recovery mechanism, so that the processed riding track has larger deviation from an actual riding track and low data integrity, and cannot provide accurate riding track analysis and motion data statistics for users, thereby being difficult to meet the high-precision and integrity requirements of the users on the riding track record. Aiming at the problems, the invention provides an efficient riding motion track cleaning and optimizing algorithm, which realizes the accurate identification and correction of multidimensional abnormal data, combines track point simplification and key feature point reservation, improves track smoothness, and simultaneously realizes the intelligent switching of a plurality of positioning modules and the splicing recovery after track interruption, thereby effectively improving the accuracy, the integrity and the continuity of riding track data. Disclosure of Invention The invention aims to overcome the defects of the prior art, provide a high-efficiency riding motion track cleaning and optimizing algorithm, solve the problems that the existing riding track processing algorithm is incomplete in abnormal identification, low in track precision, poor in positioning continuity and incapable of effectively recovering track interruption, and realize high-efficiency cleaning, optimizing and complete recording of riding track data. In order to solve the problems, the technical scheme provided by the invention is that a high-efficiency riding motion track cleaning and optimizing algorithm comprises the following steps: s1, acquiring original positioning data in the riding process according to the frequency of 1 second/time through a positioning module, wherein the original positioning data comprise longitude and latitude, speed, altitude and time stamp, and acquiring pedal frequency and power data through a sensor; S2, identifying abnormal data, namely judging whether the original positioning data is abnormal or not based on a preset abnormal threshold value, wherein the abnormality comprises drift abnormality and overspeed abnormality, the judgment condition of the drift abnormality is that the distance difference between two adjacent positioning points is larger than 1000m, and the judgment condition of the overspeed abnormality is that the speed of the positioning point is larger than 19.444445m/S; S3, correcting the abnormal data, namely replacing the current abnormal point coordinates with the coordinates of the previous effective locating point for the identified drifting abnormal data, and correcting the current point speed to be 0.9 times of the historical maximum speed for the identified overspeed abnormal data; S4, track point optimization screening, namely screening effective track points according to a time interval of 3 seconds, and meanwhile, forcedly reserving characteristic points in the riding process, wherein the characteristic points comprise a maximum speed point, a maximum pedal frequency point, a maximum power point, a highest elevation point and a lowest elevation point; s5, track smoothing, namely smoothing the screened effective track points by adopting a moving average algorithm to obtain an optimized riding motion track; and S6, when the riding application is restarted after being abnormally exited, reading a unique identifier RecordID of the riding record from a local database, acquiring corresponding track point data, sensor data and riding state data through the RecordID, and performing splicing recovery on the interrupted track. Further, the positioning module in step S1 includes a