Method and apparatus for determining spatially self-connected binary tuples, and computer device

By partitioning the space into subspaces and determining the set of spatial self-join tuples in the spatial self-join operation, the inefficiency problem in the existing technology is solved, and more efficient data processing and resource utilization are achieved.

CN113761092BActive Publication Date: 2025-10-21JINGDONG CITY BEIJING DIGITS TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110113820.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-01-27
Publication Date
2025-10-21
Estimated Expiration
2041-01-27

AI Technical Summary

Technical Problem

Existing spatial self-connection computation methods are inefficient, wasteful of resources, and difficult to efficiently process massive spatial data.

Method used

The global domain is determined by obtaining the minimum bounding rectangle of the spatial object set, and subspaces are partitioned. Based on the positional relationship between the spatial objects and the subspaces and the coordinates of the specified points, the set of spatial self-connected tuples in each subspace is determined to avoid invalid data processing.

Benefits of technology

It improves the efficiency of spatial self-join operations, reduces resource waste, and optimizes the data processing process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113761092B_ABST
    Figure CN113761092B_ABST
Patent Text Reader

Abstract

The present disclosure provides a method, device and computer equipment for determining spatial self-connection binary tuples. The method comprises: obtaining a given spatial distance and a spatial object set, wherein the spatial object set comprises a plurality of spatial objects; determining a global domain according to a minimum bounding rectangle corresponding to the spatial object set; dividing the global domain into a plurality of subspaces; partitioning the spatial object set according to the positional relationship between each spatial object and each subspace to determine the spatial objects contained in each subspace; determining reference spatial self-connection binary tuples included in each subspace and matching the given spatial distance according to the specified point coordinates of each spatial object in each subspace and the spatial distances between the spatial objects; and determining a set of spatial self-connection binary tuples included in each subspace based on the reference spatial self-connection binary tuples included in each subspace.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a method, apparatus, and computer device for determining a spatial self-connected binary group. Background Art

[0002] With the widespread adoption of global positioning systems and mobile internet devices, massive amounts of spatial data have been generated. Distance joins on spatial data are one of the most commonly used spatial analysis operators, with a wide range of applications, such as finding points of interest within 500 meters of a subway station, assisting with company site planning, identifying roads and bridges crossed by rivers, and detecting flood risks. Optimizing spatial self-join operations is crucial. Summary of the Invention

[0003] The present disclosure aims to solve one of the technical problems in the related art at least to a certain extent.

[0004] The first embodiment of the present disclosure provides a method for determining a spatial self-connected tuple, including:

[0005] Obtaining a given spatial distance and a spatial object set, wherein the spatial object set includes a plurality of spatial objects;

[0006] determining a global domain according to a minimum bounding rectangle corresponding to the set of spatial objects;

[0007] Dividing the global domain into subspaces to obtain multiple subspaces;

[0008] Partitioning the spatial object set according to a positional relationship between each of the spatial objects and each of the subspaces to determine the spatial objects contained in each subspace;

[0009] Determining, according to the coordinates of the designated points corresponding to each of the spatial objects in each of the subspaces and the spatial distances between the spatial objects, a reference spatial self-connected tuple included in each of the subspaces that matches the given spatial distance;

[0010] Based on the reference spatial self-connected 2-tuples included in each of the subspaces, a set of spatial self-connected 2-tuples included in each of the subspaces is determined.

[0011] The second embodiment of the present disclosure provides a device for determining a spatial self-connected tuple, including:

[0012] A first acquisition module is configured to acquire a given spatial distance and a spatial object set, wherein the spatial object set includes a plurality of spatial objects;

[0013] A first determining module is configured to determine a global domain based on a minimum bounding rectangle corresponding to the set of spatial objects;

[0014] A second acquisition module is used to divide the global domain into subspaces to obtain multiple subspaces;

[0015] a second determining module, configured to partition the set of spatial objects according to a positional relationship between each of the spatial objects and each of the subspaces, so as to determine the spatial objects contained in each subspace;

[0016] a third determining module, configured to determine, based on the coordinates of the designated points corresponding to each of the spatial objects in each of the subspaces and the spatial distances between the spatial objects, a reference spatial self-connected tuple included in each of the subspaces that matches the given spatial distance;

[0017] The fourth determining module is configured to determine a set of spatial self-connected tuples included in each of the subspaces based on the reference spatial self-connected tuples included in each of the subspaces.

[0018] The third aspect embodiment of the present disclosure proposes a computer device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the method for determining spatial self-connected tuples proposed in the first aspect embodiment of the present disclosure is implemented.

[0019] The fourth embodiment of the present disclosure proposes a non-temporary computer-readable storage medium storing a computer program, which, when executed by a processor, implements the method for determining spatial self-connected tuples proposed in the first embodiment of the present disclosure.

[0020] The fifth embodiment of the present disclosure proposes a computer program product. When the instruction processor in the computer program product executes, the method for determining spatial self-connected tuples proposed in the first embodiment of the present disclosure is executed.

[0021] The method, apparatus, computer device, and storage medium for determining spatial self-connected tuples provided by the embodiments of the present disclosure have the following beneficial effects:

[0022] First, a given spatial distance and a set of spatial objects are obtained. Then, a global domain is determined based on the minimum bounding rectangle corresponding to the set of spatial objects. The global domain is then divided into subspaces to obtain multiple subspaces. Then, the set of spatial objects is partitioned based on the positional relationship between each spatial object and each subspace to determine the spatial objects contained in each subspace. Then, based on the coordinates of the designated points corresponding to each spatial object in each subspace and the spatial distances between each spatial object, a reference spatial self-connected tuple matching the given spatial distance included in each subspace is determined. Based on the reference spatial self-connected tuples included in each subspace, a set of spatial self-connected tuples included in each subspace is determined. Thus, by determining the reference spatial self-connected tuple corresponding to each subspace based on the coordinates of the designated points corresponding to each spatial object in each subspace and the spatial distances between each spatial object, and then generating a set of spatial self-connected tuples corresponding to each subspace based on the reference spatial self-connected tuples, invalid data processing in the spatial self-connected tuple calculation process is avoided, resource waste is reduced, and data processing efficiency is improved.

[0023] Additional aspects and advantages of the present disclosure will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] The above and / or additional aspects and advantages of the present disclosure will become apparent and readily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:

[0025] Figure 1 A schematic flow chart of a method for determining a spatial self-connected tuple provided in one embodiment of the present disclosure;

[0026] Figure 2 A schematic flow chart of a method for determining a spatial self-connected tuple provided in one embodiment of the present disclosure;

[0027] Figure 3 A schematic flow chart of a method for determining a spatial self-connected tuple provided by another embodiment of the present disclosure;

[0028] Figure 4A A schematic diagram of an extended minimum boundary corresponding to a self-connected binary group in a reference space provided by an embodiment of the present disclosure;

[0029] Figure 4B A schematic diagram of a common area corresponding to a self-connected binary group in a reference space provided by an embodiment of the present disclosure;

[0030] Figure 5 A schematic diagram of the structure of a device for determining a spatial self-connected tuple provided by an embodiment of the present disclosure;

[0031] Figure 6 A schematic structural diagram of a device for determining a spatial self-connected tuple provided by another embodiment of the present disclosure;

[0032] Figure 7 A block diagram of an exemplary computer device suitable for implementing embodiments of the present disclosure is shown. DETAILED DESCRIPTION

[0033] The following describes in detail embodiments of the present disclosure, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present disclosure, and should not be construed as limiting the present disclosure.

[0034] The following describes the method, apparatus, computer device, and storage medium for determining spatial self-connected tuples according to embodiments of the present disclosure with reference to the accompanying drawings.

[0035] Figure 1 A flowchart of a method for determining a spatial self-connected tuple provided by an embodiment of the present disclosure.

[0036] The embodiment of the present disclosure is illustrated by an example in which the method for determining a spatial self-connected tuple is configured in a device for determining a spatial self-connected tuple. The device for determining a spatial self-connected tuple can be applied to any computer device so that the computer device can perform the function of determining a spatial self-connected tuple.

[0037] Among them, the computer device can be a personal computer (PC), a cloud device, a mobile device, etc., and the mobile device can be, for example, a mobile phone, a tablet computer, a personal digital assistant, a wearable device, a car-mounted device, and other hardware devices with various operating systems, touch screens and / or display screens.

[0038] like Figure 1 As shown, the method for determining the spatial self-connected tuple may include the following steps:

[0039] Step 101: Obtain a given spatial distance and a spatial object set, wherein the spatial object set includes a plurality of spatial objects.

[0040] The given spatial distance may be denoted as δ, which may be any positive number and is not limited in the present disclosure.

[0041] In addition, for the convenience of explanation, the spatial object set may be denoted as R, and the spatial object in the spatial object set R may be denoted as r.

[0042] It is understandable that a spatial object may be a point object, or a line object, or a surface object, etc., and the present disclosure does not limit this.

[0043] It should be noted that the above δ, R, r, etc. are only for illustrative purposes and cannot be used as a limitation on the spatial distance, spatial object set, spatial object, etc. given in this disclosure.

[0044] Step 102: Determine the global domain based on the minimum bounding rectangle corresponding to the spatial object set.

[0045] The Minimum Bounding Rectangle (MBR), also known as the minimum enclosing rectangle, minimum containing rectangle, or minimum enclosing rectangle, is the maximum extent of a set of two-dimensional shapes (e.g., a point, a line, or a polygon) represented by two-dimensional coordinates. This means the rectangle is bounded by the maximum, minimum, maximum, and minimum ordinates of the vertices of the given two-dimensional shape. Such a rectangle encloses the given two-dimensional shape and has sides parallel to the coordinate axes.

[0046] It can be understood that the minimum bounding rectangle R.mbr corresponding to the spatial object set R may be a minimum rectangle that is parallel to the coordinate axis and contains all spatial objects r in the spatial object set.

[0047] In addition, after the minimum bounding rectangle corresponding to the spatial object set is expanded by a corresponding value, an expanded minimum bounding rectangle (EMBR) can be obtained.

[0048] For example, the minimum bounding rectangle R.mbr of the spatial object set R is expanded by ε, and we can get R.embr(ε)= <ex min ,ey min ,ex max ,ey max >= <x min -ε,y min -ε,x max +ε,y max +ε>, where <x min ,y min ,x max ,y max > is the minimum bounding rectangle of R. In addition, ε can be any given positive number, which is not limited in this disclosure.

[0049] It is understandable that the minimum bounding rectangle corresponding to the spatial object set may be used as the global domain, or the extended minimum bounding rectangle corresponding to the spatial object set may be used as the global domain, which is not limited in the present disclosure.

[0050] Step 103: Divide the global domain into subspaces to obtain multiple subspaces.

[0051] There are many ways to divide the global domain into subspaces.

[0052] For example, the global domain may be divided into a quadtree first, thereby ensuring that the number of spatial objects in all leaf nodes is roughly the same.

[0053] Furthermore, after performing quadtree partitioning on the entire global domain, if two of the four obtained parts have a large number of spatial objects, the two parts can be further quadtree partitioned to obtain multiple subspaces.

[0054] Alternatively, the global domain may be partitioned by an octree. If three parts of the partition result have a large number of spatial objects, the octree partition may be further performed on the three parts, thereby obtaining multiple subspaces.

[0055] It should be noted that the above examples are merely illustrative and cannot be used as a limitation on obtaining multiple subspaces in the embodiments of the present disclosure.

[0056] Step 104 : partition the spatial object set according to the positional relationship between each spatial object and each subspace to determine the spatial objects contained in each subspace.

[0057] There may be multiple positional relationships between any spatial object and any subspace, such as intersection, complete overlap, or no intersection, etc., which is not limited in this disclosure.

[0058] In the disclosed embodiment, the positional relationship between each spatial object and each subspace can be determined first, and then the spatial objects belonging to the same subspace can be divided into the same subspace according to the positional relationship, so that the spatial object set can be partitioned.

[0059] For example, if spatial object r1 intersects with subspace 1, then the spatial object r1 can be divided into subspace 1. If spatial object r2 intersects with both subspace 1 and subspace 2, then the spatial object r2 can be divided into subspace 1 and subspace 2, so it can be determined that subspace 1 contains spatial objects r1 and r2, and subspace 2 contains spatial object r2.

[0060] Alternatively, the positional relationship between the minimum bounding rectangle corresponding to each spatial object and each subspace may be determined first, and then the spatial objects belonging to the same subspace may be divided into the same subspace, thereby partitioning the spatial object set.

[0061] For example, if the minimum bounding rectangle corresponding to spatial object r1 is R1.mbr and intersects with subspace 2, then the spatial object r1 can be divided into subspace 2. If the minimum bounding rectangle corresponding to spatial object r2 is R2.mbr and intersects with subspace 1, subspace 2, and subspace 3, then the spatial object r2 can be divided into subspace 1, subspace 2, and subspace 3. In this way, it can be determined that subspace 1 contains spatial object r2, subspace 2 contains spatial objects r1 and r2, and subspace 3 contains spatial object r2.

[0062] Alternatively, the positional relationship between the extended minimum bounding rectangle corresponding to each spatial object and each subspace may be determined first, and then the spatial objects belonging to the same subspace may be divided into the same subspace, thereby partitioning the spatial object set.

[0063] For example, if the extended minimum bounding rectangle corresponding to spatial object r1 is R1.embr and intersects with subspace 1, then the spatial object r1 can be divided into subspace 1. If the extended minimum bounding rectangle corresponding to spatial object r2 is R2.embr and intersects with both subspace 1 and subspace 2, then the spatial object r2 can be divided into subspace 1 and subspace 2. Thus, it can be determined that subspace 1 contains spatial objects r1 and r2, and subspace 2 contains spatial object r2.

[0064] It should be noted that the above r1, r2, R1.mbr, R2.mbr, R1.embr, R2.embr, etc. are only schematic illustrations and cannot be used as a limitation for determining the spatial objects contained in each subspace in the embodiments of the present disclosure.

[0065] Step 105 : Determine, based on the coordinates of the designated points corresponding to each spatial object in each subspace and the spatial distances between the spatial objects, the reference spatial self-connected tuples in each subspace that match the given spatial distance.

[0066] Among them, the designated point can be a special point of the spatial object itself, or it can be a designated point in the minimum bounding rectangle corresponding to the spatial object, or it can be a designated point in the extended minimum bounding rectangle corresponding to the spatial object. This disclosure does not limit this.

[0067] In addition, when the designated point is a special point of the spatial object itself, it can be the point where the spatial object's coordinates in the first direction and the second direction are both minimum, or it can be the point where the spatial object's coordinates in the first direction and the second direction are both maximum. Alternatively, it can be the point where the spatial object's coordinates in the first direction are maximum and the coordinates in the second direction are minimum, or it can be the point where the spatial object's coordinates in the first direction are minimum and the coordinates in the second direction are maximum, etc., and this disclosure does not limit this.

[0068] Alternatively, when the specified point is a specified point in the minimum bounding rectangle corresponding to the spatial object, it can be a point in the minimum bounding rectangle with the smallest coordinates in the first direction and the smallest coordinates in the second direction, or it can be a point in the minimum bounding rectangle with the largest coordinates in the first direction and the largest coordinates in the second direction. Alternatively, it can be a point in the minimum bounding rectangle with the largest coordinates in the first direction and the smallest coordinates in the second direction, or it can be a point in the minimum bounding rectangle with the smallest coordinates in the first direction and the largest coordinates in the second direction, etc. This disclosure does not limit this.

[0069] Alternatively, when the specified point is a specified point in the extended minimum bounding rectangle corresponding to the spatial object, it can be a point in the extended minimum bounding rectangle with the smallest coordinates in the first direction and the smallest coordinates in the second direction, or it can be a point in the extended minimum bounding rectangle with the largest coordinates in the first direction and the largest coordinates in the second direction. Alternatively, it can be a point in the extended minimum bounding rectangle with the largest coordinates in the first direction and the smallest coordinates in the second direction, or it can be a point in the extended minimum bounding rectangle with the smallest coordinates in the first direction and the largest coordinates in the second direction, etc. This disclosure does not limit this.

[0070] In addition, the first direction may be the x-axis direction, and correspondingly, the second direction may be the y-axis direction, or the first direction may be the y-axis direction, and correspondingly, the second direction may be the x-axis direction, etc. This disclosure does not limit this.

[0071] In the embodiment of the present disclosure, a designated point can be determined first, and then the spatial objects can be sorted according to the coordinates of the designated points corresponding to each spatial object in an ascending order or a descending order, and then the spatial distance between the spatial objects can be determined based on the sorting results.

[0072] In addition, when determining the spatial distance between various spatial objects, the minimum Euclidean distance formula may be used for calculation, or the Manhattan distance formula may be used for calculation, which is not limited in the present disclosure.

[0073] It can be understood that if the spatial distance between any group of spatial objects in any subspace is less than or equal to the δ value, it can be determined that the group of spatial objects is a reference space self-connected tuple that matches the given spatial distance.

[0074] For example, after sorting the spatial objects in subspace 1 according to the coordinates of the specified point, the spatial objects are r1, r2, and r3 in order. Then, according to the minimum Euclidean distance formula, the spatial distances between r1 and r2, r1 and r3, and r2 and r3 are determined to be L respectively. 12 , L 13 , L 23 If L 12 , L 23If both are smaller than the value of δ, it can be determined that the reference space self-connected tuples smaller than or equal to the value of δ included in subspace 1 are (r1, r2) and (r2, r3).

[0075] It should be noted that the spatial distance L between the above subspace 1 and the spatial objects r1, r2, and r3 is 12 , L 13 , L 23 The above descriptions are merely illustrative and cannot be used as limitations on the subspaces, spatial objects and their spatial distances, reference space self-connected tuples, etc. in the embodiments of the present disclosure.

[0076] Step 106 : Determine a set of spatial self-connected tuples included in each subspace based on the reference spatial self-connected tuples included in each subspace.

[0077] The reference space self-connected tuples included in different subspaces may be repeated or omitted, and this disclosure does not limit this.

[0078] For example, the same reference space self-connected tuple may be recorded in multiple subspaces. For example, if subspace 1 contains the reference space self-connected tuple (r1, r2), and subspace 2 also contains the reference space self-connected tuple (r1, r2), this may cause duplication. In this case, you can delete (r1, r2) in subspace 1 and retain (r1, r2) in subspace 2.

[0079] Alternatively, the current subspace includes the reference space self-connected binary tuple (r1, r2), and its equivalent (r2, r1) should also be a spatial self-connected binary tuple, but (r2, r1) is not included in any subspace. (r2, r1) can be used as the spatial self-connected binary tuple corresponding to the current subspace, thereby generating a set of spatial self-connected binary tuples corresponding to the current subspace.

[0080] It should be noted that the above examples are merely illustrative and cannot be used as a limitation for determining the set of spatial self-connected tuples included in any subspace in the embodiments of the present disclosure.

[0081] In an embodiment of the present disclosure, a given spatial distance and a set of spatial objects are first obtained. Then, a global domain is determined based on the minimum bounding rectangle corresponding to the set of spatial objects. The global domain is then divided into subspaces to obtain multiple subspaces. Then, the set of spatial objects is partitioned based on the positional relationship between each spatial object and each subspace to determine the spatial objects contained in each subspace. Then, based on the coordinates of the designated points corresponding to each spatial object in each subspace and the spatial distances between each spatial object, a reference spatial self-connected tuple matching the given spatial distance is determined in each subspace. Based on the reference spatial self-connected tuples included in each subspace, a set of spatial self-connected tuples included in each subspace is determined. Thus, by determining the reference spatial self-connected tuple corresponding to each subspace based on the coordinates of the designated points corresponding to each spatial object in each subspace and the spatial distances between each spatial object, and then generating a set of spatial self-connected tuples corresponding to each subspace based on the reference spatial self-connected tuples, invalid data processing in the spatial self-connected tuple calculation process is avoided, resource waste is reduced, and data processing efficiency is improved.

[0082] In the above embodiment, the reference space self-connected tuple corresponding to each subspace is first determined based on the coordinates of the designated points corresponding to each spatial object in each subspace and the spatial distances between each spatial object. Then, based on the reference space self-connected tuple, a set of spatial self-connected tuples corresponding to each subspace is generated. In one possible implementation, when the global domain is divided into multiple subspaces, the global domain can be spatially divided according to the number and position of the spatial objects in the reference space object set in the global domain to obtain multiple subspaces. Figure 2 The above process is described in detail.

[0083] like Figure 2 As shown, the method for determining the spatial self-connected tuple may include the following steps:

[0084] Step 201: Obtain a given spatial distance and a spatial object set, wherein the spatial object set includes a plurality of spatial objects.

[0085] Step 202: Determine the global domain based on the minimum bounding rectangle corresponding to the spatial object set.

[0086] Step 203: Sample some spatial objects located in the global domain from the spatial object set to obtain a reference spatial object set.

[0087] For massive spatial objects, in order to improve processing speed and efficiency, sampling can be performed before performing corresponding processing.

[0088] It should be noted that the sampling rate may be different in different usage scenarios. For example, the sampling rate may be 0.01, 0.05, 0.1, 0.2, etc. This disclosure does not limit this.

[0089] Therefore, in actual use, a suitable sampling rate can be selected for sampling according to actual conditions, so that the obtained sampled spatial object set can better represent the spatial distribution of the entire spatial object set.

[0090] Step 204 : performing quadtree partitioning on the global domain according to the number and positions of the spatial objects in the reference spatial object set in the global domain to obtain a plurality of subspaces.

[0091] There may be multiple situations when the global domain is divided into quadtrees.

[0092] For example, when the number of spatial objects in the reference spatial object set that are located in the global domain is greater than a threshold, the global domain may be divided into quadtrees to generate four first-level subspaces.

[0093] The threshold value may be a pre-set value, which may be any positive number, and is not limited in the present disclosure.

[0094] For example, the threshold is 200, and the number of spatial objects in the reference spatial object set located in the global domain is 220, which is greater than the threshold 200. The global domain can be quadtree partitioned to generate four first-level subspaces.

[0095] It should be noted that the above is only an example and cannot be used as a limitation on the number of spatial objects located in the global domain, the threshold, the number of first-level subspaces, etc. in the reference spatial object set in the embodiments of the present disclosure.

[0096] Furthermore, when the number of spatial objects in the reference spatial object set contained in the four first-level subspaces is less than or equal to a threshold, the four first-level subspaces may be determined to be a plurality of subspaces corresponding to the reference spatial object set.

[0097] For example, the threshold is 100, and the number of spatial objects in the reference space object set located in the global domain is 220, which is greater than the threshold 100. The global domain can be divided into a quadtree, and the number of spatial objects in the reference space object set contained in the generated four first-level subspaces is 20, 50, 70, and 80, respectively, which are all less than the threshold. In this case, the quadtree division can be stopped, and the four first-level subspaces can be determined as the subspaces corresponding to the reference space object set.

[0098] It should be noted that the above is only an example and cannot be used as a limitation on the number, threshold, subspace, etc. of spatial objects in the reference spatial object set contained in the first-level subspace in the embodiment of the present disclosure.

[0099] Alternatively, in a possible implementation, when the number of spatial objects in the reference spatial object set contained in any first-level subspace is greater than a threshold, any first-level subspace may be quadtree-partitioned to generate four second-level subspaces.

[0100] For example, the threshold is 100, and the number of spatial objects in the reference spatial object set located in the global domain is 220, which is greater than the threshold 100. The global domain can be quadtree divided, and the numbers of spatial objects in the first reference spatial object set contained in the four generated first-level subspaces are 150, 20, 10, and 40 respectively. Among them, 150 is greater than the threshold, so the first-level subspace corresponding to the number of spatial objects 150 can continue to be quadtree divided, thereby generating four second-level subspaces.

[0101] It should be noted that the above is only an example and cannot be used as a limitation on the number of spatial objects in the reference spatial object set contained in the first-level subspace, the threshold, the first-level subspace, the second-level subspace, etc. in the embodiment of the present disclosure.

[0102] Afterwards, when the number of spatial objects in the reference spatial object set contained in the four secondary subspaces is less than or equal to a threshold, the four secondary subspaces and each first-level subspace whose number of spatial objects in the reference spatial object set is less than or equal to the threshold are determined to be multiple subspaces.

[0103] For example, the threshold is 100, and the number of spatial objects in the reference space object set located in the global domain is 220, which is greater than the threshold 100, and the global domain can be quadtree divided. The four generated first-level subspaces can be recorded as first-level subspace 1, first-level subspace 2, first-level subspace 3, and first-level subspace 4, and the number of spatial objects in the reference space object set contained in each first-level subspace is 150, 20, 10, and 40, respectively. Among them, 150 is greater than the threshold, and the first-level subspace 1 can be further quadtree divided to generate four second-level subspaces. The number of spatial objects in the reference space object set contained in the four generated second-level subspaces may be 30, 40, 50, and 30, respectively, which are all less than the threshold. In this case, these four second-level subspaces, as well as first-level subspace 2, first-level subspace 3, and first-level subspace 4 can be determined as multiple subspaces corresponding to the reference space object set.

[0104] Correspondingly, if the number of spatial objects in the reference spatial object set contained in any secondary subspace in the generated secondary subspace is greater than the threshold, the quadtree division can be continued for any secondary subspace until the number of spatial objects contained in each generated subspace is less than or equal to the threshold.

[0105] It should be noted that the above is only an example and cannot be used as a limitation on the number of spatial objects in the first reference spatial object set contained in each level of subspace, the threshold, each level of subspace, etc. in the embodiments of the present disclosure.

[0106] Step 205: Determine the positional relationship between the minimum bounding rectangle corresponding to each spatial object and each subspace.

[0107] Step 206 : When a minimum bounding rectangle corresponding to any spatial object and any subspace have a common area, determine that any subspace contains any spatial object.

[0108] Among them, the positional relationship between the minimum bounding rectangle corresponding to any spatial object and any subspace can be various, such as non-intersecting, intersecting, completely overlapping, etc., and this disclosure does not limit this.

[0109] It can be understood that when the positional relationship between the minimum bounding rectangle corresponding to any spatial object and any subspace is a non-intersecting relationship, the spatial object and the subspace have no intersection, that is, there is no common area.

[0110] Alternatively, when the minimum bounding rectangle corresponding to any spatial object intersects with the position of any subspace, it can be determined that the minimum bounding rectangle corresponding to any spatial object and the any subspace have a common area.

[0111] Alternatively, when the minimum bounding rectangle corresponding to any spatial object completely coincides with the position of any subspace, it can be determined that the minimum bounding rectangle corresponding to any spatial object and the any subspace also have a common area.

[0112] In addition, each subspace may be numbered, and the numbering method may be arbitrary, such as numbering by numbers or letters, etc., as long as the numbering result is unique, and this disclosure does not limit this.

[0113] In addition, when a minimum bounding rectangle corresponding to any spatial object has a common area with any subspace, the number of the subspace may be assigned to the spatial object having the common area therewith.

[0114] For example, there are 4 subspaces currently divided, namely subspace 1, subspace 2, subspace 3, and subspace 4, and the spatial objects are r1, r2, and r3.

[0115] Among them, the minimum bounding rectangle R1.mbr corresponding to r1 has no intersection with subspace 1, R1.mbr has intersection with subspace 2, R1.mbr has intersection with subspace 3, and R1.mbr has no intersection with subspace 4. It can be determined that the spatial object r1 belongs to subspace 2 and subspace 3, so the subspace number can be assigned to the spatial object r1, and the spatial object r1 can have the number 2 or 3.

[0116] Afterwards, the relationship between R2.mbr corresponding to r2 and each subspace is compared in turn. If subspace 1, subspace 3 and R2.mbr have common areas, it can be determined that r2 has the numbers 1 and 3 respectively.

[0117] Afterwards, the relationship between the minimum bounding rectangle R3.mbr corresponding to r3 and each subspace is compared in turn. If subspace 2, subspace 3 and R3.mbr have common areas, it can be determined that the spatial object r3 has the numbers 2 and 3 respectively.

[0118] Therefore, when partitioning the spatial object set, spatial objects with the same number can be divided into the same subspace. It can be determined that the spatial objects contained in subspace 1 are spatial objects r2, the spatial objects contained in subspace 2 are spatial objects r1 and r3, the spatial objects contained in subspace 3 are spatial objects r1, r2 and r3, and subspace 4 does not contain any spatial objects.

[0119] It should be noted that the above-mentioned spatial objects r1, r2 and r3, minimum bounding rectangles R1.mbr, R2.mbr, R3.mbr, subspace 1, subspace 2, subspace 3, subspace 4 and various positional relationships are only schematic illustrations and cannot be used as limitations on the spatial objects, subspaces, and the positional relationships between the minimum bounding rectangles corresponding to each spatial object and each subspace, or the partitioning of multiple spatial objects in the embodiments of the present disclosure.

[0120] Step 207 : Determine the reference space self-connected tuples in each subspace that match the given spatial distance according to the coordinates of the designated points corresponding to each spatial object in each subspace and the spatial distances between the spatial objects.

[0121] Step 208 : Determine a set of spatial self-connected 2-tuples included in each subspace based on the reference spatial self-connected 2-tuples included in each subspace.

[0122] In the disclosed embodiment, a given spatial distance and a set of spatial objects are first obtained. A global domain is then determined based on the minimum bounding rectangle corresponding to the spatial object set. A portion of the spatial objects within the global domain are then sampled from the spatial object set to obtain a reference spatial object set. The global domain is then quad-divided based on the number and position of spatial objects within the reference spatial object set within the global domain to obtain multiple subspaces. The positional relationship between the minimum bounding rectangle corresponding to each spatial object and each subspace is then determined. If a minimum bounding rectangle corresponding to any spatial object shares a common area with any subspace, the subspace is determined to contain any spatial object. Based on the coordinates of the designated points corresponding to each spatial object in each subspace and the spatial distances between the spatial objects, the reference spatial self-connected tuples matching the given spatial distance are determined in each subspace, thereby determining the set of spatial self-connected tuples within each subspace. Thus, the global domain is spatially partitioned using the reference spatial object set to obtain multiple subspaces. The spatial object set is then partitioned to determine the spatial objects contained within the subspaces, ensuring that the data volume in each subspace is roughly equal, further ensuring load balancing and improving overall operational efficiency.

[0123] In the above embodiment, the global domain is quadtree-partitioned multiple times by referring to the spatial object set, and then the spatial object set is repartitioned to determine the spatial objects in each subspace, and then the set of spatial self-connected tuples included in each subspace is determined. In one possible implementation, the same spatial object may span multiple subspaces, so that different subspaces may contain the same spatial self-connected tuples, which may cause the final set of spatial self-connected tuples to contain duplicate spatial self-connected tuples. Therefore, after determining the spatial self-connected tuples contained in each subspace, the spatial self-connected tuples can be filtered so that the same spatial self-connected tuple is only recorded in one subspace to avoid duplication. The following is combined with Figure 3 The above process is described in detail.

[0124] like Figure 3 As shown, the method for determining the spatial self-connected tuple may include the following steps:

[0125] Step 301: Obtain a given spatial distance and a spatial object set, wherein the spatial object set includes a plurality of spatial objects.

[0126] Step 302: Determine the global domain based on the minimum bounding rectangle corresponding to the spatial object set.

[0127] Step 303: perform quadtree partitioning on the global domain for a specified number of times to obtain multiple subspaces.

[0128] Among them, the specified number of times can be an arbitrarily set number of times, or it can be a number of times set according to the scope and size of the global domain, or it can be a number related to the number of positions of spatial objects located in the global domain. This disclosure does not limit this.

[0129] For example, the specified number of times is 2, 4, or 7, etc. For any global domain, a specified number of quadtree partitions can be performed, thereby determining multiple subspaces based on the quadtree partition results.

[0130] Alternatively, when the currently determined global domain range is large, a larger specified number of times may be set, such as 10, 20, and the like.

[0131] Alternatively, if the spatial objects in the global domain are concentrated in a subspace in the global domain, a larger specified number can be set for the subspace.

[0132] It should be noted that the above examples are merely illustrative and cannot be used as limitations on the method and value for determining the specified number of times in the embodiments of the present disclosure.

[0133] Step 304 : partition the spatial object set according to the positional relationship between each spatial object and each subspace to determine the spatial objects contained in each subspace.

[0134] Step 305 : Determine the coordinates of the designated vertices of the extended minimum bounding rectangle corresponding to each spatial object in each subspace.

[0135] Step 306 : Sort the spatial objects in each subspace according to the coordinates of the designated vertices.

[0136] The specified vertex may be a vertex with the smallest coordinates in the first direction and the smallest coordinates in the second direction in the extended minimum bounding rectangle corresponding to the spatial object in the subspace, or a vertex with the largest coordinates in the first direction and the largest coordinates in the second direction in the extended minimum bounding rectangle. Alternatively, it may be a vertex with the largest coordinates in the first direction and the smallest coordinates in the second direction in the extended minimum bounding rectangle, or a vertex with the smallest coordinates in the first direction and the largest coordinates in the second direction in the extended minimum bounding rectangle, etc. This disclosure does not limit this.

[0137] In addition, the first direction can be the x-axis direction, and correspondingly, the second direction is the y-axis direction, or the first direction can also be the y-axis direction, and correspondingly, the second direction is the x-axis direction, etc. This disclosure does not limit this.

[0138] In addition, the coordinates of each designated vertex may be sorted in ascending order, or the coordinates of each designated vertex may be sorted in descending order, and the present disclosure does not limit this.

[0139] For example, the current subspace is subspace 1, and the specified vertex can be the vertex with the largest coordinates in the first direction and the second direction in the extended minimum bounding rectangle corresponding to the spatial object. Then, the spatial objects can be sorted in order from small to large according to the coordinates of the specified vertices of the extended minimum bounding rectangle corresponding to each spatial object in subspace 1.

[0140] It should be noted that the above examples are merely illustrative and cannot be used as limitations on specifying vertex coordinates or sorting spatial objects in any subspace in the embodiments of the present disclosure.

[0141] Step 307: traverse the sorted sequence of spatial objects. If the first extended minimum bounding rectangle corresponding to the first spatial object and the second extended minimum bounding rectangle corresponding to the second spatial object have an overlapping area in the specified direction, the first spatial object and the second spatial object are determined to be a reference space self-connected tuple.

[0142] Different spatial objects may have different sizes, so the sizes of the minimum bounding rectangles corresponding to the various spatial objects may also be different, and thus the extended minimum bounding rectangles obtained by extending the minimum bounding rectangles may also be different.

[0143] Optionally, the minimum bounding rectangle corresponding to each spatial object can be expanded to different degrees as needed, for example, by δ / 2, or by (δ / 2)+a, where a can be any value and is not limited in this disclosure.

[0144] In addition, the designated direction may be any direction such as the x-axis direction or the y-axis direction, and the present disclosure does not limit this.

[0145] For example, the current specified direction is the x-axis direction, and the first extended minimum bounding rectangle corresponding to the first spatial object r1 and the second extended minimum bounding rectangle corresponding to the second spatial object r2 have an overlapping area in the x-axis direction, then (r1, r2) can be determined as a self-connected tuple of the reference space.

[0146] It should be noted that the above-mentioned x-axis direction, r1, r2, etc. are only schematic illustrations and cannot be used as limitations on the specified directions, spatial objects, etc. in the embodiments of the present disclosure.

[0147] Step 308 : If the first extended minimum bounding rectangle and the second extended minimum bounding rectangle do not have a common area, the first spatial object and the second spatial object are removed from the reference space self-connected tuple.

[0148] It can be understood that if the first extended minimum bounding rectangle and the second extended minimum bounding rectangle are both extended minimum bounding rectangles obtained by expanding their corresponding minimum bounding rectangles by a factor less than or equal to δ / 2, and there is no common area between the first and second extended minimum bounding rectangles, this indicates that the spatial distance between them is greater than a given δ, and the spatial distance between the corresponding first and second spatial objects is also greater than the given δ. Therefore, to ensure the accuracy of the determined reference space self-connected tuple, the first and second spatial objects can be removed from the reference space self-connected tuple.

[0149] For example, the spatial object r1 corresponds to the first extended minimum bounding rectangle, and the spatial object r3 corresponds to the second extended minimum bounding rectangle. Figure 4A In the schematic diagram shown, the first extended minimum bounding rectangle corresponding to r1 and the second extended minimum bounding rectangle corresponding to r3 overlap in the x-axis direction, but there is actually no common area between the two, indicating that the spatial distance between the two is greater than the given δ, so that (r1, r3) can be removed from the self-connected tuple of the reference space.

[0150] It should be noted that the above examples are merely illustrative and cannot be used as limitations on the expansion of the minimum bounding rectangle, specified direction, etc. in the embodiments of the present disclosure.

[0151] Alternatively, in a possible implementation, if the first extended minimum bounding rectangle and the second extended minimum bounding rectangle have a common area, it is determined whether a specified vertex of the common area is in the subspace where the first spatial object is located.

[0152] The same spatial object may span multiple subspaces, so different subspaces may contain the same spatial object, and thus different subspaces may repeatedly record the same spatial self-connected tuple. For example, the first extended minimum bounding rectangle corresponding to r1 and the second extended minimum bounding rectangle corresponding to r2 have a common area that exists in both subspace 1 and subspace 2. Therefore, (r1, r2) may be recorded once in subspace 1 and once in subspace 2, which may cause data duplication.

[0153] Therefore, in order to avoid duplication, the positions of the designated vertices of the common area of ​​the first extended minimum bounding rectangle and the second extended minimum bounding rectangle can be used to ensure that the spatial self-connected tuple sets output by each subspace do not contain repeated spatial self-connected tuples.

[0154] The designated vertex may be any vertex in the common area, for example, the vertex with the smallest coordinates in the first direction and the smallest coordinates in the second direction in the common area, or the vertex with the largest coordinates in the first direction and the largest coordinates in the second direction in the common area. Alternatively, the vertex with the largest coordinates in the first direction and the smallest coordinates in the second direction in the common area, or the vertex with the smallest coordinates in the first direction and the largest coordinates in the second direction in the common area, etc., and this disclosure does not limit this.

[0155] In addition, the first direction can be the x-axis direction, and correspondingly, the second direction is the y-axis direction, or the first direction can also be the y-axis direction, and correspondingly, the second direction is the x-axis direction, etc. This disclosure does not limit this.

[0156] Specifically, if the designated vertex of the common area is not in the subspace where the first spatial object is located, the first spatial object and the second spatial object are removed from the self-connected tuple of the reference space.

[0157] Alternatively, if the designated vertex of the common area is in the subspace where the first spatial object is located, the spatial connection distance between the first spatial object and the second spatial object is determined.

[0158] For example, in Figure 4B In the diagram shown, the first extended minimum bounding rectangle corresponding to the first spatial object r1 is the left dashed rectangle R1.embr(δ / 2), and the second extended minimum bounding rectangle corresponding to the second spatial object r2 is the right rectangle R2.embr(δ / 2). The common area between the two is the diagonal area in the figure. The first spatial object r1 is in subspace 0. When the specified vertex is point B, it is not in subspace 0, so (r1, r2) can be removed from the reference binary. Alternatively, if the specified vertex is point A, it is in subspace 0, and the spatial connection distance between the first spatial object r1 and the second spatial object r2 can be determined.

[0159] It should be noted that the above examples are merely illustrative and cannot be used as limitations on the various spatial objects, extended minimum bounding rectangles, designated vertices, etc. in the embodiments of the present disclosure.

[0160] In addition, the spatial connection distance between the first spatial object and the second spatial object can be calculated using the minimum Euclidean distance formula, or the Manhattan distance formula, etc., which is not limited in this disclosure.

[0161] Furthermore, when the spatial connection distance between the first spatial object and the second spatial object is less than or equal to a given spatial distance, the first spatial object and the second spatial object are determined to be a reference spatial self-connected tuple.

[0162] Alternatively, when the spatial connection distance between the first spatial object and the second spatial object is greater than a given spatial distance, the first spatial object and the second spatial object are removed from the reference spatial self-connected tuple.

[0163] Among them, the spatial objects in the current subspace include r1, r2, and r3. Then, according to the minimum Euclidean distance formula, the spatial distances between r1 and r2, r1 and r3, and r2 and r3 are determined to be L respectively. 12 , L 13 , L 23 If L 12 , L 23 are all less than δ value, L 13 If it is greater than the δ value, then (r1, r2) (r2, r3) can be determined as the reference space self-connected tuple, and (r1, r3) is removed from the reference space self-connected tuple.

[0164] It should be noted that the above spatial objects r1, r 2、 r3, spatial distance L 12 , L 13 , L 23 The above descriptions are merely illustrative and cannot be used as limitations on the various spatial objects and their spatial distances, reference space self-connected tuples, etc. in the embodiments of the present disclosure.

[0165] Step 309: connect the space self-connected tuples (r j , r i )、(r i , r i ) and (r j , r j ) is added to any subspace to generate a set of spatial self-connected tuples included in any subspace.

[0166] It can be understood that in order to further improve the completeness of the spatial self-connected two-tuples included in any subspace, the spatial self-connected two-tuples can be expanded to generate a complete set of spatial self-connected two-tuples.

[0167] For example, if (r1, r2) is a reference spatial self-connected binary in the current subspace, then the corresponding (r2, r1) is also a spatial self-connected binary that meets the conditions. In addition, the spatial distance between the two spatial objects in the spatial self-connected binary (r1, r1) and (r2, r2) is 0, which is also less than the given δ value, that is, they are also spatial self-connected binary that meet the conditions. Therefore, (r2, r1), (r1, r1), and (r2, r2) can be added to the current subspace as spatial self-connected binary that meet the conditions, thereby generating a set of spatial self-connected binary in the current subspace.

[0168] It should be noted that the above examples are merely illustrative and cannot be used as a limitation on the generation of spatial self-connected tuple sets included in any subspace in the embodiments of the present disclosure.

[0169] The disclosed embodiment can obtain a given spatial distance and a set of spatial objects, determine a global domain based on the minimum bounding rectangle corresponding to the set of spatial objects, then perform a specified number of quadtree partitions on the global domain to obtain multiple subspaces, and then determine reference spatial self-connected tuples in each subspace of the global domain. The reference spatial self-connected tuples are further screened and verified to determine spatial self-connected tuples that meet the conditions, and the spatial self-connected tuples can be expanded to generate a complete set of spatial self-connected tuples. This improves the accuracy and completeness of the spatial self-connected tuples, avoids repeated loading and calculation of data, and greatly improves overall performance.

[0170] In order to implement the above embodiment, the present disclosure further proposes a device for determining a spatial self-connected tuple.

[0171] Figure 5 A schematic diagram of the structure of a device for determining a spatial self-connected tuple provided by an embodiment of the present disclosure.

[0172] like Figure 5 As shown, the apparatus 100 for determining spatial self-connected tuples may include: a first acquisition module 110 , a first determination module 120 , a second acquisition module 130 , a second determination module 140 , a third determination module 150 , and a fourth determination module 160 .

[0173] The first acquisition module 110 is configured to acquire a given spatial distance and a spatial object set, wherein the spatial object set includes a plurality of spatial objects.

[0174] The first determining module 120 is configured to determine a global domain according to a minimum bounding rectangle corresponding to the set of spatial objects.

[0175] The second acquisition module 130 is configured to divide the global domain into subspaces to obtain multiple subspaces.

[0176] The second determining module 140 is configured to partition the spatial object set according to a positional relationship between each spatial object and each subspace, so as to determine the spatial objects included in each subspace.

[0177] The third determination module 150 is used to determine the reference space self-connected tuple included in each subspace that matches the given spatial distance based on the coordinates of the designated points corresponding to each spatial object in each subspace and the spatial distance between each spatial object.

[0178] The fourth determining module 160 is configured to determine a set of spatial self-connected tuples included in each of the subspaces based on the reference spatial self-connected tuples included in each of the subspaces.

[0179] The above explanations of the embodiment of the method for determining a spatial self-connected binary group are also applicable to the apparatus for determining a spatial self-connected binary group in this embodiment, and will not be repeated here.

[0180] The device for determining spatial self-connected binary groups of the embodiment of the present disclosure first obtains a given spatial distance and a set of spatial objects, then determines a global domain based on the minimum bounding rectangle corresponding to the set of spatial objects, then divides the global domain into subspaces to obtain multiple subspaces, then partitions the set of spatial objects based on the positional relationship between each spatial object and each subspace to determine the spatial objects contained in each subspace, then determines a reference spatial self-connected binary group that matches the given spatial distance in each subspace based on the coordinates of the designated points corresponding to each spatial object in each subspace and the spatial distances between the spatial objects, and determines a set of spatial self-connected binary groups in each subspace based on the reference spatial self-connected binary groups included in each subspace. Thus, by determining the reference spatial self-connected binary group corresponding to each subspace based on the coordinates of the designated points corresponding to each spatial object in each subspace and the spatial distances between the spatial objects, and then generating a set of spatial self-connected binary groups corresponding to each subspace based on the reference spatial self-connected binary groups, invalid data processing in the calculation of spatial self-connected binary groups is avoided, resource waste is reduced, and data processing efficiency is improved.

[0181] Furthermore, in a possible implementation of the embodiment of the present disclosure, see Figure 6 ,exist Figure 5 Based on the embodiment shown, the second acquisition module 130 includes:

[0182] The sampling unit 1310 is configured to sample some spatial objects located in the global domain from the spatial object set to obtain a reference spatial object set;

[0183] The acquiring unit 1320 is configured to perform quadtree partitioning on the global domain according to the number and positions of the spatial objects in the reference spatial object set located in the global domain, so as to acquire the multiple subspaces.

[0184] In one possible implementation, the acquisition unit 1320 is specifically configured to perform quadtree division on the global domain to generate four first-level subspaces when the number of spatial objects in the reference spatial object set located in the global domain is greater than a threshold; and to determine that the four first-level subspaces are multiple subspaces corresponding to the reference spatial object set when the number of spatial objects in the reference spatial object set contained in the four first-level subspaces is less than or equal to the threshold.

[0185] In one possible implementation, the acquisition unit 1320 is further specifically used to: when the number of spatial objects in the reference spatial object set contained in any first-level subspace is greater than the threshold, quadtree divide the any first-level subspace to generate four second-level subspaces; when the number of spatial objects in the reference spatial object set contained in the four second-level subspaces is less than or equal to the threshold, determine the four second-level subspaces and each first-level subspace containing the number of spatial objects in the reference spatial object set less than or equal to the threshold as the multiple subspaces.

[0186] In a possible implementation, the second acquisition module 130 is specifically configured to perform quadtree partitioning on the global domain a specified number of times to obtain a plurality of subspaces.

[0187] In one possible implementation, the second determination module 140 is specifically used to determine the positional relationship between the minimum bounding rectangle corresponding to each of the spatial objects and each of the subspaces; when there is a common area between the minimum bounding rectangle corresponding to any spatial object and any subspace, it is determined that any subspace contains the any spatial object.

[0188] In one possible implementation, the third determination module 150 is specifically used to determine the coordinates of the specified vertices of the extended minimum bounding rectangle corresponding to each spatial object in each subspace; specifically used to sort the spatial objects in each subspace according to the coordinates of each of the specified vertices; and also specifically used to traverse the sorted sequence of spatial objects, and if the first extended minimum bounding rectangle corresponding to the first spatial object and the second extended minimum bounding rectangle corresponding to the second spatial object have an overlapping area in a specified direction, then the first spatial object and the second spatial object are determined to be a self-connected tuple of the reference space.

[0189] In a possible implementation, the third determination module 150 is further specifically configured to remove the first spatial object and the second spatial object from the self-connected tuple of the reference space if the first extended minimum bounding rectangle and the second extended minimum bounding rectangle do not have a common area.

[0190] In one possible implementation, the third determination module 150 is further specifically used to determine whether the specified vertex of the common area is in the subspace where the first spatial object is located if there is a common area between the first extended minimum bounding rectangle and the second extended minimum bounding rectangle; if the specified vertex of the common area is not in the subspace where the first spatial object is located, the first spatial object and the second spatial object are removed from the self-connected tuple of the reference space.

[0191] In a possible implementation, the third determination module 150 is further specifically used to determine the spatial connection distance between the first spatial object and the second spatial object if the specified vertex of the common area is in the subspace where the first spatial object is located; when the spatial connection distance between the first spatial object and the second spatial object is less than or equal to the given spatial distance, determine that the first spatial object and the second spatial object are a reference space self-connected tuple; when the spatial connection distance between the first spatial object and the second spatial object is greater than the given spatial distance, remove the first spatial object and the second spatial object from the reference space self-connected tuple.

[0192] In a possible implementation, any subspace includes a reference space self-connected tuple (r i , r j ), wherein i and j are different positive integers, the fourth determining module 160 is specifically configured to connect the space self-connected tuple (r j , r i )、(r i , r i ) and (r j , r j ) is added to any of the subspaces to generate a set of spatial self-connected tuples included in any of the subspaces.

[0193] The above explanations of the embodiment of the method for determining a spatial self-connected binary group are also applicable to the apparatus for determining a spatial self-connected binary group in this embodiment, and will not be repeated here.

[0194] The device for determining spatial self-connected binary tuples in the disclosed embodiment can obtain a given spatial distance and a spatial object set, and determine a global domain based on the minimum bounding rectangle corresponding to the spatial object set. The global domain is then partitioned using a quadtree to obtain multiple subspaces. Reference spatial self-connected binary tuples are then determined in each subspace of the global domain. The reference spatial self-connected binary tuples are further verified to determine spatial self-connected binary tuples that meet the requirements, and the spatial self-connected binary tuples are expanded to generate a complete set of spatial self-connected binary tuples. Thus, the global domain is spatially partitioned using the reference spatial object set to obtain multiple subspaces, ensuring that the data volume in each subspace is roughly equal, further ensuring load balancing and improving overall operational efficiency. Simultaneously, by screening and verifying the reference spatial self-connected binary tuples, spatial self-connected binary tuples that meet the requirements are determined, and the spatial self-connected binary tuples can be expanded to generate a complete set of spatial self-connected binary tuples. This can further improve the accuracy and completeness of the spatial self-connected binary tuples, avoid repeated data loading and repeated calculations, and greatly improve overall performance.

[0195] In order to implement the above embodiments, the present disclosure also proposes a computer device, including: a memory, a processor, and a computer program stored in the memory and runnable on the processor. When the processor executes the program, it implements the method for determining spatial self-connected tuples proposed in the above embodiments of the present disclosure.

[0196] In order to implement the above embodiments, the present disclosure further proposes a non-transitory computer-readable storage medium storing a computer program, which, when executed by a processor, implements the method for determining spatial self-connected tuples proposed in the above embodiments of the present disclosure.

[0197] In order to implement the above embodiments, the present disclosure further proposes a computer program product. When an instruction processor in the computer program product executes, the method for determining spatial self-connected tuples proposed in the above embodiments of the present disclosure is executed.

[0198] Figure 7 A block diagram of an exemplary computer device suitable for implementing embodiments of the present disclosure is shown. Figure 7 The computer device 12 shown is only an example and should not bring any limitation to the functionality and scope of use of the embodiments of the present disclosure.

[0199] like Figure 7 As shown, computer device 12 is implemented as a general-purpose computing device. Components of computer device 12 may include, but are not limited to, one or more processors or processing units 16, system memory 28, and a bus 18 that connects various system components (including system memory 28 and processing unit 16).

[0200] Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, or a local bus using any of a variety of bus architectures. Examples of such architectures include, but are not limited to, the Industry Standard Architecture (ISA) bus, the Micro Channel Architecture (MAC) bus, the Enhanced ISA bus, the Video Electronics Standards Association (VESA) local bus, and the Peripheral Component Interconnection (PCI) bus.

[0201] The computer device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the computer device 12, including volatile and non-volatile media, removable and non-removable media.

[0202] The memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. The computer device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 34 may be configured to read and write non-removable, non-volatile magnetic media ( Figure 7 Not shown, often called a "hard drive"). Although Figure 7 Although not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a Compact Disc Read Only Memory (hereinafter referred to as: CD-ROM), a Digital Video Disc Read Only Memory (hereinafter referred to as: DVD-ROM), or other optical media) may be provided. In these cases, each drive may be connected to the bus 18 via one or more data medium interfaces. The memory 28 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of the various embodiments of the present disclosure.

[0203] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in memory 28. Such program modules 42 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may include an implementation of a network environment. Program modules 42 generally implement the functions and / or methods of the embodiments described herein.

[0204] The computer device 12 can also communicate with one or more external devices 14 (e.g., a keyboard, pointing device, display 24, etc.), one or more devices that enable a user to interact with the computer device 12, and / or any device that enables the computer device 12 to communicate with one or more other computing devices (e.g., a network card, a modem, etc.). This communication can occur via an input / output (I / O) interface 22. Furthermore, the computer device 12 can communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network such as the Internet) via a network adapter 20. As shown, the network adapter 20 communicates with the other modules of the computer device 12 via a bus 18. It should be understood that, although not shown, other hardware and / or software modules can be used in conjunction with the computer device 12, including but not limited to microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0205] The processing unit 16 executes various functional applications and data processing by running programs stored in the system memory 28, such as implementing the methods mentioned in the above embodiments.

[0206] According to the technical solution of the embodiment of the present disclosure, a given spatial distance and a set of spatial objects are first obtained, and then a global domain is determined based on the minimum bounding rectangle corresponding to the set of spatial objects. The global domain is then divided into subspaces to obtain multiple subspaces. The set of spatial objects is then partitioned based on the positional relationship between each spatial object and each subspace to determine the spatial objects contained in each subspace. Then, based on the coordinates of the designated points corresponding to each spatial object in each subspace and the spatial distances between each spatial object, a reference spatial self-connected tuple matching the given spatial distance included in each subspace is determined. Based on the reference spatial self-connected tuples included in each subspace, a set of spatial self-connected tuples included in each subspace is determined. Thus, by determining the reference spatial self-connected tuple corresponding to each subspace based on the coordinates of the designated points corresponding to each spatial object in each subspace and the spatial distances between each spatial object, and then generating a set of spatial self-connected tuples corresponding to each subspace based on the reference spatial self-connected tuples, invalid data processing in the calculation of spatial self-connected tuples is avoided, resource waste is reduced, and data processing efficiency is improved.

[0207] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present disclosure. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine different embodiments or examples described in this specification and features of different embodiments or examples, unless they are mutually inconsistent.

[0208] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features being referred to. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. Throughout the present disclosure, "plurality" means at least two, such as two, three, etc., unless otherwise specifically defined.

[0209] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code comprising one or more executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of the present disclosure includes additional implementations in which functions may be performed out of the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by those skilled in the art to which the embodiments of the present disclosure belong.

[0210] The logic and / or steps represented in the flowcharts or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing the logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (e.g., a computer-based system, a system including a processor, or other system that can fetch and execute instructions from an instruction execution system, apparatus, or device). For purposes of this specification, a "computer-readable medium" can be any device that can contain, store, communicate, propagate, or transport a program for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include the following: an electrical connection with one or more wires (electronic devices), a portable computer disk cartridge (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and programmable read-only memory (EPROM or flash memory), fiber optic devices, and a portable compact disc read-only memory (CDROM). Furthermore, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing it in another suitable manner if necessary, and then storing it in a computer memory.

[0211] It should be understood that various parts of the present disclosure can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented using software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented using hardware, as in another embodiment, any one of the following technologies known in the art or a combination thereof can be used to implement: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application-specific integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0212] Those skilled in the art will understand that all or part of the steps in the method of the above embodiment can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium. When the program is executed, it includes one or a combination of the steps of the method embodiment.

[0213] In addition, the functional units in the various embodiments of the present disclosure may be integrated into a single processing module, or each unit may exist physically separately, or two or more units may be integrated into a single module. The aforementioned integrated modules may be implemented in the form of hardware or in the form of software functional modules. If the integrated modules are implemented in the form of software functional modules and sold or used as independent products, they may also be stored in a computer-readable storage medium.

[0214] The storage medium mentioned above may be a read-only memory, a magnetic disk, or an optical disk, etc. Although the embodiments of the present disclosure have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present disclosure. A person of ordinary skill in the art may make changes, modifications, substitutions, and variations to the above embodiments within the scope of the present disclosure.

Claims

1. A method for determining a spatial self-connected binary group, characterized in that: include: Obtaining a given spatial distance and a spatial object set, wherein the spatial object set includes a plurality of spatial objects; determining a global domain according to a minimum bounding rectangle corresponding to the set of spatial objects; Dividing the global domain into subspaces to obtain multiple subspaces; Partitioning the spatial object set according to a positional relationship between each of the spatial objects and each of the subspaces to determine the spatial objects contained in each subspace; Determining, based on the coordinates of the designated points corresponding to each of the spatial objects in each of the subspaces and the spatial distances between the spatial objects, a reference spatial self-connected tuple included in each of the subspaces that matches the given spatial distance, wherein if the spatial distance between any group of spatial objects in any subspace is less than or equal to the given spatial distance, then determining that the group of spatial objects is a reference spatial self-connected tuple that matches the given spatial distance; Determine a set of spatial self-connected tuples included in each of the subspaces based on the reference spatial self-connected tuples included in each of the subspaces; The step of determining, based on the coordinates of the designated points corresponding to each of the spatial objects in each of the subspaces and the spatial distances between the spatial objects, a reference spatial self-connected tuple included in each of the subspaces and matching the given spatial distances, comprises: Determine the coordinates of the specified vertices of the extended minimum bounding rectangle corresponding to each spatial object in each subspace; Sort the spatial objects in each subspace according to the coordinates of the designated vertices; The sorted sequence of spatial objects is traversed. If a first extended minimum bounding rectangle corresponding to a first spatial object and a second extended minimum bounding rectangle corresponding to a second spatial object have an overlapping area in a specified direction, the first spatial object and the second spatial object are determined to be a reference space self-connected tuple.

2. The method according to claim 1, wherein The global domain is divided into subspaces to obtain multiple subspaces, including: Sampling some spatial objects located in the global domain from the spatial object set to obtain a reference spatial object set; According to the number and positions of the spatial objects in the reference spatial object set located in the global domain, quadtree partitioning is performed on the global domain to obtain the multiple subspaces.

3. The method according to claim 2, wherein The performing quadtree partitioning on the global domain according to the number and positions of the spatial objects in the reference spatial object set located in the global domain to obtain the multiple subspaces includes: When the number of spatial objects in the reference spatial object set located in the global domain is greater than a threshold, performing quadtree partitioning on the global domain to generate four first-level subspaces; When the number of spatial objects in the reference spatial object set contained in the four first-level subspaces is less than or equal to the threshold, the four first-level subspaces are determined to be a plurality of subspaces corresponding to the reference spatial object set.

4. The method according to claim 3, wherein After generating the four first-level subspaces, the method further includes: When the number of spatial objects in the reference spatial object set contained in any first-level subspace is greater than the threshold, performing quadtree partitioning on the any first-level subspace to generate four second-level subspaces; When the number of spatial objects in the reference spatial object set contained in the four secondary subspaces is less than or equal to the threshold, the four secondary subspaces and each first-level subspace in which the number of spatial objects in the reference spatial object set is less than or equal to the threshold are determined to be the multiple subspaces.

5. The method according to claim 1, wherein The subspace division of the global domain to obtain multiple subspaces includes: The global domain is divided into quadtrees for a specified number of times to obtain a plurality of subspaces.

6. The method according to claim 1, wherein Partitioning the spatial object set according to the positional relationship between each spatial object and each subspace to determine the spatial objects contained in each subspace includes: Determining a positional relationship between a minimum bounding rectangle corresponding to each of the spatial objects and each of the subspaces; In the case that a minimum bounding rectangle corresponding to any spatial object and any subspace have a common area, it is determined that any subspace contains the any spatial object.

7. The method according to claim 1, wherein After determining that the first spatial object and the second spatial object are a reference space self-connected tuple, the method further includes: If the first extended minimum bounding rectangle and the second extended minimum bounding rectangle do not have a common area, the first spatial object and the second spatial object are removed from the reference space self-connected tuple.

8. The method according to claim 1, wherein After determining that the first spatial object and the second spatial object are a reference space self-connected tuple, the method further includes: If the first extended minimum bounding rectangle and the second extended minimum bounding rectangle have a common area, determining whether a specified vertex of the common area is in the subspace where the first spatial object is located; If the designated vertex of the common area is not in the subspace where the first spatial object is located, the first spatial object and the second spatial object are removed from the self-connected tuple of the reference space.

9. The method according to claim 8, wherein After determining whether the designated vertex of the common area is in the subspace where the first spatial object is located, the method further includes: If the designated vertex of the common area is in the subspace where the first spatial object is located, determining a spatial connection distance between the first spatial object and the second spatial object; When the spatial connection distance between the first spatial object and the second spatial object is less than or equal to the given spatial distance, determining that the first spatial object and the second spatial object are a reference spatial self-connected tuple; When the spatial connection distance between the first spatial object and the second spatial object is greater than the given spatial distance, the first spatial object and the second spatial object are removed from the reference spatial self-connected tuple.

10. The method according to claim 9, wherein Any subspace including the reference space self-connected tuple is (r i , r j ), wherein i and j are different positive integers, and determining the set of spatial self-connected tuples included in each of the subspaces based on the reference spatial self-connected tuples included in each of the subspaces comprises: The space self-connects the tuple (r j , r i )、(r i , r i ) and (r j , r j ) is added to any of the subspaces to generate a set of spatial self-connected tuples included in any of the subspaces.

11. A device for determining a spatial self-connected binary group, characterized in that: include: A first acquisition module is configured to acquire a given spatial distance and a spatial object set, wherein the spatial object set includes a plurality of spatial objects; A first determining module is configured to determine a global domain based on a minimum bounding rectangle corresponding to the set of spatial objects; A second acquisition module is used to divide the global domain into subspaces to obtain multiple subspaces; a second determining module, configured to partition the set of spatial objects according to a positional relationship between each of the spatial objects and each of the subspaces, so as to determine the spatial objects contained in each subspace; a third determining module, configured to determine, based on the coordinates of the designated points corresponding to each of the spatial objects in each of the subspaces and the spatial distances between the spatial objects, a reference spatial self-connected tuple included in each subspace that matches the given spatial distance, wherein if the spatial distance between any group of spatial objects in any subspace is less than or equal to the given spatial distance, the group of spatial objects is determined to be a reference spatial self-connected tuple that matches the given spatial distance; a fourth determining module, configured to determine a set of spatial self-connected tuples included in each of the subspaces based on the reference spatial self-connected tuples included in each of the subspaces; The third determining module is specifically configured to: Determine the coordinates of the specified vertices of the extended minimum bounding rectangle corresponding to each spatial object in each subspace; Sort the spatial objects in each subspace according to the coordinates of the designated vertices; The sorted sequence of spatial objects is traversed. If a first extended minimum bounding rectangle corresponding to a first spatial object and a second extended minimum bounding rectangle corresponding to a second spatial object have an overlapping area in a specified direction, the first spatial object and the second spatial object are determined to be a reference space self-connected tuple.

12. The device according to claim 11, wherein The second acquisition module includes: a sampling unit, configured to sample some spatial objects located in the global domain from the spatial object set to obtain a reference spatial object set; An acquisition unit is configured to perform quadtree partitioning on the global domain according to the number and positions of spatial objects in the reference spatial object set located in the global domain, so as to acquire the multiple subspaces.

13. The device according to claim 12, wherein The acquisition unit is specifically configured to: When the number of spatial objects in the reference spatial object set located in the global domain is greater than a threshold, performing quadtree partitioning on the global domain to generate four first-level subspaces; When the number of spatial objects in the reference spatial object set contained in the four first-level subspaces is less than or equal to the threshold, the four first-level subspaces are determined to be a plurality of subspaces corresponding to the reference spatial object set.

14. The device according to claim 13, wherein The acquisition unit is further specifically configured to: When the number of spatial objects in the reference spatial object set contained in any first-level subspace is greater than the threshold, performing quadtree partitioning on the any first-level subspace to generate four second-level subspaces; When the number of spatial objects in the reference spatial object set contained in the four secondary subspaces is less than or equal to the threshold, the four secondary subspaces and each first-level subspace in which the number of spatial objects in the reference spatial object set is less than or equal to the threshold are determined to be the multiple subspaces.

15. The device according to claim 11, wherein The second acquisition module is specifically configured to: The global domain is divided into quadtrees for a specified number of times to obtain a plurality of subspaces.

16. The device according to claim 11, wherein The second determining module is specifically configured to: Determining a positional relationship between a minimum bounding rectangle corresponding to each of the spatial objects and each of the subspaces; In the case that a minimum bounding rectangle corresponding to any spatial object and any subspace have a common area, it is determined that any subspace contains the any spatial object.

17. The device according to claim 11, wherein The third determining module is further specifically configured to: If the first extended minimum bounding rectangle and the second extended minimum bounding rectangle do not have a common area, the first spatial object and the second spatial object are removed from the reference space self-connected tuple.

18. The device according to claim 11, wherein The third determining module is further specifically configured to: If the first extended minimum bounding rectangle and the second extended minimum bounding rectangle have a common area, determining whether a specified vertex of the common area is in the subspace where the first spatial object is located; If the designated vertex of the common area is not in the subspace where the first spatial object is located, the first spatial object and the second spatial object are removed from the self-connected tuple of the reference space.

19. The device according to claim 18, wherein The third determining module is further specifically configured to: If the designated vertex of the common area is in the subspace where the first spatial object is located, determining a spatial connection distance between the first spatial object and the second spatial object; When the spatial connection distance between the first spatial object and the second spatial object is less than or equal to the given spatial distance, determining that the first spatial object and the second spatial object are a reference spatial self-connected tuple; When the spatial connection distance between the first spatial object and the second spatial object is greater than the given spatial distance, the first spatial object and the second spatial object are removed from the reference spatial self-connected tuple.

20. The device according to claim 19, wherein Any subspace including the reference space self-connected tuple is (r i , r j ), wherein i and j are different positive integers, and the fourth determining module is specifically configured to: The space self-connects the tuple (r j , r i )、(r i , r i ) and (r j , r j ) is added to any of the subspaces to generate a set of spatial self-connected tuples included in any of the subspaces.

21. A computer device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and capable of running on the processor. When the processor executes the program, the method for determining a spatial self-connected tuple according to any one of claims 1 to 10 is implemented.

22. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method for determining a spatial self-connected tuple according to any one of claims 1 to 10 is implemented.

23. A computer program product, characterized in that The invention comprises a computer program, which, when executed by a processor, implements the method for determining a spatial self-connected tuple according to any one of claims 1 to 10.