Disclosure of Invention
In order to solve the problems that the operation steps are complicated under certain conditions, the whole process takes too long, and the service life of the touch screen is greatly shortened, the embodiment of the invention provides a content selection method, a content selection system and a mobile terminal. The technical scheme is as follows:
according to an aspect of the present invention, there is provided a content selection method, the method including:
taking one storage position in a storage structure as an initial position, wherein the storage structure is a matrix structure, the matrix structure comprises at least four storage positions which are arranged from left to right along a row direction and from top to bottom along a column direction, and one content data is stored in one storage position;
detecting whether the inclination angle of the terminal in the preset direction is greater than a preset threshold value;
if the inclination angle of the terminal in the preset direction is larger than a preset threshold value, starting from the initial position, and selecting other storage positions in the storage structure in a hop-by-hop manner along the direction corresponding to the preset direction according to a preset speed;
and acquiring the content data in the storage position selected at the current moment.
Preferably, the preset directions include a first direction, a second direction opposite to the first direction, a third direction perpendicular to the first direction, and a fourth direction opposite to the third direction;
if the inclination angle of the terminal in the preset direction is larger than the preset threshold value, starting from the initial position and moving in the storage structure along the direction corresponding to the preset direction at the preset speed to select other storage positions, including:
if the inclination angle of the terminal in the first direction is larger than a preset threshold value, starting from the initial position, and selecting other storage positions in a left-to-right direction in the matrix structure in a hop-by-hop manner according to a preset speed;
if the inclination angle of the terminal in the second direction is larger than the preset threshold value, starting from the initial position, and selecting other storage positions in the matrix structure from the right to the left in a hop-by-hop manner according to a preset speed;
if the inclination angle of the terminal in the third direction is larger than the preset threshold value, starting from the initial position, and selecting other storage positions in a jump-by-jump manner along the direction from top to bottom in the matrix structure according to a preset speed;
and if the inclination angle of the terminal in the fourth direction is larger than the preset threshold value, starting from the initial position, and selecting other storage positions in the matrix structure from bottom to top in a hop-by-hop manner according to a preset speed.
Preferably, if it is detected that the inclination angle of the terminal in the preset direction is greater than the predetermined threshold, moving from the initial position in the storage structure in the direction corresponding to the preset direction at a preset speed to select another storage position includes:
if the inclination angles of the terminal in the first direction and the third direction are detected to be larger than a preset threshold value, and the inclination angle in the first direction is larger than the inclination angle in the third direction, starting from the initial position, and selecting other storage positions in a left-to-right direction in the matrix structure in a hop-by-hop manner according to a preset speed;
if the terminal is detected to have the inclination angles in the first direction and the third direction larger than the preset threshold value and the inclination angle in the third direction is larger than the inclination angle in the first direction, starting from the initial position, and selecting other storage positions in a jump-by-jump manner along the direction from top to bottom in the matrix structure according to a preset speed;
if the terminal is detected to have the inclination angles in the second direction and the fourth direction larger than the preset threshold value and the inclination angle in the second direction is larger than the inclination angle in the fourth direction, starting from the initial position, and selecting other storage positions in the matrix structure from the right to the left in a hop-by-hop manner according to a preset speed;
and if the fact that the inclination angles of the terminal in the second direction and the fourth direction are larger than the preset threshold value and the inclination angle in the fourth direction is larger than the inclination angle in the second direction is detected, starting from the initial position, and selecting other storage positions in the matrix structure from bottom to top in a hop-by-hop mode according to a preset speed.
Preferably, after the obtaining the content data in the storage location selected at the current time, the method further includes:
and displaying the related information of the acquired content data on a screen, wherein the related information comprises one or a combination of more of introduction information, page numbers, thumbnails, preview pictures, names or icons.
Preferably, after the content data in the storage location selected at the current time is acquired, the method further includes
Receiving a selection stopping signal, wherein the selection stopping signal comprises one or a combination of several of a signal that the inclination angle of the terminal in other directions than the preset direction is larger than a preset threshold value, a signal that the inclination angle of the terminal in the preset direction is smaller than the preset threshold value, a signal for clicking a touch screen, a voice control signal, a gesture signal and a signal for pressing a physical key;
and after receiving the selection stop signal, executing or displaying the acquired content data, wherein the acquired content data is any one of an application program, a text, a picture, a video, an audio and a storage structure.
Preferably, the preset speed is in positive correlation with the size of the inclination angle in the preset direction.
Preferably, the taking one storage position in the storage structure as an initial position includes:
taking a preset storage position in the storage structure as an initial position, wherein the preset storage position comprises any one of a first storage position, a last storage position and a middle storage position; or,
and taking the storage position corresponding to the content data currently displayed on the screen of the terminal in the storage structure as an initial position.
According to another aspect of the present invention, there is provided a content selection apparatus, the apparatus including:
the device comprises an initial determining module, a storage module and a processing module, wherein the initial determining module is used for taking one storage position in a storage structure as an initial position, the storage structure is a matrix structure, the matrix structure comprises at least four storage positions which are arranged from left to right along a row direction and from top to bottom along a column direction, and one content data is stored in one storage position;
the angle detection module is used for detecting whether the inclination angle of the terminal in the preset direction is greater than a preset threshold value;
the position switching module is used for selecting other storage positions in the storage structure in a hop-by-hop manner from the initial position determined by the initial determining module along the direction corresponding to the preset direction at a preset speed if the angle detecting module detects that the inclination angle of the terminal in the preset direction is greater than a preset threshold value;
and the data selection module is used for acquiring the content data in the storage position selected by the position switching module at the current moment.
Preferably, the preset directions include a first direction, a second direction opposite to the first direction, a third direction perpendicular to the first direction, and a fourth direction opposite to the third direction;
the position switching module includes: the device comprises a right-direction switching unit, a left-direction switching unit, an upward switching unit and a downward switching unit;
the right-direction switching unit is configured to, if the angle detection module detects that the inclination angle of the terminal in the first direction is greater than a predetermined threshold, select other storage locations from the initial location determined by the initial determination module in a hop-by-hop manner along the direction from left to right in the matrix structure at a preset speed;
the left-hand switching unit is configured to, if the angle detection module detects that the inclination angle of the terminal in the second direction is greater than a predetermined threshold, gradually jump from the initial position determined by the initial determination module to another storage position along the matrix structure from right to left at a preset speed;
the upward switching unit is used for selecting other storage positions from the initial position determined by the initial determining module in a jump-by-jump manner along the direction from top to bottom in the matrix structure according to a preset speed if the angle detecting module detects that the inclination angle of the terminal in the third direction is greater than a preset threshold value;
the downward switching unit is configured to, if the angle detection module detects that the inclination angle of the terminal in the fourth direction is greater than the predetermined threshold, select other storage locations from the initial location determined by the initial determination module in a hop-by-hop manner along a direction from bottom to top in the matrix structure according to a preset speed.
Preferably, the right switching unit is further configured to, if the angle detection module detects that the tilt angles of the terminal in the first direction and the third direction are both greater than a predetermined threshold, and the tilt angle in the first direction is greater than the tilt angle in the third direction, jump-by-jump along the matrix structure from left to right in the matrix structure at a preset speed from the initial position determined by the initial determination module, and select another storage position;
the downward switching unit is further configured to, if the angle detection module detects that the inclination angles of the terminal in the first direction and the third direction are both greater than a predetermined threshold value, and the inclination angle in the third direction is greater than the inclination angle in the first direction, jump-by-jump from the initial position determined by the initial determination module along the direction from top to bottom in the matrix structure at a preset speed, and select other storage positions;
the left switching unit is further configured to, if the angle detection module detects that the tilt angles of the terminal in the second direction and the fourth direction are both greater than a predetermined threshold, and the tilt angle in the second direction is greater than the tilt angle in the fourth direction, jump-select other storage locations from the initial location determined by the initial determination module in the matrix structure from right to left according to a preset speed;
the upward switching unit is further configured to, if the angle detection module detects that the tilt angles of the terminal in the second direction and the fourth direction are both greater than the predetermined threshold, and the tilt angle in the fourth direction is greater than the tilt angle in the second direction, jump from the initial position determined by the initial determination module to another storage position along the direction from bottom to top in the matrix structure at a preset speed.
Preferably, the content selection apparatus further includes: an information display module;
the information display module is used for displaying the related information of the content data acquired by the data selection module on a screen, wherein the related information comprises one or a combination of more of introduction information, page numbers, thumbnails, preview pictures, names or icons.
Preferably, the content selection apparatus further includes: the device comprises a signal receiving module and a content processing module;
the signal receiving module is used for receiving a selection stopping signal, wherein the selection stopping signal comprises one or a combination of several of a signal that the inclination angle of the terminal in other directions, which are not the preset direction, is larger than a preset threshold value, a signal that the inclination angle of the terminal in the preset direction is smaller than the preset threshold value, a signal of clicking a touch screen, a voice control signal, a gesture signal and a signal of pressing a physical key;
the content processing module is configured to execute or display the content data acquired by the data selection module after the signal receiving module receives the selection stop signal, where the acquired content data is any one of an application program, a text, a picture, a video, an audio, and a storage structure.
Preferably, the preset speed at which the position switching module is operated is in positive correlation with the size of the inclination angle in the preset direction detected by the angle detection module.
Preferably, the taking one storage position in the storage structure as an initial position includes:
taking a preset storage position in the storage structure as an initial position, wherein the preset storage position comprises any one of a first storage position, a last storage position and a middle storage position; or,
and taking the storage position corresponding to the content data currently displayed on the screen of the terminal in the storage structure as an initial position.
According to still another aspect of the present invention, there is provided a mobile terminal including the content selection apparatus as described above.
The technical scheme provided by the embodiment of the invention has the following beneficial effects:
when the inclination angle of the terminal in the preset direction is larger than a preset threshold value, starting to select other storage positions from the initial position of the storage structure in a direction corresponding to the preset direction according to a preset speed, and acquiring content data in the storage position selected at the current moment; the problems that the operation steps are complicated, the whole process takes too long time, and the service life of the touch screen can be greatly shortened are solved; the content switching process can be completed only by tilting the mobile terminal, and the service life of the touch screen is prolonged.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail with reference to the accompanying drawings.
The embodiment of the invention can be applied to a mobile terminal containing sensors such as a gravity acceleration sensor and a three-axis gyroscope, and the mobile terminal can be a mobile phone, a tablet computer, an electronic reader, a Personal Digital Assistant (PDA), a Point of Sales (POS), a vehicle-mounted computer and other terminal devices.
In the mobile terminal including the sensor, the terminal coordinate system may be established by: setting a display interface of a mobile terminal as an xy plane, wherein the gravity center of the mobile terminal is a coordinate origin, a positive half shaft pointing to the right of the mobile terminal is an x-axis, a coordinate axis perpendicular to the x-axis on the plane of the mobile terminal is a y-axis, a positive half shaft pointing to the upper side of the mobile terminal is a y-axis, a coordinate axis perpendicular to the display interface of the mobile terminal is a z-axis, and a positive half shaft pointing to the front of the mobile terminal is a z-axis, and please refer to fig. 1 for details, wherein fig. 1 is a terminal coordinate system establishment mode generally adopted by a mobile terminal with a vertical reading direction, such as a mobile phone; similarly, fig. 2 shows a terminal coordinate system establishment method commonly adopted by a mobile terminal such as a tablet computer with a transverse reading direction.
In the mobile terminal comprising the sensor, the inclination angle of the mobile terminal in each direction can be acquired through data collected by the sensor. Taking a sensor as a gravity acceleration sensor as an example, the application program calculates the inclination angle of the mobile terminal on each coordinate axis according to the three-dimensional vector acquired by the gravity acceleration sensor. Specifically, the application program may acquire a three-dimensional vector (x, y, z) at predetermined time intervals, where all values of x, y, z are [ -1, 1 ]. In the embodiment of the present invention, values of x and y are only illustrated by considering values of x and y to respectively represent tilt angles when the mobile terminal tilts left and right and up and down, the larger the values of x and y are, the larger the tilt angle is, and the positive and negative of x and y represent orientations of the tilt angle, for example:
x is greater than 0, and represents that the mobile terminal tilts rightwards; x is less than 0, and the mobile terminal is characterized to tilt to the left;
y is greater than 0, and represents that the mobile terminal inclines upwards; y <0, representing the downward tilt of the mobile terminal.
Referring to fig. 3, a flowchart of a method for selecting content according to an embodiment of the invention is shown. The present embodiment is mainly illustrated by applying the content selection method to a mobile terminal including a sensor such as a gravitational acceleration sensor and/or a three-axis gyroscope. The content selection method comprises the following steps:
step 302, taking a storage position in a storage structure as an initial position, wherein the storage structure comprises at least two storage positions arranged in sequence, and one content data is stored in one storage position;
the storage structure can be a linear structure, and the linear structure comprises at least two storage positions which are arranged from front to back; the memory structure may also be a matrix structure, and the matrix structure includes at least four memory locations arranged from left to right along a row direction and from top to bottom along a column direction.
A content data is stored in a storage location. The content data may be any one of an application, text, picture, video, and audio. It should be noted that the content data may also be a storage structure, that is, the content data stored in a storage location in the current storage structure may also be a storage structure, for example, the content data stored in a storage location in the first row and the first column of a matrix structure is another matrix structure.
Step 304, detecting whether the inclination angle of the terminal in the preset direction is greater than a preset threshold value;
the inclination angle of the terminal in the preset direction can be acquired by a sensor in the terminal. The preset direction may be one or more of the positive x-axis direction, the negative x-axis direction, the positive y-axis direction, and the negative y-axis direction in the terminal coordinate system. The sensor in the terminal can be any one of a gravity acceleration sensor and a three-axis gyroscope or a combination of the two.
Step 306, if the inclination angle of the terminal in the preset direction is detected to be larger than a preset threshold value, starting from the initial position, and selecting other storage positions in the storage structure in a hop-by-hop manner along the direction corresponding to the preset direction according to a preset speed;
the preset speed may be a constant speed, such as jumping to the next storage location every half second; the speed of change may also be, for example, the preset speed is proportional to the magnitude of the inclination angle, and the larger the inclination angle is, the larger the preset speed is. When the storage structure is a linear structure, the direction corresponding to the preset direction may be a front-to-rear direction or a rear-to-front direction of the linear structure; when the storage structure is a matrix structure, the direction corresponding to the preset direction may be a left-to-right direction, a right-to-left direction, a top-to-bottom direction, and a bottom-to-top direction of the matrix structure along the row direction. The hop-by-hop selection refers to a selection process of hopping from the current storage position to the next storage position according to a preset speed and a direction corresponding to a preset direction.
And 308, acquiring the content data in the storage position selected at the current moment.
In summary, in the content selection method provided in this embodiment, when it is detected that the inclination angle of the terminal in the preset direction is greater than the predetermined threshold, other storage locations are selected from the initial location of the storage structure in a direction corresponding to the preset direction at a preset speed, and content data in the selected storage location at the current time is acquired; the problems that the operation steps are complicated, the whole process takes too long time, and the service life of the touch screen can be greatly shortened are solved; the content switching process can be completed only by tilting the mobile terminal, and the service life of the touch screen is prolonged.
For a more detailed description of the embodiment when the memory structure is a linear structure, reference is made to the following embodiments:
please refer to fig. 4, which shows a flowchart of a content selecting method according to another embodiment of the present embodiment. The present embodiment is mainly illustrated by applying the content selection method to a mobile terminal including a sensor such as a gravitational acceleration sensor and/or a three-axis gyroscope. As a more preferable embodiment provided based on the embodiment shown in fig. 3, the content selection method includes:
step 402, taking a storage position in a storage structure as an initial position, wherein the storage structure comprises at least two storage positions arranged in sequence, and one content data is stored in one storage position;
the storage structure may be a linear structure including at least two storage locations arranged from front to back, and one content data is stored in one storage location. The content data may be any one of an application, text, picture, video, audio, and storage structure. Assuming that the content data is pictures, and 100 pictures are stored in the mobile terminal, the linear structure may be an array or a linked list including 100 storage locations, and each picture is stored in one storage location.
In an initial situation, the mobile terminal may use a preset storage location in the linear structure as an initial location, where the preset storage location includes any one of a first storage location, a last storage location, and an intermediate storage location, for example, a first storage location corresponding to a first picture in the linear structure is used as the initial location; the mobile terminal may also use a storage location corresponding to the content data currently being displayed on the screen of the terminal in the linear structure as the initial location, for example, if the 34 th picture is being displayed on the screen of the mobile terminal at the current time, the 34 th storage location in the linear structure is used as the initial location.
Step 404, detecting whether the inclination angle of the terminal in the preset direction is larger than a preset threshold value;
the preset direction may include a first direction and/or a second direction opposite to the first direction. When the linear structure is displayed in the mobile terminal in an up-down switching manner, the first direction may be a positive y-axis direction in a terminal coordinate system, and the second direction may be a negative y-axis direction in the terminal coordinate system; when the linear structure is left-right switching display in the mobile terminal, the first direction may be a positive x-axis direction in a terminal coordinate system, and the second direction may be a negative x-axis direction in the terminal coordinate system.
The inclination angle of the terminal in the preset direction may be collected by a sensor in the terminal. The sensor comprises one or two of a gravity acceleration sensor and a three-axis gyroscope. The present embodiment mainly takes the sensor including the gravity acceleration sensor as an example for illustration. The gravity acceleration sensor can acquire the inclination angles of the mobile terminal in the directions of the x axis and the y axis according to a fixed acquisition frequency, so that three-dimensional vectors (x, y, z) representing the inclination angles of the mobile terminal are obtained and reported to a driving layer of the mobile terminal. The application in the mobile terminal may then retrieve the three-dimensional vector from the driver layer. Taking an operating system operated by the mobile terminal as Windows Phone as an example, an Application Programming Interface (API) of the Windows Phone operating system provides an Accelerometer class, an application in the mobile terminal directly uses the Accelerometer class, and obtains data Accelerometer reading events from an event reading changed of the type, where the data Accelerometer reading events include values of the three-dimensional vector.
The triaxial gyroscope and the gravity acceleration sensor have similar functions, and specific details are not repeated. The three-axis gyroscope has larger accumulated error and temperature drift in a longer time, but the measurement is accurate in a short time, particularly aiming at the rotation action of the terminal. The gravity acceleration sensor has more accurate measurement value in a longer time, but has larger error in a shorter time due to the existence of signal noise. Preferably, in this step, data acquired by the gravity acceleration sensor and the three-axis gyroscope may be fused, so as to obtain a more accurate tilt angle value of the mobile terminal when the posture changes. For example, the data respectively acquired by the gravity acceleration sensor and the triaxial gyroscope are weighted and averaged, so that a more accurate tilt angle value is acquired.
It should be noted that the predetermined thresholds corresponding to the first direction and the second direction are usually the same, but different predetermined thresholds may be set for the first direction and the second direction, respectively.
It should be noted that, in this step, whether the inclination angle of the terminal in the preset direction is greater than the predetermined threshold may be detected more than once, that is, may be detected once at predetermined time intervals.
Step 406, if it is detected that the inclination angle of the terminal in the preset direction is greater than a preset threshold, selecting other storage positions in the storage structure hop by hop from the initial position along the direction corresponding to the preset direction at a preset speed;
and if the mobile terminal detects that the inclination angle of the mobile terminal in the preset direction is larger than a preset threshold value, starting from the initial position, and selecting other storage positions in the storage structure hop by hop along the direction corresponding to the preset direction according to a preset speed. The hop-by-hop selection refers to a selection process of hopping from the current storage position to the next storage position according to a preset speed and a direction corresponding to a preset direction. Specifically, the method comprises the following steps:
and if the inclination angle of the terminal in the first direction is larger than the preset threshold value, starting from the initial position, and selecting other storage positions in the linear structure from the front direction to the back direction in a hop-by-hop manner according to the preset speed. Taking the initial position as the 50 th storage position in the linear structure comprising 100 storage positions, and the left-right switching display of the linear structure in the mobile terminal as an example, if it is detected that the inclination angle of the terminal in the positive direction of the x axis is greater than the predetermined threshold, selecting other storage positions from the 50 th storage position in a forward-backward direction at a speed of once jumping every half second, that is, after half second of the start of the hop-by-hop selection, selecting the 51 th storage position; after one second of hop-by-hop selection, the 52 th storage location is selected, and so on, and the description is omitted.
And if the inclination angle of the terminal in the second direction is larger than the preset threshold value, starting from the initial position, and selecting other storage positions in the linear structure from the back to the front in a hop-by-hop manner according to the preset speed. Taking the initial position as the 50 th storage position in the linear structure comprising 100 storage positions, and the left-right switching display of the linear structure in the mobile terminal as an example, if it is detected that the inclination angle of the terminal in the negative direction of the x axis is greater than the predetermined threshold, selecting other storage positions from the 50 th storage position in a forward direction at a speed of one jump every half second, that is, after half second of the start of the jump-by-jump selection, selecting the 49 th storage position; after one second of hop-by-hop selection, the 48 th storage location is selected, and so on, and the description is omitted.
Preferably, the preset speed is in positive correlation with the size of the inclination angle in the preset direction, that is, the larger the inclination angle is, the larger the preset speed is. Therefore, when a user needs to switch content data with large span, the inclination angle can be larger, and a faster preset speed can be obtained, such as 10 jumps per second and 30 jumps per second; when the user switches the content data with a small span or approaches the target content data, the inclination angle can be made smaller, and a relatively slow preset speed, such as one jump per second, can be obtained.
Step 408, acquiring content data in the storage position selected at the current moment;
since the selected storage location is different at each time after the start of the hop-by-hop selection, the mobile terminal always acquires the content data in the storage location selected at the current time. For example, when the current time is 3 seconds after the start of the hop-by-hop selection, the 56 th storage location is selected, and the mobile terminal acquires the 56 th picture.
Step 410, displaying the related information of the acquired content data on a screen, wherein the related information comprises one or a combination of more of introduction information, page numbers, thumbnails, preview pictures, names or icons;
in the process of hop-by-hop selection, the mobile terminal may display the related information of the acquired content data on the screen, where the related information includes one or a combination of several of introduction information, page numbers, thumbnails, preview images, names, or icons. For example, in the hop-by-hop selection process, the mobile terminal may display the preview images and the names of the acquired content data on the screen, and if the preset speed is to hop every half second, the user may observe that two preview images are switched every second on the screen of the mobile terminal in the hop-by-hop selection process.
Step 412, receiving a selection stop signal, where the selection stop signal includes a signal that an inclination angle of the terminal in other directions other than the preset direction is greater than a predetermined threshold;
in the hop-by-hop selection process, when the user selects the target content data, a selection stop signal may be sent to the mobile terminal, where the selection stop signal may be a signal that an inclination angle of the terminal in another direction other than the preset direction is greater than a predetermined threshold, for example, the preset direction is a positive direction and a negative direction of an x axis of the mobile terminal, and when an inclination angle of the mobile terminal in the positive direction or the negative direction of the y axis is greater than the predetermined threshold, the user may be considered to have sent the selection stop signal. The mobile terminal may receive a selection stop signal sent by the user.
Of course, the selection stop signal may also be one or a combination of several of a signal that an inclination angle of the terminal in the preset direction is smaller than a predetermined threshold, a signal of clicking a touch screen, a voice control signal, a gesture signal, and a signal of pressing a physical key.
In step 414, after receiving the selection stop signal, the acquired content data is executed or displayed.
And after receiving the selection stop signal, the mobile terminal executes or displays the acquired content data. Specifically, when the acquired content data is an application, the mobile terminal executes the content data; and when the acquired content data is any one of text, picture, video, audio and storage structure, the mobile terminal displays the content data.
So far, the whole switching process of the content data is finished.
In summary, in the content selection method provided in this embodiment, when it is detected that the inclination angle of the terminal in the preset direction is greater than the predetermined threshold, other storage locations are selected from the initial location of the storage structure in a direction corresponding to the preset direction at a preset speed, and content data in the selected storage location at the current time is acquired; the problems that the operation steps are complicated, the whole process takes too long time, and the service life of the touch screen can be greatly shortened are solved; the content switching process can be completed only by tilting the mobile terminal, and the service life of the touch screen is prolonged. Also with a variable preset speed, less time can be used to complete the content switching process. And the user can know the current progress of the switching process more intuitively by displaying the relevant information of the current content data in the process of hop-by-hop selection.
For a more detailed description of the embodiment when the memory structure is a matrix structure, reference is made to the following embodiments:
please refer to fig. 5, which shows a flowchart of a content selecting method according to another embodiment of the present embodiment. The present embodiment is mainly illustrated by applying the content selection method to a mobile terminal including a sensor such as a gravitational acceleration sensor and/or a three-axis gyroscope. As a more preferable embodiment provided based on the embodiment shown in fig. 3, the content selection method includes:
step 502, taking a storage position in a storage structure as an initial position, wherein the storage structure comprises at least two storage positions arranged in sequence, and one content data is stored in one storage position;
the memory structure may be a matrix structure, and the matrix structure includes at least four memory locations arranged from left to right along a row direction and from top to bottom along a column direction. A content data is stored in a storage location. The content data may be any one of an application, text, picture, video, audio, and storage structure. For example, if the content data is pages of an electronic book, assuming that the electronic book has 400 pages, 5 × 5 thumbnails can be displayed on one screen page of the mobile terminal, that is, 4 × 4 screen pages are required to completely drop the 400 pages. Two levels of memory structures may be established, the first level of memory structures being a 4 x 4 matrix structure, corresponding to a screen page, with one second level of memory structures stored in each memory location in the 4 x 4 matrix; the second layer of storage structure is a 5 x 5 matrix corresponding to pages of the electronic book, and each storage location in the 5 x 5 matrix stores data of one page of the electronic book. Of course, in this embodiment, for simplicity of description, the matrix structure is a 9 × 9 matrix, and each storage location stores one video clip.
In an initial situation, the mobile terminal may use a preset storage location in the matrix structure as an initial location, where the preset storage location includes any one of a first storage location, a last storage location, and a middle storage location, for example, a storage location in a 5 th row and a 5 th column in the middle of a 9 × 9 matrix structure is used as the initial location; the mobile terminal may also use a storage location corresponding to the content data currently displayed on the screen of the terminal in the linear structure as the initial location, for example, if the 3 rd video is being played on the screen of the mobile terminal at the current time, the 3 rd storage location in the matrix structure, that is, the storage location of the 1 st row and the 3 rd column, is used as the initial location.
Step 504, detecting whether the inclination angle of the terminal in the preset direction is larger than a preset threshold value;
the preset direction may include a first direction, a second direction opposite to the first direction, a third direction perpendicular to the first direction, and/or a fourth direction opposite to the third direction. The first direction may be a positive x-axis direction in the terminal coordinate system, the second direction may be a negative x-axis direction in the terminal coordinate system, the third direction may be a negative y-axis direction in the terminal coordinate system, and the fourth direction may be a positive y-axis direction in the terminal coordinate system.
The inclination angle of the terminal in the preset direction may be collected by a sensor in the terminal. The sensor comprises one or two of a gravity acceleration sensor and a three-axis gyroscope. The present embodiment mainly takes the sensor including the gravity acceleration sensor as an example for illustration. The gravity acceleration sensor can acquire the inclination angles of the mobile terminal in the directions of the x axis and the y axis according to a fixed acquisition frequency, so that three-dimensional vectors (x, y, z) representing the inclination angles of the mobile terminal are obtained and reported to a driving layer of the mobile terminal. The application in the mobile terminal may then retrieve the three-dimensional vector from the driver layer. Taking an operating system operated by the mobile terminal as Windows Phone as an example, an Application Programming Interface (API) of the Windows Phone operating system provides an Accelerometer class, an application in the mobile terminal directly uses the Accelerometer class, and obtains data Accelerometer reading events from an event reading changed of the type, where the data Accelerometer reading events include values of the three-dimensional vector.
The triaxial gyroscope and the gravity acceleration sensor have similar functions, and specific details are not repeated. The three-axis gyroscope has larger accumulated error and temperature drift in a longer time, but the measurement is accurate in a short time, particularly aiming at the rotation action of the terminal. The gravity acceleration sensor has more accurate measurement value in a longer time, but has larger error in a shorter time due to the existence of signal noise. Preferably, in this step, data acquired by the gravity acceleration sensor and the three-axis gyroscope may be fused, so as to obtain a more accurate tilt angle value of the mobile terminal when the posture changes. For example, the data respectively acquired by the gravity acceleration sensor and the triaxial gyroscope are weighted and averaged, so that a more accurate tilt angle value is acquired.
It should be noted that the predetermined thresholds corresponding to the first direction, the second direction, the third direction and the fourth direction are generally the same, but different predetermined thresholds may be set for the first direction, the second direction, the third direction and the fourth direction, respectively.
It should be noted that, in this step, whether the inclination angle of the terminal in the preset direction is greater than the predetermined threshold may be detected more than once, that is, may be detected once at predetermined time intervals.
Step 506, if the inclination angle of the terminal in the preset direction is detected to be larger than the preset threshold, starting from the initial position, and selecting other storage positions in the storage structure hop by hop along the direction corresponding to the preset direction according to the preset speed;
and if the mobile terminal detects that the inclination angle of the mobile terminal in the preset direction is larger than a preset threshold value, starting from the initial position, and selecting other storage positions in the storage structure hop by hop along the direction corresponding to the preset direction according to a preset speed. The hop-by-hop selection refers to a selection process of hopping from the current storage position to the next storage position according to a preset speed and a direction corresponding to a preset direction. Specifically, the method comprises the following steps:
and if the inclination angle of the terminal in the first direction is larger than the preset threshold value, starting from the initial position, and selecting other storage positions in a left-to-right direction in the matrix structure in a hop-by-hop manner according to a preset speed. Taking the 41 st storage position in the initial position 9 × 9 matrix structure, that is, the storage position in the 5 th row and the 5 th column as an example, if it is detected that the inclination angle of the terminal in the x-axis forward direction is greater than the predetermined threshold, selecting other storage positions from the 41 st storage position in a left-to-right direction at a speed of once jumping every half second, that is, after half second of the start of the hop-to-hop selection, selecting the 42 th storage position (the 5 th row and the 6 th column) in the 42 th storage position; after one second of the hop-by-hop selection, the 43 th storage location (row 5, column 7) is selected, and so on, and the description is omitted.
And if the inclination angle of the terminal in the second direction is larger than the preset threshold value, starting from the initial position, and selecting other storage positions in the matrix structure from the right to the left in a hop-by-hop manner according to the preset speed. Taking the 41 th storage position in the initial position 9 × 9 matrix structure, that is, the storage position in the 5 th row and the 5 th column as an example, if it is detected that the inclination angle of the terminal in the negative direction of the x axis is greater than the predetermined threshold, selecting other storage positions from the 41 th storage position in a left-to-right direction at a speed of once jumping every half second, that is, after half second of the start of the hop-to-hop selection, selecting the 40 th storage position (the 5 th row and the 5 th column) in the 40 th storage position; after one second of the hop-by-hop selection, the 39 th storage location (row 5, column 4) is selected, and so on, and the description is omitted.
And if the inclination angle of the terminal in the third direction is larger than the preset threshold value, starting from the initial position, and jumping gradually from the top to the bottom in the matrix structure according to the preset speed to select other storage positions. Taking the 41 st storage position in the initial position 9 × 9 matrix structure, that is, the storage position in the 5 th row and the 5 th column as an example, if it is detected that the inclination angle of the terminal in the negative direction of the y axis is greater than the predetermined threshold, selecting other storage positions from the 41 st storage position in a left-to-right direction at a speed of once jumping every half second, that is, after half second of the start of the hop-to-hop selection, selecting the 50 th storage position (the 6 th row and the 5 th column) in the 50 th storage position; after one second of the hop-by-hop selection, the 59 th storage location (row 7, column 5) is selected, and so on, and the description is omitted.
And if the inclination angle of the terminal in the fourth direction is larger than the preset threshold value, starting from the initial position, and jumping gradually along the direction from top to bottom in the matrix structure according to the preset speed to select other storage positions. Taking the 41 st storage position in the initial position 9 × 9 matrix structure, that is, the storage position in the 5 th row and the 5 th column as an example, if it is detected that the inclination angle of the terminal in the negative direction of the y axis is greater than the predetermined threshold, selecting other storage positions from the 41 th storage position in a left-to-right direction at a speed of once jumping every half second, that is, after half second of the start of the hop-to-hop selection, selecting the 32 th storage position (the 5 th row and the 4 th column) one by one; after one second of hop-by-hop selection, the 23 rd storage location (row 3, column 5) is selected, and so on, and the description is omitted.
Since the mobile terminal may also have a situation that the tilt angles in both directions are greater than the predetermined threshold value, the hop-by-hop direction is determined according to the larger one of the tilt angles in both directions. Specifically, the step may further include:
if the inclination angles of the terminal in the first direction and the third direction are detected to be larger than a preset threshold value, and the inclination angle in the first direction is larger than the inclination angle in the third direction, starting from the initial position, and selecting other storage positions in a left-to-right direction in the matrix structure in a jump-by-jump mode according to a preset speed;
if the terminal is detected to have the inclination angles in the first direction and the third direction larger than the preset threshold value and the inclination angle in the third direction is larger than the inclination angle in the first direction, starting from the initial position, and jumping gradually along the direction from top to bottom in the matrix structure according to the preset speed to select other storage positions;
if the terminal is detected to have the inclination angles in the second direction and the fourth direction larger than the preset threshold value and the inclination angle in the second direction is larger than the inclination angle in the fourth direction, starting from the initial position, and selecting other storage positions in the matrix structure from the right to the left in a hop-by-hop manner according to the preset speed;
and if the terminal is detected to have the inclination angles in the second direction and the fourth direction larger than the preset threshold value and the inclination angle in the fourth direction is larger than the inclination angle in the second direction, starting from the initial position, and selecting other storage positions in the matrix structure from bottom to top in a hop-by-hop manner according to the preset speed.
Preferably, the preset speed is in positive correlation with the size of the inclination angle in the preset direction, that is, the larger the inclination angle is, the larger the preset speed is. Therefore, when a user needs to switch content data with large span, the inclination angle can be larger, and a faster preset speed can be obtained, such as 10 jumps per second and 30 jumps per second; when the user switches the content data with a small span or approaches the target content data, the inclination angle can be made smaller, and a relatively slow preset speed, such as one jump per second, can be obtained.
Step 508, acquiring the content data in the storage position selected at the current moment;
since the selected storage location is different at each time after the start of the hop-by-hop selection, the mobile terminal always acquires the content data in the storage location selected at the current time. For example, when 2 seconds after the start of the hop-by-hop selection is taken as the current time, the 77 th storage location (row 9, column 5) is selected, and the 77 th video is acquired by the mobile terminal.
Step 510, displaying related information of the acquired content data on a screen, wherein the related information comprises one or a combination of more of introduction information, page numbers, thumbnails, preview pictures, names or icons;
in the process of hop-by-hop selection, the mobile terminal may display the related information of the acquired content data on the screen, where the related information includes one or a combination of several of introduction information, page numbers, thumbnails, preview images, names, or icons. For example, in the hop-by-hop selection process, the mobile terminal may display the thumbnail and the name of the acquired content data on the screen, and if the preset speed is to hop every half second, the user may observe that two preview images are switched every second on the screen of the mobile terminal in the hop-by-hop selection process. For another example, the content data is a page in an electronic book, and in the hop-by-hop selection process, the mobile terminal may display the page number of the acquired content data on the screen in a larger font, so that the user may easily know that the page number of the electronic book has been currently switched to.
Step 512, receiving a selection stop signal, wherein the selection stop signal includes a signal that an inclination angle in a preset direction is smaller than a preset threshold;
in the hop-by-hop selection process, when the user selects the target content data, a selection stop signal may be sent to the mobile terminal, where the selection stop signal may be a signal that an inclination angle of the terminal in the other direction of the preset direction is smaller than a predetermined threshold, for example, when the user selects the target content data, the mobile terminal is put right at an initial position, and the inclination angle in each preset direction is smaller than the predetermined threshold.
Of course, the selection stop signal may also be one or a combination of several of a click touch screen signal, a voice control signal, a gesture signal and a signal of pressing a physical key.
And step 514, executing or displaying the acquired content data after receiving the selection stop signal.
And after receiving the selection stop signal, the mobile terminal executes or displays the acquired content data. Specifically, when the acquired content data is an application, the mobile terminal executes the content data; and when the acquired content data is any one of text, picture, video, audio and storage structure, the mobile terminal displays the content data.
So far, the whole switching process of the content data is finished.
In summary, in the content selection method provided in this embodiment, when it is detected that the inclination angle of the terminal in the preset direction is greater than the predetermined threshold, other storage locations are selected from the initial location of the storage structure in a direction corresponding to the preset direction at a preset speed, and content data in the selected storage location at the current time is acquired; the problems that the operation steps are complicated, the whole process takes too long time, and the service life of the touch screen can be greatly shortened are solved; the content switching process can be completed only by tilting the mobile terminal, and the service life of the touch screen is prolonged. Also with a variable preset speed, less time can be used to complete the content switching process. And the user can know the current progress of the switching process more intuitively by displaying the relevant information of the current content data in the process of hop-by-hop selection.
Referring to fig. 6, a block diagram of a content selection apparatus according to an embodiment of the present invention is shown. The present embodiment is mainly illustrated by the content selection apparatus being implemented as a part of a mobile terminal. The content selection apparatus includes: an initial determination module 620, an angle detection module 640, a position switching module 660, and a data selection module 680.
An initial determining module 620, configured to use a storage location in a storage structure as an initial location, where the storage structure includes at least two storage locations arranged in sequence, and a content data is stored in one storage location;
the angle detection module 640 is configured to detect whether an inclination angle of the terminal in a preset direction is greater than a predetermined threshold;
a position switching module 660, configured to, if the angle detection module 640 detects that the inclination angle of the terminal in the preset direction is greater than a predetermined threshold, select, from the initial position determined by the initial determination module 620, other storage positions in the storage structure hop by hop along a direction corresponding to the preset direction at a preset speed;
and the data selection module 680 is configured to obtain content data in the storage location selected and fetched by the location switching module 660 at the current time.
In summary, in the content selection apparatus provided in this embodiment, when it is detected that the inclination angle of the terminal in the preset direction is greater than the predetermined threshold, other storage locations are selected from the initial location of the storage structure in a direction corresponding to the preset direction at a preset speed, and content data in the storage location selected at the current time is acquired; the problems that the operation steps are complicated, the whole process takes too long time, and the service life of the touch screen can be greatly shortened are solved; the content switching process can be completed only by tilting the mobile terminal, and the service life of the touch screen is prolonged.
Referring to fig. 7, a block diagram of a content selection apparatus according to another embodiment of the invention is shown. The present embodiment is mainly illustrated by the content selection apparatus being implemented as a part of a mobile terminal. As a more preferred embodiment provided based on the embodiment shown in fig. 6. The content selection apparatus includes: an initial determination module 620, an angle detection module 640, a position switching module 660, a data selection module 680, an information display module 682, a signal receiving module 692, and a content processing module 694.
An initial determining module 620, configured to use a storage location in a storage structure as an initial location, where the storage structure includes at least two storage locations arranged in sequence, and a content data is stored in one storage location. Specifically, the storage structure is a linear structure, and the linear structure comprises at least two storage positions arranged from front to back.
The angle detection module 640 is configured to detect whether an inclination angle of the terminal in a preset direction is greater than a predetermined threshold, where the preset direction includes a first direction and/or a second direction opposite to the first direction.
A position switching module 660, configured to, if the angle detection module 640 detects that the inclination angle of the terminal in the preset direction is greater than a predetermined threshold, start to select, from the initial position determined by the initial determination module 620, other storage positions in the storage structure hop by hop along a direction corresponding to the preset direction at a preset speed. Specifically, the position switching module 660 includes: a forward switching unit 662 and/or a backward switching unit 664;
the forward switching unit 662 is configured to, if the angle detection module 640 detects that the inclination angle of the terminal in the first direction is greater than a predetermined threshold, select other storage locations from the initial location determined by the initial determination module 620 in a jump-by-jump manner along the linear structure from the forward direction to the backward direction at a preset speed;
the backward switching unit 664 is configured to, if the angle detection module 640 detects that the inclination angle of the terminal in the second direction is greater than the predetermined threshold, select other storage locations hop by hop along the direction from the back to the front in the linear structure at a preset speed from the initial location determined by the initial determination module 620.
And the data selection module 680 is configured to obtain content data in the storage location selected and fetched by the location switching module 660 at the current time.
An information display module 682, configured to display, on a screen, related information of the content data acquired by the data selection module 680, where the related information includes one or a combination of several of introduction information, a page number, a thumbnail, a preview, a name, and an icon.
A signal receiving module 692, configured to receive a selection stop signal, where the selection stop signal includes a signal that an inclination angle of the terminal in another direction other than the preset direction is greater than a predetermined threshold, a signal that the inclination angle of the terminal in the preset direction is less than the predetermined threshold, a signal of clicking a touch screen, a sound control signal, a gesture signal, and a signal of pressing a physical key, or a combination of several signals;
a content processing module 694, configured to execute or display the content data acquired by the data selection module 680 after the signal receiving module 692 receives the selection stop signal, where the acquired content data is any one of an application program, a text, a picture, a video, an audio, and a storage structure.
In summary, in the content selection apparatus provided in this embodiment, when it is detected that the inclination angle of the terminal in the preset direction is greater than the predetermined threshold, other storage locations are selected from the initial location of the storage structure in a direction corresponding to the preset direction at a preset speed, and content data in the storage location selected at the current time is acquired; the problems that the operation steps are complicated, the whole process takes too long time, and the service life of the touch screen can be greatly shortened are solved; the content switching process can be completed only by tilting the mobile terminal, and the service life of the touch screen is prolonged. Also with a variable preset speed, less time can be used to complete the content switching process. And the user can know the current progress of the switching process more intuitively by displaying the relevant information of the current content data in the process of hop-by-hop selection.
Referring to fig. 8, a block diagram of a content selection apparatus according to another embodiment of the invention is shown. The present embodiment is mainly illustrated by the content selection apparatus being implemented as a part of a mobile terminal. As a more preferred embodiment provided based on the embodiment shown in fig. 6. The content selection apparatus includes: an initial determination module 620, an angle detection module 640, a position switching module 660, a data selection module 680, an information display module 682, a signal receiving module 692, and a content processing module 694.
An initial determining module 620, configured to use a storage location in a storage structure as an initial location, where the storage structure includes at least two storage locations arranged in sequence, and a content data is stored in one storage location. Specifically, the memory structure is a matrix structure, and the matrix structure comprises at least four memory locations arranged from left to right along a row direction and from top to bottom along a column direction.
The angle detection module 640 is configured to detect whether an inclination angle of the terminal in a preset direction is greater than a predetermined threshold, where the preset direction includes a first direction, a second direction opposite to the first direction, a third direction perpendicular to the first direction, and/or a fourth direction opposite to the third direction.
A position switching module 660, configured to, if the angle detection module 640 detects that the inclination angle of the terminal in the preset direction is greater than a predetermined threshold, start to select, from the initial position determined by the initial determination module 620, other storage positions in the storage structure hop by hop along a direction corresponding to the preset direction at a preset speed. Specifically, the position switching module 660 includes: right direction switching section 661, left direction switching section 663, upward direction switching section 665, and downward direction switching section 667.
The right switching unit 661, configured to, if the angle detection module 640 detects that the inclination angle of the terminal in the first direction is greater than the predetermined threshold, select other storage locations hop by hop along the left-to-right direction in the matrix structure at a preset speed from the initial location determined by the initial determination module 620;
the left-hand switching unit 663 is configured to, if the angle detection module 640 detects that the inclination angle of the terminal in the second direction is greater than the predetermined threshold, select other storage locations from the initial location determined by the initial determination module 620 in a hop-by-hop manner along the matrix structure from right to left according to a preset speed;
the downward switching unit 665 is configured to, if the angle detection module 640 detects that the inclination angle of the terminal in the third direction is greater than a predetermined threshold, gradually select another storage location along a direction from top to bottom in the matrix structure at a preset speed from the initial location determined by the initial determination module 620;
the upward switching unit 667 is configured to, if the angle detection module 640 detects that the inclination angle of the terminal in the fourth direction is greater than a predetermined threshold, select other storage locations hop by hop along the direction from bottom to top in the matrix structure according to a preset speed from the initial location determined by the initial determination module 620.
Preferably, the right switching unit 661 is further configured to, if the angle detection module 640 detects that the tilt angles of the terminal in the first direction and the third direction are both greater than the predetermined threshold, and the tilt angle in the first direction is greater than the tilt angle in the third direction, jump from the initial position determined by the initial determination module 620 to another storage position along the direction from left to right in the matrix structure according to a preset speed;
the downward switching unit 665 is further configured to, if the angle detection module detects that the tilt angles of the terminal in the first direction and the third direction are both greater than a predetermined threshold, and the tilt angle in the third direction is greater than the tilt angle in the first direction, jump from the initial position determined by the initial determination module along the matrix structure from top to bottom at a preset speed, and select another storage location;
the left switching unit 663 is further configured to, if the angle detection module 640 detects that the tilt angles of the terminal in the second direction and the fourth direction are both greater than a predetermined threshold, and the tilt angle in the second direction is greater than the tilt angle in the fourth direction, jump-by-jump along the direction from right to left in the matrix structure at a preset speed from the initial position determined by the initial determination module 620 and select another storage position;
the upward switching unit 667 is further configured to, if the angle detection module 640 detects that the tilt angles of the terminal in the second direction and the fourth direction are both greater than a predetermined threshold, and the tilt angle in the fourth direction is greater than the tilt angle in the second direction, skip by skip from the initial position determined by the initial determination module 620 to another storage position along the direction from bottom to top in the matrix structure according to a preset speed.
And the data selection module 680 is configured to obtain content data in the storage location selected and fetched by the location switching module 660 at the current time.
An information display module 682, configured to display, on a screen, related information of the current content data selected by the data selection module 680, where the related information includes one or a combination of several of introduction information, page numbers, thumbnails, preview images, names, and icons.
A signal receiving module 692, configured to receive a selection stop signal, where the selection stop signal includes a signal that an inclination angle of the terminal in another direction other than the preset direction is greater than a predetermined threshold, a signal that the inclination angle of the terminal in the preset direction is less than the predetermined threshold, a signal of clicking a touch screen, a sound control signal, a gesture signal, and a signal of pressing a physical key, or a combination of several signals;
a content processing module 694, configured to execute or display the content data acquired by the data selection module 680 after the signal receiving module 692 receives the selection stop signal, where the content data is any one of an application program, a text, a picture, a video, an audio, and a storage structure.
In summary, in the content selection apparatus provided in this embodiment, when it is detected that the inclination angle of the terminal in the preset direction is greater than the predetermined threshold, other storage locations are selected from the initial location of the storage structure in a direction corresponding to the preset direction at a preset speed, and content data in the storage location selected at the current time is acquired; the problems that the operation steps are complicated, the whole process takes too long time, and the service life of the touch screen can be greatly shortened are solved; the content switching process can be completed only by tilting the mobile terminal, and the service life of the touch screen is prolonged. Also with a variable preset speed, less time can be used to complete the content switching process. And the user can know the current progress of the switching process more intuitively by displaying the relevant information of the current content data in the process of hop-by-hop selection.
It should be noted that: in the content selection apparatus provided in the foregoing embodiment, when selecting a content, only the division of the functional modules is illustrated, and in practical applications, the function distribution may be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the content selection apparatus and the content selection method provided by the above embodiments belong to the same concept, and specific implementation processes thereof are described in the method embodiments for details, which are not described herein again.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.