CN104460997B - A kind of method and terminal for realizing music switching - Google Patents

A kind of method and terminal for realizing music switching Download PDF

Info

Publication number
CN104460997B
CN104460997B CN201410712584.5A CN201410712584A CN104460997B CN 104460997 B CN104460997 B CN 104460997B CN 201410712584 A CN201410712584 A CN 201410712584A CN 104460997 B CN104460997 B CN 104460997B
Authority
CN
China
Prior art keywords
music
axis
rotation
preset coordinate
terminal
Prior art date
Application number
CN201410712584.5A
Other languages
Chinese (zh)
Other versions
CN104460997A (en
Inventor
冀文彬
Original Assignee
广东欧珀移动通信有限公司
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by 广东欧珀移动通信有限公司 filed Critical 广东欧珀移动通信有限公司
Priority to CN201410712584.5A priority Critical patent/CN104460997B/en
Publication of CN104460997A publication Critical patent/CN104460997A/en
Application granted granted Critical
Publication of CN104460997B publication Critical patent/CN104460997B/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/03Arrangements for converting the position or the displacement of a member into a coded form
    • G06F3/033Pointing devices displaced or positioned by the user, e.g. mice, trackballs, pens or joysticks; Accessories therefor
    • G06F3/0346Pointing devices displaced or positioned by the user, e.g. mice, trackballs, pens or joysticks; Accessories therefor with detection of the device orientation or free movement in a 3D space, e.g. 3D mice, 6-DOF [six degrees of freedom] pointers using gyroscopes, accelerometers or tilt-sensors

Abstract

The embodiment of the invention discloses a kind of method and terminal for realizing music switching, this method includes:The rotary speed of terminal is detected, rotary speed includes angular velocity of rotation and linear velocity;Obtain angular velocity of rotation component of the angular velocity of rotation in each preset coordinate axle and the angular speed direction in each preset coordinate axle;Obtain linear velocity component of the linear velocity in each preset coordinate axle;From each preset coordinate axle, determine that angular velocity of rotation component and linear velocity component exceed each target preset coordinate axle of predetermined threshold value;The angular velocity of rotation component of each target preset coordinate axle is compared, the maximum target preset coordinate axle of angular velocity of rotation component is obtained;From the corresponding relation of default angular speed direction and music switching direction, target music switching direction corresponding with the target preset coordinate axle is obtained;According to the target music switching direction, the music in switching terminal music playlist.Using the present invention, the convenience of music switching can be lifted.

Description

A kind of method and terminal for realizing music switching

Technical field

The present invention relates to communication technical field, and in particular to a kind of method and terminal for realizing music switching.

Background technology

With the gradually popularization of mobile terminal, music is played on mobile terminals and has become the important amusement work(of people Can, music is played in increasing people's selection on mobile terminals.When user plays music on mobile terminals, it is often necessary to will Currently playing song be switched to next or upper one, it is necessary to user touch mobile terminal touch-screen or click on movement Button in terminal realizes that music switches, and for large-size screen monitors mobile terminal, user operates inconvenience.

The content of the invention

The embodiment of the present invention provides a kind of method and terminal of music switching, can lift the convenience of music switching.

The embodiment of the present invention provides a kind of method for realizing music switching, including:

The rotary speed of terminal is detected, the rotary speed includes angular velocity of rotation and linear velocity;

The angular velocity of rotation is obtained in the angular velocity of rotation component of each preset coordinate axle and in each preset coordinate axle Angular speed direction, each preset coordinate axle include X-axis, Y-axis and Z axis;

Obtain linear velocity component of the linear velocity in each preset coordinate axle;

From each preset coordinate axle, determine that angular velocity of rotation component and linear velocity component exceed default threshold Each target preset coordinate axle of value;

The angular velocity of rotation component of each target preset coordinate axle is compared, angular velocity of rotation component is obtained maximum Target preset coordinate axle;

From the corresponding relation of the angular speed direction of default preset coordinate axle and music switching direction, obtain and the rotation The corresponding target music switching direction in angular speed direction of the maximum target preset coordinate axle of tarnsition velocity component;

According to the target music switching direction, the music in switching terminal music playlist.

Accordingly, the embodiment of the present invention also provides a kind of terminal, including:

First detection unit, the rotary speed for detecting terminal, the rotary speed includes angular velocity of rotation and rotation Linear velocity;

First acquisition unit, for obtain the angular velocity of rotation the angular velocity of rotation component of each preset coordinate axle and The angular speed direction of each preset coordinate axle, each preset coordinate axle includes X-axis, Y-axis and Z axis;

Second acquisition unit, for obtaining linear velocity point of the linear velocity in each preset coordinate axle Amount;

Judging unit, for from each preset coordinate axle, determining angular velocity of rotation component and linear velocity point Amount exceedes each target preset coordinate axle of predetermined threshold value;

Comparing unit, for the angular velocity of rotation component of each target preset coordinate axle to be compared, is rotated The maximum target preset coordinate axle of angular velocity component;

Processing unit, for the corresponding relation from the angular speed direction of default preset coordinate axle and music switching direction In, obtain target music corresponding with the angular speed direction for the target preset coordinate axle that the angular velocity of rotation component is maximum and switch Direction;

Execution unit, for according to the target music switching direction, the music in switching terminal music playlist.

In the embodiment of the present invention, the rotary speed of terminal and corresponding direction of rotation are can detect, the rotation speed of terminal is judged Whether degree exceedes predetermined threshold value, if so, the angular velocity of rotation of the preset coordinate axle more than predetermined threshold value is compared, is revolved The maximum preset coordinate axle of tarnsition velocity and corresponding direction of rotation, by the corresponding rotation of preset coordinate axle that angular velocity of rotation is maximum Turn switching law of the direction with pre-setting to be contrasted, obtain comparing result, according to comparing result, switching terminal music is broadcast The music in table is emplaced, the mode that user switches music in terminal is enriched, the convenience of lifting music switching improves user The interest of operation, improves Consumer's Experience.

Brief description of the drawings

Technical scheme in order to illustrate the embodiments of the present invention more clearly, below by using required in embodiment Accompanying drawing is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the present invention, for ability For the those of ordinary skill of domain, on the premise of not paying creative work, it can also be obtained according to these accompanying drawings other attached Figure.

Fig. 1 is a kind of flow chart for the method for realizing music switching disclosed in the embodiment of the present invention;

Fig. 2 is the flow chart of another method for realizing music switching disclosed in the embodiment of the present invention;

Fig. 3 is a kind of structural representation of terminal disclosed in the embodiment of the present invention;

Fig. 4 is the structural representation of another terminal disclosed in the embodiment of the present invention.

Embodiment

Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete Site preparation is described, it is clear that described embodiment is only a part of embodiment of the invention, rather than whole embodiments.It is based on Embodiment in the present invention, it is every other that those of ordinary skill in the art are obtained under the premise of creative work is not made Embodiment, belongs to the scope of protection of the invention.

The embodiment of the present invention provides a kind of method and terminal of music switching, can lift the convenience of music switching.With It is lower to be described in detail respectively.

Terminal described in the embodiment of the present invention may include:Mobile phone, tablet personal computer or walkman etc., above-mentioned terminal is only Citing, and it is non exhaustive, including but not limited to above-mentioned terminal.

The method and the suitable application scenarios of terminal of music switching provided in an embodiment of the present invention can be the online sounds of terminal It is happy to play or the broadcasting of terminal offline music.The embodiment of the present invention is played in terminal Online Music or offline music is played When, terminal is rotated by user, the switching to the music in the music application in terminal music playing system is realized, wherein Music playing system and the music application embodiment of the present invention are not limited.User is during terminal is rotated, and terminal can In screen state of going out, may be at bright screen state, holding state can also be in, the embodiment of the present invention is not limited.

Referring to Fig. 1, Fig. 1 is a kind of flow chart for the method for realizing music switching disclosed in the embodiment of the present invention.This reality Apply the method for realizing music switching described in example, including step:

S101, detects the rotary speed of terminal, and the rotary speed includes angular velocity of rotation and linear velocity.

In some feasible embodiments, the scene described in the embodiment of the present invention is user in terminal music When playing music in, user's rotation terminal, 3-axis acceleration sensor and three-axis gyroscope the detection terminal of terminal built-in Rotary speed, the anglec of rotation of the angular velocity of rotation for terminal in rotary course around a certain axle described in the embodiment of the present invention Speed, a certain axle is a certain axle vertical with terminal rotating plane, and the size of angular velocity of rotation is rad/s (Radian per second), this Linear velocity described in inventive embodiments for terminal certain one end during terminal rotating rotational trajectory tangent line The speed in direction, the unit of linear velocity is m/s (metre per second (m/s)).

In the specific implementation, when terminal plays music in music application, user's rotation terminal, the three of terminal built-in Axle acceleration sensor and three-axis gyroscope detect the angular velocity of rotation of terminal, the three-axis gyroscope detection terminal of terminal built-in Linear velocity.

S102, obtains the angular velocity of rotation in the angular velocity of rotation component of each preset coordinate axle and in each preset coordinate axle Angular speed direction, each preset coordinate axle includes X-axis, Y-axis and Z axis.

In some feasible embodiments, terminal is detected by built-in 3-axis acceleration sensor and three-axis gyroscope After the angular velocity of rotation of terminal, angular velocity of rotation component of the angular velocity of rotation on X-axis, Y-axis and Z axis is obtained and in X Angular speed direction on axle, Y-axis and Z axis.

In the specific implementation, when terminal plays music in music application, user's rotation terminal, terminal passes through built-in 3-axis acceleration sensor and three-axis gyroscope detection terminal angular velocity of rotation after, by the angular velocity of rotation in X-axis, Y Projected respectively on axle and Z axis, obtain angular velocity of rotation component of the angular velocity of rotation on X-axis, Y-axis and Z axis and in X The angular speed direction of angular speed direction on axle, Y-axis and Z axis, the wherein angular velocity of rotation on X-axis, Y-axis and Z axis can Think clockwise or counterclockwise.

S103, obtains linear velocity component of the linear velocity in each preset coordinate axle.

In some feasible embodiments, terminal detects the rotational line of terminal by built-in 3-axis acceleration sensor After speed, linear velocity component of the linear velocity on X-axis, Y-axis and Z axis is obtained.

In the specific implementation, when terminal plays music in music application, user's rotation terminal, terminal passes through built-in 3-axis acceleration sensor detection terminal linear velocity after, by the linear velocity on X-axis, Y-axis and Z axis point Do not projected, obtain linear velocity component of the linear velocity on X-axis, Y-axis and Z axis.

S104, from each preset coordinate axle, determines that angular velocity of rotation component and linear velocity component exceed default Each target preset coordinate axle of threshold value.

In some feasible embodiments, terminal is detected by built-in 3-axis acceleration sensor and three-axis gyroscope After the angular velocity of rotation and linear velocity of terminal, anglec of rotation speed of the angular velocity of rotation on X-axis, Y-axis and Z axis is obtained Component and linear velocity component of the linear velocity on X-axis, Y-axis and Z axis are spent, from each preset coordinate axle, it is determined that Go out each target preset coordinate axle that angular velocity of rotation component and linear velocity component exceed predetermined threshold value.

In the specific implementation, when terminal plays music in music application, user's rotation terminal, terminal passes through built-in 3-axis acceleration sensor and three-axis gyroscope detection terminal angular velocity of rotation and linear velocity after, obtain the anglec of rotation Angular velocity of rotation component and acquisition linear velocity rotation X-axis, Y-axis and Z axis on of the speed on X-axis, Y-axis and Z axis Turn linear velocity component.Judge whether angular velocity of rotation component and linear velocity component in X-axis exceed predetermined threshold value, if It is then to judge X-axis for target preset coordinate axle;Judge whether angular velocity of rotation component and linear velocity component in Y-axis are equal More than predetermined threshold value, if so, then judging Y-axis for target preset coordinate axle;Judge angular velocity of rotation component and the rotational line on Z axis Whether velocity component exceedes predetermined threshold value, if so, then judging Z axis for target preset coordinate axle.

S105, the angular velocity of rotation component of each target preset coordinate axle is compared, angular velocity of rotation component is obtained most Big target preset coordinate axle.

In some feasible embodiments, terminal obtains anglec of rotation speed of the angular velocity of rotation on X-axis, Y-axis and Z axis Spend after linear velocity component on X-axis, Y-axis and Z axis of component and linear velocity, determine angular velocity of rotation component and Linear velocity component exceedes each target preset coordinate axle of predetermined threshold value, by the angular velocity of rotation of each target preset coordinate axle Component is compared, and obtains the maximum target preset coordinate axle of angular velocity of rotation component.

In the specific implementation, when terminal plays music in music application, user's rotation terminal, terminal passes through built-in 3-axis acceleration sensor and three-axis gyroscope detection terminal angular velocity of rotation and linear velocity after, obtain the anglec of rotation Angular velocity of rotation component and acquisition linear velocity rotation X-axis, Y-axis and Z axis on of the speed on X-axis, Y-axis and Z axis Turn linear velocity component, from each preset coordinate axle, determine that angular velocity of rotation component and linear velocity component exceed default Each target preset coordinate axle of threshold value.If it is determined that target preset coordinate axle be X-axis and Y-axis, then compare angular velocity of rotation in X-axis On angular velocity component and angular velocity of rotation component of the angular velocity of rotation in Y-axis, obtain the maximum seat of angular velocity of rotation component Parameter.

S106, from the corresponding relation of the angular speed direction of default preset coordinate axle and music switching direction, obtain with The corresponding target music switching direction in angular speed direction of the maximum target preset coordinate axle of the angular velocity of rotation component.

In some feasible embodiments, terminal is obtained after the maximum target preset coordinate axle of angular velocity of rotation component, From the corresponding relation of the angular speed direction of default preset coordinate axle and music switching direction, obtain and the angular velocity of rotation point Measure the corresponding target music switching direction in angular speed direction of maximum target preset coordinate axle.

In the specific implementation, when terminal plays music in music application, user's rotation terminal, terminal passes through built-in 3-axis acceleration sensor and three-axis gyroscope detection terminal angular velocity of rotation and linear velocity after, obtain the anglec of rotation Angular velocity of rotation component and acquisition linear velocity rotation X-axis, Y-axis and Z axis on of the speed on X-axis, Y-axis and Z axis Turn linear velocity component, from each preset coordinate axle, determine that angular velocity of rotation component and linear velocity component exceed default Each target preset coordinate axle of threshold value.If it is determined that target preset coordinate axle be X-axis and Y-axis, then compare angular velocity of rotation in X-axis On angular velocity component and angular velocity of rotation component of the angular velocity of rotation in Y-axis, if angle speed of the angular velocity of rotation in X-axis Spend component maximum, then according to the angular speed direction of X-axis target music corresponding with being obtained in the corresponding relation of music switching direction Switching direction, if the angular speed direction of X-axis is clockwise, corresponding target music switching direction is clockwise direction, such as The angular speed direction of fruit X-axis is counterclockwise, then corresponding target music switching direction is counterclockwise.

S107, according to the target music switching direction, the music in switching terminal music playlist.

In some feasible embodiments, terminal obtains corresponding target music switching direction, according to the target music Music in switching direction, switching terminal music playlist.

In the specific implementation, when terminal plays music in music application, user's rotation terminal, terminal passes through built-in 3-axis acceleration sensor and three-axis gyroscope detection terminal angular velocity of rotation and linear velocity after, obtain the anglec of rotation Angular velocity of rotation component and acquisition linear velocity rotation X-axis, Y-axis and Z axis on of the speed on X-axis, Y-axis and Z axis Turn linear velocity component, from each preset coordinate axle, determine that angular velocity of rotation component and linear velocity component exceed default Each target preset coordinate axle of threshold value.If it is determined that target preset coordinate axle be X-axis and Y-axis, then compare angular velocity of rotation in X-axis On angular velocity component and angular velocity of rotation component of the angular velocity of rotation in Y-axis, if angle speed of the angular velocity of rotation in X-axis Spend component maximum, then according to the angular speed direction of X-axis target music corresponding with being obtained in the corresponding relation of music switching direction Switching direction, if the angular speed direction of X-axis is clockwise, corresponding target music switching direction is clockwise direction, is cut The music supreme one changed in terminal music playlist is first, if the angular speed direction of X-axis is counterclockwise, corresponding target sound Happy switching direction for counterclockwise, music in switching terminal music playlist to next.

In embodiments of the present invention, terminal can be examined by the 3-axis acceleration sensor and three-axis gyroscope of terminal built-in The angular velocity of rotation and linear velocity of terminal are surveyed, show that angular velocity of rotation and linear velocity exceed default threshold by comparing The maximum target preset coordinate axle of the angular velocity of rotation of value, according to the angle speed of the maximum target preset coordinate axle of the angular velocity of rotation Direction is spent with the corresponding relation of music switching direction, obtaining corresponding target music switching direction, being cut according to the target music The music changed in direction, switching terminal music playlist, the convenience of lifting music switching, improves the entertaining of user's operation Property, improve Consumer's Experience.

Referring to Fig. 2, Fig. 2 is the flow chart of another method for realizing music switching disclosed in the embodiment of the present invention.This The method for realizing music switching described in embodiment, including step:

S201, the open command of detection input music application.

In some feasible embodiments, the open command of terminal detection input music application, the open command For terminal open a terminal on music application, the open command can for user's manual key input, or mouse Punctuate hits input, or user's touch-screen is inputted, and the embodiment of the present invention is not limited.

S202, responds the open command, opens music application, and enter the terminal music that music is applied List carries out music.

In some feasible embodiments, the open command of terminal detection input music application responds the unlatching Instruction, opens music application, and enter the terminal music playlist progress music that music is applied, the music Playlist can be local playlist, or online playlist, the embodiment of the present invention is not limited.

S203, detects the rotary speed of terminal, and the rotary speed includes angular velocity of rotation and linear velocity.

In some feasible embodiments, the scene described in the embodiment of the present invention is user in terminal music When playing music in, user's rotation terminal, 3-axis acceleration sensor and three-axis gyroscope the detection terminal of terminal built-in Rotary speed, the anglec of rotation of the angular velocity of rotation for terminal in rotary course around a certain axle described in the embodiment of the present invention Speed, a certain axle is a certain axle vertical with terminal rotating plane, and the size of angular velocity of rotation is rad/s (Radian per second), this Linear velocity described in inventive embodiments for terminal certain one end during terminal rotating rotational trajectory tangent line The speed in direction, the unit of linear velocity is m/s (metre per second (m/s)).

In the specific implementation, when terminal plays music in music application, user's rotation terminal, the three of terminal built-in Axle acceleration sensor and three-axis gyroscope detect the angular velocity of rotation of terminal, the three-axis gyroscope detection terminal of terminal built-in Linear velocity.

S204, obtains the angular velocity of rotation in the angular velocity of rotation component of each preset coordinate axle and in each preset coordinate axle Angular speed direction, each preset coordinate axle includes X-axis, Y-axis and Z axis.

In some feasible embodiments, terminal is detected by built-in 3-axis acceleration sensor and three-axis gyroscope After the angular velocity of rotation of terminal, angular velocity of rotation component of the angular velocity of rotation on X-axis, Y-axis and Z axis is obtained and in X Angular speed direction on axle, Y-axis and Z axis.

In the specific implementation, when terminal plays music in music application, user's rotation terminal, terminal passes through built-in 3-axis acceleration sensor and three-axis gyroscope detection terminal angular velocity of rotation after, by the angular velocity of rotation in X-axis, Y Projected respectively on axle and Z axis, obtain angular velocity of rotation component of the angular velocity of rotation on X-axis, Y-axis and Z axis and in X The angular speed direction of angular speed direction on axle, Y-axis and Z axis, the wherein angular velocity of rotation in X-axis can be side clockwise To or counterclockwise.

S205, obtains linear velocity component of the linear velocity in each preset coordinate axle.

In some feasible embodiments, terminal detects the rotational line of terminal by built-in 3-axis acceleration sensor After speed, linear velocity component of the linear velocity on X-axis, Y-axis and Z axis is obtained.

In the specific implementation, when terminal plays music in music application, user's rotation terminal, terminal passes through built-in 3-axis acceleration sensor detection terminal linear velocity after, by the linear velocity on X-axis, Y-axis and Z axis point Do not projected, obtain linear velocity component of the linear velocity on X-axis, Y-axis and Z axis.

S206, for each preset coordinate axle in each preset coordinate axle, judges the angular velocity of rotation of the preset coordinate axle Whether component exceedes default angular velocity of rotation component threshold value.

In some feasible embodiments, for each preset coordinate axle in each preset coordinate axle, judge that this is preset Whether the angular velocity of rotation component of reference axis exceedes default angular velocity of rotation component threshold value.For example, X-axis, Y-axis and Z are judged Whether the angular velocity of rotation component of axle exceedes default angular velocity of rotation component threshold value, and the angular velocity of rotation component threshold value can be set to 3rad/s, 5rad/s, 8rad/s or other angular velocity of rotation component threshold values, the embodiment of the present invention are not limited.

S207, if it exceeds default angular velocity of rotation component threshold value, judges the linear velocity component of the preset coordinate axle Whether default linear velocity component threshold value is exceeded, if it exceeds default linear velocity component threshold value, determines the preset coordinate Axle is target preset coordinate axle.

In some feasible embodiments, if the angular velocity of rotation component of the preset coordinate axle exceedes the default anglec of rotation Velocity component threshold value, judges whether the linear velocity component of the preset coordinate axle exceedes default linear velocity component threshold value, If it exceeds default linear velocity component threshold value, it is target preset coordinate axle to determine the preset coordinate axle.For example, if sentencing The angular velocity of rotation component of disconnected X-axis, Y-axis and Z axis exceedes after default angular velocity of rotation component threshold value, judges the rotational line of X-axis Whether velocity component exceedes default linear velocity component threshold value, if exceeding, and it is target preset coordinate axle to determine X-axis;Judge Y-axis Linear velocity component whether exceed default linear velocity component threshold value, if exceeding, it is target preset coordinate to determine Y-axis Axle;Judge whether the linear velocity component of Z axis exceedes default linear velocity component threshold value, if being no more than, determine that Z axis is not Target preset coordinate axle.The linear velocity component threshold value can be set to 0.1m/s, 0.3m/s, 0.5m/s or other rotational lines Velocity component threshold value, the embodiment of the present invention is not limited.

S208, the angular velocity of rotation component of each target preset coordinate axle is compared, angular velocity of rotation component is obtained most Big target preset coordinate axle.

In some feasible embodiments, terminal obtains anglec of rotation speed of the angular velocity of rotation on X-axis, Y-axis and Z axis Spend after linear velocity component on X-axis, Y-axis and Z axis of component and linear velocity, determine angular velocity of rotation component and Linear velocity component exceedes each target preset coordinate axle of predetermined threshold value, by the angular velocity of rotation of each target preset coordinate axle Component is compared, and obtains the maximum target preset coordinate axle of angular velocity of rotation component.

In the specific implementation, when terminal plays music in music application, user's rotation terminal, terminal passes through built-in 3-axis acceleration sensor and three-axis gyroscope detection terminal angular velocity of rotation and linear velocity after, obtain the anglec of rotation Angular velocity of rotation component and acquisition linear velocity rotation X-axis, Y-axis and Z axis on of the speed on X-axis, Y-axis and Z axis Turn linear velocity component, from each preset coordinate axle, determine that angular velocity of rotation component and linear velocity component exceed default Each target preset coordinate axle of threshold value.If it is determined that target preset coordinate axle be X-axis and Y-axis, then compare angular velocity of rotation in Y-axis On angular velocity component and angular velocity of rotation component of the angular velocity of rotation in Y-axis, obtain the maximum seat of angular velocity of rotation component Parameter.

S209, from the corresponding relation of the angular speed direction of default preset coordinate axle and music switching direction, obtain with The corresponding target music switching direction in angular speed direction of the maximum target preset coordinate axle of the angular velocity of rotation component.

In some feasible embodiments, terminal is obtained after the maximum target preset coordinate axle of angular velocity of rotation component, From the corresponding relation of the angular speed direction of default preset coordinate axle and music switching direction, obtain and the angular velocity of rotation point Measure the corresponding target music switching direction in angular speed direction of maximum target preset coordinate axle.

In the specific implementation, when terminal plays music in music application, user's rotation terminal, terminal passes through built-in 3-axis acceleration sensor and three-axis gyroscope detection terminal angular velocity of rotation and linear velocity after, obtain the anglec of rotation Angular velocity of rotation component and acquisition linear velocity rotation X-axis, Y-axis and Z axis on of the speed on X-axis, Y-axis and Z axis Turn linear velocity component, from each preset coordinate axle, determine that angular velocity of rotation component and linear velocity component exceed default Each target preset coordinate axle of threshold value.If it is determined that target preset coordinate axle be X-axis and Y-axis, then compare angular velocity of rotation in X-axis On angular velocity component and angular velocity of rotation component of the angular velocity of rotation in Y-axis, if angle speed of the angular velocity of rotation in X-axis Spend component maximum, then according to the angular speed direction of X-axis target music corresponding with being obtained in the corresponding relation of music switching direction Switching direction, if the angular speed direction of X-axis is clockwise, corresponding target music switching direction is clockwise direction, such as The angular speed direction of fruit X-axis is counterclockwise, then corresponding target music switching direction is counterclockwise.

S210, according to the target music switching direction, the music in switching terminal music playlist.

In some feasible embodiments, terminal obtains corresponding target music switching direction, according to the target music Music in switching direction, switching terminal music playlist.

In the specific implementation, when terminal plays music in music application, user's rotation terminal, terminal passes through built-in 3-axis acceleration sensor and three-axis gyroscope detection terminal angular velocity of rotation and linear velocity after, obtain the anglec of rotation Angular velocity of rotation component and acquisition linear velocity rotation X-axis, Y-axis and Z axis on of the speed on X-axis, Y-axis and Z axis Turn linear velocity component, from each preset coordinate axle, determine that angular velocity of rotation component and linear velocity component exceed default Each target preset coordinate axle of threshold value.If it is determined that target preset coordinate axle be X-axis and Y-axis, then compare angular velocity of rotation in X-axis On angular velocity component and angular velocity of rotation component of the angular velocity of rotation in Y-axis, if angle speed of the angular velocity of rotation in X-axis Spend component maximum, then according to the angular speed direction of X-axis target music corresponding with being obtained in the corresponding relation of music switching direction Switching direction, if the angular speed direction of X-axis is clockwise, corresponding target music switching direction is clockwise direction, is cut The music supreme one changed in terminal music playlist is first, if the angular speed direction of X-axis is counterclockwise, corresponding target sound Happy switching direction for counterclockwise, music in switching terminal music playlist to next.

In embodiments of the present invention, terminal can detect that the unlatching of input music application refers to, and respond the open command, Music application is opened, and enters the terminal music playlist progress music that music is applied, terminal can lead to The 3-axis acceleration sensor and three-axis gyroscope for crossing terminal built-in detect the angular velocity of rotation and linear velocity of terminal, pass through Compare the target preset coordinate axle for drawing the angular velocity of rotation maximum that angular velocity of rotation and linear velocity exceed predetermined threshold value, According to the maximum angular speed direction of target preset coordinate axle of the angular velocity of rotation with the corresponding relation of music switching direction, obtaining Corresponding target music switching direction is taken, according to the target music switching direction, the music in switching terminal music playlist, The convenience of music switching is lifted, the interest of user's operation is improved, improves Consumer's Experience.

Referring to Fig. 3, Fig. 3 is a kind of structural representation of terminal disclosed in the embodiment of the present invention.Described in the present embodiment Terminal, including:

First detection unit 301, the rotary speed for detecting terminal, rotary speed includes angular velocity of rotation and rotation Linear velocity.

In some feasible embodiments, the scene described in the embodiment of the present invention is user in terminal music When playing music in, user's rotation terminal, the first detection unit 301 detects the rotary speed of terminal, the embodiment of the present invention Described in angular velocity of rotation of the angular velocity of rotation for terminal in rotary course around a certain axle, a certain axle is and terminal rotating The vertical a certain axle of plane, the size of angular velocity of rotation is rad/s (Radian per second), the rotation described in the embodiment of the present invention Linear velocity for terminal certain one end during terminal rotating rotational trajectory tangential direction speed, the list of linear velocity Position is m/s (metre per second (m/s)).

In the specific implementation, when terminal plays music in music application, user's rotation terminal, the first detection unit The angular velocity of rotation and linear velocity of 301 detection terminals.

First acquisition unit 302, for obtain the angular velocity of rotation each preset coordinate axle angular velocity of rotation component and In the angular speed direction of each preset coordinate axle, each preset coordinate axle includes X-axis, Y-axis and Z axis.

In some feasible embodiments, after the angular velocity of rotation of the first detection unit 301 detection terminal, first obtains Unit 302 is taken to obtain angular velocity of rotation component of the angular velocity of rotation on X-axis, Y-axis and Z axis and in X-axis, Y-axis and Z axis On angular speed direction.

In the specific implementation, when terminal plays music in music application, user's rotation terminal, the first detection unit After the angular velocity of rotation of 301 detection terminals, the angular velocity of rotation is projected respectively on X-axis, Y-axis and Z axis, first Acquiring unit 302 obtains angular velocity of rotation component of the angular velocity of rotation on X-axis, Y-axis and Z axis and in X-axis, Y-axis and Z axis On angular speed direction, wherein angular speed direction of the angular velocity of rotation on X-axis, Y-axis and Z axis can for clockwise Or counterclockwise.

Second acquisition unit 303, for obtaining linear velocity component of the linear velocity in each preset coordinate axle.

In some feasible embodiments, after the linear velocity of the first detection unit 301 detection terminal, second obtains Unit 303 is taken to obtain linear velocity component of the linear velocity on X-axis, Y-axis and Z axis.

In the specific implementation, when terminal plays music in music application, user's rotation terminal, the first detection unit After the linear velocity of 301 detection terminals, the linear velocity is projected respectively on X-axis, Y-axis and Z axis, second Acquiring unit 303 obtains linear velocity component of the linear velocity on X-axis, Y-axis and Z axis.

Judging unit 304, for from each preset coordinate axle, determining angular velocity of rotation component and linear velocity component Exceed each target preset coordinate axle of predetermined threshold value.

In some feasible embodiments, the angular velocity of rotation and rotation linear speed of the first detection unit 301 detection terminal After degree, first acquisition unit 302 obtains angular velocity of rotation component of the angular velocity of rotation on X-axis, Y-axis and Z axis and the Two acquiring units 303 obtain linear velocity component of the linear velocity on X-axis, Y-axis and Z axis, judging unit 304 from In each preset coordinate axle, determine that each target of angular velocity of rotation component and linear velocity component more than predetermined threshold value is preset Reference axis.

In the specific implementation, when terminal plays music in music application, user's rotation terminal, the first detection unit After the angular velocity of rotation and linear velocity of 301 detection terminals, first acquisition unit 302 obtains angular velocity of rotation in X-axis, Y Angular velocity of rotation component and second acquisition unit 303 on axle and Z axis obtain linear velocity on X-axis, Y-axis and Z axis Linear velocity component.Judging unit 304 judges whether angular velocity of rotation component and linear velocity component in X-axis surpass Predetermined threshold value is crossed, if so, then judging X-axis for target preset coordinate axle;Judging unit 304 judges the angular velocity of rotation point in Y-axis Whether amount and linear velocity component exceed predetermined threshold value, if so, then judging Y-axis for target preset coordinate axle;Judging unit 304 judge whether angular velocity of rotation component and linear velocity component on Z axis exceed predetermined threshold value, if so, then judging Z axis For target preset coordinate axle.

Comparing unit 305, for the angular velocity of rotation component of each target preset coordinate axle to be compared, obtains the anglec of rotation The maximum target preset coordinate axle of velocity component.

In some feasible embodiments, first acquisition unit 302 obtains angular velocity of rotation in X-axis, Y-axis and Z axis On angular velocity of rotation component and second acquisition unit 303 obtain rotation linear speed of the linear velocity on X-axis, Y-axis and Z axis Spend after component, judging unit 304 determines that angular velocity of rotation component and linear velocity component exceed each mesh of predetermined threshold value Preset coordinate axle is marked, the angular velocity of rotation component of each target preset coordinate axle is compared by comparing unit 305, obtains the anglec of rotation The maximum target preset coordinate axle of velocity component.

In the specific implementation, when terminal plays music in music application, user's rotation terminal, the first detection unit After the angular velocity of rotation and linear velocity of 301 detection terminals, first acquisition unit 302 obtains angular velocity of rotation in X-axis, Y Angular velocity of rotation component and second acquisition unit 303 on axle and Z axis obtain linear velocity on X-axis, Y-axis and Z axis Linear velocity component, judging unit 304 determines angular velocity of rotation component and linear velocity from each preset coordinate axle Component exceedes each target preset coordinate axle of predetermined threshold value.If it is determined that target preset coordinate axle be X-axis and Y-axis, it is relatively single Member 305 then compares angular velocity component of the angular velocity of rotation in X-axis and angular velocity of rotation component of the angular velocity of rotation in Y-axis, Obtain the maximum reference axis of angular velocity of rotation component.

Processing unit 306, for being closed from the angular speed direction of default preset coordinate axle is corresponding with music switching direction In system, obtain target music corresponding with the angular speed direction for the target preset coordinate axle that the angular velocity of rotation component is maximum and switch Direction.

In some feasible embodiments, comparing unit 305 obtains the default seat of the maximum target of angular velocity of rotation component After parameter, processing unit 306 is obtained from the corresponding relation of the angular speed direction of default preset coordinate axle and music switching direction Take target music switching direction corresponding with the angular speed direction for the target preset coordinate axle that the angular velocity of rotation component is maximum.

In the specific implementation, when terminal plays music in music application, user's rotation terminal, the first detection unit After the angular velocity of rotation and linear velocity of 301 detection terminals, first acquisition unit 302 obtains angular velocity of rotation in X-axis, Y Angular velocity of rotation component and second acquisition unit 303 on axle and Z axis obtain linear velocity on X-axis, Y-axis and Z axis Linear velocity component, judging unit 304 determines angular velocity of rotation component and linear velocity from each preset coordinate axle Component exceedes each target preset coordinate axle of predetermined threshold value.If it is determined that target preset coordinate axle be X-axis and Y-axis, it is relatively single Member 305 then compares angular velocity component of the angular velocity of rotation in X-axis and angular velocity of rotation component of the angular velocity of rotation in Y-axis, If angular velocity component of the angular velocity of rotation in X-axis is maximum, processing unit 306 is then according to the angular speed direction of X-axis and music Corresponding target music switching direction is obtained in the corresponding relation of switching direction, if the angular speed direction of X-axis is clockwise, Corresponding target music switching direction is clockwise direction, if the angular speed direction of X-axis is counterclockwise, corresponding target sound Happy switching direction is counterclockwise.

Execution unit 307, for according to the target music switching direction, the music in switching terminal music playlist.

In some feasible embodiments, processing unit 306 obtains corresponding target music switching direction, according to the mesh Music in the happy switching direction of mark with phonetic symbols, switching terminal music playlist.

In the specific implementation, when terminal plays music in music application, user's rotation terminal, the first detection unit After the angular velocity of rotation and linear velocity of 301 detection terminals, first acquisition unit 302 obtains angular velocity of rotation in X-axis, Y Angular velocity of rotation component and second acquisition unit 303 on axle and Z axis obtain linear velocity on X-axis, Y-axis and Z axis Linear velocity component, judging unit 304 determines angular velocity of rotation component and linear velocity from each preset coordinate axle Component exceedes each target preset coordinate axle of predetermined threshold value.If it is determined that target preset coordinate axle be X-axis and Y-axis, it is relatively single Member 305 then compares angular velocity component of the angular velocity of rotation in X-axis and angular velocity of rotation component of the angular velocity of rotation in Y-axis, If angular velocity component of the angular velocity of rotation in X-axis is maximum, processing unit 306 is then according to the angular speed direction of X-axis and music Corresponding target music switching direction is obtained in the corresponding relation of switching direction, if the angular speed direction of X-axis is clockwise, Corresponding target music switching direction is clockwise, the music in the switching terminal music playlist of execution unit 307 is extremely Upper one is first, if the angular speed direction of X-axis is counterclockwise, and corresponding target music switching direction is counter clockwise direction, is performed Music in the switching terminal music playlist of unit 307 to next.

In embodiments of the present invention, terminal can be examined by the 3-axis acceleration sensor and three-axis gyroscope of terminal built-in The angular velocity of rotation and linear velocity of terminal are surveyed, show that angular velocity of rotation and linear velocity exceed default threshold by comparing The maximum target preset coordinate axle of the angular velocity of rotation of value, according to the angle speed of the maximum target preset coordinate axle of the angular velocity of rotation Direction is spent with the corresponding relation of music switching direction, obtaining corresponding target music switching direction, being cut according to the target music The music changed in direction, switching terminal music playlist, the convenience of lifting music switching, improves the entertaining of user's operation Property, improve Consumer's Experience.

Referring to Fig. 4, Fig. 4 is the structural representation of another terminal disclosed in the embodiment of the present invention.Retouched in the present embodiment The terminal stated, including:

Second detection unit 401, the open command for detecting input music application.

In some feasible embodiments, the open command of the second detection unit 401 detection input music application, The open command be used for terminal open a terminal on music application, the open command can for user's manual key input, Input can also be clicked on for mouse, or user's touch-screen is inputted, the embodiment of the present invention is not limited.

Broadcast unit 402, for responding open command, opens music application, and enter the end that music is applied Music playlist is held to carry out music.

In some feasible embodiments, the open command of the second detection unit 401 detection input music application, Broadcast unit 402 responds the open command, opens music application, and enter the terminal music row that music is applied Table carries out music, and the music playlist can be local playlist, or online playlist, the present invention is real Example is applied not limit.

First detection unit 403, the rotary speed for detecting terminal, rotary speed includes angular velocity of rotation and rotation Linear velocity.

In some feasible embodiments, the scene described in the embodiment of the present invention is user in terminal music When playing music in, user's rotation terminal, the first detection unit 403 detects the rotary speed of terminal, the embodiment of the present invention Described in angular velocity of rotation of the angular velocity of rotation for terminal in rotary course around a certain axle, a certain axle is and terminal rotating The vertical a certain axle of plane, the size of angular velocity of rotation is rad/s (Radian per second), the rotation described in the embodiment of the present invention Linear velocity for terminal certain one end during terminal rotating rotational trajectory tangential direction speed, the list of linear velocity Position is m/s (metre per second (m/s)).

In the specific implementation, when terminal plays music in music application, user's rotation terminal, the first detection unit The angular velocity of rotation and linear velocity of 403 detection terminals.

First acquisition unit 404, for obtain the angular velocity of rotation each preset coordinate axle angular velocity of rotation component and In the angular speed direction of each preset coordinate axle, each preset coordinate axle includes X-axis, Y-axis and Z axis.

In some feasible embodiments, after the angular velocity of rotation of the first detection unit 403 detection terminal, first obtains Unit 404 is taken to obtain angular velocity of rotation component of the angular velocity of rotation on X-axis, Y-axis and Z axis and in X-axis, Y-axis and Z axis On angular speed direction.

In the specific implementation, when terminal plays music in music application, user's rotation terminal, the first detection unit After the angular velocity of rotation of 403 detection terminals, the angular velocity of rotation is projected respectively on X-axis, Y-axis and Z axis, first Acquiring unit 404 obtains angular velocity of rotation component of the angular velocity of rotation on X-axis, Y-axis and Z axis and in X-axis, Y-axis and Z axis On angular speed direction, wherein angular speed direction of the angular velocity of rotation in X-axis can for clockwise or counterclockwise side To.

Second acquisition unit 405, for obtaining linear velocity component of the linear velocity in each preset coordinate axle.

In some feasible embodiments, after the linear velocity of the first detection unit 403 detection terminal, second obtains Unit 405 is taken to obtain linear velocity component of the linear velocity on X-axis, Y-axis and Z axis.

In the specific implementation, when terminal plays music in music application, user's rotation terminal, the first detection unit After the linear velocity of 403 detection terminals, the linear velocity is projected respectively on X-axis, Y-axis and Z axis, second Acquiring unit 405 obtains linear velocity component of the linear velocity on X-axis, Y-axis and Z axis.

Judging unit 406, including the first judgment sub-unit 4601 and the second judgment sub-unit 4602.

First judgment sub-unit 4601, for for each preset coordinate axle in each preset coordinate axle, judging that this is preset Whether the angular velocity of rotation component of reference axis exceedes default angular velocity of rotation component threshold value.

In some feasible embodiments, the first judgment sub-unit 4601 is directed to each default in each preset coordinate axle Reference axis, judges whether the angular velocity of rotation component of the preset coordinate axle exceedes default angular velocity of rotation component threshold value.Citing comes Say, the first judgment sub-unit 4601 judges whether the angular velocity of rotation component of X-axis, Y-axis and Z axis exceedes default angular velocity of rotation point Threshold value is measured, the angular velocity of rotation component threshold value can be set to 3rad/s, 5rad/s, 8rad/s or other angular velocity of rotation components Threshold value, the embodiment of the present invention is not limited.

Second judgment sub-unit 4602, during for being when the judged result of the first judgment sub-unit 4601, judges that this is preset Whether the linear velocity component of reference axis exceedes default linear velocity component threshold value, if it exceeds default linear velocity point Threshold value is measured, it is target preset coordinate axle to determine the preset coordinate axle.

In some feasible embodiments, if the angular velocity of rotation component of the preset coordinate axle exceedes the default anglec of rotation Velocity component threshold value, the second judgment sub-unit 4602 judges whether the linear velocity component of the preset coordinate axle exceedes default rotation Turn linear velocity component threshold value, if it exceeds default linear velocity component threshold value, determines that the preset coordinate axle is sat for target is default Parameter.For example, the first judgment sub-unit 4601 judges that the angular velocity of rotation component of X-axis, Y-axis and Z axis exceedes default rotation After tarnsition velocity component threshold value, the second judgment sub-unit 4602 judges whether the linear velocity component of X-axis exceedes default rotation Linear velocity component threshold value, if exceeding, it is target preset coordinate axle to determine X-axis;Second judgment sub-unit 4602 judges the rotation of Y-axis Whether linear velocity component exceedes default linear velocity component threshold value, if exceeding, and it is target preset coordinate axle to determine Y-axis;Second Judgment sub-unit 4602 judges whether the linear velocity component of Z axis exceedes default linear velocity component threshold value, if being no more than, It is not target preset coordinate axle to determine Z axis.The linear velocity component threshold value can be set to 0.1m/s, 0.3m/s, 0.5m/s or Other linear velocity component threshold values of person, the embodiment of the present invention is not limited.

Comparing unit 407, for the angular velocity of rotation component of each target preset coordinate axle to be compared, obtains the anglec of rotation The maximum target preset coordinate axle of velocity component.

In some feasible embodiments, first acquisition unit 404 obtains angular velocity of rotation in X-axis, Y-axis and Z axis On angular velocity of rotation component and second acquisition unit 405 obtain rotation linear speed of the linear velocity on X-axis, Y-axis and Z axis Spend after component, judging unit 406 determines that angular velocity of rotation component and linear velocity component exceed each mesh of predetermined threshold value Preset coordinate axle is marked, the angular velocity of rotation component of each target preset coordinate axle is compared by comparing unit 407, obtains the anglec of rotation The maximum target preset coordinate axle of velocity component.

In the specific implementation, when terminal plays music in music application, user's rotation terminal, the first detection unit After the angular velocity of rotation and linear velocity of 403 detection terminals, first acquisition unit 404 obtains angular velocity of rotation in X-axis, Y Angular velocity of rotation component and second acquisition unit 405 on axle and Z axis obtain linear velocity on X-axis, Y-axis and Z axis Linear velocity component, judging unit 406 determines angular velocity of rotation component and linear velocity from each preset coordinate axle Component exceedes each target preset coordinate axle of predetermined threshold value.If it is determined that target preset coordinate axle be X-axis and Y-axis, it is relatively single Member 407 then compares angular velocity component of the angular velocity of rotation in X-axis and angular velocity of rotation component of the angular velocity of rotation in Y-axis, Obtain the maximum reference axis of angular velocity of rotation component.

Processing unit 408, for being closed from the angular speed direction of default preset coordinate axle is corresponding with music switching direction In system, obtain target music corresponding with the angular speed direction for the target preset coordinate axle that the angular velocity of rotation component is maximum and switch Direction.

In some feasible embodiments, comparing unit 407 obtains the default seat of the maximum target of angular velocity of rotation component After parameter, processing unit 408 is obtained from the corresponding relation of the angular speed direction of default preset coordinate axle and music switching direction Take target music switching direction corresponding with the angular speed direction for the target preset coordinate axle that the angular velocity of rotation component is maximum.

In the specific implementation, when terminal plays music in music application, user's rotation terminal, the first detection unit After the angular velocity of rotation and linear velocity of 403 detection terminals, first acquisition unit 404 obtains angular velocity of rotation in X-axis, Y Angular velocity of rotation component and second acquisition unit 405 on axle and Z axis obtain linear velocity on X-axis, Y-axis and Z axis Linear velocity component, judging unit 406 determines angular velocity of rotation component and linear velocity from each preset coordinate axle Component exceedes each target preset coordinate axle of predetermined threshold value.If it is determined that target preset coordinate axle be X-axis and Y-axis, it is relatively single Member 407 then compares angular velocity component of the angular velocity of rotation in X-axis and angular velocity of rotation component of the angular velocity of rotation in Y-axis, If angular velocity component of the angular velocity of rotation in X-axis is maximum, processing unit 408 is then according to the angular speed direction of X-axis and music Corresponding target music switching direction is obtained in the corresponding relation of switching direction, if the angular speed direction of X-axis is clockwise, Corresponding target music switching direction is clockwise direction, if the angular speed direction of X-axis is counterclockwise, corresponding target sound Happy switching direction is counterclockwise.

Execution unit 409, for according to the target music switching direction, the music in switching terminal music playlist.

In some feasible embodiments, processing unit 408 obtains corresponding target music switching direction, according to the mesh Music in the happy switching direction of mark with phonetic symbols, switching terminal music playlist.

In the specific implementation, when terminal plays music in music application, user's rotation terminal, the first detection unit After the angular velocity of rotation and linear velocity of 403 detection terminals, first acquisition unit 404 obtains angular velocity of rotation in X-axis, Y Angular velocity of rotation component and second acquisition unit 405 on axle and Z axis obtain linear velocity on X-axis, Y-axis and Z axis Linear velocity component, judging unit 406 determines angular velocity of rotation component and linear velocity from each preset coordinate axle Component exceedes each target preset coordinate axle of predetermined threshold value.If it is determined that target preset coordinate axle be X-axis and Y-axis, it is relatively single Member 407 then compares angular velocity component of the angular velocity of rotation in X-axis and angular velocity of rotation component of the angular velocity of rotation in Y-axis, If angular velocity component of the angular velocity of rotation in X-axis is maximum, processing unit 408 is then according to the angular speed direction of X-axis and music Corresponding target music switching direction is obtained in the corresponding relation of switching direction, if the angular speed direction of X-axis is clockwise, Corresponding target music switching direction is clockwise, the music in the switching terminal music playlist of execution unit 409 is extremely Upper one is first, if the angular speed direction of X-axis is counterclockwise, and corresponding target music switching direction is counter clockwise direction, is performed Music in the switching terminal music playlist of unit 409 to next.

In embodiments of the present invention, terminal can detect that the unlatching of input music application refers to, and respond the open command, Music application is opened, and enters the terminal music playlist progress music that music is applied, terminal can lead to The 3-axis acceleration sensor and three-axis gyroscope for crossing terminal built-in detect the angular velocity of rotation and linear velocity of terminal, pass through Compare the target preset coordinate axle for drawing the angular velocity of rotation maximum that angular velocity of rotation and linear velocity exceed predetermined threshold value, According to the maximum angular speed direction of target preset coordinate axle of the angular velocity of rotation with the corresponding relation of music switching direction, obtaining Corresponding target music switching direction is taken, according to the target music switching direction, the music in switching terminal music playlist, The convenience of music switching is lifted, the interest of user's operation is improved, improves Consumer's Experience.

One of ordinary skill in the art will appreciate that all or part of step in the various methods of above-described embodiment is can To instruct the hardware of correlation to complete by program, the program can be stored in a computer-readable recording medium, storage Medium can include:Flash disk, read-only storage (Read-Only Memory, ROM), random access device (Random Access Memory, RAM), disk or CD etc..

A kind of method and terminal for realizing music switching provided above the embodiment of the present invention is described in detail, Specific case used herein is set forth to the principle and embodiment of the present invention, and the explanation of above example is to use Understand the method and its core concept of the present invention in help;Simultaneously for those of ordinary skill in the art, according to the present invention's Thought, will change in specific embodiments and applications, in summary, and this specification content should not be construed as Limitation of the present invention.

Claims (10)

1. a kind of method for realizing music switching, it is characterised in that including:
When terminal is in and goes out screen state or holding state, pass through the 3-axis acceleration sensor and three axle tops of the terminal built-in Spiral shell instrument detects the rotary speed of the terminal, and the rotary speed includes angular velocity of rotation and linear velocity;
The angular velocity of rotation is obtained at the angular velocity of rotation component of each preset coordinate axle and the angle in each preset coordinate axle Velocity attitude, each preset coordinate axle includes X-axis, Y-axis and Z axis;
Obtain linear velocity component of the linear velocity in each preset coordinate axle;
From each preset coordinate axle, determine angular velocity of rotation component and linear velocity component more than predetermined threshold value Each target preset coordinate axle;
The angular velocity of rotation component of each target preset coordinate axle is compared, the maximum mesh of angular velocity of rotation component is obtained Mark preset coordinate axle;
From the corresponding relation of the angular speed direction of default preset coordinate axle and music switching direction, obtain and the anglec of rotation The corresponding target music switching direction in angular speed direction of the maximum target preset coordinate axle of velocity component;
According to the target music switching direction, the music in switching terminal music playlist.
2. according to the method described in claim 1, it is characterised in that described from each preset coordinate axle, determine rotation Angular velocity component and linear velocity component include more than each target preset coordinate axle of predetermined threshold value:
For each preset coordinate axle in each preset coordinate axle, judging the angular velocity of rotation component of the preset coordinate axle is It is no to exceed default angular velocity of rotation component threshold value;If it exceeds default angular velocity of rotation component threshold value, judges the preset coordinate axle Linear velocity component whether exceed default linear velocity component threshold value, if it exceeds default linear velocity component threshold Value, it is target preset coordinate axle to determine the preset coordinate axle.
3. the method according to claim any one of 1-2, it is characterised in that described to be added by three axles of the terminal built-in Velocity sensor and three-axis gyroscope detect before the rotary speed of the terminal that methods described also includes:
The open command of detection input music application;
The open command is responded, the music application is opened, and enters the terminal music of music application and broadcast Emplace table and carry out music.
4. method according to claim 3, it is characterised in that the target music switching direction is clockwise or inverse Clockwise.
5. method according to claim 4, it is characterised in that described according to the target music switching direction, switching is eventually Music in the music playlist of end includes:
If the target music switching direction is clockwise, the music switched in the terminal music playlist is supreme One is first;
If the target music switching direction is counter clockwise direction, switch the music in the terminal music playlist under One is first.
6. a kind of terminal, it is characterised in that including:
First detection unit, for when terminal is in and goes out screen state or holding state, being added by three axles of the terminal built-in Velocity sensor and three-axis gyroscope detect the rotary speed of the terminal, and the rotary speed includes angular velocity of rotation and rotation Linear velocity;
First acquisition unit, for obtaining the angular velocity of rotation in the angular velocity of rotation component of each preset coordinate axle and described The angular speed direction of each preset coordinate axle, each preset coordinate axle includes X-axis, Y-axis and Z axis;
Second acquisition unit, for obtaining linear velocity component of the linear velocity in each preset coordinate axle;
Judging unit, for from each preset coordinate axle, determining that angular velocity of rotation component and linear velocity component are equal More than each target preset coordinate axle of predetermined threshold value;
Comparing unit, for the angular velocity of rotation component of each target preset coordinate axle to be compared, obtains anglec of rotation speed Spend the maximum target preset coordinate axle of component;
Processing unit, for from the corresponding relation in the angular speed direction of default preset coordinate axle and music switching direction, obtaining Take target music switching direction corresponding with the angular speed direction for the target preset coordinate axle that the angular velocity of rotation component is maximum;
Execution unit, for according to the target music switching direction, the music in switching terminal music playlist.
7. terminal according to claim 6, it is characterised in that the judging unit includes:
First judgment sub-unit, for for each preset coordinate axle in each preset coordinate axle, judging the preset coordinate Whether the angular velocity of rotation component of axle exceedes default angular velocity of rotation component threshold value;
Second judgment sub-unit, during for being when the first judgment sub-unit judged result, judges the preset coordinate axle Whether linear velocity component exceedes default linear velocity component threshold value, if it exceeds default linear velocity component threshold value, It is target preset coordinate axle to determine the preset coordinate axle.
8. the terminal according to claim any one of 6-7, it is characterised in that the terminal also includes:
Second detection unit, the open command for detecting input music application;
Broadcast unit, for responding the open command, opens the music application, and enter the music application Terminal music playlist carry out music.
9. terminal according to claim 8, it is characterised in that the target music switching direction is clockwise or inverse Clockwise.
10. terminal according to claim 9, it is characterised in that the execution unit is used for when target music switching When direction is clockwise direction, then the music supreme one switched in the terminal music playlist is first;Or, for when described When target music switching direction is counter clockwise direction, then switch music in the terminal music playlist to next.
CN201410712584.5A 2014-11-28 2014-11-28 A kind of method and terminal for realizing music switching CN104460997B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410712584.5A CN104460997B (en) 2014-11-28 2014-11-28 A kind of method and terminal for realizing music switching

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410712584.5A CN104460997B (en) 2014-11-28 2014-11-28 A kind of method and terminal for realizing music switching

Publications (2)

Publication Number Publication Date
CN104460997A CN104460997A (en) 2015-03-25
CN104460997B true CN104460997B (en) 2017-08-08

Family

ID=52907189

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410712584.5A CN104460997B (en) 2014-11-28 2014-11-28 A kind of method and terminal for realizing music switching

Country Status (1)

Country Link
CN (1) CN104460997B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105159658A (en) * 2015-06-30 2015-12-16 青岛海信移动通信技术股份有限公司 Signal processing method of intelligent terminal and signal processing device of intelligent terminal
CN105092891B (en) * 2015-09-01 2019-10-01 深圳Tcl数字技术有限公司 Terminal gets rid of screen recognition methods and device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101620474A (en) * 2008-07-04 2010-01-06 华硕电脑股份有限公司 Motion-sensing input device of computer system
CN103472993A (en) * 2013-09-02 2013-12-25 小米科技有限责任公司 Rotation displaying method, device and terminal equipment

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010218260A (en) * 2009-03-17 2010-09-30 Sony Corp Input device, control device, control system, and control method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101620474A (en) * 2008-07-04 2010-01-06 华硕电脑股份有限公司 Motion-sensing input device of computer system
CN103472993A (en) * 2013-09-02 2013-12-25 小米科技有限责任公司 Rotation displaying method, device and terminal equipment

Also Published As

Publication number Publication date
CN104460997A (en) 2015-03-25

Similar Documents

Publication Publication Date Title
JP4777458B2 (en) Method and system for interfacing a digital device with an interactive display surface
US20140306915A1 (en) Information processing apparatus, program, and control method
KR101735902B1 (en) User interface interaction method and apparatus applied in touchscreen device, touchscreen device, program and storage medium
CN104020936B (en) A kind of terminal and its control method
CN102662474B (en) The method of control terminal, device and terminal
US20120229406A1 (en) Method and Device for Identifying and Unlocking with Contact Surface Model
EP2385700A2 (en) Mobile terminal and operating method thereof
KR20140062895A (en) Wearable device for conrolling an external device and method thereof
KR20080093808A (en) Portable electronic apparatus for operating mode converting
TWI475468B (en) Portable devices, data transmission systems and display sharing methods thereof
KR20140112418A (en) Method and devices for displaying graphical user interfaces based on user contact
EP1890223A2 (en) Device and method for scrolling through list in portable terminal with touch pad
US9600139B2 (en) Electronic device and method for implementing user interfaces associated with touch screens
CN108052264A (en) For moving and placing the equipment of user interface object, method and graphic user interface
WO2014047247A1 (en) Augmented touch control for hand-held devices
US20120032877A1 (en) Motion Driven Gestures For Customization In Augmented Reality Applications
US20120036485A1 (en) Motion Driven User Interface
KR20140030671A (en) Unlocking method of mobile terminal and the mobile terminal
JP2014110049A (en) Portable equipment and its voice output method
TW201250251A (en) Motion-based device operations
KR20140125078A (en) Electronic device and method for unlocking in the electronic device
CN101882046A (en) Touch screen unlocking method and system thereof and touch screen device
JP5790238B2 (en) Information processing apparatus, information processing method, and program
TW200813795A (en) Method, apparatus, and computer program product for entry of data or commands based on tap detection
CN101968693A (en) Navigation apparatus operation method, navigation apparatus and computer program product

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant