CN105225680B - Audio frequency playing method and device with horizontal displacement is changed based on height above sea level - Google Patents
Audio frequency playing method and device with horizontal displacement is changed based on height above sea level Download PDFInfo
- Publication number
- CN105225680B CN105225680B CN201510615873.8A CN201510615873A CN105225680B CN 105225680 B CN105225680 B CN 105225680B CN 201510615873 A CN201510615873 A CN 201510615873A CN 105225680 B CN105225680 B CN 105225680B
- Authority
- CN
- China
- Prior art keywords
- state
- climber
- audio
- height above
- above sea
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000006073 displacement reaction Methods 0.000 title claims abstract description 42
- 238000000034 method Methods 0.000 title claims abstract description 17
- 241001503987 Clematis vitalba Species 0.000 claims abstract description 106
- 230000033001 locomotion Effects 0.000 claims abstract description 69
- 238000001514 detection method Methods 0.000 claims abstract description 58
- XLYOFNOQVPJJNP-UHFFFAOYSA-N water Substances O XLYOFNOQVPJJNP-UHFFFAOYSA-N 0.000 claims 1
- 230000009194 climbing Effects 0.000 description 10
- 238000005516 engineering process Methods 0.000 description 5
- 238000010586 diagram Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000036651 mood Effects 0.000 description 1
- 230000001737 promoting effect Effects 0.000 description 1
- 238000011897 real-time detection Methods 0.000 description 1
- 230000033764 rhythmic process Effects 0.000 description 1
- 239000011435 rock Substances 0.000 description 1
- 238000011895 specific detection Methods 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
Landscapes
- Navigation (AREA)
Abstract
本发明提出了一种基于海拔高度变化和水平位移的音频播放方法及装置,包括将音频分为不同类型,设置每种运动状态对应的音频类型,运动状态类型分为地势状态和速度状态;进行运动状态检测及相应地音频播放。本发明可通过检测登山者的海拔高度变化和水平位移选择播放合适的音频,可进一步提高音频播放装置的智能性,满足众多运动爱好者的需求,给登山者带来更好的听觉体验。
The present invention proposes an audio playback method and device based on altitude change and horizontal displacement, including dividing audio into different types, setting audio types corresponding to each motion state, and the motion state types are divided into terrain state and speed state; Motion detection and corresponding audio playback. The present invention can select and play appropriate audio by detecting the altitude change and horizontal displacement of climbers, further improves the intelligence of the audio playback device, meets the needs of many sports enthusiasts, and brings better auditory experience to climbers.
Description
技术领域technical field
本发明涉及一种基于海拔高度变化和水平位移的音频播放方法及装置,属于音频技术在运动领域的应用。The invention relates to an audio playback method and device based on altitude change and horizontal displacement, and belongs to the application of audio technology in the field of sports.
背景技术Background technique
人们在运动时常常喜欢一边听音乐一边运动,例如跑步、爬山时,通过听音乐或者其他一些类型的音频如鸟鸣等,可以增加运动的乐趣,消除运动的疲乏,调整运动者(主要是登山者)的心情,进而促进运动的效率,提高运动的效果。但当前人们运动时听的音乐和音频大都是实现选择一组音乐之后随机播放或者顺序播放,但人们在处于不同运动状态时常常倾向于听不同类型的音乐或音频。以爬山为例,在登山时,如果登山之路较陡峭,或者登山速度较快时,登山者体力消耗较大,如果此时听较雄壮有力的音频,则有利于登山者继续坚持,登上山顶;如果登山之路较平缓,或者登山速度较慢时,登山者体力消耗较小,登山者较轻松,常常喜欢听较轻松的音频。由于目前的技术无法实现自动切换,只能手动切换播放的音乐或音频,这对登山者来说带来了使用上的不便,并且登山者需要在运动中转移注意力并腾出手来切换音乐,使得运动存在安全隐患。目前市场尚未注意到这种需求,没有相关技术方案出现。People often like to listen to music while exercising, such as running, climbing, by listening to music or other types of audio such as birdsong, etc., can increase the fun of exercise, eliminate exercise fatigue, and adjust the exercisers (mainly mountaineering) person) mood, thereby promoting the efficiency of exercise and improving the effect of exercise. However, most of the music and audio that people listen to when exercising are randomly played or sequentially played after selecting a group of music, but people often tend to listen to different types of music or audio when they are in different exercise states. Take mountain climbing as an example. When climbing a mountain, if the climbing path is steep or the climbing speed is fast, the climber will consume more energy. If he listens to a more majestic and powerful audio at this time, it will help the climber to continue to persevere and climb the mountain. The top of the mountain; if the climbing route is gentle or the climbing speed is slow, the climbers will consume less energy and feel more relaxed, and they often like to listen to more relaxed audio. Since the current technology cannot achieve automatic switching, the music or audio can only be switched manually, which brings inconvenience to the climbers, and the climbers need to divert their attention and free their hands to switch music during exercise. Make sports have safety hazards. At present, the market has not yet noticed this demand, and no relevant technical solutions appear.
发明内容Contents of the invention
本发明提出一种基于海拔高度变化和水平位移的音频播放方法与装置,目的在于能够根据登山者的海拔高度变化和水平位移自动选择合适的音频进行播放。The present invention proposes an audio playback method and device based on altitude change and horizontal displacement, with the purpose of automatically selecting appropriate audio for playback according to the altitude change and horizontal displacement of climbers.
本发明技术方案提出一种基于海拔高度变化和水平位移的音频播放方法,包括以下步骤:The technical solution of the present invention proposes an audio playback method based on altitude change and horizontal displacement, comprising the following steps:
步骤1,音频分类,包括将音频分为不同类型,类型数记为M;Step 1, audio classification, including dividing audio into different types, the number of types is recorded as M;
步骤2,运动状态设置,包括设置每种运动状态对应的音频类型;所述登山者的运动状态类型分为地势状态和速度状态,地势状态包括“陡峭状态”、“平缓状态”和“平路状态”,速度状态包括“快速状态”、“中速状态”、“慢速状态”;Step 2, motion state setting, including setting the audio type corresponding to each motion state; the motion state type of the climber is divided into terrain state and speed state, and terrain state includes "steep state", "gentle state" and "flat road State", the speed state includes "fast state", "medium speed state" and "slow speed state";
步骤3,运动状态检测及相应地音频播放,包括以下子步骤,Step 3, motion state detection and corresponding audio playback, including the following sub-steps,
步骤3.1,记检测次数为n,相应检测的时间记为T(n),初始化n=1,进行海拔高度和水平位移初始检测,检测当前登山者所处位置的海拔高度H(1)和水平位置S(1);Step 3.1, record the number of times of detection as n, record the time of corresponding detection as T(n), initialize n=1, perform initial detection of altitude and horizontal displacement, and detect the altitude H(1) and level of the current climber's position position S(1);
步骤3.2,音频初始播放;Step 3.2, initial audio playback;
步骤3.3,进行运动状态检测,包括在间隔一段时间t后,令n=n+1,检测当前登山者所处位置的海拔高度H(n)和水平位置S(n),检测的时间记为T(n);Step 3.3 is to detect the motion state, including after a period of time t, make n=n+1, detect the altitude H(n) and the horizontal position S(n) of the current climber's position, and the time of detection is recorded as T(n);
步骤3.4,运动状态计算判断,包括以下子步骤,Step 3.4, motion state calculation and judgment, includes the following sub-steps,
步骤3.4.1,判断是否海拔高度变化DelH(n)不等于0且水平位移DelS(n)等于0,是则判断地势状态为“陡峭状态”,进入步骤3.5,否则进入步骤3.4.2;Step 3.4.1, judge whether the altitude change DelH(n) is not equal to 0 and the horizontal displacement DelS(n) is equal to 0, if it is judged that the terrain state is "steep state", go to step 3.5, otherwise go to step 3.4.2;
其中,DelH(n)=|H(n)-H(n-1)|,DelS(n)=|S(n)–S(n-1)|;Among them, DelH(n)=|H(n)-H(n-1)|, DelS(n)=|S(n)–S(n-1)|;
步骤3.4.2,判断是否水平位移DelS(n)等于0,是则判断登山者处于“平路状态”,进入步骤3.4.5,否则进入步骤3.4.3;Step 3.4.2, judging whether the horizontal displacement DelS(n) is equal to 0, if so, it is judged that the climber is in a "flat road state", and then go to step 3.4.5, otherwise go to step 3.4.3;
步骤3.4.3,计算登山者登山之路的陡峭程度D(n),D(n)=DelH(n)/DelS(n);Step 3.4.3, calculate the steepness D(n) of the climber's mountaineering road, D(n)=DelH(n)/DelS(n);
步骤3.4.4,进行地势状态判别,Step 3.4.4, carry out terrain state discrimination,
如果D(n)小于D1,则登山者处于“平路状态”;If D(n) is less than D1, the climber is in a "flat road state";
如果D(n)不小于D1且小于D2,则登山者处于“平缓状态”;If D(n) is not less than D1 and less than D2, the climber is in a "flat state";
如果D(n)不小于D2,则登山者处于“陡峭状态”;If D(n) is not less than D2, the climber is in a "steep state";
其中,D1是“平路状态”与“平缓状态”的预设划分标准,其中D2是“平缓状态”与“陡峭状态”的预设划分标准;Among them, D1 is the preset division standard of "flat road state" and "smooth state", and D2 is the preset division standard of "smooth road state" and "steep state";
步骤3.4.5,计算登山者的空间方位变化DelK(n)如下,Step 3.4.5, calculate the climber’s spatial orientation change DelK(n) as follows,
步骤3.4.6,计算登山者的空间方位变化速度VH(n)=DelK(n)/(T(n)-T(n-1));Step 3.4.6, calculate the spatial orientation change speed VH(n)=DelK(n)/(T(n)-T(n-1)) of the climber;
步骤3.4.7,进行速度状态判别如下,In step 3.4.7, the speed state is judged as follows,
如果VH(n)小于V1,则登山者处于“慢速状态”,If VH(n) is less than V1, the climber is in a "slow state",
如果VH(n)不小于V1且小于V2,则登山者处于“中速状态”,If VH(n) is not less than V1 and less than V2, the climber is in a "medium speed state",
如果VH(n)不小于V2,则登山者处于“快速状态”;If VH(n) is not less than V2, the climber is in a "fast state";
其中,V1是“慢速状态”与“中速状态”的划分标准,其中V2是“中速状态”与“快速状态”的划分标准,V1和V2为相应的预设阈值;Among them, V1 is the division standard of "slow state" and "medium speed state", wherein V2 is the division standard of "medium speed state" and "fast state", and V1 and V2 are corresponding preset thresholds;
步骤3.5,判断检测的时间T(n)相应状态与上一次检测的时间T(n-1)相应状态是否不同,如果不同则根据新的状态播放对应的音频类型,如果音频类型相同则不切换;然后返回步骤3.3,直到停止流程。Step 3.5, judge whether the corresponding state of the detected time T(n) is different from the corresponding state of the last detected time T(n-1), if different, play the corresponding audio type according to the new state, if the audio type is the same, do not switch ; Then return to step 3.3 until the process is stopped.
而且,所述音频是从其他电子设备输入获取,或从网络下载获取,或通过录音获取,或通过音频生成工具制作获取。Moreover, the audio is obtained by inputting from other electronic devices, or downloading from the network, or obtaining through recording, or producing and obtaining through an audio generation tool.
而且,设P1表示“陡峭状态”、P2表示“平缓状态”、P3表示“平路状态”,S1表示“快速状态”、S2表示“中速状态”、S3表示“慢速状态”,综合后构成了登山者的状态集合{P1S1,P1S2,P1S3,P2S1,P2S2,P2S3,P3S1,P3S2,P3S3},集合中综合状态和音频类型的对应关系为一对一,或一对多,或多对一。Moreover, let P1 represent "steep state", P2 represent "smooth state", P3 represent "flat road state", S1 represent "fast state", S2 represent "medium speed state", and S3 represent "slow state". The state set of climbers {P1S1, P1S2, P1S3, P2S1, P2S2, P2S3, P3S1, P3S2, P3S3} is formed. The correspondence between the comprehensive state and the audio type in the set is one-to-one, or one-to-many, or many-to-many one.
本发明还提供一种基于海拔高度变化和水平位移的音频播放装置,包括以下模块:The present invention also provides an audio playback device based on altitude change and horizontal displacement, including the following modules:
音频分类模块,用于将音频分为不同类型,类型数记为M;The audio classification module is used to divide the audio into different types, and the number of types is denoted as M;
运动状态设置模块,用于设置每种运动状态对应的音频类型;所述登山者的运动状态类型分为地势状态和速度状态,地势状态包括“陡峭状态”、“平缓状态”和“平路状态”,速度状态包括“快速状态”、“中速状态”、“慢速状态”;The motion state setting module is used to set the audio type corresponding to each motion state; the motion state type of the climber is divided into terrain state and speed state, and the terrain state includes "steep state", "smooth state" and "flat road state" ", the speed state includes "fast state", "medium speed state" and "slow speed state";
海拔高度检测模块,用于检测登山者当前所处位置的海拔高度;The altitude detection module is used to detect the altitude of the climber's current location;
水平位置检测模块,用于检测登山者当前所处位置的水平位置;The horizontal position detection module is used to detect the horizontal position of the climber's current position;
计时模块,用于记录检测的相应时间;Timing module, used to record the corresponding time of detection;
运动状态计算模块,用于根据由海拔高度检测模块得到的海拔高度、水平位置检测模块得到的水平位置和计时模块得到的时间,计算得到登山者当前的运动状态;The exercise state calculation module is used to calculate the current exercise state of the climber according to the altitude obtained by the altitude detection module, the horizontal position obtained by the horizontal position detection module and the time obtained by the timing module;
音频播放模块,用于根据由运动状态计算模块得到的运动状态,和运动状态设置模块的运动状态与音频类型对应关系,得到当前运动状态对应的音频类型,并播放该音频类型的音频;The audio playback module is used to obtain the audio type corresponding to the current motion state according to the motion state obtained by the motion state calculation module, and the motion state and the audio type correspondence of the motion state setting module, and play the audio of the audio type;
而且,音频播放工作过程如下,And, the audio playback works as follows,
运动状态计算判断模块记检测次数为n,将计时模块所得相应检测的时间记为T(n),初始化n=1,命令海拔高度检测模块和水平位置检测模块分别进行海拔高度和水平位移初始检测,检测当前登山者所处位置的海拔高度H(1)和水平位置S(1);The motion state calculation and judgment module records the number of times of detection as n, records the corresponding detection time obtained by the timing module as T(n), initializes n=1, and commands the altitude detection module and the horizontal position detection module to perform initial detection of altitude and horizontal displacement respectively , detect the altitude H(1) and the horizontal position S(1) of the current climber's location;
音频播放模块进行音频初始播放;The audio playback module performs audio initial playback;
运动状态计算判断模块进行实时运动状态检测,包括在间隔一段时间t后,令n=n+1,命令海拔高度检测模块和水平位置检测模块分别检测当前登山者所处位置的海拔高度H(n)和水平位置S(n),将计时模块所得相应检测的时间记为T(n);然后进行运动状态计算判断;The motion state calculation and judgment module performs real-time motion state detection, including after an interval of time t, making n=n+1, ordering the altitude detection module and the horizontal position detection module to detect the altitude H(n ) and horizontal position S(n), the corresponding detected time obtained by the timing module is recorded as T(n); then the motion state is calculated and judged;
音频播放模块判断检测的时间T(n)相应状态与上一次检测的时间T(n-1)相应状态是否不同,如果不同则根据新的状态播放对应的音频类型,如果音频类型相同则不切换;然后命令运动状态计算判断模块工作,直到停止。The audio playback module judges whether the corresponding state of the detected time T(n) is different from the corresponding state of the last detected time T(n-1), if different, plays the corresponding audio type according to the new state, and does not switch if the audio type is the same ; Then command the motion state calculation and judgment module to work until it stops.
而且,所述运动状态计算判断模块进行实时运动状态检测,实现方式如下,Moreover, the motion state calculation and judgment module performs real-time motion state detection, and the implementation is as follows,
步骤3.4.1,判断是否海拔高度变化DelH(n)不等于0且水平位移DelS(n)等于0,是则判断地势状态为“陡峭状态”,进入步骤3.5,否则进入步骤3.4.2;Step 3.4.1, judge whether the altitude change DelH(n) is not equal to 0 and the horizontal displacement DelS(n) is equal to 0, if it is judged that the terrain state is "steep state", go to step 3.5, otherwise go to step 3.4.2;
其中,DelH(n)=|H(n)-H(n-1)|,DelS(n)=|S(n)–S(n-1)|;Among them, DelH(n)=|H(n)-H(n-1)|, DelS(n)=|S(n)–S(n-1)|;
步骤3.4.2,判断是否水平位移DelS(n)等于0,是则判断登山者处于“平路状态”,进入步骤3.4.5,否则进入步骤3.4.3;Step 3.4.2, judging whether the horizontal displacement DelS(n) is equal to 0, if so, it is judged that the climber is in a "flat road state", and then go to step 3.4.5, otherwise go to step 3.4.3;
步骤3.4.3,计算登山者登山之路的陡峭程度D(n),D(n)=DelH(n)/DelS(n);Step 3.4.3, calculate the steepness D(n) of the climber's mountaineering road, D(n)=DelH(n)/DelS(n);
步骤3.4.4,进行地势状态判别,Step 3.4.4, carry out terrain state discrimination,
如果D(n)小于D1,则登山者处于“平路状态”;If D(n) is less than D1, the climber is in a "flat road state";
如果D(n)不小于D1且小于D2,则登山者处于“平缓状态”;If D(n) is not less than D1 and less than D2, the climber is in a "flat state";
如果D(n)不小于D2,则登山者处于“陡峭状态”;If D(n) is not less than D2, the climber is in a "steep state";
其中,D1是“平路状态”与“平缓状态”的预设划分标准,其中D2是“平缓状态”与“陡峭状态”的预设划分标准;Among them, D1 is the preset division standard of "flat road state" and "smooth state", and D2 is the preset division standard of "smooth road state" and "steep state";
步骤3.4.5,计算登山者的空间方位变化DelK(n)如下,Step 3.4.5, calculate the climber’s spatial orientation change DelK(n) as follows,
步骤3.4.6,计算登山者的空间方位变化速度VH(n)=DelK(n)/(T(n)-T(n-1));Step 3.4.6, calculate the spatial orientation change speed VH(n)=DelK(n)/(T(n)-T(n-1)) of the climber;
步骤3.4.7,进行速度状态判别如下,In step 3.4.7, the speed state is judged as follows,
如果VH(n)小于V1,则登山者处于“慢速状态”,If VH(n) is less than V1, the climber is in a "slow state",
如果VH(n)不小于V1且小于V2,则登山者处于“中速状态”,If VH(n) is not less than V1 and less than V2, the climber is in a "medium speed state",
如果VH(n)不小于V2,则登山者处于“快速状态”;If VH(n) is not less than V2, the climber is in a "fast state";
其中,V1是“慢速状态”与“中速状态”的划分标准,其中V2是“中速状态”与“快速状态”的划分标准,V1和V2为相应的预设阈值。Among them, V1 is the division standard of "slow state" and "medium speed state", wherein V2 is the division standard of "medium speed state" and "fast state", and V1 and V2 are corresponding preset thresholds.
而且,所述音频是从其他电子设备输入获取,或从网络下载获取,或通过录音获取,或通过音频生成工具制作获取。Moreover, the audio is obtained by inputting from other electronic devices, or downloading from the network, or obtaining through recording, or producing and obtaining through an audio generation tool.
而且,设P1表示“陡峭状态”、P2表示“平缓状态”、P3表示“平路状态”,S1表示“快速状态”、S2表示“中速状态”、S3表示“慢速状态”,综合后构成了登山者的状态集合{P1S1,P1S2,P1S3,P2S1,P2S2,P2S3,P3S1,P3S2,P3S3},集合中综合状态和音频类型的对应关系为一对一,或一对多,或多对一。Moreover, let P1 represent "steep state", P2 represent "smooth state", P3 represent "flat road state", S1 represent "fast state", S2 represent "medium speed state", and S3 represent "slow state". The state set of climbers {P1S1, P1S2, P1S3, P2S1, P2S2, P2S3, P3S1, P3S2, P3S3} is formed. The correspondence between the comprehensive state and the audio type in the set is one-to-one, or one-to-many, or many-to-many one.
本发明提出了基于海拔高度变化和水平位移的音频播放方法与装置,登山者的登山速度以及当前登山之路的陡峭程度可以由海拔高度变化和水平位移得到,通过检测登山者的海拔高度变化和水平位移选择播放合适的音频,无需用户手动切换,给登山者带来更好的使用体验,同时可提高登山者运动的安全性。便携式的音频播放装置的购买者很多是运动爱好者,本发明提出的自动选择切换播放技术可进一步提高音频播放装置的智能性,满足众多运动爱好者的需求,因此,本发明将具有重大的市场价值。The present invention proposes an audio playback method and device based on altitude change and horizontal displacement. The climber's climbing speed and the steepness of the current mountaineering road can be obtained from the altitude change and horizontal displacement. By detecting the climber's altitude change and The horizontal displacement selects and plays the appropriate audio, without the need for the user to manually switch, which brings a better experience to the climbers and improves the safety of the climbers' movement. Many buyers of portable audio playback devices are sports enthusiasts. The automatic selection and switching playback technology proposed by the present invention can further improve the intelligence of audio playback devices and meet the needs of many sports enthusiasts. Therefore, the present invention will have a significant market. value.
附图说明Description of drawings
图1是本发明实施例的装置结构框图。Fig. 1 is a block diagram of the device structure of the embodiment of the present invention.
图2是本发明实施例方法的实时检测流程图。Fig. 2 is a flow chart of real-time detection of the method of the embodiment of the present invention.
具体实施方式detailed description
参见图1,本发明实施例提供一种基于海拔高度变化和水平位移的音频播放装置,包括以下模块:Referring to Fig. 1, an embodiment of the present invention provides an audio playback device based on altitude change and horizontal displacement, including the following modules:
音频分类模块,用于将音频分为不同类型,类型数M,M不小于2,将音频类型输出到运动状态设置模块。The audio classification module is used to divide the audio into different types, the number of types is M, and M is not less than 2, and the audio type is output to the motion state setting module.
具体实施时,音频可从其他电子设备输入,或者从网络下载获取,或者通过录音获取,或者通过音频生成工具制作。分类可以由人工进行分类,也可以自动进行分类。自动分类的依据可以有多种,包括但不限于节奏、旋律、乐器、风格等,名称、歌手等也可以作为依据的一部分,可根据音频文件自带的属性进行分类。可以事先下载若干音频并分类,例如40个不同风格类型的音乐和若干记录鸟鸣等自然界声音的音频,将其分别分为M1“交响乐”、M2“进行曲”、M3“民歌”、M4“摇滚乐”和M5“鸟鸣”五个音频类型。During specific implementation, the audio can be input from other electronic devices, or downloaded from the network, or obtained through recording, or produced through an audio generation tool. Classification can be done manually or automatically. There are many bases for automatic classification, including but not limited to rhythm, melody, instrument, style, etc. Name, singer, etc. can also be used as part of the base, and can be classified according to the attributes of the audio file. You can download and classify several audios in advance, for example, 40 different styles of music and some audio recordings of natural sounds such as birdsong, which are divided into M1 "symphony", M2 "march", M3 "folk song", M4 "rock music". " and M5 "Birdsong" five audio types.
运动状态设置模块,用于设置登山者处于不同运动状态类型时对应的音频类型;将运动状态类型与音频类型及对应关系输出到音频播放模块。The exercise state setting module is used to set the corresponding audio type when the climber is in different exercise state types; output the exercise state type and audio type and the corresponding relationship to the audio playback module.
将登山者的运动状态类型可分为两类:地势状态和速度状态,地势状态可设置为以下类型:P1“陡峭状态”、P2“平缓状态”、P3“平路状态”,速度状态可设置为以下类型:S1“快速状态”、S2“中速状态”、S3“慢速状态”。两种分类状态综合后构成了登山者的状态集合{P1S1,P1S2,P1S3,P2S1,P2S2,P2S3,P3S1,P3S2,P3S3},例如综合状态P1S1是同时处于P1“陡峭状态”和S1“快速状态”的情况,集合中每一个状态都可对应一种音频类型,也可以多种状态对应一种音频类型,或者一种状态对应多种音频类型。即所述运动状态和音频类型的对应关系为一对一,或一对多,或多对一均是可行的。The type of motion state of climbers can be divided into two categories: terrain state and speed state. The terrain state can be set to the following types: P1 "steep state", P2 "smooth state", P3 "flat road state", and the speed state can be set For the following types: S1 "fast state", S2 "medium speed state", S3 "slow speed state". The combination of the two classification states constitutes the state set {P1S1, P1S2, P1S3, P2S1, P2S2, P2S3, P3S1, P3S2, P3S3} of the climber. For example, the comprehensive state P1S1 is in the P1 "steep state" and S1 "fast state" at the same time In the case of ", each state in the set can correspond to one audio type, or multiple states can correspond to one audio type, or one state can correspond to multiple audio types. That is, it is feasible that the correspondence between the motion state and the audio type is one-to-one, one-to-many, or many-to-one.
例如可以如下对应:状态P1S1、P1S2和P1S3都对应M1,P2S1对应M4,P2S2对应M2,P2S3对应M2和M5,P3S1和P3S2对应M3和M5,P3S3对应M5。For example, the following correspondences can be made: states P1S1, P1S2, and P1S3 are all corresponding to M1, P2S1 is corresponding to M4, P2S2 is corresponding to M2, P2S3 is corresponding to M2 and M5, P3S1 and P3S2 are corresponding to M3 and M5, and P3S3 is corresponding to M5.
海拔高度检测模块,用于检测登山者当前所处位置的海拔高度H(n),输出到运动状态计算模块,采用n标识本次运动的第n次检测所得海拔高度的记录值。The altitude detection module is used to detect the altitude H(n) of the climber's current location, and output it to the exercise state calculation module, and use n to identify the record value of the altitude obtained by the nth detection of this exercise.
水平位置检测模块,用于检测登山者当前所处位置的水平位置S(n),输出到运动状态计算模块,采用n标识本次运动的第n次检测所得水平位置的记录值。The horizontal position detection module is used to detect the horizontal position S(n) of the current position of the climber, and outputs it to the motion state calculation module, and uses n to identify the recorded value of the horizontal position obtained by the nth detection of this movement.
具体检测可采用现有技术,在登山者登山时利用现有的检测传感器获取海拔高度信息和水平位置信息,可参考带有相应检测功能的智能手机。Existing technologies can be used for specific detection. When climbers climb mountains, existing detection sensors are used to obtain altitude information and horizontal position information. Refer to smart phones with corresponding detection functions.
计时模块,用于记录第n次检测的相应时间T(n),输出时间T(n)到运动状态计算模块。可以采用绝对时间,如北京时间,格林威治时间,也可以记录相对时间,如当前相对登山开始的时间。The timing module is used to record the corresponding time T(n) of the nth detection, and output the time T(n) to the motion state calculation module. Absolute time can be used, such as Beijing time and Greenwich mean time, and relative time can also be recorded, such as the current relative climbing start time.
运动计算模块,记录由海拔高度检测模块输入的海拔高度H(n)、水平位置检测模块得到的水平位置S(n)和由计时模块输入的当前时间T(n),计算得到登山者当前的运动状态,并将运动状态输出到音频播放模块,具体实现如下:The motion calculation module records the altitude H(n) input by the altitude detection module, the horizontal position S(n) obtained by the horizontal position detection module and the current time T(n) input by the timing module, and calculates the climber's current Motion state, and output the motion state to the audio playback module, the specific implementation is as follows:
按照公式(1)计算海拔高度变化DelH(n),其中H(n-1)为T(n-1)时刻记录的海拔高度,Calculate the altitude change DelH(n) according to formula (1), where H(n-1) is the altitude recorded at T(n-1),
DelH(n)=|H(n)-H(n-1)| 公式(1)DelH(n)=|H(n)-H(n-1)| formula (1)
水平位置检测模块得到的T(n)时刻的水平位置S(n)和T(n-1)时刻的水平位置S(n-1),按照公式(2)得到水平位移DelS(n)The horizontal position S(n) at the time T(n) and the horizontal position S(n-1) at the time T(n-1) obtained by the horizontal position detection module obtain the horizontal displacement DelS(n) according to the formula (2)
DelS(n)=|S(n)–S(n-1)| 公式(2)DelS(n)=|S(n)–S(n-1)| formula (2)
如果海拔高度变化DelH(n)等于0且水平位移DelS(n)等于0,说明登山者处于静止状态,可以视为登山者处于“平路状态”,不作任何操作,直接返回到流程最初开始的步骤,进行下一时刻的检测;也可以将“静止状态”作为一个单独的状态播放对应的音乐。如果海拔高度变化DelH(n)不等于0且水平位移DelS(n)等于0,说明登山者在做垂直运动,则地势状态为“陡峭状态”;If the altitude change DelH(n) is equal to 0 and the horizontal displacement DelS(n) is equal to 0, it means that the climber is in a static state, which can be regarded as the climber is in a "flat road state", without any operation, directly return to the original start of the process The step is to perform detection at the next moment; the "stationary state" can also be used as a separate state to play the corresponding music. If the altitude change DelH(n) is not equal to 0 and the horizontal displacement DelS(n) is equal to 0, it means that the climber is doing vertical movement, and the terrain state is "steep state";
如果水平位移DelS(n)不等于0,根据海拔高度变化DelH(n)和水平位移DelS(n)按照公式(3)计算登山者登山之路的陡峭程度D(n)If the horizontal displacement DelS(n) is not equal to 0, according to the altitude change DelH(n) and the horizontal displacement DelS(n) according to the formula (3) to calculate the steepness of the climber's climbing path D(n)
D(n)=DelH(n)/DelS(n) 公式(3)D(n)=DelH(n)/DelS(n) formula (3)
如果D(n)小于D1,则登山者处于“平路状态”,例如DelH(n)等于0时;如果D(n)不小于D1且小于D2,则登山者处于“平缓状态”,如果D(n)不小于D2,则登山者处于“陡峭状态”,其中D1是“平路状态”与“平缓状态”的划分标准,其中D2是“平缓状态”与“陡峭状态”的划分标准,D1和D2为相应的预设阈值,可以由登山者自己根据自身感受进行设置,也可以由统计获得,If D(n) is less than D1, the climber is in a "flat state", for example, when DelH(n) is equal to 0; if D(n) is not less than D1 and less than D2, the climber is in a "flat state", if D (n) not less than D2, the climber is in a "steep state", where D1 is the division standard between "flat road state" and "smooth state", where D2 is the division standard of "smooth state" and "steep state", D1 and D2 are the corresponding preset thresholds, which can be set by the climbers themselves according to their own feelings, or can be obtained from statistics,
计算根据海拔高度变化DelH(n)和水平位移DelS(n)按照公式(4)计算登山者的空间方位变化DelK(n),Calculate according to the altitude change DelH(n) and the horizontal displacement DelS(n) according to the formula (4) to calculate the spatial orientation change DelK(n) of the climber,
公式(4) Formula (4)
按照公式(5)计算登山者的空间方位变化的速度VH(n)来判断其速度状态,Calculate the speed VH(n) of the climber's spatial orientation change according to formula (5) to judge its speed state,
VH(n)=DelK(n)/(T(n)-T(n-1)) 公式(5)VH(n)=DelK(n)/(T(n)-T(n-1)) formula (5)
如果VH(n)小于V1,则登山者处于“慢速状态”,如果VH(n)不小于V1且小于V2,则登山者处于“中速状态”,如果VH(n)不小于V2,则登山者处于“快速状态”,其中V1是“慢速状态”与“中速状态”的划分标准,其中V2是“中速状态”与“快速状态”的划分标准,V1和V2为相应的预设阈值,可以由登山者自己根据自身身体素质进行设置,也可以由统计获得;If VH(n) is less than V1, the climber is in the "slow state", if VH(n) is not less than V1 and less than V2, the climber is in the "medium speed state", if VH(n) is not less than V2, then Climbers are in the "fast state", where V1 is the division standard of "slow state" and "medium speed state", among which V2 is the division standard of "medium speed state" and "fast state", V1 and V2 are the corresponding pre-scheduled The threshold can be set by the climbers themselves according to their physical fitness, or can be obtained from statistics;
上述计算中,n>1,即第一次记录时不进行运动状态计算;In the above calculation, n>1, that is, no motion state calculation is performed during the first recording;
音频播放模块,用于根据由运动状态计算模块得到的运动状态,和运动状态设置模块的运动状态与音频类型对应关系,得到当前运动状态对应的音频类型,并播放该音频类型的音频,为提高效率起见,可根据由运动状态计算模块得到运动状态,与音频播放模块存储的原运动状态进行对比,如果相同则继续播放原来的音频,如果不同则切换到新的音频类型,并播放。Audio playback module is used to obtain the corresponding audio type of the current motion state according to the motion state obtained by the motion state calculation module, and the motion state and audio type correspondence of the motion state setting module, and plays the audio frequency of this audio type, in order to improve For the sake of efficiency, the motion state obtained by the motion state calculation module can be compared with the original motion state stored in the audio playback module. If the same, the original audio will continue to be played. If it is different, the new audio type will be switched and played.
具体实施时,可在现有的mp3、mp4、手机等设备上添加模块实现本发明所提供装置,也可以采用软件技术实现相应流程自动运行。本发明实施例所提供的一种基于海拔高度变化和水平位移的音频播放方法,包括以下步骤:During specific implementation, modules can be added to existing mp3, mp4, mobile phones and other equipment to realize the device provided by the present invention, and software technology can also be used to realize automatic operation of corresponding processes. An audio playback method based on altitude change and horizontal displacement provided by an embodiment of the present invention includes the following steps:
步骤1,音频分类,包括将音频分为不同类型,类型数M,M一般不小于2。Step 1, audio classification, including classifying audio into different types, the number of types is M, and M is generally not less than 2.
步骤2,运动状态设置,包括设置每种运动状态对应的音频类型。Step 2, exercise state setting, including setting the audio type corresponding to each exercise state.
步骤3,运动状态检测及相应地音频播放,包括以下子步骤,Step 3, motion state detection and corresponding audio playback, including the following sub-steps,
步骤3.1,进行海拔高度和水平位移初始检测,检测当前登山者所处位置的海拔高度H(1)和水平位置S(1);Step 3.1, perform initial detection of altitude and horizontal displacement, and detect the altitude H(1) and horizontal position S(1) of the current climber's location;
具体实施时,可以记检测次数为n,初始化n=1,步骤3.1是首次进行检测,得到的海拔高度H(n)即H(1),同理得到水平位置S(1);检测的时间记为T(n),即T(1)。During specific implementation, the number of times of detection can be recorded as n, initialization n=1, step 3.1 is to detect for the first time, the altitude H(n) obtained is H(1), and the horizontal position S(1) is obtained in the same way; the time of detection Denoted as T(n), ie T(1).
步骤3.2,音频初始播放,音频可以随机播放,也可以默认按照某一模式,如M2,进行播放。In step 3.2, the audio is initially played. The audio can be played randomly, or it can be played in a certain mode by default, such as M2.
步骤3.3,在间隔一段时间t后,令n=n+1,重新进行运动状态检测,检测当前登山者所处位置的海拔高度H(n)和水平位置S(n),具体实施时,t值可由用户自行设置或者采用预先设定的默认设置,以调整两次运动状态检测之间的时间间隔,可以设置比较小的时间以便及时跟踪用户所处状态;检测的时间记为T(n)。Step 3.3, after a period of time t, make n=n+1, re-execute the motion state detection, and detect the altitude H(n) and the horizontal position S(n) of the current climber's position. During specific implementation, t The value can be set by the user or the preset default setting is used to adjust the time interval between two motion state detections. A relatively small time can be set to track the state of the user in time; the detection time is recorded as T(n) .
步骤3.4,运动状态计算判断,包括以下子步骤,Step 3.4, motion state calculation and judgment, includes the following sub-steps,
步骤3.4.1,判断是否海拔高度变化DelH(n)不等于0且水平位移DelS(n)等于0,是则判断地势状态为“陡峭状态”,进入步骤3.5,否则进入步骤3.4.2;Step 3.4.1, judge whether the altitude change DelH(n) is not equal to 0 and the horizontal displacement DelS(n) is equal to 0, if it is judged that the terrain state is "steep state", go to step 3.5, otherwise go to step 3.4.2;
其中,DelH(n)=|H(n)-H(n-1)|,DelS(n)=|S(n)–S(n-1)|;Among them, DelH(n)=|H(n)-H(n-1)|, DelS(n)=|S(n)–S(n-1)|;
步骤3.4.2,判断是否水平位移DelS(n)等于0,是则判断登山者处于“平路状态”,进入步骤3.4.5,否则进入步骤3.4.3;Step 3.4.2, judging whether the horizontal displacement DelS(n) is equal to 0, if so, it is judged that the climber is in a "flat road state", and then go to step 3.4.5, otherwise go to step 3.4.3;
步骤3.4.3,此时为水平位移DelS(n)不等于0的情况,计算登山者登山之路的陡峭程度D(n),D(n)=DelH(n)/DelS(n);Step 3.4.3, this time is the situation that the horizontal displacement DelS(n) is not equal to 0, calculate the steepness D(n) of the climber's mountaineering road, D(n)=DelH(n)/DelS(n);
步骤3.4.4,进行地势状态判别,Step 3.4.4, carry out terrain state discrimination,
如果D(n)小于D1,则登山者处于“平路状态”;If D(n) is less than D1, the climber is in a "flat road state";
如果D(n)不小于D1且小于D2,则登山者处于“平缓状态”;If D(n) is not less than D1 and less than D2, the climber is in a "flat state";
如果D(n)不小于D2,则登山者处于“陡峭状态”;If D(n) is not less than D2, the climber is in a "steep state";
其中,D1是“平路状态”与“平缓状态”的预设划分标准,其中D2是“平缓状态”与“陡峭状态”的预设划分标准;Among them, D1 is the preset division standard of "flat road state" and "smooth state", and D2 is the preset division standard of "smooth road state" and "steep state";
步骤3.4.5,计算登山者的空间方位变化DelK(n)如下,Step 3.4.5, calculate the climber’s spatial orientation change DelK(n) as follows,
步骤3.4.6,计算登山者的空间方位变化速度VH(n)=DelK(n)/(T(n)-T(n-1))Step 3.4.6, calculate the spatial orientation change speed of the climber VH(n)=DelK(n)/(T(n)-T(n-1))
步骤3.4.7,进行速度状态判别如下,In step 3.4.7, the speed state is judged as follows,
如果VH(n)小于V1,则登山者处于“慢速状态”,If VH(n) is less than V1, the climber is in a "slow state",
如果VH(n)不小于V1且小于V2,则登山者处于“中速状态”,If VH(n) is not less than V1 and less than V2, the climber is in a "medium speed state",
如果VH(n)不小于V2,则登山者处于“快速状态”;If VH(n) is not less than V2, the climber is in a "fast state";
其中,V1是“慢速状态”与“中速状态”的划分标准,其中V2是“中速状态”与“快速状态”的划分标准,V1和V2为相应的预设阈值;Among them, V1 is the division standard of "slow state" and "medium speed state", wherein V2 is the division standard of "medium speed state" and "fast state", and V1 and V2 are corresponding preset thresholds;
具体实现流程可参见图2。See Figure 2 for the specific implementation process.
步骤3.5,判断检测的时间T(n)相应状态与上一次检测的时间T(n-1)相应状态是否不同,如果不同则根据新的状态播放对应的音频类型,如果音频类型相同则不切换。Step 3.5, judge whether the corresponding state of the detected time T(n) is different from the corresponding state of the last detected time T(n-1), if different, play the corresponding audio type according to the new state, if the audio type is the same, do not switch .
然后返回步骤3.3,直到停止流程。具体实施时,可以由用户手动关闭,也可以当自动检测到一段时间T海拔高度及水平位置不变化时关闭,T值可以是设置默认值,也可以由用户设置。Then return to step 3.3 until the process is stopped. During specific implementation, it can be turned off manually by the user, or it can be turned off when it automatically detects that the altitude and horizontal position of T have not changed for a period of time, and the T value can be set as a default value or set by the user.
本发明未详细描述的部分属于本领域公知技术。Parts not described in detail in the present invention belong to the well-known technologies in the art.
以上实施例仅供说明本发明之用,而非对本发明的限制,有关技术领域的技术人员,在不脱离本发明的精神和范围的情况下,还可以做出各种变换或变型,因此所有等同的技术方案,都落入本发明的保护范围。The above embodiments are only for the purpose of illustrating the present invention, rather than limiting the present invention. Those skilled in the relevant technical fields can also make various changes or modifications without departing from the spirit and scope of the present invention. Therefore, all Equivalent technical solutions all fall within the protection scope of the present invention.
Claims (8)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510615873.8A CN105225680B (en) | 2015-09-24 | 2015-09-24 | Audio frequency playing method and device with horizontal displacement is changed based on height above sea level |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510615873.8A CN105225680B (en) | 2015-09-24 | 2015-09-24 | Audio frequency playing method and device with horizontal displacement is changed based on height above sea level |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105225680A CN105225680A (en) | 2016-01-06 |
CN105225680B true CN105225680B (en) | 2017-08-08 |
Family
ID=54994584
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510615873.8A Active CN105225680B (en) | 2015-09-24 | 2015-09-24 | Audio frequency playing method and device with horizontal displacement is changed based on height above sea level |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105225680B (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101111743A (en) * | 2004-12-17 | 2008-01-23 | 耐克国际有限公司 | Multi-sensor monitoring of athletic performance |
CN101388233A (en) * | 2008-10-22 | 2009-03-18 | 深圳华为通信技术有限公司 | Method for playing music based on step of user and mobile terminal |
CN102955897A (en) * | 2011-08-10 | 2013-03-06 | 索尼公司 | Information processing apparatus, information processing method, program, and recording medium |
CN104714648A (en) * | 2015-03-25 | 2015-06-17 | 广东欧珀移动通信有限公司 | Method and device for switching music playing scenes |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9409052B2 (en) * | 2008-10-03 | 2016-08-09 | Adidas Ag | Program products, methods, and systems for providing location-aware fitness monitoring services |
-
2015
- 2015-09-24 CN CN201510615873.8A patent/CN105225680B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101111743A (en) * | 2004-12-17 | 2008-01-23 | 耐克国际有限公司 | Multi-sensor monitoring of athletic performance |
CN101388233A (en) * | 2008-10-22 | 2009-03-18 | 深圳华为通信技术有限公司 | Method for playing music based on step of user and mobile terminal |
CN102955897A (en) * | 2011-08-10 | 2013-03-06 | 索尼公司 | Information processing apparatus, information processing method, program, and recording medium |
CN104714648A (en) * | 2015-03-25 | 2015-06-17 | 广东欧珀移动通信有限公司 | Method and device for switching music playing scenes |
Also Published As
Publication number | Publication date |
---|---|
CN105225680A (en) | 2016-01-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP4061216B1 (en) | Apparel-based dynamic movement scoring | |
CN105122005B (en) | Motion Monitoring System with Automatic Pause of Media Content | |
WO2018161349A1 (en) | Music playback method and device, and music playback apparatus | |
CN104181875B (en) | Excise and fitness system based on mode of Internet of Things | |
CN101120343A (en) | Electronic device and method for selecting content items | |
US12032639B2 (en) | Search media content based upon tempo | |
CN101119773A (en) | Electronic device and method for reproducing a human perceptual signal | |
US20150258415A1 (en) | Physiological rate coaching by modifying media content based on sensor data | |
US10372757B2 (en) | Search media content based upon tempo | |
EP3096323A1 (en) | Identifying media content | |
CN204465846U (en) | audio output device | |
Barrass et al. | Probing preferences between six designs of interactive sonifications for recreational sports, health and fitness | |
CN105225680B (en) | Audio frequency playing method and device with horizontal displacement is changed based on height above sea level | |
TW201624199A (en) | Automatically choosing songs system and method according to motion state | |
CN105139875B (en) | The audio frequency playing method and device of height above sea level change during based on motion | |
CN106446152A (en) | Audio file recommendation method and device | |
Chiarandini et al. | A system for dynamic playlist generation driven by multimodal control signals and descriptors | |
CN108932336A (en) | Information recommendation method, electric terminal and computer readable storage medium message | |
KR101698391B1 (en) | Apparatus for providing athletics lecture video and method for providing the same | |
CN105245955B (en) | Visual aid playback method and device based on height above sea level variation and horizontal displacement | |
CN109243570A (en) | Based on the movement recommended method and system of body local fat content, storage medium | |
CN212187737U (en) | fitness system | |
CN107978328B (en) | Information processing method and device | |
CN105139876A (en) | Altitude-based audio playing method and device | |
CN110085202B (en) | Music generation method, device, storage medium and processor |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |