WO2016188289A1 - Drawing method and device for interface element - Google Patents

Drawing method and device for interface element Download PDF

Info

Publication number
WO2016188289A1
WO2016188289A1 PCT/CN2016/080306 CN2016080306W WO2016188289A1 WO 2016188289 A1 WO2016188289 A1 WO 2016188289A1 CN 2016080306 W CN2016080306 W CN 2016080306W WO 2016188289 A1 WO2016188289 A1 WO 2016188289A1
Authority
WO
WIPO (PCT)
Prior art keywords
interface element
focus
target
target location
time
Prior art date
Application number
PCT/CN2016/080306
Other languages
French (fr)
Chinese (zh)
Inventor
李剑波
Original Assignee
阿里巴巴集团控股有限公司
李剑波
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 阿里巴巴集团控股有限公司, 李剑波 filed Critical 阿里巴巴集团控股有限公司
Publication of WO2016188289A1 publication Critical patent/WO2016188289A1/en

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
    • H04N21/4312Generation of visual interfaces for content selection or interaction; Content or additional data rendering involving specific graphical features, e.g. screen layout, special fonts or colors, blinking icons, highlights or animations
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/81Monomedia components thereof
    • H04N21/8146Monomedia components thereof involving graphical data, e.g. 3D object, 2D graphics

Definitions

  • the present application relates to the field of computer technology, and in particular, to a method and an apparatus for drawing interface elements.
  • interface elements in the display interface may have a location tracking relationship with each other.
  • the two interface elements of focus and focus frame as an example, there is a position tracking relationship between them.
  • the focus frame moves to the current position of the focus, which means that the focus frame control draws the focus frame at the current position of the focus.
  • the focus is under the control of the focus control, and the tracking moves to the current position of the focus frame, that is, the focus control draws the focus at the current position of the focus frame.
  • the prior art implements location tracking as follows:
  • the focus frame control draws at the target position according to the information of the acquired target position.
  • the focus frame in order to achieve the purpose of the focus frame tracking focus to move.
  • the problem with the above method is that there is a large lag at the moment when the focus frame moves to the target position relative to the time when the focus moves to the target position, and the existence of the large lag may cause the user to mistakenly think that the focus frame is not Move to the target position as desired, and the user will re-trigger the focus and the focus frame to move, which causes a misoperation, resulting in unnecessary waste of processing resources.
  • the embodiment of the present application provides a method for drawing an interface element, which is used to solve the problem that the location tracking method of the interface element in the prior art is used, which may result in unnecessary processing resource waste.
  • the embodiment of the present application further provides an apparatus for drawing an interface element, which is used to solve the problem that the location tracking method using the interface elements in the prior art may cause unnecessary processing resource waste.
  • a method of drawing interface elements including:
  • a drawing device for an interface element comprising:
  • a motion trend information acquiring unit configured to acquire information that characterizes a motion trend of the first interface element
  • a target location prediction unit configured to predict, according to the information, a target location to which the first interface element is to be moved
  • a drawing unit configured to The second interface element is drawn by the second interface element drawing position determined by the target position.
  • the target position to which the first interface element is to be moved can be predicted, and the second interface element is drawn according to the target position, the second interface element is not drawn after the first interface element moves to the target position, thereby reducing the The hysteresis of the movement of the second interface element avoids unnecessary waste of processing resources due to repeated movement operations of the user.
  • FIG. 1 is a schematic flowchart of a specific implementation process of a method for drawing an interface element according to an embodiment of the present application
  • FIG. 1a is a schematic diagram of a time axis according to an embodiment of the present application.
  • FIG. 1b is a schematic diagram of a focus of a digital television screen interface and a positional relationship of a focus frame according to an embodiment of the present application;
  • 1c is a schematic diagram of a focus of a digital television screen interface and a positional relationship of a focus frame according to an embodiment of the present application;
  • FIG. 1 is a schematic structural diagram of a drawing component of an interface element according to an embodiment of the present application
  • FIG. 2 is a schematic flowchart of a specific implementation process of a method for drawing a focus or a focus frame in a digital television according to an embodiment of the present disclosure
  • FIG. 3 is a schematic structural diagram of a device for drawing an interface element according to an embodiment of the present application.
  • the embodiment of the present application provides a method for drawing an interface element, which is used to solve the lag problem that occurs when the interface element is moved in the prior art.
  • the schematic diagram of the specific implementation process of the method is shown in FIG. 1 and mainly includes the following steps:
  • Step 11 Obtain information that characterizes a motion trend of the first interface element
  • the first interface element is an interface element that moves relative to the two interface elements that have a location tracking relationship.
  • acquiring information indicating a trend of movement of the first interface element includes: acquiring at least two position parameters of the first interface element, and when the first interface element is located at a position respectively indicated by the two position parameters Determining, according to the at least two position parameters, a moving direction of the first interface element; determining, according to the at least two position parameters, and a time when the first interface element is located at the position respectively indicated by the two position parameters The speed at which the first interface element moves.
  • the positional parameter of the first interface element is (0, 11), and at time T2 after 5s, the position of the first interface element is The number is (0, 20), so that according to the two position parameters, it can be determined that the moving direction of the first interface element is moving in the vertical direction (such as along the Y axis of the vertical coordinate axis).
  • the motion speed of the focus can be calculated as (20-10)/10; or, when the first interface element moves at a uniform speed according to the default speed set by the system, the motion of the first interface element Speed information can be obtained from the system settings information.
  • the location parameter refers to any information that can indicate the location of the interface element, such as a coordinate value and the like.
  • the manner of obtaining information indicating the trend of the movement of the first interface element may include at least the following two types:
  • Manner 1 According to the preset position parameter sampling period, information for characterizing the movement trend of the first interface element is obtained.
  • the system will automatically acquire the coordinate value of the position where the focus is in the screen coordinate system every 30 ms, as the first interface.
  • the positional parameter of the element, and according to the positional parameter of the first interface element, information for characterizing the motion trend of the first interface element is obtained.
  • the location parameter of the sampled first interface element needs to be at least two in order to obtain the motion direction information of the first interface element.
  • Manner 2 After receiving the first interface element position change triggering instruction, obtaining information indicating a trend of the first interface element motion.
  • the position of the focus in the screen coordinate system can be obtained. Further, according to the preset position parameter sampling period, the position parameter of the focus during the movement process is acquired; and the motion trend information of the focus is obtained through the acquired position parameters.
  • the manner of obtaining the motion trend information of the focus according to the position parameter may be referred to. As mentioned above, it will not be repeated here.
  • the embodiment of the present application provides a method for timing sampling.
  • the method specifically includes:
  • the system timer is set, and the first interface element position parameter is sampled whenever the timing time of the system timer reaches the sampling time determined according to the sampling period. For example, if it is necessary to acquire the position parameter of the focus every 30 ms, the time of setting the system timer is 30 ms, and then the position parameter of the focus point is sampled every 30 ms according to the time of the system timer.
  • Step 12 predict, according to information indicating a trend of motion of the first interface element, a target location to which the first interface element is to be moved;
  • step 12 may include: according to the drawing period of the display interface, the moving speed, and The direction of movement, predicting the target location to which the first interface element will be moved.
  • the drawing period of the display interface that is, the drawing period of the display interface that is followed when the interface (such as the interface including the first interface element and the second interface element) is drawn, and the drawing period of the display interface may be 30 ms, 40 ms, and many more.
  • the drawing period of the display interface is 30ms, one frame interface is drawn every 30ms.
  • the specific size of the drawing period of the display interface is not limited.
  • the interface of the first interface element in the N+1th frame or the N+2 frame may be predicted according to the drawing period of the display interface of 30 ms and the acquired information indicating the motion trend of the first interface element.
  • the target position to be moved to when being drawn may be predicted according to the drawing period of the display interface of 30 ms and the acquired information indicating the motion trend of the first interface element.
  • the drawing period of the display interface is 30 ms, and the information indicating the motion trend of the first interface element includes motion.
  • the direction is to the right in the horizontal direction and the moving speed is 5/30ms, then It is predicted that the first interface element is at the target position of (15, 0) when the interface of the N+1th frame is drawn.
  • 10 of the above (10, 0), 5 of the motion speed expression 5/30 ms, and 15 of the above (15, 0) may each be a unit length in the interface coordinate system.
  • the embodiment of the present application provides an estimation algorithm, where the algorithm This can be done by moving the distance estimator by the first interface element.
  • the evaluator can be used to complete step 11 in addition to the step 12 being completed.
  • the estimator can calculate the moving speed of the first interface element according to the obtained positional parameter of the first interface element, and determine the moving direction of the first interface element; and further predict the first according to the instantaneous speed and the moving direction. The target location to which the interface element will be moved.
  • the focus is displayed on the interface of the smart TV
  • the smart TV draws a frame display interface with a drawing period of 30 ms;
  • the smart TV receives the focus movement command, that is, the focus starts to move at time T0;
  • the position parameter of the focus at time T0 is (x0, y1);
  • sampling period is the same as the drawing period of the display interface, which is 30 ms.
  • the estimator can acquire the position parameter (x0, y1) of the focus at time T0, and acquire the position parameter of the focus at time T1 (x1). , y1);
  • the position parameter (x2, y1) of the focus is obtained at time T2.
  • the time interval between T0 and T1 and the interval between T1 and T2 is a drawing period, that is, 30 ms.
  • expectedDistanceX focusViewMovingVelocityX ⁇ (T2-T0). That is, how much distance the predicted focus moves at the upcoming T2 relative to the position at T0.
  • the information of the movement tendency of the focus can be determined as the X-axis along the horizontal direction.
  • the target position to which the focus is to be moved at the time T2 can be predicted, that is, the positional parameter after the focus moves in the horizontal direction X axis is ( X0+expectedDistanceX, y1).
  • the position parameter at time t0 is (0, 9)
  • the sampling period is preset according to the preset focus position parameter
  • the focus is acquired at time t1.
  • the position parameter is (0, 12)
  • it can be determined that the moving direction of the focus is moving in the Y-axis direction in the vertical direction; and at the same time, the position of the focus is from t0 to t1 according to the positional parameters of the focus at time t0 and time t1.
  • the time interval between t2 and t1 is 30 ms of the system preset sampling period
  • the focus can be calculated to move at time t2.
  • step 13 the second interface element is drawn according to the target position.
  • Case 1 When the first interface element moves to the target position, the second interface is drawn according to the target position element.
  • the first interface element reaches the target position at time T1 (ie, a specific time as mentioned above), at time T1, the second interface element is drawn according to the target position.
  • a display interface including the first interface element and the second interface element is drawn; 2.
  • the function obtained by performing step 11 is used to represent the movement trend of the first interface element.
  • the information is: the position parameters of the first interface element in the first frame display interface and the second frame display interface respectively; 3.
  • the first interface element is currently in the second frame display interface.
  • the time at which the second interface element is drawn according to the target position may be a time at which the third frame display interface is drawn, that is, a time later than the drawing time of the second frame display interface by 30 ms.
  • Case 2 At the time before the first interface element moves to the target position, the second interface element is drawn according to the target position.
  • the first interface element starts moving at time T0 and reaches the target position at time T1, and then the second interface can be drawn according to the target position at a certain time before the time T1, that is, at a certain time before the time T1 (that is, the specific time mentioned above). element.
  • the second interface element is drawn according to the determined target location, and specifically includes the following two implementation manners:
  • Implementation 1 Determine a first drawing position according to a target position and a set distance threshold; and at the specific time, draw a second interface element according to the target position.
  • the current position of the element when the distance between the target position and the position represented by the current position parameter of the second interface element (hereinafter referred to as the current position of the element) is less than the set distance threshold, the current position of the element may be determined. A position is drawn for the second interface element; such that at the particular moment, the current position of the element is taken as the first drawing position and the second interface element is drawn at the location. In particular, it is possible for the target position to coincide with the current position of the element, ie the above distance is zero.
  • the target position When the distance between the target position and the current position of the element is not less than the set distance threshold, the target position may be determined as the second interface element drawing position; thus, at a specific moment, the second interface element is drawn at the target position.
  • the embodiment of the present application provides an estimation algorithm, and the algorithm may be moved by the second interface element distance estimator.
  • the specific algorithm is as follows:
  • Embodiment 2 determining, according to the target location, whether the first interface element moves outside the display area currently occupied by the second interface element when the first interface element moves to the target location; determining the second interface element according to the determination result Drawing a position; and drawing a second interface element at a second interface element drawing position at a time when the first interface element moves to the target position.
  • the target position is determined as the second interface element drawing position;
  • the location of the display area currently occupied by the second interface element is determined. Draw a position for the second interface element.
  • the first interface element is the focus and the second interface element is the focus frame. It is assumed that in the initial state, on the screen as shown in FIG. 1b, the focus and the focus frame are all in the same position, wherein the display area currently occupied by the focus frame is the gray area in the figure.
  • the focus moves to the position shown in Figure 1c, due to the position of the focus If it does not move to the gray area shown in FIG. 1c, then the position of the gray area is determined as the second interface element drawing position.
  • the manner of drawing the second interface element at the time when the first interface element moves to the target location may include: the second interface element according to the moment when the first interface element moves to the target location Draw the features of the third interface element of the position and draw the second interface element.
  • drawing the second interface element according to the feature of the third interface element may mean that the second interface element is drawn according to the way that the second interface element has the feature; or the second interface element is not The second interface element is drawn in a manner that has this feature.
  • the focus frame is drawn into a rectangle according to the shape feature of the poster B when the focus frame is drawn at the target position where the focus is reached.
  • the features of the third interface element include: shape, color, size, animation effect, and the like.
  • the above method may be completed by a drawing component of an interface element as shown in FIG. 1d, and the drawing component of the interface element specifically includes the following modules: a motion trend information acquiring module, a target position prediction module, a drawing module, a system timer, and a core calculation.
  • Module including a first interface element moving distance estimator and a second interface element moving distance estimator.
  • the above step 11 can be completed by the motion trend information acquisition module.
  • the target position to which the first interface element is to be moved in step 12 may be predicted by the target position prediction module according to the parameter calculated by the first interface element moving distance estimator.
  • the function implementation manner of the first interface element moving distance estimator is as described above, and is not described here.
  • the system timer can set a fixed time interval as the sampling period, so that the position parameter obtaining module can sample the position parameter of the first interface element according to the time interval set by the system timer.
  • the second interface element moves the distance estimator for determining the second interface element drawing position according to the target position and the set distance threshold.
  • the function realization manner of the second interface element moving distance estimator is as described above, and will not be described here.
  • the drawing module may draw the first interface element according to the predicted first interface element to be moved to the target position; and draw the position according to the determined second interface element to draw the second interface element.
  • the method can predict the target location to which the first interface element is to be moved by calculating the information of the motion trend of the first interface element, and then can be based on the target location at a specific moment.
  • Drawing the second interface element reduces the lag of the movement of the second interface element, thereby avoiding the repeated movement of the user, reducing the occupation of system resources and improving the operating efficiency of the system.
  • the execution bodies of the steps of the method provided in Embodiment 1 may all be the same device, or the method may also be performed by different devices.
  • the execution body of step 11 and step 12 may be a first interface element control
  • the execution body of step 13 may be a second interface element control;
  • the execution body of step 11 may be a first interface element control
  • step 12 and The execution body of step 13 may be a second interface element control;
  • the execution bodies of steps 11 to 13 may each be a second interface element control;
  • the embodiment of the present invention provides a method for drawing a focus or a focus frame in a digital television, which is used to solve the lag problem that occurs when the focus or the focus frame is moved in the prior art.
  • the schematic diagram of the specific implementation process of the method is shown in FIG. 2, and mainly includes the following steps:
  • Step 21 The digital television set top box acquires motion trend information of the first interface element
  • the motion trend information of the focus is obtained by using the position parameter of the focus at different times, including: acquiring at least two position parameters of the focus, and the focus is located at the two positions. The time at which the parameter represents the position; according to the at least two bits Setting a parameter to determine a moving direction of the focus; determining a moving speed of the focus according to the at least two positional parameters and a time when the focus is at a position respectively indicated by the two positional parameters.
  • the information on the movement trend of the focus is obtained, including the following two methods:
  • Step 22 predict, according to the motion trend information of the acquired focus, a target position to which the focus is to be moved;
  • step 22 may include: The target position to which the focus is to be moved is predicted according to the drawing period of the display interface, the moving speed, and the moving direction.
  • the digital television draws a display interface of each frame with a drawing period of 30 ms;
  • the focus moves along the horizontal X axis
  • the digital television receives the focus movement command, that is, the focus starts to move at time T0;
  • the position parameter of the focus at time T0 is (x0, y1).
  • sampling period is the same as the drawing period of the display interface, which is 30 ms.
  • the position parameter of the focus acquired at time t2 is (x2, y1).
  • the prediction of the target position to which the focus is to be moved includes the following sub-steps:
  • Sub-step 4 according to the position parameter of the focus acquired at time t1 and time t2, the moving direction of the focus can be obtained as the x-axis in the horizontal direction.
  • Sub-step 5 according to the moving direction of the acquired focus and the moving distance in a certain time, it can be predicted that the focus will be moved to reach the target position, that is, the focus moves in the horizontal direction X-axis to reach the target position.
  • the positional parameter is (x2+expectedDistanceX, y1).
  • Step 23 Draw a focus frame according to the target position.
  • the determined second interface element drawing position is the current position of the focus frame.
  • the parameter of the target position at which the first interface element moves to the target position is (x3, y3), and the position is still in focus.
  • the current position of the focus frame is redrawn to the focus frame.
  • the size, color, shape and the like of the TV poster A and the TV poster B may be different, in order to be in the TV poster B.
  • the size, the color, the shape, and the like of the focus frame are matched with the features of the TV poster B.
  • the embodiment of the present application provides a method for the third interface element where the focus is located when the focus is moved to the target position (ie, The focus frame is drawn by the feature of the third interface element at the position when the focus moves to the target position.
  • the focus frame is drawn in the target area.
  • you draw the focus frame into a triangle when you draw the focus frame into a triangle.
  • the method can predict the target position to which the focus (or the focus frame) is to be moved by calculating the motion trend information of the focus (or the focus frame), and thus can be at the target position.
  • the focus frame (or focal point) is drawn, which reduces the hysteresis of the movement of the second interface element, thereby avoiding unnecessary processing resource waste caused by the repeated movement operation of the user, and improving the operating efficiency of the system.
  • the embodiment of the present application provides a device for drawing an interface element, which is used to solve the lag problem that occurs when the interface element is moved in the prior art.
  • a schematic diagram of a specific implementation flow of the device is shown in FIG. 4, and mainly includes a motion trend information acquiring unit 31, a target position predicting unit 32, and a drawing unit 33.
  • the motion trend information acquiring unit is configured to obtain information that represents a trend of motion of the first interface element
  • a target location prediction unit configured to predict, according to the information, a target location to which the first interface element is to be moved
  • a drawing unit configured to draw the second interface element at the second interface element drawing position determined according to the target position.
  • the drawing unit is configured to: at a specific moment, draw the second interface element according to the target location.
  • the specific moment is no later than the moment when the first interface element moves to the target location.
  • the drawing unit is configured to: determine a first drawing position according to the target position and the set distance threshold; and draw a second interface element at the first drawing position at the specific moment; or Determining, according to the target location, whether the first interface element moves outside the display area currently occupied by the second interface element at the specific moment; determining a second drawing position according to the determination result; and at the specific moment, in the second Draw the position to draw the second interface element.
  • the drawing unit is configured to: when the distance between the target location and the location represented by the current location parameter of the second interface element is less than the set distance threshold, move the element in the first interface to At a time of the target position, drawing a second interface element at a position indicated by a current position parameter of the second interface element; a distance between the target position and a position indicated by a current position parameter of the second interface element is not less than At a fixed distance threshold, a second interface element is drawn at the target location at a time when the first interface element moves to the target location.
  • the drawing unit is configured to: move the first interface element when the distance between the target location and the location of the current location parameter of the second interface element is not less than a set distance threshold At the time of the target location, a second interface element is drawn at the target location.
  • the drawing unit is configured to: acquire a feature of the third interface element at the target position at the specific time; and draw a second interface element according to the feature.
  • the features include at least one of the following: color, size, animation effect, shape, and the like.
  • the motion trend information acquiring unit is configured to: after receiving the first interface element position change triggering instruction, acquire information indicating a motion trend of the first interface element; or according to a preset position parameter sampling period, Obtain information that characterizes the movement trend of the first interface element.
  • the motion trend information acquiring unit is configured to: obtain information that characterizes a motion trend of the first interface element according to a preset position parameter sampling period.
  • the information characterizing the motion trend of the first interface element includes: a moving speed and a moving direction of the first interface element.
  • the motion trend information acquiring unit is configured to: acquire at least two position parameters of the first interface element, and a time when the first interface element is located at the position respectively indicated by the two position parameters; Determining a moving direction of the first interface element according to the at least two position parameters; determining the first interface element according to the at least two position parameters and a time when the first interface element is located at the position respectively indicated by the two position parameters The speed of movement.
  • the target location prediction unit is configured to: according to a drawing period of the display interface, The moving speed and the moving direction predict a target position to which the first interface element is to be moved.
  • the target position prediction unit calculates the motion trend information of the first interface element
  • the target position to which the first interface element is to be moved can be predicted, and then the first interface element can be
  • the second interface element is drawn at the target position, which reduces the lag of the movement of the second interface element, thereby avoiding the use of repeated movement of the user, reducing the occupation of system resources, and improving The operating efficiency of the system.
  • embodiments of the present invention can be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or a combination of software and hardware. Moreover, the invention can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
  • computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
  • the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
  • the apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
  • These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device.
  • the instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.
  • a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
  • processors CPUs
  • input/output interfaces network interfaces
  • memory volatile and non-volatile memory
  • the memory may include non-persistent memory, random access memory (RAM), and/or non-volatile memory in a computer readable medium, such as read only memory (ROM) or flash memory.
  • RAM random access memory
  • ROM read only memory
  • Memory is an example of a computer readable medium.
  • Computer readable media includes both permanent and non-persistent, removable and non-removable media.
  • Information storage can be implemented by any method or technology.
  • the information can be computer readable instructions, data structures, modules of programs, 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 disk read only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, Magnetic tape cartridges, magnetic tape storage or other magnetic storage devices or any other non-transportable media can be used to store information that can be accessed by a computing device.
  • computer readable media does not include temporary storage of computer readable media, such as modulated data signals and carrier waves.
  • embodiments of the present application can be provided as a method, system, or computer program product.
  • the present application can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment in combination of software and hardware.
  • the application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.

Abstract

Disclosed is a drawing method for an interface element, which is used for solving the problem of unnecessary processing resource waste caused by adopting a position tracking method for an interface element in the prior art. The method comprises: acquiring information indicative of a movement trend of a first interface element; predicting, according to the information, a target position where the first interface element is moved to; and drawing, according to the target position, a second interface element. Also disclosed is a drawing device for an interface element.

Description

一种界面元素的绘制方法及装置Method and device for drawing interface elements 技术领域Technical field
本申请涉及计算机技术领域,尤其涉及一种界面元素的绘制方法及装置。The present application relates to the field of computer technology, and in particular, to a method and an apparatus for drawing interface elements.
背景技术Background technique
目前,显示界面中的界面元素彼此之间可能存在位置追踪关系。以焦点和焦点框这两种界面元素为例,它们之间就存在位置追踪关系。具体而言,有可能是焦点发生移动后,焦点框在焦点框控件的控制下,追踪移动到焦点当前所在位置。其中,焦点框移动到焦点当前所在位置,是指焦点框控件在焦点当前所在位置绘制焦点框。又或者,是焦点框发生移动后,焦点在焦点控件的控制下,追踪移动到焦点框当前所在位置,即焦点控件在焦点框当前所在位置绘制焦点。Currently, interface elements in the display interface may have a location tracking relationship with each other. Take the two interface elements of focus and focus frame as an example, there is a position tracking relationship between them. Specifically, it is possible that after the focus has moved, the focus frame is under the control of the focus frame control, and the tracking moves to the current position of the focus. Wherein, the focus frame moves to the current position of the focus, which means that the focus frame control draws the focus frame at the current position of the focus. Or, after the focus frame moves, the focus is under the control of the focus control, and the tracking moves to the current position of the focus frame, that is, the focus control draws the focus at the current position of the focus frame.
以焦点框追踪焦点为例,现有技术实现位置追踪的方式如下:Taking the focus frame tracking focus as an example, the prior art implements location tracking as follows:
当焦点从原位置移动到目标位置后,获取目标位置的信息(一般为基于显示界面建立的屏幕坐标系中的坐标值);焦点框控件根据获取到的目标位置的信息,在该目标位置绘制焦点框,从而达到焦点框追踪焦点进行移动的目的。After the focus moves from the original position to the target position, the information of the target position is acquired (generally the coordinate value in the screen coordinate system established based on the display interface); the focus frame control draws at the target position according to the information of the acquired target position. The focus frame, in order to achieve the purpose of the focus frame tracking focus to move.
上述方法存在的问题在于,相对于焦点移动到目标位置的时刻,焦点框移动到该目标位置的时刻会存在较大的滞后,该较大的滞后的存在,可能导致用户误以为焦点框并没有按照期望移动到目标位置,进而用户会重新触发焦点及焦点框进行移动,这就产生了误操作,导致了不必要的处理资源浪费。The problem with the above method is that there is a large lag at the moment when the focus frame moves to the target position relative to the time when the focus moves to the target position, and the existence of the large lag may cause the user to mistakenly think that the focus frame is not Move to the target position as desired, and the user will re-trigger the focus and the focus frame to move, which causes a misoperation, resulting in unnecessary waste of processing resources.
发明内容Summary of the invention
本申请实施例提供一种界面元素的绘制方法,用于解决采用现有技术中的界面元素的位置追踪方法,会导致不必要的处理资源浪费的问题。The embodiment of the present application provides a method for drawing an interface element, which is used to solve the problem that the location tracking method of the interface element in the prior art is used, which may result in unnecessary processing resource waste.
本申请实施例还提供一种界面元素的绘制的装置,用于解决采用现有技术中的界面元素的位置追踪方法,会导致不必要的处理资源浪费的问题。The embodiment of the present application further provides an apparatus for drawing an interface element, which is used to solve the problem that the location tracking method using the interface elements in the prior art may cause unnecessary processing resource waste.
本申请实施例采用下述技术方案: The embodiments of the present application adopt the following technical solutions:
一种界面元素的绘制方法,包括:A method of drawing interface elements, including:
获取表征第一界面元素运动趋势的信息;根据所述信息,预测第一界面元素将要移动到的目标位置;根据所述目标位置绘制第二界面元素。Obtaining information indicating a trend of movement of the first interface element; predicting, according to the information, a target location to which the first interface element is to be moved; and drawing a second interface element according to the target location.
一种界面元素的绘制装置,包括:A drawing device for an interface element, comprising:
运动趋势信息获取单元,用于获取表征第一界面元素运动趋势的信息;目标位置预测单元,用于根据所述信息,预测第一界面元素将要移动到的目标位置;绘制单元,用于在根据所述目标位置确定出的第二界面元素绘制位置绘制第二界面元素。a motion trend information acquiring unit, configured to acquire information that characterizes a motion trend of the first interface element; a target location prediction unit, configured to predict, according to the information, a target location to which the first interface element is to be moved; and a drawing unit, configured to The second interface element is drawn by the second interface element drawing position determined by the target position.
本申请实施例采用的上述至少一个技术方案能够达到以下有益效果:The above at least one technical solution adopted by the embodiment of the present application can achieve the following beneficial effects:
由于可以预测出第一界面元素将要移动到的目标位置,并根据目标位置绘制第二界面元素,避免了在第一界面元素移动到目标位置后,才进行第二界面元素的绘制,从而降低了第二界面元素移动的滞后性,避免了因为用户的重复移动操作而导致的不必要的处理资源浪费。Since the target position to which the first interface element is to be moved can be predicted, and the second interface element is drawn according to the target position, the second interface element is not drawn after the first interface element moves to the target position, thereby reducing the The hysteresis of the movement of the second interface element avoids unnecessary waste of processing resources due to repeated movement operations of the user.
附图说明DRAWINGS
此处所说明的附图用来提供对本申请的进一步理解,构成本申请的一部分,本申请的示意性实施例及其说明用于解释本申请,并不构成对本申请的不当限定。在附图中:The drawings described herein are intended to provide a further understanding of the present application, and are intended to be a part of this application. In the drawing:
图1为本申请实施例提供的一种界面元素的绘制方法的具体实现流程示意图;FIG. 1 is a schematic flowchart of a specific implementation process of a method for drawing an interface element according to an embodiment of the present application;
图1a为本申请实施例所述的时间轴的示意图;FIG. 1a is a schematic diagram of a time axis according to an embodiment of the present application; FIG.
图1b为本申请实施例提供的一种数字电视屏幕界面的焦点及焦点框位置关系示意图;FIG. 1b is a schematic diagram of a focus of a digital television screen interface and a positional relationship of a focus frame according to an embodiment of the present application;
图1c为本申请实施例提供的一种数字电视屏幕界面的焦点及焦点框位置关系示意图;1c is a schematic diagram of a focus of a digital television screen interface and a positional relationship of a focus frame according to an embodiment of the present application;
图1d为本申请实施例提供的一种界面元素的绘制组件的具体结构示意图; FIG. 1 is a schematic structural diagram of a drawing component of an interface element according to an embodiment of the present application;
图2为本申请实施例提供的一种数字电视中焦点或焦点框的绘制方法的具体实现流程示意图;FIG. 2 is a schematic flowchart of a specific implementation process of a method for drawing a focus or a focus frame in a digital television according to an embodiment of the present disclosure;
图3为本申请实施例提供的一种界面元素的绘制装置的具体结构示意图。FIG. 3 is a schematic structural diagram of a device for drawing an interface element according to an embodiment of the present application.
具体实施方式detailed description
为使本申请的目的、技术方案和优点更加清楚,下面将结合本申请具体实施例及相应的附图对本申请技术方案进行清楚、完整地描述。显然,所描述的实施例仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions of the present application will be clearly and completely described in the following with reference to the specific embodiments of the present application and the corresponding drawings. It is apparent that the described embodiments are only a part of the embodiments of the present application, and not all of them. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present application without departing from the inventive scope are the scope of the present application.
以下结合附图,详细说明本申请各实施例提供的技术方案。The technical solutions provided by the embodiments of the present application are described in detail below with reference to the accompanying drawings.
实施例1Example 1
本申请实施例提供一种界面元素的绘制方法,用于解决现有技术中对界面元素进行移动时出现的滞后问题。该方法的具体实现流程示意图如图1所示,主要包括下述步骤:The embodiment of the present application provides a method for drawing an interface element, which is used to solve the lag problem that occurs when the interface element is moved in the prior art. The schematic diagram of the specific implementation process of the method is shown in FIG. 1 and mainly includes the following steps:
步骤11,获取表征第一界面元素运动趋势的信息;Step 11: Obtain information that characterizes a motion trend of the first interface element;
其中,第一界面元素,为存在位置追踪关系的两个界面元素中,相对而言先进行移动的界面元素。The first interface element is an interface element that moves relative to the two interface elements that have a location tracking relationship.
在一种实施方式中,获取表征第一界面元素运动趋势的信息,包括:获取第一界面元素的至少两个位置参数,以及第一界面元素位于所述两个位置参数分别表示的位置时的时刻;根据所述至少两个位置参数,确定第一界面元素的移动方向;根据所述至少两个位置参数,以及第一界面元素位于所述两个位置参数分别表示的位置时的时刻,确定第一界面元素的移动速度。In an embodiment, acquiring information indicating a trend of movement of the first interface element includes: acquiring at least two position parameters of the first interface element, and when the first interface element is located at a position respectively indicated by the two position parameters Determining, according to the at least two position parameters, a moving direction of the first interface element; determining, according to the at least two position parameters, and a time when the first interface element is located at the position respectively indicated by the two position parameters The speed at which the first interface element moves.
例如,若假设第一界面元素从T1时刻开始发生移动,且在T1时刻,第一界面元素的位置参数为(0,11),在5s后的T2时刻,第一界面元素的位置参 数为(0,20),从而根据这两个位置参数,可以确定出第一界面元素的运动方向为沿垂直方向(如沿垂直坐标轴Y轴)移动。For example, if it is assumed that the first interface element moves from time T1, and at time T1, the positional parameter of the first interface element is (0, 11), and at time T2 after 5s, the position of the first interface element is The number is (0, 20), so that according to the two position parameters, it can be determined that the moving direction of the first interface element is moving in the vertical direction (such as along the Y axis of the vertical coordinate axis).
例如,假设按照10ms的采样频率对焦点的位置参数进行采样,获取到焦点在t1时刻的位置参数为(0,10),焦点在t2时刻的位置参数为(0,20),t1时刻与t2时刻之间的时间间隔为10ms,则可以计算出焦点的运动速度为(20-10)/10;或者,当第一界面元素按照系统设定的默认速度匀速运动时,第一界面元素的运动速度信息可从系统设置信息中获取。For example, suppose that the position parameter of the focus is sampled according to the sampling frequency of 10 ms, and the position parameter of the focus at time t1 is (0, 10), the position parameter of the focus at time t2 is (0, 20), time t1 and t2. When the time interval between the moments is 10ms, the motion speed of the focus can be calculated as (20-10)/10; or, when the first interface element moves at a uniform speed according to the default speed set by the system, the motion of the first interface element Speed information can be obtained from the system settings information.
本申请实施例中,位置参数,是指任何可以表示界面元素所处位置的信息,该信息比如是坐标值等。In the embodiment of the present application, the location parameter refers to any information that can indicate the location of the interface element, such as a coordinate value and the like.
本申请实施例中,获取表征第一界面元素运动趋势的信息的方式至少可以包括以下两种:In the embodiment of the present application, the manner of obtaining information indicating the trend of the movement of the first interface element may include at least the following two types:
方式一:按照预设的位置参数采样周期,获取表征第一界面元素运动趋势的信息。Manner 1: According to the preset position parameter sampling period, information for characterizing the movement trend of the first interface element is obtained.
比如,以第一界面元素为焦点为例,预设的位置参数采样周期若为30ms,则系统将每隔30ms自动获取焦点此时在屏幕坐标系中所处位置的坐标值,作为第一界面元素的位置参数,并根据第一界面元素的位置参数,获取表征第一界面元素运动趋势的信息。其中,为了获取第一界面元素的运动方向信息,采样得到的第一界面元素的位置参数至少需要两个。For example, taking the first interface element as the focus as an example, if the preset position parameter sampling period is 30 ms, the system will automatically acquire the coordinate value of the position where the focus is in the screen coordinate system every 30 ms, as the first interface. The positional parameter of the element, and according to the positional parameter of the first interface element, information for characterizing the motion trend of the first interface element is obtained. The location parameter of the sampled first interface element needs to be at least two in order to obtain the motion direction information of the first interface element.
方式二:在收到第一界面元素位置变化触发指令后,获取表征第一界面元素运动趋势的信息。Manner 2: After receiving the first interface element position change triggering instruction, obtaining information indicating a trend of the first interface element motion.
比如,以第一界面元素为数字电视屏幕焦点为例,假设用户通过遥控器输入了焦点位置调整指令,则在该数字电视在接收到该指令后,可以获取焦点当前在屏幕坐标系中的位置参数;进一步地,按照预设的位置参数采样周期,获取焦点在发生移动过程中的位置参数;并通过获取到的各位置参数,获取焦点的运动趋势信息。For example, taking the first interface element as the focus of the digital television screen as an example, if the user inputs the focus position adjustment instruction through the remote controller, after the digital television receives the instruction, the position of the focus in the screen coordinate system can be obtained. Further, according to the preset position parameter sampling period, the position parameter of the focus during the movement process is acquired; and the motion trend information of the focus is obtained through the acquired position parameters.
方式一和方式二中根据位置参数获取焦点的运动趋势信息的方式可以参 照前文,此处不再赘述。In the first mode and the second mode, the manner of obtaining the motion trend information of the focus according to the position parameter may be referred to. As mentioned above, it will not be repeated here.
在一种实施方式中,为了保证能够按照设定的时间间隔对位置参数进行采样,本申请实施例提供一种定时采样的方式。该方式具体包括:In an embodiment, in order to ensure that the position parameters can be sampled according to the set time interval, the embodiment of the present application provides a method for timing sampling. The method specifically includes:
按照采样周期,设置系统定时器,每当系统定时器的计时时间到达按照采样周期确定出的采样时刻时,对第一界面元素位置参数进行采样。例如,假设需要每30ms获取一次焦点的位置参数,则设置系统定时器的时间为30ms,进而将按系统定时器的计时时间,每隔30ms对焦点的位置参数进行采样。According to the sampling period, the system timer is set, and the first interface element position parameter is sampled whenever the timing time of the system timer reaches the sampling time determined according to the sampling period. For example, if it is necessary to acquire the position parameter of the focus every 30 ms, the time of setting the system timer is 30 ms, and then the position parameter of the focus point is sampled every 30 ms according to the time of the system timer.
步骤12,根据表征第一界面元素运动趋势的信息,预测第一界面元素将要移动到的目标位置;Step 12: predict, according to information indicating a trend of motion of the first interface element, a target location to which the first interface element is to be moved;
在一种实施方式中,若第一界面元素运动趋势的信息包括第一界面元素的移动速度和移动方向,那么步骤12的具体实现方式可以包括:根据显示界面的绘制周期、所述移动速度和移动方向,预测第一界面元素将要移动到的目标位置。In an embodiment, if the information of the movement trend of the first interface element includes the moving speed and the moving direction of the first interface element, the specific implementation of step 12 may include: according to the drawing period of the display interface, the moving speed, and The direction of movement, predicting the target location to which the first interface element will be moved.
上述显示界面的绘制周期,即在对界面(比如包含第一界面元素和第二界面元素的界面)进行绘制时所遵循的显示界面的绘制周期,该显示界面的绘制周期可以为30ms、40ms,等等。当显示界面的绘制周期为30ms时,会每隔30ms进行一帧界面的绘制。本申请实施例中,对该显示界面的绘制周期的具体大小不做限定。The drawing period of the display interface, that is, the drawing period of the display interface that is followed when the interface (such as the interface including the first interface element and the second interface element) is drawn, and the drawing period of the display interface may be 30 ms, 40 ms, and many more. When the drawing period of the display interface is 30ms, one frame interface is drawn every 30ms. In the embodiment of the present application, the specific size of the drawing period of the display interface is not limited.
本申请实施例中,若假设在对第一界面元素将要移动到的目标位置进行预测时,第一界面元素当前处于被绘制的第N帧界面中,并且,显示界面的绘制周期为30ms,那么,在步骤12中,就可以根据该显示界面的绘制周期30ms,和获取到的表征第一界面元素运动趋势的信息,预测第一界面元素在第N+1帧或第N+2帧等界面被绘制时将要移动到的目标位置。In the embodiment of the present application, if it is assumed that the first interface element is currently in the Nth frame interface to be drawn when the target position to which the first interface element is to be moved is predicted, and the drawing period of the display interface is 30 ms, then In step 12, the interface of the first interface element in the N+1th frame or the N+2 frame may be predicted according to the drawing period of the display interface of 30 ms and the acquired information indicating the motion trend of the first interface element. The target position to be moved to when being drawn.
比如,若第一界面元素的中心点当前处于被绘制的第N帧界面中的(10,0)这一位置,显示界面的绘制周期为30ms,表征第一界面元素的运动趋势的信息包括运动方向为沿水平方向向右以及运动速度为5/30ms时,那么,可以 预测出第一界面元素在第N+1帧界面被绘制时,处于(15,0)这一目标位置。其中,上述(10,0)中的10、运动速度表达式5/30ms中的5,以及上述(15,0)中的15,均可以为界面坐标系中的单位长度。For example, if the center point of the first interface element is currently at the (10, 0) position in the Nth frame interface being drawn, the drawing period of the display interface is 30 ms, and the information indicating the motion trend of the first interface element includes motion. When the direction is to the right in the horizontal direction and the moving speed is 5/30ms, then It is predicted that the first interface element is at the target position of (15, 0) when the interface of the N+1th frame is drawn. Here, 10 of the above (10, 0), 5 of the motion speed expression 5/30 ms, and 15 of the above (15, 0) may each be a unit length in the interface coordinate system.
需要说明的是,在一种实施方式中,为了根据获取到的第一界面元素运动趋势的信息预测第一界面元素将要移动到的目标位置,本申请实施例提供一种估值算法,该算法可以由第一界面元素移动距离估值器完成。It should be noted that, in an implementation manner, in order to predict, according to the obtained information about the motion trend of the first interface element, the target location to which the first interface element is to be moved, the embodiment of the present application provides an estimation algorithm, where the algorithm This can be done by moving the distance estimator by the first interface element.
需要说明的是,该估值器除了可以用于完成步骤12外,还可以用于完成步骤11。比如,该估值器可以根据获取到的第一界面元素的位置参数,计算第一界面元素的移动速度,并确定出第一界面元素的移动方向;进而根据瞬时速度、移动方向,预测第一界面元素将要移动到的目标位置。It should be noted that the evaluator can be used to complete step 11 in addition to the step 12 being completed. For example, the estimator can calculate the moving speed of the first interface element according to the obtained positional parameter of the first interface element, and determine the moving direction of the first interface element; and further predict the first according to the instantaneous speed and the moving direction. The target location to which the interface element will be moved.
以第一界面元素为焦点为例,若下述假设成立:Take the first interface element as the focus, for example, if the following assumptions are true:
1、该焦点显示在智能电视的界面上;1. The focus is displayed on the interface of the smart TV;
2、该智能电视以30ms的绘制周期,绘制各帧显示界面;2. The smart TV draws a frame display interface with a drawing period of 30 ms;
3、焦点沿水平方向X轴进行移动;3. The focus moves along the horizontal X axis;
4、在T0时刻,智能电视接收到焦点移动指令,即焦点在T0时刻开始移动;4. At time T0, the smart TV receives the focus movement command, that is, the focus starts to move at time T0;
5、焦点在T0时刻的位置参数为(x0,y1);5. The position parameter of the focus at time T0 is (x0, y1);
6、按照系统设定的采样周期,对焦点的位置参数进行采样。其中,该采样周期与显示界面的绘制周期相同,为30ms。6. Sampling the position parameters of the focus according to the sampling period set by the system. The sampling period is the same as the drawing period of the display interface, which is 30 ms.
那么,该估值器完成上述计算过程的步骤如下:Then, the steps of the estimator to complete the above calculation process are as follows:
一、如图1a所示,假设焦点在T0时刻开始以移动,那么,该估值器可以在T0时刻获取到焦点的位置参数(x0,y1),在T1时刻获取到焦点的位置参数(x1,y1);在T2时刻获取到焦点的位置参数(x2,y1)。1. As shown in FIG. 1a, assuming that the focus starts to move at time T0, the estimator can acquire the position parameter (x0, y1) of the focus at time T0, and acquire the position parameter of the focus at time T1 (x1). , y1); The position parameter (x2, y1) of the focus is obtained at time T2.
其中,T0时刻与T1时刻,T1与T2之间的时间间隔为绘制周期,即30ms。Wherein, the time interval between T0 and T1, and the interval between T1 and T2 is a drawing period, that is, 30 ms.
二、该估值器根据T0时刻获取到的焦点的位置参数(x0,y1)和T1时刻获取到的焦点的位置参数(x1,y1),计算焦点移动前后的水平坐标差: totalDistanceX=x1-x0。2. The estimator calculates the horizontal coordinate difference before and after the focus movement according to the position parameter (x0, y1) of the focus acquired at time T0 and the position parameter (x1, y1) of the focus acquired at time T1: totalDistanceX=x1-x0.
三、根据totalDistanceX、焦点处于(x1,y1)的时刻T1,以及焦点处于(x0,y1)的时刻T0,计算焦点的移动速度:focusViewMovingVelocityX=totalDistanceX÷(T1-T0)。3. Calculate the moving speed of the focus according to totalDistanceX, the time T1 at which the focus is at (x1, y1), and the time T0 at which the focus is at (x0, y1): focusViewMovingVelocityX=totalDistanceX÷(T1-T0).
四、根据移动速度以及T2,计算焦点从T0至T2的移动距离:expectedDistanceX=focusViewMovingVelocityX×(T2-T0)。即,预测焦点在即将到来的T2,相对于T0时所处位置移动了多少距离。4. Calculate the moving distance of the focus from T0 to T2 according to the moving speed and T2: expectedDistanceX=focusViewMovingVelocityX×(T2-T0). That is, how much distance the predicted focus moves at the upcoming T2 relative to the position at T0.
五、根据T0时刻焦点的位置参数(x0,y1),T1时刻焦点的位置参数(x1,y1),可以确定出焦点的运动趋势的信息为沿水平方向X轴。5. According to the position parameter (x0, y1) of the focus at time T0 and the position parameter (x1, y1) of the focus at time T1, the information of the movement tendency of the focus can be determined as the X-axis along the horizontal direction.
六、根据确定出的焦点的运动趋势的信息以及计算出的expectedDistanceX,可预测出焦点在T2这一时刻将要移动到的目标位置,即,焦点在沿水平方向X轴移动后的位置参数为(x0+expectedDistanceX,y1)。6. According to the information of the determined movement trend of the focus and the calculated expectedDistanceX, the target position to which the focus is to be moved at the time T2 can be predicted, that is, the positional parameter after the focus moves in the horizontal direction X axis is ( X0+expectedDistanceX, y1).
基于上述估值器的计算原理,比如,假设焦点在t0时刻开始发生移动,其t0时刻的位置参数为(0,9),若按照预设的焦点位置参数采样周期,获取到焦点在t1时刻的位置参数为(0,12),则可以确定焦点的移动方向为沿垂直方向Y轴方向移动;同时根据焦点在t0时刻以及t1时刻的位置参数可以计算出焦点在t0到t1的这段时间内的移动距离为:(12-9)=3,时间间隔为:t1-t0=30ms。则根据移动距离以及时间间隔,可计算出焦点的移动速度:3÷30=0.1。假设需要预测焦点在t2时刻(t2与t1的时间间隔为系统预设的采样周期30ms)到达的目标位置的参数,则根据焦点的移动方向和焦点的移动速度,可以计算出焦点在t2时刻移动的距离为:瞬时速度×(t2-t1)=0.1×30=3;则焦点在t2时刻到达的目标位置的位置参数为(0,15)。Based on the calculation principle of the above estimator, for example, if the focus starts to move at time t0, the position parameter at time t0 is (0, 9), and if the sampling period is preset according to the preset focus position parameter, the focus is acquired at time t1. The position parameter is (0, 12), then it can be determined that the moving direction of the focus is moving in the Y-axis direction in the vertical direction; and at the same time, the position of the focus is from t0 to t1 according to the positional parameters of the focus at time t0 and time t1. The moving distance within is: (12-9)=3, and the time interval is: t1-t0=30ms. Then according to the moving distance and the time interval, the moving speed of the focus can be calculated: 3÷30=0.1. Suppose that it is necessary to predict the parameter of the target position at which the focus is reached at time t2 (the time interval between t2 and t1 is 30 ms of the system preset sampling period), and according to the moving direction of the focus and the moving speed of the focus, the focus can be calculated to move at time t2. The distance is: instantaneous speed × (t2-t1) = 0.1 × 30 = 3; then the positional parameter of the target position at which the focus arrives at time t2 is (0, 15).
步骤13,根据目标位置绘制第二界面元素。In step 13, the second interface element is drawn according to the target position.
本申请实施例中,根据所述目标位置绘制第二界面元素的时刻,可能会有下述三种情况:In the embodiment of the present application, when the second interface element is drawn according to the target location, the following three situations may occur:
情况1:在第一界面元素运动到目标位置时,根据目标位置绘制第二界面 元素。Case 1: When the first interface element moves to the target position, the second interface is drawn according to the target position element.
例如,假设第一界面元素在T1时刻(即前文所说的特定时刻)到达目标位置,则在T1时刻,根据目标位置绘制第二界面元素。For example, assuming that the first interface element reaches the target position at time T1 (ie, a specific time as mentioned above), at time T1, the second interface element is drawn according to the target position.
举例而言,若假设:1、按照30ms的绘制周期,绘制包含第一界面元素和第二界面元素的显示界面;2、通过执行步骤11获取到的、用于表征第一界面元素运动趋势的信息为:第一界面元素分别在绘制的第一帧显示界面和第二帧显示界面中的位置参数;3、第一界面元素当前处于第二帧显示界面。那么,根据所述目标位置绘制第二界面元素的时刻,可以为绘制第三帧显示界面的时刻,即晚于第二帧显示界面的绘制时刻30ms的时刻。For example, if it is assumed that: 1. According to a drawing period of 30 ms, a display interface including the first interface element and the second interface element is drawn; 2. The function obtained by performing step 11 is used to represent the movement trend of the first interface element. The information is: the position parameters of the first interface element in the first frame display interface and the second frame display interface respectively; 3. The first interface element is currently in the second frame display interface. Then, the time at which the second interface element is drawn according to the target position may be a time at which the third frame display interface is drawn, that is, a time later than the drawing time of the second frame display interface by 30 ms.
情况2:在第一界面元素运动到目标位置之前的时刻,根据目标位置绘制第二界面元素。Case 2: At the time before the first interface element moves to the target position, the second interface element is drawn according to the target position.
假设,第一界面元素在T0时刻开始移动,在T1时刻到达目标位置,则可以在T0时刻之后,T1时刻之前的某个时刻(即前文所说的特定时刻),根据目标位置绘制第二界面元素。It is assumed that the first interface element starts moving at time T0 and reaches the target position at time T1, and then the second interface can be drawn according to the target position at a certain time before the time T1, that is, at a certain time before the time T1 (that is, the specific time mentioned above). element.
情况3:在第一界面元素运动到目标位置的时刻后的设定时长内(该时刻后的设定时长内的任一时刻,均可以视为前文所说的特定时刻),根据目标位置绘制第二界面元素。其中,该设定时长,应满足:不会使得用户在视觉上,感受到第二界面元素的绘制时刻明显滞后于第一界面元素的绘制时刻。Case 3: Within the set duration after the time when the first interface element moves to the target position (any time within the set duration after the time can be regarded as the specific time mentioned above), and draw according to the target position The second interface element. The setting duration should be satisfied: the user does not visually feel that the drawing moment of the second interface element obviously lags behind the drawing moment of the first interface element.
假设,第一界面元素在T1时刻到达目标位置,则最晚在T1+ΔT时刻,绘制第二界面元素。其中,[0,ΔT]为上述设定时长。Assume that the first interface element reaches the target position at time T1, and the second interface element is drawn at the latest T1 + ΔT. Where [0, ΔT] is the set duration described above.
本申请实施例中,根据确定出的目标位置绘制第二界面元素,具体可以包括以下两种实现方式:In the embodiment of the present application, the second interface element is drawn according to the determined target location, and specifically includes the following two implementation manners:
实现方式1:根据目标位置和设定的距离阈值,确定第一绘制位置;并在所述特定时刻,根据目标位置绘制第二界面元素。Implementation 1: Determine a first drawing position according to a target position and a set distance threshold; and at the specific time, draw a second interface element according to the target position.
具体地,在目标位置与第二界面元素当前的位置参数表示的位置(后简称元素当前位置)之间的距离小于设定的距离阈值时,可以将元素当前位置确定 为第二界面元素绘制位置;从而在所述特定时刻,将元素当前位置作为第一绘制位置,并在该位置绘制第二界面元素。特别地,目标位置有可能与元素当前位置重合,即上述距离为0。Specifically, when the distance between the target position and the position represented by the current position parameter of the second interface element (hereinafter referred to as the current position of the element) is less than the set distance threshold, the current position of the element may be determined. A position is drawn for the second interface element; such that at the particular moment, the current position of the element is taken as the first drawing position and the second interface element is drawn at the location. In particular, it is possible for the target position to coincide with the current position of the element, ie the above distance is zero.
在目标位置与元素当前位置之间的距离不小于设定的距离阈值时,可以将目标位置确定为第二界面元素绘制位置;从而在特定时刻,在目标位置绘制第二界面元素。When the distance between the target position and the current position of the element is not less than the set distance threshold, the target position may be determined as the second interface element drawing position; thus, at a specific moment, the second interface element is drawn at the target position.
在一种实施方式中,为了根据目标位置和设定的距离阈值,确定第二界面元素绘制位置,本申请实施例提供一种估值算法,该算法可以由第二界面元素移动距离估值器完成,具体的算法如下:In an embodiment, in order to determine the second interface element drawing position according to the target position and the set distance threshold, the embodiment of the present application provides an estimation algorithm, and the algorithm may be moved by the second interface element distance estimator. Completed, the specific algorithm is as follows:
1、totalDistanceX!=0&&ViewMovingDistanceX==0;1, totalDistanceX! =0&&ViewMovingDistanceX==0;
2、expectedDistanceX>0.45*totalDistanceX(其中0.45为动态可调配的参数),并且focusViewAccmulateDistanceX<expectedDistanceX)。2. ExpectedDistanceX>0.45*totalDistanceX (where 0.45 is a dynamically tunable parameter) and focusViewAccmulateDistanceX<expectedDistanceX).
其中各个参数的具体算法同上文所述,此处不再赘述。The specific algorithm of each parameter is the same as that described above, and is not described here.
实现方式2:根据目标位置,判断第一界面元素在第一界面元素移动到所述目标位置的时刻,是否移动到了第二界面元素当前占据的显示区域外;根据判断结果,确定第二界面元素绘制位置;并在第一界面元素移动到所述目标位置的时刻,在第二界面元素绘制位置绘制第二界面元素。Embodiment 2: determining, according to the target location, whether the first interface element moves outside the display area currently occupied by the second interface element when the first interface element moves to the target location; determining the second interface element according to the determination result Drawing a position; and drawing a second interface element at a second interface element drawing position at a time when the first interface element moves to the target position.
具体地,当判断结果为第一界面元素在第一界面元素移动到所述目标位置的时刻移动到了第二界面元素当前占据的显示区域外,则将目标位置确定为第二界面元素绘制位置;当判断结果为第一界面元素在第一界面元素移动到所述目标位置的时刻没有移动到第二界面元素当前占据的显示区域外,则将第二界面元素当前占据的显示区域所在位置,确定为第二界面元素绘制位置。Specifically, when the result of the determination is that the first interface element moves to the display area currently occupied by the second interface element when the first interface element moves to the target position, the target position is determined as the second interface element drawing position; When the result of the determination is that the first interface element does not move to the display area currently occupied by the second interface element when the first interface element moves to the target position, the location of the display area currently occupied by the second interface element is determined. Draw a position for the second interface element.
例如,以数字电视为例,假设第一界面元素为焦点,第二界面元素为焦点框。假设初始状态下,如图1b所示的屏幕上,焦点及焦点框均处在相同的位置,其中,焦点框当前占据的显示区域为图中的灰色区域。当用户通过遥控器对焦点进行了移动,使得焦点移动到如图1c所示的位置后,由于焦点的位置 没有移动到图1c所示的灰色区域外,则此时将灰色区域所在位置确定为第二界面元素绘制位置。For example, taking digital television as an example, assume that the first interface element is the focus and the second interface element is the focus frame. It is assumed that in the initial state, on the screen as shown in FIG. 1b, the focus and the focus frame are all in the same position, wherein the display area currently occupied by the focus frame is the gray area in the figure. When the user moves the focus through the remote control, the focus moves to the position shown in Figure 1c, due to the position of the focus If it does not move to the gray area shown in FIG. 1c, then the position of the gray area is determined as the second interface element drawing position.
在一种实施方式中,在第一界面元素移动到所述目标位置的时刻对第二界面元素进行绘制的方式可以包括:根据第一界面元素移动到所述目标位置的时刻处于第二界面元素绘制位置的第三界面元素的特征,绘制第二界面元素。In an embodiment, the manner of drawing the second interface element at the time when the first interface element moves to the target location may include: the second interface element according to the moment when the first interface element moves to the target location Draw the features of the third interface element of the position and draw the second interface element.
具体而言,根据该第三界面元素的特征绘制第二界面元素,可以是指按照使第二界面元素具备该特征的方式,绘制第二界面元素;也可以是指按照使第二界面元素不具备该特征的方式,绘制第二界面元素。Specifically, the drawing the second interface element according to the feature of the third interface element may mean that the second interface element is drawn according to the way that the second interface element has the feature; or the second interface element is not The second interface element is drawn in a manner that has this feature.
例如,以数字电视机切换选定的电视剧海报为例,若焦点从电视剧海报A(其中电视剧海报A为正方形)移动到电视剧海报B(其中电视剧海报B为长方形,且该电视剧海报B所在位置为确定出的目标位置),则在焦点到达的目标位置绘制焦点框时,将按照海报B的形状特征,将焦点框绘制成长方形。For example, taking a digital TV set to switch a selected TV drama poster as an example, if the focus is moved from the TV drama poster A (where the TV drama poster A is a square) to the TV drama poster B (where the TV drama poster B is a rectangle, and the position of the TV drama poster B is When the target position is determined, the focus frame is drawn into a rectangle according to the shape feature of the poster B when the focus frame is drawn at the target position where the focus is reached.
需要说明的是,第三界面元素的特征包括:形状、颜色、尺寸、动画效果等。It should be noted that the features of the third interface element include: shape, color, size, animation effect, and the like.
上述方法可以由如图1d所示的一种界面元素的绘制组件完成,该界面元素的绘制组件具体包括以下模块:运动趋势信息获取模块、目标位置预测模块、绘制模块、系统定时器以及核心计算模块(包括第一界面元素移动距离估值器和第二界面元素移动距离估值器)。The above method may be completed by a drawing component of an interface element as shown in FIG. 1d, and the drawing component of the interface element specifically includes the following modules: a motion trend information acquiring module, a target position prediction module, a drawing module, a system timer, and a core calculation. Module (including a first interface element moving distance estimator and a second interface element moving distance estimator).
以下介绍上述各模块的功能。The functions of each of the above modules are described below.
上述步骤11可以由运动趋势信息获取模块完成。The above step 11 can be completed by the motion trend information acquisition module.
步骤12中所述的第一界面元素将要移动到的目标位置,可以由目标位置预测模块根据第一界面元素移动距离估值器计算出的参数而预测得出。该第一界面元素移动距离估值器的功能实现方式详见前文,此处不再赘述。The target position to which the first interface element is to be moved in step 12 may be predicted by the target position prediction module according to the parameter calculated by the first interface element moving distance estimator. The function implementation manner of the first interface element moving distance estimator is as described above, and is not described here.
系统定时器可以设定固定的时间间隔作为采样周期,从而使得位置参数获取模块可以按照系统定时器设定的时间间隔,对第一界面元素的位置参数进行采样。 The system timer can set a fixed time interval as the sampling period, so that the position parameter obtaining module can sample the position parameter of the first interface element according to the time interval set by the system timer.
第二界面元素移动距离估值器,用于根据目标位置和设定的距离阈值,确定第二界面元素绘制位置。该第二界面元素移动距离估值器的功能实现方式详见前文,此处不再赘述。The second interface element moves the distance estimator for determining the second interface element drawing position according to the target position and the set distance threshold. The function realization manner of the second interface element moving distance estimator is as described above, and will not be described here.
绘制模块,可以根据预测的第一界面元素将要移动到目标位置,对第一界面元素进行绘制;并根据确定的第二界面元素绘制位置,对第二界面元素进行绘制。The drawing module may draw the first interface element according to the predicted first interface element to be moved to the target position; and draw the position according to the determined second interface element to draw the second interface element.
通过本申请实施例1提供的上述方法可知,该方法通过对第一界面元素运动趋势的信息进行计算,可以预测出第一界面元素将要移动到的目标位置,进而可以在特定时刻,根据目标位置绘制第二界面元素,降低了第二界面元素移动的滞后性,从而避免了因为用户的重复移动操作,减少了系统资源的占用,提高了系统的运行效率。According to the foregoing method provided in Embodiment 1 of the present application, the method can predict the target location to which the first interface element is to be moved by calculating the information of the motion trend of the first interface element, and then can be based on the target location at a specific moment. Drawing the second interface element reduces the lag of the movement of the second interface element, thereby avoiding the repeated movement of the user, reducing the occupation of system resources and improving the operating efficiency of the system.
需要说明的是,实施例1所提供方法的各步骤的执行主体均可以是同一设备,或者,该方法也由不同设备作为执行主体。比如,步骤11和步骤12的执行主体可以为第一界面元素控件,步骤13的执行主体可以为第二界面元素控件;又比如,步骤11的执行主体可以为第一界面元素控件,步骤12和步骤13的执行主体可以为第二界面元素控件;再比如,步骤11~步骤13的执行主体均可以为第二界面元素控件;等等。It should be noted that the execution bodies of the steps of the method provided in Embodiment 1 may all be the same device, or the method may also be performed by different devices. For example, the execution body of step 11 and step 12 may be a first interface element control, and the execution body of step 13 may be a second interface element control; for example, the execution body of step 11 may be a first interface element control, step 12 and The execution body of step 13 may be a second interface element control; for example, the execution bodies of steps 11 to 13 may each be a second interface element control;
实施例2Example 2
本申请实施例提供一种数字电视中焦点或焦点框的绘制方法,用于解决现有技术中对焦点或焦点框进行移动时出现的滞后问题。该方法的具体实现流程示意图如图2所示,主要包括下述步骤:The embodiment of the present invention provides a method for drawing a focus or a focus frame in a digital television, which is used to solve the lag problem that occurs when the focus or the focus frame is moved in the prior art. The schematic diagram of the specific implementation process of the method is shown in FIG. 2, and mainly includes the following steps:
步骤21,数字电视机顶盒获取第一界面元素的运动趋势信息;Step 21: The digital television set top box acquires motion trend information of the first interface element;
本申请实施例中,假设第一界面元素为焦点,则通过焦点在不同时刻的位置参数,获取焦点的运动趋势信息,包括:获取焦点的至少两个位置参数,以及焦点位于所述两个位置参数分别表示的位置时的时刻;根据所述至少两个位 置参数,确定焦点的移动方向;根据所述至少两个位置参数,以及焦点位于所述两个位置参数分别表示的位置时的时刻,确定焦点的移动速度。In the embodiment of the present application, if the first interface element is the focus, the motion trend information of the focus is obtained by using the position parameter of the focus at different times, including: acquiring at least two position parameters of the focus, and the focus is located at the two positions. The time at which the parameter represents the position; according to the at least two bits Setting a parameter to determine a moving direction of the focus; determining a moving speed of the focus according to the at least two positional parameters and a time when the focus is at a position respectively indicated by the two positional parameters.
其中,获取焦点的运动趋势信息,包括以下两种方式:Among them, the information on the movement trend of the focus is obtained, including the following two methods:
方式一:按照预设的焦点位置参数采样周期,获取焦点的运动趋势信息;Manner 1: Obtain the motion trend information of the focus according to the preset focus position parameter sampling period;
方式二:在收到第一界面元素位置变化触发指令后,获取焦点的运动趋势信息。Manner 2: After receiving the trigger instruction of the first interface element position change, the motion trend information of the focus is obtained.
步骤22,根据获取的焦点的运动趋势信息,预测焦点将要移动到的目标位置;Step 22: predict, according to the motion trend information of the acquired focus, a target position to which the focus is to be moved;
在一种实施方式中,若该目标位置,为焦点在某一特定时刻将要移动到的位置,且焦点运动趋势的信息包括焦点的移动速度和移动方向,那么步骤22的具体实现方式可以包括:根据显示界面的绘制周期、所述移动速度和移动方向,预测焦点将要移动到的目标位置。In an embodiment, if the target position is a position to which the focus is to be moved at a certain time, and the information of the focus movement trend includes the moving speed and the moving direction of the focus, the specific implementation of step 22 may include: The target position to which the focus is to be moved is predicted according to the drawing period of the display interface, the moving speed, and the moving direction.
例如,若下述假设成立:For example, if the following assumptions are true:
1、该数字电视以30ms的绘制周期,绘制各帧显示界面;1. The digital television draws a display interface of each frame with a drawing period of 30 ms;
2、焦点沿水平方向X轴进行移动;2. The focus moves along the horizontal X axis;
3、在T0时刻,数字电视接收到焦点移动指令,即焦点在T0时刻开始移动;3. At time T0, the digital television receives the focus movement command, that is, the focus starts to move at time T0;
4、焦点在T0时刻的位置参数为(x0,y1)。4. The position parameter of the focus at time T0 is (x0, y1).
4、按照系统设定的采样周期(30ms),对焦点的位置参数进行采样。4. Sampling the position parameters of the focus according to the sampling period (30ms) set by the system.
5、按照系统设定的采样周期,对焦点的位置参数进行采样。其中,该采样周期与显示界面的绘制周期相同,为30ms。5. Sampling the position parameters of the focus according to the sampling period set by the system. The sampling period is the same as the drawing period of the display interface, which is 30 ms.
6、按照系统设定的采样周期(30ms),在t2时刻获取到的焦点的位置参数为(x2,y1)。6. According to the sampling period set by the system (30ms), the position parameter of the focus acquired at time t2 is (x2, y1).
在一种实施方式中,根据获取的焦点的运动趋势信息,对焦点将要移动到的目标位置进行预测的具体包括以下子步骤:In an embodiment, according to the obtained trend information of the focus, the prediction of the target position to which the focus is to be moved includes the following sub-steps:
子步骤1,根据焦点的当前位置参数,计算焦点移动前后的水平坐标差: totalDistanceX=(x2-x1)。Sub-step 1, according to the current position parameter of the focus, calculate the horizontal coordinate difference before and after the focus movement: totalDistanceX=(x2-x1).
子步骤2,根据所述获取的totalDistanceX,以及系统设定的30ms采样周期,计算焦点的移动速度:focusViewMovingVelocityX=(x2-x1)÷30。Sub-step 2, according to the obtained totalDistanceX, and the 30ms sampling period set by the system, calculate the moving speed of the focus: focusViewMovingVelocityX=(x2-x1)÷30.
子步骤3,根据focusViewMovingVelocityX,以及特定的时刻t3,其中所述的t3时刻在时间轴上位于t2时刻之后,计算焦点预测移动距离:expectedDistanceX=focusViewMovingVelocityX×(t3-t2)。Sub-step 3, according to focusViewMovingVelocityX, and a specific time t3, wherein the time t3 is located at time t2 on the time axis, the focus predicted moving distance is calculated: expectedDistanceX=focusViewMovingVelocityX×(t3-t2).
子步骤4,根据t1时刻以及t2时刻获取到的焦点的位置参数,可以获取焦点的运动方向为沿水平方向x轴。Sub-step 4, according to the position parameter of the focus acquired at time t1 and time t2, the moving direction of the focus can be obtained as the x-axis in the horizontal direction.
子步骤5,根据所述获取的焦点的运动方向以及在特定时间内的移动距离,则可预测出,焦点将要移动到达的目标位置,即,焦点在沿水平方向X轴移动到达的目标位置的位置参数为(x2+expectedDistanceX,y1)。Sub-step 5, according to the moving direction of the acquired focus and the moving distance in a certain time, it can be predicted that the focus will be moved to reach the target position, that is, the focus moves in the horizontal direction X-axis to reach the target position. The positional parameter is (x2+expectedDistanceX, y1).
步骤23,根据所述目标位置绘制焦点框。Step 23: Draw a focus frame according to the target position.
在一种实施方式中,当预测的焦点目标位置并未移动到焦点框当前所在的位置区域外,则确定出的第二界面元素绘制位置为焦点框的当前位置。In one embodiment, when the predicted focus target position does not move outside the position area where the focus frame is currently located, the determined second interface element drawing position is the current position of the focus frame.
例如,当用户通过遥控器对焦点进行移动时,根据步骤22预测,在第一界面元素移动到所述目标位置的时刻焦点所在目标位置的参数为(x3,y3),而该位置仍然在焦点框的当前位置区域内,则此时焦点框的当前位置重新绘制焦点框。For example, when the user moves the focus through the remote controller, according to step 22, the parameter of the target position at which the first interface element moves to the target position is (x3, y3), and the position is still in focus. Within the current position area of the box, the current position of the focus frame is redrawn to the focus frame.
一般地,当焦点从电视海报A所在的区域移动到电视海报B所在的区域时,电视海报A与电视海报B的尺寸,颜色,形状等特征可能是不一样的,为了在电视海报B所在的区域绘制的焦点框的尺寸,颜色,形状等特征与电视海报B的特征相匹配,本申请实施例提供一种方法,用于根据焦点移动到目标位置时,焦点所在的第三界面元素(即焦点移动到目标位置时,处于该位置的第三界面元素)的特征,绘制焦点框。Generally, when the focus moves from the area where the TV poster A is located to the area where the TV poster B is located, the size, color, shape and the like of the TV poster A and the TV poster B may be different, in order to be in the TV poster B. The size, the color, the shape, and the like of the focus frame are matched with the features of the TV poster B. The embodiment of the present application provides a method for the third interface element where the focus is located when the focus is moved to the target position (ie, The focus frame is drawn by the feature of the third interface element at the position when the focus moves to the target position.
例如,当焦点从电视海报A所在的区域(电视海报A为正方形)移动到电视海报B所在的区域(电视海报B为三角形),则在目标区域绘制焦点框的 时,将焦点框绘制成三角形。For example, when the focus moves from the area where the TV poster A is located (the TV poster A is a square) to the area where the TV poster B is located (the TV poster B is a triangle), the focus frame is drawn in the target area. When you draw the focus frame into a triangle.
通过本申请实施例2提供的上述方法可知,该方法通过对焦点(或焦点框)的运动趋势信息进行计算,可以预测出焦点(或焦点框)将要移动到的目标位置,进而可以在目标位置对焦点框(或焦)点进行绘制,降低了第二界面元素移动的滞后性,从而避免了因为用户的重复移动操作而导致的不必要的处理资源浪费,提高了系统的运行效率。According to the above method provided in Embodiment 2 of the present application, the method can predict the target position to which the focus (or the focus frame) is to be moved by calculating the motion trend information of the focus (or the focus frame), and thus can be at the target position. The focus frame (or focal point) is drawn, which reduces the hysteresis of the movement of the second interface element, thereby avoiding unnecessary processing resource waste caused by the repeated movement operation of the user, and improving the operating efficiency of the system.
实施例3Example 3
本申请实施例提供一种界面元素的绘制装置,用于解决现有技术中对界面元素进行移动时出现的滞后问题。该装置的具体实现流程示意图如图4所示,主要包括运动趋势信息获取单元31、目标位置预测单元32以及绘制单元33。The embodiment of the present application provides a device for drawing an interface element, which is used to solve the lag problem that occurs when the interface element is moved in the prior art. A schematic diagram of a specific implementation flow of the device is shown in FIG. 4, and mainly includes a motion trend information acquiring unit 31, a target position predicting unit 32, and a drawing unit 33.
其中运动趋势信息获取单元,用于获取表征第一界面元素运动趋势的信息;The motion trend information acquiring unit is configured to obtain information that represents a trend of motion of the first interface element;
目标位置预测单元,用于根据所述信息,预测第一界面元素将要移动到的目标位置;a target location prediction unit, configured to predict, according to the information, a target location to which the first interface element is to be moved;
绘制单元,用于在根据所述目标位置确定出的第二界面元素绘制位置绘制第二界面元素。And a drawing unit, configured to draw the second interface element at the second interface element drawing position determined according to the target position.
在一种实施方式中,绘制单元,用于:在特定时刻,根据所述目标位置绘制第二界面元素。In an embodiment, the drawing unit is configured to: at a specific moment, draw the second interface element according to the target location.
在一种实施方式中,所述特定时刻不晚于第一界面元素移动到所述目标位置的时刻。In one embodiment, the specific moment is no later than the moment when the first interface element moves to the target location.
在一种实施方式中,绘制单元,用于:根据所述目标位置和设定的距离阈值,确定第一绘制位置;并在所述特定时刻,在第一绘制位置绘制第二界面元素;或根据所述目标位置,判断第一界面元素在所述特定时刻是否移动到了第二界面元素当前占据的显示区域外;根据判断结果,确定第二绘制位置;并在所述特定时刻,在第二绘制位置绘制第二界面元素。 In an embodiment, the drawing unit is configured to: determine a first drawing position according to the target position and the set distance threshold; and draw a second interface element at the first drawing position at the specific moment; or Determining, according to the target location, whether the first interface element moves outside the display area currently occupied by the second interface element at the specific moment; determining a second drawing position according to the determination result; and at the specific moment, in the second Draw the position to draw the second interface element.
在一种实施方式中,绘制单元,用于:在所述目标位置与第二界面元素当前的位置参数表示的位置之间的距离,小于设定的距离阈值时,在第一界面元素移动到所述目标位置的时刻,在第二界面元素当前的位置参数表示的位置绘制第二界面元素;在所述目标位置与第二界面元素当前的位置参数表示的位置之间的距离,不小于设定的距离阈值时,在第一界面元素移动到所述目标位置的时刻,在所述目标位置绘制第二界面元素。In an embodiment, the drawing unit is configured to: when the distance between the target location and the location represented by the current location parameter of the second interface element is less than the set distance threshold, move the element in the first interface to At a time of the target position, drawing a second interface element at a position indicated by a current position parameter of the second interface element; a distance between the target position and a position indicated by a current position parameter of the second interface element is not less than At a fixed distance threshold, a second interface element is drawn at the target location at a time when the first interface element moves to the target location.
在一种实施方式中,绘制单元,用于:在所述目标位置与第二界面元素当前的位置参数表示的位置之间的距离,不小于设定的距离阈值时,在第一界面元素移动到所述目标位置的时刻,在所述目标位置绘制第二界面元素。In an embodiment, the drawing unit is configured to: move the first interface element when the distance between the target location and the location of the current location parameter of the second interface element is not less than a set distance threshold At the time of the target location, a second interface element is drawn at the target location.
在一种实施方式中,绘制单元,用于:获取在所述特定时刻处于所述目标位置的第三界面元素的特征;根据所述特征,绘制第二界面元素。In an embodiment, the drawing unit is configured to: acquire a feature of the third interface element at the target position at the specific time; and draw a second interface element according to the feature.
在一种实施方式中,所述的特征包括下述至少一种:颜色、尺寸、动画效果、形状等。In one embodiment, the features include at least one of the following: color, size, animation effect, shape, and the like.
在一种实施方式中,运动趋势信息获取单元,用于:在收到第一界面元素位置变化触发指令后,获取表征第一界面元素运动趋势的信息;或按照预设的位置参数采样周期,获取表征第一界面元素运动趋势的信息。In an embodiment, the motion trend information acquiring unit is configured to: after receiving the first interface element position change triggering instruction, acquire information indicating a motion trend of the first interface element; or according to a preset position parameter sampling period, Obtain information that characterizes the movement trend of the first interface element.
在一种实施方式中,运动趋势信息获取单元,用于:按照预设的位置参数采样周期,获取表征第一界面元素运动趋势的信息。In one embodiment, the motion trend information acquiring unit is configured to: obtain information that characterizes a motion trend of the first interface element according to a preset position parameter sampling period.
在一种实施方式中,所述表征第一界面元素运动趋势的信息,包括:第一界面元素的移动速度和移动方向。In one embodiment, the information characterizing the motion trend of the first interface element includes: a moving speed and a moving direction of the first interface element.
在一种实施方式中,运动趋势信息获取单元,用于:获取第一界面元素的至少两个位置参数,以及第一界面元素位于所述两个位置参数分别表示的位置时的时刻;根据所述至少两个位置参数,确定第一界面元素的移动方向;根据所述至少两个位置参数,以及第一界面元素位于所述两个位置参数分别表示的位置时的时刻,确定第一界面元素的移动速度。In an embodiment, the motion trend information acquiring unit is configured to: acquire at least two position parameters of the first interface element, and a time when the first interface element is located at the position respectively indicated by the two position parameters; Determining a moving direction of the first interface element according to the at least two position parameters; determining the first interface element according to the at least two position parameters and a time when the first interface element is located at the position respectively indicated by the two position parameters The speed of movement.
在一种实施方式中,目标位置预测单元,用于:根据显示界面的绘制周期、 所述移动速度和移动方向,预测第一界面元素将要移动到的目标位置。In an embodiment, the target location prediction unit is configured to: according to a drawing period of the display interface, The moving speed and the moving direction predict a target position to which the first interface element is to be moved.
采用本申请实施例3提供的上述装置,由于运用目标位置预测单元对第一界面元素的运动趋势信息进行计算,可以预测出第一界面元素将要移动到的目标位置,进而可以在第一界面元素移动到所述目标位置的时刻,在目标位置对第二界面元素进行绘制,降低了第二界面元素移动的滞后性,从而避免了因为用户的重复移动操作,减少了系统资源的占用,提高了系统的运行效率。With the above apparatus provided in Embodiment 3 of the present application, since the target position prediction unit calculates the motion trend information of the first interface element, the target position to which the first interface element is to be moved can be predicted, and then the first interface element can be When the target position is moved, the second interface element is drawn at the target position, which reduces the lag of the movement of the second interface element, thereby avoiding the use of repeated movement of the user, reducing the occupation of system resources, and improving The operating efficiency of the system.
本领域内的技术人员应明白,本发明的实施例可提供为方法、系统、或计算机程序产品。因此,本发明可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art will appreciate that embodiments of the present invention can be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or a combination of software and hardware. Moreover, the invention can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present invention has been described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (system), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or FIG. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing device to produce a machine for the execution of instructions for execution by a processor of a computer or other programmable data processing device. Means for implementing the functions specified in one or more of the flow or in a block or blocks of the flow chart.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。The computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device. The apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。 These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device. The instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.
在一个典型的配置中,计算设备包括一个或多个处理器(CPU)、输入/输出接口、网络接口和内存。In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
内存可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM)。内存是计算机可读介质的示例。The memory may include non-persistent memory, random access memory (RAM), and/or non-volatile memory in a computer readable medium, such as read only memory (ROM) or flash memory. Memory is an example of a computer readable medium.
计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括暂存电脑可读媒体(transitory media),如调制的数据信号和载波。Computer readable media includes both permanent and non-persistent, removable and non-removable media. Information storage can be implemented by any method or technology. The information can be computer readable instructions, data structures, modules of programs, 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 disk read only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, Magnetic tape cartridges, magnetic tape storage or other magnetic storage devices or any other non-transportable media can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary storage of computer readable media, such as modulated data signals and carrier waves.
还需要说明的是,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、商品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、商品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、商品或者设备中还存在另外的相同要素。It is also to be understood that the terms "comprises" or "comprising" or "comprising" or any other variations are intended to encompass a non-exclusive inclusion, such that a process, method, article, Other elements not explicitly listed, or elements that are inherent to such a process, method, commodity, or equipment. An element defined by the phrase "comprising a ..." does not exclude the presence of additional equivalent elements in the process, method, item, or device including the element.
本领域技术人员应明白,本申请的实施例可提供为方法、系统或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。 Those skilled in the art will appreciate that embodiments of the present application can be provided as a method, system, or computer program product. Thus, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment in combination of software and hardware. Moreover, the application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
以上所述仅为本申请的实施例而已,并不用于限制本申请。对于本领域技术人员来说,本申请可以有各种更改和变化。凡在本申请的精神和原理之内所作的任何修改、等同替换、改进等,均应包含在本申请的权利要求范围之内。 The above description is only an embodiment of the present application and is not intended to limit the application. Various changes and modifications can be made to the present application by those skilled in the art. Any modifications, equivalents, improvements, etc. made within the spirit and scope of the present application are intended to be included within the scope of the appended claims.

Claims (23)

  1. 一种界面元素的绘制方法,其特征在于,包括:A method for drawing an interface element, comprising:
    获取表征第一界面元素运动趋势的信息;Obtaining information characterizing the motion trend of the first interface element;
    根据所述信息,预测第一界面元素将要移动到的目标位置;Determining, according to the information, a target location to which the first interface element is to be moved;
    根据所述目标位置绘制第二界面元素。A second interface element is drawn according to the target location.
  2. 如权利要求1所述的方法,其特征在于,根据所述目标位置绘制第二界面元素,包括:The method of claim 1, wherein the drawing the second interface element according to the target location comprises:
    在特定时刻,根据所述目标位置绘制第二界面元素。At a particular time, a second interface element is drawn based on the target location.
  3. 如权利要求2所述的方法,其特征在于,所述特定时刻不晚于第一界面元素移动到所述目标位置的时刻。The method of claim 2 wherein said particular time is no later than a time at which said first interface element moves to said target location.
  4. 如权利要求2所述的方法,其特征在于,在所述特定时刻,根据所述目标位置绘制第二界面元素,包括:The method of claim 2, wherein at the specific moment, the second interface element is drawn according to the target location, including:
    根据所述目标位置和设定的距离阈值,确定第一绘制位置;并在所述特定时刻,在第一绘制位置绘制第二界面元素;或Determining a first drawing position according to the target position and the set distance threshold; and drawing a second interface element at the first drawing position at the specific time; or
    根据所述目标位置,判断第一界面元素在所述特定时刻是否移动到了第二界面元素当前占据的显示区域外;根据判断结果,确定第二绘制位置;并在所述特定时刻,在第二绘制位置绘制第二界面元素。Determining, according to the target location, whether the first interface element moves outside the display area currently occupied by the second interface element at the specific moment; determining a second drawing position according to the determination result; and at the specific moment, in the second Draw the position to draw the second interface element.
  5. 如权利要求4所述方法,其特征在于,根据所述目标位置和设定的距离阈值,确定第一绘制位置,包括:The method of claim 4, wherein determining the first drawing position according to the target position and the set distance threshold comprises:
    在所述目标位置与第二界面元素当前位置之间的距离小于设定的距离阈值时,将第二界面元素当前位置确定为第一绘制位置;When the distance between the target location and the current location of the second interface element is less than the set distance threshold, determining the current location of the second interface element as the first rendering location;
    在所述目标位置与第二界面元素当前位置之间的距离不小于设定的距离阈值时,将所述目标位置确定为第一绘制位置。The target position is determined as the first drawing position when the distance between the target position and the current position of the second interface element is not less than the set distance threshold.
  6. 如权利要求2~5任一权项所述的方法,其特征在于,绘制第二界面元素,包括:The method according to any one of claims 2 to 5, wherein the drawing the second interface element comprises:
    获取在所述特定时刻处于所述目标位置的第三界面元素的特征; Obtaining a feature of a third interface element that is at the target location at the particular moment;
    根据所述特征,绘制第二界面元素。According to the feature, the second interface element is drawn.
  7. 如权利要求6所述的方法,其特征在于,所述特征包括下述至少一种:The method of claim 6 wherein said characteristic comprises at least one of:
    颜色;colour;
    尺寸;size;
    动画效果;Animation effect
    形状。shape.
  8. 如权利要求1所述的方法,其特征在于,获取表征第一界面元素运动趋势的信息,包括:The method of claim 1 wherein obtaining information indicative of a trending trend of the first interface element comprises:
    在收到第一界面元素位置变化触发指令后,获取表征第一界面元素运动趋势的信息;或After receiving the first interface element position change triggering instruction, acquiring information indicating a trend of movement of the first interface element; or
    按照预设的位置参数采样周期,获取表征第一界面元素运动趋势的信息。According to the preset position parameter sampling period, information for characterizing the motion trend of the first interface element is obtained.
  9. 如权利要求1~5、7、8任一权项所述的方法,其特征在于,所述表征第一界面元素运动趋势的信息,包括:第一界面元素的移动速度和移动方向。The method according to any one of claims 1 to 5, 7, or 8, wherein the information indicating a trend of movement of the first interface element comprises: a moving speed and a moving direction of the first interface element.
  10. 如权利要求9所述的方法,其特征在于,获取表征第一界面元素运动趋势的信息,包括:The method of claim 9 wherein obtaining information indicative of a trending trend of the first interface element comprises:
    获取第一界面元素的至少两个位置参数,以及第一界面元素位于所述两个位置参数分别表示的位置时的时刻;Obtaining at least two positional parameters of the first interface element, and a time when the first interface element is located at a position respectively indicated by the two positional parameters;
    根据所述至少两个位置参数,确定第一界面元素的移动方向;Determining a moving direction of the first interface element according to the at least two position parameters;
    根据所述至少两个位置参数,以及第一界面元素位于所述两个位置参数分别表示的位置时的时刻,确定第一界面元素的移动速度。Determining a moving speed of the first interface element according to the at least two positional parameters and a time when the first interface element is located at a position respectively indicated by the two positional parameters.
  11. 如权利要求10所述的方法,其特征在于,根据所述信息,预测第一界面元素将要移动到的目标位置,包括:The method of claim 10, wherein predicting a target location to which the first interface element is to be moved based on the information comprises:
    根据显示界面的绘制周期、所述移动速度和移动方向,预测第一界面元素将要移动到的目标位置。A target position to which the first interface element is to be moved is predicted according to a drawing period of the display interface, the moving speed, and a moving direction.
  12. 一种界面元素的绘制装置,其特征在于,包括:A device for drawing an interface element, comprising:
    运动趋势信息获取单元,用于获取表征第一界面元素运动趋势的信息; a motion trend information acquiring unit, configured to acquire information that characterizes a motion trend of the first interface element;
    目标位置预测单元,用于根据所述信息,预测第一界面元素将要移动到的目标位置;a target location prediction unit, configured to predict, according to the information, a target location to which the first interface element is to be moved;
    绘制单元,用于根据所述目标位置绘制第二界面元素。a drawing unit, configured to draw a second interface element according to the target location.
  13. 如权利要求12所述装置,其特征在于,绘制单元,用于:The apparatus according to claim 12, wherein the drawing unit is configured to:
    在特定时刻,根据所述目标位置绘制第二界面元素。At a particular time, a second interface element is drawn based on the target location.
  14. 如权利要求13所述装置,其特征在于,所述特定时刻不晚于第一界面元素移动到所述目标位置的时刻。The apparatus of claim 13 wherein said particular time instant is no later than a time at which said first interface element moves to said target location.
  15. 如权利要求13所述装置,其特征在于,绘制单元,用于:The apparatus according to claim 13, wherein the drawing unit is configured to:
    根据所述目标位置和设定的距离阈值,确定第一绘制位置;并在所述特定时刻,在第一绘制位置绘制第二界面元素;或Determining a first drawing position according to the target position and the set distance threshold; and drawing a second interface element at the first drawing position at the specific time; or
    根据所述目标位置,判断第一界面元素在所述特定时刻是否移动到了第二界面元素当前占据的显示区域外;根据判断结果,确定第二绘制位置;并在所述特定时刻,在第二绘制位置绘制第二界面元素。Determining, according to the target location, whether the first interface element moves outside the display area currently occupied by the second interface element at the specific moment; determining a second drawing position according to the determination result; and at the specific moment, in the second Draw the position to draw the second interface element.
  16. 如权利要求15所述装置,其特征在于,绘制单元,用于:The apparatus according to claim 15, wherein the drawing unit is configured to:
    在所述目标位置与第二界面元素当前的位置参数表示的位置之间的距离,小于设定的距离阈值时,将第二界面元素当前位置确定为第一绘制位置;And determining a current position of the second interface element as the first drawing position when a distance between the target position and a position indicated by the current position parameter of the second interface element is less than the set distance threshold;
    在所述目标位置与第二界面元素当前位置之间的距离不小于设定的距离阈值时,将所述目标位置确定为第一绘制位置。The target position is determined as the first drawing position when the distance between the target position and the current position of the second interface element is not less than the set distance threshold.
  17. 如权利要求13~16任一权项所述装置,其特征在于,绘制单元,用于:The apparatus according to any one of claims 13 to 16, wherein the drawing unit is configured to:
    获取在所述特定时刻处于所述目标位置的第三界面元素的特征;Obtaining a feature of a third interface element that is at the target location at the particular moment;
    根据所述特征,绘制第二界面元素。According to the feature, the second interface element is drawn.
  18. 如权利要求17所述装置,其特征在于:The device of claim 17 wherein:
    所述特征包括下述至少一种:The features include at least one of the following:
    颜色;colour;
    尺寸;size;
    动画效果; Animation effect
    形状。shape.
  19. 如权利要求12所述装置,其特征在于,运动趋势信息获取单元,用于:The apparatus according to claim 12, wherein the motion trend information acquisition unit is configured to:
    在收到第一界面元素位置变化触发指令后,获取表征第一界面元素运动趋势的信息;或After receiving the first interface element position change triggering instruction, acquiring information indicating a trend of movement of the first interface element; or
    按照预设的位置参数采样周期,获取表征第一界面元素运动趋势的信息。According to the preset position parameter sampling period, information for characterizing the motion trend of the first interface element is obtained.
  20. 如权利要求12~16、18、19任一项权项所述的装置,其特征在于,所述表征第一界面元素运动趋势的信息,包括:第一界面元素的移动速度和移动方向。The apparatus according to any one of claims 12 to 16, 18, 19, wherein the information characterizing the movement tendency of the first interface element comprises: a moving speed and a moving direction of the first interface element.
  21. 如权利要求20所述的装置,其特征在于,运动趋势信息获取单元,用于:The apparatus according to claim 20, wherein the motion trend information acquisition unit is configured to:
    获取第一界面元素的至少两个位置参数,以及第一界面元素位于所述两个位置参数分别表示的位置时的时刻;Obtaining at least two positional parameters of the first interface element, and a time when the first interface element is located at a position respectively indicated by the two positional parameters;
    根据所述至少两个位置参数,确定第一界面元素的移动方向;Determining a moving direction of the first interface element according to the at least two position parameters;
    根据所述至少两个位置参数,以及第一界面元素位于所述两个位置参数分别表示的位置时的时刻,确定第一界面元素的移动速度。Determining a moving speed of the first interface element according to the at least two positional parameters and a time when the first interface element is located at a position respectively indicated by the two positional parameters.
  22. 如权利要求21所述的装置,其特征在于,目标位置预测单元,用于:The apparatus according to claim 21, wherein the target position prediction unit is configured to:
    根据显示界面的绘制周期、所述移动速度和移动方向,预测第一界面元素将要移动到的目标位置。A target position to which the first interface element is to be moved is predicted according to a drawing period of the display interface, the moving speed, and a moving direction.
  23. 一种界面元素的绘制组件,其特征在于,包括如12~14、16、19任一项权项所述的装置。 A drawing component of an interface element, comprising the device of any one of 12-14, 16, and 19.
PCT/CN2016/080306 2015-05-27 2016-04-27 Drawing method and device for interface element WO2016188289A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510278764.1A CN106303652B (en) 2015-05-27 2015-05-27 A kind of method for drafting and device of interface element
CN201510278764.1 2015-05-27

Publications (1)

Publication Number Publication Date
WO2016188289A1 true WO2016188289A1 (en) 2016-12-01

Family

ID=57392532

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/080306 WO2016188289A1 (en) 2015-05-27 2016-04-27 Drawing method and device for interface element

Country Status (2)

Country Link
CN (1) CN106303652B (en)
WO (1) WO2016188289A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110990005A (en) * 2019-11-20 2020-04-10 金现代信息产业股份有限公司 Webpage element positioning method
WO2021249104A1 (en) * 2020-06-09 2021-12-16 Guangdong Oppo Mobile Telecommunications Corp., Ltd. System and method for determining position of a new interface element on user interface

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107835461B (en) * 2017-11-02 2021-09-28 深圳市雷鸟网络传媒有限公司 Focus movement control method, smart television and computer-readable storage medium
CN108388465B (en) * 2018-03-15 2021-04-23 阿里巴巴(中国)有限公司 Method and device for realizing dynamic deformation switch assembly and terminal
CN110737963B (en) * 2019-12-20 2020-03-31 广东博智林机器人有限公司 Poster element layout method, system and computer readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101814031A (en) * 2010-04-22 2010-08-25 四川长虹电器股份有限公司 Method for realizing customization of focus rectangle style of user interface elements
WO2014031191A1 (en) * 2012-08-20 2014-02-27 Google Inc. User interface element focus based on user's gaze
WO2014200811A1 (en) * 2013-06-12 2014-12-18 Microsoft Corporation User focus controlled graphical user interface using a head mounted device
CN104461256A (en) * 2014-12-30 2015-03-25 广州视源电子科技股份有限公司 Method and system for displaying interface elements
CN104486686A (en) * 2014-12-23 2015-04-01 深圳市九洲电器有限公司 EPG (electronic program guide) navigation method and system

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103019518B (en) * 2012-12-14 2016-06-22 广东欧珀移动通信有限公司 A kind of method of automatic adjustment human-computer interaction interface
CN103530040B (en) * 2013-10-22 2016-03-30 腾讯科技(深圳)有限公司 Object element moving method, device and electronic equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101814031A (en) * 2010-04-22 2010-08-25 四川长虹电器股份有限公司 Method for realizing customization of focus rectangle style of user interface elements
WO2014031191A1 (en) * 2012-08-20 2014-02-27 Google Inc. User interface element focus based on user's gaze
WO2014200811A1 (en) * 2013-06-12 2014-12-18 Microsoft Corporation User focus controlled graphical user interface using a head mounted device
CN104486686A (en) * 2014-12-23 2015-04-01 深圳市九洲电器有限公司 EPG (electronic program guide) navigation method and system
CN104461256A (en) * 2014-12-30 2015-03-25 广州视源电子科技股份有限公司 Method and system for displaying interface elements

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110990005A (en) * 2019-11-20 2020-04-10 金现代信息产业股份有限公司 Webpage element positioning method
CN110990005B (en) * 2019-11-20 2023-05-30 金现代信息产业股份有限公司 Webpage element positioning method
WO2021249104A1 (en) * 2020-06-09 2021-12-16 Guangdong Oppo Mobile Telecommunications Corp., Ltd. System and method for determining position of a new interface element on user interface

Also Published As

Publication number Publication date
CN106303652B (en) 2019-09-06
CN106303652A (en) 2017-01-04

Similar Documents

Publication Publication Date Title
WO2016188289A1 (en) Drawing method and device for interface element
US10445132B2 (en) Method and apparatus for switching applications
KR102139587B1 (en) Display performance control
CN106547420B (en) Page processing method and device
US20180011818A1 (en) Webpage Update Method And Apparatus
US10620972B2 (en) Processing touch gestures in hybrid applications
CN105824491B (en) A kind of split screen treating method and apparatus in a mobile device
WO2017202314A1 (en) Data processing method and device
WO2016101810A1 (en) Method for switching display object in multi-window system and device thereof
CN103888605A (en) Information processing method and electronic device
CN110102044B (en) Game control method based on smart band, smart band and storage medium
US10061390B2 (en) Building space control
CN109656639B (en) Interface rolling method, device, equipment and medium
US20140362109A1 (en) Method for transforming an object and electronic device thereof
JP2016531356A (en) Method and apparatus for adjusting widget area
WO2016101816A1 (en) Method and device for information display in instant messaging
WO2015103819A1 (en) Method and device for achieving fast batch operation on touch screen
CN111327876A (en) Target tracking display method and device, electronic equipment and machine-readable storage medium
US11314388B2 (en) Method for viewing application program, graphical user interface, and terminal
EP3614256A1 (en) Data processing method, computer device, and storage medium
CN105282521A (en) Method and device for detecting motion during IP camera cruising process
CN114489314A (en) Augmented reality image display method and related device
CN105824590B (en) A kind of split screen treating method and apparatus in a mobile device
CN110175450A (en) A kind of processing method of information, device and equipment
TW202005423A (en) Scanning starting and stopping method for wireless device, and wireless device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16799178

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16799178

Country of ref document: EP

Kind code of ref document: A1