Determination method for accessible object, apparatus, device, medium, and vehicle
By grouping and boundary expansion of accessible objects on the display interface of the electronic device, the accuracy problem caused by the small hot zone range is solved, and the accuracy and efficiency of operations are improved.
Patent Information
- Application Number
- PCT/CN2024/119518
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-09-20
- Filing Date
- 2024-09-18
- Publication Date
- 2025-03-27
AI Technical Summary
In the prior art, the hot zone range of access objects displayed by electronic devices is small, resulting in a low accuracy rate when determining access objects.
By grouping accessible objects based on grouping policies on the display interface and expanding the grouping boundary according to the preset boundary expansion strategy, the hot zone of the accessible object is expanded.
Improves the accuracy of users determining access objects in the small hot zone range, simplifies the grouping process, and improves the convenience and accuracy of operations.
Smart Images

Figure CN2024119518_27032025_PF_FP_ABST
Abstract
Description
Method, device, equipment, medium and vehicle for determining accessible objects
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application claims priority to the Chinese patent application filed with the China Patent Office on September 20, 2023, with application number 202311214107.1 and application name “Method, device, equipment, medium and vehicle for determining accessible objects”, and the Chinese patent application filed with the China Patent Office on September 20, 2023, with application number 202311218847.2 and application name “Method, device, equipment and vehicle for grouping accessible objects”. The entire contents of the above two Chinese patent applications are incorporated into this application by reference. Technical Field
[0003] The present application relates to the field of computer technology, and in particular to a method, apparatus, device, medium, and vehicle for determining an accessible object. Background Art
[0004] With the development of technology, electronic devices are increasingly involved in users' lives. For example, users can perform different operations by touching various access objects displayed on the display interface of the electronic device. Before performing an operation, it is usually necessary to first determine the access object.
[0005] Typically, the access objects displayed by electronic devices all have corresponding hotspots. When a user determines an access object, they are actually determining the hotspot corresponding to the access object. However, in practice, the hotspots of some access objects are small, making operation inconvenient, resulting in low accuracy in the user's determination of the access object.
[0006] Summary of the Invention
[0007] The present application proposes a method, apparatus, device, medium and vehicle for determining accessible objects, which can improve the accuracy of access object determination results when the hot zone range of the access object is small.
[0008] In a first aspect, an embodiment of the present application provides a method for determining an accessible object, comprising:
[0009] When the first interface is displayed, N accessible objects included in the first interface are grouped based on the grouping strategy to obtain a first set, the first set including M groups, where N is a positive integer greater than 1, M is a positive integer, and the grouping strategy is associated with the first location information of each accessible object;
[0010] According to a preset boundary expansion strategy, the boundary of each group in the first set is expanded to obtain M first groups, where the first group is the group after the expansion process;
[0011] According to the distance between each accessible object in each first group and the touch cursor, a target accessible object corresponding to the touch cursor is determined from the accessible objects.
[0012] In a second aspect, an embodiment of the present application provides a method for grouping accessible objects, including:
[0013] Obtain first position information of N accessible objects contained in the display interface, where N is a positive integer greater than 1;
[0014] Calculating a first distance between two accessible objects according to a distance calculation strategy and in combination with the first position information, wherein the distance calculation strategy is associated with a relative positional relationship between the two accessible objects, and the relative positional relationship between the two accessible objects is determined based on the first position information of the two accessible objects;
[0015] Based on the first distance, each accessible object is grouped to obtain a grouping result, and the grouping result is used to expand the hot zone of each accessible object.
[0016] In a third aspect, an embodiment of the present application provides a device for determining an accessible object, including:
[0017] a grouping module configured to, when displaying the first interface, group N accessible objects contained in the first interface based on a grouping strategy to obtain a first set, the first set including M groups, where N is a positive integer greater than 1, M is a positive integer, and the grouping strategy is associated with the first location information of each accessible object;
[0018] an expansion module configured to expand the boundary of each group in the first set according to a preset boundary expansion strategy to obtain M first groups, where the first group is the group after the expansion process;
[0019] The determination module is configured to determine a target accessible object corresponding to the touch cursor from among the accessible objects according to the distance between each accessible object in each first group and the touch cursor.
[0020] In a fourth aspect, an embodiment of the present application provides a device for grouping accessible objects, including:
[0021] an acquisition module configured to acquire first position information of N accessible objects included in the display interface, where N is a positive integer greater than 1;
[0022] a calculation module configured to calculate a first distance between any two accessible objects according to a distance calculation strategy and in combination with the first position information, wherein the distance calculation strategy is associated with a relative positional relationship between the two accessible objects, and the relative positional relationship between the two accessible objects is determined based on the first position information of the two accessible objects;
[0023] The grouping module is configured to group the accessible objects based on the first distance to obtain a grouping result, and the grouping result is used to expand the hot zone of each accessible object.
[0024] In a fifth aspect, an embodiment of the present application provides an electronic device, comprising: a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, the method described in the first aspect or the second aspect is implemented.
[0025] In a sixth aspect, an embodiment of the present application provides a storage medium having a program or instruction stored thereon, which implements the method described in the first aspect or the second aspect when the program or instruction is executed by a processor.
[0026] In a seventh aspect, an embodiment of the present application provides a vehicle, which includes a device for determining accessible objects as described in the second aspect or the fourth aspect; or, an electronic device as described in the fifth aspect; or, a storage medium as described in the sixth aspect.
[0027] In the embodiment of the present application, when the first interface is displayed, the N accessible objects contained in the first interface are grouped based on the grouping strategy to obtain a first set, which contains M groups; according to the preset boundary expansion strategy, the boundaries of each group in the first set are expanded to obtain M first groups, which are the expanded groups; based on the distance between each accessible object and the touch cursor in each first group, the target accessible object corresponding to the touch cursor is determined from each accessible object. That is, when the first interface contains N accessible objects, the embodiment of the present application can group each accessible object based on the grouping strategy associated with the location information of each accessible object, and execute the boundary expansion strategy for each group, expand each group, thereby expanding the hot zone of each accessible object. In this way, when the target accessible object corresponding to the touch cursor is determined, the accuracy of the target accessible object is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] FIG1 is a flowchart of a method for determining accessible objects provided by an embodiment of the present application;
[0029] FIG2 is a schematic diagram of an arrangement of accessible objects provided in an embodiment of the present application;
[0030] FIG3 is a schematic diagram of another arrangement of accessible objects provided in an embodiment of the present application;
[0031] FIG4 is a schematic diagram showing the display of each group before expansion processing according to an embodiment of the present application;
[0032] FIG5 is a schematic diagram showing the display of each group after expansion processing according to an embodiment of the present application;
[0033] FIG6 is a flowchart of another method for determining accessible objects provided by an embodiment of the present application;
[0034] FIG7 is a schematic diagram of multiple expansions of each group provided by an embodiment of the present application;
[0035] FIG8 is a schematic diagram of a positional relationship between a first group and a second group provided in an embodiment of the present application;
[0036] FIG9 is a schematic diagram of another positional relationship between a first group and a second group provided in an embodiment of the present application;
[0037] FIG10 is a schematic diagram of another positional relationship between a first group and a second group provided in an embodiment of the present application;
[0038] FIG11 is a schematic diagram of another positional relationship between a first group and a second group provided in an embodiment of the present application;
[0039] FIG12 is a flowchart of another method for determining accessible objects provided by an embodiment of the present application;
[0040] FIG13 is a schematic diagram of redistributing the central positions of accessible objects according to an embodiment of the present application;
[0041] FIG14 is a schematic diagram of a process for determining a target accessible object provided by an embodiment of the present application;
[0042] FIG15 is a flowchart of a method for grouping accessible objects provided in an embodiment of the present application;
[0043] FIG16 is a schematic diagram of an arrangement of accessible objects provided in an embodiment of the present application;
[0044] FIG17 is a schematic diagram of another arrangement of accessible objects provided in an embodiment of the present application;
[0045] FIG18 is a flowchart of another method for grouping accessible objects provided by an embodiment of the present application;
[0046] FIG19 is a schematic diagram showing a display result of grouping accessible objects provided by an embodiment of the present application;
[0047] FIG20 is a schematic diagram showing a display of first position information provided in an embodiment of the present application;
[0048] FIG21 is a schematic diagram of a relative positional relationship between a first accessible object a and a second accessible object b provided by an embodiment of the present application;
[0049] FIG22 is a schematic diagram of another relative position relationship between a first accessible object a and a second accessible object b provided in an embodiment of the present application;
[0050] FIG23 is a schematic diagram of another relative position relationship between a first accessible object a and a second accessible object b provided in an embodiment of the present application;
[0051] FIG24 is a schematic diagram of another relative position relationship between a first accessible object a and a second accessible object b provided in an embodiment of the present application;
[0052] FIG25 is a schematic diagram of another relative position relationship between a first accessible object a and a second accessible object b provided in an embodiment of the present application;
[0053] FIG26 is a schematic diagram of another relative position relationship between a first accessible object a and a second accessible object b provided in an embodiment of the present application;
[0054] FIG27 is a schematic diagram of another relative position relationship between a first accessible object a and a second accessible object b provided in an embodiment of the present application;
[0055] FIG28 is a schematic diagram of another relative position relationship between a first accessible object a and a second accessible object b provided in an embodiment of the present application;
[0056] FIG29 is a schematic diagram of performing multiple expansions on each group according to an embodiment of the present application;
[0057] FIG30 is a structural diagram of a device for determining accessible objects provided by an embodiment of the present application;
[0058] FIG31 is a structural diagram of a device for grouping accessible objects provided by an embodiment of the present application;
[0059] FIG32 is a structural diagram of an electronic device provided in an embodiment of the present application;
[0060] Figure 33 is a structural diagram of another electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0061] In order to more clearly understand the above-mentioned objectives, features and advantages of the present application, the scheme of the present application will be further described below. It should be noted that, in the absence of conflict, the embodiments of the present application and the features therein can be combined with each other.
[0062] In the following description, many specific details are set forth to facilitate a full understanding of the present application, but the present application can also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present application, not all of the embodiments.
[0063] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprises" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device that includes a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a..." do not exclude the presence of other identical elements in the process, method, article or device that includes the elements.
[0064] As described above, a user can implement different operations by touching various access objects displayed on the display interface of an electronic device. Before implementing a corresponding operation, it is usually necessary to first determine the access object.
[0065] Typically, each access object displayed on an electronic device has a corresponding hotspot. When a user identifies an access object, they are actually identifying the hotspot corresponding to the access object. However, in practice, the hotspots for some access objects are small, making operation inconvenient and resulting in low accuracy in the user's actual identification of the access object. Therefore, expanding the hotspots for access objects is important for improving user convenience and accuracy.
[0066] Currently, for the selection accuracy of access objects with a small hotspot range, such as the selection accuracy of small objects in a graphical user interface (GUI), related technologies generally adopt the following methods:
[0067] 1. Expand based on the existing hotspot of the access object. This method will not have extra space to expand the hotspot when there are more than two hotspots or the hotspot is close to the edge, and it will not improve the accuracy of the operation access object.
[0068] 2. Expand the hot zone after receiving the control trigger signal. This method cannot expand the hot zone before the user operates and improve the operation accuracy.
[0069] 3. When expanding the hot zone of the access object, it is usually necessary to first preset grouping conditions for the access objects existing in the display interface, group each access object based on the preset grouping conditions, and then expand the hot zone of each access object based on the grouping results. This solution requires pre-setting grouping conditions for each display interface. The process is cumbersome, the operation efficiency is low, and it does not support non-horizontal and vertical irregular arrangements of objects.
[0070] The embodiments of the present application provide a method, apparatus, device, medium, and vehicle for determining accessible objects, which can improve the accuracy of access object determination results when the hot zone range of the access object is small.
[0071] The following describes the method, apparatus, device, medium, and vehicle for determining accessible objects provided by the embodiments of the present application through specific embodiments. The method for determining accessible objects can be applied to electronic devices, such as vehicles or other devices with data processing capabilities.
[0072] FIG1 is a flow chart of a method for determining an accessible object provided by an embodiment of the present application. As shown in FIG1 , the method for determining an accessible object may include the following steps:
[0073] S110 : When displaying the first interface, group N accessible objects included in the first interface based on a grouping strategy to obtain a first set.
[0074] The first set includes M groups, N is a positive integer greater than 1, M is a positive integer, and the grouping strategy is associated with the first location information of each accessible object.
[0075] S120 . Dilate the boundary of each group in the first set according to a preset boundary dilation strategy to obtain M first groups.
[0076] The first group is the group after the expansion process.
[0077] S130: Determine a target accessible object corresponding to the touch cursor from among the accessible objects according to the distance between the accessible objects in each first group and the touch cursor.
[0078] In the embodiment of the present application, when the first interface is displayed, the N accessible objects contained in the first interface are grouped based on the grouping strategy to obtain a first set, which contains M groups; according to the preset boundary expansion strategy, the boundaries of each group in the first set are expanded to obtain M first groups, which are the expanded groups; based on the distance between each accessible object and the touch cursor in each first group, the target accessible object corresponding to the touch cursor is determined from each accessible object. That is, when the first interface contains N accessible objects, the embodiment of the present application can group each accessible object based on the grouping strategy associated with the location information of each accessible object, and execute the boundary expansion strategy for each group, expand each group, thereby expanding the hot zone of each accessible object. In this way, when the target accessible object corresponding to the touch cursor is determined, the accuracy of the target accessible object is improved.
[0079] The above steps are explained in detail below:
[0080] In S110, the first interface is the interface currently displayed by the electronic device, which may include multiple accessible objects for the user to perform different operations. The accessible objects are objects that the user can access, such as objects that the user can click or touch. For example, the accessible objects may be in the form of controls, buttons, etc.
[0081] Exemplarily, as shown in FIG2 , each accessible object can be arranged regularly in the first interface, for example, each accessible object is arranged horizontally or vertically, and FIG2 takes each accessible object arranged horizontally as an example. Exemplarily, as shown in FIG3 , some accessible objects can also be arranged irregularly in the first interface, for example, some accessible objects are neither arranged horizontally nor arranged vertically, for example, accessible objects 8, accessible objects 9, and accessible objects 10 shown in FIG3 are arranged irregularly. That is, the solution of the embodiment of the present application is not only applicable to regularly arranged accessible objects, but also to irregularly arranged accessible objects, and has a wider scope of application.
[0082] The grouping strategy is used to group the N accessible objects contained in the first interface. Exemplarily, the grouping strategy is associated with the first location information of each accessible object, that is, the embodiment of the present application can group each accessible object based on the location information of each accessible object in the first interface.
[0083] The first position information can be the position information of the accessible object in the first interface, taking the upper left corner of the first interface as the origin, the horizontal axis to the right as the horizontal axis, that is, the positive direction of the x-axis, and the vertical axis downward as the vertical axis, that is, the positive direction of the y-axis to establish a coordinate system as an example.
[0084] Exemplarily, the first position information may include screen coordinate information of the accessible object, such as the maximum horizontal coordinate, the minimum horizontal coordinate, the maximum vertical coordinate, and the minimum vertical coordinate, etc. The maximum horizontal coordinate is the horizontal coordinate corresponding to the point in the accessible object farthest from the y-axis, the minimum horizontal coordinate is the horizontal coordinate corresponding to the point in the accessible object closest to the y-axis, the maximum vertical coordinate is the vertical coordinate corresponding to the point in the accessible object farthest from the x-axis, and the minimum vertical coordinate is the vertical coordinate corresponding to the point in the accessible object closest to the x-axis.
[0085] Exemplarily, the node query device may traverse N accessible objects in the first interface to obtain the first location information of each accessible object.
[0086] The first set is used to store at least one group. Exemplarily, each accessible object may be grouped based on a grouping strategy to obtain at least one group, and the set formed by each group is recorded as the first set.
[0087] For example, two accessible objects can be selected, and then based on the first position information of the two accessible objects, the boundary distance between the two accessible objects can be determined. If the boundary distance between the two accessible objects is less than a preset distance, the two accessible objects can be grouped together. Otherwise, the two accessible objects are divided into two groups. Then, based on the grouping, the remaining accessible objects are compared with the accessible objects in the grouping until all accessible objects are traversed. In this way, similar accessible objects can be grouped together, which facilitates the subsequent execution of the expansion strategy to expand the hot zone of each accessible object.
[0088] For example, the center position of each accessible object can be determined based on the first location information, and then the accessible objects can be grouped based on the center position of each accessible object to obtain the first set. Of course, other grouping methods can also be used, and the present embodiment does not specifically limit the grouping method.
[0089] That is, the embodiment of the present application can automatically group the accessible objects based on the location information of each accessible object, without the need to manually set each group.
[0090] Exemplarily, as shown in FIG4 , accessible objects A to C may be grouped together, accessible objects D to G may be grouped together, and accessible objects H to J may be grouped together.
[0091] In S120 , the boundary expansion strategy is used to expand the boundary of each group to extend the hot zone of each accessible object, thereby facilitating subsequent determination of the target accessible object.
[0092] The embodiments of this application do not limit the specific boundary expansion strategy. For example, for a group, all boundaries of the group can be expanded simultaneously, or a portion of the boundaries can be expanded first, and then the remaining boundaries can be expanded after the expansion of these boundaries stops. When the boundaries of two groups touch, the expansion of this boundary stops.
[0093] When the boundaries of a group are expanded, the hotspots of each accessible object within that group expand accordingly. The positions of each accessible object also change as the hotspots expand, but the positions of the accessible objects actually displayed on the first interface remain unchanged. That is, the positions of the accessible objects as seen by the user remain unchanged.
[0094] In an embodiment of the present application, if the first set includes multiple groups, each group can be expanded in turn. For example, if the first set includes group A, group B, and group C, group A will be expanded once, followed by group B, and then group C. After each group has completed its expansion, the second expansion process is performed in the same order until a group meets the expansion stop condition. In this way, the hot zones corresponding to each group can be effectively expanded.
[0095] For example, referring to Figures 4 and 5, Figure 4 is a schematic diagram of each group before expansion, and Figure 5 is a schematic diagram of each group after expansion. It can be seen that the present embodiment can effectively expand the hotspots of each accessible object, without affecting the expansion effect due to an accessible object being between two other accessible objects. The location of each accessible object after expansion is only recorded in the background and is not displayed to the user.
[0096] In S130 , the distance between each accessible object and the touch cursor after the expansion process may be determined based on the position information of each accessible object after the expansion process and the position information of the touch cursor.
[0097] The positions of the accessible objects displayed on the first interface after the expansion process are the same as the positions of the accessible objects displayed on the first interface before the expansion process.
[0098] Illustratively, the position information of each accessible object after the expansion process may include but is not limited to the maximum horizontal coordinate, maximum vertical coordinate, minimum horizontal coordinate, minimum vertical coordinate and center position coordinate of each accessible object after the expansion process.
[0099] The touch cursor is a cursor displayed on the first interface, and is used to perform operations such as clicking and double-clicking on the target accessible object to meet different needs.
[0100] The position information of the touch cursor may be the position information of the response position of the touch cursor. In actual application, the response position of the touch cursor may be the same as or different from the display position of the touch cursor on the first interface. The response position of the touch cursor is the position where the touch cursor is associated with the accessible object to be operated. For example, when the response position of the touch cursor is associated with accessible object A, it can be considered that the touch cursor performs a certain operation on accessible object A. At this time, the display position of the touch cursor may be on accessible object A or at other positions, as long as the response position of the touch cursor is associated with accessible object A.
[0101] For the convenience of description, taking the case where the response position of the touch cursor is the same as the display position, for example, based on the position information of each accessible object after expansion processing and the position information of the touch cursor, the distance between each accessible object and the touch cursor can be determined, and the target accessible object can be selected from them. For example, the accessible object with the smallest distance from the touch cursor can be determined as the target accessible object.
[0102] When the first interface is displayed, the embodiment of the present application can automatically group the accessible objects based on the position information of the accessible objects contained in the first interface, and execute the boundary expansion strategy after grouping. The target accessible object is determined based on the distance between the expanded accessible objects and the touch coordinates. There is no need to obtain the trigger signal of the accessible object in advance, that is, the hot zone of each accessible object can be expanded before the user operates the accessible object, thereby improving the accuracy of the operation.
[0103] For example, after the target accessible object is determined, a confirmation mark can be displayed on the target accessible object to indicate that the target accessible object is currently selected. It should be noted that the confirmation mark can be displayed on the hot zone corresponding to the target accessible object before the expansion process, or directly on the target accessible object, so that the user can easily perform the next operation.
[0104] In some embodiments, as shown in FIG6 , the method for determining accessible objects may include the following steps:
[0105] S610: When displaying a first interface, group N accessible objects included in the first interface based on a grouping strategy to obtain a first set.
[0106] S620: For each group in the first set, determine a boundary of the group from first location information of accessible objects contained in the group.
[0107] The boundary of the group includes a rectangular boundary.
[0108] S630 : According to a preset boundary expansion strategy, the boundary of each group is expanded in sequence along the left-right direction and the up-down direction.
[0109] S640: If the preset group meets the expansion stop condition, stop expanding the preset group, and continue expanding the groups that do not meet the expansion stop condition until all groups meet the expansion stop condition, and record the group that meets the expansion stop condition as the first group.
[0110] The preset group is any group in the first set.
[0111] S650: Determine a target accessible object corresponding to the touch cursor from among the accessible objects according to the distance between the accessible objects in each first group and the touch cursor.
[0112] The processes of S610 and S650 are the same as the processes of S110 and S130 described above, and are not repeated here for the sake of brevity.
[0113] The other steps above are described in detail below:
[0114] In S620, the boundary shape of each group can be determined according to the position of each accessible object, for example, it can be a rectangle or other shapes. For the convenience of description, the embodiment of the present application takes the boundary of each group as a rectangular boundary as an example.
[0115] Exemplarily, the boundaries of each group may be determined based on the location information of each accessible object within the group. For example, if the first location information of each accessible object includes the maximum horizontal coordinate, maximum vertical coordinate, minimum horizontal coordinate, and minimum vertical coordinate of each accessible object, and the boundaries of the group include the first boundary and the second boundary, the above S620 may include the following steps:
[0116] A first boundary of the group is determined from the maximum horizontal coordinate and the minimum horizontal coordinate of each accessible object, and a second boundary of the group is determined from the maximum vertical coordinate and the minimum vertical coordinate of each accessible object.
[0117] For example, the first boundary may be a vertical boundary, for example, when the boundary of the group is a rectangular boundary, the first boundary may be two boundaries perpendicular to the horizontal direction. The second boundary may be a horizontal boundary, for example, when the boundary of the group is a rectangular boundary, the second boundary may be two boundaries perpendicular to the vertical direction.
[0118] For example, if the group contains an accessible object, a line perpendicular to the horizontal direction can be drawn using the maximum horizontal coordinate and the minimum horizontal coordinate of the accessible object, and then a line perpendicular to the vertical direction can be drawn using the maximum vertical coordinate and the minimum vertical coordinate of the accessible object. The intersection of the lines is recorded as the corner point of the group, thereby obtaining the boundary of the group. As shown in Figure 4, the thick solid lines represent the boundaries of each group.
[0119] Exemplarily, when the group contains multiple accessible objects, the maximum value can be determined from the maximum horizontal coordinate of each accessible object, the maximum value can be determined from the minimum horizontal coordinate of each accessible object, the maximum value can be determined from the maximum vertical coordinate of each accessible object, and the maximum value can be determined from the minimum vertical coordinate of each accessible object. Then, based on the determined maximum values, the boundary of the group can be determined in such a way that the group contains one accessible object.
[0120] The embodiment of the present application determines the boundary of each group based on the location information of each accessible object in the group, providing a basis for the subsequent execution of the boundary expansion strategy, so that the hot zone of each accessible object in the group can be effectively expanded.
[0121] In S630 , after the boundaries of each group are determined, the boundaries of each group may be expanded in turn according to a preset boundary expansion strategy.
[0122] Exemplarily, for each group, an expansion process may be performed on the group in the left-right direction and the up-down direction. For example, Gixmax and Giymax may be increased, and Gixmin and Giymin may be decreased. Gixmax and Giymax are the maximum horizontal coordinate and the maximum vertical coordinate of the i-th group in the first set G, respectively, and Gixmin and Giymin are the minimum horizontal coordinate and the minimum vertical coordinate of the i-th group in the first set G, respectively.
[0123] The expansion step size is negatively correlated with the size of the group. For example, the larger the group size, the smaller the expansion step size, and the smaller the group size, the larger the expansion step size. This allows each group to be effectively expanded, improving the expansion effect. The group size may include the width and height of the group.
[0124] Exemplarily, when the boundaries of the group are expanded, the expansion is performed in equal proportion, that is, the proportional relationship between the width and height of the group after the expansion is the same as the proportional relationship between the width and height of the group before the expansion.
[0125] For example, refer to Figure 7, which shows a schematic diagram of each group undergoing multiple expansions. As can be seen from Figure 7, each group can be effectively expanded. The dashed lines represent the positions of each group before expansion, the thick solid lines represent the positions of each group after expansion, and the thin solid lines represent the positions of each group during the intermediate stages. For ease of description, Figure 7 uses the example of each group undergoing two expansions. In actual applications, more expansions are possible.
[0126] In S640, the preset group is any group in the first set. The expansion stop condition is used to determine whether to stop expanding the preset group. Exemplarily, the expansion stop condition may include, but is not limited to, stopping expansion of the two expanded groups if the two expanded groups touch, or stopping further expansion of the group if the expanded group touches the edge of the first interface. In other words, whether to stop expanding the corresponding group is determined by determining whether two groups touch, or whether a group touches the edge of the first interface.
[0127] Taking the three groups included in Figure 4 as an example, for the convenience of description, the group containing accessible object A - accessible object C can be denoted as group 1, the group containing accessible object D - accessible object E can be denoted as group 2, and the group containing accessible object H - accessible object J can be denoted as group 3.
[0128] Exemplarily, through the dilation process, if the lower boundary of group 1 touches the upper boundary of group 2, the dilation of group 1 and group 2 is stopped. If at this time group 2 and group 3 do not touch, group 3 can continue to be dilated. If group 3 touches group 2, the continued dilation of group 3 is stopped. In this way, Figure 5 can be obtained. After the dilation of each group stops, each group after the dilation stops can be denoted as the first group.
[0129] In the embodiment of the present application, after obtaining the boundaries of each group, the boundaries of each group are dilated according to the boundary dilation strategy, so that the hot areas of the accessible objects in each group are effectively dilated. In this way, when determining the target accessible object subsequently, the accuracy of the result can be improved.
[0130] In some embodiments, it can also be determined whether to stop dilating the corresponding group based on whether there is a rectangular contact between two groups. Rectangular contact means that there is an overlapping part between two groups, and the overlapping part is rectangular.
[0131] In practical applications, whether there is a rectangular contact between two groups can be determined based on the positional relationship between the two groups, that is, the dilation stop condition can also be the condition corresponding to the coordinates of each group. For different positional relationships, the corresponding conditions are different when determining whether there is a rectangular contact between the corresponding groups.
[0132] Taking the positional relationships shown in Figures 8 - 11 as an example, where a represents the first group and b represents the second group. Figure 8 shows that the first group is located at the lower left of the second group, Figure 9 shows that the first group is located at the upper right of the second group, Figure 9 shows that the first group is located at the lower right of the second group, and Figure 10 shows that the first group is located at the upper left of the second group. In practical applications, there can also be other positional relationships.
[0133] Exemplarily, in the case where the first group is located at the lower left of the second group, the dilation stop condition includes: xmaxa > xminb and xmina < xmaxb and ymaxb > ymina and yminb < ymaxa;
[0134] In the case where the first group is located at the upper right of the second group, the dilation stop condition includes: xmaxb > xmina and xminb < xmaxa and ymaxa > yminb and ymaxb > ymina;
[0135] When the first group is located at the lower right of the second group, the inflation stop condition includes: xmaxb > xmina and xminb < xmaxa and ymaxb > ymina and ymaxa > yminb;
[0136] When the first group is located at the upper left of the second group, the inflation stop condition includes: xmaxa > xminb and xmina < xmaxb and ymaxa > yminb and ymaxb > ymina;
[0137] Where, xmaxa and xmaxb are the maximum horizontal coordinates of the first group and the second group respectively, xmina and xminb are the minimum horizontal coordinates of the first group and the second group respectively, ymaxa and ymaxb are the maximum vertical coordinates of the first group and the second group respectively, ymina and yminb are the minimum vertical coordinates of the first group and the second group respectively, and the first group and the second group are groups in the first set.
[0138] Exemplarily, when the first group is located at the lower left of the second group, if the maximum horizontal coordinate of the first group is greater than the minimum horizontal coordinate of the second group, and the minimum horizontal coordinate of the first group is less than the maximum horizontal coordinate of the second group, and the maximum vertical coordinate of the second group is greater than the minimum vertical coordinate of the first group, and the minimum vertical coordinate of the second group is less than the maximum vertical coordinate of the first group, it can indicate that there is an overlapping part between the first group and the second group, that is, the first group and the second group meet the inflation stop condition, and at this time, it is necessary to stop the inflation of the first group and the second group.
[0139] The judgment process for other situations is similar and will not be described in detail here.
[0140] Based on the positional relationship between the two groups, different inflation stop conditions are set in the embodiments of the present application, fully considering the positional relationship between each group and improving the inflation effect.
[0141] In order to accurately determine the target accessible object, after the hot areas of each accessible object are expanded, the positions of each accessible object also need to be changed accordingly to facilitate determining the distance between each accessible object and the touch cursor. Based on this, in some embodiments, as shown in FIG. 12, the method for determining the accessible object may include the following steps:
[0142] S1200. When the first interface is displayed, based on the grouping strategy, group the N accessible objects included in the first interface to obtain a first set.
[0143] S1210. According to the preset boundary inflation strategy, perform inflation processing on the boundaries of each group in the first set to obtain M first groups.
[0144] S1220 . Update the center position coordinates of each accessible object in the corresponding group before the expansion process according to the second position information of the first group, and obtain third position information of each accessible object in the first group after the expansion process.
[0145] S1230: Based on the third position information and the fourth position information of the touch cursor, obtain a first distance between each accessible object and the touch cursor after the expansion process.
[0146] S1240: Determine an accessible object whose first distance is less than a preset threshold as a target accessible object corresponding to the touch cursor.
[0147] The processes of S1200 and S1210 are the same as the processes of S110 and S120 described above. For details, please refer to S110 and S120. For the sake of brevity, they will not be repeated here.
[0148] The other steps above are described in detail below:
[0149] In S1220, the second position information is information of the first group in the first interface. Exemplarily, the second position information may include the minimum horizontal coordinate and the minimum vertical coordinate of the first group, as well as the width and height of the first group.
[0150] According to the second position information, the center position coordinates of each accessible object in the corresponding group before the expansion process can be updated. Exemplarily, the center position coordinates of each accessible object in the corresponding group before the expansion process can be updated in the following manner:
[0151] Wherein, (x′, y′) is the third position information of the accessible object after dilation processing, (x, y) is the center position coordinate of the corresponding accessible object before dilation processing, Gixmin and Giymin are the minimum horizontal coordinate and minimum vertical coordinate of the group before dilation processing, Gixmin′ and Giymin′ are the minimum horizontal coordinate and minimum vertical coordinate of the first group, Giw and Gih are the width and height of the group before dilation processing, and Giw′ and Gih′ are the width and height of the first group, respectively.
[0152] For example, Where xmaxj is the maximum horizontal coordinate of accessible object j, xminj is the minimum horizontal coordinate of accessible object j, ymaxj is the maximum vertical coordinate of accessible object j, and yminj is the minimum vertical coordinate of accessible object j. (x, y) and (x′, y′) are the center coordinates of the same accessible object before and after dilation, respectively.
[0153] Exemplarily, as shown in FIG13 , the center positions of the accessible objects can be redistributed in the above manner to obtain the center position coordinates of the accessible objects after expansion processing, which provides a basis for subsequently determining the distance between the accessible objects and the touch coordinates.
[0154] In S1230, exemplarily, the first distance between the accessible object and the touch cursor may be the Euclidean distance between the accessible object and the touch cursor, and the Euclidean distance between the accessible object and the touch cursor may be obtained based on the center position coordinates of the accessible object and the position coordinates of the touch cursor.
[0155] For example, Among them, di is the first distance between the i-th accessible object and the touch cursor, (x0, y0) is the position coordinate of the touch cursor, that is, the fourth position information, and (xi′, yi′) is the center position coordinate of the i-th accessible object.
[0156] For example, the first distance between the accessible object and the touch cursor can also be determined based on the average of the distances between the touch coordinates and the four corner points of the accessible object. Of course, the distance between the accessible object and the touch cursor can also be determined in other ways.
[0157] In S1240, after the distances between each accessible object and the touch cursor are determined, a target accessible object can be determined from the accessible objects based on the distances. For example, the accessible object with the smallest distance can be determined as the target accessible object. The size of the preset threshold can be set according to actual needs and is not limited in the embodiments of the present application.
[0158] 14 , the first distance between the touch cursor and accessible object A is the smallest, so accessible object A can be determined as the target accessible object, and a confirmation mark is displayed in accessible object A to facilitate the user to perform the next operation. The black circle represents the touch cursor.
[0159] The embodiment of the present application groups the accessible objects contained in the first interface and expands the boundaries of each group based on a boundary expansion strategy to expand the hot zone of each accessible object. On this basis, the position of each accessible object is redistributed, and the target accessible object is determined based on the distance between the redistributed position and the touch cursor, effectively solving the problem of low accuracy of object determination results due to the small hot zone of the accessible object.
[0160] It should be understood that when an electronic device is in use, there will be a certain amount of noise. If the difference in distance between the touch cursor and two accessible objects is smaller than the noise, the touch cursor may frequently switch between the two accessible objects. To avoid this situation, illustratively, after S130, the method for determining the accessible objects may further include the following steps:
[0161] When the difference between the second distance and the third distance is less than the first threshold, obtaining a corresponding offset distance from the first information table, where the second distance is the distance between the touch cursor and the target accessible object, and the third distance is the distance between the touch cursor and the first accessible object, where the first accessible object is an object other than the target accessible object among the accessible objects, and the first information table is used to store an association between the offset distance and the second distance and the third distance, and the offset distance is used to maintain the position of the touch cursor unchanged within a preset time period;
[0162] The second distance is replaced by the difference between the second distance and the offset distance.
[0163] In an embodiment of the present application, the offset distance is used to offset the influence of noise to prevent the touch cursor from frequently switching between two accessible objects. The offset distance is associated with the second distance and the third distance, that is, the difference between the second distance and the third distance is different, and the corresponding offset distance is also different. Exemplarily, the association between the offset distance and the second distance and the third distance can be stored in a first information table. In this way, after determining the second distance and the third distance, the first information table can be searched to obtain the corresponding offset distance.
[0164] After the offset distance is obtained, the distance between the target accessible object and the touch cursor can be updated based on the offset distance. For example, the second distance between the target accessible object and the touch cursor can be replaced by the difference between the second distance and the offset distance.
[0165] For example, Among them, do is the distance between the updated target accessible object and the touch cursor, d′ is the offset distance, and (xo,yo) is the center position coordinate of the target accessible object. In this way, when the distance between the touch cursor and the two accessible objects is relatively close, the offset distance can be used to increase the distance difference between the touch cursor and the two accessible objects, thereby avoiding the touch cursor from frequently switching between the two accessible objects. For example, after determining the target accessible object, the offset distance can be used to keep the touch cursor on the target accessible object within a preset time length. The size of the preset time length can be set according to actual needs.
[0166] After obtaining the target accessible object, the embodiment of the present application updates the distance between the target accessible object and the touch cursor based on the offset distance, so that when the distance difference between the touch cursor and the target accessible object and other accessible objects is small, the touch cursor can stay on the target accessible object as much as possible, avoiding the touch cursor from frequently switching between the target accessible object and other accessible objects, and improving the stability of touch.
[0167] Regarding the problem that when the related art groups the accessible objects on the display interface, it is necessary to pre-set grouping conditions for the accessible objects existing in the display interface, the process is cumbersome, and the operation efficiency is low, the embodiments of the present application provide a method, device, equipment and vehicle for grouping accessible objects, which can solve the problem that when the related art groups the accessible objects contained in the display interface, the process is cumbersome and the operation efficiency is low.
[0168] The following describes the method, apparatus, device, and vehicle for grouping accessible objects provided by the embodiments of the present application through specific embodiments. The method for grouping accessible objects can be applied to electronic devices, such as vehicles or other devices with data processing capabilities.
[0169] FIG15 is a flowchart of a method for grouping accessible objects provided by an embodiment of the present application. As shown in FIG15 , the method for grouping accessible objects may include the following steps:
[0170] S110: Obtain first position information of N accessible objects included in the display interface.
[0171] Wherein, N is a positive integer greater than 1.
[0172] S120: Calculate a first distance between any two accessible objects according to the distance calculation strategy and in combination with the first location information.
[0173] The distance calculation strategy is associated with the relative position relationship between the two accessible objects, and the relative position relationship between the two accessible objects is determined based on the first position information of the two accessible objects.
[0174] S130: Group the accessible objects based on the first distance to obtain a grouping result.
[0175] The embodiment of the present application obtains the first position information of N accessible objects contained in the display interface, and calculates the first distance between each pair of accessible objects based on the distance calculation strategy and the first position information. The distance calculation strategy is associated with the relative position relationship of the two accessible objects, and the relative position relationship of the two accessible objects is determined based on the first position information of the two accessible objects; based on the first distance, each accessible object is grouped to obtain a grouping result. That is, the embodiment of the present application can determine the first distance between any two accessible objects based on the first position information of each accessible object and the distance calculation strategy, and automatically group each accessible object based on the first distance, without pre-setting grouping conditions for each accessible object on the display interface. In this way, the grouping process of the accessible objects is simplified and the grouping efficiency is improved.
[0176] The above steps are explained in detail below:
[0177] In S110, the display interface is the interface currently displayed by the electronic device, which may include multiple accessible objects for the user to perform different operations. An accessible object is an object that the user can access, for example, an object that the user can click or touch. For example, the accessible object may be in the form of a control, a button, etc.
[0178] Exemplarily, as shown in FIG16 , each accessible object can be arranged regularly in the display interface, for example, each accessible object is arranged horizontally or vertically, and FIG16 takes each accessible object arranged horizontally as an example. Exemplarily, as shown in FIG17 , some accessible objects can also be arranged irregularly in the display interface, for example, some accessible objects are neither arranged horizontally nor vertically, for example, accessible objects 8, accessible objects 9, and accessible objects 10 shown in FIG17 are arranged irregularly. That is, the grouping scheme of the embodiment of the present application is not only applicable to regularly arranged accessible objects, but also to irregularly arranged accessible objects, and has a wider scope of application.
[0179] The first position information can be the position information of the accessible object in the display interface, taking the upper left corner of the display interface as the origin, the horizontal axis to the right as the horizontal axis, that is, the positive direction of the x-axis, and the vertical axis downward as the vertical axis, that is, the positive direction of the y-axis as an example to establish a coordinate system.
[0180] Exemplarily, the first position information may include screen coordinate information of the accessible object, such as the maximum horizontal coordinate, the minimum horizontal coordinate, the maximum vertical coordinate, and the minimum vertical coordinate, etc. The maximum horizontal coordinate is the horizontal coordinate corresponding to the point in the accessible object farthest from the y-axis, the minimum horizontal coordinate is the horizontal coordinate corresponding to the point in the accessible object closest to the y-axis, the maximum vertical coordinate is the vertical coordinate corresponding to the point in the accessible object farthest from the x-axis, and the minimum vertical coordinate is the vertical coordinate corresponding to the point in the accessible object closest to the x-axis.
[0181] Exemplarily, the node query device may traverse N accessible objects in the display interface to obtain the first position information of each accessible object.
[0182] In S120, a distance calculation strategy is used to calculate the distance between two accessible objects. The distance calculation strategy is related to the relative positional relationship of the two accessible objects. That is, different relative positional relationships correspond to different distance calculation strategies. For example, if accessible object a is located to the lower left of accessible object b, and accessible object b is located to the upper left of accessible object c, then the distance calculation strategy used when calculating the distance between accessible object a and accessible object b is different from the distance calculation strategy used when calculating the distance between accessible object b and accessible object c.
[0183] The relative position relationship between two accessible objects may be determined based on the first position information of the two accessible objects. For a specific determination process, please refer to the following embodiments.
[0184] The embodiment of the present application can obtain the relative position relationship of the two accessible objects based on the first position relationship of the two accessible objects, and obtain a suitable distance calculation strategy based on the relative position relationship of the two accessible objects, and then calculate the distance between the two accessible objects based on the distance calculation strategy, providing a basis for subsequent automatic grouping.
[0185] In S130 , after the distances between the accessible objects are determined, the accessible objects can be grouped based on the distances to obtain grouping results without presetting grouping conditions, thereby simplifying the grouping process and improving grouping efficiency.
[0186] In some embodiments, as shown in FIG18 , the method for grouping accessible objects may include the following steps:
[0187] S410: Obtain first position information of N accessible objects included in the display interface.
[0188] S420: Calculate a first distance between any two accessible objects according to the distance calculation strategy and in combination with the first location information.
[0189] S430: Set a first set, which is initially empty.
[0190] S440: When the first distance between the first accessible object and the second accessible object is less than a preset distance threshold, if the first set is empty, group the first accessible object and the second accessible object into one group and store them in the first set.
[0191] The first accessible object and the second accessible object are any two of the N accessible objects.
[0192] S450: If the first set is not empty, group the first accessible object and the second accessible object based on their belonging relationship with the first set, until all accessible objects are grouped.
[0193] The processes of S410 and S420 are the same as the processes of S110 and S120 described above. For details, please refer to the description of S110 and S120. For the sake of brevity, they will not be repeated here.
[0194] The other steps above are described in detail below:
[0195] In S430 , the first set is used to store the grouping result. The first set is initially empty, that is, does not contain any grouping.
[0196] In S440 , the first accessible object and the second accessible object are any two accessible objects among the N accessible objects.
[0197] For example, any one of the N accessible objects can be selected as the first accessible object, and then a first distance between the first accessible object and any other accessible object (the second accessible object) can be determined. If the first distance is less than a preset distance threshold, the first accessible object and the second accessible object can be grouped together with the first set. The preset distance threshold can be set as needed.
[0198] For example, if the first set is empty, the first accessible object and the second accessible object can be grouped together and stored in the first set, at which point the first set is no longer empty.
[0199] In S450 , if the first set is not empty, the first accessible object and the second accessible object may be grouped based on their belonging relationships with the first set.
[0200] The relationship between the first accessible object and the second accessible object and the first set may include that neither the first accessible object nor the second accessible object belongs to the first set, and at least one of the first accessible object and the second accessible object belongs to the first set.
[0201] Exemplarily, when neither the first accessible object nor the second accessible object belongs to the first set, since the distance between the first accessible object and the second accessible object is less than a preset distance threshold, the first accessible object and the second accessible object can be added to the first set as a new group. If at least one of the first accessible object and the second accessible object is located in the first set, the grouping result can be further determined in combination with the group to which the first accessible object and / or the second accessible object belongs.
[0202] The embodiment of the present application realizes the grouping of each accessible object by presetting a first set and combining the distance between two accessible objects and the relationship between the two accessible objects and the first set. There is no need to pre-set grouping conditions for each display interface, which simplifies the grouping process and improves the grouping efficiency.
[0203] Exemplarily, when a first distance between a first accessible object and a second accessible object is greater than or equal to a preset distance threshold, the first accessible object and the second accessible object may be divided into different groups. Exemplarily, when a first distance between a first accessible object and a second accessible object is greater than or equal to a preset distance threshold, the distance between the first accessible object and the next second accessible object may be continuously compared with the preset distance threshold.
[0204] In some embodiments, the above S450 may include the following steps:
[0205] If the first accessible object belongs to the kth group in the first set, store the second accessible object in the kth group; or if the second accessible object belongs to the kth group in the first set, store the first accessible object in the kth group;
[0206] In a case where neither the first accessible object nor the second accessible object belongs to the first set, the first accessible object and the second accessible object are stored in the first set as a new group.
[0207] The kth group is any group in the first set. Exemplarily, when one of the first accessible object and the second accessible object exists in the kth group, the other one may also be added to the kth group. For example, when the first accessible object belongs to the kth group in the first set, the second accessible object is also added to the kth group; when the second accessible object belongs to the kth group in the first set, the first accessible object is also added to the kth group.
[0208] If neither the first accessible object nor the second accessible object belongs to the first set, that is, when the first accessible object and the second accessible object do not belong to any group in the first set, since the distance between the first accessible object and the second accessible object is less than the preset distance threshold, the first accessible object and the second accessible object can be added to the first set as a new group. A similar process is performed for other accessible objects until all accessible objects are grouped.
[0209] Taking the display interface shown in FIG16 as an example, for example, accessible object A can be set as the first accessible object, and accessible object B can be set as the second accessible object. At this time, the first distance between accessible object A and accessible object B can be compared with a preset distance threshold. If the first distance is less than the preset distance threshold, accessible object A and accessible object B can be initially grouped together. For the convenience of subsequent description, this group can be recorded as group 1, and group 1 is added to the first set. At this time, the first set is no longer empty.
[0210] Afterwards, another accessible object can be selected from the remaining accessible objects. For example, accessible object C can be selected as the new second accessible object. At this time, the relationship between the first distance between accessible objects B and accessible objects C and the preset distance threshold can be compared. If the first distance is less than the preset distance threshold, since accessible object B is in group 1, accessible object C can be added to group 1. Of course, in actual applications, the relationship between the first distance between accessible objects A and accessible objects C and the preset distance threshold can also be compared, and the process is similar.
[0211] Afterwards, the relationship between the first distance between accessible object C and accessible object D and the preset distance threshold can be continued to be compared. If the first distance is greater than or equal to the preset distance threshold, accessible object D can be regarded as a new group. Similarly, the relationship between the first distance between accessible object C and the remaining accessible objects and the preset distance threshold can be further compared to determine whether there are other accessible objects to be added to group 1. If not, accessible object D can be used as the first accessible object, and then one from accessible object E to accessible object J can be selected as the second accessible object. The above-mentioned similar judgment process is performed until all accessible objects are matched.
[0212] For example, as shown in FIG19 , FIG19 is the result after grouping, that is, accessible objects A to accessible objects C are grouped together, accessible objects D to accessible objects G are grouped together, and accessible objects H to accessible objects J are grouped together. The thick black solid lines are the boundaries of each group. The embodiment of the present application can automatically determine the boundaries of each group. FIG19 exemplarily takes the regular arrangement of the accessible objects as an example. In actual application, the accessible objects can also be arranged irregularly, and the grouping process is similar.
[0213] In the embodiment of the present application, when the first set is not empty, the accessible objects can be automatically grouped based on the relationship between the two accessible objects and the first set without user operation, thereby improving grouping efficiency.
[0214] In some embodiments, the distance calculation strategy may include multiple strategies. Accordingly, the above S120 may include the following steps:
[0215] S140: Acquire a first relative position relationship between the first accessible object and the second accessible object based on first position information of the first accessible object and the second accessible object, where the first accessible object and the second accessible object are any two of the N accessible objects;
[0216] S150, selecting a first distance calculation strategy corresponding to the first relative position relationship from various distance calculation strategies;
[0217] S160: Calculate a first distance between the first accessible object and the second accessible object based on a first distance calculation strategy.
[0218] The above steps are explained in detail below:
[0219] In S140, taking the first location information including the maximum horizontal coordinate, minimum horizontal coordinate, maximum vertical coordinate, and minimum vertical coordinate of the accessible object as an example, taking accessible object A as an example, the maximum horizontal coordinate xmax, minimum horizontal coordinate xmin, maximum vertical coordinate ymax, and minimum vertical coordinate ymin of accessible object A can be seen in FIG.
[0220] Exemplarily, the above S140 may include the following steps:
[0221] When the maximum horizontal coordinate of the first accessible object is less than the minimum horizontal coordinate of the second accessible object, and the minimum vertical coordinate of the first accessible object is greater than the maximum vertical coordinate of the second accessible object, the first relative positional relationship between the first accessible object and the second accessible object is obtained as follows: the first accessible object is located to the lower left of the second accessible object.
[0222] When the maximum horizontal coordinate of the first accessible object is smaller than the minimum horizontal coordinate of the second accessible object, and the maximum vertical coordinate of the first accessible object is smaller than the minimum vertical coordinate of the second accessible object, the first relative positional relationship between the first accessible object and the second accessible object is obtained as follows: the first accessible object is located to the upper left of the second accessible object;
[0223] When the minimum horizontal coordinate of the first accessible object is greater than the maximum horizontal coordinate of the second accessible object, and the maximum vertical coordinate of the first accessible object is less than the minimum vertical coordinate of the second accessible object, the first relative positional relationship between the first accessible object and the second accessible object is obtained as follows: the first accessible object is located to the upper right of the second accessible object;
[0224] When the minimum horizontal coordinate of the first accessible object is greater than the maximum horizontal coordinate of the second accessible object, and the minimum vertical coordinate of the first accessible object is greater than the maximum vertical coordinate of the second accessible object, the first relative position relationship between the first accessible object and the second accessible object is: the first accessible object is located at the lower right of the second accessible object.
[0225] The embodiment of the present application takes the relative position relationship including the lower left, upper left, lower right and upper right as an example. In actual application, it can also include the left, right, top and bottom. The judgment process of the left, right, top and bottom is simpler than that of the lower left, upper left, lower right and upper right, and will not be described in detail here.
[0226] The embodiment of the present application can obtain the relative position relationship between any two accessible objects based on the first position information of each accessible object, so that the corresponding distance calculation strategy can be subsequently obtained based on the relative position relationship between the two accessible objects, thereby more accurately calculating the distance between the two accessible objects, which helps to improve the accuracy of the grouping results.
[0227] In S150, after the relative positional relationship between the first accessible object and the second accessible object is determined, a first distance calculation strategy corresponding to the relative positional relationship is selected from the various distance calculation strategies based on the relative positional relationship. Different relative positional relationships may correspond to different distance calculation strategies, thereby more accurately determining the distance between the first accessible object and the second accessible object.
[0228] For example, when the first accessible object is located to the lower left of the second accessible object, the first distance calculation strategy includes:
[0229] In the case where the first accessible object is located above and to the left of the second accessible object, the first distance calculation strategy includes:
[0230] In the case where the first accessible object is located to the upper right of the second accessible object, the first distance calculation strategy includes:
[0231] In the case where the first accessible object is located to the lower right of the second accessible object, the first distance calculation strategy includes:
[0232] Among them, xmina and xminb are the minimum horizontal coordinates of the first accessible object and the second accessible object respectively, ymina and yminb are the minimum vertical coordinates of the first accessible object and the second accessible object respectively, xmaxa and xmaxb are the maximum horizontal coordinates of the first accessible object and the second accessible object respectively, and ymaxa and ymaxb are the maximum vertical coordinates of the first accessible object and the second accessible object respectively.
[0233] In S160 , after the first distance calculation strategy is determined, the first distance between the first accessible object and the second accessible object can be calculated based on the first distance calculation strategy, providing a basis for subsequent grouping.
[0234] For example, refer to Figures 21 to 24, wherein Figure 21 is a schematic diagram in which the first accessible object a is located at the lower left of the second accessible object b, Figure 22 is a schematic diagram in which the first accessible object a is located at the upper left of the second accessible object b, Figure 23 is a schematic diagram in which the first accessible object a is located at the upper right of the second accessible object b, and Figure 24 is a schematic diagram in which the first accessible object a is located at the lower right of the second accessible object b.
[0235] Exemplarily, when the first accessible object a is located at the lower left of the second accessible object b, the first distance between the first accessible object a and the second accessible object b can be calculated according to Formula 1; when the first accessible object a is located at the upper left of the second accessible object b, the first distance between the first accessible object a and the second accessible object b can be calculated according to Formula 2; when the first accessible object a is located at the upper right of the second accessible object b, the first distance between the first accessible object a and the second accessible object b can be calculated according to Formula 3; when the first accessible object a is located at the lower right of the second accessible object b, the first distance between the first accessible object a and the second accessible object b can be calculated according to Formula 4.
[0236] In particular, when the first accessible object a and the second accessible object b are arranged regularly, for example, as shown in Figure 25, when the first accessible object a is located on the left side of the second accessible object b, the first distance between the first accessible object a and the second accessible object b can be calculated according to Formula 1 or Formula 2; as shown in Figure 26, when the first accessible object a is located directly below the second accessible object b, the first distance between the first accessible object a and the second accessible object b can be calculated according to Formula 1 or Formula 4; as shown in Figure 27, when the first accessible object a is located on the right side of the second accessible object b, the first distance between the first accessible object a and the second accessible object b can be calculated according to Formula 3 or Formula 4; as shown in Figure 28, when the first accessible object a is located directly above the second accessible object b, the first distance between the first accessible object a and the second accessible object b can be calculated according to Formula 2 or Formula 3.
[0237] That is, the distance calculation strategy of the embodiment of the present application is not only applicable to regularly arranged accessible objects, but also to irregularly arranged accessible objects. That is, the grouping scheme provided by the embodiment of the present application supports both regularly arranged objects and irregularly arranged objects, thus meeting the needs of more scenarios.
[0238] The embodiment of the present application can obtain the relative position relationship between any two accessible objects based on the first position information of the accessible objects, obtain the corresponding distance calculation strategy based on the relative position relationship, and automatically calculate the distance between the two accessible objects based on the distance calculation strategy, thereby improving the accuracy of the calculation results.
[0239] In some embodiments, after S130, the method for grouping accessible objects may further include the following steps:
[0240] S170: Dilate the boundaries of each group according to a preset boundary dilation strategy to obtain M first groups, where the first groups are the dilated groups.
[0241] S180: Determine a target accessible object corresponding to the touch cursor from among the accessible objects according to the distance between the accessible objects in each first group and the touch cursor.
[0242] The above steps are explained in detail below:
[0243] In S170, the boundary expansion strategy is used to expand the boundaries of each group to expand the hot zone of each accessible object. The embodiments of the present application do not limit the specific boundary expansion strategy. For example, for a group, all boundaries of the group can be expanded simultaneously, or a portion of the boundaries can be expanded first, and then the remaining boundaries can be expanded after the expansion of these boundaries stops. When the boundaries of two groups touch, the expansion of that boundary stops.
[0244] When the boundary of a group is expanded, the hot zones of each accessible object contained in the group are expanded accordingly. For example, in the case of multiple groups, each group can be expanded in turn. For example, taking group A, group B, and group C as an example, after group A performs an expansion process, group B performs an expansion process, and then group C performs an expansion process. After each group has completed the expansion process once, the second expansion process is performed in the same order until a group meets the expansion stop condition. In this way, the hot zones of each accessible object can be effectively expanded, improving the expansion effect of the hot zones.
[0245] The embodiment of the present application can automatically group the accessible objects based on the location information of each accessible object contained in the display interface and the corresponding distance calculation strategy, and expand the boundaries of each group based on the boundary expansion strategy, so that the hot zone of each accessible object is effectively expanded. In this way, the accuracy of the operation can be improved when operating the accessible objects.
[0246] In S180 , the distance between each accessible object and the touch cursor after the expansion process may be determined based on the position information of each accessible object after the expansion process and the position information of the touch cursor.
[0247] The positions of the accessible objects displayed on the display interface after the expansion process are the same as the positions of the accessible objects displayed on the display interface before the expansion process.
[0248] Illustratively, the position information of each accessible object after the expansion process may include but is not limited to the maximum horizontal coordinate, maximum vertical coordinate, minimum horizontal coordinate, minimum vertical coordinate and center position coordinate of each accessible object after the expansion process.
[0249] The touch cursor is a cursor displayed on the display interface, which is used to perform operations such as clicking and double-clicking on the target accessible object to meet different needs.
[0250] The position information of the touch cursor may be the position information of the response position of the touch cursor. In actual application, the response position of the touch cursor may be the same as or different from the display position of the touch cursor on the display interface. The response position of the touch cursor is the position where the touch cursor is associated with the accessible object to be operated. For example, when the response position of the touch cursor is associated with accessible object A, it can be considered that the touch cursor performs a certain operation on accessible object A. At this time, the display position of the touch cursor may be on accessible object A or at other positions, as long as the response position of the touch cursor is associated with accessible object A.
[0251] For the convenience of description, taking the case where the response position of the touch cursor is the same as the display position, for example, based on the position information of each accessible object after expansion processing and the position information of the touch cursor, the distance between each accessible object and the touch cursor can be determined, and the target accessible object can be selected from them. For example, the accessible object with the smallest distance from the touch cursor can be determined as the target accessible object.
[0252] The embodiment of the present application can automatically group each accessible object based on the position information of each accessible object contained in the display interface, and execute the boundary expansion strategy after grouping. Based on the distance between each accessible object and the touch coordinates after expansion, the target accessible object is determined without the need to obtain the trigger signal of the accessible object in advance. That is, the hot zone of each accessible object can be expanded before the user operates the accessible object, thereby improving the accuracy of the operation.
[0253] For example, after the target accessible object is determined, a confirmation mark can be displayed on the target accessible object to indicate that the target accessible object is currently selected. It should be noted that the confirmation mark can be displayed on the hot zone corresponding to the target accessible object before the expansion process, or directly on the target accessible object, so that the user can easily perform the next operation.
[0254] In some embodiments, the above S170 may include the following steps:
[0255] For each group, determining a boundary of the group from first position information of accessible objects contained in the group, the boundary of the group including a rectangular boundary;
[0256] According to the preset boundary expansion strategy, the boundaries of each group are expanded in the left-right direction and the up-down direction respectively;
[0257] When the preset group meets the expansion stop condition, the expansion process for the preset group is stopped, and the expansion process for the groups that do not meet the expansion stop condition is continued until all groups meet the expansion stop condition, and the group that meets the expansion stop condition is recorded as the first group, and the preset group is any group in the groups.
[0258] The boundary shape of each group can be determined according to the position of each accessible object, for example, it can be a rectangle or other shape. For the convenience of description, the embodiment of the present application takes the boundary of each group as a rectangular boundary as an example.
[0259] Exemplarily, the boundaries of each group can be determined based on the position information of each accessible object within the group. Taking the example where the first position information of each accessible object includes the maximum horizontal coordinate, maximum vertical coordinate, minimum horizontal coordinate, and minimum vertical coordinate of each accessible object, and the boundary of the group includes a first boundary and a second boundary, exemplarily, the first boundary of the group can be determined from the maximum horizontal coordinate and the minimum horizontal coordinate of each accessible object, and the second boundary of the group can be determined from the maximum vertical coordinate and the minimum vertical coordinate of each accessible object.
[0260] For example, the first boundary may be a vertical boundary, for example, when the boundary of the group is a rectangular boundary, the first boundary may be two boundaries perpendicular to the horizontal direction. The second boundary may be a horizontal boundary, for example, when the boundary of the group is a rectangular boundary, the second boundary may be two boundaries perpendicular to the vertical direction.
[0261] For example, if the group contains an accessible object, a line perpendicular to the horizontal direction can be drawn using the maximum horizontal coordinate and the minimum horizontal coordinate of the accessible object, and then a line perpendicular to the vertical direction can be drawn using the maximum vertical coordinate and the minimum vertical coordinate of the accessible object. The intersection of the lines is recorded as the corner point of the group, thereby obtaining the boundary of the group. As shown in Figure 19, the thick solid lines represent the boundaries of each group.
[0262] Exemplarily, when the group contains multiple accessible objects, the maximum value can be determined from the maximum horizontal coordinate of each accessible object, the maximum value can be determined from the minimum horizontal coordinate of each accessible object, the maximum value can be determined from the maximum vertical coordinate of each accessible object, and the maximum value can be determined from the minimum vertical coordinate of each accessible object. Then, based on the determined maximum values, the boundary of the group can be determined in such a way that the group contains one accessible object.
[0263] The embodiment of the present application determines the boundary of each group based on the location information of each accessible object in the group, providing a basis for the subsequent execution of the boundary expansion strategy, so that the hot zone of each accessible object in the group can be effectively expanded.
[0264] After the boundaries of each group are determined, the boundaries of each group can be expanded in turn according to the preset boundary expansion strategy.
[0265] Exemplarily, for each group, an expansion process may be performed on the group in the left-right direction and the up-down direction. For example, Gixmax and Giymax may be increased, and Gixmin and Giymin may be decreased. Gixmax and Giymax are the maximum horizontal coordinate and the maximum vertical coordinate of the i-th group in the first set G, respectively, and Gixmin and Giymin are the minimum horizontal coordinate and the minimum vertical coordinate of the i-th group in the first set G, respectively.
[0266] The expansion step size is negatively correlated with the size of the group. For example, the larger the group size, the smaller the expansion step size, and the smaller the group size, the larger the expansion step size. This allows each group to be effectively expanded, improving the expansion effect. The group size may include the width and height of the group.
[0267] Exemplarily, when the boundaries of the group are expanded, the expansion is performed in equal proportion, that is, the proportional relationship between the width and height of the group after the expansion is the same as the proportional relationship between the width and height of the group before the expansion.
[0268] For example, refer to Figure 29, which shows a schematic diagram of each group undergoing multiple expansions. As can be seen from Figure 29, each group can be effectively expanded. The dashed lines represent the positions of each group before expansion, the thick solid lines represent the positions of each group after expansion, and the thin solid lines represent the positions of each group during the intermediate stages. For ease of description, Figure 29 uses the example of each group undergoing two expansions. In actual applications, more expansions may be performed.
[0269] The preset group is any group among the groups. The expansion stop condition is used to determine whether to stop expanding the preset group. Exemplarily, the expansion stop condition may include, but is not limited to, stopping expansion of the two expanded groups if they touch, or stopping further expansion of the group if the expanded group touches the edge of the first interface. In other words, whether to stop expanding the corresponding group is determined by determining whether two groups touch, or whether a group touches the edge of the first interface.
[0270] Taking the three groups contained in Figure 19 as an example, for the convenience of description, the group containing accessible objects A-accessible objects C can be recorded as group 1, the group containing accessible objects D-accessible objects E can be recorded as group 2, and the group containing accessible objects H-accessible objects J can be recorded as group 3.
[0271] Exemplarily, through the dilation process, if the lower boundary of Group 1 contacts the upper boundary of Group 2, the dilation of Group 1 and Group 2 is stopped. If Group 2 and Group 3 do not contact at this time, Group 3 can continue to be dilated. If Group 3 contacts Group 2, the dilation of Group 3 is stopped. In this way, Figure 19 can be obtained. After the dilation of each group is stopped, each group after the dilation stop can be recorded as the first group.
[0272] In the embodiments of the present application, after obtaining the boundaries of each group, the boundaries of each group are dilated according to the boundary dilation strategy, so that the hot regions of the accessible objects in each group are effectively dilated. In this way, when determining the target accessible object subsequently, the accuracy of the result can be improved.
[0273] In some embodiments, it can also be determined whether to stop dilating the corresponding group based on whether there is a rectangular contact between two groups. Rectangular contact means that there is an overlapping part between two groups, and the overlapping part is rectangular.
[0274] In practical applications, whether there is a rectangular contact between two groups can be determined based on the positional relationship between the two groups. That is, the dilation stop condition can also be the condition corresponding to the coordinates of each group. For different positional relationships, the corresponding conditions are different when determining whether there is a rectangular contact between the corresponding groups.
[0275] Exemplarily, in the case where the first group is located at the lower left of the second group, the dilation stop condition can include: xmaxa > xminb and xmina < xmaxb and ymaxb > ymina and yminb < ymaxa;
[0276] In the case where the first group is located at the upper right of the second group, the dilation stop condition can include: xmaxb > xmina and xminb < xmaxa and ymaxa > yminb and ymaxb > ymina;
[0277] In the case where the first group is located at the lower right of the second group, the dilation stop condition can include: xmaxb > xmina and xminb < xmaxa and ymaxb > ymina and ymaxa > yminb;
[0278] In the case where the first group is located at the upper left of the second group, the dilation stop condition can include: xmaxa > xminb and xmina < xmaxb and ymaxa > yminb and ymaxb > ymina;
[0279] Among them, xmaxa and xmaxb are the maximum horizontal coordinates of the first group and the second group respectively, xmina and xminb are the minimum horizontal coordinates of the first group and the second group respectively, ymaxa and ymaxb are the maximum vertical coordinates of the first group and the second group respectively, ymina and yminb are the minimum vertical coordinates of the first group and the second group respectively, and the first group and the second group are the groups in the first set.
[0280] For example, when the first group is located at the lower left of the second group, if the maximum horizontal coordinate of the first group is greater than the minimum horizontal coordinate of the second group, and the minimum horizontal coordinate of the first group is smaller than the maximum horizontal coordinate of the second group, and the maximum vertical coordinate of the second group is greater than the minimum vertical coordinate of the first group, and the minimum vertical coordinate of the second group is smaller than the maximum vertical coordinate of the first group, it can be indicated that there is an overlapping part between the first group and the second group, that is, the first group and the second group meet the expansion stop condition, and the expansion of the first group and the second group needs to be stopped at this time.
[0281] The judgment process for other situations is similar and will not be described in detail here.
[0282] The embodiment of the present application sets different expansion stop conditions based on the positional relationship between the two groups, fully considers the positional relationship of each group, and improves the expansion effect.
[0283] In some embodiments, the above S180 may include the following steps:
[0284] S1801, updating the center position coordinates of each accessible object in the corresponding group before expansion processing according to the second position information of the first group, to obtain third position information of each accessible object in the first group after expansion processing;
[0285] S1802: Based on the third position information and the fourth position information of the touch cursor, obtain a first distance between each accessible object and the touch cursor after expansion;
[0286] S1803: Determine an accessible object whose first distance is less than a preset threshold as a target accessible object corresponding to the touch cursor.
[0287] The above steps are explained in detail below:
[0288] In S1801, the second position information is information of the first group in the display interface. Exemplarily, the second position information may include the minimum horizontal coordinate and the minimum vertical coordinate of the first group, as well as the width and height of the first group.
[0289] According to the second position information, the center position coordinates of each accessible object in the corresponding group before the expansion process can be updated. Exemplarily, the center position coordinates of each accessible object in the corresponding group before the expansion process can be updated in the following manner:
[0290] Wherein, (x′, y′) is the third position information of the accessible object after dilation processing, (x, y) is the center position coordinate of the corresponding accessible object before dilation processing, Gixmin and Giymin are the minimum horizontal coordinate and minimum vertical coordinate of the group before dilation processing, Gixmin′ and Giymin′ are the minimum horizontal coordinate and minimum vertical coordinate of the first group, Giw and Gih are the width and height of the group before dilation processing, and Giw′ and Gih′ are the width and height of the first group, respectively.
[0291] For example, Where xmaxj is the maximum horizontal coordinate of accessible object j, xminj is the minimum horizontal coordinate of accessible object j, ymaxj is the maximum vertical coordinate of accessible object j, and yminj is the minimum vertical coordinate of accessible object j. (x, y) and (x′, y′) are the center coordinates of the same accessible object before and after dilation, respectively.
[0292] By using the above method, the center positions of the accessible objects can be redistributed to obtain the center position coordinates of the accessible objects after expansion processing, which provides a basis for subsequently determining the distance between the accessible objects and the touch coordinates.
[0293] In S1802, exemplarily, the first distance between the accessible object and the touch cursor may be the Euclidean distance between the accessible object and the touch cursor. The Euclidean distance between the accessible object and the touch cursor may be obtained based on the center position coordinates of the accessible object and the position coordinates of the touch cursor.
[0294] For example, Among them, di is the first distance between the i-th accessible object and the touch cursor, (x0, y0) is the position coordinate of the touch cursor, that is, the fourth position information, and (xi′, yi′) is the center position coordinate of the i-th accessible object.
[0295] For example, the first distance between the accessible object and the touch cursor can also be determined based on the average of the distances between the touch coordinates and the four corner points of the accessible object. Of course, the distance between the accessible object and the touch cursor can also be determined in other ways.
[0296] In S1803, after the first distance between each accessible object and the touch cursor is determined, a target accessible object can be determined from the accessible objects based on each first distance. For example, an accessible object whose first distance is less than a preset threshold can be determined as a target accessible object. The size of the preset threshold can be set according to actual needs and is not limited in the embodiments of the present application.
[0297] The embodiment of the present application groups the accessible objects contained in the display interface and expands the boundaries of each group based on a boundary expansion strategy to expand the hot zone of each accessible object. On this basis, the position of each accessible object is redistributed, and the target accessible object is determined based on the distance between the redistributed position and the touch cursor, which effectively solves the problem of inaccurate target accessible objects due to the small hot zone of the accessible objects. In this way, when the user needs to perform an operation on the accessible objects on the display interface, the accuracy of the operation can be improved.
[0298] It should be noted that the method for grouping accessible objects provided in the embodiment of the present application can be used as an improvement to the process of grouping accessible objects when adjusting hot zones in related technologies. In some embodiments, the method for grouping accessible objects provided in the embodiment of the present application can also be combined with the method for determining accessible objects provided in the above embodiment of the present application. That is, in the method for determining accessible objects provided in the embodiment of the present application, the above S110, S610, and S1200, when displaying the first interface, group the N accessible objects contained in the first interface based on the grouping strategy. The process of obtaining the first set may include:
[0299] Get the first location information of N accessible objects, where N is a positive integer greater than 1;
[0300] Calculating a first distance between two accessible objects according to a distance calculation strategy and in combination with the first position information, wherein the distance calculation strategy is associated with a relative positional relationship between the two accessible objects, and the relative positional relationship between the two accessible objects is determined based on the first position information of the two accessible objects;
[0301] Based on the first distance, the accessible objects are grouped to obtain a first set including M groups.
[0302] The accessible objects are grouped based on the first distance to obtain a first set of M groups, including:
[0303] Set the first collection to be initially empty;
[0304] When a first distance between a first accessible object and a second accessible object is less than a preset distance threshold, if the first set is empty, the first accessible object and the second accessible object are grouped together and stored in the first set, where the first accessible object and the second accessible object are any two of the N accessible objects;
[0305] If the first set is not empty, the first accessible object and the second accessible object are grouped based on their relationship with the first set until all accessible objects are grouped, thereby obtaining a first set containing M groups.
[0306] The grouping of the first accessible object and the second accessible object based on the relationship between the first accessible object and the second accessible object and the first set includes:
[0307] If the first accessible object belongs to the kth group in the first set, store the second accessible object in the kth group; or if the second accessible object belongs to the kth group in the first set, store the first accessible object in the kth group;
[0308] In a case where neither the first accessible object nor the second accessible object belongs to the first set, the first accessible object and the second accessible object are stored in the first set as a new group.
[0309] The above-mentioned distance calculation strategy includes multiple strategies; the above-mentioned calculation of the first distance between two accessible objects based on the distance calculation strategy and the first location information includes:
[0310] Acquire a first relative position relationship between the first accessible object and the second accessible object according to first position information of the first accessible object and the second accessible object, where the first accessible object and the second accessible object are any two of the N accessible objects;
[0311] Selecting a first distance calculation strategy corresponding to the first relative position relationship from each distance calculation strategy;
[0312] Based on a first distance calculation strategy, a first distance between the first accessible object and the second accessible object is calculated.
[0313] The acquiring of the first relative position relationship between the first accessible object and the second accessible object according to the first position information of the first accessible object and the second accessible object includes:
[0314] When the maximum horizontal coordinate of the first accessible object is less than the minimum horizontal coordinate of the second accessible object, and the minimum vertical coordinate of the first accessible object is greater than the maximum vertical coordinate of the second accessible object, the first relative positional relationship between the first accessible object and the second accessible object is obtained as follows: the first accessible object is located to the lower left of the second accessible object.
[0315] When the maximum horizontal coordinate of the first accessible object is smaller than the minimum horizontal coordinate of the second accessible object, and the maximum vertical coordinate of the first accessible object is smaller than the minimum vertical coordinate of the second accessible object, the first relative positional relationship between the first accessible object and the second accessible object is obtained as follows: the first accessible object is located to the upper left of the second accessible object;
[0316] When the minimum horizontal coordinate of the first accessible object is greater than the maximum horizontal coordinate of the second accessible object, and the maximum vertical coordinate of the first accessible object is less than the minimum vertical coordinate of the second accessible object, the first relative positional relationship between the first accessible object and the second accessible object is obtained as follows: the first accessible object is located to the upper right of the second accessible object;
[0317] When the minimum horizontal coordinate of the first accessible object is greater than the maximum horizontal coordinate of the second accessible object, and the minimum vertical coordinate of the first accessible object is greater than the maximum vertical coordinate of the second accessible object, the first relative position relationship between the first accessible object and the second accessible object is: the first accessible object is located at the lower right of the second accessible object.
[0318] In the case where the first accessible object is located to the lower left of the second accessible object, the first distance calculation strategy includes:
[0319] In the case where the first accessible object is located above and to the left of the second accessible object, the first distance calculation strategy includes:
[0320] In the case where the first accessible object is located to the upper right of the second accessible object, the first distance calculation strategy includes:
[0321] In the case where the first accessible object is located to the lower right of the second accessible object, the first distance calculation strategy includes:
[0322] Among them, xmina and xminb are the minimum horizontal coordinates of the first accessible object and the second accessible object respectively, ymina and yminb are the minimum vertical coordinates of the first accessible object and the second accessible object respectively, xmaxa and xmaxb are the maximum horizontal coordinates of the first accessible object and the second accessible object respectively, and ymaxa and ymaxb are the maximum vertical coordinates of the first accessible object and the second accessible object respectively.
[0323] It should be noted that the process of the method for grouping accessible objects applied to the above-mentioned method for determining accessible objects is consistent with the process description of the relevant steps S110-S130, S410-S450, and S140-S160 in the embodiment of the method for grouping accessible objects, and will not be repeated here.
[0324] Based on the same inventive concept as the method for determining accessible objects provided in the embodiment of the present application, the embodiment of the present application also provides a device for determining accessible objects. The device for determining accessible objects provided in the embodiment of the present application is described in detail below in conjunction with Figure 30.
[0325] FIG30 is a structural diagram of a device for determining an accessible object provided by an embodiment of the present application. As shown in FIG30 , the device for determining an accessible object may include:
[0326] The grouping module 1500 is configured to, when displaying the first interface, group N accessible objects contained in the first interface based on a grouping strategy to obtain a first set, the first set including M groups, where N is a positive integer greater than 1, M is a positive integer, and the grouping strategy is associated with the first location information of each accessible object;
[0327] An expansion module 1501 is configured to expand the boundaries of each group in the first set according to a preset boundary expansion strategy to obtain M first groups, where the first groups are the expanded groups.
[0328] The determining module 1502 is configured to determine a target accessible object corresponding to the touch cursor from among the accessible objects according to the distance between each accessible object in each first group and the touch cursor.
[0329] In the embodiment of the present application, when the first interface is displayed, N accessible objects included in the first interface are grouped based on a grouping policy to obtain a first set, and the first set includes M groups; according to a preset boundary inflation policy, the boundaries of each group in the first set are respectively inflated to obtain M first groups, and the first group is the group after inflation processing; according to the distances between each accessible object in each first group and the touch cursor, a target accessible object corresponding to the touch cursor is determined from each accessible object. That is, when the first interface includes N accessible objects in the embodiment of the present application, the accessible objects can be grouped based on a grouping policy associated with the position information of each accessible object, and a boundary inflation policy is executed for each group to perform inflation processing on each group, thereby expanding the hot areas of each accessible object. In this way, when determining the target accessible object corresponding to the touch cursor, the accuracy of the target accessible object is improved.
[0330] In some embodiments, the inflation module 1501 is further configured to:
[0331] For each group in the first set, the boundary of the group is determined from the first position information of the accessible objects included in the group, and the boundary of the group includes a rectangular boundary;
[0332] According to the preset boundary inflation policy, the boundaries of each group are respectively inflated in the left - right direction and the up - down direction in sequence;
[0333] When the preset group satisfies the inflation stop condition, the inflation processing of the preset group is stopped, and the inflation processing of the group that does not satisfy the inflation stop condition is continued until all groups satisfy the inflation stop condition, and the groups that satisfy the inflation stop condition are recorded as the first groups, and the preset group is any group in the first set.
[0334] In some embodiments, the first position information includes the maximum horizontal coordinate, the maximum vertical coordinate, the minimum horizontal coordinate, and the minimum vertical coordinate of each accessible object, and the boundary of the group includes a first boundary and a second boundary;
[0335] The inflation module 1501 is further configured to:
[0336] The first boundary of the group is determined from the maximum horizontal coordinate and the minimum horizontal coordinate of each accessible object, and the second boundary of the group is determined from the maximum vertical coordinate and the minimum vertical coordinate of each accessible object.
[0337] In some embodiments, when the first group is located in the lower - left of the second group, the inflation stop condition includes: xmaxa > xminb and xmina < xmaxb and ymaxb > ymina and yminb < ymaxa;
[0338] When the first group is located in the upper right of the second group, the inflation stop condition includes: xmaxb > xmina and xminb < xmaxa and ymaxa > yminb and ymaxb > ymina;
[0339] When the first group is located in the lower right of the second group, the inflation stop condition includes: xmaxb > xmina and xminb < xmaxa and ymaxb > ymina and ymaxa > yminb;
[0340] When the first group is located in the upper left of the second group, the inflation stop condition includes: xmaxa > xminb and xmina < xmaxb and ymaxa > yminb and ymaxb > ymina;
[0341] Where, xmaxa and xmaxb are respectively the maximum horizontal coordinates of the first group and the second group, xmina and xminb are respectively the minimum horizontal coordinates of the first group and the second group, ymaxa and ymaxb are respectively the maximum vertical coordinates of the first group and the second group, ymina and yminb are respectively the minimum vertical coordinates of the first group and the second group. The first group and the second group are groups in the first set, and the coordinates of the first group and the second group are determined based on the first coordinate system. The first coordinate system takes the upper left corner of the first interface as the origin, the horizontal right direction as the positive direction of the horizontal axis, and the vertical downward direction as the positive direction of the vertical axis.
[0342] In some embodiments, the determining module 1502 is further configured to:
[0343] Update the central position coordinates of each accessible object in the corresponding group before inflation processing according to the second position information of the first group, and obtain the third position information of each accessible object in the first group after inflation processing;
[0344] Based on the third position information and the fourth position information of the touch cursor, obtain the first distance between each accessible object and the touch cursor after inflation processing;
[0345] Determine the accessible object with the first distance less than the preset threshold as the target accessible object corresponding to the touch cursor.
[0346] In some embodiments, the determining module 1502 is further configured to:
[0347] Update the central position coordinates of each accessible object in the corresponding group before inflation processing in the following manner:
[0348] Wherein, (x′, y′) is the third position information of the accessible object after dilation processing, (x, y) is the center position coordinate of the corresponding accessible object before dilation processing, Gixmin and Giymin are the minimum horizontal coordinate and minimum vertical coordinate of the group before dilation processing, Gixmin′ and Giymin′ are the minimum horizontal coordinate and minimum vertical coordinate of the first group, Giw and Gih are the width and height of the group before dilation processing, and Giw′ and Gih′ are the width and height of the first group, respectively.
[0349] In some embodiments, the object determination device may further include:
[0350] an acquisition module configured to, after the determination module 1502 determines a target accessible object corresponding to the touch cursor from each accessible object based on the distance between each accessible object in each first group and the touch cursor, acquire a corresponding offset distance from a first information table if a difference between a second distance and a third distance is less than a first threshold, wherein the second distance is the distance between the touch cursor and the target accessible object, the third distance is the distance between the touch cursor and the first accessible object, and the first accessible object is an object other than the target accessible object among the accessible objects, the first information table being used to store an association between the offset distance and the second distance and the third distance, and the offset distance being used to maintain a position of the touch cursor unchanged within a preset time period;
[0351] The replacement module is configured to replace the second distance with a difference between the second distance and the offset distance.
[0352] In some embodiments, the grouping module 1500 is further configured to:
[0353] Obtaining first location information of the N accessible objects, where N is a positive integer greater than 1;
[0354] Calculating, in combination with the first position information, a first distance between any two accessible objects according to a distance calculation strategy, wherein the distance calculation strategy is associated with a relative positional relationship between the two accessible objects, the relative positional relationship between the two accessible objects being determined based on the first position information of the two accessible objects;
[0355] Based on the first distance, the accessible objects are grouped to obtain the first set including M groups.
[0356] In some embodiments, the grouping module 1500 is further configured to:
[0357] Set the first collection to be initially empty;
[0358] When a first distance between a first accessible object and a second accessible object is less than a preset distance threshold, if the first set is empty, grouping the first accessible object and the second accessible object into a group and storing them in the first set, where the first accessible object and the second accessible object are any two of the N accessible objects;
[0359] If the first set is not empty, the first accessible object and the second accessible object are grouped based on their relationship with the first set until all the accessible objects are grouped, thereby obtaining the first set containing M groups.
[0360] In some embodiments, the grouping module 1500 is further configured to:
[0361] If the first accessible object belongs to the kth group in the first set, store the second accessible object in the kth group; or, if the second accessible object belongs to the kth group in the first set, store the first accessible object in the kth group;
[0362] In a case where neither the first accessible object nor the second accessible object belongs to the first set, the first accessible object and the second accessible object are stored in the first set as a new group.
[0363] In some embodiments, the distance calculation strategy includes multiple; the grouping module 1500 is further configured to:
[0364] Acquire, according to first position information of a first accessible object and a second accessible object, a first relative position relationship between the first accessible object and the second accessible object, where the first accessible object and the second accessible object are any two of the N accessible objects;
[0365] Selecting a first distance calculation strategy corresponding to the first relative position relationship from the distance calculation strategies;
[0366] Based on the first distance calculation strategy, a first distance between the first accessible object and the second accessible object is calculated.
[0367] In some embodiments, the grouping module 1500 is further configured to:
[0368] When the maximum horizontal coordinate of the first accessible object is smaller than the minimum horizontal coordinate of the second accessible object, and the minimum vertical coordinate of the first accessible object is larger than the maximum vertical coordinate of the second accessible object, the first relative positional relationship between the first accessible object and the second accessible object is obtained as follows: the first accessible object is located to the lower left of the second accessible object;
[0369] When the maximum horizontal coordinate of the first accessible object is smaller than the minimum horizontal coordinate of the second accessible object, and the maximum vertical coordinate of the first accessible object is smaller than the minimum vertical coordinate of the second accessible object, the first relative positional relationship between the first accessible object and the second accessible object is obtained as follows: the first accessible object is located to the upper left of the second accessible object;
[0370] When the minimum horizontal coordinate of the first accessible object is greater than the maximum horizontal coordinate of the second accessible object, and the maximum vertical coordinate of the first accessible object is less than the minimum vertical coordinate of the second accessible object, the first relative positional relationship between the first accessible object and the second accessible object is obtained as follows: the first accessible object is located to the upper right of the second accessible object;
[0371] When the minimum horizontal coordinate of the first accessible object is greater than the maximum horizontal coordinate of the second accessible object, and the minimum vertical coordinate of the first accessible object is greater than the maximum vertical coordinate of the second accessible object, the first relative position relationship between the first accessible object and the second accessible object is obtained as follows: the first accessible object is located at the lower right of the second accessible object.
[0372] In some embodiments, when the first accessible object is located to the lower left of the second accessible object, the first distance calculation strategy includes:
[0373] In the case where the first accessible object is located to the upper left of the second accessible object, the first distance calculation strategy includes:
[0374] In the case where the first accessible object is located to the upper right of the second accessible object, the first distance calculation strategy includes:
[0375] In the case where the first accessible object is located to the lower right of the second accessible object, the first distance calculation strategy includes:
[0376] Among them, xmina and xminb are the minimum horizontal coordinates of the first accessible object and the second accessible object respectively, ymina and yminb are the minimum vertical coordinates of the first accessible object and the second accessible object respectively, xmaxa and xmaxb are the maximum horizontal coordinates of the first accessible object and the second accessible object respectively, and ymaxa and ymaxb are the maximum vertical coordinates of the first accessible object and the second accessible object respectively.
[0377] Each module in the device shown in Figure 30 has the function of implementing each step in Figures 1 to 14 and can achieve the corresponding technical effects. For the sake of brevity, they will not be repeated here.
[0378] Based on the same inventive concept as the method for grouping accessible objects provided in the embodiment of the present application, the embodiment of the present application also provides a device for grouping accessible objects. The device for grouping accessible objects provided in the embodiment of the present application is described in detail below in conjunction with Figure 31.
[0379] FIG31 is a structural diagram of a device for grouping accessible objects provided in an embodiment of the present application. As shown in FIG31 , the device for grouping accessible objects may include:
[0380] An acquisition module 1600 is configured to acquire first position information of N accessible objects included in a display interface, where N is a positive integer greater than 1;
[0381] A calculation module 1601 is configured to calculate a first distance between any two accessible objects based on a distance calculation strategy and the first location information, wherein the distance calculation strategy is associated with a relative location relationship between the two accessible objects, and the relative location relationship between the two accessible objects is determined based on the first location information of the two accessible objects;
[0382] The grouping module 1602 is configured to group the accessible objects based on the first distance to obtain a grouping result.
[0383] The embodiment of the present application obtains the first position information of N accessible objects contained in the display interface, and calculates the first distance between each pair of accessible objects based on the distance calculation strategy and the first position information. The distance calculation strategy is associated with the relative position relationship of the two accessible objects, and the relative position relationship of the two accessible objects is determined based on the first position information of the two accessible objects. Based on the first distance, each accessible object is grouped to obtain a grouping result, and the grouping result is used to expand the hot zone of each accessible object. That is, the embodiment of the present application can determine the first distance between any two accessible objects based on the first position information of each accessible object and the distance calculation strategy, and automatically group each accessible object based on the first distance, without pre-setting grouping conditions for each accessible object on the display interface. In this way, the grouping process of the accessible objects is simplified and the grouping efficiency is improved.
[0384] In some embodiments, the grouping module 1602 is further configured to: set a first set, where the first set is initially empty;
[0385] When a first distance between a first accessible object and a second accessible object is less than a preset distance threshold, if the first set is empty, the first accessible object and the second accessible object are grouped together and stored in the first set, where the first accessible object and the second accessible object are any two of the N accessible objects;
[0386] If the first set is not empty, the first accessible object and the second accessible object are grouped based on their belonging relationships with the first set until all accessible objects are grouped.
[0387] In some embodiments, the grouping module 1602 is further configured to: if the first accessible object belongs to the kth group in the first set, store the second accessible object in the kth group; or if the second accessible object belongs to the kth group in the first set, store the first accessible object in the kth group;
[0388] In a case where neither the first accessible object nor the second accessible object belongs to the first set, the first accessible object and the second accessible object are stored in the first set as a new group.
[0389] In some embodiments, the distance calculation strategy includes a plurality of;
[0390] The acquisition module 1600 is further configured to acquire a first relative position relationship between the first accessible object and the second accessible object based on first position information of the first accessible object and the second accessible object, where the first accessible object and the second accessible object are any two of the N accessible objects;
[0391] The computing module 1601 is further configured to:
[0392] Based on a first distance calculation strategy, a first distance between the first accessible object and the second accessible object is calculated.
[0393] In some embodiments, the acquisition module 1600 is further configured to: when the maximum horizontal coordinate of the first accessible object is less than the minimum horizontal coordinate of the second accessible object, and the minimum vertical coordinate of the first accessible object is greater than the maximum vertical coordinate of the second accessible object, acquire a first relative position relationship between the first accessible object and the second accessible object as follows: the first accessible object is located to the lower left of the second accessible object;
[0394] When the maximum horizontal coordinate of the first accessible object is smaller than the minimum horizontal coordinate of the second accessible object, and the maximum vertical coordinate of the first accessible object is smaller than the minimum vertical coordinate of the second accessible object, the first relative positional relationship between the first accessible object and the second accessible object is obtained as follows: the first accessible object is located to the upper left of the second accessible object;
[0395] When the minimum horizontal coordinate of the first accessible object is greater than the maximum horizontal coordinate of the second accessible object, and the maximum vertical coordinate of the first accessible object is less than the minimum vertical coordinate of the second accessible object, the first relative positional relationship between the first accessible object and the second accessible object is obtained as follows: the first accessible object is located to the upper right of the second accessible object;
[0396] When the minimum horizontal coordinate of the first accessible object is greater than the maximum horizontal coordinate of the second accessible object, and the minimum vertical coordinate of the first accessible object is greater than the maximum vertical coordinate of the second accessible object, the first relative position relationship between the first accessible object and the second accessible object is: the first accessible object is located at the lower right of the second accessible object.
[0397] In some embodiments, when the first accessible object is located to the lower left of the second accessible object, the first distance calculation strategy includes:
[0398] In the case where the first accessible object is located above and to the left of the second accessible object, the first distance calculation strategy includes:
[0399] In the case where the first accessible object is located to the upper right of the second accessible object, the first distance calculation strategy includes:
[0400] In the case where the first accessible object is located to the lower right of the second accessible object, the first distance calculation strategy includes:
[0401] Among them, xmina and xminb are the minimum horizontal coordinates of the first accessible object and the second accessible object respectively, ymina and yminb are the minimum vertical coordinates of the first accessible object and the second accessible object respectively, xmaxa and xmaxb are the maximum horizontal coordinates of the first accessible object and the second accessible object respectively, and ymaxa and ymaxb are the maximum vertical coordinates of the first accessible object and the second accessible object respectively.
[0402] In some embodiments, the accessible object grouping means may further include:
[0403] an expansion module configured to expand the boundaries of each group according to a preset boundary expansion strategy to obtain M first groups, where the first group is the group after the expansion process;
[0404] The determination module is configured to determine a target accessible object corresponding to the touch cursor from among the accessible objects according to the distance between each accessible object in each first group and the touch cursor.
[0405] In some embodiments, the expansion module is further configured to:
[0406] For each group, determining a boundary of the group from first position information of accessible objects contained in the group, the boundary of the group including a rectangular boundary;
[0407] According to the preset boundary expansion strategy, the boundaries of each group are expanded in the left-right direction and the up-down direction respectively;
[0408] When the preset group meets the expansion stop condition, the expansion process for the preset group is stopped, and the expansion process for the groups that do not meet the expansion stop condition is continued until all groups meet the expansion stop condition, and the group that meets the expansion stop condition is recorded as the first group, and the preset group is any group in the groups.
[0409] In some embodiments, the determination module is further configured to:
[0410] updating the center position coordinates of each accessible object in the corresponding group before the expansion process according to the second position information of the first group, to obtain third position information of each accessible object in the first group after the expansion process;
[0411] The acquisition module 1600 is further configured to acquire, based on the third position information and the fourth position information of the touch cursor, a first distance between each accessible object and the touch cursor after the expansion process;
[0412] Determine the module and also configure it as:
[0413] An accessible object whose first distance is smaller than a preset threshold is determined as a target accessible object corresponding to the touch cursor.
[0414] In some embodiments, the determination module is further configured to:
[0415] Update the center coordinates of each accessible object in the corresponding group before the expansion process in the following way:
[0416] Wherein, (x′, y′) is the third position information of the accessible object after dilation processing, (x, y) is the center position coordinate of the corresponding accessible object before dilation processing, Gixmin and Giymin are the minimum horizontal coordinate and minimum vertical coordinate of the group before dilation processing, Gixmin′ and Giymin′ are the minimum horizontal coordinate and minimum vertical coordinate of the first group, Giw and Gih are the width and height of the group before dilation processing, and Giw′ and Gih′ are the width and height of the first group, respectively.
[0417] Each module in the device shown in Figure 31 has the function of implementing each step in Figures 15 to 29 and can achieve the corresponding technical effects. For the sake of brevity, they will not be repeated here.
[0418] Based on the same inventive concept as the method for determining accessible objects provided in the embodiment of the present application, the embodiment of the present application further provides an electronic device.
[0419] As shown in FIG. 32 , the electronic device may include a processor 1610 and a memory 1620 for storing computer program instructions.
[0420] The processor 1610 may include a central processing unit (CPU) or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
[0421] Memory 1620 may include a large capacity memory for data or instructions. By way of example and not limitation, memory 1620 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive, or a combination of two or more of these. In one example, memory 1620 may include a removable or non-removable (or fixed) medium, or memory 1620 may be a non-volatile solid-state memory. In one example, memory 1620 may be a read-only memory (ROM). In one example, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), an electrically rewritable ROM (EAROM), or a flash memory, or a combination of two or more of these.
[0422] The processor 1610 implements the method in the embodiments shown in Figures 1 to 14 by reading and executing the computer program instructions stored in the memory 1620, and achieves the corresponding technical effects achieved by executing the method in the embodiments shown in Figures 1 to 14. For the sake of brevity, they are not repeated here.
[0423] In one example, the electronic device may further include a communication interface 1630 and a bus 1640. As shown in FIG32, the processor 1610, the memory 1620, and the communication interface 1630 are connected via the bus 1640 and communicate with each other.
[0424] The communication interface 1630 is mainly used to implement communication between various modules, devices and / or equipment in the embodiments of the present application.
[0425] Bus 1640 includes hardware, software or both, and each component of electronic device is coupled together.For example, but not limitation, bus 1640 may include accelerated graphics end (Accelerated Graphics Port, AGP) or other graphics bus, enhanced industry standard architecture (Extended Industry Standard Architecture, EISA) bus, front side bus (Front Side Bus, FSB), hyper transport (Hyper Transport, HT) interconnection, industry standard architecture (Industry Standard Architecture, ISA) bus, infinite bandwidth interconnection, low pin count (LPC) bus, memory bus, micro channel architecture (MCA) bus, peripheral component interconnection (PCI) bus, PCI-Express (PCI-X) bus, serial advanced technology attachment (SATA) bus, video electronics standard association local (VLB) bus or other suitable bus or two or more of these combinations. In appropriate cases, bus 1640 may include one or more buses. Although the present application embodiment describes and shows specific bus, the application considers any suitable bus or interconnection.
[0426] When displaying the first interface, the electronic device groups the N accessible objects contained in the first interface based on the grouping strategy. After obtaining the first set, it can execute the method for determining the accessible objects in the embodiment of the present application, thereby realizing the method for determining the accessible objects described in combination with Figures 1-14 and the device for determining the accessible objects described in Figure 30.
[0427] Based on the same inventive concept as the method for grouping accessible objects provided in the embodiment of the present application, the embodiment of the present application further provides an electronic device.
[0428] As shown in FIG. 33 , the electronic device may include a processor 1710 and a memory 1720 for storing computer program instructions.
[0429] The processor 1710 may include a central processing unit (CPU) or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
[0430] Memory 1720 may include a large capacity memory for data or instructions. By way of example and not limitation, memory 1720 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive, or a combination of two or more of these. In one example, memory 1720 may include a removable or non-removable (or fixed) medium, or memory 1720 may be a non-volatile solid-state memory. In one example, memory 1720 may be a read-only memory (ROM). In one example, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), an electrically rewritable ROM (EAROM), or a flash memory, or a combination of two or more of these.
[0431] The processor 1710 implements the method in the embodiments shown in Figures 15 to 29 by reading and executing the computer program instructions stored in the memory 1720, and achieves the corresponding technical effects achieved by executing the method in the embodiments shown in Figures 15 to 29. For the sake of brevity, they are not repeated here.
[0432] In one example, the electronic device may further include a communication interface 1730 and a bus 1740. As shown in FIG33, the processor 1710, the memory 1720, and the communication interface 1730 are connected via the bus 1740 and communicate with each other.
[0433] The communication interface 1730 is mainly used to implement communication between various modules, devices and / or equipment in the embodiments of the present application.
[0434] Bus 1740 includes hardware, software or both, and each component of electronic equipment is coupled to each other.For example, but not limitation, bus 1740 may include accelerated graphics end (Accelerated Graphics Port, AGP) or other graphics bus, enhanced industry standard architecture (Extended Industry Standard Architecture, EISA) bus, front side bus (Front Side Bus, FSB), hyper transport (Hyper Transport, HT) interconnection, industry standard architecture (Industry Standard Architecture, ISA) bus, infinite bandwidth interconnection, low pin count (LPC) bus, memory bus, micro channel architecture (MCA) bus, peripheral component interconnection (PCI) bus, PCI-Express (PCI-X) bus, serial advanced technology attachment (SATA) bus, video electronics standard association local (VLB) bus or other suitable bus or two or more of these combinations. In appropriate cases, bus 1740 may include one or more buses. Although the present application embodiment describes and shows specific bus, the application considers any suitable bus or interconnection.
[0435] After obtaining the first position information of N accessible objects contained in the display interface, the electronic device can execute the accessible object grouping method in the embodiment of the present application, thereby realizing the accessible object grouping method described in combination with Figures 15-29 and the accessible object grouping device described in Figure 31.
[0436] Based on the same inventive concept, an embodiment of the present application also provides a storage medium on which a program or instruction is stored. When the program or instruction is executed by a processor, the method for determining accessible objects as described in the above embodiment or the method for grouping accessible objects as described in the above embodiment is implemented.
[0437] Based on the same inventive concept, an embodiment of the present application also provides a vehicle, which includes a device for determining accessible objects as described in the above embodiment or a device for grouping accessible objects as described in the above embodiment; or, an electronic device as described in the above embodiment; or, a storage medium as described in the above embodiment.
[0438] It should be understood that the above-mentioned specific embodiments of the present application are merely illustrative or explain the principles of the present application and do not constitute a limitation of the present application. Therefore, any modifications, equivalent substitutions, improvements, etc. made without departing from the spirit and scope of the present application should be included in the scope of protection of the present application. In addition, the claims attached hereto are intended to cover all variations and modifications that fall within the scope and boundaries of the appended claims, or the equivalent forms of such scope and boundaries.
[0439] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the above steps. In other words, the steps can be performed in the order mentioned in the embodiments, or in a different order, or several steps can be performed simultaneously.
[0440] Aspects of the present application have been described above with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present application. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer or other programmable data processing device to produce a machine so that these instructions executed via the processor of the computer or other programmable data processing device enable the implementation of the function / action specified in one or more boxes of the flowchart and / or block diagram. This processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor or a field programmable logic circuit. It is also understood that each box in the block diagram and / or the flowchart and the combination of the boxes in the block diagram and / or the flowchart can also be implemented by the dedicated hardware that performs the specified function or action, or can be implemented by the combination of dedicated hardware and computer instructions.
[0441] The above description is only a specific embodiment of the present application. Those skilled in the art will clearly understand that for the convenience and brevity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the scope of protection of the present application is not limited thereto. Any person skilled in the art can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the scope of protection of the present application. Industrial Applicability
[0442] When the first interface is displayed, the N accessible objects contained in the first interface are grouped based on the grouping strategy to obtain a first set, which contains M groups; according to the preset boundary expansion strategy, the boundaries of each group in the first set are expanded to obtain M first groups, which are the expanded groups; according to the distance between each accessible object and the touch cursor in each first group, the target accessible object corresponding to the touch cursor is determined from each accessible object. That is, when the first interface contains N accessible objects, the embodiment of the present application can group each accessible object based on the grouping strategy associated with the location information of each accessible object, and execute the boundary expansion strategy for each group, expand each group, thereby expanding the hot zone of each accessible object. In this way, when the target accessible object corresponding to the touch cursor is determined, the accuracy of the target accessible object is improved.
[0443] Moreover, based on the first position information of each accessible object and combined with the distance calculation strategy, the first distance between any two accessible objects can be determined, and the accessible objects can be automatically grouped based on the first distance. There is no need to pre-set grouping conditions for the accessible objects on each display interface. In this way, the grouping process of the accessible objects is simplified and the grouping efficiency is improved.
Claims
1. A method for determining an accessible object, comprising: When a first interface is displayed, based on a grouping policy, grouping N accessible objects included in the first interface to obtain a first set, the first set including M groups, N being a positive integer greater than 1, M being a positive integer, and the grouping policy being associated with the first position information of each of the accessible objects; According to a preset boundary dilation policy, respectively dilating the boundaries of each group in the first set to obtain M first groups, the first groups being the groups after dilation processing; According to the distances between each accessible object in each of the first groups and a touch cursor, determining a target accessible object corresponding to the touch cursor from each of the accessible objects.
2. The method according to claim 1, wherein: The step of according to a preset boundary dilation policy, respectively dilating the boundaries of each group in the first set to obtain M first groups, includes: For each group in the first set, determining the boundary of the group from the first position information of the accessible objects included in the group, the boundary of the group including a rectangular boundary; According to a preset boundary dilation policy, respectively dilating the boundaries of each group in sequence along the left - right direction and the up - down direction; When a preset group meets the dilation stop condition, stopping the dilation processing of the preset group, and continuing the dilation processing of the groups that do not meet the dilation stop condition until all groups meet the dilation stop condition, and denoting the groups that meet the dilation stop condition as first groups, the preset group being any group in the first set.
3. The method according to claim 2, wherein: The first position information includes the maximum horizontal coordinate, the maximum vertical coordinate, the minimum horizontal coordinate, and the minimum vertical coordinate of each of the accessible objects, and the boundary of the group includes a first boundary and a second boundary; The step of for each group in the first set, determining the boundary of the group from the first position information of the accessible objects included in the group, includes: Determining the first boundary of the group from the maximum horizontal coordinate and the minimum horizontal coordinate of each of the accessible objects, and determining the second boundary of the group from the maximum vertical coordinate and the minimum vertical coordinate of each of the accessible objects.
4. The method according to claim 2, wherein: When the first group is located at the lower left of the second group, the dilation stop condition includes: xmaxa > xminb and xmina < xmaxb and ymaxb > ymina and yminb < ymaxa; When the first group is located at the upper right of the second group, the dilation stop condition includes: xmaxb > xmina and xminb < xmaxa and ymaxa > yminb and ymaxb > ymina; When the first group is located at the lower right of the second group, the dilation stop condition includes: xmaxb > xmina and xminb < xmaxa and ymaxb > ymina and ymaxa > yminb; When the first group is located in the upper left of the second group, the inflation stop condition includes: xmaxa > xminb and xmina < xmaxb and ymaxa > yminb and ymaxb > ymina; Wherein, xmaxa and xmaxb are respectively the maximum horizontal coordinates of the first group and the second group, xmina and xminb are respectively the minimum horizontal coordinates of the first group and the second group, ymaxa and ymaxb are respectively the maximum vertical coordinates of the first group and the second group, ymina and yminb are respectively the minimum vertical coordinates of the first group and the second group. The first group and the second group are groups in the first set, and the coordinates of the first group and the second group are determined based on the first coordinate system. The first coordinate system takes the upper left corner of the first interface as the origin, with the horizontal direction to the right as the positive direction of the horizontal axis and the vertical direction downward as the positive direction of the vertical axis.
5. The method according to claim 1, wherein: Determining the target accessible object corresponding to the touch cursor from each of the accessible objects according to the distances between each of the accessible objects in each of the first groups and the touch cursor includes: Updating the center position coordinates of each of the accessible objects in the corresponding group before inflation processing according to the second position information of the first group, to obtain the third position information of each of the accessible objects in the first group after inflation processing; Based on the third position information and the fourth position information of the touch cursor, obtaining the first distances between each of the accessible objects after inflation processing and the touch cursor; Determining the accessible objects with the first distance less than the preset threshold as the target accessible objects corresponding to the touch cursor.
6. The method according to claim 5, wherein: Updating the center position coordinates of each of the accessible objects in the corresponding group before inflation processing according to the second position information of the first group, to obtain the third position information of each of the accessible objects in the first group after inflation processing, includes: Update the center position coordinates of each accessible object in the corresponding group before the expansion process in the following way: Wherein, (x′, y′) is the third position information of the accessible object after inflation processing, (x, y) is the center position coordinate of the corresponding accessible object before inflation processing, Gixmin and Giymin are respectively the minimum horizontal coordinate and the minimum vertical coordinate of the group before inflation processing, Gixmin′ and Giymin′ are respectively the minimum horizontal coordinate and the minimum vertical coordinate of the first group, Giw and Gih are respectively the width and height of the group before inflation processing, and Giw′ and Gih′ are respectively the width and height of the first group.
7. The method according to any one of claims 1 to 6, wherein: After determining the target accessible object corresponding to the touch cursor from each of the accessible objects according to the distances between each of the accessible objects in each of the first groups and the touch cursor, the method further includes: When the difference between the second distance and the third distance is less than the first threshold, the corresponding offset distance is obtained from the first information table, wherein the second distance is the distance between the touch cursor and the target accessible object, the third distance is the distance between the touch cursor and the first accessible object, the first accessible object is an object other than the target accessible object among the accessible objects, the first information table is used to store the association relationship between the offset distance and the second distance and the third distance, and the offset distance is used to keep the position of the touch cursor unchanged within a preset time length; The second distance is replaced by a difference between the second distance and the offset distance.
8. The method according to claim 1, wherein: The N accessible objects included in the first interface are grouped based on the grouping strategy to obtain a first set, including: Obtaining first location information of the N accessible objects, where N is a positive integer greater than 1; Calculating a first distance between two accessible objects in combination with the first position information according to a distance calculation strategy, wherein the distance calculation strategy is associated with a relative position relationship between two accessible objects, and the relative position relationship between the two accessible objects is determined based on the first position information of the two accessible objects; Based on the first distance, each of the accessible objects is grouped to obtain the first set including M groups.
9. The method according to claim 8, wherein: The grouping of the accessible objects based on the first distance to obtain the first set including M groups includes: Set the first collection to be initially empty; In the case where a first distance between a first accessible object and a second accessible object is less than a preset distance threshold, if the first set is empty, the first accessible object and the second accessible object are grouped together and stored in the first set, and the first accessible object and the second accessible object are any two of the N accessible objects; If the first set is not empty, the first accessible object and the second accessible object are grouped based on their relationship with the first set until all the accessible objects are grouped, thereby obtaining the first set containing M groups.
10. The method according to claim 9, wherein: The grouping of the first accessible object and the second accessible object based on the relationship between the first accessible object and the second accessible object and the first set includes: If the first accessible object belongs to the kth group in the first set, store the second accessible object in the kth group; or, if the second accessible object belongs to the kth group in the first set, store the first accessible object in the kth group; In a case where neither the first accessible object nor the second accessible object belongs to the first set, the first accessible object and the second accessible object are stored in the first set as a new group.
11. The method according to claim 8, wherein: The distance calculation strategy includes multiple; The calculating, according to the distance calculation strategy and in combination with the first location information, the first distance between any two accessible objects comprises: According to first position information of a first accessible object and a second accessible object, a first relative position relationship between the first accessible object and the second accessible object is acquired, where the first accessible object and the second accessible object are any two of the N accessible objects; Selecting a first distance calculation strategy corresponding to the first relative position relationship from the distance calculation strategies; Based on the first distance calculation strategy, a first distance between the first accessible object and the second accessible object is calculated.
12. The method according to claim 11, wherein: The acquiring, according to the first position information of the first accessible object and the second accessible object, a first relative position relationship between the first accessible object and the second accessible object comprises: When the maximum horizontal coordinate of the first accessible object is less than the minimum horizontal coordinate of the second accessible object, and the minimum vertical coordinate of the first accessible object is greater than the maximum vertical coordinate of the second accessible object, the first relative position relationship between the first accessible object and the second accessible object is obtained as follows: the first accessible object is located at the lower left of the second accessible object; When the maximum horizontal coordinate of the first accessible object is smaller than the minimum horizontal coordinate of the second accessible object, and the maximum vertical coordinate of the first accessible object is smaller than the minimum vertical coordinate of the second accessible object, the first relative position relationship between the first accessible object and the second accessible object is obtained as follows: the first accessible object is located at the upper left of the second accessible object; When the minimum horizontal coordinate of the first accessible object is greater than the maximum horizontal coordinate of the second accessible object, and the maximum vertical coordinate of the first accessible object is less than the minimum vertical coordinate of the second accessible object, the first relative position relationship between the first accessible object and the second accessible object is obtained as follows: the first accessible object is located to the upper right of the second accessible object; When the minimum horizontal coordinate of the first accessible object is greater than the maximum horizontal coordinate of the second accessible object, and the minimum vertical coordinate of the first accessible object is greater than the maximum vertical coordinate of the second accessible object, the first relative position relationship between the first accessible object and the second accessible object is obtained as follows: the first accessible object is located at the lower right of the second accessible object.
13. The method according to claim 11, wherein: In the case where the first accessible object is located to the lower left of the second accessible object, the first distance calculation strategy includes: In the case where the first accessible object is located to the upper left of the second accessible object, the first distance calculation strategy includes: In the case where the first accessible object is located to the upper right of the second accessible object, the first distance calculation strategy includes: In the case where the first accessible object is located to the lower right of the second accessible object, the first distance calculation strategy includes: Among them, xmina and xminb are the minimum horizontal coordinates of the first accessible object and the second accessible object respectively, ymina and yminb are the minimum vertical coordinates of the first accessible object and the second accessible object respectively, xmaxa and xmaxb are the maximum horizontal coordinates of the first accessible object and the second accessible object respectively, and ymaxa and ymaxb are the maximum vertical coordinates of the first accessible object and the second accessible object respectively.
14. A method for grouping accessible objects, comprising: Obtain first position information of N accessible objects contained in the display interface, where N is a positive integer greater than 1; According to the distance calculation strategy, in combination with the first position information, a first distance between two accessible objects is calculated, wherein the distance calculation strategy is associated with the relative position relationship of the two accessible objects. The position relationship is determined based on the first position information of the two accessible objects; Based on the first distance, the accessible objects are grouped to obtain a grouping result.
15. The method according to claim 14, wherein: The grouping of the accessible objects based on the first distance to obtain a grouping result includes: Set a first set, which is initially empty; In the case where a first distance between a first accessible object and a second accessible object is less than a preset distance threshold, if the first set is empty, the first accessible object and the second accessible object are grouped together and stored in the first set, and the first accessible object and the second accessible object are any two of the N accessible objects; If the first set is not empty, the first accessible object and the second accessible object are grouped based on the relationship between the first accessible object and the second accessible object and the first set until all the accessible objects are grouped.
16. The method according to claim 15, wherein: The grouping of the first accessible object and the second accessible object based on the relationship between the first accessible object and the second accessible object and the first set includes: If the first accessible object belongs to the kth group in the first set, store the second accessible object in the kth group; or, if the second accessible object belongs to the kth group in the first set, store the first accessible object in the kth group; In a case where neither the first accessible object nor the second accessible object belongs to the first set, the first accessible object and the second accessible object are stored in the first set as a new group.
17. The method according to claim 14, wherein: The distance calculation strategy includes multiple; The calculating, according to the distance calculation strategy and in combination with the first location information, the first distance between any two accessible objects comprises: According to first position information of a first accessible object and a second accessible object, a first relative position relationship between the first accessible object and the second accessible object is acquired, where the first accessible object and the second accessible object are any two of the N accessible objects; Selecting a first distance calculation strategy corresponding to the first relative position relationship from the distance calculation strategies; Based on the first distance calculation strategy, a first distance between the first accessible object and the second accessible object is calculated.
18. The method according to claim 17, wherein: The acquiring, according to the first position information of the first accessible object and the second accessible object, a first relative position relationship between the first accessible object and the second accessible object comprises: When the maximum horizontal coordinate of the first accessible object is less than the minimum horizontal coordinate of the second accessible object, and the minimum vertical coordinate of the first accessible object is greater than the maximum vertical coordinate of the second accessible object, the first relative position relationship between the first accessible object and the second accessible object is obtained as follows: The question object is located at the lower left of the second accessible object; When the maximum horizontal coordinate of the first accessible object is smaller than the minimum horizontal coordinate of the second accessible object, and the maximum vertical coordinate of the first accessible object is smaller than the minimum vertical coordinate of the second accessible object, the first relative position relationship between the first accessible object and the second accessible object is obtained as follows: the first accessible object is located at the upper left of the second accessible object; When the minimum horizontal coordinate of the first accessible object is greater than the maximum horizontal coordinate of the second accessible object, and the maximum vertical coordinate of the first accessible object is less than the minimum vertical coordinate of the second accessible object, the first relative position relationship between the first accessible object and the second accessible object is obtained as follows: the first accessible object is located to the upper right of the second accessible object; When the minimum horizontal coordinate of the first accessible object is greater than the maximum horizontal coordinate of the second accessible object, and the minimum vertical coordinate of the first accessible object is greater than the maximum vertical coordinate of the second accessible object, the first relative position relationship between the first accessible object and the second accessible object is obtained as follows: the first accessible object is located at the lower right of the second accessible object.
19. The method according to claim 17, wherein: In the case where the first accessible object is located to the lower left of the second accessible object, the first distance calculation strategy includes: In the case where the first accessible object is located to the upper left of the second accessible object, the first distance calculation strategy includes: In the case where the first accessible object is located to the upper right of the second accessible object, the first distance calculation strategy includes: In the case where the first accessible object is located to the lower right of the second accessible object, the first distance calculation strategy includes: Among them, xmina and xminb are the minimum horizontal coordinates of the first accessible object and the second accessible object respectively, ymina and yminb are the minimum vertical coordinates of the first accessible object and the second accessible object respectively, xmaxa and xmaxb are the maximum horizontal coordinates of the first accessible object and the second accessible object respectively, and ymaxa and ymaxb are the maximum vertical coordinates of the first accessible object and the second accessible object respectively.
20. The method according to any one of claims 14 to 19, wherein: After grouping the accessible objects based on the first distance and obtaining the grouping result, the method further includes: According to a preset boundary expansion strategy, the boundary of each group is expanded to obtain M first groups, where the first groups are the groups after the expansion process; According to the distance between each of the accessible objects in each of the first groups and the touch cursor, a target accessible object corresponding to the touch cursor is determined from among the accessible objects.
21. The method according to claim 20, wherein: According to the preset boundary expansion strategy, the boundary of each group is expanded respectively to obtain M first groups, including: For each group, determine the edge of the group from the first position information of the accessible objects contained in the group. Boundary, the boundary of the group includes a rectangular boundary; According to a preset boundary expansion strategy, the boundaries of each group are expanded in turn along the left-right direction and the up-down direction respectively; When a preset group meets the expansion stop condition, stop expanding the preset group, and continue expanding the groups that do not meet the expansion stop condition until all groups meet the expansion stop condition, and record the groups that meet the expansion stop condition as the first group, and the preset group is any group in each group.
22. The method according to claim 20, wherein: The determining, from among the accessible objects according to the distance between the accessible objects in the first groups and the touch cursor, a target accessible object corresponding to the touch cursor comprises: updating the center position coordinates of each of the accessible objects in the corresponding group before the expansion process according to the second position information of the first group, so as to obtain the third position information of each of the accessible objects in the first group after the expansion process; Based on the third position information and the fourth position information of the touch cursor, obtaining a first distance between each of the accessible objects and the touch cursor after the expansion process; An accessible object whose first distance is less than a preset threshold is determined as a target accessible object corresponding to the touch cursor.
23. The method according to claim 22, wherein: The updating of the center position coordinates of each of the accessible objects in the corresponding group before the expansion process according to the second position information of the first group to obtain the third position information of each of the accessible objects in the first group after the expansion process includes: Update the center position coordinates of each accessible object in the corresponding group before the expansion process in the following way: Among them, (x′, y′) is the third position information of the accessible object after the expansion processing, (x, y) is the center position coordinates of the corresponding accessible object before the expansion processing, Gixmin and Giymin are the minimum horizontal coordinate and the minimum vertical coordinate of the group before the expansion processing, Gixmin′ and Giymin′ are the minimum horizontal coordinate and the minimum vertical coordinate of the first group, Giw and Gih are the width and height of the group before the expansion processing, Giw′ and Gih′ are the width and height of the first group.
24. A device for determining an accessible object, the device comprising: a grouping module configured to, when displaying a first interface, group N accessible objects included in the first interface based on a grouping strategy to obtain a first set, wherein the first set includes M groups, N is a positive integer greater than 1, M is a positive integer, and the grouping strategy is associated with the first location information of each of the accessible objects; an expansion module, configured to expand the boundary of each group in the first set according to a preset boundary expansion strategy, to obtain M first groups, where the first groups are the groups after the expansion process; The determination module is configured to determine a target accessible object corresponding to the touch cursor from among the accessible objects according to the distance between the accessible objects in each of the first groups and the touch cursor.
25. A device for grouping accessible objects, comprising: An acquisition module configured to acquire first position information of N accessible objects included in the display interface, where N is a positive integer greater than 1; a calculation module configured to calculate a first distance between two accessible objects in combination with the first position information according to a distance calculation strategy, wherein the distance calculation strategy is associated with a relative position relationship between two accessible objects, and the relative position relationship between the two accessible objects is determined based on the first position information of the two accessible objects; The grouping module is configured to group the accessible objects based on the first distance to obtain a grouping result, and the grouping result is used to expand the hot zone of each accessible object.
26. An electronic device comprising: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, it implements the method according to any one of claims 1 to 13, or implements the method according to any one of claims 14 to 23.
27. A storage medium having a program or instruction stored thereon, wherein the program or instruction, when executed by a processor, implements the method according to any one of claims 1 to 13, or implements the method according to any one of claims 14 to 23.
28. A vehicle, comprising the device for determining accessible objects as claimed in claim 24 or the device for grouping accessible objects as claimed in claim 25; or, the electronic device as claimed in claim 26; or, the storage medium as claimed in claim 27.
Citation Information
Patent Citations
Hot area adjustment method and device and client
CN107943381A
Page response method in visual impairment mode, computing device and computer storage medium
CN112711372A
Display method and electronic equipment
CN115951816A
Relative Touch User Interface Enhancements
US20120242581A1