Hybrid spatial indexing method, system, electronic device and computer program product

By projecting the three-dimensional space range onto the target projection plane, using the two-dimensional space index to screen out candidate objects, and then performing three-dimensional space intersection judgment, the problems of large computational complexity and high maintenance cost in the existing technology are solved, and efficient three-dimensional space retrieval is achieved.

CN120634841AActive Publication Date: 2025-09-12SHENZHEN QIANHAI DIGITAL CITY TECH CO LTD

Patent Information

Application Number
CN202511142910.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-15
Publication Date
2025-09-12
Estimated Expiration
2045-08-15

Smart Images

  • Figure CN120634841A_ABST
    Figure CN120634841A_ABST
Patent Text Reader

Abstract

The invention is applicable to the field of data processing, and provides a hybrid spatial indexing method and system, electronic equipment and a computer program product.The method comprises the steps that a first projection area of a target three-dimensional space range indicated by a retrieval query request on a target projection plane is determined; based on a two-dimensional spatial index, screening out at least one candidate three-dimensional object of which a projection area on the target projection plane intersects with the first projection area from a plurality of three-dimensional objects; and screening out a target three-dimensional object of which the three-dimensional space range is intersected with the target three-dimensional space range from at least one candidate three-dimensional object. According to the scheme, the three-dimensional space retrieval efficiency can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing, and in particular to a hybrid spatial indexing method, system, electronic device, and computer program product. Background Art

[0002] Currently, when searching for a target three-dimensional object in three-dimensional space, three-dimensional geometric calculations are usually performed on all three-dimensional objects in the three-dimensional space, and the target three-dimensional object is filtered out from all three-dimensional objects based on the three-dimensional geometric calculation results. This retrieval method is computationally intensive and seriously affects the retrieval efficiency of three-dimensional space retrieval. Summary of the Invention

[0003] The embodiments of the present application provide a hybrid spatial indexing method, system, electronic device, and computer program product to solve the problem of low efficiency of three-dimensional spatial retrieval in the prior art.

[0004] A first aspect of an embodiment of the present application provides a hybrid spatial indexing method, including: Determine a first projection area of ​​the target three-dimensional space range indicated by the search query request on the target projection plane; Based on the two-dimensional spatial index, screening out at least one candidate three-dimensional object from a plurality of three-dimensional objects, whose projection area on the target projection plane intersects with the first projection area; A target three-dimensional object whose three-dimensional space range intersects with the target three-dimensional space range is screened out from at least one of the candidate three-dimensional objects.

[0005] A second aspect of an embodiment of the present application provides a hybrid spatial indexing system, including: A determination module, configured to determine a first projection area of ​​a target three-dimensional space range indicated by the search query request on a target projection plane; a first screening module, configured to screen out, from a plurality of three-dimensional objects, at least one candidate three-dimensional object whose projection area on the target projection plane intersects with the first projection area based on a two-dimensional spatial index; The second screening module is configured to screen out a target three-dimensional object whose three-dimensional space range intersects with the target three-dimensional space range from at least one candidate three-dimensional object.

[0006] A third aspect of an embodiment of the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method described in the first aspect when executing the computer program.

[0007] A fourth aspect of an embodiment of the present application provides a computer program product, which includes a computer program. When the computer program is executed by a processor, it implements the steps of the method described in the first aspect.

[0008] A fifth aspect of an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the steps of the method described in the first aspect.

[0009] As can be seen from the above, this application projects the target three-dimensional spatial range onto the target projection plane to obtain its corresponding first projection area. Based on the intersection relationship between the projection area of ​​the three-dimensional object on the target projection plane and the first projection area, candidate three-dimensional objects are screened out from multiple three-dimensional objects, and then the target three-dimensional objects whose three-dimensional spatial range intersects with the target three-dimensional spatial range are screened out from the candidate three-dimensional objects. This application transforms complex three-dimensional spatial relationships into efficient two-dimensional intersection judgments through dimensionality reduction transformation and hierarchical screening mechanisms, quickly filters out irrelevant objects, reduces the number of objects to be processed in subsequent three-dimensional fine screening, significantly reduces the amount of calculation, and improves the efficiency of three-dimensional space retrieval. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments or descriptions of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0011] Figure 1 This is a flow chart of a hybrid spatial indexing method provided by an embodiment of the present application; Figure 2 This is a schematic diagram of the spatial distribution of multiple three-dimensional objects in a three-dimensional space provided by an embodiment of the present application; Figure 3 This is a schematic diagram of a target three-dimensional space range provided in an embodiment of the present application; Figure 4 This is a schematic diagram of a discrete distribution of multiple three-dimensional objects provided in an embodiment of the present application; Figure 5 This is a schematic diagram of a second projection area of ​​a three-dimensional object provided in an embodiment of the present application; Figure 6 This is a schematic diagram of a two-dimensional space screening provided by an embodiment of the present application; Figure 7 This is a schematic diagram of a three-dimensional space screening provided by an embodiment of the present application; Figure 8This is a structural diagram of a hybrid spatial indexing system provided by an embodiment of the present application; Figure 9 This is a structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0012] In the following description, specific details such as specific system structures and techniques are provided for purposes of illustration rather than limitation to facilitate a thorough understanding of the embodiments of the present application. However, it will be apparent to those skilled in the art that the present application may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid obscuring the description of the present application with unnecessary detail.

[0013] It will be understood that when used in this specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.

[0014] It should also be understood that the terms used in this specification are for the purpose of describing specific embodiments only and are not intended to limit the present application. As used in this specification and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms unless the context clearly indicates otherwise.

[0015] It should be further understood that the term "and / or" used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.

[0016] As used in this specification and the appended claims, the term "if" can be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]," depending on the context.

[0017] In specific implementations, the terminals described in the embodiments of the present application include, but are not limited to, other portable devices such as mobile phones, laptop computers, or tablet computers with touch-sensitive surfaces (e.g., touch screen displays and / or touch pads). It should also be understood that in some embodiments, the device is not a portable communication device, but a desktop computer with a touch-sensitive surface (e.g., touch screen displays and / or touch pads).

[0018] In the following discussion, a terminal including a display and a touch-sensitive surface is described. However, it should be understood that the terminal may include one or more other physical user interface devices such as a physical keyboard, mouse, and / or joystick.

[0019] The terminal supports various applications, such as one or more of the following: a drawing application, a presentation application, a word processing application, a website creation application, a disk burning application, a spreadsheet application, a game application, a phone application, a video conferencing application, an email application, an instant messaging application, a workout support application, a photo management application, a digital camera application, a digital video camera application, a web browsing application, a digital music player application, and / or a digital video player application.

[0020] Various applications that can be executed on the terminal can use at least one common physical user interface device, such as a touch-sensitive surface. One or more functions of the touch-sensitive surface and corresponding information displayed on the terminal can be adjusted and / or changed between applications and / or within a corresponding application. In this way, the common physical architecture of the terminal (e.g., the touch-sensitive surface) can support a variety of applications with user interfaces that are intuitive and transparent to the user.

[0021] It should be understood that the size of the serial numbers of each step in this embodiment does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of this application.

[0022] Existing 3D spatial retrieval methods perform 3D geometric calculations on all 3D objects in the space and then filter out the target 3D object based on the results. These methods are computationally complex and consume a large amount of memory for the 3D index structure. This significantly increases the maintenance cost of the 3D index structure when 3D objects frequently move. Furthermore, in scenes with unevenly distributed 3D objects, load imbalance is prone to occur, impacting performance.

[0023] In order to solve the above problems and improve the efficiency of three-dimensional spatial retrieval, the present application provides a hybrid spatial indexing method, system, electronic device and computer program product.

[0024] In order to illustrate the technical solution described in this application, specific embodiments are provided below.

[0025] See also Figure 1 , Figure 1 This is a flow chart of a hybrid spatial indexing method provided by an embodiment of the present application. Figure 1As shown, a hybrid spatial indexing method includes the following steps: Step 101: Determine a first projection area of ​​a target three-dimensional space range indicated by a search query request on a target projection plane.

[0026] The method described in the present application is applied to three-dimensional space and is used to quickly retrieve a target three-dimensional object that appears in a target three-dimensional space range from multiple three-dimensional objects.

[0027] In some embodiments, 3D objects can represent buildings, vehicles, and other objects in a digital city, often exhibiting irregular geometric shapes or regular non-cubic forms (such as spheres). To address these irregular geometric and regular non-cubic forms and quickly determine the intersection relationship between the 3D object and the target 3D spatial range, an Axis-Aligned Bounding Box (AABB) is used to uniformly represent 3D objects. This simplifies complex intersection calculations into three-axis overlap detection using an outer enveloping cube structure.

[0028] like Figure 2 As shown, Figure 2 This is a schematic diagram of the spatial distribution of multiple three-dimensional objects in a three-dimensional space provided by an embodiment of the present application. Figure 2 The three coordinate axes, X-axis, Y-axis and Z-axis, are shown and used to define the three-dimensional space and characterize the three-dimensional objects and target three-dimensional space range in the three-dimensional space. Figure 2 There are multiple cubes in the image. A cube is an axis-aligned bounding box of a 3D object, used to represent the 3D object. One axis-aligned bounding box represents one 3D object. The circle in each cube marks its geometric center, which is also the geometric center of the 3D object.

[0029] In some embodiments, if the three-dimensional object is a regular object in the shape of a cube, then Figure 2 The cube in is the three-dimensional object itself.

[0030] In some embodiments, the user determines three-dimensional coordinates indicating the spatial range to be searched through an interactive interface, and accordingly generates a search query request including the three-dimensional coordinates.

[0031] The three-dimensional coordinates determined by the user constitute a spatial range to be searched in the three-dimensional space, namely, the target three-dimensional spatial range.

[0032] like Figure 3 As shown, Figure 3 This is a schematic diagram of a target three-dimensional space range provided in an embodiment of the present application. Figure 3 It includes a cube representing a three-dimensional object and a cube outlined by dotted lines, wherein the cube outlined by dotted lines is the target three-dimensional space range, and its vertices are A1, A2, A3, A4, A5, A6, A7, and A8.

[0033] In some embodiments, the target three-dimensional space range is an axis-aligned bounding box structure, whose three-dimensional coordinates pass through the minimum point and maximum point express.

[0034] When a search query request is received, a target three-dimensional spatial range is determined based on the three-dimensional coordinate information included in the search query request, and then a first projection area of ​​the target three-dimensional spatial range on a target projection plane is determined. The target projection plane is an XY plane formed by the X-axis and the Y-axis, an XZ plane formed by the X-axis and the Z-axis, or a YZ plane formed by the Y-axis and the Z-axis.

[0035] Here, the target three-dimensional space range is dimensionally compressed to achieve dimensionality reduction conversion of the target three-dimensional space range from three-dimensional space to two-dimensional space, and the first projection area of ​​the target three-dimensional space range in two-dimensional space is obtained, so as to facilitate the subsequent initial screening of three-dimensional objects based on the first projection area.

[0036] In some embodiments, to improve the efficiency of three-dimensional spatial retrieval, a target projection plane is dynamically determined based on the spatial distribution of three-dimensional objects in the three-dimensional space. Determining the target three-dimensional spatial range indicated by the retrieval query request as a first projection area on the target projection plane further includes: calculating, based on the three-dimensional coordinates of the three-dimensional objects, a distribution dispersion of the three-dimensional objects along three coordinate axes; and selecting the plane formed by the two coordinate axes with the largest distribution dispersion as the target projection plane.

[0037] This application uses principal component analysis (PCA) to determine the target projection plane. PCA is an unsupervised linear dimensionality reduction technique that projects raw high-dimensional data into a low-dimensional space through an orthogonal transformation. It retains the directions with the greatest variance (the most information-rich) in the data (i.e., the principal components), thereby simplifying the data structure and removing noise and redundant information.

[0038] According to the three-dimensional coordinates of multiple three-dimensional objects, the distribution discreteness of multiple three-dimensional objects on the X-axis, Y-axis, and Z-axis is calculated, the dispersion degree of the three-dimensional object coordinates is quantified, the sizes of the distribution discreteness corresponding to the three coordinate axes are compared, and the plane formed by the two coordinate axes with the largest distribution discreteness is selected as the target projection plane, that is, the projection plane with the highest information retention rate is determined with the help of the distribution discreteness.

[0039] In some embodiments, the three-dimensional coordinates of the geometric center point of the three-dimensional object are used as the three-dimensional coordinates for calculating the distribution dispersion, or the three-dimensional coordinates of the boundary points of the three-dimensional object are used as the three-dimensional coordinates for calculating the distribution dispersion.

[0040] In some embodiments, the distribution dispersion is characterized by variance or standard deviation.

[0041] In some embodiments, the plurality of three-dimensional objects is , is a positive integer. The three-dimensional coordinates of the geometric center point of a three-dimensional object are expressed as , , is a positive integer. Calculate the arithmetic mean of the three-dimensional coordinates of the geometric center points of multiple three-dimensional objects on the X-axis, Y-axis, and Z-axis, and obtain 、 、 , the three-dimensional coordinates of the reference geometric center point C of multiple three-dimensional objects are .in, , , .

[0042] In some embodiments, the three-dimensional object set S includes multiple three-dimensional objects, and the code for maintaining information of the axis-aligned bounding boxes of the multiple three-dimensional objects is as follows: for each object Oi in S: AABB(xi_min, yi_min, zi_min, xi_max, yi_max, zi_max).

[0043] In some embodiments, the code for maintaining information of the geometric center points of multiple three-dimensional objects is as follows: for each object Oi in ObjectSet: p_i(x_i,y_i,z_i).

[0044] In some embodiments, the three-dimensional spatial information of the three-dimensional object may be stored in a JavaScript Object Notation (JSON) cache. The JSON cache system initialization code is as follows: Create a mapping relationship cache file: spatial_mapping.json; Initialize the cache structure: { "projection_plane": "XY", "object_mappings": {}, "update_timestamp": current_time, }.

[0045] In this initialization code, the XY plane is determined as the target projection plane.

[0046] Calculate the variance or standard deviation of each coordinate value in the three-dimensional coordinates of the geometric center points of multiple three-dimensional objects compared to the arithmetic mean of the corresponding coordinates. The variance and standard deviation corresponding to each coordinate axis can be used to quantify the degree of dispersion of the three-dimensional objects along the corresponding coordinate axis. That is, the calculated variance or standard deviation is the distribution dispersion.

[0047] In some embodiments, , , . is the standard deviation corresponding to the X-axis, that is, the distribution dispersion. is the standard deviation corresponding to the Y axis, that is, the distribution dispersion, The standard deviation corresponding to the Z axis is the distribution dispersion.

[0048] Compare the three standard deviations, determine the two standard deviations with the largest values, and determine the plane formed by the coordinate axes corresponding to the two standard deviations with the largest values ​​as the target projection plane. For example, =0.82, =0.76, , by comparing the sizes, we can determine the two largest standard deviations, which are and , accordingly, The corresponding X-axis and The XY plane formed by the corresponding Y axes is determined as the target projection plane.

[0049] This plane selection method ensures that after projection dimensionality reduction, the three-dimensional objects are distributed over the widest range on the two-dimensional plane with minimal information loss.

[0050] like Figure 4 As shown, Figure 4 This is a schematic diagram of the distribution of multiple three-dimensional objects provided by an embodiment of the present application. The shaded portion of the figure shows the distribution of multiple three-dimensional objects, among which the distribution area of ​​the XY plane is the largest and can be determined as the target projection plane. 、 、 It also shows the discrete distribution of multiple three-dimensional objects, where , thereby determining the XY plane as the target projection plane.

[0051] Taking the plane formed by the two coordinate axes with the largest distribution dispersion as the target projection plane can ensure the minimum loss of spatial relationship after projection, maximize the retention of the spatial distribution characteristics of the object, and avoid information loss during the dimensionality reduction process.

[0052] In some embodiments, the XY plane is suitable for urban scenes.

[0053] In some embodiments, if the application scenario has many objects distributed in the vertical direction, such as finding the room location of a device in a high-rise building, the XZ plane can be selected as the target projection plane, that is, the XZ plane is suitable for high-rise building scenarios.

[0054] Therefore, the target projection plane is determined according to the distribution of three-dimensional objects in the three axis directions to adapt to different scene characteristics.

[0055] In some embodiments, if the distribution discreteness of the three coordinate axes is the same, or the distribution discreteness of the two coordinate axes with smaller distribution discreteness is the same, the target projection plane is selected based on the actual situation. , the XY plane can be determined as the target projection plane, and the XZ plane can also be determined as the target projection plane. If the three-dimensional space represents the three-dimensional urban space, the XY plane represents the ground, and the three-dimensional object represents the vehicle, then according to the actual situation, the XY plane representing the ground is selected as the target projection plane between the XY plane and the XZ plane.

[0056] In some embodiments, the target projection plane selection code is as follows: Calculate the standard deviation of the distribution along each axis: ; ; ; Select the plane formed by the two axes with the largest standard deviation as the target projection plane: if (std_x>= std_y) and (std_x>= std_z): if std_y>= std_z: Target projection plane = XY plane; else: Target projection plane = XZ plane; elif (std_y>= std_x) and (std_y>= std_z): if std_x>= std_z: Target projection plane = XY plane; else: Target projection plane = YZ plane; else: Target projection plane = XZ plane or YZ plane.

[0057] In some embodiments, after selecting the plane formed by the two coordinate axes with the largest distribution discreteness as the target projection plane, it also includes: determining the second projection area of ​​each of the three-dimensional objects on the target projection plane; establishing a mapping relationship between the object identifier of each of the three-dimensional objects and its corresponding second projection area to obtain the two-dimensional spatial index.

[0058] The two-dimensional spatial index includes a mapping relationship between multiple three-dimensional objects, where the mapping relationship is a correspondence between an object identifier of a three-dimensional object and its corresponding second projection area.

[0059] After obtaining the target projection plane, multiple 3D objects are dimensionality-reduced, projecting them onto the target projection plane. This results in a second projection area for each 3D object in 2D space, achieving dimensionality reduction for the 3D objects. This facilitates 3D object screening in 2D space, reduces computational effort, and improves retrieval efficiency. The second projection area for a 3D object is either the projection area of ​​the 3D object itself on the target projection plane or the projection area of ​​its axis-aligned bounding box on the target projection plane.

[0060] like Figure 5 As shown, Figure 5 This is a schematic diagram of a second projection area for a three-dimensional object provided in an embodiment of the present application. The three-dimensional object is projected onto a target projection plane (the XY plane) to obtain the second projection area of ​​the three-dimensional object on the XY plane. Each rectangular area in the XY plane is the second projection area, and each rectangular area corresponds one-to-one to the three-dimensional object.

[0061] Each three-dimensional object corresponds to an object identifier, such as a license plate number.

[0062] In some embodiments, a mapping relationship between the second projection area of ​​each three-dimensional object and its object identifier is established to determine the identification information of the three-dimensional object based on the second projection area, and then obtain the three-dimensional spatial information of the three-dimensional object.

[0063] In some embodiments, the second projection area has corresponding coordinates. Since the second projection area is projected onto the target projection plane, the coordinate value of the second projection area on the coordinate axis perpendicular to the target projection plane is 0. In this case, the coordinate value can be ignored, and the second projection area is represented by two-dimensional coordinates. A mapping relationship is established between the two-dimensional coordinates representing the three-dimensional object and the object identifier of the three-dimensional object.

[0064] In some embodiments, partial coordinate values ​​in the three-dimensional coordinates of the axis-aligned bounding box of the three-dimensional object are used to represent the second projection area of ​​the three-dimensional object, thereby establishing a mapping relationship between the second projection area of ​​the three-dimensional object and its object identifier.

[0065] To avoid problems such as excessive memory pressure and recycling, the mapping relationship is saved in the JSON cache for easy maintenance and query.

[0066] In some embodiments, the coordinates of the second projection area are represented by the coordinates of the axis-aligned bounding boxes of the multiple three-dimensional objects. The code for maintaining the information of the second projection area is as follows: for each object Oi with AABB(x_min, y_min, z_min, x_max, y_max, z_max): if target projection plane == XY plane: Second projection area = Rectangle2D(x_min, y_min, x_max, y_max); retainAxisInfo = zAxisInfo(z_min, z_max); elif target projection plane == XZ plane: Second projection area = Rectangle2D(x_min, z_min, x_max, z_max); retainAxisInfo = yAxisInfo(y_min, y_max); elif target projection plane == YZ plane: Second projection area = Rectangle2D(y_min, z_min, y_max, z_max); retainAxisInfo = xAxisInfo(x_min, x_max).

[0067] In some embodiments, the attribute information of the third axis of the three-dimensional object is retained for constructing a three-dimensional spatial index and establishing a logic function for upgrading a two-dimensional index to a three-dimensional index. The code is as follows: Maintain the third axis attribute mapping: Map<ObjectID, RetainedAxisInfo> thirdAxisMap; Establish the logical function of upgrading from 2D to 3D: class DimensionUpgrader { Upgrade function (candidate 3D object list): Read 3D spatial information from JSON cache; Construct a temporary three-dimensional spatial index for accurate judgment; }.

[0068] In some embodiments, when it is detected that the coordinate value of any of the three-dimensional objects on the coordinate axis related to the target projection plane changes, the second projection area of ​​the three-dimensional object is re-determined, and the mapping relationship of the three-dimensional object in the two-dimensional spatial index is updated accordingly.

[0069] The relevant coordinate axes of the target projection plane are the coordinate axes constituting the target projection plane. For example, if the target projection plane is an XY plane, the relevant coordinate axes of the target projection plane are the X axis and the Y axis.

[0070] A three-dimensional object is a dynamically changing object, which means that the three-dimensional coordinates of the three-dimensional object will change.

[0071] In some embodiments, the 3D coordinates of various 3D objects are monitored in real time. When the 3D coordinates of a particular 3D object change, the changed coordinate values ​​are checked to see if they correspond to the coordinate values ​​on the relevant coordinate axis of the target projection plane. If so, the second projection area of ​​the 3D object is re-determined, and the mapping relationship of the 3D object in the 2D spatial index is updated accordingly, specifically updating the coordinate representation information of the second projection area in the mapping relationship.

[0072] When the coordinate values ​​of a three-dimensional object on the relevant coordinate axes of the target projection plane change, the projection area is re-determined and the mapping relationship is updated to ensure that the two-dimensional spatial index always reflects the latest spatial status, avoiding index failure caused by the movement of three-dimensional objects and ensuring the real-time and accuracy of spatial retrieval. The construction of the three-dimensional spatial index below is carried out after the two-dimensional space is screened and the three-dimensional space is finely screened based on the three-dimensional spatial index. Therefore, only the two-dimensional spatial index needs to be updated, which reduces maintenance costs, ensures that the screened objects can be updated at a high frequency, and minimizes the impact on operating performance. At the same time, compared with the three-dimensional index structure, the two-dimensional spatial index occupies less memory overhead.

[0073] In some embodiments, the target projection plane is dynamically updated according to the distribution of the three-dimensional objects, and the two-dimensional spatial index is updated when the target projection plane changes, thereby improving the efficiency of the two-dimensional spatial retrieval and reducing the computational overhead.

[0074] In some embodiments, the two-dimensional spatial index is in the form of a rectangular tree (Rectangular Tree, R-Tree).

[0075] In some embodiments, the code for constructing a two-dimensional spatial index in the form of an R-Tree is as follows: Create the R-Tree root node: RTree2D rtree = new RTree2D(); for each projection rectangle rect2D: rtree.insert(rect2D, objectID).

[0076] The candidate 3D objects whose projection area intersects with the first projection area are quickly found in the R-Tree, and most of the irrelevant 3D objects are quickly filtered out by utilizing the efficient 2D query feature of the R-Tree.

[0077] In some embodiments, the code for the update process of the two-dimensional spatial index is as follows: Input: 3D object ID, new position newPosition(new_x, new_y, new_z); / / Read the current information of the 3D object from the JSON cache; currentInfo = readFromJSON(objectID); currentProjectionPlane = currentInfo.projection_plane; / / Determine whether the 2D spatial index needs to be updated based on the relevant coordinate axes of the target projection plane; No need to update 2D spatial index = false; if currentProjectionPlane == "XY": if (new_x != current_x) or (new_y != current_y): Need to update 2D spatial index = true; / / Changes in the Z axis do not affect the XY plane projection, so there is no need to update the 2D spatial index; elif currentProjectionPlane == "XZ": if (new_x != current_x) or (new_z != current_z): Need to update 2D spatial index = true; / / Changes in the Y axis do not affect the XZ plane projection, so there is no need to update the 2D space index; elif currentProjectionPlane == "YZ": if (new_y != current_y) or (new_z != current_z): Need to update 2D spatial index = true; / / Changes in the X-axis do not affect the YZ plane projection, so there is no need to update the 2D spatial index; If you need to update the two-dimensional spatial index: / / Remove the old second projection area information from the R-Tree; rtree.remove(currentInfo.projected_2d, objectID); / / Calculate the new second projection area information; newProjected2D = calculateProjection(newPosition,currentProjectionPlane); / / Insert new second projection area information; rtree.insert(newProjected2D, objectID); / / Regardless of whether the 2D spatial index is updated, the 3D spatial information of the 3D object in the JSON cache must be updated; updateJSONCache(objectID, newPosition).

[0078] When the three-dimensional coordinates of a three-dimensional object change, the three-dimensional spatial information of the three-dimensional object in the cache is updated to ensure that an accurate and real three-dimensional spatial index is subsequently constructed based on the three-dimensional spatial information, thereby improving the retrieval accuracy.

[0079] Step 102: Based on the two-dimensional spatial index, at least one candidate three-dimensional object whose projection area on the target projection plane intersects with the first projection area is screened out from a plurality of three-dimensional objects.

[0080] After the first projection area is obtained, the intersection relationship between the first projection area and a plurality of second projection areas is calculated, and the second projection areas intersecting with the first projection area are screened out.

[0081] The object identifier corresponding to the filtered second projection area is determined through the mapping relationship in the two-dimensional spatial index, that is, the candidate three-dimensional objects whose projection areas intersect with the first projection area are correspondingly filtered out.

[0082] like Figure 6 As shown, Figure 6This is a schematic diagram of a two-dimensional space screening method provided by an embodiment of the present application. At the two-dimensional spatial level, through intersection determination, projection areas B1, B2, B3, and B4 that intersect with the first projection area are screened from multiple second projection areas. The three-dimensional objects corresponding to the second projection areas that intersect with the first projection area are the candidate three-dimensional objects, that is, the three-dimensional objects that are suspected of intersecting with the target three-dimensional space range at the three-dimensional spatial level.

[0083] The search time for prior art is , the search time for the initial screening of the two-dimensional space of this application is ,in, , is the number of three-dimensional objects, is the number of candidate three-dimensional objects after the initial screening in the two-dimensional space, Far below Through preliminary screening at the two-dimensional spatial level, most complex three-dimensional calculations are converted into efficient two-dimensional operations, greatly improving retrieval efficiency.

[0084] In some embodiments, the two-dimensional spatial screening code based on the two-dimensional spatial index is as follows: Input: target three-dimensional space range QueryRegion3D; / / Project the target 3D space range to the determined target projection plane; QueryRegion2D = projectQueryRegion(QueryRegion3D, projection_plane); / / Perform fast two-dimensional spatial filtering in R-Tree; candidateObjects = []; rtree.query(QueryRegion2D, candidateObjects); Total3DObjects = totalObjectCount; Total number of candidate 3D objects = candidateObjects.size().

[0085] Step 103 : Filter out a target three-dimensional object whose three-dimensional space range intersects with the target three-dimensional space range from at least one candidate three-dimensional object.

[0086] The 3D spatial extent refers to the boundaries of the geometric area occupied by a 3D object in 3D space (such as an axis-aligned bounding box).

[0087] Candidate three-dimensional objects refer to three-dimensional objects obtained through the initial two-dimensional projection intersection screening. Their number is far less than the number of original three-dimensional objects, which can improve the efficiency of subsequent calculations.

[0088] The target three-dimensional object refers to a three-dimensional object that intersects the target three-dimensional space range in three dimensions.

[0089] This application employs a two-stage detection strategy: a preliminary 2D screening process, which rapidly eliminates non-intersecting objects based on 2D projections; and a refined 3D screening process, which accurately detects intersections in 3D space. This strategy involves performing a preliminary 2D projection screening followed by a more computationally intensive 3D intersection check, thus avoiding a 3D traversal of all 3D objects. The combined search time for the preliminary 2D projection screening and the refined 3D screening process is significantly shorter than the 3D traversal of all 3D objects in existing techniques, significantly improving search efficiency.

[0090] In some embodiments, before filtering out the target three-dimensional object whose three-dimensional spatial range intersects with the target three-dimensional spatial range from at least one of the candidate three-dimensional objects, it also includes: calculating the quantity ratio of all the candidate three-dimensional objects to all the three-dimensional objects; filtering out the target three-dimensional object whose three-dimensional spatial range intersects with the target three-dimensional spatial range from at least one of the candidate three-dimensional objects includes: when the quantity ratio is greater than the set ratio, based on the three-dimensional spatial index corresponding to at least one of the candidate three-dimensional objects, filtering out the target three-dimensional object whose three-dimensional spatial range intersects with the target three-dimensional spatial range.

[0091] Quantity ratio = total number of candidate 3D objects The total number of 3D objects. This ratio is also called the simplification rate, which means that irrelevant 3D objects are eliminated through initial 2D screening, thus simplifying the search.

[0092] The three-dimensional space fine screening method is determined based on the relationship between the quantity ratio and the set ratio, which is, for example, 0.3.

[0093] In some embodiments, the determination code of the screening method of three-dimensional space fine screening is as follows: Quantity ratio = total number of candidate 3D objects / total number of 3D objects; If the quantity ratio>30%: / / Enter the second-order three-dimensional space screening; proceed_to_3d_filtering = true; else: / / Directly use built-in AABB 3D filtering; return useBuiltInAABBFiltering(QueryRegion3D).

[0094] When the quantity ratio is greater than the set ratio, a three-dimensional spatial index of the candidate three-dimensional objects is constructed, and three-dimensional spatial intersection judgment is implemented based on the three-dimensional spatial index, thereby screening out target three-dimensional objects whose three-dimensional spatial range intersects with the target three-dimensional spatial range, avoiding high-cost three-dimensional intersection calculations on all candidate three-dimensional objects, reducing computational complexity, and improving retrieval efficiency.

[0095] In some embodiments, the three-dimensional spatial information for constructing the three-dimensional spatial index is stored in a JSON cache, wherein the code for writing the three-dimensional spatial information of the three-dimensional object into the JSON cache is as follows: object_mapping = { "object_id": objectID, "original_aabb": [x_min, y_min, z_min, x_max, y_max, z_max], "projected_2d": [proj_min_u, proj_min_v, proj_max_u, proj_max_v], "retained_axis": [axis_min, axis_max], "projection_plane": projection_plane_type, }; spatial_mapping.json["object_mappings"][objectID]= object_mapping.

[0096] In some embodiments, the three-dimensional spatial index type includes an axis-aligned bounding box tree, an octree, or an R-tree.

[0097] In some embodiments, based on the three-dimensional space index corresponding to at least one of the candidate three-dimensional objects, the target three-dimensional object whose three-dimensional space range intersects with the target three-dimensional space range is screened out, including: obtaining three-dimensional space information of at least one of the candidate three-dimensional objects, and constructing an axis-aligned bounding box tree based on the three-dimensional space information; the axis-aligned bounding box tree includes a root node, internal nodes and leaf nodes, each node has a corresponding three-dimensional space range, and any leaf node is uniquely associated with a single candidate three-dimensional object; according to the node hierarchy relationship, starting from the root node, the intersection relationship between the three-dimensional space range and the target three-dimensional space range is detected layer by layer; if the three-dimensional space range of any leaf node has the intersection relationship with the target three-dimensional space range, the candidate three-dimensional object associated with the leaf node is determined as the target three-dimensional object.

[0098] Efficient 3D spatial range intersection detection is achieved by constructing an axis-aligned bounding box tree (AABB tree). The axis-aligned bounding boxes of candidate 3D objects are organized into a tree structure, and hierarchical spatial partitioning is used to achieve fast spatial pruning. During layer-by-layer detection, if the 3D spatial range of a parent node does not intersect with the 3D spatial range of the target, all of its child nodes are skipped, reducing the computational complexity from O(n) of brute force traversal to O(log n). For example, in a scene with tens of thousands of 3D objects, collision detection can be reduced from hundreds of milliseconds to tens of milliseconds.

[0099] In some embodiments, the AABB tree only stores the minimum and maximum vertex coordinates (6 floating-point numbers) of the axis-aligned bounding box, eliminating the need to store complete geometric data and reducing memory usage.

[0100] In some embodiments, the axis-aligned bounding box is a cuboid parallel to the 3D coordinate axes, consisting of the minimum point and maximum point By definition, its edges are always parallel to the coordinate axes, and intersection detection only requires comparing the coordinate ranges, which has low computational complexity.

[0101] AABB tree nodes include root nodes, internal nodes, and leaf nodes. Root nodes cover the entire detection space and are the top-level entry point to the tree. Internal nodes are non-leaf nodes that store the merged bounding boxes of leaf nodes (e.g., the union of two leaf node AABBs). Leaf nodes are bottom-level nodes that are uniquely associated with a candidate 3D object. Their corresponding axis-aligned bounding boxes directly enclose the candidate 3D object.

[0102] Intersection in three-dimensional space refers to the overlapping area of ​​two three-dimensional spaces. Mathematically, it must satisfy the requirement that there is no separation on all coordinate axes.

[0103] In some embodiments, the AABB coordinates of each candidate 3D object are extracted and an AABB tree is constructed. The tree is constructed recursively from the bottom up. During the construction process, the AABB of each candidate 3D object is encapsulated as a leaf node. The AABBs of adjacent leaf nodes are merged pairwise, or the AABBs of multiple adjacent leaf nodes are merged, to generate the AABB of an internal node (the bounding box of the internal node is the union of the bounding boxes of its child nodes). This recursive merging continues until the AABB of the root node is generated, forming a complete tree structure.

[0104] During fine-scanning in 3D space, recursive searching begins at the root node. Check whether the AABB of the current node intersects with the target spatial range. If not, terminate the search for all nodes in that branch. If they intersect and the current node is the root node, recursively check its internal nodes. If they intersect and the current node is an internal node, recursively check its leaf nodes. If they intersect and the current node is a leaf node, determine the candidate 3D object associated with that leaf node as the target 3D object.

[0105] Tree-based intersection detection can be achieved through collision detection or three-dimensional intersection calculation.

[0106] The index tree is used to quickly locate nodes that intersect with the target three-dimensional space range, exclude irrelevant nodes, and further reduce the amount of calculation.

[0107] In some embodiments, the code for three-dimensional space fine screening based on three-dimensional space index is as follows: if proceed_to_3d_filtering: finalResults = []; / / Read the 3D spatial information of the candidate 3D object from the JSON cache; for each objectID in candidateObjects: object3DInfo = readFromJSON(objectID); originalAABB = object3DInfo.original_aabb; / / Use AABB tree for accurate 3D intersection judgment; if AABBIntersect3D(QueryRegion3D, originalAABB): finalResults.add(objectID); return finalResults.

[0108] In some embodiments, the method of screening out a target three-dimensional object whose three-dimensional spatial range intersects with the target three-dimensional spatial range from at least one of the candidate three-dimensional objects includes: performing a three-dimensional geometric intersection calculation on all the candidate three-dimensional objects based on the geometric parameters of the target three-dimensional spatial range when the quantity ratio is less than or equal to the set ratio; and determining the candidate three-dimensional object whose three-dimensional spatial range has an intersection relationship with the target three-dimensional spatial range as the target three-dimensional object.

[0109] Three-dimensional geometric intersection calculation refers to an algorithm that detects the intersection of spatial ranges directly based on geometric parameters.

[0110] In some embodiments, when the quantity ratio is less than or equal to the set ratio, the built-in three-dimensional geometric intersection calculation engine is called to perform three-dimensional geometric intersection calculation on each candidate three-dimensional object based on the geometric parameters of the target three-dimensional space range and the geometric parameters of each candidate three-dimensional object (i.e., the geometric parameters of the axis-aligned bounding box), and the candidate three-dimensional object whose three-dimensional space range (axis-aligned bounding box) has an intersection relationship with the target three-dimensional space range is determined as the target three-dimensional object.

[0111] Calling the built-in 3D geometry intersection calculation engine, it works perfectly with the Unreal Engine AABB system to maintain system stability.

[0112] When the set of candidate 3D objects is small, the spatial index construction is skipped and the geometric calculation is performed directly, avoiding the storage and maintenance costs of the index and reducing memory usage.

[0113] That is, the threshold mechanism for setting ratios in this application can adaptively balance the costs of initial screening and fine screening. Through the dynamic load balancing mechanism, index acceleration is enabled when the scale of candidate three-dimensional objects is large, and direct traversal is performed when the scale is small, thereby avoiding the overhead of index maintenance exceeding its benefits and achieving an effective improvement in retrieval efficiency.

[0114] like Figure 7 As shown, Figure 7 This is a three-dimensional spatial screening schematic diagram provided in an embodiment of the present application. Figure 7 There are four directed line segments perpendicular to the XY plane, the target projection plane, and parallel to the Z axis. These directed line segments connect the geometric center point of the second projection area of ​​the candidate three-dimensional object and its own geometric center point, showing the mapping from two-dimensional space to three-dimensional space. Figure 7 In the illustrated scenario, the three-dimensional spatial ranges of the four candidate three-dimensional objects all intersect with the target three-dimensional spatial range. Accordingly, the four candidate three-dimensional objects are determined as target three-dimensional objects.

[0115] The method described in this application can be applied to urban digital twin systems, industrial simulation and digital factory systems, virtual reality training systems, drone swarm management systems, intelligent logistics systems, metaverse platforms and other fields.

[0116] In urban digital twin systems, such as smart city management platforms, traffic monitoring systems, and urban planning simulations, data within a target three-dimensional spatial range can be quickly queried. For example, real-time visualization of urban traffic flow can be achieved by selecting a target three-dimensional spatial range using a 3D box or using district boundaries or road segment models, performing statistical analysis on the vehicles within the range, and querying information about the vehicles within that range.

[0117] In an industrial simulation system, the method described in this application is used to monitor and query smart devices within a target three-dimensional space range, thereby achieving rapid screening and avoiding affecting scene rendering.

[0118] In the virtual reality training system, objects and devices that need to be interacted with in the virtual reality training scene are screened to improve the response speed and immersion of the virtual reality system.

[0119] In the drone swarm management system, drones within a specific airspace range, i.e., the target three-dimensional space range, are screened to achieve real-time monitoring and control of large-scale drone clusters.

[0120] In the intelligent logistics system, goods, automatic guided vehicles, workers, etc. within the target three-dimensional space are screened to improve the query efficiency and response speed of the warehouse management system.

[0121] On the Metaverse platform, virtual objects, other users, interactive elements, etc. around users in the virtual world are screened to achieve the construction of a virtual world where large numbers of users are online at the same time.

[0122] The method described in this application is suitable for the rapid spatial screening of large-scale dynamic objects in three-dimensional virtual scenes. It reduces the three-dimensional spatial retrieval problem to a two-dimensional plane, and combines a hybrid spatial indexing architecture of two-dimensional space preliminary screening and three-dimensional space fine screening. It can significantly improve the spatial screening efficiency in large-scale dynamic object scenes such as urban digital twins and game engines, achieve performance optimization, and reduce computing resource consumption.

[0123] Through dimensionality reduction pre-screening, most complex three-dimensional calculations are converted into efficient two-dimensional operations, improving query performance by 60%-80%. The two-dimensional index structure occupies less memory space than the three-dimensional index, reducing overall memory usage by 30%-50%.

[0124] In addition, compared with the three-dimensional index structure, the two-dimensional projection change detection and update mechanism reduces unnecessary index update operations, reduces the modification frequency, reduces the workload of memory reading and writing, improves the frame rate stability of real-time rendering in virtual scenes, and reduces the impact on rendering performance while supporting retrieval in large-scale dynamic object scenes.

[0125] In an embodiment of the present application, a target three-dimensional spatial range is projected onto a target projection plane to obtain its corresponding first projection area. Based on the intersection relationship between the projection area of ​​the three-dimensional object on the target projection plane and the first projection area, candidate three-dimensional objects are screened from multiple three-dimensional objects. Then, from the candidate three-dimensional objects, target three-dimensional objects whose three-dimensional spatial range intersects with the target three-dimensional spatial range are screened. Through dimensionality reduction and a hierarchical screening mechanism, the present application transforms complex three-dimensional spatial relationships into efficient two-dimensional intersection judgments, quickly filters out irrelevant objects, reduces the number of objects to be processed in subsequent three-dimensional fine screening, significantly reduces the amount of computation, and improves the efficiency of three-dimensional spatial retrieval.

[0126] See also Figure 8 , Figure 8 This is a structural diagram of a hybrid spatial indexing system provided in an embodiment of the present application. For ease of explanation, only the parts related to the embodiment of the present application are shown.

[0127] The hybrid spatial indexing system 800 includes: a determination module 801 , a first screening module 802 , and a second screening module 803 .

[0128] The determination module 801 is configured to determine a first projection area of ​​a target three-dimensional space range indicated by a search query request on a target projection plane.

[0129] The first screening module 802 is configured to screen out at least one candidate three-dimensional object whose projection area on the target projection plane intersects with the first projection area from a plurality of three-dimensional objects based on a two-dimensional spatial index.

[0130] The second screening module 803 is configured to screen out a target three-dimensional object whose three-dimensional space range intersects with the target three-dimensional space range from at least one candidate three-dimensional object.

[0131] In some embodiments, the system further comprises a computing module for: Calculating a ratio of the number of all the candidate three-dimensional objects to the number of all the three-dimensional objects; Accordingly, the second screening module is used to: When the quantity ratio is greater than the set ratio, the target three-dimensional object whose three-dimensional space range intersects with the target three-dimensional space range is screened out based on the three-dimensional space index corresponding to at least one candidate three-dimensional object.

[0132] In some embodiments, the second screening module is specifically configured to: Obtaining three-dimensional spatial information of at least one candidate three-dimensional object, and constructing an axis-aligned bounding box tree based on the three-dimensional spatial information; the axis-aligned bounding box tree includes a root node, internal nodes, and leaf nodes, each node having a corresponding three-dimensional spatial range, and any leaf node is uniquely associated with a single candidate three-dimensional object; According to the node hierarchy, starting from the root node, the intersection relationship between the three-dimensional space range and the target three-dimensional space range is detected layer by layer; If the three-dimensional space range of any leaf node has the intersection relationship with the target three-dimensional space range, the candidate three-dimensional object associated with the leaf node is determined as the target three-dimensional object.

[0133] In some embodiments, the second screening module is further configured to: When the number ratio is less than or equal to the set ratio, performing a three-dimensional geometric intersection calculation on all the candidate three-dimensional objects based on the geometric parameters of the target three-dimensional space range; The candidate three-dimensional object whose three-dimensional space range intersects with the target three-dimensional space range is determined as the target three-dimensional object.

[0134] In some embodiments, the system further includes a projection plane determination module configured to: Calculating distribution dispersion of the three-dimensional objects on three coordinate axes based on the three-dimensional coordinates of the three-dimensional objects; The plane formed by the two coordinate axes with the largest distribution dispersion is selected as the target projection plane.

[0135] In some embodiments, the system further includes an index building module for: determining a second projection area of ​​each of the three-dimensional objects on the target projection plane; A mapping relationship between the object identifier of each three-dimensional object and its corresponding second projection area is established to obtain the two-dimensional spatial index.

[0136] In some embodiments, the index building module is further configured to: When it is detected that the coordinate value of any three-dimensional object on the relevant coordinate axis of the target projection plane changes, the second projection area of ​​the three-dimensional object is re-determined, and the mapping relationship of the three-dimensional object in the two-dimensional space index is updated accordingly.

[0137] The hybrid spatial indexing system provided in the embodiment of the present application can implement each process of the embodiment of the above-mentioned hybrid spatial indexing method and can achieve the same technical effect. To avoid repetition, it will not be described here.

[0138] Figure 9 is a structural diagram of an electronic device provided in an embodiment of the present application. As shown in the figure, the electronic device 9 of this embodiment includes: at least one processor 90 ( Figure 9 Only one is shown), a memory 91 and a computer program 92 stored in the memory 91 and executable on the at least one processor 90, wherein the processor 90 implements the steps of any of the above-mentioned method embodiments when executing the computer program 92.

[0139] The electronic device 9 can be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The electronic device 9 can include, but is not limited to, a processor 90 and a memory 91. It can be understood by those skilled in the art that Figure 9 It is only an example of the electronic device 9 and does not constitute a limitation of the electronic device 9. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the electronic device may also include input and output devices, network access devices, buses, etc.

[0140] The processor 90 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.

[0141] The memory 91 can be an internal storage unit of the electronic device 9, such as a hard drive or memory of the electronic device 9. The memory 91 can also be an external storage device of the electronic device 9, such as a plug-in hard drive, a Smart Media Card (SMC), a Secure Digital (SD) card, a flash memory card, etc. Furthermore, the memory 91 can include both an internal storage unit of the electronic device 9 and an external storage device. The memory 91 is used to store the computer program and other programs and data required by the electronic device. The memory 91 can also be used to temporarily store data that has been output or is about to be output.

[0142] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the system can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0143] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant description of other embodiments.

[0144] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0145] In the embodiments provided in this application, it should be understood that the disclosed systems / electronic devices and methods can be implemented in other ways. For example, the system / electronic device embodiments described above are merely schematic. For example, the division of the modules or units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of the system or unit, which can be electrical, mechanical or other forms.

[0146] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0147] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0148] If the integrated module / unit is implemented as a software functional unit and sold or used as a standalone product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application can implement all or part of the process steps in the above-mentioned method embodiments by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When executed by a processor, the computer program can implement the steps of each of the above-mentioned method embodiments. The computer program includes computer program code, which can be in source code form, object code form, executable file, or some intermediate form. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal, and software distribution medium. It should be noted that the content of the computer-readable medium can be appropriately increased or decreased based on the requirements of legislation and patent practice in a jurisdiction. For example, in some jurisdictions, based on legislation and patent practice, computer-readable media does not include electric carrier signals and telecommunication signals.

[0149] The present application implements all or part of the processes in the above-mentioned embodiment methods, and may also be implemented through a computer program product. When the computer program product runs on an electronic device, the electronic device can implement the steps in the above-mentioned method embodiments when executing the computer program product.

[0150] The above-described embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present application, and should all be included in the scope of protection of the present application.

Claims

1. A hybrid spatial indexing method, characterized in that: include: Determine a first projection area of ​​the target three-dimensional space range indicated by the search query request on the target projection plane; Based on the two-dimensional spatial index, screening out at least one candidate three-dimensional object from a plurality of three-dimensional objects, whose projection area on the target projection plane intersects with the first projection area; A target three-dimensional object whose three-dimensional space range intersects with the target three-dimensional space range is screened out from at least one of the candidate three-dimensional objects.

2. The method according to claim 1, characterized in that Before selecting a target three-dimensional object whose three-dimensional space range intersects with the target three-dimensional space range from at least one candidate three-dimensional object, the method further includes: Calculating a ratio of the number of all the candidate three-dimensional objects to the number of all the three-dimensional objects; The step of selecting a target three-dimensional object whose three-dimensional spatial range intersects with the target three-dimensional spatial range from at least one candidate three-dimensional object comprises: When the quantity ratio is greater than the set ratio, the target three-dimensional object whose three-dimensional space range intersects with the target three-dimensional space range is screened out based on the three-dimensional space index corresponding to at least one candidate three-dimensional object.

3. The method according to claim 2, characterized in that The step of screening out the target three-dimensional object whose three-dimensional space range intersects with the target three-dimensional space range based on the three-dimensional space index corresponding to at least one candidate three-dimensional object includes: Obtaining three-dimensional spatial information of at least one candidate three-dimensional object, and constructing an axis-aligned bounding box tree based on the three-dimensional spatial information; the axis-aligned bounding box tree includes a root node, internal nodes, and leaf nodes, each node having a corresponding three-dimensional spatial range, and any leaf node is uniquely associated with a single candidate three-dimensional object; According to the node hierarchy, starting from the root node, the intersection relationship between the three-dimensional space range and the target three-dimensional space range is detected layer by layer; If the three-dimensional space range of any leaf node has the intersection relationship with the target three-dimensional space range, the candidate three-dimensional object associated with the leaf node is determined as the target three-dimensional object.

4. The method according to claim 2, characterized in that The step of selecting a target three-dimensional object whose three-dimensional spatial range intersects with the target three-dimensional spatial range from at least one candidate three-dimensional object comprises: When the number ratio is less than or equal to the set ratio, performing a three-dimensional geometric intersection calculation on all the candidate three-dimensional objects based on the geometric parameters of the target three-dimensional space range; The candidate three-dimensional object whose three-dimensional space range intersects with the target three-dimensional space range is determined as the target three-dimensional object.

5. The method according to claim 1, wherein The step of determining that the target three-dimensional space range indicated by the search query request is before the first projection area on the target projection plane further includes: Calculating distribution dispersion of the three-dimensional objects on three coordinate axes based on the three-dimensional coordinates of the three-dimensional objects; The plane formed by the two coordinate axes with the largest distribution dispersion is selected as the target projection plane.

6. The method according to claim 5, characterized in that After selecting the plane formed by the two coordinate axes with the largest distribution dispersion as the target projection plane, the method further includes: determining a second projection area of ​​each of the three-dimensional objects on the target projection plane; A mapping relationship between the object identifier of each three-dimensional object and its corresponding second projection area is established to obtain the two-dimensional spatial index.

7. The method according to claim 6, characterized in that The method further comprises: When it is detected that the coordinate value of any three-dimensional object on the relevant coordinate axis of the target projection plane changes, the second projection area of ​​the three-dimensional object is re-determined, and the mapping relationship of the three-dimensional object in the two-dimensional space index is updated accordingly.

8. A hybrid spatial indexing system, characterized in that: include: A determination module, configured to determine a first projection area of ​​a target three-dimensional space range indicated by the search query request on a target projection plane; a first screening module, configured to screen out, from a plurality of three-dimensional objects, at least one candidate three-dimensional object whose projection area on the target projection plane intersects with the first projection area based on a two-dimensional spatial index; The second screening module is configured to screen out a target three-dimensional object whose three-dimensional space range intersects with the target three-dimensional space range from at least one candidate three-dimensional object.

9. An electronic device, characterized in that: The electronic device comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the electronic device implements the method according to any one of claims 1 to 7.

10. A computer program product, characterized in that The invention comprises a computer program which, when executed, causes the method according to any one of claims 1 to 7 to be performed.

Citation Information

Patent Citations

  • Multi-level mixed three-dimensional space index method

    CN103092926A

  • Element localization in space

    CN113822924A

  • Aggregation method, device and equipment and readable storage medium

    CN117519556A

  • Three-dimensional space data processing apparatus and program

    JP2012133701A

Cited By

  • Human-computer interaction method, device and equipment based on aircraft unstructured grid and storage medium

    CN120973241A