Grouping method and device for accessible objects, equipment and vehicle
By obtaining the location information and distance calculation strategy of the accessed objects in the display interface, the accessed objects are automatically grouped, which solves the problems of cumbersome and inefficient grouping process in the prior art, and realizes more efficient grouping operations.
Patent Information
- Application Number
- CN202311218847.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-20
- Publication Date
- 2025-03-21
AI Technical Summary
In the prior art, when grouping access objects in the display interface, the process is cumbersome and the operation efficiency is low.
By obtaining the first location information of the access object in the display interface, calculating the first distance between the two access objects according to the distance calculation strategy, and grouping the access objects based on these distances, simplifying the grouping process and improving efficiency.
There is no need to set grouping conditions in advance for each display interface, which simplifies the grouping process, improves grouping efficiency, and enhances the convenience of user operations.
Smart Images

Figure CN119668461A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method, device, equipment and vehicle for grouping accessible objects. Background Art
[0002] With the development of technology, electronic devices are increasingly involved in the lives of users. For example, users can perform different operations by touching various access objects displayed on the display interface of electronic devices. The operation of user access objects is actually the operation of the hot zone where the access object is located.
[0003] In some cases, the hot zone where the access object is located is small, which is inconvenient for the user to operate, thereby reducing the accuracy of the user operation. Therefore, expanding the hot zone where the access object is located is of great significance for improving the convenience of user operation.
[0004] At present, 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, and the operation efficiency is low. Summary of the invention
[0005] The embodiments of the present application provide a method, device, equipment and vehicle for grouping accessible objects, which can solve the problems of cumbersome process and low operating efficiency in the related art when grouping accessible objects contained in a display interface.
[0006] In a first aspect, an embodiment of the present application provides a method for grouping accessible objects, including:
[0007] Obtain first position information of N accessible objects contained in the display interface, where N is a positive integer greater than 1;
[0008] 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 a 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;
[0009] 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.
[0010] In a second aspect, an embodiment of the present application provides a device for grouping accessible objects, including:
[0011] An acquisition module, used to acquire first position information of N accessible objects included in the display interface, where N is a positive integer greater than 1;
[0012] A calculation module, configured to calculate 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 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;
[0013] The grouping module is used 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.
[0014] In a third 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 is implemented.
[0015] In a fourth aspect, an embodiment of the present application provides a storage medium having a program or instruction stored thereon, and when the program or instruction is executed by a processor, the method described in the first aspect is implemented.
[0016] In a fifth aspect, an embodiment of the present application provides a vehicle, the vehicle comprising a device for grouping accessible objects as described in the second aspect; or, an electronic device as described in the third aspect; or, a storage medium as described in the fourth aspect.
[0017] 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 the two accessible objects according to the distance calculation strategy in combination with the first position information, wherein 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 in combination with 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, thereby simplifying the grouping process of the accessible objects and improving the grouping efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 A flowchart of a method for grouping accessible objects provided in an embodiment of the present application;
[0019] Figure 2 A schematic diagram of an arrangement of accessible objects provided in an embodiment of the present application;
[0020] Figure 3Another schematic diagram of arrangement of accessible objects provided in an embodiment of the present application;
[0021] Figure 4 A flowchart of another method for grouping accessible objects provided in an embodiment of the present application;
[0022] Figure 5 A schematic diagram of displaying a grouping result of accessible objects provided in an embodiment of the present application;
[0023] Figure 6 A schematic diagram of displaying first position information provided in an embodiment of the present application;
[0024] Figure 7 A schematic diagram of a relative position relationship between a first accessible object a and a second accessible object b provided in an embodiment of the present application;
[0025] Figure 8 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;
[0026] Fig. 9 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;
[0027] Fig.10 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;
[0028] Fig.11 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;
[0029] Fig.12 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;
[0030] Fig.13 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;
[0031] Fig.14 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;
[0032] Fig.15 A schematic diagram of multiple expansions of each group provided in an embodiment of the present application;
[0033] Fig.16A structural diagram of a device for grouping accessible objects provided in an embodiment of the present application;
[0034] Fig.17 A structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0035] In order to more clearly understand the above-mentioned purposes, features and advantages of the present application, the scheme of the present application will be further described below. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other without conflict.
[0036] In the following description, many specific details are set forth to facilitate a full understanding of the present application, but the present application may also be implemented in other ways different from those described herein; obviously, the embodiments in the specification are only part of the embodiments of the present application, rather than all of the embodiments.
[0037] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such 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 including 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 existence of other identical elements in the process, method, article or device including the elements.
[0038] When grouping accessible objects on a display interface, the related art needs to preset grouping conditions for the accessible objects existing on the display interface, which is a cumbersome process and has low operating efficiency.
[0039] To this end, the embodiments of the present application provide a method, device, equipment and vehicle for grouping accessible objects, which can solve the problems of cumbersome process and low operating efficiency in the related art when grouping accessible objects contained in the display interface.
[0040] The following is a description of the method, device, equipment 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 functions.
[0041] Figure 1 A flowchart of a method for grouping accessible objects provided in an embodiment of the present application is shown in FIG. Figure 1As shown, the method for grouping accessible objects may include the following steps:
[0042] S110: Obtain first position information of N accessible objects included in the display interface.
[0043] Wherein, N is a positive integer greater than 1.
[0044] S120: Calculate a first distance between any two accessible objects according to a distance calculation strategy and in combination with the first location information.
[0045] 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.
[0046] S130: Group the accessible objects based on the first distance to obtain a grouping result.
[0047] 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 the two accessible objects according to the distance calculation strategy in combination with the first position information, wherein 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 in combination with 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, thereby simplifying the grouping process of the accessible objects and improving the grouping efficiency.
[0048] The above steps are described in detail below:
[0049] In S110, the display interface is the interface currently displayed by the electronic device, and the interface may include multiple accessible objects for the user to perform different operations. The accessible object is an object that the user can access, for example, an object that the user can click or touch. Exemplarily, the accessible object may be in the form of a control, a button, etc.
[0050] For example, Figure 2 As shown, each accessible object can be arranged regularly in the display interface, for example, each accessible object is arranged horizontally or vertically. Figure 2 For example, the accessible objects are arranged horizontally. Figure 3 As shown, some accessible objects may also be arranged irregularly in the display interface, for example, some accessible objects are neither arranged horizontally nor vertically. Figure 3 The accessible objects 8, 9 and 10 are shown to be 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.
[0051] 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 right axis as the horizontal axis, that is, the positive direction of the x-axis, and the vertical downward axis as the vertical axis, that is, the positive direction of the y-axis to establish a coordinate system as an example.
[0052] 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. Among them, the maximum horizontal coordinate is the horizontal coordinate corresponding to the point farthest from the y-axis in the accessible object, the minimum horizontal coordinate is the horizontal coordinate corresponding to the point closest to the y-axis in the accessible object, the maximum vertical coordinate is the vertical coordinate corresponding to the point farthest from the x-axis in the accessible object, and the minimum vertical coordinate is the vertical coordinate corresponding to the point closest to the x-axis in the accessible object.
[0053] Exemplarily, the node query device may traverse N accessible objects in the display interface to obtain the first position information of each accessible object.
[0054] In S120, the distance calculation strategy is used to calculate the distance between two accessible objects, and the distance calculation strategy is related to the relative position relationship of the two accessible objects, that is, different relative position relationships correspond to different distance calculation strategies. For example, if accessible object a is located at the lower left of accessible object b, and accessible object b is located at 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.
[0055] The relative position relationship between two accessible objects may be determined based on the first position information of the two accessible objects. The specific determination process may refer to the following embodiments.
[0056] 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, thereby providing a basis for subsequent automatic grouping.
[0057] 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.
[0058] In some embodiments, Figure 4 As shown, the method for grouping accessible objects may include the following steps:
[0059] S410: Obtain first position information of N accessible objects included in the display interface.
[0060] S420: Calculate a first distance between any two accessible objects according to a distance calculation strategy and in combination with the first location information.
[0061] S430: Set a first set, which is initially empty.
[0062] 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.
[0063] The first accessible object and the second accessible object are any two of the N accessible objects.
[0064] 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.
[0065] 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.
[0066] The other steps above are described in detail below:
[0067] In S430, the first set is used to store the grouping results. The first set is initially empty, that is, does not contain any grouping.
[0068] In S440, the first accessible object and the second accessible object are any two accessible objects among the N accessible objects.
[0069] Exemplarily, 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 (second accessible object) is determined. If the first distance is less than a preset distance threshold, the first accessible object and the second accessible object can be grouped in combination with the first set. The size of the preset distance threshold can be set as needed.
[0070] 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, and the first set is no longer empty. The grouping can be continued based on the updated first set.
[0071] In S450, if the first set is not empty, the first accessible object and the second accessible object may be grouped based on the relationship between the first accessible object and the second accessible object and the first set.
[0072] 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.
[0073] Exemplarily, in a case where 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 may be added to the first set as a new group, and if at least one of the first accessible object and the second accessible object is located in the first set, the grouping result may be further determined in combination with the group to which the first accessible object and / or the second accessible object belongs.
[0074] The embodiment of the present application realizes grouping of each accessible object by presetting the 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.
[0075] Exemplarily, when the first distance between the first accessible object and the 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 the first distance between the first accessible object and the second accessible object is greater than or equal to a preset distance threshold, the relationship between the distance between the first accessible object and the next second accessible object and the preset distance threshold may continue to be compared.
[0076] In some embodiments, the above S450 may include the following steps:
[0077] 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;
[0078] 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.
[0079] 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 can 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.
[0080] If the first accessible object and the second accessible object do not belong 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 on other accessible objects until all accessible objects are grouped.
[0081] by Figure 2 Taking the display interface shown as an example, for example, accessible object A can be used as the first accessible object, and accessible object B can be used as the second accessible object. At this time, the first distance between accessible object A and accessible object B can be compared with the preset distance threshold. If the first distance is less than the preset distance threshold, accessible object A and accessible object B can be grouped together in the initial stage. For the convenience of subsequent description, the 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.
[0082] Afterwards, one 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 object B and accessible object 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 application, the relationship between the first distance between accessible object A and accessible object C and the preset distance threshold can also be compared, and the process is similar.
[0083] 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 taken 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 taken as the first accessible object, and then one is selected from accessible objects E-accessible objects J as the second accessible object. A similar judgment process as mentioned above is performed until all accessible objects are matched.
[0084] For example, Figure 5 As shown, Figure 5 1 is the result after grouping, that is, accessible object A-accessible object C is a group, accessible object D-accessible object G is a group, and accessible object H-accessible object J is a group. The black thick solid line is the boundary of each group. The embodiment of the present application can automatically determine the boundary of each group. Figure 5 Exemplarily, the regular arrangement of the accessible objects is taken as an example. In actual application, the accessible objects may also be arranged irregularly, and the grouping process is similar.
[0085] 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 the need for user operation, thereby improving grouping efficiency.
[0086] In some embodiments, the distance calculation strategy may include multiple ones. Accordingly, the above S120 may include the following steps:
[0087] S140, acquiring 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;
[0088] S150, selecting a first distance calculation strategy corresponding to the first relative position relationship from various distance calculation strategies;
[0089] S160. Calculate a first distance between the first accessible object and the second accessible object based on a first distance calculation strategy.
[0090] The above steps are described in detail below:
[0091] In S140, the first position information includes the maximum horizontal coordinate, the minimum horizontal coordinate, the maximum vertical coordinate and the minimum vertical coordinate of the accessible object. Taking the accessible object A as an example, the maximum horizontal coordinate xmax, the minimum horizontal coordinate xmin, the maximum vertical coordinate ymax and the minimum vertical coordinate ymin of the accessible object A can be seen in Figure 6 .
[0092] Exemplarily, the above S140 may include the following steps:
[0093] 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;
[0094] When the maximum horizontal coordinate of the first accessible object is less than the minimum 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 at the upper left of the second accessible object;
[0095] 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;
[0096] 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.
[0097] 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 may also include the left side, right side, top and bottom. The judgment process of the left side, right side, 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.
[0098] 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.
[0099] In S150, after the relative position relationship between the first accessible object and the second accessible object is determined, a first distance calculation strategy corresponding to the relative position relationship can be selected from various distance calculation strategies based on the relative position relationship. Different relative position relationships can correspond to different distance calculation strategies, so that the distance between the first accessible object and the second accessible object can be determined more accurately.
[0100] Exemplarily, 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:
[0101] 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:
[0102] 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:
[0103] 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:
[0104] 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.
[0105] 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.
[0106] For example, reference Figure 7-10 ,in, Figure 7 is a schematic diagram showing that a first accessible object a is located at the lower left of a second accessible object b. Figure 8is a schematic diagram showing that a first accessible object a is located at the upper left of a second accessible object b. Fig. 9 is a schematic diagram showing that a first accessible object a is located to the upper right of a second accessible object b. Fig.10 This is a schematic diagram showing that a first accessible object a is located at the lower right of a second accessible object b.
[0107] 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.
[0108] In particular, when the first accessible object a and the second accessible object b are arranged regularly, for example Fig.11 As shown, 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; Fig.12 As shown, 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; Fig.13 As shown, 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. Fig.14 As shown, 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.
[0109] 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.
[0110] 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.
[0111] In some embodiments, after S130, the method for grouping accessible objects may further include the following steps:
[0112] S170, according to a preset boundary expansion strategy, the boundary of each group is expanded respectively to obtain M first groups, where the first group is the group after the expansion process;
[0113] 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.
[0114] The above steps are described in detail below:
[0115] 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 embodiment of the present application does not limit the specific boundary expansion strategy. For example, for a group, each boundary of the group can be expanded at the same time, or some boundaries can be selected and expanded first, and then the remaining boundaries are expanded after the expansion of these boundaries stops. Among them, when a boundary of two groups touches, the expansion of the boundary stops.
[0116] When the boundary of a certain group is expanded, the hot zones of each accessible object contained in the group are expanded accordingly. Exemplarily, 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, exemplarily, 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 an expansion process, 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 zone.
[0117] 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 in combination with the corresponding distance calculation strategy, and expand the boundary 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.
[0118] In S180, the distance between each accessible object after the expansion process and the touch cursor may be determined based on the position information of each accessible object after the expansion process and the position information of the touch cursor.
[0119] 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.
[0120] Exemplarily, 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.
[0121] 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.
[0122] 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.
[0123] For the convenience of description, taking the example that the response position and display position of the touch cursor are the same, illustratively, the distance between each accessible object and the touch cursor can be determined based on the position information of each accessible object after expansion processing and the position information of the touch cursor, and the target accessible object is selected therefrom. For example, the accessible object with the smallest distance from the touch cursor can be determined as the target accessible object.
[0124] The embodiments 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 a boundary expansion strategy after grouping, and determine the target accessible object based on the distance between each accessible object and the touch coordinates after expansion, without having to obtain a 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.
[0125] Exemplarily, 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 displayed on the target accessible object, so that it is convenient for the user to perform the next operation.
[0126] In some embodiments, the above S170 may include the following steps:
[0127] For each group, determine 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;
[0128] 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;
[0129] When 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, and the preset group is any group in the groups.
[0130] 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.
[0131] Exemplarily, the boundary of each group can be determined based on the position information of each accessible object in the group. Taking the example that the first position information of each accessible object 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 the first boundary and the 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.
[0132] For example, the first boundary may be a boundary in the vertical direction, 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 boundary in the horizontal direction, for example, when the boundary of the group is a rectangular boundary, the second boundary may be two boundaries perpendicular to the vertical direction.
[0133] For example, when the group contains an accessible object, a straight line perpendicular to the horizontal direction can be drawn with the maximum horizontal coordinate and the minimum horizontal coordinate of the accessible object, and then a straight line perpendicular to the vertical direction can be drawn with the maximum vertical coordinate and the minimum vertical coordinate of the accessible object, and the intersection of the straight lines is recorded as the corner point of the group, thereby obtaining the boundary of the group. Figure 5 As shown, the thick solid lines are the boundaries of each determined group.
[0134] 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 a manner that the group contains one accessible object.
[0135] The embodiment of the present application determines the boundary of each group based on the location information of each accessible object in each 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.
[0136] 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.
[0137] 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 reduced. Wherein, Gixmax and Giymax are respectively the maximum horizontal coordinate and the maximum vertical coordinate of the i-th group in the first set G, and Gixmin and Giymin are respectively the minimum horizontal coordinate and the minimum vertical coordinate of the i-th group in the first set G.
[0138] The expansion step is negatively correlated with the size of the group. For example, the larger the size of the group, the smaller the expansion step, and the smaller the size of the group, the larger the expansion step. In this way, each group can be effectively expanded, thereby improving the expansion effect. The size of the group may include the width and height of the group.
[0139] 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 the height of the group after the expansion is the same as the proportional relationship between the width and the height of the group before the expansion.
[0140] For example, reference Fig.15 , Fig.15 It is a schematic diagram of multiple expansions for each group. Fig.15It can be seen that each group can be effectively expanded. The dotted line is the position of each group before expansion, the thick solid line is the position of each group after expansion, and the thin solid line is the position of each group in the middle process. For the convenience of description, Fig.15 Taking the example of each group undergoing two expansions, in actual application, more expansions may be performed.
[0141] The preset group is any group among the groups. The expansion stop condition is used to determine whether to stop the expansion of the preset group. Exemplarily, the expansion stop condition may include but is not limited to stopping the expansion of the two groups if the two groups after expansion are in contact, or stopping the expansion of the group if the group after expansion is in contact with the edge of the first interface, that is, determining whether to stop the expansion of the corresponding group by determining whether the two groups are in contact or whether a group is in contact with the edge of the first interface.
[0142] by Figure 5 Taking the three groups included as an example, for the convenience of description, the group including accessible objects A-accessible objects C can be recorded as group 1, the group including accessible objects D-accessible objects E can be recorded as group 2, and the group including accessible objects H-accessible objects J can be recorded as group 3.
[0143] For example, through the expansion process, if the lower boundary of group 1 contacts the upper boundary of group 2, then stop expanding group 1 and group 2. If group 2 and group 3 do not contact at this time, then continue to expand group 3. If group 3 contacts group 2, then stop expanding group 3. In this way, Figure 5 After the expansion of each group stops, each group after the expansion stops can be recorded as the first group.
[0144] After obtaining the boundaries of each group, the embodiment of the present application expands the boundaries of each group according to the boundary expansion strategy, so that the hot areas of the accessible objects in each group are effectively expanded. In this way, the accuracy of the results can be improved when the target accessible objects are determined subsequently.
[0145] In some embodiments, whether to stop expanding the corresponding group can also be determined based on whether two groups are in rectangular contact. Rectangular contact means that the two groups have overlapping parts, and the overlapping parts are rectangular.
[0146] In practical applications, whether two groups are in rectangular contact can be determined based on the positional relationship between the two groups, that is, the expansion stop condition can also be the condition corresponding to the coordinates of each group. Different positional relationships have different corresponding conditions when determining whether the corresponding groups are in rectangular contact.
[0147] Exemplarily, when the first group is located at the lower left of the second group, the inflation stop condition may include: xmaxa > xminb and xmina < xmaxb and ymaxb > ymina and yminb < ymaxa;
[0148] When the first group is located at the upper right of the second group, the inflation stop condition may include: xmaxb > xmina and xminb < xmaxa and ymaxa > yminb and ymaxb > ymina;
[0149] When the first group is located at the lower right of the second group, the inflation stop condition may include: xmaxb > xmina and xminb < xmaxa and ymaxb > ymina and ymaxa > yminb;
[0150] When the first group is located at the upper left of the second group, the inflation stop condition may include: xmaxa > xminb and xmina < xmaxb and ymaxa > yminb and ymaxb > ymina;
[0151] 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, and 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.
[0152] 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 may 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.
[0153] The judgment process for other situations is similar and will not be described in detail here.
[0154] 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.
[0155] In some embodiments, the above S180 may include the following steps:
[0156] S1801, 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 the third position information of each accessible object in the first group after the expansion process;
[0157] S1802, based on the third position information and the fourth position information of the touch cursor, obtaining a first distance between each accessible object and the touch cursor after the expansion process;
[0158] S1803: Determine an accessible object whose first distance is less than a preset threshold as a target accessible object corresponding to the touch cursor.
[0159] The above steps are described in detail below:
[0160] 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, and the width and height of the first group.
[0161] 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:
[0162]
[0163]
[0164] Among them, (x ′ ,y ′ ) is the third position information of the accessible object after the expansion process, (x, y) is the center position coordinate of the corresponding accessible object before the expansion process, Gixmin and Giymin are the minimum horizontal coordinate and minimum vertical coordinate of the group before the expansion process, respectively. ′ 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 expansion, Giw ′ and Gih ′ They are the width and height of the first group respectively.
[0165] 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 position coordinates of the same accessible object before and after the expansion process.
[0166] By means of the above method, the center position of each accessible object can be redistributed to obtain the center position coordinates of each accessible object after expansion processing, which provides a basis for subsequently determining the distance between each accessible object and the touch coordinates.
[0167] 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, and the Euclidean distance between the accessible object and the touch cursor may be obtained according to the center position coordinates of the accessible object and the position coordinates of the touch cursor.
[0168] For example, Wherein, 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, (xi ′ ,yi ′ ) is the center position coordinate of the i-th accessible object.
[0169] Exemplarily, 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.
[0170] In S1803, after the first distance between each accessible object and the touch cursor is determined, the target accessible object can be determined from each accessible object based on each first distance. Exemplarily, 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.
[0171] The embodiment of the present application groups the accessible objects included 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, thereby effectively solving 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 of the display interface, the accuracy of the operation can be improved.
[0172] Based on the same inventive concept, the embodiment of the present application also provides a device for grouping accessible objects. Fig.16 The device for grouping accessible objects provided in an embodiment of the present application is described in detail.
[0173] Fig.16 A structural diagram of an object grouping device provided in an embodiment of the present application, such as Fig.16 As shown, the grouping device of the accessible objects may include:
[0174] The acquisition module 1600 is used to acquire first position information of N accessible objects included in the display interface, where N is a positive integer greater than 1;
[0175] A calculation module 1601 is used to calculate 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 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;
[0176] The grouping module 1602 is used to group the accessible objects based on the first distance to obtain a grouping result.
[0177] 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 the two accessible objects according to the distance calculation strategy in combination with the first position information, wherein 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 in combination with 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, thereby simplifying the grouping process of the accessible objects and improving the grouping efficiency.
[0178] In some embodiments, the grouping module 1602 is specifically configured to: set a first set, where the first set is initially empty;
[0179] In the case where 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, 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;
[0180] If the first set is not empty, the first accessible object and the second accessible object are grouped based on their belonging relationship with the first set until all accessible objects are grouped.
[0181] In some embodiments, the grouping module 1602 is specifically configured to: when the first accessible object belongs to the kth group in the first set, store the second accessible object into the kth group; or, when the second accessible object belongs to the kth group in the first set, store the first accessible object into the kth group;
[0182] 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.
[0183] In some embodiments, the distance calculation strategy includes multiple;
[0184] The acquisition module 1600 is further used to 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;
[0185] The calculation module 1601 is specifically used for:
[0186] Based on the first distance calculation strategy, a first distance between the first accessible object and the second accessible object is calculated.
[0187] In some embodiments, the acquisition module 1600 is specifically 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, the first relative position relationship between the first accessible object and the second accessible object is acquired as follows: the first accessible object is located at the lower left of the second accessible object;
[0188] When the maximum horizontal coordinate of the first accessible object is less than the minimum 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 at the upper left of the second accessible object;
[0189] 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;
[0190] 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.
[0191] 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:
[0192] 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:
[0193] 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:
[0194] 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:
[0195] 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.
[0196] In some embodiments, the accessible object grouping means may further include:
[0197] An expansion module, used 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;
[0198] The determination module is used 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 first group and the touch cursor.
[0199] In some embodiments, the expansion module is specifically configured to:
[0200] For each group, determine 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;
[0201] 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;
[0202] When 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, and the preset group is any group in the groups.
[0203] In some embodiments, the determination module is specifically configured to:
[0204] According to the second position information of the first group, the center position coordinates of each accessible object in the corresponding group before the expansion process are updated to obtain the third position information of each accessible object in the first group after the expansion process;
[0205] 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;
[0206] Determine the module, and specifically use it for:
[0207] An accessible object whose first distance is less than a preset threshold is determined as a target accessible object corresponding to the touch cursor.
[0208] In some embodiments, the determination module is specifically configured to:
[0209] Update the center position coordinates of each accessible object in the corresponding group before the expansion process in the following way:
[0210]
[0211]
[0212] Among them, (x ′ ,y ′ ) is the third position information of the accessible object after the expansion process, (x, y) is the center position coordinate of the corresponding accessible object before the expansion process, Gixmin and Giymin are the minimum horizontal coordinate and minimum vertical coordinate of the group before the expansion process, respectively. ′ 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 expansion, Giw ′ and Gih ′ They are the width and height of the first group respectively.
[0213] Fig.16Each module in the device shown has the function of realizing Figure 1-Figure 15 The functions of each step in the process can achieve the corresponding technical effects, so for the sake of brevity, they will not be described in detail here.
[0214] Based on the same inventive concept, the present application embodiment also provides an electronic device. Fig.17 The electronic device provided in the embodiments of the present application is described in detail.
[0215] like Fig.17 As shown, the electronic device may include a processor 1710 and a memory 1720 for storing computer program instructions.
[0216] 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.
[0217] The memory 1720 may include a large capacity memory for data or instructions. For example, but not limitation, the 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, the memory 1720 may include a removable or non-removable (or fixed) medium, or the memory 1720 is a non-volatile solid-state memory. In one example, the 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.
[0218] The processor 1710 reads and executes the computer program instructions stored in the memory 1720 to implement Figure 1-Figure 15 The method in the embodiment shown in the figure is achieved Figure 1-Figure 15 The corresponding technical effects achieved by executing the method in the illustrated embodiment are not described in detail here for the sake of brevity.
[0219] In one example, the electronic device may further include a communication interface 1730 and a bus 1740. Fig.17As shown, the processor 1710, the memory 1720, and the communication interface 1730 are connected via a bus 1740 and communicate with each other.
[0220] The communication interface 1730 is mainly used to implement communication between various modules, devices and / or equipment in the embodiments of the present application.
[0221] Bus 1740 includes hardware, software or both, and each component of electronic device is coupled to each other.For example, but not limitation, bus 1740 may include accelerated graphics port (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 a specific bus, the present application considers any suitable bus or interconnection.
[0222] After acquiring the first position information of the N accessible objects included in the display interface, the electronic device can execute the grouping method of the accessible objects in the embodiment of the present application, thereby realizing the combination Figure 1-Figure 15 Describes how accessible objects are grouped and Fig.16 Describes a grouping of accessible objects.
[0223] Based on the same inventive concept, an embodiment of the present application further 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 grouping accessible objects as described in the above embodiment is implemented.
[0224] Based on the same inventive concept, an embodiment of the present application further provides a vehicle, the vehicle comprising 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.
[0225] It should be understood that the above specific embodiments of the present application are only used to illustrate or explain the principles of the present application, and do not constitute a limitation to 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 protection scope of the present application. In addition, the claims attached to the present application are intended to cover all changes and modifications that fall within the scope and boundaries of the attached claims, or the equivalent forms of such scope and boundaries.
[0226] 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, that is, the steps can be performed in the order mentioned in the embodiment, or in a different order from the embodiment, or several steps can be performed simultaneously.
[0227] The above reference is according to the method of the embodiment of the present application, the flow chart of the device (system) and the computer program product and / or the block diagram described various aspects of the present application.It should be understood that each square box in the flow chart and / or the block diagram and the combination of each square box in the flow chart and / or the block diagram can be realized 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 by the processor of the computer or other programmable data processing device enable the realization of the function / action specified in one or more square boxes of the flow chart and / or the block diagram.Such a 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 can also be understood that each square box in the block diagram and / or the flow chart and the combination of the square boxes in the block diagram and / or the flow chart can also be realized by the dedicated hardware that performs the specified function or action, or can be realized by the combination of dedicated hardware and computer instructions.
[0228] The above is only a specific implementation of the present application. Those skilled in the art can clearly understand that for the convenience and simplicity 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 protection scope of the present application is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in this application, and these modifications or replacements should be included in the protection scope of this application.
Claims
1. A method for grouping accessible objects, characterized in that: include: Obtain first position information of N accessible objects contained in the display interface, 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, the accessible objects are grouped to obtain a grouping result.
2. The method according to claim 1, characterized in that 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.
3. The method according to claim 2, characterized in that 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.
4. The method according to claim 1, characterized in that 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.
5. The method according to claim 4, characterized in that 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.
6. The method according to claim 4, characterized in that 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.
7. The method according to any one of claims 1 to 6, characterized in that: 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.
8. The method according to claim 7, characterized in that 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 a boundary of the group from first position information of accessible objects contained in the group, wherein 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.
9. The method according to claim 7, characterized in that: 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.
10. The method according to claim 9, characterized in that 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 process, (x, y) is the center position coordinate of the corresponding accessible object before the expansion process, Gixmin and Giymin are the minimum horizontal coordinate and the minimum vertical coordinate of the group before the expansion process, respectively, 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 process, Giw ′ and Gih ′ are the width and height of the first group respectively.
11. A device for grouping accessible objects, characterized in that: include: An acquisition module, used 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 according to a distance calculation strategy and in combination with the first position information, 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; A grouping module is used 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.
12. An electronic device, characterized in that: include: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, the method according to any one of claims 1 to 10 is implemented.
13. A vehicle, characterized in that: The vehicle comprises the device for grouping accessible objects as claimed in claim 11; or, the electronic device as claimed in claim 12.