Detailed Description
As shown in fig. 1, there is a chart on a mobile terminal (mobile phone), the chart is generated by a payment application, the consumption status of the user in the last year is shown in the form of the chart, the finger of the user can move directly on the screen to the corresponding position, and the information on the chart position corresponding to the position is shown.
However, in practical situations, the user needs to view information differently, for example, a certain payment-type application shows the consumption information of the user every year in the last year through a chart, the user needs to view the consumption information of the user every year every day, the screen size of the general mobile terminal is limited, and especially for the mobile terminal with a small screen size, a user finger slightly moving on the screen spans a long period of time, so that the user cannot view the consumption information of the user every day in the period of time, and the experience is poor for the user.
In view of the above problem, an embodiment of the present disclosure provides a technical solution, where when a user moves on a screen, a moving speed of the user on the screen is determined at intervals, a magnitude relation between the moving speed and a preset threshold is determined, and different information display modes are selected according to a determination result, where one information display mode is to display information on a diagram position corresponding to a contact position, and another information display mode is to display information adjacent to a previous information displayed in a previous monitoring period. Therefore, the information viewing requirement of the user can be roughly determined according to the moving speed of the user on the screen, the corresponding information display mode is automatically selected, and the user experience is improved.
Specifically, the technical solutions provided in the embodiments of the present specification are as follows:
determining the moving distance of the user on the screen in the current monitoring period; calculating the current moving speed of the user on the screen according to the current monitoring period and the moving distance; judging whether the moving speed exceeds a preset threshold value or not; if so, determining the current contact position of the user on the screen, and displaying information on the diagram position corresponding to the contact position; if not, displaying the information adjacent to the last information displayed in the last monitoring period.
In this specification, the mobile terminal device may be a mobile phone, a tablet, or the like, a monitoring period for monitoring the movement of the user on the screen is preset on the mobile terminal, and in each monitoring period, the movement speed of the user on the screen may be determined, specifically, the movement speed of the user finger on the screen may be determined, or the movement speed of another medium (e.g., a stylus pen) used by the user on the screen may be determined, for example, the monitoring period is 0.1S, that is, the movement distance of the user finger on the screen is determined every 0.1S, and the movement speed of the user finger on the screen at this moment is calculated. The technical solution provided by the embodiment of the present specification is described with the finger of the user moving on the screen.
In order to make those skilled in the art better understand the technical solutions in the embodiments of the present specification, the technical solutions in the embodiments of the present specification will be described in detail below with reference to the drawings in the embodiments of the present specification, and it is obvious that the described embodiments are only a part of the embodiments of the present specification, and not all the embodiments. All other embodiments that can be derived by one of ordinary skill in the art from the embodiments given herein are intended to be within the scope of protection.
Referring to fig. 2, an implementation flowchart of the information displaying method provided in the embodiment of the present disclosure is shown, and the method may specifically include the following steps:
s201, determining the moving distance of a user on a screen in the current monitoring period;
in this specification, the moving distance of the user's finger on the screen is determined in the current monitoring period, specifically, the moving distance of the user's finger on the screen is determined by the following implementation manners:
when the timing of the current monitoring period starts, determining a first contact position of a finger of a user on a screen; when the timing of the current monitoring period is ended, determining a second contact position of the finger of the user on the screen; calculating a distance between the first contact position and the second contact position; and determining the distance between the first contact position and the second contact position as the moving distance of the finger of the user on the screen in the current monitoring period.
Taking a mobile phone as an example, the resolution of a mobile phone screen is 240 × 320, which means that 240 pixels are located in the horizontal direction of the mobile phone screen and 320 pixels are located in the longitudinal direction of the mobile phone screen, when a finger of a user moves on the screen from left to right along the horizontal direction, for a certain current monitoring period, when the timing of the current monitoring period starts, a first contact position of the finger of the user on the screen is determined, which is exactly the 100 th pixel in the horizontal direction of the mobile phone screen, when the timing of the current monitoring period ends, namely after 0.1S, a second contact position of the finger of the user on the screen is determined, which is exactly the 110 th pixel in the horizontal direction of the mobile phone screen, the distance between the first contact position and the second contact position is calculated, which is the distance of 10 pixels, and the distance of the 10 pixels is determined, which is the moving distance of the finger of the current monitoring period on the screen.
In addition, when the current monitoring period is the first monitoring period, the first contact position is the contact position of the finger of the user on the screen for the first time, and at this time, information on the graph position corresponding to the contact position of the finger of the user on the screen for the first time is directly displayed, for example, consumption data on the graph position corresponding to the contact position of the finger of the user on the screen for the first time is displayed.
When the current monitoring period is not the first monitoring period, the first contact position is the second contact position of the last monitoring period. For example, in the last monitoring period, the first contact position is the 99 th pixel, and the second contact position is the 100 th pixel, then in the current monitoring period, the first contact position is the 100 th pixel, which means that for this 100 th pixel, in the last monitoring period, it is the second contact position, and in the current monitoring period, it is the first contact position.
S202, calculating the current moving speed of the user on the screen according to the current monitoring period and the moving distance;
for the moving distance obtained in S201, the moving speed of the user' S finger on the screen can be calculated according to the moving distance and the time corresponding to the current monitoring period, that is, the elapsed time of the current monitoring period. For example, when the user 'S finger moves by 10PX (pixels) on the screen in the current monitoring period and the elapsed time of the current monitoring period is 0.1S, the moving speed of the user' S finger on the screen is 100PX/S, which is 10 PX/0.1S.
S203, judging whether the moving speed exceeds a preset threshold value;
after the current moving speed of the finger of the user on the screen is obtained, the size relation between the moving speed and a preset threshold value is judged, and a corresponding information display mode is selected according to the judgment result. For example, in the current monitoring period, the current moving speed of the user ' S finger on the screen is 100PX/S, the preset threshold value is 10PX/S, and it is obvious that the current moving speed of the user ' S finger on the screen is greater than the preset threshold value, it is determined that the moving speed of the user ' S finger on the screen is fast, and the information on the chart position corresponding to the actual contact position is selected for displaying.
S204, if yes, determining the current contact position of the user on the screen, and displaying information on the diagram position corresponding to the contact position;
if the moving speed exceeds the preset threshold, it can be known that the moving speed of the finger of the user on the screen is very fast, and the user only wants to view information at a certain chart position, so that the current contact position of the finger of the user on the screen is determined, that is, the second contact position determined when the current monitoring period timing is ended, and the information on the chart corresponding to the second contact position is directly displayed, for example, the second contact position determined when the current monitoring period timing is ended is the 100 th pixel, and the information on the chart position corresponding to the 100 th pixel is displayed.
S205, if not, displaying information adjacent to the previous information displayed in the previous monitoring period.
If the moving speed does not exceed the preset threshold, that is, the moving speed is less than or equal to the preset threshold, it can be known that the moving speed of the finger of the user on the screen is very low, and the user wants to view the information on the chart positions one by one, and therefore, the information adjacent to the last information displayed in the last monitoring period can be displayed. For example, if the last monitoring period shows the consumption data of the day 2017-10-05, the current monitoring period can directly show the consumption data of the day 2017-10-06.
Preferably, before the information is displayed, the moving direction of the user's finger on the screen in the current monitoring period needs to be determined, and the information adjacent to the last information displayed in the last monitoring period is displayed according to the moving direction. Wherein the moving direction of the user's finger on the screen can be from left to right or from right to left along the horizontal direction, for example, the consumption data of the day 2017-10-05 is shown in the last monitoring period, the adjacent information shown according to the moving direction is the consumption data of the day 2017-10-06 assuming that the moving direction of the user's finger on the screen is from left to right, and the adjacent information shown according to the moving direction is the consumption data of the day 2017-10-04 assuming that the moving direction of the user's finger on the screen is from right to left.
And when the current monitoring period is the first monitoring period, displaying information adjacent to the information on the chart position corresponding to the contact position of the finger of the user on the screen for the first time according to the moving direction. For example, the contact position of the finger of the user on the screen for the first time is the 85 th pixel, the information on the graph position corresponding to the 85 th pixel, namely the consumption data of the 2017-09-04 on the day, is directly displayed by the first contact, the contact position on the screen for the first time is the first contact position of the first monitoring period, and when the first monitoring period is ended, the moving speed is judged not to exceed the preset threshold value, the consumption data of the 2017-09-05 on the day adjacent to the consumption data of the 2017-09-04 on the day is directly displayed.
In order to describe the technical solution provided in the embodiments of the present specification in detail, a description is now made with reference to specific application scenarios: as described above with reference to fig. 1, a chart showing the consumption status of the user in the last year exists on a mobile terminal. When a user finger touches a screen for the first time, determining an 80 th pixel of a touch position of the user finger on the screen for the first time, displaying consumption data of the day 2017-09-11 on a graph position corresponding to the 80 th pixel, when the user finger touches the screen for the first time, starting a first monitoring period, starting a first touch position of a first detection period, namely the 80 th pixel of the touch position of the user finger on the screen for the first time, moving the user finger on the screen for 10 PXs as the user finger moves from left to right on the screen, after 0.1S (monitoring period) passes, ending the first monitoring period, setting a second touch position as the 90 th pixel, moving the user finger on the screen for 10 PXs, wherein the moving speed of the user finger on the screen is 10PX/0.1S or 100PX/S and is more than a preset threshold value 20PX/S, and judging that the moving speed of the user finger on the screen is high, and directly displaying the consumption data of the day 2017-10-04 on the graph position corresponding to the 90 th pixel.
As the user's finger continues to move left to right on the screen, the timing of the 2 nd monitoring period begins, the first contact position of the 2 nd monitoring period is the second contact position of the first monitoring period, that is, the 90 th pixel, after the same time interval of 0.1S, the timing of the 2 nd monitoring period ends, the second contact position of the 2 nd monitoring period is the 91 st pixel, the user ' S finger moves 1PX on the screen, the moving speed of the user ' S finger on the screen is 1 PX/0.1S-10 PX/S and less than the preset threshold value of 20PX/S, and it is determined that the moving speed of the user ' S finger on the screen is slow, displaying consumption data of the day 2017-10-05 adjacent to the 2017-10-04 according to the moving direction of the finger of the user, rather than displaying the consumption data for the day 2017-10-07 at the chart position corresponding to the second touch position for the 2 nd monitoring cycle.
As the user ' S finger continues moving from left to right on the screen, the 3 rd monitoring period starts to be timed, the first contact position of the 3 rd monitoring period, that is, the second contact position of the 2 nd monitoring period, that is, the 91 st pixel, ends after the same time interval of 0.1S, the second contact position of the 3 rd monitoring period is the 92 th pixel, the user ' S finger moves 1PX on the screen, the moving speed of the user ' S finger on the screen is 1PX/0.1S which is 10PX/S and is less than the preset threshold value of 20PX/S, the moving speed of the user ' S finger on the screen is determined to be slow, and consumption data of the day 2017-10-06 adjacent to 2017-10-05 is displayed according to the moving direction of the user ' S finger; then as the user's finger moves across the screen, and so on.
Through the above description of the technical solution provided in the embodiment of the present specification, when the finger of the user moves on the screen, the moving speed of the user on the screen is determined at intervals, the magnitude relationship between the moving speed and the preset threshold is determined, and different information display modes are selected according to the determination result, where one information display mode is to display information on a diagram position corresponding to the contact position, and the other information display mode is to display information adjacent to the previous information displayed in the previous monitoring period. Therefore, the information viewing requirement of the user can be roughly determined according to the moving speed of the finger of the user on the screen, the corresponding information display mode is automatically selected, and the user experience is improved.
Corresponding to the above method embodiment, an embodiment of the present specification further provides an information display apparatus, as shown in fig. 3, the apparatus may include: a setting module 310, a distance determining module 320, a speed calculating module 330, a judging module 340, a first display module 350, and a second display module 360.
A setting module 310, configured to preset, on the mobile terminal, a monitoring period for monitoring movement of a user on a screen of the mobile terminal;
a distance determining module 320 for determining a moving distance of the user on the screen in the current monitoring period;
a speed calculating module 330, configured to calculate a current moving speed of the user on the screen according to the current monitoring period and the moving distance;
the judging module 340 is configured to judge whether the moving speed exceeds a preset threshold;
a first display module 350, configured to determine, if the touch position is determined, a current touch position of the user on the screen, and display information on a diagram position corresponding to the touch position;
the second displaying module 360 is configured to display information adjacent to the previous information displayed in the previous monitoring period if the previous information is not displayed in the previous monitoring period.
In an embodiment of the present disclosure, the distance determining module 320 is specifically configured to:
when the timing of the current monitoring period starts, determining a first contact position of a user on a screen;
when the timing of the current monitoring period is ended, determining a second contact position of the user on the screen;
calculating a distance between the first contact position and the second contact position;
and determining the distance between the first contact position and the second contact position as the moving distance of the user on the screen in the current monitoring period.
In an embodiment of the present disclosure, the second display module 360 is specifically configured to:
if not, determining the moving direction of the user on the screen in the current monitoring period;
and displaying information adjacent to the last information displayed in the last monitoring period according to the moving direction.
In one embodiment of the present description,
when the current monitoring period is the first monitoring period, the first contact position is the contact position of the user on the screen for the first time;
when the current monitoring period is not the first monitoring period, the first contact position is a second contact position of the previous monitoring period;
the device further comprises:
and a third display module 370, configured to display information on a diagram position corresponding to the contact position on the screen for the first time.
In an embodiment of the present specification, when the current monitoring period is the first monitoring period, the second presentation module 360 is specifically configured to:
and if not, displaying information adjacent to the information on the diagram position corresponding to the contact position on the screen for the first time.
In an embodiment of the present disclosure, the first display module 350 is specifically configured to:
if yes, determining that the current contact position of the user on the screen is the second contact position, and displaying information on the diagram position corresponding to the second contact position.
The implementation process of the functions and actions of each module in the above device is specifically described in the implementation process of the corresponding step in the above method, and is not described herein again.
Through the above description of the technical solution provided in the embodiment of the present specification, when the finger of the user moves on the screen, the moving speed of the user on the screen is determined at intervals, the magnitude relationship between the moving speed and the preset threshold is determined, and different information display modes are selected according to the determination result, where one information display mode is to display information on a diagram position corresponding to the contact position, and the other information display mode is to display information adjacent to the previous information displayed in the previous monitoring period. Therefore, the information viewing requirement of the user can be roughly determined according to the moving speed of the finger of the user on the screen, the corresponding information display mode is automatically selected, and the user experience is improved.
Embodiments of the present specification further provide a computer device, as shown in fig. 4, the computer device may include: a processor 410, a memory 420, an input/output interface 430, a communication interface 440, and a bus 450. Wherein processor 410, memory 420, input/output interface 430, and communication interface 440 are communicatively coupled to each other within the device via bus 450.
The processor 410 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits, and is configured to execute related programs to implement the technical solutions provided in the embodiments of the present specification.
The Memory 420 may be implemented in the form of a ROM (Read Only Memory), a RAM (Random Access Memory), a static storage device, a dynamic storage device, or the like. The memory 420 may store an operating system and other application programs, and when the technical solution provided by the embodiments of the present specification is implemented by software or firmware, the relevant program codes are stored in the memory 420 and called to be executed by the processor 410.
The input/output interface 430 is used for connecting an input/output module to realize information input and output. The i/o module may be configured as a component in a device (not shown) or may be external to the device to provide a corresponding function. The input devices may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output devices may include a display, a speaker, a vibrator, an indicator light, etc.
The communication interface 440 is used for connecting a communication module (not shown in the figure) to realize communication interaction between the device and other devices. The communication module can realize communication in a wired mode (such as USB, network cable and the like) and also can realize communication in a wireless mode (such as mobile network, WIFI, Bluetooth and the like).
Bus 450 includes a pathway to transfer information between various components of the device, such as processor 410, memory 420, input/output interface 430, and communication interface 440.
It should be noted that although the above-mentioned device only shows the processor 410, the memory 420, the input/output interface 430, the communication interface 440 and the bus 450, in a specific implementation, the device may also include other components necessary for normal operation. In addition, those skilled in the art will appreciate that the above-described apparatus may also include only those components necessary to implement the embodiments of the present description, and not necessarily all of the components shown in the figures.
Embodiments of the present specification further provide a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the computer program implements the foregoing information presentation method. The method at least comprises the following steps:
an information display method is applied to a mobile terminal, a monitoring period for monitoring the movement of a user on a screen of the mobile terminal is preset on the mobile terminal, and the method comprises the following steps:
determining the moving distance of the user on the screen in the current monitoring period;
calculating the current moving speed of the user on the screen according to the current monitoring period and the moving distance;
judging whether the moving speed exceeds a preset threshold value or not;
if so, determining the current contact position of the user on the screen, and displaying information on the diagram position corresponding to the contact position;
if not, displaying the information adjacent to the last information displayed in the last monitoring period.
Computer-readable media, which include both non-transitory and non-transitory, removable and non-removable media, may implement the information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
From the above description of the embodiments, it is clear to those skilled in the art that the embodiments of the present disclosure can be implemented by software plus necessary general hardware platform. Based on such understanding, the technical solutions of the embodiments of the present specification may be essentially or partially implemented in the form of a software product, which may be stored in a storage medium, such as a ROM/RAM, a magnetic disk, an optical disk, etc., and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments of the present specification.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. A typical implementation device is a computer, which may take the form of a personal computer, laptop computer, cellular telephone, camera phone, smart phone, personal digital assistant, media player, navigation device, email messaging device, game console, tablet computer, wearable device, or a combination of any of these devices.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the apparatus embodiment, since it is substantially similar to the method embodiment, it is relatively simple to describe, and reference may be made to some descriptions of the method embodiment for relevant points. The above-described apparatus embodiments are merely illustrative, and the modules described as separate components may or may not be physically separate, and the functions of the modules may be implemented in one or more software and/or hardware when implementing the embodiments of the present disclosure. And part or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of the embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
The foregoing is only a specific embodiment of the embodiments of the present disclosure, and it should be noted that, for those skilled in the art, a plurality of modifications and decorations can be made without departing from the principle of the embodiments of the present disclosure, and these modifications and decorations should also be regarded as the protection scope of the embodiments of the present disclosure.