Location relationship determination method, storage medium, and electronic device

By constructing a hash mapping relationship, the problem of large amount of data calculation and low efficiency in spatial position analysis in the prior art is solved, and efficient spatial position relationship determination is achieved.

WO2025181555A1PCT designated stage Publication Date: 2025-09-04CLOUD INTELLIGENCE ASSETS HOLDING (SINGAPORE) PTE LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
PCT/IB2025/050052
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-02-29
Filing Date
2025-01-03
Publication Date
2025-09-04

AI Technical Summary

Technical Problem

When performing spatial position analysis, the data calculation amount is large and the calculation efficiency is low. Especially when judging the position relationship between point data and polygons, it cannot effectively improve query performance.

Method used

By constructing the hash mapping relationship between the target object and the target area, using the hash mapping relationship to quickly find the associated edges, determine the spatial position relationship based on the associated edges, and avoid traversing all edges and binary tree search processes.

Benefits of technology

It realizes the rapid determination of the spatial position relationship between the target object and the target area, reduces the amount of data calculation and improves the calculation efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure IB2025050052_04092025_PF_FP_ABST
    Figure IB2025050052_04092025_PF_FP_ABST
Patent Text Reader

Abstract

The present disclosure provides a location relationship determination method, a storage medium, and an electronic device. The method comprises: acquiring location data of a target object and boundary data of a target region, wherein the boundary data is used for describing a plurality of edges which construct the target region; constructing a target mapping relationship on the basis of the boundary data, wherein the target mapping relationship is used for representing a hash mapping relationship corresponding to the boundary data; using the target mapping relationship to search for an associated edge of the target object from the plurality of edges, wherein the associated edge is used for calculating a winding number associated with the target object; and on the basis of the associated edge, determining a spatial location relationship between the target object and the target region. The present disclosure solves the technical problems in the related art of large data calculation quantity and low calculation efficiency during spatial location analysis.
Need to check novelty before this filing date? Find Prior Art

Description

[0001]TECHNICAL FIELD The present disclosure relates to the field of computer technology, and more specifically, to a method for determining a positional relationship, a storage medium, and an electronic device. Background: With the increasing popularity of the Global Positioning System (GPS), point data has become increasingly used in spatial database systems. Point data, typically represented by latitude and longitude information, can be used to address spatial analysis problems (point-in-polygon, PIP). The PIP problem can be used to determine whether a point is inside a polygon. It is not only a basic computational geometry problem but also widely present in many geospatial or location-based service (LBS) applications. For example, the PIP problem can be used in Geographic Information Systems (GIS) and geospatial analysis to determine whether a geographic location is within a specific boundary. Related technologies can use axis-aligned bounding boxes or binary trees to quickly determine the positional relationship between a point and a polygon. However, the precise determination stage requires traversing all edges of the polygon or the binary tree, resulting in a large amount of computational data and thus affecting the efficiency of spatial position analysis. Currently, no effective solution has been proposed to address the aforementioned issues. SUMMARY OF THE INVENTION Embodiments of the present disclosure provide a method for determining a positional relationship, a storage medium, and an electronic device to at least address the technical issues of large data computational complexity and low computational efficiency in related art spatial position analysis. According to one aspect of an embodiment of the present disclosure, a method for determining a positional relationship is provided, comprising: obtaining position data of a target object and boundary data of a target region, wherein the boundary data describes multiple edges constituting the target region; constructing a target mapping relationship based on the boundary data, wherein the target mapping relationship represents a hash mapping relationship corresponding to the boundary data; using the target mapping relationship to search for associated edges of the target object from the multiple edges, wherein the associated edges are used to calculate the associated surrounding number of the target object; and determining the spatial positional relationship between the target object and the target region based on the associated edges.According to another aspect of an embodiment of the present disclosure, a method for determining a positional relationship is provided, comprising: obtaining position data of a target vehicle and boundary data of a target positioning area, wherein the boundary data is used to describe multiple edges constituting the target positioning area; constructing a target mapping relationship based on the boundary data, wherein the target mapping relationship is used to represent a hash mapping relationship corresponding to the boundary data; using the target mapping relationship to search for associated edges of the target vehicle from the multiple edges, wherein the associated edges are used to calculate a surround number associated with the target vehicle; and determining a spatial positional relationship between the target vehicle and the target positioning area based on the associated edges. According to another aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, the computer-readable storage medium including a stored executable program, wherein when the executable program is executed, the device containing the computer-readable storage medium is controlled to execute any one of the method for determining a positional relationship in the embodiments of the present disclosure. According to another aspect of an embodiment of the present disclosure, an electronic device is provided, comprising: a memory storing an executable program; and a processor for executing the program, wherein when the program is executed, the method for determining a positional relationship in the embodiments of the present disclosure is executed. According to another aspect of the embodiments of the present disclosure, a computer program product is provided, including a computer program. When executed by a processor, the computer program implements any one of the position relationship determination methods of the embodiments of the present disclosure. In the embodiments of the present disclosure, by obtaining the position data of the target object and the boundary data of the target region, a hash mapping relationship is constructed based on the boundary data. The hash mapping relationship is used to quickly find the associated edges of the target object from multiple edges. Finally, the spatial position relationship between the target object and the target region is determined based on the associated edges. This hash mapping relationship can be used to accelerate the precise judgment process in the PIP problem, avoiding the need to traverse all edges and search a binary tree during the precise judgment phase. This achieves the goal of quickly determining the spatial position relationship between the target object and the target region, thereby reducing the amount of data computation required and improving computational efficiency during spatial position analysis. This solves the technical problem of large data computation and low computational efficiency in spatial position analysis in related technologies. It should be noted that the general description above and the detailed description below are merely for the purpose of exemplifying and explaining the present disclosure and do not constitute a limitation of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS The drawings described herein are used to provide a further understanding of the present disclosure and constitute a part of the present disclosure. The illustrative embodiments of the present disclosure and their descriptions are used to explain the present disclosure and do not constitute an improper limitation on the present disclosure.In the accompanying drawings: FIG1 is a hardware block diagram of a computer terminal (or mobile device) for implementing a method for determining a position relationship according to Example 1 of the present disclosure; FIG2 is a flow chart of a method for determining a position relationship according to Example 1 of the present disclosure; FIG3 is a schematic diagram of a method for determining a position relationship according to Example 1 of the present disclosure; FIG4 is a schematic diagram of another method for determining a position relationship according to Example 1 of the present disclosure; FIG5 is a schematic diagram of another method for determining a position relationship according to Example 1 of the present disclosure; FIG6 is a flow chart of a method for determining a position relationship according to Example 2 of the present disclosure; FIG7 is a structural block diagram of a device for determining a position relationship according to Example 3 of the present disclosure; FIG8 is a structural block diagram of another device for determining a position relationship according to Example 3 of the present disclosure; and FIG9 is a structural block diagram of a computer terminal according to Example 1 of the present disclosure. DETAILED DESCRIPTION OF THE EMBODIMENTS To help those skilled in the art better understand the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are only a portion of the embodiments of the present disclosure, and not all of them. Based on the embodiments of this disclosure, all other embodiments derived by persons of ordinary skill in the art without inventive effort should fall within the scope of protection of this disclosure. It should be noted that the terms "first," "second," and so on, in the specification and claims of this disclosure, and in the accompanying drawings, are used to distinguish similar objects and are not necessarily used to describe a specific order or precedence. It should be understood that such terms are interchangeable where appropriate, so that the embodiments of this disclosure described herein can be implemented in an order other than that illustrated or described herein. Furthermore, the terms "including," "having," and any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus comprising a series of steps or units is not necessarily limited to the steps or units expressly listed, but may include other steps or units not expressly listed or inherent to such process, method, product, or apparatus. First, some nouns or terms used in the description of the embodiments of this disclosure are subject to the following interpretation: Axis-Aligned Bounding Box (AABB): The smallest rectangle that can enclose a given object with sides parallel to the coordinate axes, also known as the minimum enclosing rectangle. Binary-tree: A tree-like data structure with at most two subtrees at each node. Hash table: A data structure that allows direct access based on a key value.Records are accessed by mapping key values ​​to a table location to speed up lookups. The mapping function used is a hash function, and the array storing the records is a hash table. A related art method for quickly determining the positional relationship between points and polygons can be divided into two stages: coarse filtering and fine determination. First, batch filtering is performed using the polygon's minimum enclosing rectangle. Then, a lookaround method is used to precisely determine whether a point is within the polygon. However, this method is only applicable when only a small number of points are within the polygon's minimum enclosing rectangle. If a large number of points still fall within the polygon's minimum enclosing rectangle after filtering, it cannot effectively improve PIP query performance. Another related art method uses the open source spatial database (PostGIS) to cache a binary tree to accelerate the fine determination stage. Specifically, a binary tree is first constructed for the polygon, with each edge of the polygon as a leaf node, and the binary tree is constructed from the bottom up. In the fine determination stage, the binary tree is searched to find the edges required for calculation. Finally, the circle count is calculated to determine whether the point is within the polygon. However, a drawback of this method is that each fine determination requires searching the binary tree, and this search process is a performance bottleneck. In particular, when a polygon has a large number of sides, the required tree depth increases significantly. Therefore, it can be seen that the related art suffers from technical issues such as large data computation volume and low computational efficiency when performing spatial position analysis. Currently, no effective solutions have been proposed for these issues. Example 1 According to an embodiment of the present disclosure, a method embodiment for determining a positional relationship is also provided. It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system, such as a set of computer-executable instructions. Furthermore, although the flowcharts illustrate a logical sequence, in some cases, the steps shown or described can be executed in a different order than that shown. The method embodiment provided in Example 1 of the present disclosure can be executed in a mobile terminal, computer terminal, or similar computing device. Figure 1 shows a hardware block diagram of a computer terminal (or mobile device) for implementing the method for determining a positional relationship. As shown in FIG1 , a computer terminal 10 (or mobile device) may include one or more processors 102 (illustrated as 102 a, 102 b, 102 n in the figure) (the processor 102 may include, but is not limited to, a processing device such as a microcontroller unit (MCU) or a programmable logic device (Field Programmable Gate Array, FPGA)), a memory 104 for storing data, and a transmission device 106 for communication functions.In addition, it may also include: a display, an input / output interface (I / O interface), a Universal Serial Bus (USB) port (which may be included as one of the ports of a BUS), a network interface, a power supply, and / or a camera. Those skilled in the art will appreciate that the structure shown in FIG1 is merely illustrative and does not limit the structure of the electronic device described above. For example, the computer terminal 10 may include more or fewer components than shown in FIG1 , or have a configuration different from that shown in FIG1 . It should be noted that the one or more processors 102 and / or other data processing circuits described above may generally be referred to herein as "data processing circuitry." This data processing circuitry may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. Furthermore, the data processing circuitry may be a single, independent processing module, or may be fully or partially integrated into any of the other components of the computer terminal 10 (or mobile device). As described in the embodiments of the present disclosure, this data processing circuitry serves as a processor control (e.g., selecting a variable resistor terminal path connected to an interface). The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the positional relationship determination method in the embodiments of the present disclosure. The processor 102 executes the software programs and modules stored in the memory 104 to execute various functional applications and data processing, thereby implementing the positional relationship determination method described above. The memory 104 can include high-speed random access memory (RAM) and non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 can further include memory remote from the processor 102, which can be connected to the computer terminal 10 via a network. Examples of such networks include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof. The transmission device 106 is used to receive or transmit data via a network. Specific examples of such networks include wireless networks provided by the communications provider of the computer terminal 10. In one example, the transmission device 106 includes a network interface controller (NIC), which can be connected to other network devices via a base station to enable communication with the Internet. In one example, the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.The display may be, for example, a touchscreen liquid crystal display (LCD), which enables a user to interact with the user interface of the computer terminal 10 (or mobile device). It should be noted that, in some optional embodiments, the computer device (or mobile device) shown in FIG. 1 may include hardware components (including circuits), software components (including computer code stored on a computer-readable medium), or a combination of both. It should be noted that FIG. 1 is merely an example of a specific embodiment and is intended to illustrate the types of components that may be present in the computer device (or mobile device). In the aforementioned operating environment, the present disclosure provides a method for determining a positional relationship as shown in FIG. 2 . FIG2 is a flowchart of a method for determining a positional relationship according to Embodiment 1 of the present disclosure. As shown in FIG2 , the method includes the following steps: Step S21: Acquire the position data of a target object and the boundary data of a target area, wherein the boundary data is used to describe the multiple edges that construct the target area; Step S22: Construct a target mapping relationship based on the boundary data, wherein the target mapping relationship is used to represent the hash mapping relationship corresponding to the boundary data; Step S23: Use the target mapping relationship to search for associated edges of the target object from the multiple edges, wherein the associated edges are used to calculate the number of associated surrounds of the target object; Step S24: Determine the spatial positional relationship between the target object and the target area based on the associated edges. The target object can be a person, an animal, a vehicle, or an object. The position data of the target object can be acquired by sensors, such as cameras, lidar, and other devices that can capture the target object's position information in real time. Specifically, it may include data such as the target object's coordinates, speed, and direction. The boundary data of the target area is polygonal data, which can be acquired through measurement or map data. For example, for a building area, boundary data can be obtained by measuring the length and height of the walls; for a fenced area, the coordinates of the fence can be obtained from map data. The target mapping relationship described above can be a hash mapping relationship. The target mapping relationship is stored in a hash table, or other data structures can be selected for storage based on specific needs. By constructing a hash mapping relationship based on boundary data, boundary data can be quickly and efficiently stored and retrieved. Furthermore, when using associated edges to determine the spatial positional relationship between a target object and a target area, the target area is first divided into a grid or a series of cells, and each cell is assigned a unique hash value. A hash function is then used to map the target object's spatial position to the corresponding cell, thereby determining the spatial positional relationship between the target object and the target area.For example, a car company may regularly track the locations of its vehicles, storing them as point data in its database. It can then query how many vehicles are within a given area (typically designated as a polygon) at a given moment, or query which area a particular vehicle is located in at a given moment. Based on steps S21 to S23 above, by obtaining the location data of the target object and the boundary data of the target area, a hash mapping relationship is constructed based on the boundary data. The hash mapping relationship is then used to quickly find the associated edges of the target object from multiple edges. Finally, the spatial positional relationship between the target object and the target area is determined based on the associated edges. This hash mapping relationship can be used to accelerate the precise determination process in the PIP problem, avoiding the need to traverse all edges and perform a binary tree search during the precise determination phase. This achieves the goal of quickly determining the spatial positional relationship between the target object and the target area, thereby reducing the amount of data computation required and improving computational efficiency during spatial position analysis. This addresses the technical issues of high data computation and low computational efficiency in related technologies for spatial position analysis. The following further describes the positional relationship determination method in the disclosed embodiments. In an optional embodiment, constructing a target mapping relationship based on the boundary data in step S22 includes: step S221, determining the number of edges based on the boundary data; step S222, calculating the number of groups using the number of edges; and step S223, dividing the multiple edges into multiple groups according to the number of groups in a preset coordinate direction to obtain the target mapping relationship. The preset coordinate direction may be the Y-axis direction or the X-axis direction. Specifically, taking the Y-axis direction as an example, the number of edges is determined based on the boundary data, the number of groups in the hash table is calculated using the number of edges, and the multiple edges are divided into multiple groups according to the number of groups in the Y-axis direction to obtain the target mapping relationship. Based on the above optional embodiment, the number of edges of the plurality of edges is determined based on the boundary data, and the number of groups is calculated using the number of edges. Finally, the plurality of edges are divided into a plurality of groups according to the number of groups in a preset coordinate direction to obtain a target mapping relationship. This is used to determine the spatial positional relationship between the target object and the target area, thereby further improving the accuracy and efficiency of data processing and analysis.In an optional embodiment, in step S223, dividing the multiple edges into multiple groups according to the number of groups in a preset coordinate direction to obtain a target mapping relationship includes: step S2231, determining the coordinate range of the target area in the preset coordinate direction; step S2232, dividing the coordinate range according to the number of groups to obtain multiple groups; and step S2233, traversing the multiple edges and determining the groups to which the multiple edges belong from the multiple groups to obtain the target mapping relationship. Specifically, continuing with the example of the preset coordinate direction being the Y-axis, the coordinate range of the target area in the Y-axis direction is determined, and then the coordinate range is divided according to the grouping data to obtain multiple groups. The multiple edges are traversed to determine the groups to which the edges belong from the multiple groups based on the coordinate positions of the edges to obtain the target mapping relationship. Figure 3 is a schematic diagram of a position relationship determination method according to Example 1 of the present disclosure. As shown in Figure 3, for an input polygon, the number of groups calculated in the hash table is 5, where e0-e16 are the edges of the input polygon. Calculate the Y coordinate range of the input polygon, divide it evenly into multiple groups according to the grouping data, then traverse all the edges of the polygon, calculate which groups each edge falls into, and record it in the corresponding group, which is a hash table. Among them, group GO={e0, el, e2, el4, el5, el6), group G1=(e2, e3, el2, el3, el4}, group G2=(e3, e4, el0, el1, el2), group G3=(e5, e8, e9, el0), group G4={e6, e7, e8}. By determining the coordinate range and the number of groups, the target area can be divided into multiple small areas, which facilitates analysis and processing. At the same time, by traversing multiple edges and determining the belonging groups, a target mapping relationship can be obtained, and then the structure and characteristics of the target area can be more accurately understood, providing effective support for subsequent analysis and application. Based on the above optional embodiment, by determining the coordinate range of the target area in the preset coordinate direction, and then dividing the coordinate range according to the number of groups to obtain multiple groups, and finally traversing multiple edges, By determining the groups to which multiple edges belong from multiple groups and obtaining the target mapping relationship, the target area can be accurately divided and mapped, thereby achieving effective management and analysis of the target area and further improving computing efficiency.In an optional embodiment, in step S2233, traversing the plurality of edges, determining the group to which the plurality of edges belong from the plurality of groups, and obtaining the target mapping relationship includes: traversing the plurality of edges, determining the group to which the plurality of edges belong from the plurality of groups, and obtaining the number of edges contained in each of the plurality of groups; and, in response to the number of edges contained in each of the plurality of groups being less than or equal to a first preset threshold, determining the target mapping relationship based on the group to which the plurality of edges belong. Specifically, traversing the plurality of edges, determining the group to which the plurality of edges belong from the plurality of groups, and obtaining the number of edges contained in each of the plurality of groups, for example, GO contains 6 edges, G1 contains 5 edges, G2 contains 5 edges, G3 contains 4 edges, and G4 contains 3 edges. If the number of edges contained in each of the plurality of groups is less than or equal to the first preset threshold, determining the target mapping relationship based on the group to which the plurality of edges belong. Based on the above optional embodiment, by traversing multiple edges, determining the group to which the multiple edges belong from multiple groups, and obtaining the number of edges contained in each of the multiple groups, and then, in response to the number of edges contained in each group being less than or equal to a first preset threshold, determining a target mapping relationship based on the group to which the multiple edges belong, further improves data processing efficiency and accuracy. In an optional embodiment, in step S2233, traversing the multiple edges, determining the group to which the multiple edges belong from the multiple groups, and obtaining the target mapping relationship includes: in response to the number of edges contained in at least one group in the multiple groups being greater than the first preset threshold, further grouping the at least one group until the number of edges contained in each of the at least one group is less than or equal to the first preset threshold, thereby obtaining the target mapping relationship. Specifically, if the number of edges contained in at least one group in the multiple groups is greater than the first preset threshold, further grouping the at least one group, i.e., performing secondary hash grouping according to the above grouping method, constructing a sub-hash table, and obtaining the target mapping relationship until the number of edges contained in each of the at least one group is less than or equal to the first preset threshold. Based on the above optional embodiment, in response to at least one of the multiple groups having a number of edges greater than a first preset threshold, the at least one group is regrouped until the number of edges in each of the at least one group is less than or equal to the first preset threshold, thereby obtaining a target mapping relationship and further improving data processing efficiency and accuracy. In an optional embodiment, the positional relationship determination method in the disclosed embodiment further includes: obtaining a regrouping result for the at least one group; and, in response to the regrouping result satisfying a preset condition, continuing to determine whether the average number of edges in each of the at least one group is greater than a second preset threshold, wherein the preset condition is determined by the edge distribution of each of the at least one group and the average number of edges in each of the groups.Specifically, the regrouping result is a sub-hash table. When the edges of each group in the sub-hash table are evenly distributed, and the average number of edges across all groups in the sub-hash table is less than or equal to a second preset threshold, it can be determined that the sub-hash table meets the preset conditions, is valid, and can be added to multiple groups. Whether the edges of each group in the hash table are evenly distributed can be determined by the variance of the edge numbers of each group. Based on the above optional embodiment, computational efficiency is further improved by obtaining the re-grouping result of at least one group and, in response to the re-grouping result meeting the preset conditions, further determining whether the average number of edges of each group in the at least one group is greater than the second preset threshold. In an optional embodiment, the position relationship determination method in the disclosed embodiment further includes: deleting the re-grouping result in response to the re-grouping result not meeting the preset conditions. Specifically, when the edges of each group in the sub-hash table are not evenly distributed, and / or the average number of edges across all groups in the sub-hash table is greater than the second preset threshold, it is determined that the sub-hash table does not meet the preset conditions, and the sub-hash table is deleted. The original grouping result is retained and used to obtain the target mapping relationship. For polygons with holes in the middle, a hash table can similarly be constructed for each hole. Based on the above optional embodiment, by deleting the regrouping result in response to it not meeting a preset condition, the amount of data computation is reduced, further improving computational efficiency. In an optional embodiment, the positional relationship determination method in the disclosed embodiment further includes: detecting the spatial positional relationship between the target object and the bounding box of the target area; and filtering out the target object in response to the target object being outside the bounding box of the target area. Specifically, the spatial positional relationship between a point and the bounding box of the polygonal area is detected. If the point is outside the bounding box of the polygonal area, it can be determined that the point is outside the polygonal area. Points outside the bounding box can then be quickly filtered out using a batch processing method. For points within or on the edges of the bounding box, their presence within the polygonal area can be determined individually by calculating the number of surroundings. Based on the above optional embodiment, by detecting the spatial positional relationship between the target object and the bounding box of the target area, and then filtering out the target object in response to the target object being outside the bounding box of the target area, the spatial positional relationship between the target object and the target area can be accurately detected and identified, further improving computational efficiency.In an optional embodiment, in step S23, searching for associated edges of the target object from multiple edges using the target mapping relationship includes: step S231, detecting the spatial positional relationship between the target object and the bounding box of the target region; and step S232, in response to the target object being located at the edge or within the bounding box of the target region, searching for associated edges of the target object using the target mapping relationship. Specifically, the spatial positional relationship between the point and the bounding box of the polygonal region is detected. If the point is located at the edge or within the bounding box of the polygonal region, the associated edges of the point are searched using the target mapping relationship. That is, a constructed hash function is used to quickly determine which group in the hash table the point to be determined is located in. If the group records a sub-hash table, the group corresponding to the point in the sub-hash table is recalculated, thereby searching for the associated edges of the point and determining the spatial positional relationship between the point and the polygonal region based on the associated edges. Continuing with the example of the preset coordinate direction being the Y-axis, the coordinate range of the target area in the Y-axis direction is determined, and then the coordinate range is divided according to the grouping data to obtain multiple groups. Multiple edges are traversed to determine the group to which multiple edges belong from the multiple groups, and a hash mapping relationship is obtained. When a point is located at the edge or inside the bounding box of the polygonal area, the point's associated edge is found using the vertical coordinate of the point and the hash mapping relationship. Based on the above optional embodiment, computational efficiency is further improved by detecting the spatial positional relationship between the target object and the bounding box of the target area, and then, in response to the target object being located at the edge or inside the bounding box of the target area, finding the target object's associated edge using the target mapping relationship. In an optional embodiment, in step S24, determining the spatial positional relationship between the target object and the target area based on the associated edge includes: step S241, obtaining the spatial positional relationship between the target object and the associated edge and the direction of the associated edge; and step S242, determining the spatial positional relationship between the target object and the target area based on the spatial positional relationship between the target object and the associated edge and the direction of the associated edge. Specifically, traverse the edges associated with a point. For each associated edge, use the cross product method to determine whether the point is located to the left or right of the edge. For example, given an edge AB and a point C, you can cross-product vector AC with vector AB to obtain a new vector. If the z component of the new vector is positive, point C is located to the left of edge AB; if the z component is negative, point C is located to the right of edge AB. To determine the direction of an associated edge, use the coordinates of its starting and ending points to determine whether it points upward or downward. For example, if the starting coordinates of the associated edge are (x1, yl) and the ending coordinates are (x2, y2), you can compare yl and y2 to determine whether the edge points upward or downward.If yl < y2, the direction of the associated edge is upward; if yl > y2, the direction of the associated edge is downward. If the point is to the left of the edge and it is an upward edge, the wrapping number is increased by 1; if the point is to the right of the edge and it is a downward edge, the wrapping number is decreased by 1. Finally, a determination is made as to whether the wrapping number is 0. If it is 0, the point is determined to be outside the polygonal area; if it is not 0, the point is determined to be within the polygonal area. Based on the above optional embodiment, by obtaining the spatial positional relationship between the target object and the associated edge and the direction of the associated edge, the spatial positional relationship between the target object and the target area can be quickly determined based on the spatial positional relationship between the target object and the associated edge and the direction of the associated edge, further improving computational efficiency. FIG4 is a schematic diagram of another method for determining positional relationships according to Embodiment 1 of the present disclosure. As shown in FIG4 , after a polygon is input, its corresponding group data is calculated, and an initial hash table is constructed. Each group marked by the hash is traversed. If the number of edges in each group is less than or equal to a first preset threshold, the hash table construction is completed. If the number of variables in each group is greater than the first preset threshold, a secondary hash is performed to obtain a sub-hash table. The validity of the sub-hash table is further determined using a second preset threshold. If the sub-hash table is valid, the edge count determination is continued. If the sub-hash table is invalid, the sub-hash table is deleted and the original grouping result is retained, and the hash table construction is completed using the original grouping result. FIG5 is a schematic diagram of another method for determining positional relationships according to Embodiment 1 of the present disclosure. As shown in FIG5 , after point and polygon data are input, a hash table is constructed for the polygon. The point data is traversed simultaneously. If the point is outside the polygon's bounding box, the point is determined to be outside the polygon. If the point is inside the polygon's bounding box, a hash search is performed to further calculate the surrounding number. If the wrapping number is 0, the point is determined to be outside the polygon; if the wrapping number is not 0, the point is determined to be inside the polygon. In this disclosed embodiment, by caching a hash table and performing further filtering during the fine judgment phase, traversing all polygon edges is avoided, effectively reducing the computational effort. Furthermore, compared to the PostGIS method of caching a binary tree, this disclosed embodiment uses a hash function to quickly find edges required for calculation, avoiding the binary tree search process and effectively improving PIP query performance. This achieves the goal of quickly determining the spatial positional relationship between the target object and the target area, thereby reducing the amount of data computation required for spatial position analysis and improving computational efficiency. This addresses the technical issues of high data computation and low computational efficiency in related technologies for spatial position analysis.It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, storage, and display) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties. The collection, use, and processing of the relevant data must comply with the relevant laws, regulations, and standards of the relevant countries and regions, and corresponding operation portals are provided for users to choose to authorize or reject. It should be noted that for the sake of simplicity, the aforementioned method embodiments are described as a series of actions. However, those skilled in the art should understand that this disclosure is not limited by the order of the actions described, as certain steps can be performed in a different order or simultaneously according to this disclosure. Secondly, those skilled in the art should also understand that the embodiments described in this specification are all preferred embodiments, and the actions and modules involved are not necessarily required by this disclosure. Through the above description of the embodiments, those skilled in the art will clearly understand that the methods according to the above embodiments can be implemented using software and a necessary general-purpose hardware platform, or of course, hardware. Based on this understanding, the technical solution of the present disclosure, or the portion that contributes to the prior art, can essentially be embodied in the form of a software product. This computer software product is stored in a storage medium (e.g., ROM / RAM, a magnetic disk, or an optical disk) and includes instructions for enabling a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in various embodiments of the present disclosure. Example 2: FIG6 is a flowchart of a method for determining a position relationship according to Example 2 of the present disclosure. As shown in FIG6 , the method includes the following steps: Step S61: Acquire the position data of the target vehicle and the boundary data of the target positioning area, wherein the boundary data is used to describe the multiple edges that constitute the target positioning area; Step S62: Construct a target mapping relationship based on the boundary data, wherein the target mapping relationship is used to represent the hash mapping relationship corresponding to the boundary data; Step S63: Use the target mapping relationship to search for associated edges of the target vehicle from the multiple edges, wherein the associated edges are used to calculate the number of surrounds associated with the target vehicle; Step S64: Determine the spatial position relationship between the target vehicle and the target positioning area based on the associated edges.Based on steps S61 to S63 above, by obtaining the target vehicle's location data and the boundary data of the target positioning area, a hash mapping relationship is constructed based on the boundary data. The hash mapping relationship is then used to quickly search for the target vehicle's associated edges from multiple edges. Finally, the spatial positional relationship between the target vehicle and the target positioning area is determined based on the associated edges. This hash mapping relationship can be used to accelerate the precise determination process in the PIP problem, avoiding the need to traverse all edges and perform a binary tree search during the precise determination phase. This achieves the goal of quickly determining the spatial positional relationship between the target vehicle and the target positioning area, thereby reducing the amount of data computation required and improving computational efficiency during spatial position analysis. This resolves the technical issues of high data computation and low computational efficiency in related technologies related to spatial position analysis. For portions not detailed in the above embodiments of the present disclosure, reference can be made to the relevant description of Example 1 and will not be repeated here. Embodiment 3 According to an embodiment of the present disclosure, a positional relationship determination apparatus for implementing the above-mentioned positional relationship determination method is also provided. FIG7 is a structural block diagram of a positional relationship determination apparatus according to Embodiment 3 of the present disclosure. As shown in FIG7 , the apparatus includes: an acquisition module 701 configured to acquire position data of a target object and boundary data of a target region, wherein the boundary data is used to describe multiple edges constituting the target region; a construction module 702 configured to construct a target mapping relationship based on the boundary data, wherein the target mapping relationship is configured to represent a hash mapping relationship corresponding to the boundary data; a search module 703 configured to use the target mapping relationship to search for associated edges of the target object from multiple edges, wherein the associated edges are used to calculate the associated surrounding number of the target object; and a determination module 703 configured to determine the spatial positional relationship between the target object and the target region based on the associated edges. Optionally, the construction module 702 is further configured to: determine the number of edges of the multiple edges based on the boundary data; calculate the number of groups using the number of edges; and divide the multiple edges into multiple groups according to the number of groups in a preset coordinate direction to obtain the target mapping relationship. Optionally, the construction module 702 is further configured to: determine a coordinate range of the target area in a preset coordinate direction; divide the coordinate range according to a number of groups to obtain a plurality of groups; traverse the plurality of edges, determine from the plurality of groups the groups to which the plurality of edges belong, and obtain a target mapping relationship. Optionally, the construction module 702 is further configured to: traverse the plurality of edges, determine from the plurality of groups the groups to which the plurality of edges belong, and obtain the number of edges contained in each of the plurality of groups; and, in response to the number of edges contained in each of the plurality of groups being less than or equal to a first preset threshold, determine the target mapping relationship based on the groups to which the plurality of edges belong.Optionally, the construction module 702 is further configured to: in response to at least one of the multiple groups containing a number of edges greater than a first preset threshold, regroup the at least one group until the number of edges contained in each group in the at least one group is less than or equal to the first preset threshold, thereby obtaining a target mapping relationship. Optionally, the acquisition module 701 is further configured to obtain a regrouping result for the at least one group; and in response to the regrouping result satisfying a preset condition, the determination module 704 continues to determine whether the average number of edges of each group in the at least one group is greater than a second preset threshold, wherein the preset condition is determined by the edge distribution of each group in the at least one group and the average number of edges of each group. Optionally, the positional relationship determination apparatus further includes: a deletion module 705, configured to delete the regrouping result in response to the regrouping result not satisfying the preset condition. Optionally, the positional relationship determination apparatus further includes: a detection module 706, configured to detect the spatial positional relationship between the target object and the bounding box of the target area; and a filtering module 707, configured to filter out the target object in response to the target object being located outside the bounding box of the target area. Optionally, the search module 703 is further configured to: detect the spatial positional relationship between the target object and the bounding box of the target area; and in response to the target object being located at the edge or inside the bounding box of the target area, search for an associated edge of the target object using the target mapping relationship. Optionally, the determination module 704 is further configured to: obtain the spatial positional relationship between the target object and the associated edge, as well as the direction of the associated edge; and determine the spatial positional relationship between the target object and the target area based on the spatial positional relationship between the target object and the associated edge, as well as the direction of the associated edge. In the disclosed embodiments, by obtaining the location data of the target object and the boundary data of the target area, and then constructing a hash mapping relationship based on the boundary data, the hash mapping relationship is used to quickly find the associated edges of the target object from multiple edges. Finally, the spatial location relationship between the target object and the target area is determined based on the associated edges. This hash mapping relationship can be used to accelerate the precise judgment process in the PIP problem, avoiding the traversal of all edges and the binary tree search process in the precise judgment stage. This achieves the goal of quickly determining the spatial location relationship between the target object and the target area, thereby achieving the technical effect of reducing the amount of data computation during spatial location analysis and improving computational efficiency. This further solves the technical problem of large data computation and low computational efficiency in spatial location analysis in related technologies.It should be noted that the acquisition module 701, construction module 702, search module 703, and determination module 704 correspond to steps S21 to S24 in Example 1. The examples and application scenarios implemented by these four modules and the corresponding steps are the same, but are not limited to the contents disclosed in Example 1. It should be noted that the above modules or units may be hardware components or software components stored in a memory and processed by one or more processors. The above modules may also be part of an apparatus and run in a computer terminal. FIG8 is a block diagram of another apparatus for determining a position relationship according to Embodiment 3 of the present disclosure. As shown in FIG8 , the apparatus includes: an acquisition module 801 configured to acquire position data of a target vehicle and boundary data of a target positioning area, wherein the boundary data is used to describe multiple edges for constructing the target positioning area; a construction module 802 configured to construct a target mapping relationship based on the boundary data, wherein the target mapping relationship is used to represent a hash mapping relationship corresponding to the boundary data; a search module 803 configured to use the target mapping relationship to search for associated edges of the target vehicle from multiple edges, wherein the associated edges are used to calculate a surround number associated with the target vehicle; and a determination module 804 configured to determine the spatial position relationship between the target vehicle and the target positioning area based on the associated edges. In the disclosed embodiment, by obtaining the target object's location data and the target area's boundary data, and then constructing a hash mapping relationship based on the boundary data, the hash mapping relationship is used to quickly search for the target object's associated edges from multiple edges. Finally, the spatial positional relationship between the target object and the target area is determined based on the associated edges. This hash mapping relationship can be used to accelerate the precise judgment process in the PIP problem, avoiding the need to traverse all edges and perform a binary tree search during the precise judgment phase. This achieves the goal of quickly determining the spatial positional relationship between the target vehicle and the target positioning area, thereby reducing the amount of data computation required and improving computational efficiency during spatial position analysis. This solves the technical problem of large data computation and low computational efficiency in spatial position analysis in related technologies. It should be noted that the acquisition module 801, construction module 802, search module 803, and determination module 804 described above correspond to steps S61 to S64 in Example 2. The examples and application scenarios implemented by these four modules and the corresponding steps are the same, but are not limited to those disclosed in Example 2. It should be noted that the above modules or units may be hardware components or software components stored in a memory and processed by one or more processors. The above modules may also be part of a device and run on a computer terminal. For portions not described in detail in the above embodiments of the present disclosure, reference may be made to the relevant description of Example 1 and will not be repeated here.Embodiment 4: An embodiment of the present disclosure may provide a computer terminal, which may be any computer terminal device in a computer terminal group. Optionally, in this embodiment, the computer terminal may be replaced with a terminal device such as a mobile terminal. Optionally, in this embodiment, the computer terminal may be located in at least one of multiple network devices in a computer network. In this embodiment, the computer terminal may execute program code for the following steps in a method for determining a positional relationship: obtaining location data of a target object and boundary data of a target region, wherein the boundary data is used to describe multiple edges constituting the target region; constructing a target mapping relationship based on the boundary data, wherein the target mapping relationship is used to represent a hash mapping relationship corresponding to the boundary data; using the target mapping relationship to search for associated edges of the target object from the multiple edges, wherein the associated edges are used to calculate the surrounding number associated with the target object; and determining the spatial positional relationship between the target object and the target region based on the associated edges. In this embodiment, the computer terminal can execute program code for the following steps in the position relationship determination method: obtaining the position data of the target vehicle and the boundary data of the target positioning area, wherein the boundary data is used to describe the multiple edges that constitute the target positioning area; constructing a target mapping relationship based on the boundary data, wherein the target mapping relationship is used to represent the hash mapping relationship corresponding to the boundary data; using the target mapping relationship to search for associated edges of the target vehicle from the multiple edges, wherein the associated edges are used to calculate the number of surrounds associated with the target vehicle; and determining the spatial position relationship between the target vehicle and the target positioning area based on the associated edges. Optionally, FIG9 is a block diagram of a computer terminal according to Embodiment 1 of the present disclosure. As shown in FIG9 , the computer terminal may include: one or more (only one is shown) processors 92, a memory 94, a storage controller, and a peripheral interface, wherein the peripheral interface is connected to a radio frequency module, an audio module, and a display. The memory can be used to store software programs and modules, such as program instructions / modules corresponding to the position relationship determination method and apparatus in the embodiments of the present disclosure. The processor executes the software programs and modules stored in the memory to execute various functional applications and data processing, thereby implementing the aforementioned position relationship determination method. The memory may include high-speed random access memory (RAM) and non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory may further include memory located remotely from the processor, and such remote memory may be connected to the terminal via a network. Examples of such networks include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.The processor can call information and applications stored in the memory through a transmission device to perform the following steps: obtaining location data of a target object and boundary data of a target area, wherein the boundary data is used to describe multiple edges that construct the target area; constructing a target mapping relationship based on the boundary data, wherein the target mapping relationship is used to represent a hash mapping relationship corresponding to the boundary data; using the target mapping relationship to search for associated edges of the target object from the multiple edges, wherein the associated edges are used to calculate a surrounding number associated with the target object; and determining a spatial positional relationship between the target object and the target area based on the associated edges. Optionally, the processor can further execute program code for the following steps: determining the number of edges based on the boundary data; calculating a number of groups based on the number of edges; dividing the multiple edges into multiple groups according to the number of groups in a preset coordinate direction to obtain a target mapping relationship. Optionally, the processor can further execute program code for the following steps: determining a coordinate range of the target area in the preset coordinate direction; dividing the coordinate range according to the number of groups to obtain multiple groups; traversing the multiple edges and determining, from the multiple groups, the groups to which the multiple edges belong, to obtain a target mapping relationship. Optionally, the processor may further execute program code for the following steps: traversing multiple edges, determining, from multiple groups, the groups to which the multiple edges belong, and obtaining the number of edges contained in each of the multiple groups; in response to the number of edges contained in each group being less than or equal to a first preset threshold, determining a target mapping relationship based on the groups to which the multiple edges belong. Optionally, the processor may further execute program code for the following steps: in response to the number of edges contained in at least one of the multiple groups being greater than the first preset threshold, regrouping the at least one group until the number of edges contained in each of the at least one group is less than or equal to the first preset threshold, thereby obtaining the target mapping relationship. Optionally, the processor may further execute program code for the following steps: obtaining a regrouping result for the at least one group; in response to the regrouping result satisfying a preset condition, continuing to determine whether the average number of edges of each of the at least one group is greater than a second preset threshold, wherein the preset condition is determined by the edge distribution of each of the at least one group and the average number of edges of each of the groups. Optionally, the processor may further execute program code for the following steps: in response to the regrouping result not satisfying the preset condition, deleting the regrouping result. Optionally, the processor may further execute program code of the following steps: detecting a spatial positional relationship between the target object and a bounding box of the target area; and filtering out the target object in response to the target object being outside the bounding box of the target area.Optionally, the processor may further execute program code for the following steps: detecting the spatial positional relationship between the target object and the bounding box of the target area; in response to the target object being located at the edge or within the bounding box of the target area, searching for associated edges of the target object using the target mapping relationship. Optionally, the processor may further execute program code for the following steps: obtaining the spatial positional relationship between the target object and the associated edge, as well as the direction of the associated edge; determining the spatial positional relationship between the target object and the target area based on the spatial positional relationship between the target object and the associated edge, as well as the direction of the associated edge. Optionally, the processor may further execute program code for the following steps: obtaining position data of the target vehicle and boundary data of the target positioning area, wherein the boundary data is used to describe multiple edges constituting the target positioning area; constructing a target mapping relationship based on the boundary data, wherein the target mapping relationship is used to represent a hash mapping relationship corresponding to the boundary data; searching for associated edges of the target vehicle from the multiple edges using the target mapping relationship, wherein the associated edges are used to calculate the number of surrounds associated with the target vehicle; and determining the spatial positional relationship between the target vehicle and the target positioning area based on the associated edges. In the embodiments of the present disclosure, by obtaining the location data of the target object and the boundary data of the target area, and then constructing a hash mapping relationship based on the boundary data, the hash mapping relationship is used to quickly find the associated edges of the target object from multiple edges. Finally, the spatial position relationship between the target object and the target area is determined based on the associated edges. This hash mapping relationship can be used to accelerate the precise judgment process in the PIP problem, avoiding the traversal of all edges and the binary tree search process in the precise judgment stage. This achieves the goal of quickly determining the spatial position relationship between the target object and the target area, thereby achieving the technical effect of reducing the amount of data calculation during spatial position analysis and improving computational efficiency. This solves the technical problem of large data calculation volume and low computational efficiency in spatial position analysis in related technologies. Those skilled in the art will understand that the structure shown in FIG9 is merely illustrative, and the computer terminal may also be a terminal device such as a smartphone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, or a mobile internet device (MID). FIG9 does not limit the structure of the above-mentioned electronic device. For example, the computer terminal may further include more or fewer components (such as a network interface, a display device, etc.) than those shown in FIG9 , or have a configuration different from that shown in FIG9 .Those skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware of the terminal device through a program. The program can be stored in a computer-readable storage medium, which may include a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk. For portions not described in detail in the above embodiments of the present disclosure, please refer to the relevant description of Example 1 and will not be repeated here. Example 5 The embodiments of the present disclosure also provide a computer-readable storage medium. Optionally, in this embodiment, the storage medium can be used to store the program code executed by the position relationship determination method provided in Example 1 or Example 2. Optionally, in this embodiment, the storage medium can be located in any computer terminal in a computer terminal group in a computer network, or in any mobile terminal in a mobile terminal group. Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps: obtaining location data of a target object and boundary data of a target region, wherein the boundary data is used to describe multiple edges constituting the target region; constructing a target mapping relationship based on the boundary data, wherein the target mapping relationship is used to represent a hash mapping relationship corresponding to the boundary data; using the target mapping relationship to search for associated edges of the target object from the multiple edges, wherein the associated edges are used to calculate a surrounding number associated with the target object; and determining a spatial positional relationship between the target object and the target region based on the associated edges. Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps: determining the number of edges of the multiple edges based on the boundary data; calculating a number of groups using the number of edges of the multiple edges; and dividing the multiple edges into multiple groups according to the number of groups in a preset coordinate direction to obtain a target mapping relationship. Optionally, in this embodiment, the storage medium is configured to store program code for executing the following steps: determining a coordinate range of a target area in a preset coordinate direction; dividing the coordinate range according to a number of groups to obtain a plurality of groups; traversing a plurality of edges, determining a group to which the plurality of edges belong from the plurality of groups, and obtaining a target mapping relationship. Optionally, in this embodiment, the storage medium is configured to store program code for executing the following steps: traversing a plurality of edges, determining a group to which the plurality of edges belong from the plurality of groups, and obtaining a number of edges included in each of the plurality of groups; and, in response to the number of edges included in each group being less than or equal to a first preset threshold, determining a target mapping relationship based on the group to which the plurality of edges belong.Optionally, in this embodiment, the storage medium is configured to store program code for executing the following steps: in response to at least one of the multiple groups containing a number of edges greater than a first preset threshold, regrouping the at least one group until the number of edges contained in each of the at least one group is less than or equal to the first preset threshold, thereby obtaining a target mapping relationship. Optionally, in this embodiment, the storage medium is configured to store program code for executing the following steps: obtaining a regrouping result for the at least one group; in response to the regrouping result satisfying a preset condition, further determining whether the average number of edges of each of the at least one group is greater than a second preset threshold, wherein the preset condition is determined by the edge distribution of each of the at least one group and the average number of edges of each of the groups. Optionally, in this embodiment, the storage medium is configured to store program code for executing the following steps: in response to the regrouping result not satisfying the preset condition, deleting the regrouping result. Optionally, in this embodiment, the storage medium is configured to store program code for executing the following steps: detecting a spatial positional relationship between a target object and a bounding box of a target region; and in response to the target object being located outside the bounding box of the target region, filtering out the target object. Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps: detecting the spatial positional relationship between the target object and the bounding box of the target region; in response to the target object being located at the edge or within the bounding box of the target region, searching for associated edges of the target object using a target mapping relationship. Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps: obtaining the spatial positional relationship between the target object and the associated edge, as well as the direction of the associated edge; determining the spatial positional relationship between the target object and the target region based on the spatial positional relationship between the target object and the associated edge, as well as the direction of the associated edge. Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps: obtaining target vehicle position data and boundary data of the target positioning region, wherein the boundary data is used to describe multiple edges constituting the target positioning region; constructing a target mapping relationship based on the boundary data, wherein the target mapping relationship is used to represent a hash mapping relationship corresponding to the boundary data; searching for associated edges of the target vehicle from the multiple edges using the target mapping relationship, wherein the associated edges are used to calculate the number of surrounds associated with the target vehicle; and determining the spatial positional relationship between the target vehicle and the target positioning region based on the associated edges.According to the embodiments of the present disclosure, by obtaining the location data of the target object and the boundary data of the target area, and then constructing a hash mapping relationship based on the boundary data, the hash mapping relationship is used to quickly find the associated edges of the target object from multiple edges. Finally, the spatial position relationship between the target object and the target area is determined based on the associated edges. This hash mapping relationship can be used to accelerate the precise judgment process in the PIP problem, avoiding the need to traverse all edges and search the binary tree during the precise judgment phase. This achieves the goal of quickly determining the spatial position relationship between the target object and the target area, thereby reducing the amount of data computation required and improving computational efficiency during spatial position analysis. This solves the technical problem of large data computation and low computational efficiency in related technologies during spatial position analysis. Embodiment 6 The embodiments of the present disclosure also provide a computer program product, including a computer program. When executed by a processor, the computer program implements the position relationship determination method provided in any of the above embodiments. Optionally, in this embodiment, the computer program included in the computer program product can be executed by a processor to implement the following steps: obtaining location data of a target object and boundary data of a target region, wherein the boundary data is used to describe multiple edges constituting the target region; constructing a target mapping relationship based on the boundary data, wherein the target mapping relationship is used to represent a hash mapping relationship corresponding to the boundary data; using the target mapping relationship to search for associated edges of the target object from the multiple edges, wherein the associated edges are used to calculate a surrounding number associated with the target object; and determining a spatial positional relationship between the target object and the target region based on the associated edges. Optionally, in this embodiment, the computer program included in the computer program product can be executed by a processor to implement the following steps: determining the number of edges of the multiple edges based on the boundary data; calculating the number of groups using the number of edges; and dividing the multiple edges into multiple groups according to the number of groups in a preset coordinate direction to obtain a target mapping relationship. Optionally, in this embodiment, the computer program included in the computer program product can be executed by a processor to implement the following steps: determining a coordinate range of a target area in a preset coordinate direction; dividing the coordinate range according to a number of groups to obtain a plurality of groups; traversing a plurality of edges, determining a group to which the plurality of edges belong from the plurality of groups, and obtaining a target mapping relationship. Optionally, in this embodiment, the computer program included in the computer program product can be executed by a processor to implement the following steps: traversing a plurality of edges, determining a group to which the plurality of edges belong from the plurality of groups, and obtaining the number of edges included in each of the plurality of groups; and in response to the number of edges included in each group being less than or equal to a first preset threshold, determining a target mapping relationship based on the group to which the plurality of edges belong.Optionally, in this embodiment, the computer program included in the computer program product can be executed by a processor to implement the following steps: in response to at least one of the multiple groups containing a number of edges greater than a first preset threshold, regrouping the at least one group until the number of edges contained in each group in the at least one group is less than or equal to the first preset threshold, thereby obtaining a target mapping relationship. Optionally, in this embodiment, the computer program included in the computer program product can be executed by a processor to implement the following steps: obtaining a regrouping result of the at least one group; in response to the regrouping result satisfying a preset condition, further determining whether the average number of edges of each group in the at least one group is greater than a second preset threshold, wherein the preset condition is determined by the edge distribution of each group in the at least one group and the average number of edges of each group. Optionally, in this embodiment, the computer program included in the computer program product can be executed by a processor to implement the following steps: in response to the regrouping result not satisfying the preset condition, deleting the regrouping result. Optionally, in this embodiment, the computer program included in the computer program product can be executed by a processor to implement the following steps: detecting the spatial positional relationship between the target object and the bounding box of the target region; in response to the target object being located outside the bounding box of the target region, filtering out the target object. Optionally, in this embodiment, the computer program included in the computer program product can be executed by a processor to implement the following steps: detecting the spatial positional relationship between the target object and the bounding box of the target region; in response to the target object being located at the edge or inside the bounding box of the target region, searching for an associated edge of the target object using a target mapping relationship. Optionally, in this embodiment, the computer program included in the computer program product can be executed by a processor to implement the following steps: obtaining the spatial positional relationship between the target object and the associated edge and the direction of the associated edge; and determining the spatial positional relationship between the target object and the target region based on the spatial positional relationship between the target object and the associated edge and the direction of the associated edge. Optionally, in this embodiment, the computer program included in the computer program product can be executed by a processor to implement the following steps: obtaining position data of the target vehicle and boundary data of the target positioning area, wherein the boundary data is used to describe multiple edges constituting the target positioning area; constructing a target mapping relationship based on the boundary data, wherein the target mapping relationship is used to represent a hash mapping relationship corresponding to the boundary data; using the target mapping relationship to search for associated edges of the target vehicle from the multiple edges, wherein the associated edges are used to calculate a surround number associated with the target vehicle; and determining a spatial positional relationship between the target vehicle and the target positioning area based on the associated edges.In the embodiments of the present disclosure, by obtaining the location data of the target object and the boundary data of the target area, a hash mapping relationship is constructed based on the boundary data. The hash mapping relationship is then used to quickly find the associated edges of the target object from multiple edges. Finally, the spatial positional relationship between the target object and the target area is determined based on the associated edges. This hash mapping relationship can be used to accelerate the precise judgment process in the PIP problem, avoiding the need to traverse all edges and search a binary tree during the precise judgment phase. This achieves the goal of quickly determining the spatial positional relationship between the target object and the target area, thereby reducing the amount of data computation required and improving computational efficiency during spatial position analysis. This solves the technical problem of large data computation and low computational efficiency in spatial position analysis in related technologies. The serial numbers of the embodiments of the present disclosure are for descriptive purposes only and do not represent the merits of the embodiments. In the above embodiments of the present disclosure, the descriptions of each embodiment are given with some emphasis. For portions not detailed in one embodiment, reference can be made to the relevant descriptions of other embodiments. In the several embodiments provided in the present disclosure, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of units is merely a logical functional division. In actual implementation, other divisions may be employed. For example, multiple units or components may be combined or integrated into another system, or some features may be omitted or not implemented. Furthermore, the couplings or direct couplings or communication connections shown or discussed may be through interfaces, or indirect couplings or communication connections between units or modules, and may be electrical or other. 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, i.e., they may be located in one location or distributed across multiple network units. Some or all of these units may be selected to achieve the objectives of the present embodiments based on actual needs. Furthermore, the functional units in the various embodiments of the present disclosure may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. These integrated units may be implemented in either hardware or software functional units. If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium.Based on this understanding, the technical solution of the present disclosure, or the portion that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product, stored in a storage medium, includes instructions for causing a computer device (such as a personal computer, server, or network device) to execute all or part of the steps of the methods described in the various embodiments of the present disclosure. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), a removable hard drive, a magnetic disk, or an optical disk. The foregoing description is merely a preferred embodiment of the present disclosure. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present disclosure, and such improvements and modifications should also be considered within the scope of protection of the present disclosure.

Claims

Claims 1. A method for determining a position relationship, comprising: Obtaining position data of a target object and boundary data of a target area, wherein the boundary data is used to describe multiple edges that construct the target area; constructing a target mapping relationship based on the boundary data, wherein the target mapping relationship is used to represent a hash mapping relationship corresponding to the boundary data; using the target mapping relationship to search for associated edges of the target object from the multiple edges, wherein the associated edges are used to calculate a surround number associated with the target object; and determining a spatial positional relationship between the target object and the target area based on the associated edges.

2. The method for determining a positional relationship according to claim 1, wherein: Constructing the target mapping relationship based on the boundary data includes: determining the number of the multiple edges based on the boundary data; calculating the number of groups using the number of the multiple edges; and dividing the multiple edges into multiple groups according to the number of groups in a preset coordinate direction to obtain the target mapping relationship.

3. The method for determining a positional relationship according to claim 2, wherein: In the preset coordinate direction, dividing the multiple edges into the multiple groups according to the number of groups, and obtaining the target mapping relationship includes: determining a coordinate range of the target area in the preset coordinate direction; dividing the coordinate range according to the number of groups to obtain the multiple groups; and traversing the multiple edges, determining the group to which the multiple edges belong from the multiple groups, and obtaining the target mapping relationship.

4. The method for determining a positional relationship according to claim 3, wherein: Traversing the multiple edges and determining the group to which the multiple edges belong from the multiple groups to obtain the target mapping relationship includes: traversing the multiple edges, determining the group to which the multiple edges belong from the multiple groups, and obtaining the number of edges contained in each of the multiple groups; and in response to the number of edges contained in each of the groups being less than or equal to a first preset threshold, determining the target mapping relationship based on the group to which the multiple edges belong.

5. The method for determining a positional relationship according to claim 4, wherein: Traversing the multiple edges and determining the group to which the multiple edges belong from the multiple groups to obtain the target mapping relationship includes: in response to the number of edges included in at least one group among the multiple groups being greater than the first preset threshold, re-grouping the at least one group until the number of edges included in each group in the at least one group is less than or equal to the first preset threshold, thereby obtaining the target mapping relationship.

6. The method for determining a positional relationship according to claim 5, wherein: The position relationship determination method further includes: obtaining a regrouping result of the at least one group; in response to the regrouping result satisfying a preset condition, continuing to determine the position of each group in the at least one group. Whether the average number of edges is greater than a second preset threshold, wherein the preset condition is determined by the edge distribution of each group in the at least one group and the average number of edges of each group.

7. The method for determining a positional relationship according to claim 6, wherein: The position relationship determination method further includes: in response to the re-grouping result not meeting the preset condition, deleting the re-grouping result.

8. The method for determining a positional relationship according to claim 1, wherein: The position relationship determination method further includes: detecting a spatial position relationship between the target object and a bounding box of the target area; and filtering out the target object in response to the target object being outside the bounding box of the target area.

9. The method for determining a positional relationship according to claim 1, wherein: Using the target mapping relationship to search for the associated edge of the target object from the multiple edges includes: detecting the spatial position relationship between the target object and the bounding box of the target area; in response to the target object being located at the edge or inside the bounding box of the target area, using the target mapping relationship to search for the associated edge of the target object.

10. The method for determining a positional relationship according to claim 1, wherein: Determining the spatial position relationship between the target object and the target area based on the associated edge includes: obtaining the spatial position relationship between the target object and the associated edge and the direction of the associated edge; determining the spatial position relationship between the target object and the target area based on the spatial position relationship between the target object and the associated edge and the direction of the associated edge.

11. A method for determining a position relationship, comprising: Obtaining position data of a target vehicle and boundary data of a target positioning area, wherein the boundary data is used to describe multiple edges constituting the target positioning area; constructing a target mapping relationship based on the boundary data, wherein the target mapping relationship is used to represent a hash mapping relationship corresponding to the boundary data; using the target mapping relationship to search for associated edges of the target vehicle from the multiple edges, wherein the associated edges are used to calculate a surround number associated with the target vehicle; and determining a spatial positional relationship between the target vehicle and the target positioning area based on the associated edges.

12. A computer-readable storage medium comprising a stored executable program, wherein: When the executable program is running, the device where the computer-readable storage medium is located is controlled to execute the position relationship determination method according to any one of claims 1 to 11.

13. An electronic device, comprising: a memory storing an executable program; A processor is configured to run the program, wherein the program executes the position relationship determination method according to any one of claims 1 to 11 when running.

14. A computer program product, comprising a computer program, wherein when executed by a processor, the computer program implements the position relationship determination method according to any one of claims 1 to 11.

Citation Information

Patent Citations

  • Map data query method and device, computer equipment and storage medium

    CN110807075A

  • Systems and methods for determining whether target belongs to target geofence

    CN111246376A

  • Visual analysis platform for vehicle track-guided geographic spatial-temporal characteristics

    CN114265833A