Method, device, computer device, and storage medium for determining spatial 2-tuples

By partitioning spatial data into subspaces based on minimum bounding rectangles, the method efficiently identifies spatial 2-tuples, reducing resource waste and enhancing data processing efficiency.

JP7591153B2Active Publication Date: 2024-11-27JINGDONG CITY BEIJING DIGITS TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
JP2023541038
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2021-01-27
Filing Date
2022-01-25
Publication Date
2024-11-27
Estimated Expiration
2042-01-25

AI Technical Summary

Technical Problem

Existing spatial data analysis methods suffer from inefficiencies due to the selection of inappropriate global domains, leading to wasted network bandwidth and computing resources, which degrade overall performance.

Method used

A method for determining spatial 2-tuples involves obtaining spatial objects, determining a global domain using minimum bounding rectangles, partitioning this domain into subspaces, and dividing spatial objects based on positional relationships to identify matching spatial distances within each subspace.

Benefits of technology

This approach pre-filters invalid data, reduces resource overhead, and improves data processing efficiency by determining spatial 2-tuples within smaller global domains.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007591153000002
    Figure 0007591153000002
  • Figure 0007591153000003
    Figure 0007591153000003
  • Figure 0007591153000004
    Figure 0007591153000004
Patent Text Reader

Abstract

The present disclosure provides a method, apparatus, computer device and storage medium for determining spatial 2-tuples, particularly related to the field of computer technology. The method includes the steps of: obtaining a given spatial distance and a plurality of spatial objects, each of which belongs to a first spatial object set or a second spatial object set; determining a global domain based on a minimum bounding rectangle and an extended minimum bounding rectangle of the first spatial object set and the second spatial object set, respectively; partitioning the global domain to obtain a plurality of subspaces; partitioning the plurality of spatial objects based on a positional relationship between each of the spatial objects and each of the subspaces to determine spatial objects included in each subspace; and determining a spatial 2-tuple that matches the given spatial distance and is included in each of the subspaces based on a spatial distance between each spatial object in each of the subspaces, thereby improving processing efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Priority information

[0001] This application is based on a Chinese patent application with Chinese patent application number "202110113826.9" and filing date of January 27, 2021, and claims priority to the Chinese patent application, the entire contents of which are hereby incorporated by reference into this application. [Technical field]

[0002] The present disclosure relates to the field of computer technology, and more particularly to a method, apparatus, computer device and storage medium for determining a spatial 2-tuple. [Background technology]

[0003] With the popularity of global positioning systems and mobile Internet devices, a large amount of spatial data is generated. Distance connection to spatial data is one of the most common spatial analysis operators and has a wide range of application scenarios, such as searching for points of interest within 500 meters of a subway station, assisting in company location planning, finding roads and bridges crossed by rivers, and eliminating the risk of flooding. At the stage of area partitioning, selecting too many global domains without pre-filtering invalid data that does not contribute to the final result may result in a waste of network bandwidth and computing storage resources, resulting in poor overall performance. How to select a more appropriate global domain is of great importance. Summary of the Invention

[0004] The present disclosure aims to solve at least one of the technical problems of the related art to some extent.

[0005] An embodiment of a first aspect of the present disclosure provides a method for determining a spatial 2-tuple, the method including the steps of: obtaining a given spatial distance and a plurality of spatial objects, each of which belongs to a first spatial object set or a second spatial object set; determining a global domain based on a minimum bounding rectangle and an extended minimum bounding rectangle corresponding to each of the first spatial object set and the second spatial object set; partitioning subspaces on the global domain to obtain a plurality of subspaces; partitioning the plurality of spatial objects based on a positional relationship between each of the spatial objects and each of the subspaces to determine spatial objects included in each subspace; and determining a spatial 2-tuple matching the given spatial distance included in each of the subspaces based on a spatial distance between individual spatial objects in each of the subspaces.

[0006] An embodiment of a second aspect of the present disclosure provides an apparatus for determining a spatial 2-tuple, the apparatus comprising: a first acquisition module for acquiring a given spatial distance and a plurality of spatial objects, where each of the spatial objects belongs to a first spatial object set or a second spatial object set; a first determination module for determining a global domain based on a minimum bounding rectangle and an extended minimum bounding rectangle corresponding to each of the first spatial object set and the second spatial object set; a second acquisition module for partitioning subspaces on the global domain to obtain a plurality of subspaces; a second determination module for partitioning the plurality of spatial objects based on a positional relationship between each of the spatial objects and each of the subspaces to determine spatial objects included in each subspace; and a third determination module for determining a spatial 2-tuple matching the given spatial distance included in each of the subspaces based on a spatial distance between individual spatial objects in each of the subspaces.

[0007] An embodiment of a third aspect of the present disclosure provides a computer apparatus, comprising a memory, a processor, and a computer program stored in the memory and operable on the processor, the processor, when executing the program, realizing the spatial 2-tuple determination method provided by the embodiment of the first aspect of the present disclosure.

[0008] An embodiment of a fourth aspect of the present disclosure provides a non-transitory computer-readable storage medium including a computer program, which, when executed by a processor, implements the spatial 2-tuple determination method provided by the embodiment of the first aspect of the present disclosure.

[0009] An embodiment of the fifth aspect of the present disclosure is a computer program M The computer program To The instructions in the section, when executed by a processor, perform a method for determining a spatial 2-tuple presented by an embodiment of the first aspect of the present disclosure.

[0010] The spatial 2-tuple determination method, apparatus, computer device and storage medium provided by the embodiments of the present disclosure have the following beneficial effects.

[0011] A given spatial distance and a number of spatial objects can be obtained in advance, and a global domain can be determined based on the minimum bounding rectangle and the extended minimum bounding rectangle of the first and second spatial object sets, whereby subspaces can be partitioned with respect to the global domain to obtain a number of subspaces, and the spatial objects included in each subspace can be determined by partitioning the multiple spatial objects based on the positional relationship between each spatial object and each subspace, i.e., a spatial 2-tuple that matches the given spatial distance and is included in each subspace can be determined based on the spatial distance between the individual spatial objects in each subspace. Thus, a global domain is first determined based on the minimum bounding rectangle and the extended minimum bounding rectangle of the first and second spatial object sets, and then spatial 2-tuples in each subspace in the global domain are determined, and invalid data is pre-filtered by the smaller global domain, reducing resource overhead and improving data processing efficiency.

[0012] Additional features and advantages of the present application 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. [Brief description of the drawings]

[0013] The above and / or additional aspects and advantages of the present disclosure will become more apparent and easier to understand from the following detailed description of the embodiments taken in conjunction with the drawings. [Figure 1A] 1 is a schematic flowchart of a method for determining a spatial 2-tuple provided by an embodiment of the present disclosure. [Figure 1B] FIG. 2 is a schematic diagram of a global domain provided by one embodiment of the present disclosure. [Figure 2A] FIG. 1 is a schematic diagram of the time consumption of computation in determining spatial 2-tuples provided by one embodiment of the present disclosure. [Figure 2B]FIG. 1 is a schematic diagram of the time consumption of computation in determining spatial 2-tuples provided by one embodiment of the present disclosure. [Figure 2C] FIG. 1 is a schematic diagram of the time consumption of computation in determining spatial 2-tuples provided by one embodiment of the present disclosure. [Figure 3A] 4 is a schematic flowchart of a method for determining a spatial 2-tuple provided by another embodiment of the present disclosure; [Figure 3B] FIG. 2 is a schematic diagram of a subspace provided by one embodiment of the present disclosure. [Figure 4A] 4 is a schematic flowchart of a method for determining a spatial 2-tuple provided by another embodiment of the present disclosure; [Figure 4B] FIG. 2 is a schematic diagram of a spatial 2-tuple and subspaces provided by one embodiment of the present disclosure. [Diagram 5] FIG. 2 is a schematic configuration diagram of a spatial 2-tuple determination device provided by an embodiment of the present disclosure. [Figure 6] FIG. 2 is a schematic configuration diagram of an apparatus for determining a spatial 2-tuple provided according to another embodiment of the present disclosure; [Figure 7] FIG. 1 is a block diagram of an exemplary computing device adapted to implement embodiments of the present disclosure. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0014] Hereinafter, the embodiments of the present disclosure will be described in detail, and examples of the embodiments are illustrated in the accompanying drawings, in which the same or similar reference numerals throughout the drawings indicate the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are illustrative and are intended to explain the present disclosure, and are not to be understood as limitations on the present disclosure.

[0015] Hereinafter, a spatial 2-tuple determination method, device, computer device, and storage medium according to embodiments of the present disclosure will be described with reference to the accompanying drawings.

[0016] FIG. 1A is a schematic flowchart of a method for determining a spatial 2-tuple provided by an embodiment of the present disclosure.

[0017] In the embodiments of the present disclosure, the spatial 2-tuple determination method is described as being configured in a spatial 2-tuple determination device as an example, and the spatial 2-tuple determination device can be applied to any computer device so that the computer device can perform the spatial 2-tuple determination function.

[0018] The computing device may be a personal computer (abbreviated as PC), a cloud device, a mobile device, etc., and the mobile device may be a hardware device equipped with various operating systems, touch screens and / or displays, such as, for example, a mobile phone, a tablet computer, a personal digital assistant, a wearable device, an in-vehicle device, etc.

[0019] As shown in FIG. 1A, the method for determining the spatial 2-tuple may include the following steps 101 to 105.

[0020] In step 101, a given spatial distance and a number of spatial objects are obtained, and each spatial object belongs to either a first spatial object set or a second spatial object set.

[0021] A given spatial distance can be denoted as δ, which can be any positive number.

[0022] Also, for ease of explanation, the first spatial object set may be denoted as S, the second spatial object set may be denoted as R, a spatial object among the acquired spatial objects that belongs to the first spatial object set S may be denoted as s, and a spatial object among the acquired spatial objects that belongs to the second spatial object set R may be denoted as r.

[0023] It should be noted that the spatial object may be a point object, a line object, a plane object, or the like.

[0024] It should be noted that the above δ, S, R, s, and r are merely general descriptions and cannot be considered as limitations to a given spatial distance, first set of spatial objects, second set of spatial objects, spatial objects, etc. of the present disclosure.

[0025] In step 102, a global domain is determined based on the corresponding minimum bounding rectangles and extended minimum bounding rectangles of the first and second spatial object sets, respectively.

[0026] A minimum bounding rectangle (abbreviated as MBR) can also be called a minimum circumscribing rectangle, minimum containing rectangle, or minimum enclosing rectangle. A minimum bounding rectangle is the maximum extent of some 2D shape (point, line, polygon, etc.) expressed in 2D coordinates, i.e., a rectangle bounded by the maximum abscissa, minimum abscissa, maximum ordinate, and minimum ordinate of each vertex of a given 2D shape, such that one such rectangle contains the given 2D shape and has sides parallel to the coordinate axes.

[0027] Note that the minimum bounding rectangle corresponding to the first spatial object set may be the smallest rectangle that is aligned with the coordinate axes and contains all spatial objects in the first spatial object set.

[0028] An expanded minimum bounding rectangle (abbreviated as EMBR) may also be a rectangle obtained by performing a numerical expansion on a corresponding minimum bounding rectangle.

[0029] For example, the extended minimum bounding rectangle of a second spatial object set R is the ε extension of the minimum bounding rectangle R.mbr, R.embr(ε)= <ex min ,ey min ,ex max ,ey max >= <x min -ε,y min -ε,xmax +ε,y max +ε>, <x min ,y min ,x max ,y max > is the minimum bounding rectangle of R, where ε may be any given positive number.

[0030] In addition, there may be multiple methods for determining the global domain.

[0031] For example, a minimum bounding rectangle corresponding to a first set of spatial objects and an extended minimum bounding rectangle corresponding to a second set of spatial objects can first be determined, and then the intersection of the minimum bounding rectangle and the extended minimum bounding rectangle can be determined as the global domain.

[0032] For example, in the schematic diagram shown in FIG. 1B, the minimum bounding rectangle corresponding to the first spatial object set S is S.mbr in the shaded region on the right, the minimum bounding rectangle corresponding to the second spatial object set R is R.mbr in the shaded region on the left, R.embr(δ) is the extended minimum bounding rectangle after the minimum bounding rectangle R.mbr corresponding to the second spatial object set R is extended by δ, and the intersection of S.mbr and R.embr(δ) is the determined global domain, i.e., the dashed region in the diagram.

[0033] Note that the above examples are merely illustrative and do not limit the scope, shape, content, etc. of the first spatial object set and its corresponding minimum bounding rectangle, the second spatial object set and its corresponding extended minimum bounding rectangle, etc. in the embodiments of the present disclosure.

[0034] Alternatively, an extended minimum bounding rectangle corresponding to a first set of spatial objects and a minimum bounding rectangle corresponding to a second set of spatial objects may be determined first, and then the common area between the two may be determined as the global domain.

[0035] Alternatively, an extended minimum bounding rectangle corresponding to a first set of spatial objects and an extended minimum bounding rectangle corresponding to a second set of spatial objects can be determined first, and then the common area between the two can be determined as the global domain.

[0036] Alternatively, a minimum bounding rectangle corresponding to a first set of spatial objects and a minimum bounding rectangle corresponding to a second set of spatial objects may be determined first, and then the common area between the two may be determined as the global domain.

[0037] It should be noted that the above example is merely an illustrative explanation and does not limit the manner in which the global domain is determined in the embodiments of the present disclosure.

[0038] In the embodiments of the present disclosure, a smaller global domain can be determined, which allows invalid data to be pre-filtered, and then, during data processing, the consumption of extra CPU resources and memory resources and unnecessary network transmission overhead can be reduced, thereby significantly improving the efficiency of data processing.

[0039] In step 103, a partition of the subspace is performed on the global domain to obtain a number of subspaces.

[0040] When partitioning the subspace with respect to the global domain, there can be several types of partitioning methods.

[0041] For example, a quadtree partition can be performed first on the entire global domain, which ensures that the number of spatial objects in all leaf nodes is approximately the same.

[0042] Furthermore, after performing quadtree division on the entire global domain, if many spatial objects are concentrated in two of the four parts obtained, further quadtree division can be performed on these two parts, thereby obtaining multiple subspaces.

[0043] Alternatively, octree partitioning can be performed on the global domain, and if the partitioning result obtained shows that many spatial objects are concentrated in three parts, then octree partitioning can be further performed on these three parts, thereby obtaining multiple subspaces.

[0044] It should be noted that the above examples are merely illustrative and are not intended to limit the obtaining of multiple subspaces in the embodiments of the present disclosure.

[0045] In an embodiment of the present disclosure, by partitioning the global domain into multiple subspaces, the spatial objects in each subspace can be made as substantially identical as possible, thereby achieving load balancing and further improving overall operating efficiency.

[0046] In step 104, the spatial objects are partitioned into sections based on the positional relationship between each spatial object and each subspace, and the spatial objects included in each subspace are determined.

[0047] The positional relationship may be intersecting, completely overlapping, or not intersecting.

[0048] Also, there can be multiple approaches to determining the spatial objects contained in each subspace.

[0049] For example, after determining the positional relationship between each spatial object and each subspace in advance, when dividing a plurality of spatial objects into sections, spatial objects that belong to the same subspace can be divided into the same subspace.

[0050] For example, if spatial object r1 intersects with subspace 1, the spatial object r1 can be partitioned into subspace 1. If spatial object s1 intersects with both subspace 1 and subspace 2, the spatial object s1 can be partitioned into subspace 1 and subspace 2, and it can be determined that subspace 1 contains spatial objects r1 and s1, and subspace 2 contains spatial object s1.

[0051] Alternatively, the positional relationship between the minimum bounding rectangle corresponding to each spatial object and each subspace may be determined in advance, and when dividing a plurality of spatial objects into sections, spatial objects belonging to the same subspace may be divided into the same subspace.

[0052] For example, if a minimum bounding rectangle R1.mbr corresponding to spatial object r1 intersects with subspace 2, then the spatial object r1 can be partitioned into subspace 2. If a minimum bounding rectangle S1.mbr corresponding to spatial object s1 intersects with subspace 1, subspace 2, and subspace 3, then the spatial object s1 can be partitioned into subspace 1, subspace 2, and subspace 3, and it can be determined that subspace 1 contains spatial object s1, subspace 2 contains spatial objects r1 and s1, and subspace 3 contains spatial object s1.

[0053] Alternatively, the positional relationship between the extended minimum bounding rectangle corresponding to each spatial object and each subspace can be determined first, and then when dividing multiple spatial objects into sections, spatial objects that belong to the same subspace can be divided into the same subspace.

[0054] For example, if the extended minimum bounding rectangle R1.embr corresponding to spatial object r1 intersects with subspace 1, then spatial object r1 can be partitioned into subspace 1. If the extended minimum bounding rectangle S1.embr corresponding to spatial object s1 intersects with both subspace 1 and subspace 2, then spatial object s1 can be partitioned into subspace 1 and subspace 2, and it can be determined that subspace 1 contains spatial objects r1 and s1, and subspace 2 contains spatial object s1.

[0055] It should be noted that the above r1, s1, R1.mbr, S1.mbr, R1.embr, S1.embr, etc. are merely schematic descriptions and are not intended to limit the determination of spatial objects contained in each subspace in the embodiments of the present disclosure.

[0056] In step 105, based on the spatial distances between the individual spatial objects in each subspace, determine the spatial 2-tuples contained in each subspace that match the given spatial distance.

[0057] When determining the spatial distance between individual spatial objects, it may be calculated using a minimum Euclidean distance formula, or it may be calculated using a Manhattan distance formula, or the like.

[0058] If the spatial distance between a first spatial object and a second spatial object in any subspace is less than or equal to a value δ, it can be determined that the spatial objects in the group are spatial 2-tuples that satisfy the matching condition.

[0059] For example, the spatial objects in subspace 1 include s1, s2, s3, r1, and r2. Then, in the minimum Euclidean distance formula, the spatial distances between s1 and r1, between s1 and r2, between s2 and r1, between s2 and r2, between s3 and r1, and between s3 and r2 are L 11 , L 12 , L 21 , L 22 , L 31 , L 32 It is determined that L11 , L 22 , L 31 are all less than or equal to the δ value, it can be determined that the space 2 tuples contained in subspace 1 that are less than or equal to the δ value are (s1, r1), (s2, r2), and (s3, r1).

[0060] In addition, the spatial distance L between the above subspace 1 and spatial objects r1, r2, s1, s2, and s3 11 , L 12 , L 21 , L 22 , L 31 , L 32 etc. are merely general descriptions and are not intended to limit the subspaces, individual spatial objects, spatial distances, and spatial 2-tuples of the embodiments of the present disclosure.

[0061] Next, an experiment will be conducted using the Open Street Map (OSM) spatial dataset as an example to specifically describe the effect of the spatial 2-tuple determination method provided by the present disclosure.

[0062] Table 1 summarizes the point and polygon data used in the experiments, which are globally distributed and spatially non-uniform. [Table 1]

[0063] In this experiment, the experimental environment is a distributed cluster consisting of five servers, each of which is configured with CentOS 7.4, 30-core CPU, 100GB memory, and 1T hard disk. The big data components used are Hadoop 2.7.3 and Spark 2.3.3.

[0064] In order to verify the superiority of the spatial 2-tuple determination method provided by the present disclosure in the global domain, the global spatial range is divided into five square regions with both vertical and horizontal spans of 180°: Grid1, Grid2, Grid3, Grid4 and Grid5, and the areas of the intersections between Grid1 and the other four regions are 20%, 40%, 60%, and 80% of the area of ​​Grid1, respectively, which are called spatial overlaps here, and the spatial overlap between Grid1 and itself is 100%. In the experiment, the dataset corresponding to Grid1 corresponds to R. In the experiment, the overlap of the two datasets is used as a variable to observe the time consumed for calculating spatial distance connections with overlaps of 20%, 40%, 60%, 80%, and 100%, respectively. In addition, in order to verify the superiority in scalability of the spatial 2-tuple determination method provided by the present disclosure, the experiment also uses the spatial distance δ as a variable to observe the time consumed for calculating spatial distance connections with δ being 0, 50, 100, 150, and 200 meters, respectively. Note that some systems do not support spatial distance connections, and only spatial connections are supported, i.e., δ=0. Therefore, when overlap is a variable, the default value of δ is 0. When δ is a variable, the default value of overlap is 60%.

[0065] As shown in Fig. 2A, the spatial objects in the spatial 2-tuple are points and points, which is a schematic diagram of the computation time required to determine the spatial distance between the points. As shown in Fig. 2B, the spatial objects in the spatial 2-tuple are polygons and points, which is a schematic diagram of the computation time required to determine the spatial distance between the polygons and points. As shown in Fig. 2C, the spatial objects in the spatial 2-tuple are polygons and polygons, which is a schematic diagram of the computation time required to determine the spatial distance between the polygons and polygons.

[0066] As can be seen from the analysis of Figures 2A, 2B, and 2C, the method for determining spatial 2-tuples provided by the present disclosure is superior in efficiency and accuracy to other existing state-of-the-art distribution methods.

[0067] It should be noted that the above experiments are merely illustrative and do not limit the experimental environment, experimental data, components used, and the like of the embodiments of the present disclosure.

[0068] In the embodiment of the present disclosure, a given spatial distance and a plurality of spatial objects can be obtained first, and then a global domain can be determined based on the corresponding minimum bounding rectangle and the extended minimum bounding rectangle of each of the first and second spatial object sets, thereby partitioning subspaces in the global domain to obtain a plurality of subspaces, and further partitioning the plurality of spatial objects based on the positional relationship between each spatial object and each subspace to determine the spatial objects included in each subspace, that is, a spatial 2-tuple that matches the given spatial distance and is included in each subspace can be determined based on the spatial distance between the individual spatial objects in each subspace. Thus, a global domain is first determined based on the corresponding minimum bounding rectangle and the extended minimum bounding rectangle of each of the first and second spatial object sets, and then spatial 2-tuples in each subspace in the global domain are determined, and invalid data is pre-filtered by the smaller global domain, reducing resource overhead and improving data processing efficiency.

[0069] In the above embodiment, a global domain is first determined based on the corresponding minimum bounding rectangle and the extended minimum bounding rectangle of the first spatial object set and the second spatial object set, respectively, and then spatial 2-tuples in each subspace in the global domain are determined. In some implementations, when partitioning the global domain into multiple subspaces, the global domain can be spatially partitioned based on the first spatial object set and the second spatial object set, respectively, to obtain multiple subspaces, and the above process is described in detail below in conjunction with FIG. 3A.

[0070] As shown in FIG. 3A, the method for determining the spatial 2-tuple may include the following steps 201 to 207.

[0071] Step 201, obtain a given spatial distance and a number of spatial objects, where each spatial object belongs to a first spatial object set or a second spatial object set.

[0072] Step 202 determines a global domain based on the corresponding minimum bounding rectangles and extended minimum bounding rectangles of the first and second spatial object sets, respectively.

[0073] Step 203: respectively sample the partial spatial objects located in the global domain from the first spatial object set and the second spatial object set to obtain the first reference spatial object set and the second reference spatial object set. For a large amount of spatial data, sampling can be performed before corresponding data processing in order to improve the processing speed and efficiency.

[0074] It should be noted that, in different application scenarios, the magnitude of the sampling rate may be different, for example, the sampling rate may be 0.01, 0.05, 0.1, 0.2, etc.

[0075] Therefore, in practical use, an appropriate sampling rate can be selected according to the actual situation. For example, in the embodiment of the present disclosure, when sampling at a sampling rate of 0.01, the obtained sampling data can better represent the spatial distribution of the entire data set.

[0076] The first reference spatial object set may also be a spatial object set after sampling spatial objects located within the global domain of the first spatial object set at a certain sampling rate, and correspondingly, the second reference spatial object set may be a spatial object set after sampling spatial objects located within the global domain of the second spatial object set at this sampling rate.

[0077] Step 204: Based on the number and positions of spatial objects in a first reference spatial object set located in the global domain and the number and positions of spatial objects in a second reference spatial object set located in the global domain, a quadtree division is performed on the global domain to obtain a first spatial set and a second spatial set, respectively.

[0078] When performing a quadtree decomposition on the global domain, various cases are possible.

[0079] For example, if the number of spatial objects in the first set of reference spatial objects located within the global domain is greater than a threshold, a quadtree division may be performed on the global domain to generate four primary subspaces.

[0080] The threshold may be a preset numerical value, which may be any positive integer.

[0081] For example, the threshold is 200, and the number of spatial objects located within the global domain in the first reference spatial object set is 220, which is greater than the threshold of 200, so a quadtree division can be performed on the global domain, thereby generating four primary subspaces.

[0082] It should be noted that the above is merely an illustrative description and does not limit the number of spatial objects, thresholds, primary subspaces, etc. that are located within the global domain in the first reference spatial object set in an embodiment of the present disclosure.

[0083] Then, if the number of spatial objects in the first reference spatial object set contained in the four primary subspaces is equal to or less than a threshold, the four primary subspaces are determined as a first spatial set corresponding to the first reference spatial object set.

[0084] For example, if the threshold is 100 and the number of spatial objects in the first reference spatial object set located in the global domain is 220, which is greater than the threshold of 100, then a quadtree division can be performed on the global domain, and the numbers of spatial objects in the first reference spatial object set contained in the four generated primary subspaces are 20, 50, 70, and 80, respectively, which are all less than the threshold, then the quadtree division can be stopped and the four primary subspaces are determined as the first spatial set corresponding to the first reference spatial object set.

[0085] It should be noted that the above is merely an exemplary description and does not limit the number of spatial objects, threshold value, first spatial set, etc., of the first reference spatial object set included in the primary subspace of an embodiment of the present disclosure.

[0086] Alternatively, in some implementations, if the number of spatial objects in the first reference spatial object set contained in any primary subspace is greater than a threshold, a quadtree division is performed on any primary subspace to generate four secondary subspaces.

[0087] For example, if the threshold is 100 and the number of spatial objects in the first reference spatial object set located within the global domain is 220, which is greater than the threshold of 100, then quadtree division can be performed on the global domain, and if the numbers of spatial objects in the first reference spatial object set contained in the four generated primary subspaces are 150, 20, 10, and 40, respectively, and 150 is greater than the threshold, then quadtree division can be subsequently performed on the primary subspace corresponding to the number of spatial objects which is 150, thereby generating four secondary subspaces.

[0088] It should be noted that the above is merely an exemplary description and does not limit the number of spatial objects, thresholds, first spatial set, secondary subspace, etc., of the first reference spatial object set included in the primary subspace of an embodiment of the present disclosure.

[0089] Then, if the number of spatial objects in the first reference spatial object set contained in the four secondary subspaces is less than or equal to a threshold, each primary subspace of spatial objects in the object set in which the number of spatial objects in the first reference spatial object set contained in the four secondary subspaces is less than or equal to a threshold is determined as a first spatial set corresponding to the first reference spatial object set.

[0090] For example, if the threshold is 100, and the number of spatial objects located in the global domain of the first reference spatial object set is 220, which is greater than the threshold of 100, then quadtree division can be performed on the global domain. The four generated primary subspaces can be represented as primary subspace 1, primary subspace 2, primary subspace 3, and primary subspace 4, and the number of spatial objects of the first reference spatial object set contained in each primary subspace is 150, 20, 10, and 40, respectively, and 150 is greater than the threshold, then quadtree division can be performed on the primary subspace 1 to generate four secondary subspaces. The number of spatial objects of the first reference spatial object set contained in the four generated secondary subspaces can be 30, 40, 50, and 30, and if all of them are less than the threshold, then the four secondary subspaces, primary subspace 2, primary subspace 3, and primary subspace 4, can be determined as the first spatial set corresponding to the first reference spatial object set.

[0091] Accordingly, if the number of spatial objects in the first reference spatial object set contained in any of the generated secondary subspaces is greater than a threshold, quadtree division can continue to be performed on that any of the generated secondary subspaces until the number of spatial objects in the first reference spatial object set contained in each of the generated subspaces is equal to or less than the threshold.

[0092] It should be noted that the above is merely an illustrative description and does not limit the number of spatial objects in the first reference spatial object set included in each subspace of the embodiments of the present disclosure, the threshold value, the first spatial set, each subspace, etc.

[0093] Also, if the number of spatial objects located within the global domain among the second reference spatial object set is greater than a threshold value, the step of performing quadtree division on the global domain is repeatedly performed until a second spatial set corresponding to the second reference spatial object set is determined.

[0094] When determining the second spatial set corresponding to the second reference spatial object set, the operation can be performed in the manner of determining the first spatial set corresponding to the above-mentioned first reference spatial object set, whereby, if the number of spatial objects located in any subspace of the second reference spatial object set is greater than a threshold, the operation of performing quadtree division on this any subspace is repeatedly performed until the number of spatial objects in the second reference spatial object set contained in each subspace is equal to or less than the threshold, thereby determining the second spatial set corresponding to the second reference spatial object set.

[0095] For example, if the threshold is 100, and the number of spatial objects located in the global domain of the second reference spatial object set is 220, which is greater than the threshold of 100, then the global domain can be subjected to quadtree division, and the four generated primary subspaces can be represented as primary subspace 1, primary subspace 2, primary subspace 3, and primary subspace 4. If the number of spatial objects of the second reference spatial object set contained in each primary subspace is 150, 20, 10, and 40, respectively, and 150 is greater than the threshold, then the primary subspace 1 can be subjected to quadtree division, thereby generating four secondary subspaces. The four generated secondary subspaces can be represented as secondary subspace 1, secondary subspace 2, secondary subspace 3, and secondary subspace 4, and the number of spatial objects of the second reference spatial object set contained in each secondary subspace can be 20, 130, 60, and 10, respectively, and if the number of spatial objects of the second reference spatial object set contained in secondary subspace 2 is greater than the threshold, then the secondary subspace 2 can be subjected to quadtree division, thereby generating four tertiary subspaces. The number of spatial objects in the second reference spatial object set contained in the four tertiary subspaces may be 10, 20, 60, or 30, and if any of them is smaller than a threshold value, the four tertiary subspaces, secondary subspace 1, secondary subspace 3, secondary subspace 4, primary subspace 2, primary subspace 3, and primary subspace 4 can be determined as a second spatial set corresponding to the second reference spatial object set.

[0096] It should be noted that the above is merely an illustrative description and does not limit the number of spatial objects, thresholds, second spatial sets, each subspace, etc., of the second reference spatial object set included in each subspace of the embodiments of the present disclosure.

[0097] Step 205: merge the first space set and the second space set to determine a number of subspaces.

[0098] Hierarchies of subspaces partitioned by quadtrees can be merged accordingly.

[0099] For example, if the first spatial set and the second spatial set are subspaces of the same hierarchy, each individual subspace can be merged correspondingly.

[0100] For example, if the finally determined first spatial set is four primary subspaces, which are primary subspace 1, primary subspace 2, primary subspace 3, and primary subspace 4, and the second spatial set is also four primary subspaces, which are primary subspace 5, primary subspace 6, primary subspace 7, and primary subspace 8, the primary subspaces at the corresponding positions can be respectively merged. For example, if both primary subspace 1 and primary subspace 5 are located at the upper left of each spatial set, both primary subspace 2 and primary subspace 6 are located at the lower left of each spatial set, both primary subspace 3 and primary subspace 7 are located at the upper right of each spatial set, and both primary subspace 4 and primary subspace 8 are located at the lower right of each spatial set, the primary subspace 1 and primary subspace 5, the primary subspace 2 and primary subspace 6, the primary subspace 3 and primary subspace 7, and the primary subspace 4 and primary subspace 8 can be respectively merged.

[0101] Or, if any Nth order subspace of the first spatial set contains a respective N+1th order subspace of the second spatial set, add the respective N+1th order subspace to the subspace, where N is a positive integer.

[0102] For example, the individual subspaces of the first spatial set may be primary subspace 2, primary subspace 3, primary subspace 4, secondary subspace 1, secondary subspace 2, secondary subspace 3, and secondary subspace 4, respectively, and the individual subspaces of the second spatial set may be primary subspace 2, primary subspace 3, primary subspace 4, secondary subspace 1, secondary subspace 2, secondary subspace 3, tertiary subspace 1, tertiary subspace 2, tertiary subspace 3, and tertiary subspace 4, respectively. In this case, when fusing the first spatial set and the second spatial set, each primary subspace and secondary subspace can be first fusing correspondingly, and each tertiary subspace of the second spatial set can be added to the subspace.

[0103] Or, in the schematic diagram of the subspace partition as shown in FIG. 3B, the first space set S is partitioned twice to obtain three primary subspaces and four secondary subspaces, and the second space set R is partitioned three times to obtain two primary subspaces, seven secondary subspaces and four tertiary subspaces, so that when the subspaces of the first space set S and the subspaces of the second space set R are merged, the primary subspaces in S and the primary subspaces in R, the secondary subspaces in S and the secondary subspaces in R can be merged correspondingly, and each tertiary subspace of the second space set R can be added to the subspace, and the partition results of the subspaces are as shown in FIG. 3B, which are primary subspace 12, primary subspace 4, secondary subspace 3, secondary subspace 2, secondary subspace 1, secondary subspace 0, secondary subspace 11, secondary subspace 10, secondary subspace 5, tertiary subspace 9, tertiary subspace 8, tertiary subspace 7 and tertiary subspace 6 respectively.

[0104] It should be noted that the above examples are merely illustrative and do not limit the subspaces of the first space set and the second space set in the embodiments of the present disclosure.

[0105] Step 206: based on the positional relationship between each spatial object and each subspace, the spatial objects are partitioned into sections, and the spatial objects included in each subspace are determined.

[0106] Step 207, based on the spatial distances between individual spatial objects in each subspace, determines spatial 2-tuples contained in each subspace that match the given spatial distance.

[0107] In an embodiment of the present disclosure, a given spatial distance and a number of spatial objects are obtained, and a global domain is determined based on the minimum bounding rectangle and the extended minimum bounding rectangle to which the first spatial object set and the second spatial object set correspond, respectively. When partitioning the global domain into subspaces, a partial sampling may first be performed on the spatial objects located in the global domain among the individual spatial object sets to obtain a first reference spatial object set and a second reference spatial object set. Then, based on the number and positions of the spatial objects in the first reference spatial object set located in the global domain and the number and positions of the spatial objects in the second reference spatial object set located in the global domain, a quadtree partition is performed on the global domain to obtain a first spatial set and a second spatial set, which are then merged to determine a number of subspaces. Then, the spatial objects included in each subspace are determined, and spatial 2-tuples that satisfy the conditions in each subspace are determined. As a result, the global domain is spatially partitioned based on the first spatial object set and the second spatial object set, respectively, to obtain a number of subspaces, which makes the amount of data in each subspace approximately the same, and further ensures load balancing and improves overall operation efficiency.

[0108] In the above embodiment, the spatial 2 tuples in each subspace can be determined by performing multiple quadtree partitions on the global domain and then re-partitioning the spatial objects based on the positional relationship between each spatial object and each subspace. In some implementations, the same spatial object may span multiple subspaces, such that different subspaces may contain the same spatial 2 tuples, resulting in duplicated spatial 2 tuples in the finally obtained spatial 2 tuple set. Therefore, after determining the spatial 2 tuples contained in each subspace, the spatial 2 tuples can be further filtered so that the same spatial 2 tuples are recorded in only one subspace, thereby avoiding duplication. The above process is described in detail below in conjunction with FIG. 4A, and includes the following steps 301-310.

[0109] Step 301, obtain a given spatial distance and a number of spatial objects, where each spatial object belongs to a first spatial object set or a second spatial object set.

[0110] Step 302, determine the intersection between the minimum bounding rectangle corresponding to the first set of spatial objects and the extended minimum bounding rectangle corresponding to the second set of spatial objects as a global domain.

[0111] Step 303: A global domain is divided into quadtrees a specified number of times to obtain a number of subspaces.

[0112] The specified number of times may be an arbitrarily set number of times, or may be a number of times set based on the range or size of the global domain, or may be a number of times related to the number of positions of spatial objects located within the global domain.

[0113] For example, the specified number of times may be 2, 4, 7, etc. For any global domain, a specified number of quadtree divisions may be performed, thereby determining multiple subspaces based on the results of the quadtree division.

[0114] Or, if the range of the currently determined global domain is large, a large specified number such as 10, 20, etc. can be set.

[0115] Alternatively, if spatial objects located within the global domain are concentrated in a certain subspace within the global domain, a large designated number of times can be set for this subspace.

[0116] Note that the above example is merely an example, and does not limit the method and values ​​of determining the number of times designated in the embodiment of the present disclosure.

[0117] Step 304: determine the positional relationship between the minimum bounding rectangle corresponding to each spatial object and each subspace.

[0118] Step 305 determines that the given subspace contains the given spatial object if there is an intersection between the minimum bounding rectangle corresponding to the given spatial object and the given subspace.

[0119] The minimum bounding rectangle corresponding to each spatial object may have various positional relationships with each subspace, such as non-intersecting, intersecting, completely overlapping, and so on.

[0120] When the positional relationship between the minimum bounding rectangle corresponding to a given spatial object and a given subspace is such that they do not intersect, the given spatial object has no common portion with the given subspace, i.e., no common area exists.

[0121] Alternatively, if the minimum bounding rectangle corresponding to any spatial object intersects with a location in any subspace, it can be determined that a common area exists between the minimum bounding rectangle corresponding to the given spatial object and the given subspace.

[0122] Alternatively, if the positional relationship between the minimum bounding rectangle corresponding to any spatial object and any subspace is a complete overlap, it can be determined that a common area also exists between the minimum bounding rectangle corresponding to the given spatial object and any subspace.

[0123] Additionally, each subspace may be numbered, and the numbering scheme may be arbitrary, for example, numerical or alphabetical, as long as the numbering result is unique.

[0124] Furthermore, if there is an intersection between the minimum bounding rectangle corresponding to any spatial object and any subspace, then the number of this subspace can be assigned to any spatial object that has an intersection with it.

[0125] For example, there are currently four subspaces partitioned, namely subspace 1, subspace 2, subspace 3, and subspace 4, and the spatial objects are r1, r2, and s1.

[0126] If the minimum bounding rectangle R1.mbr corresponding to r1 has no intersection with subspace 1, R1.mbr has an intersection with subspace 2, R1.mbr has an intersection with subspace 3, and R1.mbr has no intersection with subspace 4, then it can be determined that spatial object r1 belongs to subspace 2 and subspace 3, and thus subspace numbers can be assigned to spatial object r1, and the number held by spatial object r1 may be 2 or 3.

[0127] Then, the relationship between the minimum bounding rectangle R2.mbr corresponding to the spatial object r2 and each subspace is compared in sequence, and if subspace 1 and subspace 3 have a common area with the minimum bounding rectangle R2.mbr, it can be determined that the numbers of the spatial object r2 are 1 and 3, respectively.

[0128] Then, the relationship between the minimum bounding rectangle S1.mbr corresponding to the spatial object s1 and each subspace is compared in sequence, and if subspace 2 and subspace 3 have a common area with the minimum bounding rectangle S1.mbr, it can be determined that the numbers held by the spatial object s1 are 2 and 3, respectively.

[0129] As a result, when dividing spatial objects into sections, spatial objects with the same number can be divided into the same subspace, and it can be determined that the spatial object contained in subspace 1 is spatial object r2, the spatial objects contained in subspace 2 are spatial objects r1 and s1, the spatial objects contained in subspace 3 are spatial objects r1, r2 and s1, and that no spatial objects are included in subspace 4.

[0130] Note that the above spatial objects r1, r2, and s1, subspace 1, subspace 2, subspace 3, subspace 4, and the positional relationships between the minimum bounding rectangles corresponding to each spatial object and each subspace are merely schematic explanations, and do not limit the spatial objects, subspaces, and the positional relationships between the minimum bounding rectangles corresponding to each spatial object and each subspace, the interval divisions of multiple spatial objects, etc., of the embodiments of the present disclosure.

[0131] Step 306, based on the spatial distances between the individual spatial objects in each subspace, determines the spatial 2-tuples contained in each subspace that match the given spatial distance.

[0132] Step 307 determines a first minimum bounding rectangle of a first spatial object and a first extended minimum bounding rectangle of a second spatial object in any spatial 2-tuple of any subspace, where the first spatial object is any spatial object in the first spatial object set and the second spatial object is any spatial object in the second spatial object set.

[0133] The first minimum bounding rectangle may be a minimum bounding rectangle corresponding to a first spatial object in any spatial 2-tuple in any subspace. The first extended minimum bounding rectangle may be an extended minimum bounding rectangle corresponding to a second spatial object in any spatial 2-tuple in any subspace.

[0134] Step 308 determines the coordinates of any vertex of the intersection between the first minimum bounding rectangle and the first expanded minimum bounding rectangle.

[0135] Step 309, if any vertex coordinates are located in any subspace, then retain any spatial 2-tuple in any subspace.

[0136] Step 310, if the coordinates of the given vertex do not lie in the given subspace, then remove the given spatial 2-tuple from each spatial 2-tuple in the given subspace.

[0137] Determining spatial 2-tuples in each subspace that match a given spatial distance introduces overlaps. For example, subspace 1 may contain (s1, r1) and subspace 2 may also contain (s1, r1). To avoid overlaps in this case, it can be ensured that each subspace does not contain overlapping spatial 2-tuples based on the location of any vertices of the intersection of the first minimum bounding rectangle of the first spatial object and the first extended minimum bounding rectangle of the second spatial object in any spatial 2-tuple in any subspace.

[0138] For example, if subspace 1 contains (s1, r1) and subspace 2 also contains (s1, r1), and for a spatial 2 tuple (s1, r1), the selected vertex is in subspace 1, then we can keep the spatial 2 tuple (s1, r1) in subspace 1 and remove the spatial 2 tuple (s1, r1) from subspace 2.

[0139] Alternatively, in a schematic diagram such as that shown in FIG. 4B, a spatial 2 tuple (s1, r1) is in both subspace 0 and subspace 1, the first minimum bounding rectangle of the first spatial object s1 in this spatial 2 tuple (s1, r1) is the right-hand rectangle S.mbr, the first extended minimum bounding rectangle of the second spatial object r1 is the left-hand dashed rectangle R.embr(δ), and the common area of ​​both is the middle shaded area, and if selecting the bottom left vertex A of this shaded area reveals that vertex A is in subspace 0, then retain the spatial 2 tuple (s1, r1) in subspace 0 and delete the spatial 2 tuple (s1, r1) in subspace 1.

[0140] When selecting a vertex, any vertex in the common area between the first minimum bounding rectangle and the first extended minimum bounding rectangle can be selected, for example, vertex A, vertex B, vertex C, or vertex D.

[0141] It should be noted that the above examples are merely illustrative and are not intended to limit any spatial 2-tuples, any subspaces, etc., of the embodiments of the present disclosure.

[0142] In an embodiment of the present disclosure, for a spatial 2-tuple that satisfies a condition, first determine a first minimum bounding rectangle of a first spatial object and a first extended minimum bounding rectangle of a second spatial object in an arbitrary spatial 2-tuple of an arbitrary subspace, and then determine whether to retain or delete the arbitrary spatial 2-tuple in the arbitrary subspace based on whether any vertex coordinates of the common area of ​​both are located in the subspace, so that the same spatial 2-tuple is recorded in only one subspace, thereby avoiding duplication, reducing invalid operations, and improving overall efficiency.

[0143] To realize the above embodiment, the present disclosure further presents a spatial 2-tuple determining apparatus.

[0144] FIG. 5 is a schematic block diagram of an apparatus for determining a spatial 2-tuple provided according to an embodiment of the present disclosure.

[0145] As shown in FIG. 5 , the spatial 2-tuple determining device 100 may include a first acquiring module 110, a first determining module 120, a second acquiring module 130, a second determining module 140, and a third determining module 150.

[0146] The first acquisition module 110 acquires a given spatial distance and a plurality of spatial objects, each of which belongs to a first spatial object set or a second spatial object set.

[0147] A first determination module 120 determines a global domain based on the corresponding minimum bounding rectangles and extended minimum bounding rectangles of the first set of spatial objects and the second set of spatial objects, respectively.

[0148] The second acquisition module 130 performs subspace partitioning on the global domain to acquire a number of subspaces.

[0149] The second determination module 140 divides the spatial objects into sections based on a positional relationship between each of the spatial objects and each of the subspaces, and determines the spatial objects included in each subspace.

[0150] A third determination module 150 determines spatial 2-tuples contained in each of the subspaces that match the given spatial distance based on the spatial distances between individual spatial objects in each of the subspaces.

[0151] The description of the embodiment of the method for determining a spatial 2-tuple described above also applies to the device for determining a spatial 2-tuple of this embodiment, and the description thereof will be omitted here.

[0152] The spatial 2-tuple determination device of the embodiment of the present disclosure can first obtain a given spatial distance and a plurality of spatial objects, and then determine a global domain based on the minimum bounding rectangle and the extended minimum bounding rectangle of the first spatial object set and the second spatial object set, thereby performing subspace partitioning on the global domain to obtain a plurality of subspaces, and then partitioning the plurality of spatial objects based on the positional relationship between each spatial object and each subspace to determine the spatial objects included in each subspace, that is, can determine the spatial 2-tuple that matches the given spatial distance and is included in each subspace based on the spatial distance between the individual spatial objects in each subspace. Thus, first, a global domain is determined based on the minimum bounding rectangle and the extended minimum bounding rectangle of the first spatial object set and the second spatial object set, and then the spatial 2-tuple in each subspace in the global domain is determined, and invalid data is pre-filtered by the smaller global domain, reducing resource overhead and improving data processing efficiency.

[0153] Further, in some implementation forms of the embodiments of the present disclosure, referring to FIG. 6, based on the embodiment shown in FIG. 5, the first determination module 120 specifically determines the common area between the minimum bounding rectangle corresponding to the first spatial object set and the extended minimum bounding rectangle corresponding to the second spatial object set as the global domain.

[0154] In some implementations, the second acquisition module 130 includes a sampling unit 1310 that samples subspatial objects located within the global domain from the first spatial object set and the second spatial object set, respectively, to obtain a first reference spatial object set and a second reference spatial object set; an acquisition unit 1320 that performs quadtree division on the global domain based on the number and positions of spatial objects in the first reference spatial object set located in the global domain and the number and positions of spatial objects in the second reference spatial object set located in the global domain, respectively, to obtain a first spatial set and a second spatial set; and a determination unit 1330 that merges the first spatial set and the second spatial set to determine the multiple subspaces.

[0155] In some implementations, the acquisition unit 1320 specifically performs quadtree division on the global domain to generate four primary sub-spaces when the number of spatial objects of the first reference spatial object set located within the global domain is greater than a threshold, determines that the four primary sub-spaces are a first spatial set corresponding to the first reference spatial object set when the number of spatial objects of the first reference spatial object set included in the four primary sub-spaces is less than or equal to the threshold, and repeatedly performs the step of performing quadtree division on the global domain until determining a second spatial set corresponding to the second reference spatial object set when the number of spatial objects of the second reference spatial object set located within the global domain is greater than a threshold.

[0156] In some implementations, the acquisition unit 1320 more specifically performs quadtree division on any primary subspace to generate four secondary subspaces when the number of spatial objects of the first reference spatial object set contained in any primary subspace is greater than the threshold, and when the number of spatial objects of the first reference spatial object set contained in any of the four secondary subspaces is less than or equal to the threshold, determines the four secondary subspaces and each primary subspace containing spatial objects of the first reference spatial object set whose number is less than or equal to the threshold as a first spatial set corresponding to the first reference spatial object set.

[0157] In some implementations, the determination unit 1330 specifically adds each N+1 order subspace to the subspace if any N-order subspace of the first spatial set includes each N+1 order subspace of the second spatial set, where N is a positive integer.

[0158] In some implementations, the second acquisition module 130 specifically performs a specified number of quadtree divisions on the global domain to obtain multiple subspaces.

[0159] In some implementations, the second determination module 140 specifically determines a positional relationship between a minimum bounding rectangle corresponding to each of the spatial objects and each of the subspaces, and determines that any given spatial object is contained in any given subspace if a common area exists between the minimum bounding rectangle corresponding to the given spatial object and any given subspace.

[0160] Further, in some implementations of the embodiments of the present disclosure, referring to FIG. 6, based on the embodiment shown in FIG. 5, the above-mentioned apparatus 100 may further include a fourth determination module 160 for determining a first minimum bounding rectangle of a first spatial object and a first extended minimum bounding rectangle of a second spatial object in any spatial 2-tuple of any subspace, where the first spatial object is any spatial object in the first spatial object set and the second spatial object is any spatial object in the second spatial object set; a fifth determination module 170 for determining any vertex coordinates of a common area between the first minimum bounding rectangle and the first extended minimum bounding rectangle; a retaining module 180 for retaining the any spatial 2-tuple in the any subspace if the any vertex coordinates are located in the any subspace; and a deletion module 190 for deleting the any spatial 2-tuple from each spatial 2-tuple in the any subspace if the any vertex coordinates are not located in the any subspace.

[0161] The description of the embodiment of the method for determining a spatial 2-tuple described above also applies to the device for determining a spatial 2-tuple of this embodiment, and the description thereof will be omitted here.

[0162] To realize the above embodiment, the present disclosure further includes a computer program. M Present and computer program To The instructions, when executed by a processor, perform a method for determining a spatial 2-tuple as presented by the embodiments described in this disclosure.

[0163] To realize the above embodiments, the present disclosure further presents a computer device, comprising a memory, a processor, and a computer program stored in the memory and operable on the processor, which, when executing the program, realizes the spatial 2-tuple determination method presented by the embodiments described in the present disclosure.

[0164] To realize the above embodiments, the present disclosure further provides a non-transitory computer-readable storage medium including a computer program, which, when executed by a processor, realizes the spatial 2-tuple determination method provided by the embodiments described in the present disclosure.

[0165] To realize the above embodiments, the present disclosure further provides a computer program product, the instructions in the computer program product, when executed by a processor, perform the spatial 2-tuple determination method provided by the embodiments described in the present disclosure.

[0166] 7 is a block diagram of an exemplary computing device adapted to implement embodiments of the present disclosure. The computing device 12 shown in FIG. 7 is merely an example and should not limit the functionality and scope of use of embodiments of the present disclosure in any way.

[0167] The memory 28 may comprise a computer system readable medium in the form of a volatile memory such as a Random Access Memory (RAM) 30 and / or a cache memory 32. The computing device 12 may further comprise other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 34 may read from and write to a non-removable, non-volatile magnetic medium (not shown in FIG. 7, but commonly referred to as a "hard disk drive"). Although not shown in FIG. 7, a disk drive may be provided for reading and writing a removable, non-volatile disk (e.g., a "floppy disk"), and an optical disk drive may be provided for reading and writing a removable, non-volatile disk (e.g., a Compact Disc Read Only Memory (CD-ROM), a Digital Video Disc Read Only Memory (DVD-ROM), or other optical media). In these cases, each drive may be connected to the bus 18 via one or more data media interfaces. The memory 28 includes at least one program having a set (e.g., at least one) of program modules configured to perform the functions of each embodiment of the present disclosure. M It can include.

[0168] Bus 18 represents one or more of several classes of bus structures, including a memory bus or memory controller, a peripheral bus, a graphics accelerator port, a processor, or a local bus using any of a number of bus structures, including, but not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MAC) bus, an Enhanced ISA bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.

[0169] Computing device 12 includes a variety of computer system readable media, which may be any available media that can be accessed by computing device 12 and includes volatile media, nonvolatile media, removable media, and non-removable media.

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

[0171] A program / utility 40 comprising a set (at least one) of program modules 42 may be stored, for example, in memory 28, where such program modules 42 include, but are not limited to, an operating system, one or more applications, other program modules, and program data, each or some combination of these examples may include an implementation of a network environment. The program modules 42 typically perform the functions and / or methods of the embodiments described in this disclosure.

[0172] The computing device 12 may communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.) and with one or more devices that allow a user to interact with the computing device 12 and / or any devices that allow the computing device 12 to communicate with one or more other computing devices (e.g., network cards, modems, etc.). Such communication may occur through an input / output (I / O) interface 22. The computing 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) through a network adapter 20. As shown, the network adapter 20 communicates with other modules of the computing device 12 through a bus 18. Although not shown, it should be understood that other hardware and / or software modules may be used in combination with the computing device 12, including, but not limited to, microcode, device drives, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0173] The processing unit 16 executes programs stored in the system memory 28 to perform various functional applications and data processing, such as the methods described in the above embodiments.

[0174] According to the technical solution of the embodiment of the present disclosure, a given spatial distance and a plurality of spatial objects can be obtained first, and then a global domain can be determined based on the corresponding minimum bounding rectangle and the extended minimum bounding rectangle of each of the first and second spatial object sets, thereby performing subspace partitioning on the global domain to obtain a plurality of subspaces, and then partitioning the plurality of spatial objects based on the positional relationship between each spatial object and each subspace to determine the spatial objects contained in each subspace, that is, based on the spatial distance between each spatial object in each subspace, a spatial 2-tuple that matches the given spatial distance and is contained in each subspace can be determined. Thus, a global domain can be determined based on the corresponding minimum bounding rectangle and the extended minimum bounding rectangle of each of the first and second spatial object sets, and then a spatial 2-tuple in each subspace in the global domain can be determined, and invalid data can be pre-filtered by the smaller global domain, reducing resource overhead and improving data processing efficiency.

[0175] In the present description, a description that refers to terms such as "one embodiment," "several embodiments," "examples," "specific examples," or "several examples" means that the specific features, structures, materials, or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present disclosure. In the present description, general descriptions of the above terms do not necessarily refer to the same embodiment or example. In addition, the specific features, structures, materials, or characteristics described may be combined in an appropriate manner in any one or more embodiments or examples. In addition, those skilled in the art may combine or combine different embodiments or examples described in the present description, and features of different embodiments or examples, as long as they do not conflict with each other.

[0176] Additionally, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance and the number of technical features depicted. Thus, a feature qualified as "first" or "second" may explicitly or implicitly include at least one of the feature. In the description of this disclosure, "plurality" means at least two, e.g., two, three, etc., unless otherwise specifically and explicitly limited.

[0177] Any process or method description depicted in a flowchart or otherwise herein may be understood to represent one or more executable instruction codes, modules, fragments, or portions thereof, including steps for implementing a custom logical function or process, and it will be understood by those skilled in the art of the embodiments of the present disclosure that the scope of the preferred embodiments of the present disclosure includes additional implementations that may be outside the order shown or discussed, including performing functions essentially simultaneously or in reverse order according to the associated functionality.

[0178] Any logic and / or steps described in a flow chart or otherwise herein may be considered, for example, as a sequencing sequence of executable instructions to realize a logical function, and may be specifically implemented in any computer-readable medium for use with or in conjunction with an instruction execution system, apparatus, or device (e.g., a computer-based system, a system with a processor, or other system capable of fetching and executing instructions from an instruction execution system, apparatus, or device). For purposes of this specification, a "computer-readable medium" may be any device that can contain a program that can store, communicate, propagate, or transmit, for use with or in conjunction with an instruction execution system, apparatus, or device. More specific examples (non-exhaustive list) of computer-readable media include an electrical connection with one or more wires (electronic devices), a portable computer disk box (magnetic devices), a random access memory (RAM), a read-only memory (ROM), an erasable editable read-only memory (EPROM or flash memory), a fiber optic device, and a portable optical disk read-only memory (CD-ROM). The computer readable medium may also be paper or other suitable medium on which the program may be printed, for example by optically scanning the paper or other medium and then editing, interpreting or processing in any other suitable manner as necessary to obtain the program electronically before storing it in a computer memory.

[0179] Each part of the present disclosure can be realized by hardware, software, firmware, or a combination thereof. In the above embodiment, a plurality of steps or methods can be realized by software or firmware stored in a memory and executed by an appropriate instruction execution system. For example, when realized by hardware, as in the case of another embodiment, it can be realized by any one of techniques known to those skilled in the art, a discrete logic circuit having logic gate circuits for implementing a logical function for a data signal, an application specific integrated circuit having an appropriate combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc., or a combination thereof.

[0180] It can be understood by those skilled in the art that all or part of the steps involved in realizing the methods of the above embodiments can be completed by instructing relevant hardware by a program, which may be stored in a computer-readable storage medium, and which, when executed, includes one or a combination of the steps of the method embodiments.

[0181] In addition, each functional unit of each embodiment of the present disclosure may be integrated into one processing module, each unit may exist physically separately, or two or more units may be integrated into one module. The integrated module may be realized in the form of hardware or in the form of a software functional module. When the integrated module is realized in the form of a software functional module and sold or used as an independent product, it may be stored in a computer-readable storage medium.

[0182] The above-mentioned storage medium may be a read-only memory, a magnetic disk, an optical disk, etc. Although the embodiments of the present disclosure have been shown and described above, it should be noted that the above embodiments are illustrative and should not be construed as limitations on the present disclosure, and those skilled in the art may change, modify, substitute, and change the above embodiments within the scope of the present disclosure.

Claims

1. A method for determining a spatial 2-tuple executed by a computer device, comprising: obtaining a given spatial distance and a plurality of spatial objects, each of said spatial objects belonging to a first set of spatial objects or a second set of spatial objects; determining a global domain based on corresponding minimum bounding rectangles and extended minimum bounding rectangles of the first set of spatial objects and the second set of spatial objects, respectively; performing a subspace partition on the global domain to obtain a plurality of subspaces; dividing the plurality of spatial objects into sections based on a positional relationship between each of the spatial objects and each of the subspaces, and determining spatial objects included in each of the subspaces; determining spatial 2-tuples that match the given spatial distance contained in each of the subspaces based on spatial distances between individual spatial objects in each of the subspaces; A method for determining spatial 2-tuples, including:

2. determining a global domain based on corresponding minimum bounding rectangles and extended minimum bounding rectangles of the first set of spatial objects and the second set of spatial objects, respectively, comprising:

2. The method of claim 1, further comprising determining an intersection between a minimum bounding rectangle corresponding to the first set of spatial objects and an extended minimum bounding rectangle corresponding to the second set of spatial objects as the global domain.

3. performing a subspace partition on the global domain to obtain a plurality of subspaces, sampling subspatial objects located within the global domain from the first spatial object set and the second spatial object set, respectively, to obtain a first reference spatial object set and a second reference spatial object set; performing a quadtree division on the global domain based on the number and positions of spatial objects in the first set of reference spatial objects located in the global domain and the number and positions of spatial objects in the second set of reference spatial objects located in the global domain, to obtain a first spatial set and a second spatial set, respectively; fusing the first space set and the second space set to determine the plurality of subspaces; 2. The method of claim 1, comprising:

4. performing a quadtree division on the global domain based on the number and positions of spatial objects in the first set of reference spatial objects located in the global domain and the number and positions of spatial objects in the second set of reference spatial objects located in the global domain to obtain a first spatial set and a second spatial set, respectively; if a number of spatial objects of the first set of reference spatial objects located within the global domain is greater than a threshold, performing a quadtree partition on the global domain to generate four primary subspaces; determining that the four primary subspaces are a first spatial set corresponding to the first set of reference spatial objects if the number of spatial objects in the first set of reference spatial objects contained in the four primary subspaces is equal to or less than the threshold value; if the number of spatial objects located within the global domain among the second reference spatial object set is greater than a threshold, repeatedly performing a step of performing quadtree division on the global domain until a second spatial set corresponding to the second reference spatial object set is determined; 4. The method of claim 3, comprising:

5. After generating the four primary subspaces, if the number of spatial objects in the first set of reference spatial objects contained in any primary subspace is greater than the threshold, performing a quadtree partition on the any primary subspace to generate four secondary subspaces; if the number of spatial objects in the first reference spatial object set included in the four secondary subspaces is equal to or less than the threshold, determining the four secondary subspaces and each primary subspace including spatial objects in the first reference spatial object set whose number is equal to or less than the threshold as a first spatial set corresponding to the first reference spatial object set; 5. The method of claim 4, comprising:

6. a step of fusing the first space set and the second space set to determine the plurality of subspaces, 6. The method of claim 5, further comprising the step of adding each N+1 order subspace of the second spatial set to the subspace if any N-order subspace of the first spatial set contains the respective N+1 order subspace of the second spatial set, where N is a positive integer.

7. performing a subspace partition on the global domain to obtain a plurality of subspaces, The method of claim 1 , further comprising the step of performing a quadtree division of the global domain a specified number of times to obtain a plurality of subspaces.

8. A step of dividing the plurality of spatial objects into sections based on a positional relationship between each of the spatial objects and each of the subspaces, and determining spatial objects included in each of the subspaces, determining a positional relationship between a minimum bounding rectangle corresponding to each of the spatial objects and each of the subspaces; determining that a given spatial object is contained in a given subspace if there is an intersection between the given spatial object's corresponding minimum bounding rectangle and the given subspace; 2. The method of claim 1, comprising:

9. After determining the spatial 2-tuples that match the given spatial distance contained in each of the subspaces, determining a first minimum bounding rectangle of a first spatial object and a first extended minimum bounding rectangle of a second spatial object in any spatial 2-tuple of any subspace, the first spatial object being any spatial object in the first set of spatial objects and the second spatial object being any spatial object in the second set of spatial objects; determining coordinates of any vertices of an intersection between the first minimum bounding rectangle and the first extended minimum bounding rectangle; if the arbitrary vertex coordinate lies in the arbitrary subspace, then retaining the arbitrary spatial 2-tuple in the arbitrary subspace; 2. The method of claim 1, comprising:

10. After determining any vertex coordinates of an intersection between the first minimum bounding rectangle and the first extended minimum bounding rectangle, 10. The method of claim 9, further comprising the step of removing the given spatial 2-tuple from each spatial 2-tuple in the given subspace if the given vertex coordinate does not lie in the given subspace.

11. a first acquisition module for acquiring a given spatial distance and a plurality of spatial objects, each of the spatial objects belonging to a first spatial object set or a second spatial object set; a first determination module that determines a global domain based on corresponding minimum bounding rectangles and extended minimum bounding rectangles of the first set of spatial objects and the second set of spatial objects, respectively; a second acquisition module for performing subspace partitioning on the global domain to acquire a plurality of subspaces; a second determination module that divides the plurality of spatial objects into sections based on a positional relationship between each of the spatial objects and each of the subspaces, and determines spatial objects included in each of the subspaces; a third determination module that determines spatial 2-tuples that match the given spatial distance contained in each of the subspaces based on spatial distances between individual spatial objects in each of the subspaces; 1. A spatial 2-tuple determination apparatus comprising:

12. A computer program comprising: a memory; a processor; and a computer program stored in the memory and executable by the processor; A computer apparatus implementing the method for determining a spatial 2-tuple according to any one of claims 1 to 10 when the processor executes the computer program.

13. A computer readable storage medium containing a computer program, which, when executed by a processor, implements the method for determining a spatial 2-tuple according to any one of claims 1 to 10.

14. A computer program which, when executed by a processor, implements the method for determining a spatial 2-tuple according to any one of claims 1 to 10.

Citation Information

Patent Citations

  • Method for parallel space query based on grid division and system of same

    CN106055563A

  • Similar time series data calculating device, and its method and program

    JP2006244389A