The present invention relates to the field of touch sensing technologies, and in particular, to a page sliding method and apparatus, and a user terminal.
With rapid development and increasing popularity of user terminals such as a mobile phone and a tablet computer, the user terminals have become indispensable communications tools in people's life. A user can freely obtain information by using the user terminal, for example, browsing news or a web page, reading an e-book, and browsing a historical chat record.
Due to a fixed size of a display of a user terminal, the user terminal displays a fixed and limited amount of information for a user each time. If the user wants to obtain more information, the user needs to slide a screen of the display of the user terminal to scroll or update content of a current display page. For a page with relatively much content, the user needs to keep sliding the screen to browse all contents on the page. It can be learned that, the operation is relatively cumbersome for the user in an existing page sliding process; and the user terminal is inflexible and not intelligent when the page slides according to a slide operation entered by the user.
Embodiments of the present invention provide a page sliding method and apparatus, and a user terminal, to reduce operation steps of a user, and improve flexibility and intelligence of a user terminal.
A first aspect of the embodiments of the present invention provides a page sliding method, including:
when receiving a pressing signal that is entered for a display page, obtaining a pressing pressure value and pressing characteristic information of the pressing signal, where the pressing characteristic information includes a pressed position or a change trend of the pressing pressure value;
determining a page sliding speed according to the pressing pressure value, and determining a page sliding direction according to the pressed position or the change trend of the pressing pressure value; and controlling the display page to slide at the page sliding speed along the page sliding direction.
According to the first aspect of the embodiments of the present invention, the page sliding speed and the page sliding direction are determined according to the pressing pressure value and the pressing characteristic information of the pressing signal, and it may be implemented that page sliding is controlled by means of pressing without entering a slide operation by a user, so that flexibility, intelligence, and adaptability of a user terminal are improved.
Based on the first aspect of the embodiments of the present invention, in a first possible implementation of the first aspect of the embodiments of the present invention, the page sliding speed is calculated according to a formula and the pressing pressure value. For ease of distinguishing between the pressing signal and another pressing signal, whether the pressing pressure value is greater than a first preset pressure threshold is detected. If the pressing pressure value is greater than the first preset pressure threshold, the page sliding speed is calculated according to the pressing pressure value and a first calculation formula, where
the first calculation formula is: v=v0×f(P−P0), where v is the page sliding speed, v0 is a first preset page sliding speed, P is the pressing pressure value, P0 is the first preset pressure threshold, and f(x) is a pressing pressure function.
Based on the first aspect of the embodiments of the present invention or the first possible implementation of the first aspect, in a second possible implementation of the first aspect of the embodiments of the present invention, the determining a page sliding direction according to the pressed position includes:
if the pressed position is located in a first touch area, determining the page sliding direction as a first preset direction; and
if the pressed position is located in a second touch area, determining the page sliding direction as a second preset direction, where
the first preset direction is opposite to the second preset direction, that is, the first preset direction is upward, and the second preset direction is downward.
The second possible implementation of the first aspect of the embodiments of the present invention is applicable to a case in which the first touch area and the second touch area are provided, the pressed position is determined by means of detection, and then the page sliding direction is determined.
Based on the first aspect of the embodiments of the present invention or the first possible implementation of the first aspect, in a third possible implementation of the first aspect of the embodiments of the present invention, the determining a page sliding direction according to the change trend of the pressing pressure value includes:
if the change trend of the pressing pressure value is the same as a first preset trend, determining the page sliding direction as a first preset direction; and
if the change trend of the pressing pressure value is the same as a second preset trend, determining the page sliding direction as a second preset direction, where
the first preset direction is opposite to the second preset direction.
The third possible implementation of the first aspect of the embodiments of the present invention is applicable to a case in which the pressing pressure value changes in a preset time period, or is applicable to a case in which neither the first touch area nor the second touch area is provided.
Based on the first to the third possible implementations of the first aspect of the embodiments of the present invention, in a fourth possible implementation of the first aspect of the embodiments of the present invention, if it is detected that the pressing signal is interrupted, the display page is controlled to slide by means of deceleration at a second preset sliding speed along the page sliding direction.
In the fourth possible implementation of the first aspect of the embodiments of the present invention, after the pressing signal is interrupted, sliding does not immediately stop, but sliding is performed by means of deceleration at the second preset sliding speed, so that user experience is improved.
A second aspect of the embodiments of the present invention provides another page sliding method, including:
when receiving a sliding signal that is entered for a display page, obtaining a touch pressure value and sliding characteristic information of the sliding signal, where the sliding characteristic information includes a sliding direction and a sliding speed;
determining a page sliding speed according to the touch pressure value and the sliding speed, and determining a page sliding direction according to the sliding direction; and
controlling the display page to slide at the page sliding speed along the page sliding direction.
According to the second aspect of the embodiments of the present invention, the page sliding speed and the page sliding direction are determined according to the touch pressure value, the sliding speed, and the sliding direction of the sliding signal without repeatedly entering a slide operation by a user, and the sliding speed is determined by combining the touch pressure value of the sliding signal with the sliding speed, so that operation steps of a user are reduced, and flexibility and intelligence of a user terminal are improved.
Based on the second aspect of the embodiments of the present invention, in a first possible implementation of the second aspect of the embodiments of the present invention, the page sliding speed is calculated according to the touch pressure value, the sliding speed, and a second calculation formula, where
the second calculation formula is: v=v0×f(P−P0), where v is the page sliding speed, v0 the sliding speed, P is the touch pressure value, P0 is a second preset pressure threshold, and f(x,y) is a sliding pressure function.
In the first possible implementation of the second aspect of the embodiments of the present invention, the page sliding speed is calculated by using the formula and according to the touch pressure value and the sliding speed, and factors that affect the page sliding speed increase, so that the page sliding speed is not only controlled by the sliding speed entered by the user.
The page sliding direction is a sliding direction of the sliding signal.
Based on the second aspect of the embodiments of the present invention or the first possible implementation of the first aspect, in a second possible implementation of the second aspect of the embodiments of the present invention, if it is detected that the sliding signal is interrupted, the display page is controlled to slide by means of deceleration at a second preset sliding speed along the page sliding direction.
In the second possible implementation of the second aspect of the embodiments of the present invention, after the sliding signal is interrupted, sliding does not immediately stop, but sliding is performed by means of deceleration at the second preset sliding speed, so that user experience is improved.
A third aspect of the embodiments of the present invention provides a page sliding apparatus, including:
an information obtaining unit, configured to: when receiving a pressing signal that is entered for a display page, obtain a pressing pressure value and pressing characteristic information of the pressing signal, where the pressing characteristic information includes a pressed position or a change trend of the pressing pressure value;
a speed determining unit, configured to determine a page sliding speed according to the pressing pressure value;
a direction determining unit, configured to determine a page sliding direction according to the pressed position or the change trend of the pressing pressure value; and
a sliding control unit, configured to control the display page to slide at the page sliding speed along the page sliding direction.
The page sliding apparatus provided in the third aspect of the embodiments of the present invention is configured to implement the page sliding method provided in the first aspect of the embodiments of the present invention. For a specific implementation process, refer to the specific description of the first aspect, and details are not described herein again.
A fourth aspect of the embodiments of the present invention provides another page sliding apparatus, including:
an information obtaining unit, configured to: when receiving a sliding signal that is entered for a display page, obtain a touch pressure value and sliding characteristic information of the sliding signal, where the sliding characteristic information includes a sliding direction and a sliding speed;
a speed determining unit, configured to determine a page sliding speed according to the touch pressure value and the sliding speed;
a direction determining unit, configured to determine a page sliding direction according to the sliding direction; and
a sliding control unit, configured to control the display page to slide at the page sliding speed along the page sliding direction.
The page sliding apparatus provided in the fourth aspect of the embodiments of the present invention is configured to implement the page sliding method provided in the second aspect of the embodiments of the present invention.
For a specific implementation process, refer to the specific description of the second aspect, and details are not described herein again.
A fifth aspect of the embodiments of the present invention provides a user terminal, including the page sliding apparatus provided in the third aspect of the embodiments of the present invention and the page sliding apparatus provided in the fourth aspect.
In the embodiments of the present invention, the page sliding speed and the page sliding direction are determined according to different touch signals; if the touch signal is the pressing signal, the page sliding speed and the page sliding direction are determined according to the pressing pressure value of the pressing signal, and the page sliding direction is determined according to the pressed position of the pressing signal or the change trend of the pressing pressure value; or if the touch signal is the sliding signal, the page sliding speed is determined according to the touch pressure value of the sliding signal and the sliding speed, and the page sliding direction is determined according to the sliding direction, so that operation steps of a user can be reduced, and flexibility and intelligence of a user terminal can be improved.
To describe the technical solutions in the embodiments of the present invention or in the prior art more clearly, the following briefly describes the accompanying drawings required for describing the embodiments. Apparently, the accompanying drawings in the following description show merely some embodiments of the present invention, and a person of ordinary skill in the art may still derive other drawings from these accompanying drawings without creative efforts.
The following clearly and completely describes the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Apparently, the described embodiments are merely some but not all of the embodiments of the present invention. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
Referring to
The wireless communications module 120 usually includes one or more components that are configured to implement wireless communication between the user terminal 100 and a wireless communications system or network. As shown in
The output module 130 is configured to output data such as text, audio, and a video, and includes a display unit 131, an audio output unit 132, an alarm unit 133, and the like. The display unit 131 is configured to display information processed by the user terminal 100 or the processor 160. The display unit 131 includes a user interface, a graphical user interface, or the like, and displays various kinds of information to a user. The audio output unit 132 is configured to: when the user terminal is in a mode such as a call signal receiving mode, a call mode, a record mode, a speech recognition mode, or a broadcast receiving mode, convert audio data received by the wireless communications module 120 or stored in the memory 180 into an audio signal and output the audio signal as a sound. The alarm unit 133 is configured to notify the user terminal 100 of occurrence of some events, for example, occurrence of events such as call receiving, message receiving, and touch input.
The interface module 140 is configured to implement connection between the user terminal 100 and an external apparatus, and may include a wired or wireless headset port, an external power supply port, a wired or wireless data port, a memory card port, an audio input/output port, or the like.
The power supply module 150 is configured to provide a required quantity of electricity for each component of the user terminal 100.
The processor 160 is configured to control various operations of the user terminal and implementation of various functions.
The input module 170 is configured to receive various operations of the user and an audio or video signal, and includes an A/V input unit 171, a user input unit 172, and the like. The A/V input unit 171 is configured to receive an audio or video signal, and may include a camera and a microphone. Image information collected by the camera is displayed by the display unit 131 under control of the processor 160. The user input unit 172 is configured to: receive various operations entered by the user, for example, a press operation and a slide operation, identify these slide operations, generate a corresponding command, and transmit the command to the processor 160, and then the processor 160 controls execution of a corresponding operation or implementation of a corresponding function. In this embodiment of the present invention, the user input unit 172 is configured to receive a touch signal entered by the user for a sliding display interface that is displayed by the display unit 131, and the touch signal is a touch operation, that is, a press operation or a slide operation. The user input unit 172 includes various sensors such as pressure sensor.
The memory 180 stores program code that is used by the processor 160 to perform a processing or control operation, or temporarily stores some data such as an address book, an image, or a video. The memory 180 may be a high-speed RAM memory, or may be a non-volatile memory (non-volatile memory), such as at least one magnetic disk memory.
A page sliding method and apparatus, and the user terminal that are provided in the embodiments of the present invention may be applied to a scenario in which a display page is controlled to slide, and the display page may include but is not limited to a page such as a news web page, an address book page, a historical chat record page, an application icon list page, a date selection page, or an e-book page. The user terminal in the embodiments of the present invention may include but is not limited to an electronic device with a touch display, such as a mobile phone, a PAD (tablet computer), or an intelligent wearable device.
The page sliding method provided in the embodiments of the present invention is described below in detail with reference to
Referring to
101. When receiving a pressing signal that is entered for a display page, obtain a pressing pressure value and pressing characteristic information of the pressing signal, where the pressing characteristic information includes a change trend of the pressing pressure value.
Specifically, when the display unit 131 is in a display state, the user input unit 172 may receive a touch signal that is entered by a user for the display page. The display page may include but is not limited to a page that may slide, such as a news web page, an address book page, a historical chat record page, an application icon list page, a date selection page, or an e-book page. It may be understood that the display unit 131 cannot display all content of the display page to the user at a time. Therefore, the display unit 131 successively displays all the content of the display page to the user in a scrolling manner, so that the user can browse and obtain complete information. If the content of the display interface may be displayed to the user at a time, the user does not need to control sliding of the display page. Generally, the memory 180 stores code that is used by the display unit 131 to implement scrolling display. An Android system is used as an example, and the code is scroller Scroller code and velocity tracker Velocity Tracker code. The Scroller is used for recording a sliding track and driving sliding of the page, and the Velocity Tracker is used for tracking a velocity of a slide operation entered by the user. Then, the processor 160 invokes the two pieces of code to control the display page to slide according to the velocity tracked by the Velocity Tracker. In the prior art, sliding of the display page is driven only by the slide operation entered by the user, and therefore, the Velocity Tracker tracks only the velocity of the slide operation. In this embodiment of the present invention, the sliding of the display page may be driven by not only the slide operation but also another touch operation, for example, a press operation. Therefore, in this embodiment of the present invention, the Velocity Tracker not only may track the velocity, but further has another function, for example, calculating the velocity.
In a possible implementation, when receiving the touch signal that is entered by the user for the display page of the display unit 131, the user input unit 172 identifies the touch signal, and determines whether the touch signal is a pressing signal or a sliding signal. Optionally, the user input unit 172 performs identification according to a position change relationship of the touch signal, and if a position of the touch signal does not change, the touch signal is the pressing signal; or if a position of the touch signal changes, the touch signal is the sliding signal. In another possible implementation, when receiving the touch signal that is entered by the user for the display page of the display unit 131, the user input unit 172 transmits the touch signal to the processor 160, and when receiving the touch signal, the processor 160 identifies the touch signal to determine whether the touch signal is a pressing signal or a sliding signal. Optionally, the processor 160 obtains a position change relationship of the touch signal by using the user input unit 172, and if a position of the touch signal does not change, the touch signal is the pressing signal; or if a position of the touch signal changes, the touch signal is the sliding signal.
When the touch signal is the pressing signal, the processor 160 obtains the pressing pressure value and the pressing characteristic information of the pressing signal by using the user input unit 172, and the pressing characteristic information includes the change trend of the pressing pressure value.
In this embodiment of the present invention, a pressure touch technology is used to obtain the pressing pressure value of the pressing signal. Currently, a multi-touch technology is used by most of user terminals. The multi-touch technology is only a two-dimensional human-machine interaction. A shear force is determined according to the multi-touch technology, that is, a force that is exerted paralleling to a plane of the display unit 131. However, the pressure touch technology is a three-dimensional human-machine interaction. Not only the sheer force can be determined, but also a perpendicular force can be determined. The perpendicular force is a force that is entered by the user to the user input unit 172 and that is perpendicular to the plane of the display unit 131. The processor 160 may perform a corresponding operation by using the perpendicular force determined by the pressure touch technology, for example, an operation such as weighing. The pressure touch technology is described by using force touch Force Touch as an example. Force Touch is a touch sensing technology. By using Force Touch, the user may sense force of light pressure and hard pressure, and call different corresponding functions. In Force Touch, four pressure touch sensors are disposed at four corners of a touch panel of the user terminal, and different force that is pressed by a finger or a touch control on the touch panel is sensed by the four pressure touch sensors to perform positioning and measure an entered pressure value. In this embodiment of the present invention, the pressing pressure value may be a three-dimensional pressure value measured by using the pressure touch technology, or may be the perpendicular pressure value measured by using the pressure touch technology. Currently, the user terminal in the market uses Force Touch to implement relatively limited functions, for example, basic functions such as navigation and weighing, and does not use Force Touch to implement a page sliding function.
102. Determine a page sliding speed according to the pressing pressure value.
Specifically, the processor 160 detects the pressing pressure value obtained by the user input unit 172, to detect whether the pressing pressure value is greater than a first preset pressure threshold, and then determines a relationship between the pressing pressure value and the first preset pressure threshold. The first preset pressure threshold is a pressure value set by the user in the user terminal, and is used for triggering sliding of the display page. Referring to
If the pressing pressure value is greater than the first preset pressure threshold, it may be understood that the pressing signal can trigger sliding of the display page, and in this case, the processor 160 calculates the page sliding speed according to a first calculation formula and the pressing pressure value. The first calculation formula is as follows:
v=v
0
×f(P−P0), where
v is the page sliding speed, that is, a required page sliding speed; v0 is a first preset page sliding speed, and is a sliding speed preset by a system of the user terminal, and a specific value is not limited herein; P is the pressing pressure value; P0 is the first preset pressure threshold, that is, a pressure value that triggers sliding of the display page; and f(x) is a pressing pressure function, is set by a manufacturer of the user terminal, and is not limited herein. It should be noted that if the pressing pressure value changes, the page sliding speed also changes. In this embodiment of the present invention, the page sliding speed is determined mainly by the pressing pressure value, and a greater pressing pressure value leads to a faster page sliding speed. In this case, although sliding of the display page is triggered and the page sliding speed is obtained by means of calculation, a page sliding direction is not determined. Therefore, the display page does not slide in this case.
103. Determine a page sliding direction according to the change trend of the pressing pressure value.
Specifically, if the pressing pressure value changes in a preset time period, the pressing characteristic information includes the change trend of the pressing pressure value, and the change trend of the pressing pressure value is a change trend in the preset time period. If the change trend of the pressing pressure value is the same as a first preset trend, the page sliding direction is determined as a first preset direction. For example, if the first preset trend is gradually decreasing, and the change trend of the pressure value is also gradually decreasing, the first preset direction is upward or forward or leftward.
If the change trend of the pressing pressure value is the same as a second preset trend, the page sliding direction is determined as a second preset direction. For example, if the second preset trend is gradually increasing, and the change trend of the pressing pressure value is also gradually increasing, the second preset direction is downward or backward or rightward. It should be noted that the first preset direction is opposite to the second preset direction, but specifically whether gradually increasing is corresponding to upward or downward is not limited herein.
104. Control the display page to slide at the page sliding speed along the page sliding direction.
Specifically, after determining the page sliding speed and the page sliding direction, the processor 160 controls the display page to slide at the page sliding speed along the page sliding direction, so as to implement sliding of the display page, thereby facilitating the user in browsing content of the display page. In this embodiment of the present invention, the user needs to enter only the press operation, and when the pressing pressure value is greater than the first preset pressure threshold, may control the user terminal to implement sliding of the sliding display interface, so that operation steps of the user are reduced, and user experience is improved.
Optionally, in a process of sliding the display page, if the user input unit 172 receives a slide operation that is entered by the user, the processor 160 preferentially identifies the slide operation, obtains a sliding speed of the slide operation, and performs fine adjustment on the sliding speed according to the pressing pressure value.
105. If it is detected that the pressing signal is interrupted, control the display page to slide by means of deceleration at a second preset sliding speed along the page sliding direction.
Specifically, in the process of sliding the display page, the user input unit 172 detects whether the pressing signal is interrupted, that is, detects whether a finger of the user or a touch control leaves the display unit 131. Alternatively, by using the pressure touch technology, the processor 160 detects whether the pressing signal is interrupted, that is, detects whether the pressing pressure value of the pressing signal changes to zero. If the user input unit 172 detects that the pressing signal is interrupted or the processor 160 detects that the pressing signal is interrupted, the processor 160 controls the display page to slide by means of deceleration at the second preset sliding speed. The second preset sliding speed is used for controlling the display page to decelerate, and is determined by a system of the user terminal. A specific value is set by a manufacturer of the user terminal, and is not limited herein.
In this embodiment of the present invention, when the pressing signal that is entered for the sliding display interface is received, the pressing pressure value and the pressing characteristic information of the pressing signal are obtained, where the pressing characteristic information includes the change trend of the pressing pressure value; the page sliding speed is determined according to the pressing pressure value; the page sliding direction is determined according to the change trend of the pressing pressure value; and the display page is controlled to slide at the page sliding speed along the page sliding direction, so as to control sliding of the display page according to the pressing pressure value of the pressing signal and the change trend of the pressing pressure value. The user does not need to enter a slide operation, and needs only a press operation, so that operation steps of the user are reduced, and intelligence of the user terminal is improved.
Referring to
201. When receiving a pressing signal that is entered for a display page, obtain a pressing pressure value and pressing characteristic information of the pressing signal, where the pressing characteristic information includes a pressed position.
Specifically, when the user input unit 172 receives the pressing signal that is entered for the display page, the processor 160 obtains the pressing pressure value and the pressing characteristic information of the pressing signal by using the user input unit 172, where the pressing characteristic information includes the pressed position.
202. Determine a page sliding speed according to the pressing pressure value.
Specifically, the processor 160 detects the pressing pressure value obtained by the user input unit 172, to detect whether the pressing pressure value is greater than a first preset pressure threshold, and then determines a relationship between the pressing pressure value and the first preset pressure threshold. The first preset pressure threshold is a pressure value set by the user in the user terminal, and is used for triggering sliding of the display page. Referring to
If the pressing pressure value is greater than the first preset pressure threshold, it may be understood that the pressing signal can trigger sliding of the display page, and in this case, the processor 160 calculates the page sliding speed according to a first calculation formula and the pressing pressure value. The first calculation formula is as follows:
v=v
0
×f(P−P0), where
v is the page sliding speed, that is, a required page sliding speed; v0 is a first preset page sliding speed, and is a sliding speed preset by a system of the user terminal, and a specific value is not limited herein; P is the pressing pressure value; P0 is the first preset pressure threshold, that is, a pressure value that triggers sliding of the display page; and f(x) is a pressing pressure function, is set by a manufacturer of the user terminal, and is not limited herein. It should be noted that if the pressing pressure value changes, the page sliding speed also changes. In this embodiment of the present invention, the page sliding speed is determined mainly by the pressing pressure value, and a greater pressing pressure value leads to a faster page sliding speed. In this case, although sliding of the display page is triggered and the page sliding speed is obtained by means of calculation, a page sliding direction is not determined. Therefore, the display page does not slide in this case.
203. Determine a page sliding direction according to the pressed position.
Specifically, the user input unit 172 determines the page sliding direction according to the obtained pressed position. If the pressed position is located in a first touch area, the page sliding direction is determined as a first preset direction.
Referring to
When the pressed position is located in the second touch area, that is, in 52 in
204. Control the display page to slide at the page sliding speed along the page sliding direction.
Specifically, after determining the page sliding speed and the page sliding direction, the processor 160 controls the display page to slide at the page sliding speed along the page sliding direction, so as to implement sliding of the display page, thereby facilitating the user in browsing content of the display page. In this embodiment of the present invention, the user needs to enter only the press operation, and when the pressing pressure value is greater than the first preset pressure threshold, may control the user terminal to implement sliding of the sliding display interface, so that operation steps of the user are reduced, and user experience is improved.
Optionally, in a process of sliding the display page, if the user input unit 172 receives a slide operation that is entered by the user, the processor 160 preferentially identifies the slide operation, obtains a sliding speed of the slide operation, and performs fine adjustment on the sliding speed according to the pressing pressure value.
205. If it is detected that the pressing signal is interrupted, control the display page to slide by means of deceleration at a second preset sliding speed along the page sliding direction.
Specifically, in the process of sliding the display page, the user input unit 172 detects whether the pressing signal is interrupted, that is, detects whether a finger of the user or a touch control leaves the display unit 131. Alternatively, by using a pressure touch technology, the processor 160 detects whether the pressing signal is interrupted, that is, detects whether the pressed position of the pressing signal is still located in the first touch area or the second touch area, and if the pressed position is not located in the first touch area or the second touch area in the process of sliding the display page, determines that the pressing signal is interrupted. If the user input unit 172 detects that the pressing signal is interrupted or the processor 160 detects that the pressing signal is interrupted, the processor 160 controls the display page to slide by means of deceleration at the second preset sliding speed. The second preset sliding speed is used for controlling the display page to decelerate, and is determined by a system of the user terminal. A specific value is set by a manufacturer of the user terminal, and is not limited herein.
In this embodiment of the present invention, when the pressing signal that is entered for the sliding display interface is received, the pressing pressure value and the pressing characteristic information of the pressing signal are obtained, where the pressing characteristic information includes the pressed position; the page sliding speed is determined according to the pressing pressure value; the page sliding direction is determined according to the pressed position; and the display page is controlled to slide at the page sliding speed along the page sliding direction, so as to control sliding of the display page according to the pressing pressure value of the pressing signal and the pressed position. The user does not need to enter a slide operation, and needs only a press operation, so that operation steps of the user are reduced, and intelligence of the user terminal is improved.
It should be noted that if the user terminal provides the first touch area and the second touch area, the method in Embodiment 2 of the present invention is executed. If the user terminal does not provide the first touch area or the second touch area, or the pressing pressure value changes in the preset time period, the method in Embodiment 1 of the present invention is executed. If the user terminal provides the first touch area and the second touch area, but the pressed position is neither in the first touch area nor in the second touch area, the method in Embodiment 1 of the present invention is executed.
Referring to
301. When receiving a sliding signal that is entered for a display page, obtain a touch pressure value and sliding characteristic information of the sliding signal, where the sliding characteristic information includes a sliding direction and a sliding speed.
Specifically, when the user input unit 172 receives the sliding signal that is entered for the display page displayed by the display unit 131, the processor 160 obtains the touch pressure value and the sliding characteristic information of the sliding signal by using the user input unit 172, where the sliding characteristic information includes the sliding direction and the sliding speed. The processor 160 invokes the corresponding code in the memory and uses a pressure touch technology to obtain the touch pressure value of the sliding signal. The touch pressure value of the sliding signal is a pressure value of the sliding signal at initial contact with the display unit 131, that is, a pressure value when the user enters a slide operation. A process of obtaining the touch pressure value of the sliding signal is the same as a process of obtaining the pressing pressure value of the pressing signal in Embodiment 1 of the present invention, and details are not described herein. The sliding direction of the sliding signal is a direction of the slide operation that is entered by the user.
302. Determine a page sliding speed according to the touch pressure value and the sliding speed.
Specifically, the processor 160 calculates the page sliding speed according to the touch pressure value of the sliding signal, the sliding speed, and a second calculation formula, and the second calculation formula is as follows:
v=v
0
×f(P,P0)where
v is the page sliding speed, that is, a required page sliding speed; v0 is the sliding speed, that is, a sliding speed of the slide operation that is entered by the user; P is the touch pressure value of the sliding signal; P0 is a second preset pressure threshold, and is a pressure threshold that is preset by a system of the user terminal, and a specific value is not limited herein; and f(x,y) is a sliding pressure function, and is a function about a relationship between the sliding pressure value and the second preset pressure threshold, for example, a function about a proportional relationship between the sliding pressure value and the second preset pressure threshold. Specifically, the function is set by a manufacturer of the user terminal, and is not limited herein.
303. Determine a page sliding direction according to the sliding direction.
Specifically, the processor 160 determines the page sliding direction according to the sliding direction, and the page sliding direction is the same as the sliding direction. Referring to
304. Control the display page to slide at the page sliding speed along the page sliding direction.
Specifically, after determining the page sliding speed and the page sliding direction, the processor 160 controls the display page to slide at the page sliding speed along the page sliding direction, so as to implement sliding of the display page, thereby facilitating the user in browsing content of the display page. In this embodiment of the present invention, the user needs to enter only one slide operation, and does not need to enter the slide operation for multiple times, so that operation steps of the user are reduced, and user experience is improved.
305. If it is detected that the sliding signal is interrupted, control the display page to slide by means of deceleration at a second preset sliding speed along the page sliding direction.
Specifically, in a process of sliding the display page, the user input unit 172 detects whether the sliding signal is interrupted, that is, detects whether a finger of the user or a touch control leaves the display unit 131. Alternatively, by using the pressure touch technology, the processor 160 detects whether the sliding signal is interrupted, that is, detects whether the touch pressure value of the sliding signal changes to zero. If the user input unit 172 detects that the sliding signal is interrupted or the processor 160 detects that the sliding signal is interrupted, the processor 160 controls the display page to slide by means of deceleration at the second preset sliding speed. The second preset sliding speed is used for controlling the display page to decelerate, and is determined by a system of the user terminal. A specific value is set by a manufacturer of the user terminal, and is not limited herein.
In this embodiment of the present invention, when the sliding signal that is entered for the sliding display interface is received, the touch pressure value and the sliding characteristic information of the touch pressure value are obtained, where the sliding characteristic information includes the sliding direction and the sliding speed; the page sliding speed is determined according to the touch pressure value and the sliding speed; the page sliding direction is determined according to the touch characteristic information of the sliding direction; and the display page is controlled to slide at the page sliding speed along the page sliding direction, so as to control sliding of the display page according to the touch pressure value of the sliding signal and the sliding direction. The user does not need to enter the slide operation for multiple times, so that operation steps of the user are reduced, and intelligence of the user terminal is improved.
Referring to
The information obtaining unit 801 is configured to: when receiving a pressing signal that is entered for a display page, obtain a pressing pressure value and pressing characteristic information of the pressing signal, where the pressing characteristic information includes a pressed position or a change trend of the pressing pressure value.
The speed determining unit 802 is configured to determine a page sliding speed according to the pressing pressure value.
The direction determining unit 803 is configured to determine a page sliding direction according to the pressed position or the change trend of the pressing pressure value.
The sliding control unit 804 is configured to control the display page to slide at the page sliding speed along the page sliding direction.
The speed determining unit 802 includes: a pressure detection unit and a speed calculation unit that are not shown in
The pressure detection unit is configured to detect whether the pressing pressure value is greater than a first preset pressure threshold.
The speed calculation unit is configured to: if the pressing pressure value is greater than the first preset pressure threshold, calculate the page sliding speed according to the pressing pressure value and a first calculation formula, where
the first calculation formula is: v=v0×f(P−P0), where v is the page sliding speed, v0 is a first preset page sliding speed, P is the pressing pressure value, P0 is the first preset pressure threshold, and f(x) is a pressing pressure function.
The direction determining unit 803 is configured to: if the pressed position is located in a first touch area, determine the page sliding direction as a first preset direction. The direction determining unit 803 is further configured to: if the pressed position is located in a second touch area, determine the page sliding direction as a second preset direction.
The first preset direction is opposite to the second preset direction.
The direction determining unit 803 is further configured to: if the change trend of the pressing pressure value is the same as a first preset trend, determine the page sliding direction as a first preset direction.
The direction determining unit 803 is further configured to: if the change trend of the pressing pressure value is the same as a second preset trend, determine the page sliding direction as a second preset direction.
The first preset direction is opposite to the second preset direction.
The sliding control unit is further configured to: if it is detected that the pressing signal is interrupted, control the display page to slide by means of deceleration at a second preset sliding speed along the page sliding direction.
This embodiment of the present invention and the method embodiments shown in
Referring to
The information obtaining unit 901 is configured to: when receiving a sliding signal that is entered for a display page, obtain a touch pressure value and sliding characteristic information of the sliding signal, where the sliding characteristic information includes a sliding direction and a sliding speed.
The speed determining unit 902 is configured to determine a page sliding speed according to the touch pressure value and the sliding speed.
The direction determining unit 903 is configured to determine a page sliding direction according to the sliding direction.
The sliding control unit 904 is configured to control the display page to slide at the page sliding speed along the page sliding direction.
The speed determining unit 902 is configured to calculate the page sliding speed according to the touch pressure value, the sliding speed, and a second calculation formula, where
the second calculation formula is: v=v0×f(P,P0), where v is the page sliding speed, v0 is the sliding speed, P is the touch pressure value, P0 is a second preset pressure threshold, and f(x,y) is a sliding pressure function.
The sliding control unit 904 is further configured to: if it is detected that the sliding signal is interrupted, control the display page to slide by means of deceleration at a second preset sliding speed along the page sliding direction.
This embodiment of the present invention and the method embodiment shown in
The embodiments of the present invention further provide a computer storage medium, the computer storage medium stores a program, and when the program is executed, the method in Embodiment 1, the method in Embodiment 2, or the method in Embodiment 3 is executed. The embodiments of the present invention further provide a user terminal that includes the page sliding apparatus shown in
It should be noted that, for brief description, the foregoing method embodiments are represented as a series of actions. However, a person skilled in the art should appreciate that the present invention is not limited to the described order of the actions, because according to the present invention, some steps may be performed in other orders or simultaneously. In addition, a person skilled in the art should also appreciate that all the embodiments described in the specification are examples of embodiments, and the related actions and modules are not necessarily mandatory to the present invention.
In the foregoing embodiments, the description of each embodiment has respective focuses. For a part that is not described in detail in an embodiment, reference may be made to related descriptions in other embodiments.
A sequence of the steps of the method in the embodiments of the present invention may be adjusted, and certain steps may also be merged or removed according to an actual need.
Merging, division, and removing may be performed on the units of the apparatus in the embodiments of the present invention according to an actual need. A person skilled in the art may combine different embodiments and features of different embodiments described in this specification.
With descriptions of the foregoing embodiments, a person skilled in the art may clearly understand that the present invention may be implemented by hardware, firmware or a combination thereof. When the present invention is implemented by software, the foregoing functions may be stored in a computer-readable medium or transmitted as one or more instructions or code in the computer-readable medium. The computer-readable medium includes a computer storage medium and a communications medium, where the communications medium includes any medium that enables a computer program to be transmitted from one place to another. The storage medium may be any available medium accessible to a computer. The following is taken as an example but is not limited: The computer readable medium may include a random access memory (Random Access Memory, RAM), a read-only memory (Read-Only Memory, ROM), an electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), a compact disc read-only memory (Compact Disc Read-Only Memory, CD-ROM) or other optical disk storage, a disk storage medium or other disk storage, or any other medium that can be used to carry or store expected program code in a command or data structure form and can be accessed by a computer. In addition, any connection may be appropriately defined as a computer-readable medium. For example, if software is transmitted from a website, a server or another remote source by using a coaxial cable, an optical fiber/cable, a twisted pair, a digital subscriber line (Digital Subscriber Line, DSL) or wireless technologies such as infrared ray, radio and microwave, the coaxial cable, optical fiber/cable, twisted pair, DSL or wireless technologies such as infrared ray, radio and microwave are included in fixation of a medium to which they belong. For example, a disk (Disk) and disc (disc) used by the present invention includes a compact disc (CD), a laser disc, an optical disc, a digital versatile disc (DVD), a floppy disk and a Blu-ray disc, where the disk generally copies data by a magnetic means, and the disc copies data optically by a laser means. The foregoing combination should also be included in the protection scope of the computer-readable medium.
In conclusion, what is described above is merely examples of embodiments of the technical solutions of the present invention, but is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, or improvement made without departing from the spirit and principle of the present invention shall fall within the protection scope of the present invention.
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/CN2016/074865 | 2/29/2016 | WO | 00 |