CN113761092A - Method and device for determining space self-connection binary group and computer equipment - Google Patents

Method and device for determining space self-connection binary group and computer equipment Download PDF

Info

Publication number
CN113761092A
CN113761092A CN202110113820.1A CN202110113820A CN113761092A CN 113761092 A CN113761092 A CN 113761092A CN 202110113820 A CN202110113820 A CN 202110113820A CN 113761092 A CN113761092 A CN 113761092A
Authority
CN
China
Prior art keywords
spatial
subspace
space
self
determining
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110113820.1A
Other languages
Chinese (zh)
Inventor
李瑞远
王如斌
鲍捷
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jingdong City Beijing Digital Technology Co Ltd
Original Assignee
Jingdong City Beijing Digital Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jingdong City Beijing Digital Technology Co Ltd filed Critical Jingdong City Beijing Digital Technology Co Ltd
Priority to CN202110113820.1A priority Critical patent/CN113761092A/en
Publication of CN113761092A publication Critical patent/CN113761092A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/29Geographical information databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • G06T17/005Tree description, e.g. octree, quadtree
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • G06T17/05Geographic models

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Geometry (AREA)
  • Software Systems (AREA)
  • Databases & Information Systems (AREA)
  • Remote Sensing (AREA)
  • Computer Graphics (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Image Analysis (AREA)

Abstract

The disclosure provides a method and a device for determining a spatial self-connection binary group and computer equipment. The method comprises the following steps: obtaining a given spatial distance and a spatial object set, wherein the spatial object set comprises a plurality of spatial objects; determining a global area according to the minimum boundary rectangle corresponding to the space object set; performing subspace division on the global area to obtain a plurality of subspaces; partitioning the space object set according to the position relation between each space object and each subspace to determine the space object contained in each subspace; determining a reference space self-connection binary group which is included in each subspace and matched with the given space distance according to the designated point coordinate corresponding to each space object in each subspace and the space distance between the space objects; determining a set of spatial self-connected dyads included in each of the subspaces based on the reference spatial self-connected dyads included in each of the subspaces.

Description

Method and device for determining space self-connection binary group and computer equipment
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method and an apparatus for determining a spatial self-connection binary group, and a computer device.
Background
With the popularization of global positioning systems and mobile internet devices, massive spatial data is generated. Distance joining to spatial data is one of the most common spatial analysis operators, with a wide range of application scenarios, such as: the method has the advantages of searching interest points within a range of 500 meters from the subway station, helping companies to select sites and plan, finding roads and bridges penetrated by rivers, and investigating flood hidden dangers. How to optimize the spatial self-connection operation is very important.
Disclosure of Invention
The present disclosure is directed to solving, at least to some extent, one of the technical problems in the related art.
An embodiment of a first aspect of the present disclosure provides a method for determining a spatial self-connected binary group, including:
obtaining a given spatial distance and a spatial object set, wherein the spatial object set comprises a plurality of spatial objects;
determining a global area according to the minimum boundary rectangle corresponding to the space object set;
performing subspace division on the global area to obtain a plurality of subspaces;
partitioning the space object set according to the position relation between each space object and each subspace to determine the space object contained in each subspace;
determining a reference space self-connection binary group which is included in each subspace and matched with the given space distance according to the designated point coordinate corresponding to each space object in each subspace and the space distance between the space objects;
determining a set of spatial self-connected dyads included in each of the subspaces based on the reference spatial self-connected dyads included in each of the subspaces.
An embodiment of a second aspect of the present disclosure provides an apparatus for determining a spatial self-connected binary group, including:
the system comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for acquiring a given spatial distance and a spatial object set, and the spatial object set comprises a plurality of spatial objects;
the first determining module is used for determining a global area according to the minimum boundary rectangle corresponding to the space object set;
the second acquisition module is used for performing subspace division on the global area to acquire a plurality of subspaces;
a second determining module, configured to partition the set of spatial objects according to a position relationship between each spatial object and each subspace, so as to determine a spatial object included in each subspace;
a third determining module, configured to determine, according to the coordinates of the designated point corresponding to each spatial object in each subspace and the spatial distance between each spatial object, a reference spatial self-connected binary group included in each subspace and matching the given spatial distance;
a fourth determining module, configured to determine a spatial self-connected binary group set included in each of the subspaces based on the reference spatial self-connected binary group included in each of the subspaces.
An embodiment of a third aspect of the present disclosure provides a computer device, including: the present disclosure relates to a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor executes the program to implement the method for determining a spatial self-connected doublet as set forth in an embodiment of the first aspect of the present disclosure.
A fourth aspect of the present disclosure provides a non-transitory computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the computer program implements the method for determining a spatial self-connected doublet as set forth in the first aspect of the present disclosure.
A fifth aspect of the present disclosure provides a computer program product, which when executed by an instruction processor performs the method for determining a spatial self-connected doublet set provided in the first aspect of the present disclosure.
The method and the device for determining the spatial self-connection binary group, the computer equipment and the storage medium provided by the embodiment of the disclosure have the following beneficial effects:
the method comprises the steps of firstly obtaining a given space distance and a space object set, then determining a full local area according to a minimum boundary rectangle corresponding to the space object set, then carrying out subspace division on the full local area to obtain a plurality of subspaces, then partitioning the space object set according to the position relation between each space object and each subspace to determine the space object contained in each subspace, then determining a reference space self-connection binary group matched with the given space distance and contained in each subspace according to the designated point coordinate corresponding to each space object in each subspace and the space distance between each space object, and determining a space self-connection binary group set contained in each subspace based on the reference space self-connection binary group contained in each subspace. Therefore, the reference space self-connection binary group corresponding to each subspace is determined according to the coordinates of the designated points corresponding to each space object in each subspace and the space distance between each space object, and then the space self-connection binary group set corresponding to each subspace is generated based on the reference space self-connection binary group, so that the invalid data processing process in the space self-connection binary group calculation process is avoided, the waste of resources is reduced, and the data processing efficiency is improved.
Additional aspects and advantages of the disclosure will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the disclosure.
Drawings
The foregoing and/or additional aspects and advantages of the present disclosure will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
fig. 1 is a schematic flowchart illustrating a method for determining a spatial self-join binary group according to an embodiment of the disclosure;
fig. 2 is a schematic flowchart illustrating a method for determining a spatial self-join binary group according to an embodiment of the disclosure;
fig. 3 is a flowchart illustrating a method for determining a spatial self-join binary group according to another embodiment of the disclosure;
fig. 4A is a schematic diagram of an extended minimum boundary corresponding to a reference space self-join binary provided in an embodiment of the present disclosure;
fig. 4B is a schematic diagram of a common area corresponding to a reference space self-connected binary group according to an embodiment of the disclosure;
fig. 5 is a schematic structural diagram of an apparatus for determining a spatial self-connected binary group according to an embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of an apparatus for determining a spatial self-connected doublet according to another embodiment of the present disclosure;
FIG. 7 illustrates a block diagram of an exemplary computer device suitable for use in implementing embodiments of the present disclosure.
Detailed Description
Reference will now be made in detail to the embodiments of the present disclosure, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the drawings are exemplary and intended to be illustrative of the present disclosure, and should not be construed as limiting the present disclosure.
A method, an apparatus, a computer device, and a storage medium for determining a spatial self-connected doublet according to embodiments of the present disclosure are described below with reference to the accompanying drawings.
Fig. 1 is a schematic flowchart of a method for determining a spatial self-connected binary group according to an embodiment of the disclosure.
The embodiments of the present disclosure are exemplified in that the method for determining a spatial self-connected binary is configured in a device for determining a spatial self-connected binary, and the device for determining a spatial self-connected binary can be applied to any computer device, so that the computer device can perform a function of determining a spatial self-connected binary.
The Computer device may be a Personal Computer (PC), a cloud device, a mobile device, and the like, and the mobile device may be a hardware device having various operating systems, touch screens, and/or display screens, such as a mobile phone, a tablet Computer, a Personal digital assistant, a wearable device, and an in-vehicle device.
As shown in fig. 1, the method for determining a spatial self-join doublet may include the following steps:
step 101, obtaining a given spatial distance and a spatial object set, wherein the spatial object set comprises a plurality of spatial objects.
Where a given spatial distance may be denoted as δ, which may be any positive number, this disclosure does not limit this.
For convenience of description, the spatial object set R may be referred to as R, and the spatial object in the spatial object set R may be referred to as R.
It is understood that the spatial object may be a point object, or may also be a line object, or may also be a plane object, etc., which is not limited by the present disclosure.
It should be noted that δ, R, r, etc. are merely illustrative and are not intended to limit the spatial distance, set of spatial objects, spatial object, etc. given in the present disclosure.
And 102, determining a global area according to the minimum boundary rectangle corresponding to the space object set.
The Minimum Bounding Rectangle (MBR) may also be referred to as a Minimum Bounding Rectangle, a Minimum containing Rectangle, or a Minimum enclosing Rectangle. The minimum bounding rectangle refers to the maximum range of two-dimensional shapes (e.g., points, lines, polygons) represented in two-dimensional coordinates, i.e., a rectangle whose boundary is defined by the maximum abscissa, the minimum abscissa, the maximum ordinate, and the minimum ordinate of the vertices of a given two-dimensional shape, such a rectangle containing the given two-dimensional shape and having sides parallel to the coordinate axes.
Mbr may be the smallest rectangle parallel to the coordinate axes and containing all spatial objects R in the set of spatial objects.
In addition, after the Minimum boundary Rectangle corresponding to the spatial object set is expanded by a corresponding numerical value, an expanded Minimum Bounding Rectangle (EMBR for short) can be obtained.
For example, a set of spatial objectsThe minimum boundary rectangle r.mbr of R is extended by epsilon to obtain r.embr (epsilon) ═ R<exmin,eymin,exmax,eymax>=<xmin-ε,ymin-ε,xmax+ε,ymax+ε>Wherein<xmin,ymin,xmax,ymax>Is the smallest bounding rectangle for R, and in addition, epsilon can be any positive number given, which the disclosure does not limit.
It is to be understood that the minimum bounding rectangle corresponding to the spatial object set may be used as a global area, or the extended minimum bounding rectangle corresponding to the spatial object set may also be used as a global area, which is not limited in this disclosure.
And 103, performing subspace division on the whole area to obtain a plurality of subspaces.
There are many ways in which to partition the global area into subspaces.
For example, the whole global area may be first divided into quadtrees, so as to ensure that the number of spatial objects in all leaf nodes is substantially the same.
Further, after the quadtree division is performed on the whole local area, if two parts of the four obtained parts are concentrated with more space objects, the quadtree division can be continuously performed on the two parts, so that a plurality of subspaces can be obtained.
Or, the full-area may be subjected to octree division, and if there are more space objects concentrated in three parts in the obtained division result, the octree division may be continued on the three parts, so that a plurality of subspaces may be obtained.
It should be noted that the above examples are only illustrative, and should not be taken as a limitation to acquiring multiple subspaces in the embodiments of the present disclosure.
And 104, partitioning the space object set according to the position relation between each space object and each subspace to determine the space object contained in each subspace.
The position relationship between any space object and any subspace may be various, for example, the position relationship may be an intersection, a complete coincidence, or no intersection, and the like, which is not limited by the present disclosure.
In the embodiment of the present disclosure, the position relationship between each space object and each subspace may be determined first, and then the space objects belonging to the same subspace may be divided into the same subspace according to the position relationship, so that the space object set may be partitioned.
For example, the space object r1Intersecting subspace 1, the spatial object r can be transformed1Into subspace 1. Space object r2Intersecting both subspace 1 and subspace 2, the spatial object r may be transformed2Dividing into a subspace 1 and a subspace 2, thereby determining that the subspace 1 contains a space object r1、r2In subspace 2, a space object r is included2
Alternatively, the position relationship between the minimum boundary 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 set of spatial objects.
For example, the space object r1The corresponding minimum bounding rectangle is R1Mbr intersects subspace 2, then the space object r can be transformed1Into the subspace 2. Space object r2The corresponding minimum bounding rectangle is R2Mbr intersects subspace 1, subspace 2, subspace 3, then the space object r can be made to2Is divided into a subspace 1, a subspace 2 and a subspace 3, thereby determining that the subspace 1 contains a space object r2In subspace 2, a space object r is included1、r2In subspace 3, a space object r is included2
Or, the position relationship between the minimum extended boundary 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 set of spatial objects.
For example, the space object r1The corresponding extended minimum bounding rectangle is R1Embr with subspace 1 phaseThen the space object r can be processed1Into subspace 1. Space object r2The corresponding extended minimum bounding rectangle is R2The embr intersects both subspace 1, subspace 2, then the space object r can be put together2Is divided into a subspace 1 and a subspace 2, thereby determining that the subspace 1 contains a space object r1、r2In subspace 2, a space object r is included2
In addition, r is as defined above1、r2、R1.mbr、R2.mbr、R1.embr、R2Embr et al are illustrative only and are not intended as limitations on determining the spatial objects contained in each subspace in the disclosed embodiments.
And 105, determining a reference space self-connection binary group which is contained in each subspace and matched with the given space distance according to the designated point coordinates corresponding to each space object in each subspace and the space distance between the space objects.
The designated point may be a special point of the space object itself, or may also be a designated point in the minimum boundary rectangle corresponding to the space object, or may also be a designated point in the extended minimum boundary rectangle corresponding to the space object, which is not limited in this disclosure.
In addition, when the designated point is a special point of the space object itself, the designated point may be a point in which both the first-direction coordinate and the second-direction coordinate of the space object itself are minimum, or may be a point in which both the first-direction coordinate and the second-direction coordinate of the space object itself are maximum. Alternatively, the spatial object itself may be a point having the largest first-direction coordinate and the smallest second-direction coordinate, or may be a point having the smallest first-direction coordinate and the largest second-direction coordinate, and the like, which is not limited in the present disclosure.
Alternatively, when the designated point is a designated point in the minimum bounding rectangle corresponding to the space object, the designated point may be a point in the minimum bounding rectangle whose first-direction coordinate and second-direction coordinate are both minimum, or may be a point in the minimum bounding rectangle whose first-direction coordinate and second-direction coordinate are both maximum. Alternatively, the first direction coordinate may be the largest and the second direction coordinate may be the smallest in the minimum bounding rectangle, or the first direction coordinate may be the smallest and the second direction coordinate may be the largest in the minimum bounding rectangle, and the like, which is not limited in the present disclosure.
Alternatively, when the designated point is a designated point in the minimum extended boundary rectangle corresponding to the space object, the designated point may be a point in the minimum extended boundary rectangle in which both the first-direction coordinate and the second-direction coordinate are minimum, or may be a point in the minimum extended boundary rectangle in which both the first-direction coordinate and the second-direction coordinate are maximum. Alternatively, the first-direction coordinate may be the largest and the second-direction coordinate may be the smallest in the expanded minimum boundary rectangle, or the first-direction coordinate may be the smallest and the second-direction coordinate may be the largest in the expanded minimum boundary rectangle, and the like, which is not limited in the present disclosure.
In addition, the first direction may be an x-axis direction, and correspondingly, the second direction may be a y-axis direction, or the first direction may also be a y-axis direction, and correspondingly, the second direction may be an x-axis direction, and the like, which is not limited in this disclosure.
In the embodiment of the present disclosure, the designated points may be determined first, then the spatial objects may be sorted according to the coordinates of the designated points corresponding to the spatial objects in the descending order or the descending order, and then the spatial distance between the spatial objects may be determined according to the sorting result.
In addition, when determining the spatial distance between each spatial object, the calculation may be performed by using a minimum euclidean distance formula, or may be performed by using a manhattan equidistant formula, which is not limited in the present disclosure.
It is understood that if the spatial distance between any set of spatial objects in any subspace is less than or equal to the value δ, it may be determined that the set of spatial objects is the reference spatial self-connected dyad matching the given spatial distance.
For example, after the space objects in the subspace 1 are sorted according to the coordinates of the designated point, the space objects are sequentially r1、r2、r3Then, according to the minimum Euclidean distance formula, r is determined1And r2、r1And r3、r2And r3Are respectively at a spatial distance of L12、L13、L23. If L is12、L23Are all less than the delta value, then it can be determined that the reference space self-connected doublet included in subspace 1 that is less than or equal to the delta value has (r)1,r2)、(r2,r3)。
The subspace 1 and the space object r are defined as1、r2、r3Spatial distance L12、L13、L23The like is only illustrative and should not be taken as a limitation on the subspace, each spatial object and its spatial distance, the reference spatial self-join dyads, etc. in the embodiments of the present disclosure.
And 106, determining a spatial self-connection binary group set included in each subspace based on the reference spatial self-connection binary group included in each subspace.
In this embodiment, the reference space self-join doublet included in different subspaces may be repeated or omitted, which is not limited in this disclosure.
For example, the same reference space self-join doublet may be recorded in multiple subspaces. For example, subspace 1 includes a reference space self-join dyad (r)1,r2) Also included in subspace 2 is a reference space self-join doublet (r)1,r2) And thus possibly duplicates, may be selected to be deleted (r) in subspace 11,r2) In the reserved subspace 2 (r)1,r2)。
Alternatively, the current subspace includes a reference space self-join doublet (r)1,r2) Equal to it (r)2,r1) Should also be a spatially self-connected doublet, without any inclusion in either subspace (r)2,r1) Can be prepared from (r)2,r1) As the corresponding space self-connection binary group of the current subspace, thereby generating the current subspaceThe corresponding spatially self-connected binary sets.
It should be noted that the above examples are only illustrative, and cannot be taken as a limitation on determining a spatial self-connection binary group set included in any subspace in the embodiment of the present disclosure.
The method includes the steps of firstly obtaining a given space distance and a space object set, then determining a full local area according to a minimum boundary rectangle corresponding to the space object set, then performing subspace division on the full local area to obtain a plurality of subspaces, then partitioning the space object set according to the position relation between each space object and each subspace to determine the space object contained in each subspace, then determining a reference space self-connection binary group matched with the given space distance and contained in each subspace according to the designated point coordinate corresponding to each space object in each subspace and the space distance between each space object, and determining a space self-connection binary group set contained in each subspace based on the reference space self-connection binary group contained in each subspace. Therefore, the reference space self-connection binary group corresponding to each subspace is determined according to the coordinates of the designated points corresponding to each space object in each subspace and the space distance between each space object, and then the space self-connection binary group set corresponding to each subspace is generated based on the reference space self-connection binary group, so that the invalid data processing process in the space self-connection binary group calculation process is avoided, the waste of resources is reduced, and the data processing efficiency is improved.
In the above embodiment, the reference space self-connection binary group corresponding to each subspace is determined according to the coordinates of the designated point corresponding to each space object in each subspace and the spatial distance between each space object, and then the space self-connection binary group set corresponding to each subspace is generated based on the reference space self-connection binary group. In a possible implementation manner, when dividing the global area into a plurality of subspaces, the global area may be spatially divided according to the number and positions of the spatial objects in the global domain in the reference spatial object set to obtain the plurality of subspaces, and this process is described in detail below with reference to fig. 2.
As shown in fig. 2, the method for determining a spatial self-join doublet may include the following steps:
step 201, obtaining a given spatial distance and a spatial object set, where the spatial object set includes a plurality of spatial objects.
Step 202, determining a global area according to the minimum boundary rectangle corresponding to the spatial object set.
In step 203, a part of the spatial objects located in the global domain is sampled from the spatial object set to obtain a reference spatial object set.
For the mass space objects, in order to improve the processing speed and efficiency, sampling may be performed before corresponding processing is performed.
It should be noted that, when the usage scenarios are different, the sampling rate may be different, for example, the sampling rate may be 0.01, 0.05, 0.1, 0.2, and the like, which is not limited in this disclosure.
Therefore, in actual use, a proper sampling rate can be selected for sampling according to actual conditions, so that the obtained sampling space object set can well represent the spatial distribution of the whole space object set.
And 204, performing quadtree division on the global area according to the number and the positions of the spatial objects in the reference spatial object set in the global domain to obtain a plurality of subspaces.
There may be many situations when quadtree partitioning is performed on a global area.
For example, the global area may be quadtree-divided to generate four primary subspaces when the number of spatial objects in the reference spatial object set located in the global domain is greater than a threshold.
The threshold may be a preset value, and may be any positive number, which is not limited in this disclosure.
For example, the threshold is 200, the number of spatial objects in the reference spatial object set located in the global domain is 220, and the number is greater than the threshold 200, and the global domain may be quadtree-divided, so that four primary subspaces may be generated.
It should be noted that the foregoing is only an example, and cannot be taken as a limitation on the number of spatial objects located in the global domain in the reference spatial object set, a threshold, the number of primary subspaces, and the like in the embodiment of the present disclosure.
Further, under the condition that the number of the spatial objects in the reference spatial object set contained in the four primary subspaces is less than or equal to the threshold, the four primary subspaces are determined to be a plurality of subspaces corresponding to the reference spatial object set.
For example, the threshold is 100, 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 may be subjected to quadtree partitioning, the numbers of spatial objects in the reference spatial object set included in the generated four primary subspaces are 20, 50, 70, and 80, which are all less than the threshold, the quadtree partitioning may be stopped, and the four primary subspaces are determined as the subspaces corresponding to the reference spatial object set.
It should be noted that the foregoing is only an example, and cannot be taken as a limitation on the number, threshold, subspace, and the like of the spatial objects in the reference spatial object set included in the primary subspace in the embodiment of the present disclosure.
Or, in a possible implementation manner, under the condition that the number of spatial objects in the reference spatial object set included in any one of the primary subspaces is greater than a threshold, performing quadtree division on any one of the primary subspaces to generate four secondary subspaces.
For example, the threshold is 100, 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 area may be subjected to quadtree partitioning, the numbers of spatial objects in the first reference spatial object set included in the generated four primary subspaces are 150, 20, 10, and 40, respectively, where 150 is greater than the threshold, the primary subspace where the number of spatial objects is 150 may be subjected to quadtree partitioning, so that four secondary subspaces may be generated.
It should be noted that the foregoing is only an example, and cannot be taken as a limitation on the number, the threshold, the primary subspace, the secondary subspace, and the like of the spatial objects in the reference spatial object set included in the primary subspace in the embodiment of the present disclosure.
Then, under the condition that the number of the space objects in the reference space object set contained in the four secondary subspaces is smaller than or equal to the threshold value, the four secondary subspaces and each primary subspace containing the number of the space objects in the reference space object set smaller than or equal to the threshold value are determined to be a plurality of subspaces.
For example, the threshold is 100, the number of spatial objects in the reference spatial object set located in the global domain is 220, and the total area may be quadtree-partitioned if the number is greater than the threshold 100. The four generated primary subspaces can be denoted as a primary subspace 1, a primary subspace 2, a primary subspace 3, and a primary subspace 4, and the number of spatial objects in the reference spatial object set included in each primary subspace is 150, 20, 10, and 40, respectively. Wherein 150 is greater than the threshold, the quadtree partitioning may be continued for the primary subspace 1, thereby generating four secondary subspaces. The number of the spatial objects in the reference spatial object set included in the generated four secondary subspaces may be respectively 30, 40, 50, and 30, and all of the numbers are smaller than the threshold, and then the four secondary subspaces, the primary subspace 2, the primary subspace 3, and the primary subspace 4 may be determined as a plurality of subspaces corresponding to the reference spatial object set.
Correspondingly, if the number of the spatial objects in the reference spatial object set included in any one of the generated secondary subspaces is greater than the threshold, the quadtree partitioning may be continued for any one of the secondary subspaces until the number of the spatial objects included in each generated subspace is less than or equal to the threshold.
It should be noted that the above description is only an example, and should not be taken as a limitation on the number, threshold, each level of subspace, and the like of the spatial objects in the first reference spatial object set included in each level of subspace in the embodiment of the present disclosure.
Step 205, determining the position relationship between the minimum bounding rectangle corresponding to each space object and each subspace.
And step 206, under the condition that the common area exists between the minimum boundary rectangle corresponding to any space object and any subspace, determining that any space object is contained in any subspace.
The position relationship between the minimum boundary rectangle corresponding to any space object and any subspace may be various, for example, the minimum boundary rectangle may be disjoint, intersected, or completely overlapped, which is not limited in this disclosure.
It can be understood that when the minimum bounding rectangle corresponding to any spatial object is in a disjoint relationship with the position of any subspace, the any spatial object does not intersect with any subspace, i.e. there is no common region.
Or 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 any subspace have a common region.
Or when the position of the minimum bounding rectangle corresponding to any spatial object completely coincides with the position of any subspace, it may be determined that a common region also exists between the minimum bounding rectangle corresponding to any spatial object and any subspace.
In addition, each subspace may be numbered, and the numbering manner may be arbitrary, for example, the numbering may be performed according to a number, or may also be according to a letter number, and the like, only the numbering result is unique, which is not limited in this disclosure.
In addition, in the case where the minimum bounding rectangle corresponding to any spatial object has a common region with any subspace, the number of the any subspace may be assigned to the any spatial object having the common region therewith.
For example, there are 4 subspaces currently divided, which are subspace 1, subspace 2, subspace 3, and subspace 4, respectively, and the space object has r1、r2、r3
Wherein r is1Corresponding minimum bounding rectangle R1Mbr has no intersection with subspace 1, R1Mbr intersects subspace 2, R1Mbr intersects subspace 3, R1Mbr does not intersect with subspace 4, then spatial object r can be determined1Belong to subspaces 2, 3, so that the number of a subspace can be assigned to a space object r1Then the space object r1The numbers may be 2, 3.
Then, r is compared in sequence2Corresponding R2Mbr relationship to each subspace, if subspace 1, subspace 3 and R2Mbr has a common area, then r can be determined2The numbers are 1 and 3 respectively.
Then, r is compared in sequence3Corresponding minimum bounding rectangle R3Mbr relationship to each subspace, if subspace 2, subspace 3 and R3Mbr has a common region, then a spatial object r can be determined3The numbers are 2 and 3 respectively.
Therefore, when a space object set is partitioned, space objects having the same number can be partitioned into the same subspace, and it can be determined that a space object included in the subspace 1 is the space object r2The space object included in the subspace 2 is the space object r1、r3The space object included in the subspace 3 is a space object r1、r2And r3And no spatial object is contained in the subspace 4.
In addition, the space object r is1、r2And r3Minimum bounding rectangle R1.mbr、R2.mbr、R3Mbr, subspace 1, subspace 2, subspace 3, subspace 4, and the respective positional relationships are merely illustrative, and cannot be used as a limitation to the spatial object, the subspace, and the positional relationship between the minimum bounding rectangle corresponding to each spatial object and each subspace, partitioning a plurality of spatial objects, and the like in the embodiments of the present disclosure.
Step 207, determining a reference space self-connecting binary group which is included in each subspace and is matched with the given space distance according to the designated point coordinates corresponding to each space object in each subspace and the space distance between each space object.
Step 208, a set of spatial self-connected tuples comprised in each subspace is determined based on the reference spatial self-connected dyads comprised in each subspace.
According to the embodiment of the disclosure, a given spatial distance and a spatial object set are obtained first, and then a global area is determined according to a minimum boundary rectangle corresponding to the spatial object set. And then sampling part of the space objects in the global domain from the space object set to obtain a reference space object set, and performing quadtree division on the global area according to the number and the positions of the space objects in the reference space object set in the global domain to obtain a plurality of subspaces. And then determining the position relation between the minimum boundary rectangle corresponding to each space object and each subspace, and determining that any space object is contained in any subspace under the condition that the common area exists between the minimum boundary rectangle corresponding to any space object and any subspace. And then determining a reference space self-connection binary group which is contained in each subspace and matched with the given space distance according to the designated point coordinate corresponding to each space object in each subspace and the space distance between the space objects, and further determining a space self-connection binary group set contained in each subspace. Therefore, the global area is subjected to space division by referring to the space object set so as to obtain a plurality of subspaces, and then the space object set is partitioned so as to determine the space objects contained in the subspaces, so that the data volume of each subspace is approximately equal, the load balance is further ensured, and the overall operation efficiency is improved.
In the above embodiment, the global area is divided into quadtrees for a plurality of times by referring to the spatial object set, and then the spatial object set is partitioned again, so that the spatial object in each subspace can be determined, and further the spatial self-connection binary group set included in each subspace is determined. In one possible implementation, the same spatial object may span multiple subspaces, and thus different subspaces may contain the same spatially self-connected doublet, which may result in the final acquired set of spatially self-connected doublets containing repeated spatially self-connected doublets. Therefore, after the spatial self-connection binary groups included in each subspace are determined, the spatial self-connection binary groups can be screened, so that the same spatial self-connection binary group is recorded in only one subspace, and repetition is avoided, which is described in detail below with reference to fig. 3.
As shown in fig. 3, the method for determining a spatial self-join doublet may include the following steps:
step 301, obtaining a given spatial distance and a spatial object set, where the spatial object set includes a plurality of spatial objects.
Step 302, determining a global area according to the minimum boundary rectangle corresponding to the spatial object set.
Step 303, performing quadtree division on the global area for a specified number of times to obtain a plurality of subspaces.
The specified number of times may be any set number of times, or may also be a number of times set according to a range and a size of a global area, or may also be a number of times related to the number of positions of the spatial object located in the global domain, which is not limited in this disclosure.
For example, the number of times is 2, 4, or 7. For any whole local area, specified times of quadtree division can be carried out, and therefore a plurality of subspaces can be determined according to the quadtree division result.
Alternatively, when the currently determined global area is larger, a larger number of times, such as 10, 20, etc., may be set.
Or, the spatial objects located in the global domain are distributed in a certain subspace in the global domain, and a larger number of times of specification may be set for the subspace.
It should be noted that the above examples are only illustrative, and are not intended to limit the method, value, and the like for determining the designated times in the embodiments of the present disclosure.
And step 304, partitioning the space object set according to the position relation between each space object and each subspace to determine the space object contained in each subspace.
Step 305, determining the coordinates of the designated vertex of the extended minimum boundary rectangle corresponding to each space object in each subspace.
And step 306, sequencing the space objects in each subspace according to the coordinates of the designated vertexes.
The designated vertex may be a vertex in which the first-direction coordinate and the second-direction coordinate are both minimum in the minimum-extended boundary rectangle corresponding to the spatial object in the subspace, or may be a vertex in which the first-direction coordinate and the second-direction coordinate are both maximum in the minimum-extended boundary rectangle. Alternatively, the vertex having the largest first-direction coordinate and the smallest second-direction coordinate in the expanded minimum boundary rectangle may be used, or the vertex having the smallest first-direction coordinate and the largest second-direction coordinate in the expanded minimum boundary rectangle may be used, which is not limited in the present disclosure.
In addition, the first direction may be an x-axis direction, and correspondingly, the second direction may be a y-axis direction, or the first direction may also be a y-axis direction, and correspondingly, the second direction is an x-axis direction, and the like, which is not limited in this disclosure.
In addition, the coordinates of each designated vertex may be sorted in the order from small to large, or the coordinates of each designated vertex may be sorted in the order from large to small, which is not limited in the present disclosure.
For example, the current subspace is subspace 1, the designated vertex may be a vertex having the largest first-direction coordinate and the largest second-direction coordinate in the minimum-extended-boundary rectangle corresponding to the spatial object, and then the spatial objects may be sorted according to the coordinates of the designated vertex of the minimum-extended-boundary rectangle corresponding to each spatial object in subspace 1 from small to large.
It should be noted that the above examples are only illustrative, and cannot be taken as a limitation for specifying coordinates of vertices and ordering spatial objects in any subspace in the embodiments of the present disclosure.
Step 307, traversing the ordered spatial object sequence, and if there is an overlapping region in the specified direction between the first extended minimum boundary rectangle corresponding to the first spatial object and the second extended minimum boundary rectangle corresponding to the second spatial object, determining that the first spatial object and the second spatial object are reference space self-connection dyads.
The sizes of different space objects may be different, so that the sizes of the minimum bounding rectangles corresponding to the space objects may also be different, and the expanded minimum bounding rectangles obtained by expanding the minimum bounding rectangles may also be different.
Optionally, the minimum boundary rectangle corresponding to each spatial object may be expanded to different degrees, for example, δ/2 expansion is performed, or (δ/2) + a expansion is performed, where a may be any value, which is not limited in this disclosure.
The designated direction may be any direction such as an x-axis direction and a y-axis direction, and the present disclosure does not limit this.
For example, the currently specified direction is the x-axis direction, the first spatial object r1Corresponding first extended minimum bounding rectangle and second spatial object r2(r) is determined if the corresponding second extended minimum bounding rectangle has an overlap region in the x-axis direction1,r2) Is a reference space self-join doublet.
The x-axis direction r is defined as1、r2The like are merely illustrative and are not intended as limitations on specifying directions, spatial objects, etc. in embodiments of the present disclosure.
Step 308, if the first extended minimum boundary rectangle and the second extended minimum boundary rectangle do not have a common region, the first spatial object and the second spatial object are removed from the reference space self-connection dyad.
It can be understood that, if the first expanded minimum boundary rectangle and the second expanded minimum boundary rectangle are both expanded minimum boundary rectangles obtained after the respective corresponding minimum boundary rectangles are expanded by less than or equal to δ/2, the first expanded minimum boundary rectangle and the second expanded minimum boundary rectangle do not have a common area, which indicates that the spatial distance between the first expanded minimum boundary rectangle and the second expanded minimum boundary rectangle is greater than the given δ, and the spatial distance between the corresponding first spatial object and the corresponding second spatial object is also greater than the given δ. Therefore, in order to ensure the accuracy of the determined reference space self-connection binary group, the first space object and the second space object can be removed from the reference space self-connection binary group.
For example, the space object r1Corresponding to the first extended minimum bounding rectangle, the space object r3Corresponding is a second extended minimum bounding rectangle, r in the schematic shown in FIG. 4A1Corresponding first extended minimum bounding rectangle and r3The corresponding second expanded minimum bounding rectangles are overlapped in the direction of the x axis, but the two do not actually have a common area, which shows that the space distance between the two is larger than the given delta, so that (r) can be reduced1,r3) And removing the self-connection binary group from the reference space.
It should be noted that the foregoing examples are merely illustrative, and should not be taken as limitations on the minimum bounding rectangle, the specified direction, and the like that are expanded in the embodiments of the present disclosure.
Alternatively, in a possible implementation manner, if there is a common region between the first extended minimum bounding rectangle and the second extended minimum bounding rectangle, it is determined whether a specified vertex of the common region is in the subspace where the first spatial object is located.
Wherein the same space object may span multiple subspaces, and thus different subspaces may contain the same space object, and thus different subspaces may repeatedly record the same space self-connecting dyads. For example, r1Corresponding first extended minimum bounding rectangle and r2Corresponding second extended minimal bounding rectangle, both present a common area, both in subspace 1 and subspace 2, such that one recording (r) is possible in subspace 11,r2) Possibly also once (r) in the subspace1,r2) Data duplication may result.
Therefore, in order to avoid repetition, it can be ensured that the spatial self-connection binary set output by each subspace does not include repeated spatial self-connection binary sets according to the positions of the designated vertices of the common region of the first extended minimum boundary rectangle and the second extended minimum boundary rectangle.
The designated vertex may be any vertex of the common area, for example, a vertex in the common area having the smallest first-direction coordinate and the smallest second-direction coordinate, or a vertex in the common area having the largest first-direction coordinate and the largest second-direction coordinate. Alternatively, the vertex having the largest first-direction coordinate and the smallest second-direction coordinate in the common area may be used, or the vertex having the smallest first-direction coordinate and the largest second-direction coordinate in the common area may be used, which is not limited in the present disclosure.
In addition, the first direction may be an x-axis direction, and correspondingly, the second direction may be a y-axis direction, or the first direction may also be a y-axis direction, and correspondingly, the second direction is an x-axis direction, and the like, which is not limited in this disclosure.
Specifically, if the designated vertex of the common region 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 reference space self-connection dyad.
Or, if the designated vertex of the common area is in the subspace where the first spatial object is located, determining the spatial connection distance between the first spatial object and the second spatial object.
For example, in the schematic diagram shown in FIG. 4B, the first spatial object r1The corresponding first extended minimum bounding rectangle is the left dashed rectangle R1Embr (delta/2), second spatial object r2The corresponding second extended minimum bounding rectangle is the right rectangle R2Embr (delta/2), the common area of which is the diagonal area in the figure, the first space object r1In subspace 0. When the vertex is designated as B point, it is not in subspace 0, then (r) may be1,r2) And removing the reference binary group. Alternatively, if the vertex is designated as point A, which is in subspace 0, then the determination of the first spatial object r may continue at this point1And a second spatial object r2The spatial connection distance between them.
It should be noted that the above examples are only illustrative, and cannot be taken as limitations on each spatial object, each extended minimum boundary rectangle, a designated vertex, and the like in the embodiments of the present disclosure.
In addition, the spatial connection distance between the first spatial object and the second spatial object may be calculated by using a minimum euclidean distance formula, or may be calculated by using a manhattan distance formula, and the like, which is not limited in this disclosure.
Further, in the case that the spatial connection distance between the first spatial object and the second spatial object is less than or equal to the given spatial distance, the first spatial object and the second spatial object are determined to be the reference spatial self-connection dyad.
Or, in the case that 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 space self-connection dyad.
Wherein the space object in the current subspace comprises r1、r2、r3Then, according to the minimum Euclidean distance formula, r is determined1And r2、r1And r3、r2And r3Are respectively at a spatial distance of L12、L13、L23. If L is12、L23Are all less than the value delta, L13Greater than a value of δ, then (r) can be determined1,r2)(r2,r3) For reference to the spatial self-join doublet, will (r)1,r3) And removing the self-connection binary group from the reference space.
In addition, the space object r is1、r2、r3A spatial distance L12、L13、L23The like is only illustrative and cannot be taken as a limitation for each spatial object and its spatial distance, reference spatial self-connected dyads, etc. in the embodiments of the present disclosure.
Step 309, self-join the space doublet (r)j,ri)、(ri,ri) And (r)j,rj) And adding the binary groups into any subspace to generate a spatial self-connection binary group set included in any subspace.
It is understood that to further improve the completeness of the spatial self-connected doublets included in any one subspace, the spatial self-connected doublets may be augmented to generate a complete set of spatial self-connected doublets.
For example, if (r)1,r2) Is the reference space self-connection binary in the current subspace, and corresponds to (r)2,r1) Also a spatially self-connected doublet that satisfies the condition. In addition, the space is self-connected to the binary (r)1,r1) And (r)2,r2) The spatial distance between two spatial objects in (1) is 0 and is also smaller than a given value of delta, i.e. also a spatial self-join doublet satisfying the condition. Thereby (r) can be changed2,r1)、(r1,r1)、(r2,r2) And adding the space self-connection binary group serving as the space self-connection binary group meeting the condition into the current subspace, thereby generating a space self-connection binary group set in the current subspace.
It should be noted that the above examples are only illustrative, and cannot be taken as a limitation on generating a spatially self-connected binary group set and the like included in any subspace in the embodiments of the present disclosure.
The embodiment of the disclosure can determine a global area by obtaining a given spatial distance and a spatial object set according to a minimum boundary rectangle corresponding to the spatial object set, then perform specified times of quadtree division on the global area, thereby obtaining a plurality of subspaces, then determine a reference spatial self-connection binary group in each subspace in the global domain, and further screen and verify the reference spatial self-connection binary group, thereby determining a spatial self-connection binary group satisfying conditions, and expanding the spatial self-connection binary group to generate a complete spatial self-connection binary group set. Therefore, the accuracy and the integrity of the spatial self-connection binary group are improved, the repeated loading and the repeated calculation of data are avoided, and the overall performance is greatly improved.
In order to implement the above embodiments, the present disclosure further provides a device for determining a spatial self-connected binary group.
Fig. 5 is a schematic structural diagram of an apparatus for determining a spatial self-connected doublet according to an embodiment of the present disclosure.
As shown in fig. 5, the apparatus 100 for determining a spatial self-connected doublet may include: the first obtaining module 110, the first determining module 120, the second obtaining module 130, the second determining module 140, the third determining module 150, and the fourth determining module 160.
The first obtaining module 110 is configured to obtain a given spatial distance and a spatial object set, where the spatial object set includes a plurality of spatial objects.
A first determining module 120, configured to determine a global area according to the minimum bounding rectangle corresponding to the spatial object set.
A second obtaining module 130, configured to perform subspace partitioning on the global area to obtain multiple subspaces.
The second determining module 140 is configured to partition the set of spatial objects according to the position relationship between each spatial object and each subspace, so as to determine the spatial object included in each subspace.
A third determining module 150, configured to determine, according to the coordinates of the designated point corresponding to each spatial object in each subspace and the spatial distance between the spatial objects, a reference spatial self-connected doublet included in each subspace and matching the given spatial distance.
A fourth determining module 160, configured to determine a set of spatially self-connected tuples comprised in each of the subspaces based on the reference spatially self-connected tuples comprised in each of the subspaces.
The foregoing explanation of the embodiment of the method for determining a spatial self-connected binary group is also applicable to the apparatus for determining a spatial self-connected binary group in this embodiment, and is not repeated here.
The device for determining the spatial self-connection binary group according to the embodiment of the disclosure first obtains a given spatial distance and a spatial object set, then determines a global area according to a minimum boundary rectangle corresponding to the spatial object set, then performs subspace partitioning on the global area to obtain a plurality of subspaces, then partitions the spatial object set according to a position relationship between each spatial object and each subspace to determine a spatial object included in each subspace, determines a reference spatial self-connection binary group included in each subspace and matched with the given spatial distance according to a specified point coordinate corresponding to each spatial object in each subspace and a spatial distance between each spatial object, and determines a spatial self-connection binary group set included in each subspace based on the reference spatial self-connection binary group included in each subspace. Therefore, the reference space self-connection binary group corresponding to each subspace is determined according to the coordinates of the designated points corresponding to each space object in each subspace and the space distance between each space object, and then the space self-connection binary group set corresponding to each subspace is generated based on the reference space self-connection binary group, so that the invalid data processing process in the space self-connection binary group calculation process is avoided, the waste of resources is reduced, and the data processing efficiency is improved.
Further, in a possible implementation manner of the embodiment of the present disclosure, referring to fig. 6, on the basis of the embodiment shown in fig. 5, the second obtaining module 130 includes:
a sampling unit 1310 configured to sample a part of the spatial objects located in the global domain from the set of spatial objects to obtain a set of reference spatial objects;
an obtaining unit 1320, configured to perform quadtree division on the global area according to the number and the positions of the spatial objects in the reference spatial object set located in the global domain, so as to obtain the multiple subspaces.
In a possible implementation manner, the obtaining unit 1320 is specifically configured to perform quadtree partitioning on the global area to generate four primary subspaces when the number of spatial objects in the reference spatial object set located in the global domain is greater than a threshold; and under the condition that the number of the space objects in the reference space object set contained in the four primary subspaces is less than or equal to the threshold value, determining the four primary subspaces as a plurality of subspaces corresponding to the reference space object set.
In a possible implementation manner, the obtaining unit 1320 is further specifically configured to: under the condition that the number of the space objects in the reference space object set contained in any one level of subspace is larger than the threshold value, performing quadtree division on any one level of subspace to generate four secondary subspaces; and under the condition that the number of the space objects in the reference space object set contained in the four secondary subspaces is less than or equal to the threshold value, determining the four secondary subspaces and each primary subspace containing the number of the space objects in the reference space object set less than or equal to the threshold value as the plurality of subspaces.
In a possible implementation manner, the second obtaining module 130 is specifically configured to perform quadtree division on the global area for a specified number of times to obtain multiple subspaces.
In a possible implementation manner, the second determining module 140 is specifically configured to determine a position relationship between the minimum bounding rectangle corresponding to each of the spatial objects and each of the subspaces; and under the condition that the common area exists between the minimum boundary rectangle corresponding to any space object and any subspace, determining that any space object is contained in any subspace.
In a possible implementation manner, the third determining module 150 is specifically configured to determine coordinates of a specified vertex of an extended minimum boundary rectangle corresponding to each spatial object in each subspace; the method is specifically configured to sort the space objects in each subspace according to the coordinates of each designated vertex; the method is further specifically configured to traverse the ordered spatial object sequence, and if a first extended minimum boundary rectangle corresponding to a first spatial object and a second extended minimum boundary rectangle corresponding to a second spatial object have a coincidence region in a specified direction, determine that the first spatial object and the second spatial object are reference space self-connected dyads.
In a possible implementation manner, the third determining module 150 is further specifically configured to, if the first extended minimum boundary rectangle and the second extended minimum boundary rectangle do not have a common area, remove the first spatial object and the second spatial object from the reference space self-connected dyads.
In a possible implementation manner, the third determining module 150 is further specifically configured to, if there is a common region between the first extended minimum boundary rectangle and the second extended minimum boundary rectangle, determine whether a specified vertex of the common region is in a subspace where the first spatial object is located; and if the specified vertex of the common area is not in the subspace where the first spatial object is located, removing the first spatial object and the second spatial object from the reference space self-connection dyads.
In a possible implementation manner, the third determining module 150 is further specifically configured to determine a 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; determining that the first spatial object and the second spatial object are a reference spatial self-connected dyad if the spatial connection distance between the first spatial object and the second spatial object is less than or equal to the given spatial distance; in the case that the spatial join distance between the first spatial object and the second spatial object is greater than the given spatial distance, culling the first spatial object and the second spatial object from the reference spatial self-join doublet.
In one possible implementation, the reference space-included self-connected doublet in any subspace is (r)i,rj) Where i, j are different positive integers, a fourth determining module 160, specifically configured to self-join the space doublet (r)j,ri)、(ri,ri) And (r)j,rj) And adding the binary groups into any subspace to generate a spatial self-connection binary group set included in any subspace.
The foregoing explanation of the embodiment of the method for determining a spatial self-connected binary group is also applicable to the apparatus for determining a spatial self-connected binary group in this embodiment, and is not repeated here.
The device for determining the spatial self-connection binary group according to the embodiment of the disclosure may determine the global area according to the minimum boundary rectangle corresponding to the spatial object set by obtaining the given spatial distance and the spatial object set. And then, carrying out quadtree division on the whole area to obtain a plurality of subspaces, then determining a reference space self-connection binary group in each subspace in the global domain, further verifying the reference space self-connection binary group to determine a space self-connection binary group meeting the condition, and expanding the space self-connection binary group to generate a complete space self-connection binary group set. Therefore, the global area is subjected to space division by referring to the space object set so as to obtain a plurality of subspaces, so that the data volume of each subspace is approximately equal, the load balance is further ensured, and the overall operation efficiency is improved. Meanwhile, the spatial self-connection binary group meeting the condition is determined by screening and verifying the reference spatial self-connection binary group, and the spatial self-connection binary group can be expanded to generate a complete spatial self-connection binary group set. The accuracy and the integrity of the spatial self-connection binary group can be further improved, repeated loading and repeated calculation of data are avoided, and the overall performance is greatly improved.
In order to implement the foregoing embodiments, the present disclosure also provides a computer device, including: the memory, the processor and the computer program stored in the memory and executable on the processor, when the processor executes the program, the method for determining the spatial self-connected doublet is implemented as proposed in the foregoing embodiments of the present disclosure.
In order to achieve 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 a spatial self-connected doublet as proposed by the foregoing embodiments of the present disclosure.
In order to implement the foregoing embodiments, the present disclosure further provides a computer program product, which when executed by an instruction processor in the computer program product, performs the method for determining a spatial self-connected doublet as set forth in the foregoing embodiments of the present disclosure.
FIG. 7 illustrates a block diagram of an exemplary computer device suitable for use in implementing embodiments of the present disclosure. The computer device 12 shown in fig. 7 is only an example and should not bring any limitations to the functionality or scope of use of the embodiments of the present disclosure.
As shown in FIG. 7, computer device 12 is in the form of a general purpose computing device. The components of computer device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 that couples various system components including the system memory 28 and the processing unit 16.
Bus 18 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. These architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MAC) bus, enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus, to name a few.
Computer device 12 typically includes a variety of computer system readable media. Such media may be any available media that is accessible by computer device 12 and includes both volatile and nonvolatile media, removable and non-removable media.
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. Computer device 12 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 34 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 7, and commonly referred to as a "hard drive"). Although not shown in FIG. 7, a disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a Compact disk Read Only Memory (CD-ROM), a Digital versatile disk Read Only Memory (DVD-ROM), or other optical media) may be provided. In these cases, each drive may be connected to bus 18 by one or more data media interfaces. Memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the disclosure.
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 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. Program modules 42 generally perform the functions and/or methodologies of the embodiments described in this disclosure.
Computer device 12 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), with one or more devices that enable a user to interact with computer device 12, and/or with any devices (e.g., network card, modem, etc.) that enable computer device 12 to communicate with one or more other computing devices. Such communication may be through an input/output (I/O) interface 22. Moreover, computer device 12 may also 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 Network adapter 20. As shown, network adapter 20 communicates with the other modules of computer device 12 via bus 18. It should be understood that although not shown in the figures, other hardware and/or software modules may be used in conjunction with 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, among others.
The processing unit 16 executes various functional applications and data processing, for example, implementing the methods mentioned in the foregoing embodiments, by executing programs stored in the system memory 28.
According to the technical scheme of the embodiment of the disclosure, a given spatial distance and a spatial object set are firstly obtained, then a global area is determined according to a minimum boundary rectangle corresponding to the spatial object set, the global area is subjected to subspace division to obtain a plurality of subspaces, then the spatial object set is partitioned according to the position relation between each spatial object and each subspace to determine the spatial object contained in each subspace, a reference spatial self-connection dyads matched with the given spatial distance and contained in each subspace is determined according to a designated point coordinate corresponding to each spatial object in each subspace and the spatial distance between each spatial object, and a spatial self-connection dyads set contained in each subspace is determined based on the reference spatial self-connection dyads contained in each subspace. Therefore, the reference space self-connection binary group corresponding to each subspace is determined according to the coordinates of the designated points corresponding to each space object in each subspace and the space distance between each space object, and then the space self-connection binary group set corresponding to each subspace is generated based on the reference space self-connection binary group, so that the invalid data processing process in the space self-connection binary group calculation process is avoided, the waste of resources is reduced, and the data processing efficiency is improved.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present disclosure. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present disclosure, "a plurality" means at least two, e.g., two, three, etc., unless explicitly specifically limited otherwise.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing steps of a custom logic function or process, and alternate implementations are included within the scope of the preferred embodiment of the present disclosure in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the embodiments of the present disclosure.
The logic and/or steps represented in the flowcharts or otherwise described herein, e.g., an ordered listing of executable instructions that can be considered to implement logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium could even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
It should be understood that portions of the present disclosure may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. If implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable storage medium, and when the program is executed, the program includes one or a combination of the steps of the method embodiments.
In addition, functional units in the embodiments of the present disclosure may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium.
The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc. Although 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, and that changes, modifications, substitutions and alterations may be made to the above embodiments by those of ordinary skill in the art within the scope of the present disclosure.

Claims (25)

1. A method for determining a spatial self-join doublet, comprising:
obtaining a given spatial distance and a spatial object set, wherein the spatial object set comprises a plurality of spatial objects;
determining a global area according to the minimum boundary rectangle corresponding to the space object set;
performing subspace division on the global area to obtain a plurality of subspaces;
partitioning the space object set according to the position relation between each space object and each subspace to determine the space object contained in each subspace;
determining a reference space self-connection binary group which is included in each subspace and matched with the given space distance according to the designated point coordinate corresponding to each space object in each subspace and the space distance between the space objects;
determining a set of spatial self-connected dyads included in each of the subspaces based on the reference spatial self-connected dyads included in each of the subspaces.
2. The method of claim 1, wherein sub-space partitioning the global region to obtain a plurality of subspaces comprises:
sampling a part of the spatial objects located in the global domain from the set of spatial objects to obtain a set of reference spatial objects;
and performing quadtree division on the global area according to the number and the positions of the spatial objects in the reference spatial object set in the global domain to acquire the plurality of subspaces.
3. The method of claim 2, wherein the quadtree partitioning of the global area according to the number and positions of spatial objects in the reference spatial object set located in the global domain to obtain the plurality of subspaces comprises:
under the condition that the number of the space objects in the reference space object set in the global domain is larger than a threshold value, performing quadtree division on the global area to generate four primary subspaces;
and under the condition that the number of the space objects in the reference space object set contained in the four primary subspaces is less than or equal to the threshold value, determining the four primary subspaces as a plurality of subspaces corresponding to the reference space object set.
4. The method of claim 3, wherein after the generating four primary subspaces, further comprising:
under the condition that the number of the space objects in the reference space object set contained in any one level of subspace is larger than the threshold value, performing quadtree division on any one level of subspace to generate four secondary subspaces;
and under the condition that the number of the space objects in the reference space object set contained in the four secondary subspaces is less than or equal to the threshold value, determining the four secondary subspaces and each primary subspace containing the number of the space objects in the reference space object set less than or equal to the threshold value as the plurality of subspaces.
5. The method of claim 1, wherein the sub-dividing the global area into a plurality of subspaces comprises:
and carrying out specified times of quadtree division on the whole local area to obtain a plurality of subspaces.
6. The method of claim 1, wherein partitioning the set of spatial objects according to the position relationship of each of the spatial objects to each of the subspaces to determine the spatial objects contained in each subspace comprises:
determining the position relation between the minimum boundary rectangle corresponding to each space object and each subspace;
and under the condition that the common area exists between the minimum boundary rectangle corresponding to any space object and any subspace, determining that any space object is contained in any subspace.
7. The method according to any one of claims 1 to 5, wherein the determining the reference spatial self-connected doublet included in each subspace and matching the given spatial distance according to the designated point coordinates corresponding to each spatial object in each subspace and the spatial distance between the respective spatial objects comprises:
determining the coordinates of the appointed vertex of the expanded minimum boundary rectangle corresponding to each space object in each subspace;
sequencing each space object in each subspace according to the coordinate of each appointed vertex;
traversing the ordered space object sequence, and if a first expanded minimum boundary rectangle corresponding to a first space object and a second expanded minimum boundary rectangle corresponding to a second space object have a coincidence region in a specified direction, determining that the first space object and the second space object are reference space self-connection binary groups.
8. The method of claim 7, further comprising, after the determining that the first spatial object and the second spatial object are reference spatial self-join doublets:
and if the first expanded minimum boundary rectangle and the second expanded minimum boundary rectangle do not have a public area, removing the first spatial object and the second spatial object from the reference space self-connection binary group.
9. The method of claim 7, further comprising, after the determining that the first spatial object and the second spatial object are reference spatial self-join doublets:
if the first expanded minimum boundary rectangle and the second expanded minimum boundary rectangle have a common region, judging whether a specified vertex of the common region is in a subspace of the first space object;
and if the specified vertex of the common area is not in the subspace where the first spatial object is located, removing the first spatial object and the second spatial object from the reference space self-connection dyads.
10. The method of claim 9, wherein after said determining whether the specified vertex of the common region is in the subspace in which the first spatial object is located, further comprising:
if the designated vertex of the common area is in the subspace of the first space object, determining the space connection distance between the first space object and the second space object;
determining that the first spatial object and the second spatial object are a reference spatial self-connected dyad if the spatial connection distance between the first spatial object and the second spatial object is less than or equal to the given spatial distance;
in the case that the spatial join distance between the first spatial object and the second spatial object is greater than the given spatial distance, culling the first spatial object and the second spatial object from the reference spatial self-join doublet.
11. The method of claim 10, wherein the reference space-included self-connected doublet in any subspace is (r)i,rj) Wherein i and j are different positive integers, and the determining a spatial self-connected binary group set included in each of the subspaces based on the reference spatial self-connected binary group included in each of the subspaces includes:
will spaceSelf-join doublet (r)j,ri)、(ri,ri) And (r)j,rj) And adding the binary groups into any subspace to generate a spatial self-connection binary group set included in any subspace.
12. An apparatus for determining a spatially self-connected doublet, comprising:
the system comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for acquiring a given spatial distance and a spatial object set, and the spatial object set comprises a plurality of spatial objects;
the first determining module is used for determining a global area according to the minimum boundary rectangle corresponding to the space object set;
the second acquisition module is used for performing subspace division on the global area to acquire a plurality of subspaces;
a second determining module, configured to partition the set of spatial objects according to a position relationship between each spatial object and each subspace, so as to determine a spatial object included in each subspace;
a third determining module, configured to determine, according to the coordinates of the designated point corresponding to each spatial object in each subspace and the spatial distance between each spatial object, a reference spatial self-connected binary group included in each subspace and matching the given spatial distance;
a fourth determining module, configured to determine a spatial self-connected binary group set included in each of the subspaces based on the reference spatial self-connected binary group included in each of the subspaces.
13. The apparatus of claim 12, wherein the second obtaining module comprises:
a sampling unit, configured to sample, from the spatial object set, a part of spatial objects located in the global domain to obtain a reference spatial object set;
and the acquisition unit is used for performing quadtree division on the global area according to the number and the positions of the space objects in the reference space object set in the global domain to acquire the plurality of subspaces.
14. The apparatus of claim 13, wherein the obtaining unit is specifically configured to:
under the condition that the number of the space objects in the reference space object set in the global domain is larger than a threshold value, performing quadtree division on the global area to generate four primary subspaces;
and under the condition that the number of the space objects in the reference space object set contained in the four primary subspaces is less than or equal to the threshold value, determining the four primary subspaces as a plurality of subspaces corresponding to the reference space object set.
15. The apparatus as claimed in claim 14, wherein said obtaining unit is further specifically configured to:
under the condition that the number of the space objects in the reference space object set contained in any one level of subspace is larger than the threshold value, performing quadtree division on any one level of subspace to generate four secondary subspaces;
and under the condition that the number of the space objects in the reference space object set contained in the four secondary subspaces is less than or equal to the threshold value, determining the four secondary subspaces and each primary subspace containing the number of the space objects in the reference space object set less than or equal to the threshold value as the plurality of subspaces.
16. The apparatus of claim 12, wherein the second obtaining module is specifically configured to:
and carrying out specified times of quadtree division on the whole local area to obtain a plurality of subspaces.
17. The apparatus of claim 12, wherein the second determining module is specifically configured to:
determining the position relation between the minimum boundary rectangle corresponding to each space object and each subspace;
and under the condition that the common area exists between the minimum boundary rectangle corresponding to any space object and any subspace, determining that any space object is contained in any subspace.
18. The apparatus according to any one of claims 12 to 16, wherein the third determining module is specifically configured to:
determining the coordinates of the appointed vertex of the expanded minimum boundary rectangle corresponding to each space object in each subspace;
sequencing each space object in each subspace according to the coordinate of each appointed vertex;
traversing the ordered space object sequence, and if a first expanded minimum boundary rectangle corresponding to a first space object and a second expanded minimum boundary rectangle corresponding to a second space object have a coincidence region in a specified direction, determining that the first space object and the second space object are reference space self-connection binary groups.
19. The apparatus of claim 18, wherein the third determining module is further specifically configured to:
and if the first expanded minimum boundary rectangle and the second expanded minimum boundary rectangle do not have a public area, removing the first spatial object and the second spatial object from the reference space self-connection binary group.
20. The apparatus of claim 18, wherein the third determining module is further specifically configured to:
if the first expanded minimum boundary rectangle and the second expanded minimum boundary rectangle have a common region, judging whether a specified vertex of the common region is in a subspace of the first space object;
and if the specified vertex of the common area is not in the subspace where the first spatial object is located, removing the first spatial object and the second spatial object from the reference space self-connection dyads.
21. The apparatus of claim 20, wherein the third determining module is further specifically configured to:
if the designated vertex of the common area is in the subspace of the first space object, determining the space connection distance between the first space object and the second space object;
determining that the first spatial object and the second spatial object are a reference spatial self-connected dyad if the spatial connection distance between the first spatial object and the second spatial object is less than or equal to the given spatial distance;
in the case that the spatial join distance between the first spatial object and the second spatial object is greater than the given spatial distance, culling the first spatial object and the second spatial object from the reference spatial self-join doublet.
22. The apparatus of claim 21, wherein any subspace includes a reference space self-join doublet of (r)i,rj) Wherein i and j are different positive integers, and the fourth determining module is specifically configured to:
self-connecting space binary group (r)j,ri)、(ri,ri) And (r)j,rj) And adding the binary groups into any subspace to generate a spatial self-connection binary group set included in any subspace.
23. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the method for determining a spatial self-connected doublet according to any one of claims 1 to 11 when executing the program.
24. A computer-readable storage medium, storing a computer program, wherein the computer program, when executed by a processor, implements the method for determining a spatial self-connected doublet according to any one of claims 1 to 11.
25. A computer program product, comprising a computer program which, when executed by a processor, implements the method for determining a spatial self-connected doublet according to any one of claims 1 to 11.
CN202110113820.1A 2021-01-27 2021-01-27 Method and device for determining space self-connection binary group and computer equipment Pending CN113761092A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110113820.1A CN113761092A (en) 2021-01-27 2021-01-27 Method and device for determining space self-connection binary group and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110113820.1A CN113761092A (en) 2021-01-27 2021-01-27 Method and device for determining space self-connection binary group and computer equipment

Publications (1)

Publication Number Publication Date
CN113761092A true CN113761092A (en) 2021-12-07

Family

ID=78786487

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110113820.1A Pending CN113761092A (en) 2021-01-27 2021-01-27 Method and device for determining space self-connection binary group and computer equipment

Country Status (1)

Country Link
CN (1) CN113761092A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022161368A1 (en) * 2021-01-27 2022-08-04 京东城市(北京)数字科技有限公司 Method and apparatus for determining spatial two-tuple, computer device, and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022161368A1 (en) * 2021-01-27 2022-08-04 京东城市(北京)数字科技有限公司 Method and apparatus for determining spatial two-tuple, computer device, and storage medium

Similar Documents

Publication Publication Date Title
Williams et al. Discrete element simulation and the contact problem
CN113761093A (en) Method and device for determining space binary group, computer equipment and storage medium
US10423751B2 (en) Semiconductor package floating metal checks
US7620528B2 (en) Method and program for labeling multi material data
Ogayar et al. Point in solid strategies
US20240152532A1 (en) Method and apparatus for determining spatial relationship, computer device, and storage medium
WO2007002494A2 (en) Real-time precision ray tracing
WO2009035737A2 (en) Adaptive refinement tools for tetrahedral unstructured grids
CN113761092A (en) Method and device for determining space self-connection binary group and computer equipment
JP4947394B2 (en) Simultaneous simulation of Markov chains using the quasi-Monte Carlo method
Teng et al. IDEAL: a vector-raster hybrid model for efficient spatial queries over complex polygons
JP4653538B2 (en) 3D data management device, 3D data management program, and 3D data management method
CN100367284C (en) Boundary data inside/outside judgment method and program thereof
CN116258840B (en) Hierarchical detail representation tree generation method, device, equipment and storage medium
Guo et al. Efficient triangulation of Poisson-disk sampled point sets
US11449566B2 (en) Methods and systems for processing geospatial data
Cao et al. A fast and generalized broad-phase collision detection method based on kd-tree spatial subdivision and sweep-and-prune
Li et al. Efficient data modeling and querying system for multi-dimensional spatial data
de Magalhães et al. Exact fast parallel intersection of large 3-D triangular meshes
Chang et al. Computing local signed distance fields for large polygonal models
Li et al. Fast and robust point-in-spherical-polygon tests using multilevel spherical grids
CN110945499B (en) Method and system for real-time three-dimensional space search and point cloud registration by applying dimension shuffling transformation
US10977861B1 (en) Inferring quality in point cloud-based three-dimensional objects using topographical data analysis
CN113658033B (en) GPU method for calculating internal point set of given region
Lai et al. A cell subdivision strategy for r‐nearest neighbors computation

Legal Events

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