CN113821152A - Method, device, medium and equipment for determining position of interface element - Google Patents

Method, device, medium and equipment for determining position of interface element Download PDF

Info

Publication number
CN113821152A
CN113821152A CN202011233242.7A CN202011233242A CN113821152A CN 113821152 A CN113821152 A CN 113821152A CN 202011233242 A CN202011233242 A CN 202011233242A CN 113821152 A CN113821152 A CN 113821152A
Authority
CN
China
Prior art keywords
interface element
area
target
position information
determining
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202011233242.7A
Other languages
Chinese (zh)
Other versions
CN113821152B (en
Inventor
宋小兵
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Jingdong Century Trading Co Ltd, Beijing Wodong Tianjun Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN202011233242.7A priority Critical patent/CN113821152B/en
Publication of CN113821152A publication Critical patent/CN113821152A/en
Application granted granted Critical
Publication of CN113821152B publication Critical patent/CN113821152B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • G06F3/0488Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
    • 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
    • G06F3/04847Interaction techniques to control parameter settings, e.g. interaction with sliders or dials
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The disclosure provides a method, a device, a medium and equipment for determining a position of an interface element, and relates to the technical field of internet. The method for determining the position of the interface element comprises the following steps: acquiring first position information of an area where each interface element in the interface element set is located and position information of a target area; responding to touch operation, determining a target interface element from the interface element set, and acquiring first position information of an area where the target interface element is located; determining position difference information of the area where the target interface element is located and the target area according to the first position information of the area where the target interface element is located and the position information of the target area; and determining second position information of the area in which each interface element in the interface element set is located according to the first position information and the position difference information of the area in which each interface element in the interface element set is located. The method and the device reduce the complexity of the calculation process when the position of the interface element is calculated, and reduce the calculation amount.

Description

Method, device, medium and equipment for determining position of interface element
Technical Field
The present disclosure relates to the field of internet technologies, and in particular, to a method and an apparatus for determining a position of an interface element, a computer-readable storage medium, and an electronic device.
Background
With the development of internet technology, more and more contents can be presented on the interface of application software, and therefore, in more and more application software, different contents are classified. For example, a certain software classifies the interface contents into home, fresh, medicine, mobile phone, food, men's clothing, etc., the classification labels are usually arranged in a row or a column, and the classification labels are more in category, only part of the classification labels can be displayed on the software interface, and all the classification labels can be seen only by sliding left and right.
After part of the classification labels are displayed on the software interface, the function of automatically adjusting the labels to the middle area can be realized by clicking one label, and other labels move along with the label, so that the use experience of a user is improved. However, the clicked tag is automatically adjusted to the middle area, and other tags are automatically adjusted to move along with the clicked tag, so that the function can be realized only by calculating the position data of each tag element after the tag element moves by the intelligent device.
The existing calculation of the position data of each element after movement is to calculate the position of each element after movement on the basis of the position of the previous element, a large amount of calculation is needed to be performed each time the element is moved, and the calculation process is complex.
Disclosure of Invention
The present disclosure is directed to a method and an apparatus for determining a position of an interface element, a computer-readable storage medium, and an electronic device, so as to overcome, at least to some extent, the problems of complex calculation process and large calculation amount when calculating a position of an interface element due to limitations and defects of the related art.
According to a first aspect of the present disclosure, there is provided a method for determining a position of an interface element, including: acquiring first position information of an area where each interface element in the interface element set is located and position information of a target area; wherein each interface element can be displayed within the interface element area; responding to touch operation, determining a target interface element from the interface element set, and acquiring first position information of an area where the target interface element is located; determining position difference information of the area where the target interface element is located and the target area according to the first position information of the area where the target interface element is located and the position information of the target area; and determining second position information of the area in which each interface element in the interface element set is located according to the first position information and the position difference information of the area in which each interface element in the interface element set is located.
Optionally, if the target interface element is located outside the visible interface, responding to the touch operation, and determining the target interface element from the interface element set includes: responding to the first touch operation, and displaying an interface element subset containing a target interface element on the interface; and responding to the second touch operation, and determining the target interface element from the subset containing the target interface element.
Optionally, determining the position difference information between the area where the target interface element is located and the target area according to the first position information of the area where the target interface element is located and the position information of the target area includes: determining the position information of the central point of the area where the target interface element is located according to the first position information of the area where the target interface element is located; determining the position information of the center point of the target area according to the position information of the target area; and determining the position difference information of the area where the target interface element is located and the target area according to the position information of the central point of the area where the target interface element is located and the position information of the central point of the target area.
Optionally, the position difference information includes horizontal position difference information in a horizontal direction and vertical position difference information in a direction perpendicular to the horizontal direction, and is characterized in that determining, according to the first position information and the position difference information of the area where each interface element in the interface element set is located, the second position information of the area where each interface element in the interface element set is located includes: and determining second position information of the area in which each interface element in the interface element set is located according to the first position information, the horizontal position difference information and the vertical position difference information of the area in which each interface element in the interface element set is located.
Optionally, if one or more first interface elements are newly added, the first position information of the area where each interface element is located in the interface element set after the newly added one or more first interface elements is obtained again.
Optionally, if one or more first interface elements are deleted, the first position information of the area where each interface element is located in the interface element set after the deleted one or more first interface elements is obtained again.
Optionally, the step of obtaining the first position information of the area where each interface element in the interface element set is located after deleting one or more interface elements includes: deleting first position information before the current moment; controlling each interface element in the interface element set to return to an initial position; and re-acquiring the first position information of the area where each interface element in the interface element set is located.
Optionally, the first location information is location information of an area where each interface element is located in an initial state.
According to a second aspect of the present disclosure, there is provided an apparatus for determining a position of an interface element, comprising: the device comprises an information acquisition module, a target element determination module, a position difference information determination module and a position determination module.
Specifically, the information obtaining module may be configured to obtain first position information of an area where each interface element in the interface element set is located and position information of a target area; wherein each interface element can be displayed within the interface element area; the target element determining module is used for responding to touch operation, determining a target interface element from the interface element set, and acquiring first position information of an area where the target interface element is located; the position difference information determining module may be configured to determine position difference information between the area where the target interface element is located and the target area according to the first position information of the area where the target interface element is located and the position information of the target area; the position determining module may be configured to determine second position information of the area in which each interface element in the interface element set is located according to the first position information and the position difference information of the area in which each interface element in the interface element set is located.
Optionally, the target element determination module may be configured to perform: responding to the first touch operation, and displaying an interface element subset containing a target interface element on the interface; and responding to the second touch operation, and determining the target interface element from the subset containing the target interface element.
Optionally, the location difference information determining module may be configured to perform: determining the position information of the central point of the area where the target interface element is located according to the first position information of the area where the target interface element is located; determining the position information of the center point of the target area according to the position information of the target area; and determining the position difference information of the area where the target interface element is located and the target area according to the position information of the central point of the area where the target interface element is located and the position information of the central point of the target area.
Optionally, the position determination module may be configured to perform: and determining second position information of the area in which each interface element in the interface element set is located according to the first position information, the horizontal position difference information and the vertical position difference information of the area in which each interface element in the interface element set is located.
Optionally, the information obtaining module may be configured to perform: deleting first position information before the current moment; controlling each interface element in the interface element set to return to an initial position; and re-acquiring the first position information of the area where each interface element in the interface element set is located.
According to a third aspect of the present disclosure, there is provided a storage medium having stored thereon a computer program which, when executed by a processor, implements the method of determining the position of an interface element of any of the above.
According to a fourth aspect of the present disclosure, there is provided an electronic device comprising: a processor; and a memory for storing executable instructions for the processor; wherein the processor is configured to perform any of the above-described methods of position determination of an interface element via execution of executable instructions.
In the technical solutions provided by some embodiments of the present disclosure, after determining a target interface element that needs to be moved to a target area, second position information of all interface elements after being moved can be calculated only according to first position information of an area where each interface element is located in an initial state and position information of the target area. The method comprises the steps of firstly, acquiring first position information of a region where each element in an interface element set is located and position information of a target region; the area where each element in the interface element set is located is in an interface preset area; then responding to touch operation, and determining a target interface element from the interface element set; acquiring first position information of a region where a target interface element is located; then, according to the first position information of the area where the target interface element is located and the position information of the target area, determining position difference information of the area where the target interface element is located and the target area; and finally, determining second position information of the area where each element in the interface element set is located according to the first position information and the position difference information of the area where each element in the interface element set is located. According to the method for determining the position of the interface element, the element clicked by the user can be automatically adjusted to the middle area of the interface, and the experience of the user is improved; and the complexity of the calculation process when the positions of the interface elements are calculated can be reduced, and the calculation amount is reduced.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure. It is to be understood that the drawings in the following description are merely exemplary of the disclosure, and that other drawings may be derived from those drawings by one of ordinary skill in the art without the exercise of inventive faculty. In the drawings:
FIG. 1 schematically illustrates a flow chart of a method of position determination of an interface element according to an exemplary embodiment of the present disclosure;
FIG. 2 is a schematic diagram schematically illustrating an area in which each element in the interface element set is located according to an exemplary embodiment of the present disclosure;
FIG. 3 schematically illustrates a schematic diagram of a method of adjusting an element into a visual interface according to another exemplary embodiment of the present disclosure;
FIG. 4 is a schematic diagram schematically illustrating a difference in position of a region in which a target interface element is located with respect to a position of a target region in a horizontal direction according to an exemplary embodiment of the present disclosure;
FIG. 5 is a schematic diagram schematically illustrating a difference in a vertical direction in a position of an area where a target interface element is located with respect to a position of a target area according to an exemplary embodiment of the present disclosure;
FIG. 6 is a schematic diagram schematically illustrating a difference in both horizontal and vertical directions in the position of an area in which a target interface element is located relative to the position of a target area in an exemplary embodiment of the present disclosure;
FIG. 7 is a schematic diagram illustrating the effect of adjusting the target interface element 4 in FIG. 6 to a target area;
fig. 8 schematically illustrates a block diagram of an apparatus for determining a position of an interface element according to an exemplary embodiment of the present disclosure.
Fig. 9 schematically shows a block diagram of an electronic device according to an exemplary embodiment of the present disclosure.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the disclosure. One skilled in the relevant art will recognize, however, that the subject matter of the present disclosure can be practiced without one or more of the specific details, or with other methods, components, devices, steps, and the like. In other instances, well-known technical solutions have not been shown or described in detail to avoid obscuring aspects of the present disclosure.
Furthermore, the drawings are merely schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus their repetitive description will be omitted. Some of the block diagrams shown in the figures are functional entities and do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor devices and/or microcontroller devices.
The flow charts shown in the drawings are merely illustrative and do not necessarily include all of the steps. For example, some steps may be decomposed, and some steps may be combined or partially combined, so that the actual execution sequence may be changed according to the actual situation.
At present, many application software have classification tags, for example, some news software include multiple tags such as military affairs, finance, movies, science and technology, videos, hot spots, etc., some shopping software include multiple tags such as home, freshness, medicine, mobile phone, food, men's clothing, beverage, sports, etc., and some live broadcast software include multiple tags such as internet tour, single machine, face value, hero union, royal glory, absolute survival, etc. Most of these labels are arranged in a horizontal line in the software interface. And because the number of label elements is large, and the software interface is limited by the width of the interface of the mobile phone, only part of the label elements can be displayed. And the label element icons are small, which affects the user experience.
In view of this, a technology for adjusting the clicked tab element to the middle area for display and moving the rest tab elements along with the clicked tab element appears, because most people have their gaze points close to the middle of the screen interface, the user experience can be improved. After the clicked tag element is adjusted to the middle area to be displayed, the mobile phone is required to perform calculation in the background, so that the distance that each element needs to be moved and the position where each element is located after the element is moved when the tag element is moved to the target position are obtained.
However, in the prior art, after the positions of the elements are changed, the mobile phone needs to calculate the position of each element according to the position data of each element at the previous time and other data, and the calculation process is complex and the calculation amount is large.
Fig. 1 schematically shows a flow chart of a method of position determination of an interface element according to an exemplary embodiment of the present disclosure. Referring to fig. 1, the method for determining the position of the interface element may include the steps of:
s12, acquiring first position information of an area where each interface element in the interface element set is located and position information of a target area; wherein each of the interface elements is capable of being displayed within an interface element area.
Fig. 2 schematically shows a schematic diagram of a region where each element in the interface element set is located in the exemplary embodiment of the present disclosure. Referring to fig. 2, 21 is an intelligent device, a blank area in the intelligent device 21 is a display interface 23, an interface preset area 25 includes one or more interface elements (1-9 in fig. 2 represent a set of interface elements), each area where each interface element is located in the preset area 25, and a small dashed box in the interface preset area 25 represents an area where each element is located.
In an exemplary embodiment of the present disclosure, an interface element refers to an element that can be displayed in a certain preset area on an interface of a smart device, and the element may be a text, an image, a geometric figure, or the like, or may be other types of elements, which is not limited by the present disclosure; the interface element set refers to a set of all currently contained interface elements, and the area where each element in the interface element set is located refers to a part represented by a small dashed box in fig. 2, that is, each element is to be displayed on an interface, and the intelligent device allocates an area for the element; the first position information refers to position coordinate information of a region where each element is located at the current time, and indicates a position of each element on the interface, for example, the first position information of the region where the element 4 is located in fig. 2 may be [ (12,9), (16,11) ], where (12,9) may indicate a coordinate of an upper left corner of the region where the element 4 is located, and (16,11) may indicate a coordinate of a lower right corner of the region where the element 4 is located, and according to the first position information of the region where each element is located, a coordinate of a center point of the region where each element is located, that is, a distance from the center point to an edge of the interface, may be obtained; the target area is an area to which a certain element in the element set is to be moved, the position of the area can be any position on the interface, and the specific position is set according to the requirement of a user. It should be noted that the preset area of the interface may be understood as a parent container, the area where each element is located may be understood as a child container, and the parent container includes one or more child containers; the coordinate information listed in the present disclosure is only for convenience in describing the method in the present disclosure, and does not represent real coordinate data.
S14, responding to touch operation, determining a target interface element from the interface element set, and acquiring first position information of an area where the target interface element is located.
In an exemplary embodiment of the present disclosure, the touch operation may be a sliding operation on the smart device interface or a clicking operation, and the target interface element is an element that needs to be moved to the target area.
In the exemplary embodiment of the present disclosure, when the target interface element desired to be selected does not appear on the visual interface, as shown by elements 5 to 9 in fig. 2, the interface element desired to be selected is element 6. At the moment, the intelligent equipment can respond to the first touch operation to display the target interface element on the interface; and responding to the second touch operation, and determining a target interface element from the interface element set. The first touch operation may be a sliding operation, a clicking operation, or other operations that may send a signal to the smart device, and the second touch operation may be a clicking operation. For example, referring to fig. 2, the element 6 may be positioned on the visual interface by means of a sliding operation, and then the target interface element may be determined from the set of elements by clicking on the area where the element 6 is positioned by means of a clicking operation.
In another exemplary embodiment of the present disclosure, referring to fig. 3, fig. 3 schematically illustrates a schematic view of a method of adjusting an element into a visual interface of another exemplary embodiment of the present disclosure. As shown in fig. 3, elements 5 to 9 do not appear on the visual interface, there are Q, W, E areas on the interface capable of receiving touch operations, and the setting area Q corresponds to elements 1 to 3, the setting area W corresponds to elements 4 to 6, and the setting area E corresponds to elements 7 to 9, and when it is desired to adjust element 6 to the visual interface, elements 5 to 6 can be adjusted to the visual interface by clicking on area W. The expressions of element 1 to element 9, Q, W, E, etc. in the present disclosure are only for convenience of describing the method in the present disclosure, and do not mean that only such expressions can be used, and the present disclosure does not limit the naming of the elements and the naming of the acceptable touch operation area.
In the exemplary embodiment of the present disclosure, in the last step, the first position information of the area where each element in the interface element set is located has been obtained, where the first position information of the area where the target interface element is located is also included, and therefore, only the first position information of the area where the target interface element is located needs to be extracted from the first position information.
And S16, determining position difference information between the area where the target interface element is located and the target area according to the first position information of the area where the target interface element is located and the position information of the target area.
In an exemplary embodiment of the present disclosure, the position difference information refers to a distance difference between a position of a region where the target interface element is located and a position of the target region, and includes horizontal position difference information in a horizontal direction and vertical position difference information in a vertical direction to the horizontal direction. The horizontal position difference information indicates that the position of the region where the target interface element is located is different in a horizontal direction with respect to the position of the target region, and the vertical position difference information indicates that the position of the region where the target interface element is located is different in a vertical direction perpendicular to the horizontal direction with respect to the position of the target region.
In an exemplary embodiment of the present disclosure, since the position of the target area may be set manually, the position of the area where the target interface element is located may have only a difference in the horizontal direction, only a difference in the vertical direction, or both a difference in the horizontal direction and a difference in the vertical direction with respect to the position of the target area.
Referring to fig. 4, fig. 4 schematically illustrates a schematic diagram of a region where a target interface element of an exemplary embodiment of the present disclosure is located, the region being different in position in a horizontal direction with respect to a position of the target region. As shown in fig. 4, the dashed box 41 indicates a target area, and the dashed box 43 indicates an area where the target interface element 4 is located, where the element 4 is a target interface element determined in response to a user touch operation. The position of the target area 41 and the position of the area 43 of the target interface element 4 are different only in the horizontal direction.
Referring to fig. 5, fig. 5 schematically illustrates a schematic diagram of a difference in a vertical direction in a position of a region where a target interface element is located with respect to a position of a target region according to an exemplary embodiment of the present disclosure. As shown in fig. 5, the dashed box 51 indicates the target area, and the dashed box 53 indicates the area where the target interface element 3 is located, where the element 3 is the target interface element determined in response to the user touch operation. The position of the target area 51 at this time is different from the position of the area 53 of the target interface element 3 only in the vertical direction.
Referring to fig. 6, fig. 6 schematically illustrates a schematic diagram of a region where a target interface element is located, in which there is a difference in both a horizontal direction and a vertical direction with respect to a position of the target region, according to an exemplary embodiment of the present disclosure. As shown in fig. 6, the dashed box indicated by 61 represents the target area, and the dashed box indicated by 63 represents the area where the target interface element 4 is located, where the element 4 is the target interface element determined in response to the user touch operation. The position of the target area 61 at this time is different from the position of the area 63 of the target interface element 4 in both the horizontal direction and the vertical direction.
In an exemplary embodiment of the present disclosure, the method of determining the location difference information may be: determining the position information of the central point of the area where the target interface element is located according to the first position information of the area where the target interface element is located; determining the position information of the center point of the target area according to the position information of the target area; and determining the position difference information of the area where the target interface element is located and the target area according to the position information of the central point of the area where the target interface element is located and the position information of the central point of the target area. And the position coordinates of the area central point of the target interface element and the area central point of the target area central point are shown.
For example, referring to fig. 6, the first position information of the area 63 where the element 4 is located in fig. 6 may be [ (12,9), (16,11) ], where (12,9) may represent the coordinates of the upper left corner of the area 63 where the element 4 is located, (16,11) may represent the coordinates of the lower right corner of the area 63 where the element 4 is located, and the coordinates of the center point of the area 63 where the element 4 is located may be (14,10) according to the coordinates of the upper left corner and the lower right corner of the area 63 where the element 4 is located; the position information of the target area 61 in fig. 6 may be [ (6,5), (10,7) ], where (6,5) may represent the coordinates of the upper left corner of the target area 61 and (10,7) may represent the coordinates of the lower right corner of the target area 61, and the coordinates of the center point of the target area 61 may be obtained as (8,6) according to the coordinates of the upper left corner and the lower right corner of the target area 61; the position information of the center point of the area 63 where the element 4 is located is (14,10), the position information of the center point of the target area 61 is (8,6), and the position difference information is (6, 4). Therefore, according to the position information of the central point of the area where the target interface element is located and the position information of the central point of the target area, the position difference information between the area where the target interface element is located and the target area can be determined.
S18, according to the first position information and the position difference information of the area where each interface element in the interface element set is located, second position information of the area where each interface element in the interface element set is located is determined.
In an exemplary embodiment of the disclosure, the second position information is position information of a region in which each element in the interface element set is located after the region in which the target interface element is located is adjusted to the target region, that is, position information of all child containers after the parent container is moved. And modifying the first position information based on the first position information according to the position difference information to obtain second position information. In the process of modifying the first position information to obtain the second position information, the first position information stored in the intelligent device is not changed, and the second position information is obtained only based on the first position information. For example, if the first location information is (10,10), the location difference information is (1,1), and the second location information is (11,11), the first location information stored in the smart device is also (10, 10).
In another exemplary embodiment of the disclosure, if one or more interface elements are added or deleted, the first position information of the area where each element in the interface element set after the one or more interface elements are added or deleted is obtained again. The interface element set is an interface element set obtained by adding or deleting the interface element set. For example, 9 elements in the interface element set are subjected to element deletion, and 6 interface elements are obtained after the deletion, so that the 6 interface element set is the interface element, and the position information of the area where the 6 interface elements are located, which is obtained again, is the first position information of the area where the elements in the interface element set are located.
In an exemplary embodiment of the present disclosure, according to the first position information and the position difference information of the area where each element in the interface element set is located, the process of determining the second position information of the area where each element in the interface element set is located may be: if the positions of the areas of the target interface elements relative to the positions of the target areas are different only in the horizontal direction or only in the vertical direction, adjusting the areas of the elements according to the position difference information to obtain second position information. For example, there are three elements in the interface element set, which are element 1, element 2, and element 3, and the corresponding first position information of these three elements is [ (0,2), (4,4) ], [ (4,2), (8,4) ], [ (8,2), (12,4) ], where each square bracket contains two pieces of information, which are: element upper left corner coordinate information and element lower right corner coordinate information; the target interface element is element 2, and the first position information is [ (4,2), (8,4) ]; the target area position information is [ (6,2), (8,4) ], and the position difference information is (2,0), i.e. the distance is different by two units only in the horizontal direction, then the second position information corresponding to these three elements can be obtained as [ (2,2), (6,4) ], [ (6,2), (10,4) ], [ (10,2), (14,4) ], respectively.
In another exemplary embodiment of the present disclosure, if the position of the area where the target interface element is located is different in both the horizontal direction and the vertical direction with respect to the position of the target area, only the position adjustment in the horizontal direction and the position adjustment in the vertical direction are performed on the area where the selected target interface element is located, and only the position adjustment in the horizontal direction is performed on the other elements. Referring to fig. 6 and 7, fig. 7 is a schematic diagram illustrating an effect of adjusting the target interface element 4 in fig. 6 to a target area. As shown in fig. 7, when the position of the area 73 where the target interface element 4 is located is different from the position of the target area 71 in both the horizontal direction and the vertical direction, only the area 73 where the target interface element 4 is located may be adjusted to the target area 71, and the areas where the other elements are located are adjusted only in the horizontal direction.
It should be noted that although the various steps of the methods of the present disclosure are depicted in the drawings in a particular order, this does not require or imply that these steps must be performed in this particular order, or that all of the depicted steps must be performed, to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step execution, and/or one step broken down into multiple step executions, etc.
Further, the present exemplary embodiment also provides a device for determining the position of an interface element.
Fig. 8 schematically shows a block diagram of a position determination apparatus of an interface element of an exemplary embodiment of the present disclosure. Referring to fig. 8, the position determination apparatus 8 of an interface element according to an exemplary embodiment of the present disclosure may include: an information acquisition module 81, a target element determination module 83, a position difference information determination module 85, and a position determination module 87.
Specifically, the information obtaining module 81 may be configured to obtain first position information of an area where each interface element in the interface element set is located and position information of a target area; wherein each interface element can be displayed within the interface element area; the target element determining module 83 may be configured to determine a target interface element from the interface element set in response to a touch operation, and obtain first position information of an area where the target interface element is located; the position difference information determining module 86 may be configured to determine position difference information between the area where the target interface element is located and the target area according to the first position information of the area where the target interface element is located and the position information of the target area; the position determining module 87 may be configured to determine second position information of the area in which each interface element in the interface element set is located according to the first position information and the position difference information of the area in which each interface element in the interface element set is located.
In an exemplary embodiment of the present disclosure, the target element determination module 83 may be configured to perform: responding to the first touch operation, and displaying an interface element subset containing a target interface element on the interface; and responding to the second touch operation, and determining the target interface element from the subset containing the target interface element.
Alternatively, the position difference information determination module 85 may be configured to perform: determining the position information of the central point of the area where the target interface element is located according to the first position information of the area where the target interface element is located; determining the position information of the center point of the target area according to the position information of the target area; and determining the position difference information of the area where the target interface element is located and the target area according to the position information of the central point of the area where the target interface element is located and the position information of the central point of the target area.
Alternatively, the position determination module 87 may be configured to perform: and determining second position information of the area in which each interface element in the interface element set is located according to the first position information, the horizontal position difference information and the vertical position difference information of the area in which each interface element in the interface element set is located.
Alternatively, the information obtaining module 81 may be configured to perform: deleting first position information before the current moment; controlling each interface element in the interface element set to return to an initial position; and re-acquiring the first position information of the area where each interface element in the interface element set is located.
In an exemplary embodiment of the present disclosure, there is also provided a computer-readable storage medium having stored thereon a program product capable of implementing the above-described method of the present specification. In some possible embodiments, aspects of the invention may also be implemented in the form of a program product comprising program code means for causing a terminal device to carry out the steps according to various exemplary embodiments of the invention described in the above section "exemplary methods" of the present description, when said program product is run on the terminal device.
The program product for implementing the above method according to an embodiment of the present invention may employ a portable compact disc read only memory (CD-ROM) and include program codes, and may be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited in this regard and, in the present document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical disk, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
A computer readable signal medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
In an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above method is also provided.
As will be appreciated by one skilled in the art, aspects of the present invention may be embodied as a system, method or program product. Thus, various aspects of the invention may be embodied in the form of: an entirely hardware embodiment, an entirely software embodiment (including firmware, microcode, etc.) or an embodiment combining hardware and software aspects that may all generally be referred to herein as a "circuit," module "or" system.
An electronic device 900 according to this embodiment of the invention is described below with reference to fig. 9. The electronic device 900 shown in fig. 9 is only an example and should not bring any limitations to the function and scope of use of the embodiments of the present invention.
As shown in fig. 9, the electronic device 900 is embodied in the form of a general purpose computing device. Components of electronic device 900 may include, but are not limited to: the at least one processing unit 910, the at least one storage unit 920, a bus 930 connecting different system components (including the storage unit 920 and the processing unit 910), and a display unit 940.
Wherein the storage unit stores program code that is executable by the processing unit 910 to cause the processing unit 910 to perform steps according to various exemplary embodiments of the present invention described in the above section "exemplary methods" of the present specification.
The storage unit 920 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM)9201 and/or a cache memory unit 9202, and may further include a read only memory unit (ROM) 9203.
Storage unit 920 may also include a program/utility 9204 having a set (at least one) of program modules 9205, such program modules 9205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
Bus 930 can be any of several types of bus structures including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
The electronic device 900 may also communicate with one or more external devices 1000 (e.g., keyboard, pointing device, bluetooth device, etc.), with one or more devices that enable a user to interact with the electronic device 900, and/or with any devices (e.g., router, modem, etc.) that enable the electronic device 900 to communicate with one or more other computing devices. Such communication may occur via input/output (I/O) interface 950. Also, the electronic device 900 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN) and/or a public network, such as the Internet) via the network adapter 960. As shown, the network adapter 960 communicates with the other modules of the electronic device 900 via the bus 930. It should be appreciated that although not shown, other hardware and/or software modules may be used in conjunction with the electronic device 900, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.
Furthermore, the above-described figures are merely schematic illustrations of processes involved in methods according to exemplary embodiments of the invention, and are not intended to be limiting. It will be readily understood that the processes shown in the above figures are not intended to indicate or limit the chronological order of the processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, e.g., in multiple modules.
It should be noted that although in the above detailed description several modules or units of the device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit, according to embodiments of the present disclosure. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is to be limited only by the terms of the appended claims.

Claims (11)

1. A method for determining a position of an interface element, comprising:
acquiring first position information of an area where each interface element in the interface element set is located and position information of a target area; wherein each of the interface elements is capable of being displayed within an interface element area;
responding to touch operation, determining a target interface element from the interface element set, and acquiring first position information of an area where the target interface element is located;
determining position difference information between the area where the target interface element is located and the target area according to the first position information of the area where the target interface element is located and the position information of the target area;
and determining second position information of the area in which each interface element in the interface element set is located according to the first position information of the area in which each interface element in the interface element set is located and the position difference information.
2. The method for determining the position of the interface element according to claim 1, wherein determining the target interface element from the set of interface elements in response to the touch operation if the target interface element is outside the visual interface comprises:
responding to a first touch operation, and displaying the interface element subset containing the target interface element on an interface;
and responding to a second touch operation, and determining a target interface element from the subset containing the target interface element.
3. The method for determining the position of the interface element according to claim 1, wherein determining the position difference information between the area where the target interface element is located and the target area according to the first position information of the area where the target interface element is located and the position information of the target area comprises:
determining the position information of the central point of the area where the target interface element is located according to the first position information of the area where the target interface element is located;
determining the position information of the center point of the target area according to the position information of the target area;
and determining position difference information between the area where the target interface element is located and the target area according to the position information of the central point of the area where the target interface element is located and the position information of the central point of the target area.
4. The method for determining the position of an interface element according to claim 1, wherein the position difference information includes horizontal position difference information in a horizontal direction and vertical position difference information in a direction perpendicular to the horizontal direction, and wherein determining second position information of an area in which each interface element in the interface element set is located according to first position information of an area in which each interface element in the interface element set is located and the position difference information includes:
and determining second position information of the area where each interface element in the interface element set is located according to the first position information, the horizontal position difference information and the vertical position difference information of the area where each interface element in the interface element set is located.
5. The method for determining the position of an interface element according to any one of claims 1 to 4, wherein if one or more first interface elements are newly added, the first position information of the region where each interface element is located in the set of interface elements after the one or more first interface elements are newly added is obtained again.
6. The method for determining the position of the interface element according to any one of claims 1 to 4, wherein if one or more first interface elements are deleted, the first position information of the area where each interface element is located in the set of interface elements after the deleted one or more first interface elements is retrieved.
7. The method for determining the position of the interface element according to claim 6, wherein retrieving the first position information of the area where each interface element in the interface element set is located after deleting one or more interface elements comprises:
deleting the first position information before the current time;
controlling each interface element in the interface element set to return to an initial position;
and re-acquiring the first position information of the area where each interface element in the interface element set is located.
8. The method according to claim 1, wherein the first position information is position information of a region where each of the interface elements is located in an initial state.
9. An apparatus for determining a position of an interface element, comprising:
the information acquisition module is used for acquiring first position information of an area where each interface element in the interface element set is located and position information of a target area; wherein each of the interface elements is capable of being displayed within an interface element area;
the target element determining module is used for responding to touch operation, determining a target interface element from the interface element set, and acquiring first position information of an area where the target interface element is located;
the position difference information determining module is used for determining the position difference information between the area where the target interface element is located and the target area according to the first position information of the area where the target interface element is located and the position information of the target area;
and the position determining module is used for determining second position information of the area where each interface element in the interface element set is located according to the first position information of the area where each interface element in the interface element set is located and the position difference information.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out a method for determining a position of an interface element according to any one of claims 1 to 8.
11. An electronic device, comprising:
a processor; and
a memory for storing executable instructions of the processor;
wherein the processor is configured to perform the method of determining the position of an interface element of any of claims 1-8 via execution of the executable instructions.
CN202011233242.7A 2020-11-06 2020-11-06 Interface element position determining method and device, medium and equipment Active CN113821152B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011233242.7A CN113821152B (en) 2020-11-06 2020-11-06 Interface element position determining method and device, medium and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011233242.7A CN113821152B (en) 2020-11-06 2020-11-06 Interface element position determining method and device, medium and equipment

Publications (2)

Publication Number Publication Date
CN113821152A true CN113821152A (en) 2021-12-21
CN113821152B CN113821152B (en) 2024-06-18

Family

ID=78924771

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011233242.7A Active CN113821152B (en) 2020-11-06 2020-11-06 Interface element position determining method and device, medium and equipment

Country Status (1)

Country Link
CN (1) CN113821152B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103530052A (en) * 2013-09-27 2014-01-22 华为技术有限公司 Display method of interface content and user equipment
CN103530040A (en) * 2013-10-22 2014-01-22 腾讯科技(深圳)有限公司 Method, device and electronic equipment for moving target element
US20160062601A1 (en) * 2014-09-03 2016-03-03 Fu Tai Hua Industry (Shenzhen) Co., Ltd. Electronic device with touch screen and method for moving application functional interface
CN106303652A (en) * 2015-05-27 2017-01-04 阿里巴巴集团控股有限公司 The method for drafting of a kind of interface element and device
EP3115871A1 (en) * 2015-07-09 2017-01-11 Cogisen SRL Graphic user interface for selection by gaze or other input methods
CN106896974A (en) * 2015-12-18 2017-06-27 阿里巴巴集团控股有限公司 The method and apparatus that data are sorted out
CN109254706A (en) * 2018-08-16 2019-01-22 青岛海信电器股份有限公司 A kind of application program image target location regulation method and display terminal
CN110337034A (en) * 2019-07-12 2019-10-15 青岛海信传媒网络技术有限公司 Method for displaying user interface and display equipment

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103530052A (en) * 2013-09-27 2014-01-22 华为技术有限公司 Display method of interface content and user equipment
CN103530040A (en) * 2013-10-22 2014-01-22 腾讯科技(深圳)有限公司 Method, device and electronic equipment for moving target element
US20160062601A1 (en) * 2014-09-03 2016-03-03 Fu Tai Hua Industry (Shenzhen) Co., Ltd. Electronic device with touch screen and method for moving application functional interface
CN106303652A (en) * 2015-05-27 2017-01-04 阿里巴巴集团控股有限公司 The method for drafting of a kind of interface element and device
EP3115871A1 (en) * 2015-07-09 2017-01-11 Cogisen SRL Graphic user interface for selection by gaze or other input methods
CN106896974A (en) * 2015-12-18 2017-06-27 阿里巴巴集团控股有限公司 The method and apparatus that data are sorted out
CN109254706A (en) * 2018-08-16 2019-01-22 青岛海信电器股份有限公司 A kind of application program image target location regulation method and display terminal
CN110337034A (en) * 2019-07-12 2019-10-15 青岛海信传媒网络技术有限公司 Method for displaying user interface and display equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
康慧;杨随先;邓淑文;王波;: "产品操作界面元素布局多目标优化设计", 包装工程, no. 08, 20 April 2020 (2020-04-20) *

Also Published As

Publication number Publication date
CN113821152B (en) 2024-06-18

Similar Documents

Publication Publication Date Title
CN109725803B (en) Comment information processing method and device, storage medium and electronic equipment
EP2420946A2 (en) User terminal, remote terminal, and method for sharing augmented reality service
EP4083774A1 (en) Image drawing method and apparatus, readable medium, and electronic device
CN111432264B (en) Content display method, device, equipment and storage medium based on media information stream
CN105915599B (en) Interface display method and device
CN111783508A (en) Method and apparatus for processing image
CN113535165A (en) Interface generation method and device, electronic equipment and computer readable storage medium
KR102351420B1 (en) Create search results-based listings in a single view
CN115878935A (en) Local refreshing method, system, device, equipment and medium of chart
CN111836093B (en) Video playing method, device, equipment and medium
JP2024509014A (en) Sorting method, sorting model training method, device, electronic device and storage medium
CN113220381A (en) Click data display method and device
US10275525B2 (en) Method and system for mining trends around trending terms
US20130036374A1 (en) Method and apparatus for providing a banner on a website
US20190042852A1 (en) Supplementing a media stream with additional information
CN110489023A (en) Implementation method, device, equipment, medium and the system of windows display
CN112492399B (en) Information display method and device and electronic equipment
US20200410030A1 (en) Cloud search-based recommendation method, apparatus, device and readable storage medium
CN108920230B (en) Response method, device, equipment and storage medium for mouse suspension operation
CN113821152A (en) Method, device, medium and equipment for determining position of interface element
CN114092608B (en) Expression processing method and device, computer readable storage medium and electronic equipment
CN113260970A (en) User interface system for picture recognition, electronic equipment and interaction method
US20220398401A1 (en) Segmenting visual surrounding to create template for user experience
US20220318192A1 (en) Method and apparatus for displaying event information, storage medium and electronic device
CN113391737A (en) Interface display control method and device, storage medium and electronic equipment

Legal Events

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