[go: up one dir, main page]

CN104090719B - Mobile terminal is according to the method and system of acceleration knots modification translating displayed content - Google Patents

Mobile terminal is according to the method and system of acceleration knots modification translating displayed content Download PDF

Info

Publication number
CN104090719B
CN104090719B CN201410285440.6A CN201410285440A CN104090719B CN 104090719 B CN104090719 B CN 104090719B CN 201410285440 A CN201410285440 A CN 201410285440A CN 104090719 B CN104090719 B CN 104090719B
Authority
CN
China
Prior art keywords
acceleration
axis
translation
pixels
change amount
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201410285440.6A
Other languages
Chinese (zh)
Other versions
CN104090719A (en
Inventor
杨维琴
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
TCL Communication Ningbo Ltd
Original Assignee
TCL Communication Ningbo Ltd
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 TCL Communication Ningbo Ltd filed Critical TCL Communication Ningbo Ltd
Priority to CN201410285440.6A priority Critical patent/CN104090719B/en
Publication of CN104090719A publication Critical patent/CN104090719A/en
Application granted granted Critical
Publication of CN104090719B publication Critical patent/CN104090719B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • User Interface Of Digital Computer (AREA)
  • Telephone Function (AREA)

Abstract

本发明公开了一种移动终端根据加速度改变量平移显示内容的方法及系统,预先设置加速度阈值及单位加速度改变量对应的平移像素个数,然后获取移动终端当前加速度,进而获取加速度改变量,将加速度改变量与单位加速度改变量对应的平移像素个数做乘积运算获取平移像素个数,按照平移像素个数平移移动终端显示屏的显示内容,无需用户按键操作及触摸操作,使显示内容的移动脱离传统的触摸操作及按键操作方式,只需甩动手机即可实现平移显示内容,并且,若浏览显示内容尺寸大于显示屏尺寸,则获取显示内容会更加方便。

The invention discloses a method and system for a mobile terminal to translate display content according to the acceleration change amount. The acceleration threshold and the number of translation pixels corresponding to the unit acceleration change amount are set in advance, and then the current acceleration of the mobile terminal is obtained, and then the acceleration change amount is obtained. The amount of acceleration change and the number of translation pixels corresponding to the unit acceleration change are multiplied to obtain the number of translation pixels, and the display content of the mobile terminal display screen is translated according to the number of translation pixels, without the need for user key operation and touch operation, so that the display content can move Breaking away from the traditional touch operation and button operation, you only need to shake the mobile phone to realize the translation of the displayed content, and if the size of the browsing displayed content is larger than the size of the display screen, it will be more convenient to obtain the displayed content.

Description

移动终端根据加速度改变量平移显示内容的方法及系统Method and system for mobile terminal to translate display content according to acceleration change amount

技术领域technical field

本发明涉及移动终端技术领域,尤其涉及的是一种移动终端根据加速度改变量平移显示内容的方法及系统。The present invention relates to the technical field of mobile terminals, in particular to a method and a system for a mobile terminal to translate and display content according to an acceleration change amount.

背景技术Background technique

移动终端显示屏显示内容的移动方式大致分为两种,其一是通过触摸操作实现,通过触摸操作时会将显示内容的部分内容遮挡,影响视觉效果,而且触摸操作平移显示内容不能精确的控制移动量;另一是通过外接设备的按键操作实现,是通过按键盘中的上、下、左、右导航键来实现,导航时移动距离是固定,若长距离导航时需要按很多下按键,一方面会减少按键寿命,另一方面是操作时间耗时长。There are roughly two ways to move the content displayed on the display screen of a mobile terminal. One is through touch operation. When the touch operation is used, part of the displayed content will be blocked, affecting the visual effect, and the touch operation can not accurately control the displayed content. The amount of movement; the other is achieved by pressing the keys of the external device, which is achieved by pressing the up, down, left, and right navigation keys on the keyboard. The movement distance is fixed during navigation. If you need to press many keys for long-distance navigation, On the one hand, it will reduce the life of the keys, on the other hand, it will take a long time to operate.

因此,现有技术存在缺陷,有待改进。Therefore, there are defects in the prior art and need to be improved.

发明内容Contents of the invention

鉴于上述现有技术的不足,本发明的目的在于提供一种移动终端根据加速度改变量平移显示内容的方法及系统,为移动终端提供一种平移显示内容的新方式,无需用户按键操作及触摸操作,只需甩动手机即可实现平移显示内容,使移动终端的显示内容的移动更加方便。In view of the above-mentioned deficiencies in the prior art, the purpose of the present invention is to provide a method and system for a mobile terminal to shift the displayed content according to the acceleration change, and provide a new way for the mobile terminal to shift the displayed content without the need for user key operation and touch operation , just shake the mobile phone to achieve panning display content, making it more convenient to move the display content of the mobile terminal.

为达上述目的,本发明采用如下技术方案:For reaching above-mentioned object, the present invention adopts following technical scheme:

一种移动终端根据加速度改变量平移显示内容的方法,包括以下步骤:A method for a mobile terminal to translate display content according to an acceleration change amount, comprising the following steps:

A、预先设置一加速度阈值,及单位加速度改变量对应的平移像素个数;A. Preset an acceleration threshold and the number of translation pixels corresponding to the unit acceleration change;

B、实时获取移动终端当前加速度;B. Obtain the current acceleration of the mobile terminal in real time;

C、判断当前加速度的绝对值是否大于加速度阈值,若是,则执行步骤D;C. Determine whether the absolute value of the current acceleration is greater than the acceleration threshold, if so, execute step D;

D、获取X轴向的加速度改变量和/或Y轴向的加速度改变量,所述X轴向平行于移动终端屏幕向右,所述Y轴向平行于移动终端屏幕向上;D. Obtain the acceleration change amount of the X axis and/or the acceleration change amount of the Y axis, the X axis is parallel to the mobile terminal screen to the right, and the Y axis is parallel to the mobile terminal screen upward;

E、将X轴向的加速度改变量与单位加速度改变量对应的平移像素个数做乘积运算获取X轴向的平移像素个数,和/或将Y轴向的加速度改变量单位加速度改变量对应的平移像素个数做乘积运算获取Y轴向的平移像素个数;E. The acceleration change in the X-axis is multiplied by the number of translation pixels corresponding to the unit acceleration change to obtain the number of translation pixels in the X-axis, and/or the acceleration change in the Y-axis is corresponding to the unit acceleration change The number of translation pixels is multiplied to obtain the number of translation pixels in the Y axis;

F、按照X轴向的平移像素个数和/或Y轴向的平移像素个数平移显示内容。F. The displayed content is shifted according to the number of shifted pixels in the X-axis and/or the number of shifted pixels in the Y-axis.

所述的移动终端根据加速度改变量平移显示内容的方法,其中,所述步骤D具体包括:The method for the mobile terminal to translate the displayed content according to the acceleration change amount, wherein the step D specifically includes:

若当前加速度的X轴向的分加速度与X轴向相同,且大于加速度阈值,则实时获取加速度变大过程中的X轴向加速度最大值,若加速度由变大转为变小,则实时获取加速度变小过程中的X轴向加速度最小值,若加速度由变小转为变大或者加速度等于加速度阈值,则停止获取,并根据X轴向加速度最大值及X轴向加速度最小值计算X轴向加速度改变量;If the sub-acceleration of the X-axis of the current acceleration is the same as that of the X-axis and is greater than the acceleration threshold, the maximum value of the acceleration in the X-axis during the process of increasing the acceleration will be obtained in real time. The minimum value of the X-axis acceleration during the process of decreasing the acceleration. If the acceleration changes from decreasing to increasing or the acceleration is equal to the acceleration threshold, stop acquiring and calculate the X-axis according to the maximum value of the X-axis acceleration and the minimum value of the X-axis acceleration Amount of change in acceleration;

若当前加速度的X轴向的分加速度与X轴向相反,且小于负的加速度阈值,则实时获取加速度变小过程中的X轴向加速度最小值,若加速度由变小转为变大,则实时获取加速度变大过程中的X轴向加速度最大值,若加速度由变大转为变小或者加速度等于加速度阈值,则停止获取,并根据X轴向加速度最大值及X轴向加速度最小值计算X轴向加速度改变量;If the sub-acceleration of the X-axis of the current acceleration is opposite to that of the X-axis and is less than the negative acceleration threshold, the minimum value of the acceleration in the X-axis during the process of decreasing the acceleration is obtained in real time. If the acceleration changes from decreasing to increasing, then Obtain the maximum value of the acceleration in the X-axis in real time during the acceleration process. If the acceleration changes from large to small or the acceleration is equal to the acceleration threshold, the acquisition will be stopped and calculated based on the maximum value of the acceleration in the X-axis and the minimum value of the acceleration in the X-axis. X-axis acceleration change amount;

若当前加速度的Y轴向的分加速度与Y轴向相同,且大于加速度阈值,则实时获取加速度变大过程中的Y轴向加速度最大值,若加速度由变大转为变小,则实时获取加速度变小过程中的Y轴向加速度最小值,若加速度由变小转为变大或者加速度等于加速度阈值,则停止获取,并根据Y轴向加速度最大值及Y轴向加速度最小值计算Y轴向加速度改变量;If the sub-acceleration of the Y-axis of the current acceleration is the same as that of the Y-axis and is greater than the acceleration threshold, the maximum value of the acceleration in the Y-axis during the process of increasing the acceleration will be obtained in real time. The minimum value of the Y-axis acceleration during the process of decreasing the acceleration. If the acceleration changes from decreasing to increasing or the acceleration is equal to the acceleration threshold, stop acquiring and calculate the Y-axis based on the maximum value of the Y-axis acceleration and the minimum value of the Y-axis acceleration Amount of change in acceleration;

若当前加速度的Y轴向的分加速度与Y轴向相反,且小于负的加速度阈值,则实时获取加速度变小过程中的Y轴向加速度最小值,若加速度由变小转为变大,则实时获取加速度变大过程中的Y轴向加速度最大值,若加速度由变大转为变小或者加速度等于加速度阈值,则停止获取,并根据Y轴向加速度最大值及Y轴向加速度最小值计算Y轴向加速度改变量。If the sub-acceleration of the Y-axis of the current acceleration is opposite to the Y-axis and is less than the negative acceleration threshold, the minimum value of the Y-axis acceleration during the acceleration reduction process is obtained in real time. If the acceleration changes from small to large, then Real-time acquisition of the maximum value of the Y-axis acceleration during the acceleration process. If the acceleration changes from large to small or the acceleration is equal to the acceleration threshold, the acquisition is stopped and calculated based on the maximum value of the Y-axis acceleration and the minimum value of the Y-axis acceleration. Y-axis acceleration change amount.

所述的移动终端根据加速度改变量平移显示内容的方法,其中,所述步骤F之前包括:The method for the mobile terminal to translate the displayed content according to the acceleration change amount, wherein, before the step F, it includes:

将X轴向的平移像素个数和/或Y轴向的平移像素个数与一预先设置的最大平移像素个数比较,若X轴向的平移像素个数和/或Y轴向的平移像素个数大于最大平移像素个数,则令X轴向的平移像素个数和/或Y轴向的平移像素个数等于最大平移像素个数。Compare the number of translation pixels in the X-axis and/or the number of translation pixels in the Y-axis with a preset maximum number of translation pixels, if the number of translation pixels in the X-axis and/or the number of translation pixels in the Y-axis If the number is greater than the maximum number of translation pixels, the number of translation pixels in the X-axis and/or the number of translation pixels in the Y-axis is equal to the maximum number of translation pixels.

所述的移动终端根据加速度改变量平移显示内容的方法,其中,所述预先设置的最大平移像素个数包括X轴最大平移像素个数及Y轴最大平移像素个数,其中,所述X轴最大平移像素个数为移动终端显示屏宽度值所容纳的像素个数,所述Y轴最大平移像素个数为移动终端显示高度值所容纳的像素个数;The method for the mobile terminal to translate the displayed content according to the acceleration change amount, wherein the preset maximum number of pixels to be translated includes the maximum number of pixels to be translated on the X axis and the maximum number of pixels to be translated on the Y axis, wherein the X axis The maximum number of translation pixels is the number of pixels accommodated by the width value of the display screen of the mobile terminal, and the maximum number of translation pixels of the Y axis is the number of pixels accommodated by the display height value of the mobile terminal;

所述单位加速度改变量对应的平移像素个数分为X轴向单位加速度改变量对应的平移像素个数和Y轴向单位加速度改变量对应的平移像素个数,X轴向单位加速度改变量对应的平移像素个数等于Y轴向单位加速度改变量对应的平移像素个数。The number of translation pixels corresponding to the unit acceleration change amount is divided into the number of translation pixels corresponding to the X-axis unit acceleration change amount and the translation pixel number corresponding to the Y-axis unit acceleration change amount, and the X-axis unit acceleration change amount corresponds to The number of translation pixels of is equal to the number of translation pixels corresponding to the unit acceleration change in the Y axis.

所述的移动终端根据加速度改变量平移显示内容的方法,其中,所述步骤F具体包括:The method for the mobile terminal to translate the display content according to the acceleration change amount, wherein the step F specifically includes:

若所述当前加速度与X轴向相同,则按照X轴向的平移像素个数沿X轴向平移显示内容;If the current acceleration is the same as the X-axis, the display content is translated along the X-axis according to the number of translation pixels in the X-axis;

若所述当前加速度与X轴向相反,则按照X轴向的平移像素个数沿X轴向反方向平移显示内容;If the current acceleration is opposite to the X-axis, the display content is translated along the X-axis in the opposite direction according to the number of translation pixels in the X-axis;

若所述当前加速度与Y轴向相同,则按照Y轴向的平移像素个数沿X轴向平移显示内容;If the current acceleration is the same as that of the Y axis, the display content is translated along the X axis according to the number of translation pixels in the Y axis;

若所述当前加速度与Y轴向相反,则按照Y轴向的平移像素个数沿X轴向反方向平移显示内容。If the current acceleration is opposite to the Y axis, the displayed content is translated in the opposite direction of the X axis according to the number of pixels to be translated in the Y axis.

本发明还提供了一种移动终端根据加速度改变量平移显示内容的系统,包括:The present invention also provides a system for the mobile terminal to translate and display content according to the acceleration change amount, including:

存储模块,用于预先设置一加速度阈值,及单位加速度改变量对应的平移像素个数;The storage module is used to preset an acceleration threshold and the number of translation pixels corresponding to the unit acceleration change amount;

判断模块,用于判断当前加速度的绝对值是否大于加速度阈值;A judging module, configured to judge whether the absolute value of the current acceleration is greater than the acceleration threshold;

加速度获取模块,用于实时获取移动终端当前加速度;Acceleration acquisition module, used to acquire the current acceleration of the mobile terminal in real time;

改变量获取模块,用于获取X轴向的加速度改变量和/或Y轴向的加速度改变量,所述X轴向平行于移动终端屏幕向右,所述Y轴向平行于移动终端屏幕向上;The change amount obtaining module is used to obtain the acceleration change amount of the X-axis and/or the acceleration change amount of the Y-axis, the X-axis is parallel to the mobile terminal screen to the right, and the Y-axis is parallel to the mobile terminal screen upward ;

计算模块,用于将X轴向的加速度改变量与单位加速度改变量对应的平移像素个数做乘积运算获取X轴向的平移像素个数,和/或将Y轴向的加速度改变量单位加速度改变量对应的平移像素个数做乘积运算获取Y轴向的平移像素个数;The calculation module is used to multiply the acceleration change amount of the X-axis with the number of translation pixels corresponding to the unit acceleration change amount to obtain the number of translation pixels in the X-axis direction, and/or calculate the acceleration change amount of the Y-axis unit acceleration The number of translation pixels corresponding to the change amount is multiplied to obtain the number of translation pixels in the Y-axis;

平移模块,用于根据X轴向的平移像素个数和/或Y轴向的平移像素个数平移显示内容。A translation module, configured to translate the display content according to the number of pixels to be translated in the X axis and/or the number of pixels to be translated in the Y axis.

所述的移动终端根据加速度改变量平移显示内容的系统,其中,所述改变量获取模块,The system for the mobile terminal to translate the displayed content according to the acceleration change amount, wherein the change amount acquisition module,

用于若当前加速度的X轴向的分加速度与X轴向相同,且大于加速度阈值,则实时获取加速度变大过程中的X轴向加速度最大值,若加速度由变大转为变小,则实时获取加速度变小过程中的X轴向加速度最小值,若加速度由变小转为变大或者加速度等于加速度阈值,则停止获取,并根据X轴向加速度最大值及X轴向加速度最小值计算X轴向加速度改变量;If the sub-acceleration of the X-axis of the current acceleration is the same as that of the X-axis and is greater than the acceleration threshold, the maximum value of the acceleration in the X-axis during the process of increasing the acceleration is obtained in real time. If the acceleration changes from increasing to decreasing, then Acquire the minimum value of the X-axis acceleration in the process of decreasing acceleration in real time. If the acceleration changes from decreasing to increasing or the acceleration is equal to the acceleration threshold, stop acquiring and calculate based on the maximum value of the X-axis acceleration and the minimum value of the X-axis acceleration X-axis acceleration change amount;

用于若当前加速度的X轴向的分加速度与X轴向相反,且小于负的加速度阈值,则实时获取加速度变小过程中的X轴向加速度最小值,若加速度由变小转为变大,则实时获取加速度变大过程中的X轴向加速度最大值,若加速度由变大转为变小或者加速度等于加速度阈值,则停止获取,并根据X轴向加速度最大值及X轴向加速度最小值计算X轴向加速度改变量;If the sub-acceleration of the X-axis of the current acceleration is opposite to the X-axis and is less than the negative acceleration threshold, the minimum value of the acceleration in the X-axis during the process of decreasing the acceleration is obtained in real time. If the acceleration changes from decreasing to increasing , then obtain the maximum value of the X-axis acceleration in the process of increasing the acceleration in real time. If the acceleration changes from large to small or the acceleration is equal to the acceleration threshold, the acquisition is stopped, and according to the maximum value of the X-axis acceleration and the minimum value of the X-axis acceleration value to calculate the X-axis acceleration change amount;

用于若当前加速度的Y轴向的分加速度与Y轴向相同,且大于加速度阈值,则实时获取加速度变大过程中的Y轴向加速度最大值,若加速度由变大转为变小,则实时获取加速度变小过程中的Y轴向加速度最小值,若加速度由变小转为变大或者加速度等于加速度阈值,则停止获取,并根据Y轴向加速度最大值及Y轴向加速度最小值计算Y轴向加速度改变量;If the sub-acceleration of the Y-axis of the current acceleration is the same as that of the Y-axis and is greater than the acceleration threshold, the maximum value of the acceleration in the Y-axis during the process of increasing the acceleration is obtained in real time. If the acceleration changes from increasing to decreasing, then Obtain the minimum value of the Y-axis acceleration in the process of decreasing acceleration in real time. If the acceleration changes from decreasing to increasing or the acceleration is equal to the acceleration threshold, stop acquiring and calculate based on the maximum value of the Y-axis acceleration and the minimum value of the Y-axis acceleration Y-axis acceleration change amount;

用于若当前加速度的Y轴向的分加速度与Y轴向相反,且小于负的加速度阈值,则实时获取加速度变小过程中的Y轴向加速度最小值,若加速度由变小转为变大,则实时获取加速度变大过程中的Y轴向加速度最大值,若加速度由变大转为变小或者加速度等于加速度阈值,则停止获取,并根据Y轴向加速度最大值及Y轴向加速度最小值计算Y轴向加速度改变量。If the sub-acceleration of the Y-axis of the current acceleration is opposite to the Y-axis and is less than the negative acceleration threshold, the minimum value of the acceleration in the Y-axis during the process of decreasing the acceleration is obtained in real time. If the acceleration changes from decreasing to increasing , then obtain the maximum value of the Y-axis acceleration in the process of increasing the acceleration in real time. If the acceleration changes from large to small or the acceleration is equal to the acceleration threshold, the acquisition is stopped, and according to the maximum value of the Y-axis acceleration and the minimum value of the Y-axis acceleration The value calculates the amount of acceleration change in the Y axis.

所述的移动终端根据加速度改变量平移显示内容的系统,其中,还包括:The system for the mobile terminal to translate and display content according to the acceleration change amount, further includes:

比较模块,用于将X轴向的平移像素个数和/或Y轴向的平移像素个数与一预先设置的最大平移像素个数比较,若X轴向的平移像素个数和/或Y轴向的平移像素个数大于最大平移像素个数,则令X轴向的平移像素个数和/或Y轴向的平移像素个数等于最大平移像素个数。The comparison module is used to compare the number of translation pixels in the X-axis and/or the number of translation pixels in the Y-axis with a preset maximum number of translation pixels, if the number of translation pixels in the X-axis and/or the number of Y-axis If the number of translation pixels in the axial direction is greater than the maximum number of translation pixels, then the number of translation pixels in the X-axis and/or the number of translation pixels in the Y-axis is equal to the maximum number of translation pixels.

所述的移动终端根据加速度改变量平移显示内容的系统,其中,所述预先设置的最大平移像素个数包括X轴最大平移像素个数及Y轴最大平移像素个数,其中,所述X轴最大平移像素个数为移动终端显示屏宽度值所容纳的像素个数,所述Y轴最大平移像素个数为移动终端显示高度值所容纳的像素个数;The system for the mobile terminal to translate the display content according to the acceleration change amount, wherein the preset maximum number of pixels for translation includes the maximum number of pixels for X-axis translation and the maximum number of pixels for Y-axis translation, wherein the X-axis The maximum number of translation pixels is the number of pixels accommodated by the width value of the display screen of the mobile terminal, and the maximum number of translation pixels of the Y axis is the number of pixels accommodated by the display height value of the mobile terminal;

所述单位加速度改变量对应的平移像素个数分为X轴向单位加速度改变量对应的平移像素个数和Y轴向单位加速度改变量对应的平移像素个数,X轴向单位加速度改变量对应的平移像素个数等于Y轴向单位加速度改变量对应的平移像素个数。The number of translation pixels corresponding to the unit acceleration change amount is divided into the number of translation pixels corresponding to the X-axis unit acceleration change amount and the translation pixel number corresponding to the Y-axis unit acceleration change amount, and the X-axis unit acceleration change amount corresponds to The number of translation pixels of is equal to the number of translation pixels corresponding to the unit acceleration change in the Y axis.

所述的移动终端根据加速度改变量平移显示内容的系统,其中,所述平移模块The system for the mobile terminal to translate the displayed content according to the acceleration change amount, wherein the translation module

用于若所述当前加速度与X轴向相同,则按照X轴向的平移像素个数沿X轴向平移显示内容;If the current acceleration is the same as the X-axis, the display content is translated along the X-axis according to the number of translation pixels in the X-axis;

用于若所述当前加速度与X轴向相反,则按照X轴向的平移像素个数沿X轴向反方向平移显示内容;If the current acceleration is opposite to the X-axis, the displayed content is translated in the opposite direction of the X-axis according to the number of translation pixels in the X-axis;

用于若所述当前加速度与Y轴向相同,则按照Y轴向的平移像素个数沿X轴向平移显示内容;If the current acceleration is the same as the Y axis, the display content will be translated along the X axis according to the number of translation pixels in the Y axis;

用于若所述当前加速度与Y轴向相反,则按照Y轴向的平移像素个数沿X轴向反方向平移显示内容。If the current acceleration is opposite to the Y axis, the display content will be translated in the opposite direction of the X axis according to the number of translation pixels of the Y axis.

本发明所提供的一种移动终端根据加速度改变量平移显示内容的方法及系统,通过获取加速度改变量平移移动终端显示屏的显示内容,增加了移动终端新功能,无需用户按键操作及触摸操作,只需甩动手机即可实现平移显示内容,使移动终端的显示内容的移动更加方便。The present invention provides a method and system for a mobile terminal to translate display content according to the acceleration change amount. By obtaining the acceleration change amount and shifting the display content of the display screen of the mobile terminal, a new function of the mobile terminal is added, and no key operation and touch operation by the user are required. The display content can be translated by simply shaking the mobile phone, so that the movement of the display content of the mobile terminal is more convenient.

附图说明Description of drawings

图1是本发明所述的移动终端根据加速度改变量平移显示内容的方法流程图。FIG. 1 is a flowchart of a method for a mobile terminal to translate display content according to an acceleration change amount according to the present invention.

图2是本发明所述的移动终端根据加速度改变量平移显示内容的系统结构图。Fig. 2 is a system structure diagram of the mobile terminal according to the present invention to translate the displayed content according to the acceleration change amount.

图3是本发明一实施例所述的移动终端内定义的X/Y坐标系示意图。Fig. 3 is a schematic diagram of an X/Y coordinate system defined in a mobile terminal according to an embodiment of the present invention.

图4是本发明一实施例所述的获取X轴向加速度改变量的流程图。Fig. 4 is a flow chart of obtaining the X-axis acceleration change according to an embodiment of the present invention.

图5是本发明一实施例所述的移动终端平移显示内容的前后对比图。Fig. 5 is a comparison diagram before and after the mobile terminal pans and displays content according to an embodiment of the present invention.

图6为本发明一实施例所述的显示内容移动路径示意图。FIG. 6 is a schematic diagram of a movement path of display content according to an embodiment of the present invention.

具体实施方式detailed description

本发明提供一种移动终端根据加速度改变量平移显示内容的方法及系统,为使本发明的目的、技术方案及效果更加清楚、明确,以下参照附图并举实例对本发明进一步详细说明。应当理解,此处所描述的具体实施例仅用以解释本发明,并不用于限定本发明。The present invention provides a method and system for a mobile terminal to translate and display content according to the acceleration change amount. In order to make the purpose, technical solution and effect of the present invention clearer and clearer, the present invention will be further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described here are only used to explain the present invention, not to limit the present invention.

请参见图1,图1是本发明所述的移动终端根据加速度改变量平移显示内容的方法流程图。如图1所示,本发明所述的移动终端根据加速度改变量平移显示内容的方法包括以下步骤:Please refer to FIG. 1 . FIG. 1 is a flowchart of a method for a mobile terminal to translate displayed content according to an acceleration change amount according to the present invention. As shown in Figure 1, the method for the mobile terminal according to the present invention to translate the display content according to the acceleration change amount includes the following steps:

101、预先设置一加速度阈值,及单位加速度改变量对应的平移像素个数;加速度阈值是一个固定加速度值,如2g,3g,2m/s2,3m/s2,作为启动平移显示内容功能的标准,根据用户甩动移动终端的情况,较佳的,所述加速度阈值为2g,g为重力加速度。单位加速度改变量对应的平移像素个数是指一个加速度时移动终端平移显示内容的平移像素个数,换句话说,就是平移像素个数与对应的加速度改变量的比值,由此可见,单位加速度改变量对应的平移像素个数也可以变相的设置为平移像素个数及与平移像素个数对应的加速度改变量,如在移动终端设置最大平移像素个数为500,与500对应的加速度改变量为20 m/s2,则单位加速度改变量对应的平移像素个数25个/ m/s2。所述单位加速度改变量对应的平移像素个数分为X轴向单位加速度改变量对应的平移像素个数和Y轴向单位加速度改变量对应的平移像素个数,X轴向单位加速度改变量对应的平移像素个数等于Y轴向单位加速度改变量对应的平移像素个数。101. Set an acceleration threshold in advance, and the number of translation pixels corresponding to the unit acceleration change; the acceleration threshold is a fixed acceleration value, such as 2g, 3g, 2m/s 2 , 3m/s 2 , which is used as the starting point for the translation display content function Standard, according to the situation of the user shaking the mobile terminal, preferably, the acceleration threshold is 2g, where g is the acceleration of gravity. The number of translation pixels corresponding to the unit acceleration change refers to the number of translation pixels when the mobile terminal pans the display content at an acceleration. In other words, it is the ratio of the number of translation pixels to the corresponding acceleration change. It can be seen that the unit acceleration The number of translation pixels corresponding to the change amount can also be set in disguise as the number of translation pixels and the acceleration change corresponding to the number of translation pixels. For example, the maximum number of translation pixels is set to 500 on the mobile terminal, and the acceleration change corresponding to 500 is 20 m/s 2 , then the number of translation pixels corresponding to the unit acceleration change is 25/m/s 2 . The number of translation pixels corresponding to the unit acceleration change amount is divided into the number of translation pixels corresponding to the unit acceleration change amount of the X axis and the number of translation pixels corresponding to the unit acceleration change amount of the Y axis. The number of translation pixels of is equal to the number of translation pixels corresponding to the unit acceleration change in the Y axis.

102、实时获取移动终端当前加速度;移动终端内设有加速度传感器,能够实时感应当前的移动终端加速度,该技术为现有技术,不再赘述。102. Obtain the current acceleration of the mobile terminal in real time; the mobile terminal is provided with an acceleration sensor that can sense the current acceleration of the mobile terminal in real time. This technology is an existing technology and will not be repeated here.

103、判断当前加速度的绝对值是否大于加速度阈值,若是,则执行步骤104;若否,则继续判断当前加速度的绝对值是否大于加速度阈值。103. Determine whether the absolute value of the current acceleration is greater than the acceleration threshold, if yes, perform step 104; if not, continue to determine whether the absolute value of the current acceleration is greater than the acceleration threshold.

104、获取X轴向的加速度改变量和/或Y轴向的加速度改变量,所述X轴向平行于移动终端屏幕向右,所述Y轴向平行于移动终端屏幕向上。104. Acquire the acceleration change amount of the X-axis and/or the acceleration change amount of the Y-axis, the X-axis is parallel to the screen of the mobile terminal to the right, and the Y-axis is parallel to the screen of the mobile terminal upward.

获取X轴向的加速度改变量具体包括:若当前加速度的X轴向的分加速度与X轴向相同,且大于加速度阈值,则实时获取加速度变大过程中的X轴向加速度最大值,若加速度由变大转为变小,则实时获取加速度变小过程中的X轴向加速度最小值,若加速度由变小转为变大或者加速度等于加速度阈值,则停止获取,并根据X轴向加速度最大值及X轴向加速度最小值计算X轴向加速度改变量;若当前加速度的X轴向的分加速度与X轴向相反,且小于负的加速度阈值,则实时获取加速度变小过程中的X轴向加速度最小值,若加速度由变小转为变大,则实时获取加速度变大过程中的X轴向加速度最大值,若加速度由变大转为变小或者加速度等于加速度阈值,则停止获取,并根据X轴向加速度最大值及X轴向加速度最小值计算X轴向加速度改变量。X轴向加速度改变量的获取过程,请参见图4。图4是本发明一实施例所述的获取X轴向加速度改变量的流程图。如图4所示,获取X轴向加速度改变量包括以下步骤:Obtaining the acceleration change in the X-axis specifically includes: if the sub-acceleration in the X-axis of the current acceleration is the same as the X-axis and greater than the acceleration threshold, then obtain the maximum value of the acceleration in the X-axis in real time during the process of increasing the acceleration. When changing from large to small, the minimum value of the acceleration in the X-axis during the process of decreasing the acceleration will be obtained in real time. If the acceleration changes from small to large or the acceleration is equal to the acceleration threshold, the acquisition will be stopped, and the maximum value of the acceleration in the X-axis will be obtained. value and the minimum value of the X-axis acceleration to calculate the change of the X-axis acceleration; if the sub-acceleration of the X-axis of the current acceleration is opposite to that of the X-axis and is less than the negative acceleration threshold, the X-axis during the process of decreasing acceleration will be obtained in real time To the minimum value of the acceleration, if the acceleration changes from small to large, the maximum value of the acceleration in the X-axis during the acceleration process is obtained in real time, and if the acceleration changes from large to small or the acceleration is equal to the acceleration threshold, the acquisition is stopped. And calculate the change amount of the X-axis acceleration according to the maximum value of the X-axis acceleration and the minimum value of the X-axis acceleration. For the acquisition process of the X-axis acceleration change amount, please refer to Figure 4. Fig. 4 is a flow chart of obtaining the X-axis acceleration change according to an embodiment of the present invention. As shown in Figure 4, obtaining the acceleration change in the X-axis includes the following steps:

步骤S101、获取X轴上的加速度值x;获取总加速度在X轴上的分加速度x。Step S101 , acquiring the acceleration value x on the X-axis; acquiring the component acceleration x of the total acceleration on the X-axis.

步骤S102、比较x与Xth的大小,当x大于Xth则执行步骤S103,当x小于-Xth则执行步骤S108,其他情况时执行步骤S101;Xth为预先设置的加速度阈值。Step S102, compare the size of x and Xth, when x is greater than Xth, execute step S103, when x is less than -Xth, execute step S108, otherwise execute step S101; Xth is the preset acceleration threshold.

步骤S103、将x值赋给x1,获取X轴上的加速度值x;Step S103, assign the value of x to x1, and obtain the acceleration value x on the X-axis;

步骤S104、判断x是否大于或等于x1,如果是则执行步骤S103,否则执行步骤S105;Step S104, judging whether x is greater than or equal to x1, if yes, execute step S103, otherwise execute step S105;

步骤S105、将x值赋给x2,获取X轴上的加速度值x;Step S105, assign the value of x to x2, and obtain the acceleration value x on the X-axis;

步骤S106、判断x是否满足x小于或等于x2且|x2|大于Xth,如果是则执行步骤S105,否则执行步骤S107;Step S106, judging whether x satisfies that x is less than or equal to x2 and |x2| is greater than Xth, if yes, execute step S105, otherwise execute step S107;

步骤S107、计算X轴上平移像素的个数XP=XPM*|x1-x2|/XM,方向为X轴正方向,其中,XP为平移像素个数,XPM为最大平移像素个数,XM为与XPM对应的最大加速度改变量;Step S107, calculate the number of translation pixels on the X-axis XP=XPM*|x1-x2|/XM, the direction is the positive direction of the X-axis, where XP is the number of translation pixels, XPM is the maximum number of translation pixels, and XM is The maximum acceleration change corresponding to XPM;

步骤S108、将x值赋给x1,获取X轴上的加速度值x;Step S108, assign the value of x to x1, and obtain the acceleration value x on the X-axis;

步骤S109、判断x是否小于或等于x1,如果是则执行步骤S108,否则执行步骤S110;Step S109, judging whether x is less than or equal to x1, if yes, execute step S108, otherwise execute step S110;

步骤S110、将x值赋给x2,获取X轴上的加速度值x;Step S110, assign the value of x to x2, and obtain the acceleration value x on the X-axis;

步骤S111、判断x是否满足x大于或等于x2且|x2|大于Xth,如果是则执行步骤S110,否则执行步骤S112;Step S111, judging whether x satisfies that x is greater than or equal to x2 and |x2| is greater than Xth, if yes, execute step S110, otherwise execute step S112;

步骤S112、计算X轴上平移像素的个数XP=XPM*|x1-x2|/XM,方向为X轴负方向,其中,XP为平移像素个数,XPM为最大平移像素个数,XM为与XPM对应的最大加速度改变量。Step S112, calculating the number of translation pixels on the X-axis XP=XPM*|x1-x2|/XM, the direction is the negative direction of the X-axis, where XP is the number of translation pixels, XPM is the maximum number of translation pixels, and XM is Maximum acceleration change corresponding to XPM.

其中,所述步骤S107、步骤S112中,XPM为最大平移像素个数,XM为设定的|x1-x2|最大值,在步骤S107、步骤S112中若|x1-x2|大于XM,则XP=XPM。Wherein, in the steps S107 and S112, XPM is the maximum number of translation pixels, and XM is the set maximum value of |x1-x2|. If |x1-x2| is greater than XM in steps S107 and S112, then XP =XPM.

获取Y轴向的加速度改变量具体包括:若当前加速度的Y轴向的分加速度与Y轴向相同,且大于加速度阈值,则实时获取加速度变大过程中的Y轴向加速度最大值,若加速度由变大转为变小,则实时获取加速度变小过程中的Y轴向加速度最小值,若加速度由变小转为变大或者加速度等于加速度阈值,则停止获取,并根据Y轴向加速度最大值及Y轴向加速度最小值计算Y轴向加速度改变量;若当前加速度的Y轴向的分加速度与Y轴向相反,且小于负的加速度阈值,则实时获取加速度变小过程中的Y轴向加速度最小值,若加速度由变小转为变大,则实时获取加速度变大过程中的Y轴向加速度最大值,若加速度由变大转为变小或者加速度等于加速度阈值,则停止获取,并根据Y轴向加速度最大值及Y轴向加速度最小值计算Y轴向加速度改变量。获取Y轴向加速度改变量与获取X轴向加速度改变量的过程一样,在此不再赘述。Obtaining the acceleration change in the Y-axis specifically includes: if the sub-acceleration of the Y-axis of the current acceleration is the same as that of the Y-axis and is greater than the acceleration threshold, then obtain the maximum value of the acceleration in the Y-axis in the process of increasing the acceleration in real time. If the acceleration changes from large to small, the minimum value of the Y-axis acceleration during the process of decreasing the acceleration will be obtained in real time. If the acceleration changes from small to large or the acceleration is equal to the acceleration threshold, the acquisition will be stopped, and the maximum value of the Y-axis acceleration will be obtained. value and the minimum value of the Y-axis acceleration to calculate the change of the Y-axis acceleration; if the sub-acceleration of the Y-axis of the current acceleration is opposite to that of the Y-axis and is less than the negative acceleration threshold, the Y-axis during the process of decreasing acceleration will be obtained in real time To the minimum value of the acceleration, if the acceleration changes from small to large, the maximum value of the Y-axis acceleration in the process of increasing the acceleration will be obtained in real time. If the acceleration changes from large to small or the acceleration is equal to the acceleration threshold, the acquisition will be stopped. And calculate the Y-axis acceleration change amount according to the Y-axis acceleration maximum value and the Y-axis acceleration minimum value. The process of obtaining the acceleration change in the Y-axis is the same as the process of obtaining the change in the X-axis acceleration, and will not be repeated here.

移动终端内定义有X/Y坐标系,具体请参见图3,图3是本发明一实施例所述的移动终端内定义的X/Y坐标系示意图。如图3所示,移动终端301设置有加速度传感器302,基于移动终端的主视图,对X/Y坐标系定义如下:所述X轴向平行于移动终端屏幕向右,所述Y轴向平行于移动终端屏幕向上。An X/Y coordinate system is defined in the mobile terminal, please refer to FIG. 3 for details. FIG. 3 is a schematic diagram of an X/Y coordinate system defined in the mobile terminal according to an embodiment of the present invention. As shown in Figure 3, the mobile terminal 301 is provided with an acceleration sensor 302. Based on the front view of the mobile terminal, the X/Y coordinate system is defined as follows: the X axis is parallel to the screen of the mobile terminal to the right, and the Y axis is parallel to Up on the screen of the mobile terminal.

105、将X轴向的加速度改变量与单位加速度改变量对应的平移像素个数做乘积运算获取X轴向的平移像素个数,和/或将Y轴向的加速度改变量单位加速度改变量对应的平移像素个数做乘积运算获取Y轴向的平移像素个数。设X轴向的加速度改变量为Z,单位加速度改变量对应的平移像素个数为P,则X轴向的平移像素个数=Z*P;Y轴向的加速度改变量计算与X轴向的加速度改变量相同。需要说明一点,如果设置的是某个移动像素个数与对应的加速度改变量,如某个移动像素个数为F,对应的加速度改变量为T,获取的加速度改变量为L,则平移像素个数=F*L/T。105. Perform a product operation on the X-axis acceleration change amount and the number of translation pixels corresponding to the unit acceleration change amount to obtain the X-axis translation pixel number, and/or correspond to the Y-axis acceleration change amount per unit acceleration change amount The number of translation pixels is multiplied to obtain the number of translation pixels in the Y-axis. Assuming that the acceleration change in the X-axis is Z, and the number of translation pixels corresponding to the unit acceleration change is P, then the number of translation pixels in the X-axis = Z*P; the calculation of the acceleration change in the Y-axis is the same as that in the X-axis The change in acceleration is the same. It needs to be explained that if the number of moving pixels and the corresponding acceleration change are set, for example, the number of moving pixels is F, the corresponding acceleration change is T, and the obtained acceleration change is L, then the translation pixel Number=F*L/T.

106、按照X轴向的平移像素个数和/或Y轴向的平移像素个数平移显示内容。显示内容的移动为现有技术,在此不再赘述。需要说明的是,如果获取的只有X轴向平移像素个数,则只在X轴上移动;如果获取的只有Y轴向平移像素个数,则只在Y轴上移动;如果同时获取了X轴向平移像素个数及Y轴向平移像素个数,则可先在X轴上移动,然后再在Y轴上移动,当然,反过来亦可,还可以按照Y轴向平移像素个数与X轴向平移像素个数比值进行移动,如图6所示。图6为本发明一实施例所述的显示内容移动路径示意图,如图6所示,601为Y轴向平移像素个数,603为X轴向平移像素个数,在X/Y坐标系中,设坐标点J的X坐标为X轴向平移像素个数,Y坐标为Y轴向平移像素个数,则在X/Y坐标系中必然存在对于的J点,将J坐标点与坐标原点连线,必然形成一条线段603,可以线段603作为显示内容每个点的移动轨迹即可使显示内容按照Y轴向平移像素个数与X轴向平移像素个数比值进行移动。106. Translate the display content according to the number of pixels to be translated in the X axis and/or the number of pixels to be translated in the Y axis. The movement of the display content is a prior art, and will not be repeated here. It should be noted that if only the number of translation pixels in the X-axis is obtained, it will only move on the X-axis; if only the number of translation pixels in the Y-axis is obtained, it will only move on the Y-axis; The number of pixels to be translated in the axial direction and the number of pixels to be translated in the Y-axis can be moved on the X-axis first, and then moved on the Y-axis. Of course, the reverse is also possible, and the number of pixels and The X-axis is translated by the ratio of the number of pixels to move, as shown in Figure 6. Fig. 6 is a schematic diagram of the movement path of display content according to an embodiment of the present invention. As shown in Fig. 6, 601 is the number of pixels to be translated in the Y axis, and 603 is the number of pixels to be translated in the X axis. In the X/Y coordinate system , if the X coordinate of coordinate point J is the number of pixels translated in the X axis, and the Y coordinate is the number of pixels translated in the Y axis, then there must be a corresponding point J in the X/Y coordinate system, and the J coordinate point and the coordinate origin The connection will inevitably form a line segment 603, and the line segment 603 can be used as the moving track of each point of the display content to make the display content move according to the ratio of the number of pixels translated in the Y axis to the number of pixels translated in the X axis.

如上所述的移动终端根据加速度改变量平移显示内容的方法,通过获取加速度,进一步获取加速度改变量,根据加速度改变量平移显示内容,使用户可通过甩动移动终端实现显示内容的平移,使显示内容的移动脱离传统的触摸操作及按键操作方式,并且,若浏览显示内容尺寸大于显示屏尺寸,则获取显示内容会更加方便。According to the above-mentioned method for the mobile terminal to translate the display content according to the acceleration change amount, by acquiring the acceleration, the acceleration change amount is further obtained, and the display content is translated according to the acceleration change amount, so that the user can realize the translation of the display content by shaking the mobile terminal, so that the display The movement of the content deviates from the traditional touch operation and button operation, and if the size of the browsing display content is larger than the size of the display screen, it will be more convenient to obtain the display content.

为使本申请更加清楚明了,请参见图5。图5是本发明一实施例所述的移动终端平移显示内容的前后对比图,如图5所示,502为移动终端显示屏,501为显示内容移动前的界面,所述的显示内容包括显示屏显示内容和显示屏没有显示的内容,503为显示内容移动后的界面,505为显示内容在X轴向的平移像素个数对应的距离,504为显示内容在Y轴向的平移像素个数对应的距离。For clarity of this application, please refer to FIG. 5 . Fig. 5 is a comparison diagram before and after the translation display content of the mobile terminal according to an embodiment of the present invention. As shown in Fig. 5, 502 is the display screen of the mobile terminal, and 501 is the interface before the display content moves, and the display content includes display The content displayed on the screen and the content not displayed on the screen, 503 is the interface after the display content is moved, 505 is the distance corresponding to the number of translation pixels of the display content in the X axis, and 504 is the number of translation pixels of the display content in the Y axis corresponding distance.

所述的移动终端根据加速度改变量平移显示内容的方法,优选的,所述步骤106之前包括:将X轴向的平移像素个数和/或Y轴向的平移像素个数与一预先设置的最大平移像素个数比较,若X轴向的平移像素个数和/或Y轴向的平移像素个数大于最大平移像素个数,则令X轴向的平移像素个数和/或Y轴向的平移像素个数等于最大平移像素个数。移动终端显示屏显示内容有限,如果将显示内容移动的过大,则相邻的两次显示屏显示内容可能不存在交集,这样用户就无法获取两次显示屏显示内容之间的内容。为确保用户能够全部内容,设置了最大平移像素个数,具体如上所述。In the method for the mobile terminal to translate the display content according to the acceleration change amount, preferably, before the step 106, it includes: combining the number of translation pixels in the X-axis and/or the number of translation pixels in the Y-axis with a preset Comparison of the maximum number of translation pixels, if the number of translation pixels in the X-axis and/or the number of translation pixels in the Y-axis is greater than the maximum number of translation pixels, then the number of translation pixels in the X-axis and/or the number of Y-axis The number of translation pixels of is equal to the maximum number of translation pixels. The display content of the display screen of the mobile terminal is limited. If the display content is moved too large, the display content of two adjacent display screens may not overlap, so that the user cannot obtain the content between the display content of the two display screens. In order to ensure that the user can see all the content, the maximum number of panning pixels is set, as described above.

所述的移动终端根据加速度改变量平移显示内容的方法,优选的,所述预先设置的最大平移像素个数包括X轴最大平移像素个数及Y轴最大平移像素个数,其中,所述X轴最大平移像素个数为移动终端显示屏宽度值所容纳的像素个数,所述Y轴最大平移像素个数为移动终端显示高度值所容纳的像素个数;与上述不同是,所述X轴最大平移像素个数为移动终端显示屏宽度值所容纳的像素个数,所述Y轴最大平移像素个数为移动终端显示高度值所容纳的像素个数。换句话说,在X轴向上的最大移动像素个数对应的距离等于移动终端显示屏宽度值,在Y轴向上的最大移动像素个数对应的距离等于移动终端显示屏高度值。In the method for the mobile terminal to translate the displayed content according to the acceleration change amount, preferably, the preset maximum number of pixels to be translated includes the maximum number of pixels to be translated on the X axis and the maximum number of pixels to be translated on the Y axis, wherein the X The maximum number of translation pixels of the axis is the number of pixels accommodated by the width value of the display screen of the mobile terminal, and the maximum number of translation pixels of the Y axis is the number of pixels accommodated by the display height value of the mobile terminal; different from the above, the X The maximum number of translation pixels of the axis is the number of pixels accommodated by the width value of the display screen of the mobile terminal, and the maximum number of translation pixels of the Y axis is the number of pixels accommodated by the display height value of the mobile terminal. In other words, the distance corresponding to the maximum number of moving pixels on the X-axis is equal to the width of the display screen of the mobile terminal, and the distance corresponding to the maximum number of moving pixels on the Y-axis is equal to the height of the display screen of the mobile terminal.

所述的移动终端根据加速度改变量平移显示内容的方法,优选的,所述步骤106具体包括:若所述当前加速度与X轴向相同,则按照X轴向的平移像素个数沿X轴向平移显示内容;若所述当前加速度与X轴向相反,则按照X轴向的平移像素个数沿X轴向反方向平移显示内容;若所述当前加速度与Y轴向相同,则按照Y轴向的平移像素个数沿X轴向平移显示内容;若所述当前加速度与Y轴向相反,则按照Y轴向的平移像素个数沿X轴向反方向平移显示内容。显示内容移动的方式如现有的触摸操作相同,不改变用户习惯。In the method for the mobile terminal to translate the displayed content according to the acceleration change amount, preferably, the step 106 specifically includes: if the current acceleration is the same as the X-axis, then move the number of pixels along the X-axis according to the number of translation pixels in the X-axis Translate the displayed content; if the current acceleration is opposite to the X-axis, then translate the displayed content along the opposite direction of the X-axis according to the number of translation pixels in the X-axis; if the current acceleration is the same as the Y-axis, then follow the Y-axis If the current acceleration is opposite to the Y axis, the display content will be translated in the opposite direction of the X axis according to the number of pixels to be translated in the Y axis. The way of display content movement is the same as the existing touch operation, without changing user habits.

请参见图2,图2是本发明所述的移动终端根据加速度改变量平移显示内容的系统结构图。如图2所示,本发明所述的移动终端根据加速度改变量平移显示内容的系统包括:Please refer to FIG. 2 . FIG. 2 is a system structure diagram of the mobile terminal according to the present invention to translate the displayed content according to the acceleration change amount. As shown in Figure 2, the system for the mobile terminal according to the present invention to translate the displayed content according to the acceleration change amount includes:

存储模块201,用于预先设置一加速度阈值,及单位加速度改变量对应的平移像素个数,具体如上所述;The storage module 201 is used to preset an acceleration threshold and the number of translation pixels corresponding to the unit acceleration change amount, specifically as described above;

判断模块202,用于判断当前加速度的绝对值是否大于加速度阈值,具体如上所述;A judging module 202, configured to judge whether the absolute value of the current acceleration is greater than the acceleration threshold, specifically as described above;

加速度获取模块203,用于实时获取移动终端当前加速度,具体如上所述;The acceleration acquisition module 203 is used to acquire the current acceleration of the mobile terminal in real time, specifically as described above;

改变量获取模块204,用于获取X轴向的加速度改变量和/或Y轴向的加速度改变量,所述X轴向平行于移动终端屏幕向右,所述Y轴向平行于移动终端屏幕向上,具体如上所述;The change amount obtaining module 204 is used to obtain the acceleration change amount of the X axis and/or the acceleration change amount of the Y axis, the X axis is parallel to the screen of the mobile terminal to the right, and the Y axis is parallel to the screen of the mobile terminal upward, specifically as described above;

计算模块205,用于将X轴向的加速度改变量与单位加速度改变量对应的平移像素个数做乘积运算获取X轴向的平移像素个数,和/或将Y轴向的加速度改变量单位加速度改变量对应的平移像素个数做乘积运算获取Y轴向的平移像素个数; ,具体如上所述The calculation module 205 is used to multiply the acceleration change amount of the X-axis and the number of translation pixels corresponding to the unit acceleration change amount to obtain the number of translation pixels in the X-axis direction, and/or calculate the acceleration change amount of the Y-axis unit The number of translation pixels corresponding to the acceleration change is multiplied to obtain the number of translation pixels in the Y-axis; , as described above

平移模块206,用于根据X轴向的平移像素个数和/或Y轴向的平移像素个数平移显示内容,具体如上所述。The translation module 206 is configured to translate the displayed content according to the number of pixels to be translated in the X-axis and/or the number of pixels to be translated in the Y-axis, specifically as described above.

所述的移动终端根据加速度改变量平移显示内容的系统,优选的,所述改变量获取模块,具体如上所述,In the system for the mobile terminal to translate the displayed content according to the acceleration change amount, preferably, the change amount acquisition module, specifically as described above,

用于若当前加速度的X轴向的分加速度与X轴向相同,且大于加速度阈值,则实时获取加速度变大过程中的X轴向加速度最大值,若加速度由变大转为变小,则实时获取加速度变小过程中的X轴向加速度最小值,若加速度由变小转为变大或者加速度等于加速度阈值,则停止获取,并根据X轴向加速度最大值及X轴向加速度最小值计算X轴向加速度改变量,具体如上所述;If the sub-acceleration of the X-axis of the current acceleration is the same as that of the X-axis and is greater than the acceleration threshold, the maximum value of the acceleration in the X-axis during the process of increasing the acceleration is obtained in real time. If the acceleration changes from increasing to decreasing, then Acquire the minimum value of the X-axis acceleration in the process of decreasing acceleration in real time. If the acceleration changes from decreasing to increasing or the acceleration is equal to the acceleration threshold, stop acquiring and calculate based on the maximum value of the X-axis acceleration and the minimum value of the X-axis acceleration X-axis acceleration change amount, specifically as above;

用于若当前加速度的X轴向的分加速度与X轴向相反,且小于负的加速度阈值,则实时获取加速度变小过程中的X轴向加速度最小值,若加速度由变小转为变大,则实时获取加速度变大过程中的X轴向加速度最大值,若加速度由变大转为变小或者加速度等于加速度阈值,则停止获取,并根据X轴向加速度最大值及X轴向加速度最小值计算X轴向加速度改变量,具体如上所述;If the sub-acceleration of the X-axis of the current acceleration is opposite to the X-axis and is less than the negative acceleration threshold, the minimum value of the acceleration in the X-axis during the process of decreasing the acceleration is obtained in real time. If the acceleration changes from decreasing to increasing , then obtain the maximum value of the X-axis acceleration in the process of increasing the acceleration in real time. If the acceleration changes from large to small or the acceleration is equal to the acceleration threshold, the acquisition is stopped, and according to the maximum value of the X-axis acceleration and the minimum value of the X-axis acceleration value to calculate the X-axis acceleration change amount, as described above;

用于若当前加速度的Y轴向的分加速度与Y轴向相同,且大于加速度阈值,则实时获取加速度变大过程中的Y轴向加速度最大值,若加速度由变大转为变小,则实时获取加速度变小过程中的Y轴向加速度最小值,若加速度由变小转为变大或者加速度等于加速度阈值,则停止获取,并根据Y轴向加速度最大值及Y轴向加速度最小值计算Y轴向加速度改变量,具体如上所述;If the sub-acceleration of the Y-axis of the current acceleration is the same as that of the Y-axis and is greater than the acceleration threshold, the maximum value of the acceleration in the Y-axis during the process of increasing the acceleration is obtained in real time. If the acceleration changes from increasing to decreasing, then Obtain the minimum value of the Y-axis acceleration in the process of decreasing acceleration in real time. If the acceleration changes from decreasing to increasing or the acceleration is equal to the acceleration threshold, stop acquiring and calculate based on the maximum value of the Y-axis acceleration and the minimum value of the Y-axis acceleration The amount of acceleration change in the Y axis, specifically as described above;

用于若当前加速度的Y轴向的分加速度与Y轴向相反,且小于负的加速度阈值,则实时获取加速度变小过程中的Y轴向加速度最小值,若加速度由变小转为变大,则实时获取加速度变大过程中的Y轴向加速度最大值,若加速度由变大转为变小或者加速度等于加速度阈值,则停止获取,并根据Y轴向加速度最大值及Y轴向加速度最小值计算Y轴向加速度改变量,具体如上所述。If the sub-acceleration of the Y-axis of the current acceleration is opposite to the Y-axis and is less than the negative acceleration threshold, the minimum value of the acceleration in the Y-axis during the process of decreasing the acceleration is obtained in real time. If the acceleration changes from decreasing to increasing , then obtain the maximum value of the Y-axis acceleration in the process of increasing the acceleration in real time. If the acceleration changes from large to small or the acceleration is equal to the acceleration threshold, the acquisition is stopped, and according to the maximum value of the Y-axis acceleration and the minimum value of the Y-axis acceleration The value calculates the amount of acceleration change in the Y axis, as described above.

所述的移动终端根据加速度改变量平移显示内容的系统,优选的,还包括:比较模块,用于将X轴向的平移像素个数和/或Y轴向的平移像素个数与一预先设置的最大平移像素个数比较,若X轴向的平移像素个数和/或Y轴向的平移像素个数大于最大平移像素个数,则令X轴向的平移像素个数和/或Y轴向的平移像素个数等于最大平移像素个数,具体如上所述。The system for the mobile terminal to translate the display content according to the acceleration change, preferably, further includes: a comparison module, which is used to compare the number of translation pixels in the X-axis and/or the number of translation pixels in the Y-axis with a preset Compared with the maximum number of translation pixels, if the number of translation pixels in the X-axis and/or the number of translation pixels in the Y-axis is greater than the maximum number of translation pixels, then the number of translation pixels in the X-axis and/or the number of Y-axis The number of translation pixels in the direction is equal to the maximum number of translation pixels, as described above.

所述的移动终端根据加速度改变量平移显示内容的系统,优选的,所述预先设置的最大平移像素个数包括X轴最大平移像素个数及Y轴最大平移像素个数,其中,所述X轴最大平移像素个数为移动终端显示屏宽度值所容纳的像素个数,所述Y轴最大平移像素个数为移动终端显示高度值所容纳的像素个数,具体如上所述;In the system for the mobile terminal to translate the displayed content according to the acceleration change amount, preferably, the preset maximum number of pixels for translation includes the maximum number of pixels for X-axis translation and the number of pixels for Y-axis maximum translation, wherein the X The maximum number of translation pixels of the axis is the number of pixels accommodated by the width value of the display screen of the mobile terminal, and the maximum number of translation pixels of the Y axis is the number of pixels accommodated by the display height value of the mobile terminal, specifically as described above;

所述单位加速度改变量对应的平移像素个数分为X轴向单位加速度改变量对应的平移像素个数和Y轴向单位加速度改变量对应的平移像素个数,X轴向单位加速度改变量对应的平移像素个数等于Y轴向单位加速度改变量对应的平移像素个数,具体如上所述。The number of translation pixels corresponding to the unit acceleration change amount is divided into the number of translation pixels corresponding to the X-axis unit acceleration change amount and the translation pixel number corresponding to the Y-axis unit acceleration change amount, and the X-axis unit acceleration change amount corresponds to The number of translation pixels of is equal to the number of translation pixels corresponding to the unit acceleration change in the Y axis, as described above specifically.

所述的移动终端根据加速度改变量平移显示内容的系统,优选的,所述平移模块用于若所述当前加速度与X轴向相同,则按照X轴向的平移像素个数沿X轴向平移显示内容;用于若所述当前加速度与X轴向相反,则按照X轴向的平移像素个数沿X轴向反方向平移显示内容;用于若所述当前加速度与Y轴向相同,则按照Y轴向的平移像素个数沿X轴向平移显示内容;用于若所述当前加速度与Y轴向相反,则按照Y轴向的平移像素个数沿X轴向反方向平移显示内容,具体如上所述。In the system for the mobile terminal to translate the display content according to the acceleration change amount, preferably, the translation module is used to translate along the X axis according to the number of pixels to be translated in the X axis if the current acceleration is the same as the X axis Display content; if the current acceleration is opposite to the X-axis, then translate the display content along the opposite direction of the X-axis according to the number of translation pixels in the X-axis; if the current acceleration is the same as the Y-axis, then Translate the display content along the X axis according to the number of translation pixels in the Y axis; if the current acceleration is opposite to the Y axis, then translate the display content in the opposite direction of the X axis according to the number of translation pixels in the Y axis, Specifically as above.

综上所述,本发明所提供的一种移动终端根据加速度改变量平移显示内容的方法及系统,通过获取加速度改变量平移移动终端显示屏的显示内容,增加了移动终端新功能,无需用户按键操作及触摸操作,只需甩动手机即可实现平移显示内容,使移动终端的显示内容的移动更加方便。To sum up, the present invention provides a method and system for a mobile terminal to translate the display content according to the acceleration change amount. By obtaining the acceleration change amount to translate the display content of the mobile terminal display screen, a new function of the mobile terminal is added without the need for the user to press a button. Operation and touch operation, you only need to shake the mobile phone to realize the translation of the display content, which makes the movement of the display content of the mobile terminal more convenient.

应当理解的是,本发明的应用不限于上述的举例,对本领域普通技术人员来说,可以根据上述说明加以改进或变换,所有这些改进和变换都应属于本发明所附权利要求的保护范围。It should be understood that the application of the present invention is not limited to the above examples, and those skilled in the art can make improvements or transformations according to the above descriptions, and all these improvements and transformations should belong to the protection scope of the appended claims of the present invention.

Claims (4)

1.一种移动终端根据加速度改变量平移显示内容的方法,其特征在于,包括以下步骤:1. A method for a mobile terminal to translate and display content according to the acceleration change amount, it is characterized in that, comprising the following steps: A、预先设置一加速度阈值,及单位加速度改变量对应的平移像素个数;A. Preset an acceleration threshold and the number of translation pixels corresponding to the unit acceleration change; B、实时获取移动终端当前加速度;B. Obtain the current acceleration of the mobile terminal in real time; C、判断当前加速度的绝对值是否大于加速度阈值,若是,则执行步骤D;C. Determine whether the absolute value of the current acceleration is greater than the acceleration threshold, if so, execute step D; D、获取X轴向的加速度改变量和/或Y轴向的加速度改变量,所述X轴向平行于移动终端屏幕向右,所述Y轴向平行于移动终端屏幕向上;D. Obtain the acceleration change amount of the X axis and/or the acceleration change amount of the Y axis, the X axis is parallel to the mobile terminal screen to the right, and the Y axis is parallel to the mobile terminal screen upward; E、将X轴向的加速度改变量与单位加速度改变量对应的平移像素个数做乘积运算获取X轴向的平移像素个数,和/或将Y轴向的加速度改变量单位加速度改变量对应的平移像素个数做乘积运算获取Y轴向的平移像素个数;E. The acceleration change in the X-axis is multiplied by the number of translation pixels corresponding to the unit acceleration change to obtain the number of translation pixels in the X-axis, and/or the acceleration change in the Y-axis is corresponding to the unit acceleration change The number of translation pixels is multiplied to obtain the number of translation pixels in the Y axis; F、按照X轴向的平移像素个数和/或Y轴向的平移像素个数平移显示内容;F. The displayed content is shifted according to the number of shifted pixels in the X-axis and/or the number of shifted pixels in the Y-axis; 所述单位加速度改 变量对应的平移像素个数,是指平移像素个数与对应的加速度改变量的比值;The translation pixel number corresponding to the unit acceleration change amount refers to the ratio of the translation pixel number and the corresponding acceleration change amount; 所述步骤F之前包括:Said step F comprises before: 将X轴向的平移像素个数和/或Y轴向的平移像素个数与一预先设置的最大平移像素个数比较,若X轴向的平移像素个数和/或Y轴向的平移像素个数大于最大平移像素个数,则令X轴向的平移像素个数和/或Y轴向的平移像素个数等于最大平移像素个数;Compare the number of translation pixels in the X-axis and/or the number of translation pixels in the Y-axis with a preset maximum number of translation pixels, if the number of translation pixels in the X-axis and/or the number of translation pixels in the Y-axis If the number is greater than the maximum number of translation pixels, the number of translation pixels in the X-axis and/or the number of translation pixels in the Y-axis is equal to the maximum number of translation pixels; 所述步骤D具体包括:Described step D specifically comprises: 若当前加速度的X轴向的分加速度与X轴向相同,且大于加速度阈值,则实时获取加速度变大过程中的X轴向加速度最大值,若加速度由变大转为变小,则实时获取加速度变小过程中的X轴向加速度最小值,若加速度由变小转为变大或者加速度等于加速度阈值,则停止获取,并根据X轴向加速度最大值及X轴向加速度最小值计算X轴向加速度改变量;If the sub-acceleration of the X-axis of the current acceleration is the same as that of the X-axis and is greater than the acceleration threshold, the maximum value of the acceleration in the X-axis during the process of increasing the acceleration will be obtained in real time. The minimum value of the X-axis acceleration during the process of decreasing the acceleration. If the acceleration changes from decreasing to increasing or the acceleration is equal to the acceleration threshold, stop acquiring and calculate the X-axis according to the maximum value of the X-axis acceleration and the minimum value of the X-axis acceleration Amount of change in acceleration; 若当前加速度的X轴向的分加速度与X轴向相反,且小于负的加速度阈值,则实时获取加速度变小过程中的X轴向加速度最小值,若加速度由变小转为变大,则实时获取加速度变大过程中的X轴向加速度最大值,若加速度由变大转为变小或者加速度等于加速度阈值,则停止获取,并根据X轴向加速度最大值及X轴向加速度最小值计算X轴向加速度改变量;If the sub-acceleration of the X-axis of the current acceleration is opposite to that of the X-axis and is less than the negative acceleration threshold, the minimum value of the acceleration in the X-axis during the process of decreasing the acceleration is obtained in real time. If the acceleration changes from decreasing to increasing, then Obtain the maximum value of the acceleration in the X-axis in real time during the acceleration process. If the acceleration changes from large to small or the acceleration is equal to the acceleration threshold, the acquisition will be stopped and calculated based on the maximum value of the acceleration in the X-axis and the minimum value of the acceleration in the X-axis. X-axis acceleration change amount; 若当前加速度的Y轴向的分加速度与Y轴向相同,且大于加速度阈值,则实时获取加速度变大过程中的Y轴向加速度最大值,若加速度由变大转为变小,则实时获取加速度变小过程中的Y轴向加速度最小值,若加速度由变小转为变大或者加速度等于加速度阈值,则停止获取,并根据Y轴向加速度最大值及Y轴向加速度最小值计算Y轴向加速度改变量;If the sub-acceleration of the Y-axis of the current acceleration is the same as that of the Y-axis and is greater than the acceleration threshold, the maximum value of the acceleration in the Y-axis during the process of increasing the acceleration will be obtained in real time. The minimum value of the Y-axis acceleration during the process of decreasing the acceleration. If the acceleration changes from decreasing to increasing or the acceleration is equal to the acceleration threshold, stop acquiring and calculate the Y-axis based on the maximum value of the Y-axis acceleration and the minimum value of the Y-axis acceleration Amount of change in acceleration; 若当前加速度的Y轴向的分加速度与Y轴向相反,且小于负的加速度阈值,则实时获取加速度变小过程中的Y轴向加速度最小值,若加速度由变小转为变大,则实时获取加速度变大过程中的Y轴向加速度最大值,若加速度由变大转为变小或者加速度等于加速度阈值,则停止获取,并根据Y轴向加速度最大值及Y轴向加速度最小值计算Y轴向加速度改变量;If the sub-acceleration of the Y-axis of the current acceleration is opposite to the Y-axis and is less than the negative acceleration threshold, the minimum value of the Y-axis acceleration during the acceleration reduction process is obtained in real time. If the acceleration changes from small to large, then Real-time acquisition of the maximum value of the Y-axis acceleration during the acceleration process. If the acceleration changes from large to small or the acceleration is equal to the acceleration threshold, the acquisition is stopped and calculated based on the maximum value of the Y-axis acceleration and the minimum value of the Y-axis acceleration. Y-axis acceleration change amount; 所述步骤F具体包括:Described step F specifically comprises: 若所述当前加速度与X轴向相同,则按照X轴向的平移像素个数沿X轴向平移显示内容;If the current acceleration is the same as the X-axis, the display content is translated along the X-axis according to the number of translation pixels in the X-axis; 若所述当前加速度与X轴向相反,则按照X轴向的平移像素个数沿X轴向反方向平移显示内容;If the current acceleration is opposite to the X-axis, the displayed content is translated along the X-axis in the opposite direction according to the number of translation pixels in the X-axis; 若所述当前加速度与Y轴向相同,则按照Y轴向的平移像素个数沿X轴向平移显示内容;If the current acceleration is the same as that of the Y axis, the displayed content is translated along the X axis according to the number of translation pixels in the Y axis; 若所述当前加速度与Y轴向相反,则按照Y轴向的平移像素个数沿X轴向反方向平移显示内容。If the current acceleration is opposite to the Y axis, the displayed content is translated in the opposite direction of the X axis according to the number of pixels to be translated in the Y axis. 2.根据权利要求1所述的移动终端根据加速度改变量平移显示内容的方法,其特征在于,所述预先设置的最大平移像素个数包括X轴最大平移像素个数及Y轴最大平移像素个数,其中,所述X轴最大平移像素个数为移动终端显示屏宽度值所容纳的像素个数,所述Y轴最大平移像素个数为移动终端显示高度值所容纳的像素个数;2. The method for the mobile terminal to shift the displayed content according to the acceleration change amount according to claim 1, wherein the preset maximum number of pixels for translation includes the maximum number of pixels for X-axis translation and the maximum number of pixels for Y-axis translation number, wherein, the X-axis maximum translation pixel number is the number of pixels accommodated by the display screen width value of the mobile terminal, and the Y-axis maximum translation pixel number is the pixel number accommodated by the mobile terminal display height value; 所述单位加速度改变量对应的平移像素个数分为X轴向单位加速度改变量对应的平移像素个数和Y轴向单位加速度改变量对应的平移像素个数,X轴向单位加速度改变量对应的平移像素个数等于Y轴向单位加速度改变量对应的平移像素个数。The number of translation pixels corresponding to the unit acceleration change amount is divided into the number of translation pixels corresponding to the X-axis unit acceleration change amount and the translation pixel number corresponding to the Y-axis unit acceleration change amount, and the X-axis unit acceleration change amount corresponds to The number of translation pixels of is equal to the number of translation pixels corresponding to the unit acceleration change in the Y axis. 3.一种移动终端根据加速度改变量平移显示内容的系统,其特征在于,包括:3. A system for a mobile terminal to translate and display content according to the amount of acceleration change, characterized in that it includes: 存储模块,用于预先设置一加速度阈值,及单位加速度改变量对应的平移像素个数;The storage module is used to preset an acceleration threshold and the number of translation pixels corresponding to the unit acceleration change amount; 判断模块,用于判断当前加速度的绝对值是否大于加速度阈值;A judging module, configured to judge whether the absolute value of the current acceleration is greater than the acceleration threshold; 加速度获取模块,用于实时获取移动终端当前加速度;Acceleration acquisition module, used to acquire the current acceleration of the mobile terminal in real time; 改变量获取模块,用于获取X轴向的加速度改变量和/或Y轴向的加速度改变量,所述X轴向平行于移动终端屏幕向右,所述Y轴向平行于移动终端屏幕向上;The change amount obtaining module is used to obtain the acceleration change amount of the X-axis and/or the acceleration change amount of the Y-axis, the X-axis is parallel to the mobile terminal screen to the right, and the Y-axis is parallel to the mobile terminal screen upward ; 计算模块,用于将X轴向的加速度改变量与单位加速度改变量对应的平移像素个数做乘积运算获取X轴向的平移像素个数,和/或将Y轴向的加速度改变量单位加速度改变量对应的平移像素个数做乘积运算获取Y轴向的平移像素个数;The calculation module is used to multiply the acceleration change amount of the X-axis with the number of translation pixels corresponding to the unit acceleration change amount to obtain the number of translation pixels in the X-axis direction, and/or calculate the acceleration change amount of the Y-axis unit acceleration The number of translation pixels corresponding to the change amount is multiplied to obtain the number of translation pixels in the Y-axis; 平移模块,用于根据X轴向的平移像素个数和/或Y轴向的平移像素个数平移显示内容;A translation module, configured to translate the display content according to the number of pixels to be translated in the X axis and/or the number of pixels to be translated in the Y axis; 所述单位加速度改 变量对应的平移像素个数,是指平移像素个数与对应的加速度改变量的比值;The translation pixel number corresponding to the unit acceleration change amount refers to the ratio of the translation pixel number and the corresponding acceleration change amount; 比较模块,用于将X轴向的平移像素个数和/或Y轴向的平移像素个数与一预先设置的最大平移像素个数比较,若X轴向的平移像素个数和/或Y轴向的平移像素个数大于最大平移像素个数,则令X轴向的平移像素个数和/或Y轴向的平移像素个数等于最大平移像素个数;The comparison module is used to compare the number of translation pixels in the X-axis and/or the number of translation pixels in the Y-axis with a preset maximum number of translation pixels, if the number of translation pixels in the X-axis and/or the number of Y-axis If the number of translation pixels in the axial direction is greater than the maximum number of translation pixels, then the number of translation pixels in the X-axis and/or the number of translation pixels in the Y-axis is equal to the maximum number of translation pixels; 所述改变量获取模块,The change amount acquisition module, 用于若当前加速度的X轴向的分加速度与X轴向相同,且大于加速度阈值,则实时获取加速度变大过程中的X轴向加速度最大值,若加速度由变大转为变小,则实时获取加速度变小过程中的X轴向加速度最小值,若加速度由变小转为变大或者加速度等于加速度阈值,则停止获取,并根据X轴向加速度最大值及X轴向加速度最小值计算X轴向加速度改变量;If the sub-acceleration of the X-axis of the current acceleration is the same as that of the X-axis and is greater than the acceleration threshold, the maximum value of the acceleration in the X-axis during the process of increasing the acceleration is obtained in real time. If the acceleration changes from increasing to decreasing, then Acquire the minimum value of the X-axis acceleration in the process of decreasing acceleration in real time. If the acceleration changes from decreasing to increasing or the acceleration is equal to the acceleration threshold, stop acquiring and calculate based on the maximum value of the X-axis acceleration and the minimum value of the X-axis acceleration X-axis acceleration change amount; 用于若当前加速度的X轴向的分加速度与X轴向相反,且小于负的加速度阈值,则实时获取加速度变小过程中的X轴向加速度最小值,若加速度由变小转为变大,则实时获取加速度变大过程中的X轴向加速度最大值,若加速度由变大转为变小或者加速度等于加速度阈值,则停止获取,并根据X轴向加速度最大值及X轴向加速度最小值计算X轴向加速度改变量;If the sub-acceleration of the X-axis of the current acceleration is opposite to the X-axis and is less than the negative acceleration threshold, the minimum value of the acceleration in the X-axis during the process of decreasing the acceleration is obtained in real time. If the acceleration changes from decreasing to increasing , then obtain the maximum value of the X-axis acceleration in the process of increasing the acceleration in real time. If the acceleration changes from large to small or the acceleration is equal to the acceleration threshold, the acquisition is stopped, and according to the maximum value of the X-axis acceleration and the minimum value of the X-axis acceleration value to calculate the X-axis acceleration change amount; 用于若当前加速度的Y轴向的分加速度与Y轴向相同,且大于加速度阈值,则实时获取加速度变大过程中的Y轴向加速度最大值,若加速度由变大转为变小,则实时获取加速度变小过程中的Y轴向加速度最小值,若加速度由变小转为变大或者加速度等于加速度阈值,则停止获取,并根据Y轴向加速度最大值及Y轴向加速度最小值计算Y轴向加速度改变量;If the sub-acceleration of the Y-axis of the current acceleration is the same as that of the Y-axis and is greater than the acceleration threshold, the maximum value of the acceleration in the Y-axis during the process of increasing the acceleration is obtained in real time. If the acceleration changes from increasing to decreasing, then Obtain the minimum value of the Y-axis acceleration in the process of decreasing acceleration in real time. If the acceleration changes from decreasing to increasing or the acceleration is equal to the acceleration threshold, stop acquiring and calculate based on the maximum value of the Y-axis acceleration and the minimum value of the Y-axis acceleration Y-axis acceleration change amount; 用于若当前加速度的Y轴向的分加速度与Y轴向相反,且小于负的加速度阈值,则实时获取加速度变小过程中的Y轴向加速度最小值,若加速度由变小转为变大,则实时获取加速度变大过程中的Y轴向加速度最大值,若加速度由变大转为变小或者加速度等于加速度阈值,则停止获取,并根据Y轴向加速度最大值及Y轴向加速度最小值计算Y轴向加速度改变量;If the sub-acceleration of the Y-axis of the current acceleration is opposite to the Y-axis and is less than the negative acceleration threshold, the minimum value of the acceleration in the Y-axis during the process of decreasing the acceleration is obtained in real time. If the acceleration changes from decreasing to increasing , then obtain the maximum value of the Y-axis acceleration in the process of increasing the acceleration in real time. If the acceleration changes from large to small or the acceleration is equal to the acceleration threshold, the acquisition is stopped, and according to the maximum value of the Y-axis acceleration and the minimum value of the Y-axis acceleration Calculate the amount of acceleration change in the Y axis; 所述平移模块The translation module 用于若所述当前加速度与X轴向相同,则按照X轴向的平移像素个数沿X轴向平移显示内容;If the current acceleration is the same as the X-axis, the display content is translated along the X-axis according to the number of translation pixels in the X-axis; 用于若所述当前加速度与X轴向相反,则按照X轴向的平移像素个数沿X轴向反方向平移显示内容;If the current acceleration is opposite to the X-axis, the displayed content is translated in the opposite direction of the X-axis according to the number of translation pixels in the X-axis; 用于若所述当前加速度与Y轴向相同,则按照Y轴向的平移像素个数沿X轴向平移显示内容;If the current acceleration is the same as the Y axis, the display content will be translated along the X axis according to the number of translation pixels in the Y axis; 用于若所述当前加速度与Y轴向相反,则按照Y轴向的平移像素个数沿X轴向反方向平移显示内容。If the current acceleration is opposite to the Y axis, the display content will be translated in the opposite direction of the X axis according to the number of translation pixels of the Y axis. 4.根据权利要求3所述的移动终端根据加速度改变量平移显示内容的系统,其特征在于,所述预先设置的最大平移像素个数包括X轴最大平移像素个数及Y轴最大平移像素个数,其中,所述X轴最大平移像素个数为移动终端显示屏宽度值所容纳的像素个数,所述Y轴最大平移像素个数为移动终端显示高度值所容纳的像素个数;4. The system according to claim 3, wherein the mobile terminal translates the displayed content according to the acceleration change amount, wherein the preset maximum number of pixels for translation includes the maximum number of pixels for X-axis translation and the maximum number of pixels for Y-axis translation number, wherein, the X-axis maximum translation pixel number is the number of pixels accommodated by the display screen width value of the mobile terminal, and the Y-axis maximum translation pixel number is the pixel number accommodated by the mobile terminal display height value; 所述单位加速度改变量对应的平移像素个数分为X轴向单位加速度改变量对应的平移像素个数和Y轴向单位加速度改变量对应的平移像素个数,X轴向单位加速度改变量对应的平移像素个数等于Y轴向单位加速度改变量对应的平移像素个数。The number of translation pixels corresponding to the unit acceleration change amount is divided into the number of translation pixels corresponding to the X-axis unit acceleration change amount and the translation pixel number corresponding to the Y-axis unit acceleration change amount, and the X-axis unit acceleration change amount corresponds to The number of translation pixels of is equal to the number of translation pixels corresponding to the unit acceleration change in the Y axis.
CN201410285440.6A 2014-06-24 2014-06-24 Mobile terminal is according to the method and system of acceleration knots modification translating displayed content Active CN104090719B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410285440.6A CN104090719B (en) 2014-06-24 2014-06-24 Mobile terminal is according to the method and system of acceleration knots modification translating displayed content

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410285440.6A CN104090719B (en) 2014-06-24 2014-06-24 Mobile terminal is according to the method and system of acceleration knots modification translating displayed content

Publications (2)

Publication Number Publication Date
CN104090719A CN104090719A (en) 2014-10-08
CN104090719B true CN104090719B (en) 2017-12-12

Family

ID=51638439

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410285440.6A Active CN104090719B (en) 2014-06-24 2014-06-24 Mobile terminal is according to the method and system of acceleration knots modification translating displayed content

Country Status (1)

Country Link
CN (1) CN104090719B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104636040B (en) * 2015-02-05 2017-12-12 惠州Tcl移动通信有限公司 A kind of image display processing method and device
US10235035B2 (en) * 2015-08-10 2019-03-19 Apple Inc. Devices, methods, and graphical user interfaces for content navigation and manipulation
CN105549762B (en) * 2015-08-27 2019-06-11 宇龙计算机通信科技(深圳)有限公司 A kind of suspension key moving method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101004657A (en) * 2006-01-19 2007-07-25 宏达国际电子股份有限公司 Intuitive On-Screen Controller
TW200934212A (en) * 2008-01-16 2009-08-01 Asustek Comp Inc Mobile digital device with intuitive browsing and operating method thereof
CN101996021A (en) * 2009-08-12 2011-03-30 幻音科技(深圳)有限公司 Handheld electronic equipment and method for controlling display contents thereby
CN102141846A (en) * 2011-03-09 2011-08-03 中兴通讯股份有限公司 Method for intuitively browsing contents and mobile terminal

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101004657A (en) * 2006-01-19 2007-07-25 宏达国际电子股份有限公司 Intuitive On-Screen Controller
TW200934212A (en) * 2008-01-16 2009-08-01 Asustek Comp Inc Mobile digital device with intuitive browsing and operating method thereof
CN101996021A (en) * 2009-08-12 2011-03-30 幻音科技(深圳)有限公司 Handheld electronic equipment and method for controlling display contents thereby
CN102141846A (en) * 2011-03-09 2011-08-03 中兴通讯股份有限公司 Method for intuitively browsing contents and mobile terminal

Also Published As

Publication number Publication date
CN104090719A (en) 2014-10-08

Similar Documents

Publication Publication Date Title
CN104360816B (en) Screenshotss method and system
CN102915201B (en) A kind of one-handed performance method of giant-screen touch-control mobile phone
US9772769B2 (en) Mobile terminal device and display control method thereof
KR101742410B1 (en) Intelligent terminal with built-in screenshot function and implementation method thereof
CN103425394B (en) A kind of method and device thereof of the rollover icon position for touch-screen
EP2560086B1 (en) Method and apparatus for navigating content on screen using pointing device
CN103096157B (en) A kind of method utilizing mobile phone to control moving focal point on TV applications interface
JP2012018644A (en) Information processor, information processing method and program
CN105260103B (en) A kind of picture Zoom method and electronic equipment
CN104536661A (en) Terminal screen shot method
CN103747308A (en) Method and system for controlling smart television with analog keys, and mobile terminal
CN106648402A (en) Information sending method and device and information processing method and device
CN107957841B (en) Rolling screen capture method and device
CN104281308A (en) Touch electronic device and drawing method thereof
CN104090719B (en) Mobile terminal is according to the method and system of acceleration knots modification translating displayed content
CN103793173A (en) Displaying method and device
US20140354569A1 (en) Mobile phone capable of separating screen and controlling method thereof
EP2662751A1 (en) Method and device for an electronic terminal to realize desktop switching, and electronic terminal
CN106559711A (en) A kind of control method and device of screen touch-control
CN103336586B (en) Optical indicating device sensing method for abnormal status
CN104102385A (en) Mobile terminal and touch method thereof
CN103543824A (en) Gesture input system and method
CN102566907B (en) Display terminal and method for zooming and shifting any point of display terminal
CN104536564A (en) Terminal
CN105511772A (en) Method, device and mobile terminal using gesture operation to trigger touch screen button

Legal Events

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