CN108605158B - Interface refreshing method and terminal - Google Patents

Interface refreshing method and terminal Download PDF

Info

Publication number
CN108605158B
CN108605158B CN201780009424.6A CN201780009424A CN108605158B CN 108605158 B CN108605158 B CN 108605158B CN 201780009424 A CN201780009424 A CN 201780009424A CN 108605158 B CN108605158 B CN 108605158B
Authority
CN
China
Prior art keywords
interface
user
area
touch screen
refreshing period
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
CN201780009424.6A
Other languages
Chinese (zh)
Other versions
CN108605158A (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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Publication of CN108605158A publication Critical patent/CN108605158A/en
Application granted granted Critical
Publication of CN108605158B publication Critical patent/CN108605158B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/431Generation of visual interfaces for content selection or interaction; Content or additional data rendering

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • User Interface Of Digital Computer (AREA)
  • Controls And Circuits For Display Device (AREA)

Abstract

The application provides an interface refreshing method and a terminal, wherein at the first moment of a first refreshing period, it is judged that one frame of interface expected to be displayed in a second refreshing period is not drawn completely, and the interface to be displayed in the second refreshing period is still the interface displayed in the first refreshing period. In this case, a predicted interface is generated according to the first interface after moving along the sliding direction of the user, and the predicted interface is used as an interface displayed in the second refreshing period, so that the interfaces displayed in the front refreshing period and the back refreshing period can be ensured to be changed in sequence, and the problem of display blockage is solved.

Description

Interface refreshing method and terminal
The present application claims priority from the chinese patent application entitled "a method and apparatus for improving display stuck" filed by the chinese patent office on 8/11/2016, application number 201610980786.7, the entire contents of which are incorporated herein by reference.
Technical Field
The application relates to the technical field of touch screen equipment, in particular to an interface refreshing technology of the touch screen equipment.
Background
With the popularization of touch screen devices, performing a sliding operation on a touch screen becomes a main mode of human-computer interaction, and in the process of the sliding operation, smoothness of interface refreshing of the touch screen device is a key factor influencing user experience.
Specifically, the interface refreshing is a periodic action, and a complete interface refreshing process can be finally presented to a user only through interface layout, interface drawing, interface display and other steps; moreover, the steps involved in each refresh process need to be completed within one refresh cycle to bring about a continuous and smooth experience.
However, due to various reasons such as busy system and complex interface, it cannot be completely guaranteed that each step included in the refresh process is completed on time, so that the time for refreshing the interface once exceeds the refresh period, and at this time, the problem of display blocking occurs.
Disclosure of Invention
In view of this, the present application provides an interface refreshing method and a terminal, so as to solve the problem of display jamming in interface refreshing in the prior art.
In order to achieve the above object, the following solutions are proposed:
a first aspect of the present application provides an interface refreshing method, including the following steps:
at the first moment of the first refreshing period, judging whether a frame of interface expected to be displayed in the second refreshing period is drawn completely; the second refresh cycle is the next refresh cycle of the first refresh cycle, and the frame interface displayed in the first refresh cycle is the first interface.
And if the frame of interface expected to be displayed in the second refreshing period is judged not to be drawn completely, generating a prediction interface according to the first interface after moving along the sliding direction of the user.
And displaying the prediction interface at the starting time of the second refreshing period.
From the above process, it can be seen that: at the first moment of the first refresh period, it is determined that one frame of interface expected to be displayed in the second refresh period is not drawn completely, which indicates that the interface to be displayed in the second refresh period is still the interface displayed in the first refresh period. In this case, a predicted interface is generated according to the first interface after moving along the sliding direction of the user, and the predicted interface is used as an interface displayed in the second refreshing period, so that the interfaces displayed in the front refreshing period and the back refreshing period can be ensured to be changed in sequence, and the problem of display blockage is solved.
A second aspect of the present application discloses a terminal, comprising: a memory to store instructions; a processor for implementing the following functions by executing the program in the memory:
at a first moment in a first refreshing period, judging whether a frame of interface expected to be displayed in a second refreshing period is drawn completely; if the frame of interface expected to be displayed in the second refreshing period is judged not to be drawn completely, generating a prediction interface according to the first interface after moving along the sliding direction of the user; controlling the touch screen to display the prediction interface at the starting time of the second refreshing period; the second refresh cycle is the next refresh cycle of the first refresh cycle, and the frame interface displayed in the first refresh cycle is the first interface.
In one implementation, the generating a prediction interface according to the first interface after moving along the user sliding direction includes:
calculating to obtain the moving direction and distance of the first interface according to the position information of the contact between the user and the touch screen;
moving the first interface by the distance according to the direction to obtain a moved interface and a first area; and the first area is an area left after the first interface moves.
Blurring the image of the second area in the first interface to obtain the image of the first area; wherein the second region is taken adjacent to the first region at the first interface and is the same size as the first region.
And combining the image of the interface after the movement with the image of the first area to obtain the prediction interface.
In one implementation, the blurring the image of the second region in the first interface to obtain the image of the first region includes:
and filling the image of the second area into the first area.
And attenuating the pixels of the filled image in the first area by adopting a preset attenuation coefficient according to a preset attenuation width by taking the adjacent side of the first area and the second area as a reference until the pixel attenuation of the filled image in the first area is finished, so as to obtain the image of the first area.
In one implementation, the calculating, according to the position information of the user contacting the touch screen, a direction and a distance of the first interface movement includes:
calculating to obtain a first sliding speed and a first sliding time of the user according to the position information of the contact between the user and the touch screen in the first refreshing period and the position information of the contact between the user and the touch screen in the third refreshing period; wherein the third refresh period is a refresh period prior to the first refresh period.
Calculating to obtain a second sliding speed and a second sliding time of the user according to the position information of the user in contact with the touch screen in the third refreshing period and the position information of the user in contact with the touch screen in the fourth refreshing period; wherein the fourth refresh cycle is a refresh cycle prior to the third refresh cycle.
And calculating the first sliding speed, the second sliding speed and the first sliding time by adopting a first preset formula to obtain the predicted sliding speed of the user in a second refreshing period.
And calculating the position information of the contact between the user and the touch screen in the first refreshing period of the user, the predicted sliding speed of the user in the second refreshing period, the first sliding time and the second sliding time by adopting a second preset formula, and calculating to obtain the coordinate point of the contact point between the user and the touch screen in the second refreshing period.
And calculating to obtain the moving direction and distance of the first interface according to the coordinate point of the contact point of the user and the touch screen in the second refreshing period and the position information of the contact of the user and the touch screen in the first refreshing period.
In one implementation, the determining whether drawing of a frame of interface expected to be displayed in the second refresh cycle is completed or not includes:
and detecting the state of the buffer corresponding to the frame interface expected to be displayed in the second refreshing period.
And judging whether the state of the buffer is a drawing finished state or not.
If the state of the buffer is not the drawing completion state, judging that the drawing of the frame interface expected to be displayed in the second refreshing period is not completed.
Drawings
FIG. 1 is a diagram illustrating an interface refresh process in the prior art;
FIG. 2 is a flow chart of a method for refreshing an interface according to an embodiment of the present disclosure;
FIG. 3(a) is a flowchart of a method for calculating a direction and a distance of a frame of interface movement displayed in a first refresh period according to an embodiment of the present disclosure;
FIG. 3(b) is a diagram showing the manner of predicting an interface disclosed in the embodiments of the present application;
FIG. 4 is a diagram showing an interface of two frames according to an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of a terminal disclosed in an embodiment of the present application.
Detailed Description
The single buffer technology means that the same buffer is used in the refreshing process of each frame of interface, that is, the steps of interface layout, interface drawing, interface display and the like in each refreshing period are all completed in the same buffer. Specifically, after the steps of interface layout, interface drawing, interface display, and the like of the previous frame of interface are completed in the buffer, the buffer is released and can be used for the processes of the steps of interface layout, interface drawing, interface display, and the like of the next frame of interface. However, if the interface layout or interface drawing processing time of a frame of interface is too long, the refresh time of the frame of interface exceeds the refresh period, and thus the display is stuck.
The multi-buffer technology means that the refreshing process of the interface can use a plurality of (generally three) buffers. Specifically, before the interface of the previous frame is not displayed, a new buffer may be used to synchronously perform the interface layout and interface drawing operations of the interface of the next frame. Therefore, after the display of the interface of the previous frame is finished, the interface of the next frame is drawn and can be directly displayed. However, when the interface layout or interface drawing processing time of a frame of interface is too long, the interface is not drawn when the refresh period of the frame of interface comes, and no interface can be displayed, and the display stuck problem still occurs. For example: as shown in fig. 1, the interface displayed in the first refresh period is the first frame interface a, and in the process of displaying a, the interface layout work of the second frame interface B to be displayed in the second refresh period is completed, but the time for drawing the interface of the interface B is too long, so that the interface B is not drawn yet at the end of the first refresh period, and therefore, the interface displayed in the second refresh period is also the first frame interface a, and interface pause occurs. At the end of the second refresh period, the drawing of the interface B and the interface layout of the third frame interface C are finished; at the end of the third refresh cycle, the drawing of the interface C and the interface layout and drawing of the interface a of the fourth frame are also completed, so that the interface B can be displayed in the third refresh cycle, the interface C can be displayed in the fourth refresh cycle, and the interface refresh process is restored smoothly.
The method comprises the following steps that in the interface refreshing process executed based on the single buffer technology and the multi-buffer technology, the problem that display blockage occurs due to long time of interface layout or interface drawing exists, and the embodiment of the application provides a method for refreshing an interface.
An interface refreshing method provided in an embodiment of the present application, referring to fig. 2, includes the steps of:
s201, at a first time in the first refresh cycle, whether drawing of a frame of interface expected to be displayed in the second refresh cycle is completed is judged.
The first refresh cycle mentioned in this step refers to any one refresh cycle in the interface refresh process, and the second refresh cycle is the next refresh cycle of the first refresh cycle. Specifically, a user performs a sliding operation on a touch screen of the touch screen device, and an interface of the touch screen device performs a refreshing process for one sliding operation of the user. It should be noted that the interface refreshing process is performed periodically, and the number of times of interface refreshing and the time of one refreshing cycle of the interface, which correspond to one sliding operation of the user, are calculated according to the refreshing rate of the touch screen device. For example: the refresh rate is 60Hz, if the time of the sliding operation is 1 second, 60 interface refreshes need to be performed, and the time of the refresh cycle of one interface is 1000 ms/60-16.7 ms, so that the steps of interface layout, interface drawing, interface display and the like of one frame of interface need to be performed within the refresh cycle of 16.7ms, and the interface refresh smoothness can be ensured.
It should be further noted that the first time mentioned in this step is a time before the end time of the first refresh cycle, and the time interval between the time and the end time may be set according to the computing capability of the touch screen device, for example: a time of 1 ms.
And the user performs a sliding operation on the touch screen of the touch screen device, and records a coordinate point of a contact point of the finger and the touch screen and a generation time of the coordinate point from the beginning of the contact of the finger on the touch screen to the end of the contact of the finger off the touch screen, wherein the coordinate point and the generation time of the coordinate point can be used as position information of the contact of the user and the touch screen.
In the single buffer technology, after recording a plurality of coordinate points, performing interface layout and interface drawing work of a frame of interface displayed in an initial refresh period in a buffer, displaying the drawn interface at the initial time of the initial refresh period, and releasing the buffer; and in the time of the initial refreshing period, performing interface layout and interface drawing work of one frame of interface displayed in the next refreshing period by using the buffer, and sequentially performing the work. In the multi-buffer technology, after recording a plurality of coordinate points, performing interface layout and interface drawing work of a frame of interface displayed in an initial refresh period in a buffer, and displaying the drawn interface at the initial time of the initial refresh period; meanwhile, the interface layout and the interface drawing work of one frame of interface displayed in the next refreshing period are carried out in the other buffer, and the display of the frame of interface is carried out at the starting time of the refreshing period, and the display is also carried out sequentially in turn.
It should be noted that, in the process of interface refreshing by using the single buffer technology and the multiple buffer technology, at a certain time before the end time of the previous refresh cycle (referred to as a first refresh cycle), it is determined whether drawing of a frame of interface displayed in the next refresh cycle (referred to as a second refresh cycle) is completed, so as to obtain the start time of the second refresh cycle and whether the interface can be displayed.
In addition, the time for executing the step of determining whether the drawing of the one frame interface expected to be displayed in the second refresh cycle is completed may be, in addition to the first time in the first refresh cycle: any time before the start time of the second refresh cycle, that is, any time before the time when one frame of interface expected to be displayed in the second refresh cycle is displayed, for example: at any time within a refresh period preceding the first refresh period.
Optionally, in another embodiment of the present application, the implementation process of step S201 may specifically include:
and detecting the state of a buffer corresponding to one frame of interface expected to be displayed in the second refreshing period.
And judging whether the state of the buffer is a drawing completion state or not.
In the single buffer technology or the multi-buffer technology, in the interface refreshing process, if a frame of interface displayed in a certain refreshing period is already drawn, the pixel values of the pixel points included in the frame of interface need to be stored in a buffer, and at this time, the state of the buffer is the drawing completion state. Of course, if a frame of interface displayed in a certain refresh period has not been drawn, the state of the buffer for storing the pixel values of the frame of interface may be a state in which drawing is not started or a state in which drawing is not completed. Therefore, the state of the buffer corresponding to the frame of interface expected to be displayed in the second refresh period is detected, and whether the frame of interface displayed in the second refresh period is completely drawn or not can be known.
If the determination result in step S201 is: if it is determined that the drawing of the frame of interface expected to be displayed in the second refresh cycle is completed, step S202 may be executed to display the drawn frame of interface at the start time of the second refresh cycle. If the determination result in step S201 is: if it is determined that the drawing of the interface of one frame expected to be displayed in the second refresh period is not completed, step S203 may be executed.
S203, according to the position information of the contact between the user and the touch screen, calculating to obtain the moving direction D and the distance L of the frame of interface displayed in the first refreshing period.
It should be noted that, if the frame of interface to be displayed in the second refresh period is not completely drawn, it is stated that the interface to be displayed in the second refresh period is still the interface displayed in the first refresh period, and at this time, a situation that the same interface is displayed in the front and back refresh periods occurs, that is, the display is stuck.
Therefore, position information of the touch screen contacted by the user, which can reflect the direction of the sliding operation of the user and the sliding distance in one refreshing period, is obtained, and the direction to be moved and the distance to be moved of the frame of interface displayed in the first refreshing period are calculated according to the position information. The frame interface displayed in the first refresh period may also be referred to as a first interface.
Optionally, in another embodiment of the present application, referring to fig. 3(a), the implementation process of step S203 may specifically include:
s2031, position information of the user contacting the touch screen in the first refreshing period and position information of the user contacting the touch screen in the third refreshing period are obtained.
It should be noted that, in conjunction with fig. 3(b), the third refresh cycle is a refresh cycle before the first refresh cycle. And, the position information of the user's contact with the touch screen includes: the method comprises the following steps of (1) generating a coordinate point of a contact point of a user and the touch screen and the generation time of the coordinate point, and therefore the method specifically comprises the following steps: a coordinate point P1 of a point of contact of a user with the touch screen and a generation time t1 of the coordinate point in the first refresh period, and a coordinate point P2 of the point of contact of the user with the touch screen and a generation time t2 of the coordinate point in the third refresh period are acquired, respectively.
S2032, calculating a first sliding speed V1 and a first sliding time T1 of the user according to the position information of the contact of the user and the touch screen in the first refreshing period and the position information of the contact of the user and the touch screen in the third refreshing period.
Specifically, the distance between the coordinate point P1 of the user's contact point with the touch screen in the first refresh period and the coordinate point P2 of the user's contact point with the touch screen in the third refresh period may represent the sliding distance of the user in one refresh period, for example: referring to fig. 3(b), a coordinate point P1 is collected at the start time of the first refresh period, a coordinate point P2 is collected at the start time of the third refresh period, and the distance between the coordinate point P1 and the coordinate point P2 is just the distance that the user slides during the third refresh period. And, the generation time of the coordinate point P1 is located in the first refresh period, the generation time of the coordinate point P2 is located in the third refresh period, and the time difference between the two is substantially equal to the sliding time of the user in one refresh period, and also referring to fig. 3(b), the difference between the generation time of the coordinate point P1 and the generation time of the coordinate point P2 is exactly the time when the user slides in one refresh period. Based on this, the first sliding time T1 is T1-T2, and the first sliding speed V1 of the user is (P1-P2)/(T1-T2).
S2033, position information of the touch screen contacted by the user in the fourth refreshing period is obtained.
The fourth refresh cycle is a previous refresh cycle of the third refresh cycle; and, the position information of the user contacting the touch screen in the fourth refresh cycle also includes: a coordinate point P3 of a point of contact of the user with the touch screen and a generation time of the coordinate point in the fourth refresh period.
It should be noted that the first, second, third, and fourth mentioned in the present embodiment do not represent the order.
S2034, calculating a second sliding speed V2 and a second sliding time T2 of the user according to the position information of the contact of the user and the touch screen in the fourth refreshing period and the position information of the contact of the user and the touch screen in the third refreshing period.
Similarly, with reference to the calculation manners of V1 and T1, a second sliding speed V2 and a second sliding time T2 are calculated.
S2035, calculating the predicted sliding speed V of the user in the second refresh period according to the formula V-V1 + (V1-V2)/T1.
It should be noted that the sliding operation of the user can be understood as the uniform acceleration moving process, and the (V1-V2)/T1 is the sliding acceleration of the user in the first refresh period, so that the sliding acceleration is added to the sliding speed of the user in the first refresh period, which can be used as the predicted sliding speed V of the user in the second refresh period.
S2036, calculating a coordinate point P4 of the contact point of the user and the touch screen in the second refresh period according to the formula P4 ═ P1+ V × (T1+ T2)/2.
Specifically, the sliding time of the user in the second refresh period is calculated as (T1+ T2)/2, and therefore, the product of the predicted sliding speed of the user in the second refresh period and the sliding time of the user in the second refresh period is the sliding distance of the user in the second refresh period. And, the coordinate point P4 of the point of contact of the user with the touch screen in the second refresh period is obtained by adding the sliding distance of the user in the second refresh period to the coordinate point P1 of the point of contact of the user with the touch screen in the first refresh period.
S2037, obtaining the moving direction and distance of the interface of one frame displayed in the first refresh period according to the distance between the coordinate point P4 of the contact point of the user and the touch screen in the second refresh period and the coordinate point P1 of the contact point of the user and the touch screen in the first refresh period.
It should be noted that, generally, a pixel point at the upper left corner of the touch screen is set as the coordinate origin for calculation, and if the user slides right, the value of the coordinate point of the user on the touch screen increases, otherwise, the value decreases. Therefore, the difference between P4 and P1 in the horizontal direction, i.e. the distance moved by the frame of interface displayed in the first refresh period, is calculated, and the positive and negative of the difference can represent the sliding direction of the user, and correspondingly, the sliding direction of the user is opposite to the moving direction of the frame of interface displayed in the first refresh period.
S204, moving the frame of interface displayed in the first refreshing period by a distance L along the direction D to obtain the moved interface and the first area.
In order to realize the difference between the interfaces displayed in the first refresh period and the second refresh period and the smoothness of the display process, the frame of interface displayed in the first refresh period is moved according to the direction calculated in step S203, and the moving distance is the distance calculated in step S203. Referring to fig. 4, a frame of interface 401 displayed in the first refresh period moves along the sliding direction indicated by the arrow in the figure to obtain the moved interface 402 and the first area 41, where the first area 41 can be understood as an area left after the frame of interface 401 displayed in the first refresh period moves, that is, the moved frame of interface fails to cover the entire area of the touch screen.
It should be further noted that, when a frame of interface displayed in the first refresh period is moved, in a specific implementation, a frame of interface is intercepted from the frame of interface displayed in the first refresh period according to the moving direction and the moving distance, and is used as the moved interface.
S205, blurring the image of the second area in the frame interface displayed in the first refreshing period to obtain the image of the first area.
Here, referring also to fig. 4, the second area 42 is cut out from a side adjacent to the first area in one frame interface displayed in the first refresh period, and is the same size as the first area. It should be noted that after the interface of one frame displayed in the first refresh period moves, the first area left has no image and needs to be filled with an image. The second area is the area closest to the first area, the image contents of the two areas are relatively close, the image of the first area is formed after the second area is subjected to fuzzy processing, the image of the first area and the image of the interface after one frame of interface moving displayed in the first refreshing period can be spliced to form the image, and the image is relatively smooth.
Optionally, in another embodiment of the present application, the implementation process of step S205 may specifically include:
s2051, the image of the second area is filled into the first area.
And S2052, attenuating the pixels of the filled image in the second area by using a preset attenuation coefficient according to a preset attenuation width by taking the adjacent side of the first area and the second area as a reference until the pixel attenuation of the filled image in the first area is finished, so as to obtain the image of the first area.
It should be noted that the filling image in the first area is composed of pixels of substantially m × n, where m represents a row and n represents a column. The attenuation width is used to fill how many pixel columns the image is spaced between the attenuated pixel columns, for example: when the image is wide, attenuation is performed every 4 pixel columns, namely, 4 pixel columns are arranged between the first attenuated pixel column and the second attenuated pixel column. The attenuation coefficient is used to indicate the relationship between two pixel values before and after one attenuation width apart in each row, for example: the attenuation factor is 90%, i.e. the value of the following pixel is attenuated to 90% of the value of the preceding pixel.
In this step, the attenuation width may be set according to the width of the filled image of the first region, and basically, the width of the image of the first region is large, the number of pixel columns is large, the set attenuation width is large, and otherwise, the attenuation width is small. The attenuation coefficient may be set according to the size of the pixel point value included in the filled image of the first region, or may be combined with the attenuation width value, as long as it is ensured that the image attenuated by the set attenuation coefficient is in smooth transition, and there is no sudden increase or decrease of the pixel value.
It should be further noted that, if, in the process of attenuating the pixels of the filled image in the first region by using the preset attenuation coefficient according to the preset attenuation width, the last column of pixels of the filled image in the first region is an unattenuated pixel, and the number of pixel columns spaced from the previous attenuated pixel column is less than the preset attenuation width, the last column of pixels may be optionally unattenuated, or attenuated similarly.
It should be further noted that, besides the manner disclosed in the above embodiment, the implementation process of step S205 may also adopt other algorithms, as long as the algorithms can achieve the purpose of performing the blurring processing on the image of the second region, and the description thereof is omitted here.
And S206, combining the image of the interface after the movement with the image of the first area to obtain a predicted interface.
Specifically, the image of the interface after the interface movement of one frame displayed in the first refresh period and the image of the first region obtained in step S207 are merged and combined to form an image as a predicted interface.
If the determination result in step S203 is: and judging that the drawing of the frame of interface expected to be displayed in the second refreshing period is not completed, and showing that the interface to be displayed in the second refreshing period is still the interface displayed in the first refreshing period, wherein the situation that the same interface is displayed in the front refreshing period and the back refreshing period can occur, namely the problem of display blockage. In this case, steps S205 to S208 are executed to actually complete the process of moving the frame of interface displayed in the first refresh period along the user sliding direction, and generating the predicted interface according to the interface after the frame of interface displayed in the first refresh period is moved. The predicted interface is used as the interface displayed in the second refreshing period, so that the interfaces displayed in the front refreshing period and the back refreshing period can be ensured to be changed in sequence, and the problem of display blockage is solved.
Further, steps S203 to S206 are an implementation manner for generating a prediction interface based on one frame of interface displayed in the first refresh period after moving in the user sliding direction.
And S207, displaying a prediction interface at the starting time of the second refreshing period.
Another embodiment of the present application further discloses a terminal, where the terminal can ensure fluency of interface refreshing, and specifically, the terminal is a touch screen device including a touch screen capable of performing human-computer interaction, and as shown in fig. 5, the touch screen device further includes:
a memory 501 for storing instructions;
a processor 502 for implementing the following functions by running the program in the memory:
at a first moment in a first refreshing period, judging whether a frame of interface expected to be displayed in a second refreshing period is drawn completely; if the frame of interface expected to be displayed in the second refreshing period is judged not to be drawn completely, generating a prediction interface according to the first interface after moving along the sliding direction of the user; controlling the touch screen to display the prediction interface at the starting time of the second refreshing period; the second refresh cycle is the next refresh cycle of the first refresh cycle, and the frame interface displayed in the first refresh cycle is the first interface.
In this embodiment, after the user performs the sliding operation on the touch screen of the terminal, the processor 502 runs the program in the memory 501, and determines whether the drawing of the frame of interface that is expected to be displayed in the second refresh cycle is completed at the first time in the first refresh cycle; if the frame of interface expected to be displayed in the second refreshing period is judged not to be drawn completely, a prediction interface is generated according to the first interface after the frame of interface is moved along the sliding direction of the user, so that the interfaces displayed in the first refreshing period and the second refreshing period can be ensured to be changed in sequence, the smoothness of interface refreshing is maintained, and the problem of display blockage is solved.
Optionally, in another embodiment of the present application, when the processor 502 executes the step of generating the predicted interface according to the first interface after moving along the user sliding direction, the step is specifically configured to:
calculating to obtain the moving direction and distance of the first interface according to the position information of the contact between the user and the touch screen; moving the first interface for a distance according to the moving direction to obtain a moved interface and a first area; blurring the image of the second area in the first interface to obtain an image of the first area; combining the image of the interface after the movement with the image of the first area to obtain a predicted interface;
the first area is an area left after the first interface moves, and the second area is cut at the side, adjacent to the first area, of the first interface and is the same as the first area in size.
In this embodiment, the specific working process of the processor 502 may refer to the contents of steps S203 to S206 in the method embodiment corresponding to fig. 2, which are not described herein again.
Optionally, in another embodiment of the present application, when the processor 502 performs a blurring process on the image of the second area in the first interface to obtain the image of the first area, the method is specifically configured to:
filling the image of the second area into the first area; and attenuating the pixels of the filled image in the first area by adopting a preset attenuation coefficient according to a preset attenuation width by taking one side of the first area adjacent to the second area as a reference until the pixel attenuation of the filled image in the first area is finished, so as to obtain the image of the first area.
In this embodiment, the specific working process of the processor 502 may refer to the content of the preferred embodiment in step S205 in the embodiment of the method corresponding to fig. 2, which is not described herein again.
Optionally, in another embodiment of the application, when the processor 501 performs the step of calculating the moving direction and distance of the first interface according to the position information of the user contacting the touch screen, the step is specifically configured to:
calculating to obtain a first sliding speed and a first sliding time of the user according to the position information of the contact between the user and the touch screen in the first refreshing period and the position information of the contact between the user and the touch screen in the third refreshing period;
calculating to obtain a second sliding speed and a second sliding time of the user according to the position information of the user in contact with the touch screen in the third refreshing period and the position information of the user in contact with the touch screen in the fourth refreshing period;
calculating a first sliding speed, a second sliding speed and first sliding time by adopting a first preset formula to obtain a predicted sliding speed of a user in a second refreshing period;
calculating position information of the user in contact with the touch screen in a first refreshing period of the user, a predicted sliding speed of the user in a second refreshing period, first sliding time and second sliding time by adopting a second preset formula, and calculating to obtain a coordinate point of a contact point of the user and the touch screen in the second refreshing period;
calculating to obtain the moving direction and distance of the first interface according to the coordinate point of the contact point of the user and the touch screen in the second refreshing period and the position information of the contact of the user and the touch screen in the first refreshing period;
the third refresh cycle is a previous refresh cycle of the first refresh cycle, and the fourth refresh cycle is a previous refresh cycle of the third refresh cycle.
In this embodiment, the specific working process of the processor 502 may refer to the content in the method embodiment corresponding to fig. 3(a), which is not described herein again.
Optionally, in another embodiment of the present application, when the processor 502 determines whether drawing of a frame of interface expected to be displayed in the second refresh cycle is completed, the method is specifically configured to:
detecting the state of a buffer corresponding to the frame interface expected to be displayed in the second refreshing period; judging whether the state of the buffer is a drawing finished state or not;
if the state of the buffer is not the drawing completion state, judging that the drawing of the frame interface expected to be displayed in the second refreshing period is not completed.
In this embodiment, the specific working process of the processor 502 may refer to the content of the preferred embodiment in step S201 in the embodiment of the method corresponding to fig. 2, which is not described herein again.

Claims (8)

1. A method for refreshing an interface, comprising:
at a first moment in a first refreshing period, judging whether a frame of interface expected to be displayed in a second refreshing period is drawn completely; the second refresh cycle is the next refresh cycle of the first refresh cycle, and the frame interface displayed in the first refresh cycle is the first interface;
if the frame of interface expected to be displayed in the second refreshing period is judged not to be drawn completely, calculating the moving direction and distance of the first interface according to the position information of the contact between the user and the touch screen;
moving the first interface by the distance according to the direction to obtain a moved interface and a first area; the first area is an area left after the first interface moves;
blurring the image of the second area in the first interface to obtain the image of the first area; wherein the second region is cut at the side of the first interface adjacent to the first region and is the same size as the first region;
combining the image of the interface after the movement with the image of the first area to obtain a prediction interface;
and displaying the prediction interface at the starting time of the second refreshing period.
2. The method of claim 1, wherein the blurring the image of the second region in the first interface to obtain the image of the first region comprises:
filling the image of the second area into the first area;
and attenuating the pixels of the filled image in the first area by adopting a preset attenuation coefficient according to a preset attenuation width by taking the adjacent side of the first area and the second area as a reference until the pixel attenuation of the filled image in the first area is finished, so as to obtain the image of the first area.
3. The method of claim 1, wherein the calculating the direction and distance of the first interface movement according to the position information of the user contacting the touch screen comprises:
calculating to obtain a first sliding speed and a first sliding time of the user according to the position information of the contact between the user and the touch screen in the first refreshing period and the position information of the contact between the user and the touch screen in the third refreshing period; wherein the third refresh cycle is a previous refresh cycle of the first refresh cycle;
calculating to obtain a second sliding speed and a second sliding time of the user according to the position information of the user in contact with the touch screen in the third refreshing period and the position information of the user in contact with the touch screen in the fourth refreshing period; wherein the fourth refresh cycle is a previous refresh cycle to the third refresh cycle;
calculating the first sliding speed, the second sliding speed and the first sliding time by adopting a first preset formula to obtain the predicted sliding speed of the user in a second refreshing period;
calculating the position information of the contact between the user and the touch screen in the first refreshing period of the user, the predicted sliding speed of the user in the second refreshing period, the first sliding time and the second sliding time by adopting a second preset formula, and calculating to obtain a coordinate point of the contact point between the user and the touch screen in the second refreshing period;
and calculating to obtain the moving direction and distance of the first interface according to the coordinate point of the contact point of the user and the touch screen in the second refreshing period and the position information of the contact of the user and the touch screen in the first refreshing period.
4. The method of claim 1, wherein determining whether a frame of the interface expected to be displayed in the second refresh cycle is completely drawn comprises:
detecting the state of a buffer corresponding to the frame interface expected to be displayed in the second refreshing period;
judging whether the state of the buffer is a drawing finished state or not;
if the state of the buffer is not the drawing completion state, judging that the drawing of the frame interface expected to be displayed in the second refreshing period is not completed.
5. A terminal is characterized by comprising a touch screen for human-computer interaction, and further comprising:
a memory to store instructions;
a processor for implementing the following functions by executing the program in the memory:
at a first moment in a first refreshing period, judging whether a frame of interface expected to be displayed in a second refreshing period is drawn completely; the second refresh cycle is the next refresh cycle of the first refresh cycle, and the frame interface displayed in the first refresh cycle is the first interface; if the frame of interface expected to be displayed in the second refreshing period is judged not to be drawn completely, calculating the moving direction and distance of the first interface according to the position information of the contact between the user and the touch screen; moving the first interface by the distance according to the direction to obtain a moved interface and a first area; the first area is an area left after the first interface moves; blurring the image of the second area in the first interface to obtain the image of the first area; wherein the second region is cut at the side of the first interface adjacent to the first region and is the same size as the first region; combining the image of the interface after the movement with the image of the first area to obtain a prediction interface; and controlling the touch screen to display the prediction interface at the starting time of the second refreshing period.
6. The terminal according to claim 5, wherein the processor, when executing the blurring processing on the image of the second region in the first interface to obtain the image of the first region, is specifically configured to:
filling the image of the second area into the first area; and attenuating the pixels of the filled image in the first area by adopting a preset attenuation coefficient according to a preset attenuation width by taking the adjacent side of the first area and the second area as a reference until the pixel attenuation of the filled image in the first area is finished, so as to obtain the image of the first area.
7. The terminal according to claim 5, wherein the processor, when calculating the direction and distance of the first interface movement according to the position information of the user contacting the touch screen, is specifically configured to:
calculating to obtain a first sliding speed and a first sliding time of the user according to the position information of the contact between the user and the touch screen in the first refreshing period and the position information of the contact between the user and the touch screen in the third refreshing period; wherein the third refresh cycle is a previous refresh cycle of the first refresh cycle;
calculating to obtain a second sliding speed and a second sliding time of the user according to the position information of the user in contact with the touch screen in the third refreshing period and the position information of the user in contact with the touch screen in the fourth refreshing period; wherein the fourth refresh cycle is a previous refresh cycle to the third refresh cycle;
calculating the first sliding speed, the second sliding speed and the first sliding time by adopting a first preset formula to obtain the predicted sliding speed of the user in a second refreshing period;
calculating the position information of the contact between the user and the touch screen in the first refreshing period of the user, the predicted sliding speed of the user in the second refreshing period, the first sliding time and the second sliding time by adopting a second preset formula, and calculating to obtain a coordinate point of the contact point between the user and the touch screen in the second refreshing period;
and calculating to obtain the moving direction and distance of the first interface according to the coordinate point of the contact point of the user and the touch screen in the second refreshing period and the position information of the contact of the user and the touch screen in the first refreshing period.
8. The terminal of claim 5, wherein the processor is configured to, when determining whether drawing of a frame of the interface expected to be displayed in the second refresh cycle is completed, specifically:
detecting the state of a buffer corresponding to the frame interface expected to be displayed in the second refreshing period; judging whether the state of the buffer is a drawing finished state or not;
if the state of the buffer is not the drawing completion state, judging that the drawing of the frame interface expected to be displayed in the second refreshing period is not completed.
CN201780009424.6A 2016-11-08 2017-01-23 Interface refreshing method and terminal Active CN108605158B (en)

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
CN2016109807867 2016-11-08
CN201610980786 2016-11-08
PCT/CN2017/072197 WO2018086258A1 (en) 2016-11-08 2017-01-23 Interface refreshing method and terminal

Publications (2)

Publication Number Publication Date
CN108605158A CN108605158A (en) 2018-09-28
CN108605158B true CN108605158B (en) 2020-03-20

Family

ID=62109215

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201780009424.6A Active CN108605158B (en) 2016-11-08 2017-01-23 Interface refreshing method and terminal

Country Status (2)

Country Link
CN (1) CN108605158B (en)
WO (1) WO2018086258A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020211029A1 (en) * 2019-04-18 2020-10-22 深圳市柔宇科技有限公司 Note redrawing method, writing device, and storage medium
KR20220049407A (en) 2020-10-14 2022-04-21 삼성전자주식회사 Display apparatus and control method thereof

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102999283A (en) * 2011-09-08 2013-03-27 汉王科技股份有限公司 Touch screen terminal unlocking method and touch screen terminal

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9383917B2 (en) * 2011-03-28 2016-07-05 Microsoft Technology Licensing, Llc Predictive tiling
US8756511B2 (en) * 2012-01-03 2014-06-17 Lg Electronics Inc. Gesture based unlocking of a mobile terminal
JP2014067289A (en) * 2012-09-26 2014-04-17 Toshiba Corp Information processing apparatus and display control method
JP6392881B2 (en) * 2014-02-04 2018-09-19 タクチュアル ラブズ シーオー. Low latency visual response to input by pre-generation of alternative graphic representations of application elements and input processing of graphic processing units
CN105224350A (en) * 2014-06-13 2016-01-06 深圳市云帆世纪科技有限公司 A kind of accelerated method of interface redirect and device
CN104317511B (en) * 2014-10-14 2017-07-21 中国联合网络通信集团有限公司 Screen fluency method of testing and device
US9852759B2 (en) * 2014-10-25 2017-12-26 Yieldmo, Inc. Methods for serving interactive content to a user
KR20160064839A (en) * 2014-11-28 2016-06-08 삼성전자주식회사 Method for displaying screen using low frequency and apparatus for perfoming the same
CN105550356B (en) * 2015-12-28 2019-07-16 魅族科技(中国)有限公司 A kind of browsing content pre-add support method and terminal
CN105677327B (en) * 2015-12-30 2018-11-20 合一网络技术(北京)有限公司 A kind of method and system that page info preloads

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102999283A (en) * 2011-09-08 2013-03-27 汉王科技股份有限公司 Touch screen terminal unlocking method and touch screen terminal

Also Published As

Publication number Publication date
WO2018086258A1 (en) 2018-05-17
CN108605158A (en) 2018-09-28

Similar Documents

Publication Publication Date Title
US10416874B2 (en) Methods, apparatuses, and devices for processing interface displays
US20130271487A1 (en) Position lag reduction for computer drawing
US20150370402A1 (en) Methods, systems, and media for controlling playback of video using a touchscreen
US9135892B2 (en) System and method for viewing content
CN103455292B (en) Business datum display processing method and device, subscriber equipment
US8947420B2 (en) Processing image content for content motion or touch input
US9569004B2 (en) Swipe toolbar to switch tabs
CN106649639A (en) Page display method and device
CN105892877A (en) Multi-finger closing/opening gesture recognition method and device as well as terminal equipment
CN106681616B (en) Method, device and equipment for displaying function bar of browser
WO2015196804A1 (en) Virtual desktop image processing method and device, virtual desktop server and thin terminal
CN108605158B (en) Interface refreshing method and terminal
CN104035714B (en) Event processing method, device and equipment based on Android system
US10895954B2 (en) Providing a graphical canvas for handwritten input
WO2016141597A1 (en) Touch control method, device, terminal and graphical user interface thereof
US9519415B2 (en) Information processing device, storage medium, information processing system, and information processing method
CN111796827B (en) Bullet screen drawing method, device, equipment and storage medium
CN107015726A (en) A kind of multidate information methods of exhibiting and device
CN109800039B (en) User interface display method and device, electronic equipment and storage medium
CN113891141B (en) Video processing method, device and equipment
US10350493B2 (en) Information processing program and information processing method
CN111311760A (en) Three-dimensional building display method, system, device and storage medium
CN112363787A (en) Image processing method and device and electronic equipment
EP3164792A1 (en) Latency reduction for detached content
CN118035580A (en) Method and device for displaying three-dimensional control in page

Legal Events

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