A trajectory point query method, device and equipment based on a scan operator
By constructing a grid and local spatiotemporal multidimensional volume index on the global spatiotemporal multidimensional volume and using the scan operator to perform intersection and union operations, the problem of low efficiency in traditional spatiotemporal range query algorithms is solved, achieving efficient real-time and historical queries and expanding application scenarios.
Patent Information
- Application Number
- CN202211724503.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-30
- Publication Date
- 2026-01-06
- Estimated Expiration
- 2042-12-30
AI Technical Summary
Traditional spatiotemporal range query algorithms require traversing a large number of irrelevant index entries, resulting in low query efficiency and an inability to support both real-time and historical queries simultaneously, thus limiting their application scenarios.
The trajectory point query method based on scanning operators is adopted. By dividing the global spatiotemporal multidimensional volume into local spatiotemporal multidimensional volumes and constructing grid and local spatiotemporal multidimensional volume indexes, the intersection and merger operations of scan lines or scan surfaces are used to directly and accurately locate on or inside the global spatiotemporal multidimensional volume, reducing query time overhead and supporting real-time and historical queries.
It enables efficient spatiotemporal range queries, reduces query time overhead, and supports both real-time and historical queries, thus expanding application scenarios.
Smart Images

Figure CN116126883B_ABST
Abstract
Description
Technical Field
[0001] This specification relates to the field of database technology, and in particular to a method, apparatus, and device for querying trajectory points based on scanning operators. Background Technology
[0002] Spatiotemporal range query algorithms are a crucial component of trajectory data mining applications. In reachability analysis, traffic flow statistics, and other applications, efficient spatiotemporal range query algorithms help return results quickly, accelerating trajectory data analysis. However, traditional range query algorithms are based on tree indexes (such as R-trees), requiring traversal of a large number of irrelevant index entries to return the target result, resulting in low query efficiency. Furthermore, current spatiotemporal range query algorithms cannot simultaneously support real-time and historical queries, limiting their application scenarios.
[0003] Therefore, a better spatiotemporal range query scheme is needed. Summary of the Invention
[0004] This specification provides one or more embodiments of a trajectory point query method, apparatus, device, and storage medium based on a scanning operator to solve the following technical problem: the need for a better spatiotemporal range query scheme.
[0005] To solve the above-mentioned technical problems, one or more embodiments of this specification are implemented as follows:
[0006] This specification provides one or more embodiments of a trajectory point query method based on a scanning operator, including:
[0007] Receive a trajectory point query request that specifies the query range;
[0008] The global spatiotemporal multidimensional volume where the existing trajectory points are distributed is determined, and the global spatiotemporal multidimensional volume is divided into multiple local spatiotemporal multidimensional volumes in order to index the existing trajectory points.
[0009] Based on the partitioning resolution corresponding to the global spatiotemporal multidimensional volume, the query range is converted into a corresponding scanning operator. The scanning operator includes a scanning line or a scanning surface. Each scanning operator is associated with: the trajectory point index corresponding to the grid it passes through or the trajectory point index corresponding to the local spatiotemporal multidimensional volume it passes through. The grid includes the surface of the local spatiotemporal multidimensional volume.
[0010] Based on the trajectory point index associated with the corresponding scanning operator, target trajectory points are filtered in the global spatiotemporal multidimensional volume to determine the trajectory point query results.
[0011] This specification provides one or more embodiments of a trajectory point query device based on a scanning operator, comprising:
[0012] The query request receiving module receives trajectory point query requests that specify the query range;
[0013] The spatiotemporal multidimensional volume determination module determines the global spatiotemporal multidimensional volume where the existing trajectory points are distributed. The global spatiotemporal multidimensional volume is divided into multiple local spatiotemporal multidimensional volumes in order to index the existing trajectory points.
[0014] The scanning operator conversion module converts the query range into a corresponding scanning operator based on the partitioning resolution corresponding to the global spatiotemporal multidimensional volume. The scanning operator includes a scanning line or a scanning surface. Each scanning operator is associated with: the trajectory point index corresponding to the grid it passes through or the trajectory point index corresponding to the local spatiotemporal multidimensional volume it passes through. The grid includes the surface of the local spatiotemporal multidimensional volume.
[0015] The target trajectory point filtering module filters target trajectory points in the global spatiotemporal multidimensional volume according to the trajectory point index associated with the corresponding scanning operator to determine the trajectory point query results.
[0016] This specification provides one or more embodiments of a trajectory point query device based on a scanning operator, comprising:
[0017] At least one processor; and,
[0018] A memory communicatively connected to the at least one processor; wherein,
[0019] The memory stores instructions executable by the at least one processor, which, when executed by the at least one processor, enable the at least one processor to:
[0020] Receive a trajectory point query request that specifies the query range;
[0021] The global spatiotemporal multidimensional volume where the existing trajectory points are distributed is determined, and the global spatiotemporal multidimensional volume is divided into multiple local spatiotemporal multidimensional volumes in order to index the existing trajectory points.
[0022] Based on the partitioning resolution corresponding to the global spatiotemporal multidimensional volume, the query range is converted into a corresponding scanning operator. The scanning operator includes a scanning line or a scanning surface. Each scanning operator is associated with: the trajectory point index corresponding to the grid it passes through or the trajectory point index corresponding to the local spatiotemporal multidimensional volume it passes through. The grid includes the surface of the local spatiotemporal multidimensional volume.
[0023] Based on the trajectory point index associated with the corresponding scanning operator, target trajectory points are filtered in the global spatiotemporal multidimensional volume to determine the trajectory point query results.
[0024] This specification provides one or more embodiments of a non-volatile computer storage medium storing computer-executable instructions, wherein the computer-executable instructions are configured as follows:
[0025] Receive a trajectory point query request that specifies the query range;
[0026] The global spatiotemporal multidimensional volume where the existing trajectory points are distributed is determined, and the global spatiotemporal multidimensional volume is divided into multiple local spatiotemporal multidimensional volumes in order to index the existing trajectory points.
[0027] Based on the partitioning resolution corresponding to the global spatiotemporal multidimensional volume, the query range is converted into a corresponding scanning operator. The scanning operator includes a scanning line or a scanning surface. Each scanning operator is associated with: the trajectory point index corresponding to the grid it passes through or the trajectory point index corresponding to the local spatiotemporal multidimensional volume it passes through. The grid includes the surface of the local spatiotemporal multidimensional volume.
[0028] Based on the trajectory point index associated with the corresponding scanning operator, target trajectory points are filtered in the global spatiotemporal multidimensional volume to determine the trajectory point query results.
[0029] The above-mentioned at least one technical solution adopted in one or more embodiments of this specification can achieve the following beneficial effects: Based on the scanning operator, the query range can be accurately located directly on the surface or inside the global spatiotemporal multidimensional volume through the intersection and merger operations of scanning lines or scanning surfaces, and the corresponding target trajectory point can be efficiently indexed without traversing each index item separately, which reduces a lot of query time overhead compared with tree index; Moreover, since both grid and local spatiotemporal multidimensional volume indexes can be constructed at the same time, it is possible to differentiate between real-time trajectory points and historical trajectory points in the same global spatiotemporal multidimensional volume, thereby supporting real-time queries and historical queries at the same time, effectively expanding the application scenarios. Attached Figure Description
[0030] To more clearly illustrate the technical solutions in the embodiments or prior art of this specification, the drawings used in the description of the embodiments or prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this specification. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0031] Figure 1 A flowchart illustrating a trajectory point query method based on a scanning operator, provided for one or more embodiments of this specification;
[0032] Figure 2 In one application scenario provided by one or more embodiments of this specification, Figure 1A flowchart illustrating one implementation scheme of the method described above;
[0033] Figure 3 This is a schematic diagram of Z-sorting curve encoding provided for one or more embodiments of this specification;
[0034] Figure 4 The diagram shows the effect of intersection and union operations of the scanning operators provided in one or more embodiments of this specification;
[0035] Figure 5 A schematic diagram of a scanning operator table provided for one or more embodiments of this specification;
[0036] Figure 6 A schematic diagram of a trajectory point query device based on a scanning operator provided for one or more embodiments of this specification;
[0037] Figure 7 This is a schematic diagram of the structure of a trajectory point query device based on a scanning operator, provided for one or more embodiments of this specification. Detailed Implementation
[0038] This specification provides a method, apparatus, device, and storage medium for trajectory point querying based on scanning operators.
[0039] To enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this specification, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this application.
[0040] To address the problems in the background technology, this application proposes a trajectory point query scheme based on spatiotemporal multidimensional volumes and scanning operators. Real-time trajectory points are indexed using grids on the surface of the spatiotemporal multidimensional volume, and historical trajectory points are indexed using three-dimensional or more dimensional volumes within the spatiotemporal multidimensional volume. Corresponding scanning operators are then constructed for efficient spatiotemporal range querying. This will be explained in more detail below.
[0041] Figure 1 This diagram illustrates a trajectory point query method based on a scanning operator, provided for one or more embodiments of this specification. The process can be executed on database-related devices, such as database servers and data monitoring and analysis equipment. Certain input parameters or intermediate results in the process can be manually adjusted to help improve accuracy.
[0042] Figure 1 The process includes the following steps:
[0043] S102: Receive a trajectory point query request that specifies the query range.
[0044] In one or more embodiments of this specification, the query range can be represented by actual spatiotemporal dimension values, which is more in line with practical application scenarios. For example, longitude values, latitude values, time (generally the collection time), etc. The query range in two or more dimensions can be represented by multiple sets of corresponding spatiotemporal dimension boundary values. The query range is contained within a set global scope.
[0045] Besides the spatiotemporal dimension, more dimensions can be introduced if needed, such as value dimensions. Assuming that for the spatial dimension, longitude and latitude are used (altitude can be added if necessary, in which case the spatial dimension alone reaches three dimensions), and for the time dimension, the data collection time is used, then the global scope is three-dimensional, and the query scope does not exceed three dimensions. If other dimensions are introduced, the global scope can potentially expand to four or even more dimensions. For ease of description, the following examples mainly use three-dimensional scopes such as longitude, latitude, and time as illustrations.
[0046] A trajectory point is a point within a global scope, such as a location sample sent by a positioning device. For real-time trajectory points, since the observation is uniformly performed from the current moment, the focus is more on the spatial dimension. Therefore, it can be represented using only the spatial dimension, without necessarily adding the time dimension. For historical trajectory points, the same trajectory point may generate historical trajectory points with different spatial locations at different times. Therefore, historical trajectory points are represented using not only the spatial dimension but also the time dimension.
[0047] Based on the above explanation, for example, a global scope C can be represented by the following six attributes, C = (lat min lon min timestamp min lat max lon max timestamp max These attributes are the minimum latitude, minimum longitude, minimum acquisition time, maximum latitude, maximum longitude, and maximum acquisition time of C, respectively. A trajectory point p is represented by the following three attributes: p = (lat, lon, timestamp), where p is the latitude, longitude, and acquisition time, respectively. To facilitate the use of trajectory points, additional attributes such as trajectory point identifier (denoted as pid) and the trajectory identifier of the trajectory to which it belongs (denoted as tid) can be added to the trajectory point. Here, a trajectory refers to an ordered sequence of trajectory points, describing the positional changes of an object within a certain time range.
[0048] S104: Determine the global spatiotemporal multidimensional volume where the existing trajectory points are distributed. The global spatiotemporal multidimensional volume is divided into multiple local spatiotemporal multidimensional volumes in order to index the existing trajectory points.
[0049] In one or more embodiments of this specification, the global scope is represented as a global spatiotemporal multidimensional volume. For example, the C mentioned above is specifically a global spatiotemporal three-dimensional volume. Assuming that the side lengths of the three dimensions are equal, it constitutes a global spatiotemporal cube.
[0050] The global spatiotemporal multidimensional volume is divided into local spatiotemporal multidimensional volumes in one round or multiple iterations. Each round of division divides the current global spatiotemporal multidimensional volume or local spatiotemporal multidimensional volume into multiple smaller local spatiotemporal multidimensional volumes of equal size until the set division resolution is reached, so as to index trajectory points more accurately based on the local spatiotemporal multidimensional volumes.
[0051] In one or more embodiments of this specification, in order to facilitate efficient querying while still accurately reflecting the distribution of trajectory points, each trajectory point can be mapped to a grid or local spatiotemporal multidimensional volume according to the partition resolution corresponding to the global spatiotemporal multidimensional volume, and a corresponding association relationship can be established, thereby forming a grid index and a local spatiotemporal multidimensional volume index, which are used to index the trajectory points contained in the corresponding grid or local spatiotemporal multidimensional volume.
[0052] The process of dividing a global spatiotemporal multidimensional volume into multiple local spatiotemporal multidimensional volumes can also include the process of dividing a specified face of the global spatiotemporal multidimensional volume into multiple grids (each grid can be a face of a local spatiotemporal multidimensional volume). Compared to local spatiotemporal multidimensional volumes, grids can be used to index lower-dimensional data, such as real-time trajectory points. In this case, local spatiotemporal multidimensional volumes can be used to index historical trajectory points. This approach adapts to the characteristics of both types of trajectory data, helping to achieve higher indexing and query efficiency for each while avoiding mutual interference.
[0053] S106: Based on the partitioning resolution corresponding to the global spatiotemporal multidimensional volume, the query range is converted into a corresponding scanning operator. The scanning operator includes a scanning line or a scanning surface. Each scanning operator is associated with: the trajectory point index corresponding to the grid it passes through or the trajectory point index corresponding to the local spatiotemporal multidimensional volume it passes through, wherein the grid includes the surface of the local spatiotemporal multidimensional volume.
[0054] In one or more embodiments of this specification, scan lines are used to scan a grid (which is two-dimensional), and scan surfaces are used to scan a local spatiotemporal three-dimensional volume. Similarly, if the global spatiotemporal multidimensional volume is four-dimensional or higher, the scan operator is still the corresponding scan volume used to scan a local spatiotemporal multidimensional volume with a higher dimension.
[0055] The partitioning resolution corresponding to the global spatiotemporal multidimensional volume includes the partitioning resolution of each dimension when it is combined in two or more dimensions (e.g., how many rounds to divide it in half, i.e., a power of 2). Taking the global spatiotemporal multidimensional volume as a spatiotemporal cube as an example, if we consider a specific face (in two dimensions), the corresponding partitioning resolution is the mesh resolution when that face is divided into a grid. If we consider the complete three dimensions, the corresponding partitioning resolution is the local spatiotemporal cube resolution when the global spatiotemporal cube is divided into local spatiotemporal cubes.
[0056] In one or more embodiments of this specification, a grid index and / or a local spatiotemporal multidimensional volume index (referred to as the first-level index) are established for the trajectory points. In this case, it is considered to further establish an index for the grid and / or the local spatiotemporal multidimensional volume (referred to as the second-level index), so that the corresponding grid and / or local spatiotemporal multidimensional volume can be indexed from the query range first, and then the corresponding trajectory point can be indexed from the corresponding grid and / or local spatiotemporal multidimensional volume. Through such a two-level index, the trajectory point query result can be determined efficiently.
[0057] Furthermore, in practical applications, similar to trajectory points, the query range is often defined by specific dimensional values such as longitude, latitude, and acquisition time, serving as one or more boundary values to delineate the query range in each dimension. The intersection of the query ranges in each dimension yields the complete query range. Therefore, the possibilities for the query range are often massive and inexhaustible, making it difficult to pre-establish an index for the grid and / or local spatiotemporal multidimensional volume.
[0058] To address this issue, adapting to the resolution division, the query range is converted into corresponding scanning operators. These scanning operators are discretized and exhaustively enumerable. Therefore, a second-level index can be established by associating each scanning operator with the grid or local spatiotemporal multidimensional volume it traverses. It should be noted that since the first-level index can be pre-established when dividing the grid or local spatiotemporal multidimensional volume, the grid itself can already represent the trajectory point index corresponding to that grid, used to index the trajectory points contained within that grid. Similarly, the local spatiotemporal multidimensional volume itself can already represent the trajectory point index corresponding to that local spatiotemporal multidimensional volume, used to index the trajectory points contained within that local spatiotemporal multidimensional volume.
[0059] S108: Based on the trajectory point index associated with the corresponding scanning operator, filter the target trajectory points in the global spatiotemporal multidimensional volume to determine the trajectory point query results.
[0060] In one or more embodiments of this specification, the corresponding scanning operator includes at least the scanning operators corresponding to each boundary value of the query range. In this case, it is also necessary to find all other scanning operators within the boundary values (this action is essentially a comprehensive scan from the boundary to the query range) and include them as corresponding scanning operators. Then, by performing corresponding intersection and union operations on the trajectory point indexes associated with the corresponding scanning operators, target trajectory points that are highly likely to be within the query range are filtered out. The reason for saying "highly likely" is that the scanning operator may have some error relative to the query range. Therefore, at the scanning boundary, there may be misjudged trajectory points. Thus, for target trajectory points at the scanning boundary, it is possible to verify separately whether they are indeed within the query range to improve query accuracy.
[0061] pass Figure 1 The method, based on the scanning operator, directly locates the query range on or within the surface of the global spatiotemporal multidimensional volume through the intersection and merger operations of scan lines or scan surfaces, efficiently indexing the corresponding target trajectory point without having to traverse each index item individually. Compared with tree indexes, this significantly reduces query time overhead. Moreover, since it can simultaneously construct both grid and local spatiotemporal multidimensional volume indexes, it is capable of indexing real-time trajectory points and historical trajectory points differently within the same global spatiotemporal multidimensional volume, thus supporting both real-time and historical queries and effectively expanding application scenarios.
[0062] based on Figure 1 In addition to the method described herein, this specification also provides some specific implementation schemes and extension schemes of this method, which will be further explained below.
[0063] This specification provides one or more embodiments for an application scenario. Figure 1 A flowchart illustrating one implementation of the method in the example, such as... Figure 2 As shown.
[0064] Figure 3 The process includes the following steps: initialization, such as determining the global scope and resolution; establishing a grid index for real-time trajectory points; establishing a local spatiotemporal cube index for historical trajectory points, and merging the local spatiotemporal cube indexes according to data density if necessary; converting the query range into a scan operator; and returning the query results based on the scan operator. These are explained in detail below.
[0065] Real-time trajectory points are distributed across a specified surface (e.g., a surface composed of longitude and latitude) of the global spatiotemporal multidimensional volume. The dimensions corresponding to real-time trajectory points include spatial dimensions but exclude temporal dimensions. Excluding the temporal dimension means that real-time trajectory points are not differentiated along the time dimension; all real-time trajectory points are viewed from a unified current moment. Therefore, for both mapping and indexing real-time trajectory points, the time dimension does not need to be considered, allowing for grid indexing of real-time trajectory points, thus improving efficiency and reducing processing burden. On the other hand, historical trajectory points are far more numerous than real-time trajectory points, potentially exceeding orders of magnitude, and need to be differentiated along the time dimension. Therefore, historical trajectory points can be distributed at least within the global spatiotemporal multidimensional volume. The dimensions corresponding to historical trajectory points include both spatial and temporal dimensions, allowing for indexing of real-time trajectory points through a local spatiotemporal multidimensional volume. This facilitates more accurate and comprehensive mapping and indexing of historical trajectory points. A detailed explanation of real-time and historical trajectory points follows.
[0066] Establish a trajectory point index. Based on the partition resolution corresponding to the global spatiotemporal multidimensional volume, pre-map existing trajectory points to the global spatiotemporal multidimensional volume. The corresponding partition resolution includes the grid resolution on a specified face of the global spatiotemporal multidimensional volume, used for two-dimensional mapping of real-time trajectory points (if additional dimensions are introduced, it can be extended to higher-dimensional mapping); the corresponding partition resolution may also include the local spatiotemporal multidimensional volume resolution of the global spatiotemporal multidimensional volume, etc., used for three-dimensional or even more-dimensional mapping of historical trajectory points.
[0067] Based on the partition resolution corresponding to the global spatiotemporal multidimensional volume, the query range is converted into a corresponding scanning operator. Specifically, this may include: normalizing each boundary value of the query range to obtain normalized boundary values; mapping each normalized boundary value to the global spatiotemporal multidimensional volume according to the partition resolution corresponding to the global spatiotemporal multidimensional volume to generate a corresponding scanning operator, so that the scale of the corresponding scanning operator is consistent with the scale of the minimum grid of the global spatiotemporal multidimensional volume or the minimum local spatiotemporal multidimensional volume.
[0068] To illustrate this more intuitively, let's take the global spacetime cube C mentioned above as an example.
[0069] A grid-based index is established for real-time trajectory points. A positive integer μ represents the grid resolution. Real-time trajectory points are represented by latitude and longitude values as p = (lat, lon), and mapped to their respective grids. in, The vertical lines at both ends represent the rounding operation. After obtaining the grid coordinates (i,j), Z-sort curve encoding is performed to obtain the grid index key in integer form. See also Figure 3 , Figure 3This diagram illustrates the Z-sorting curve encoding provided in one or more embodiments of this specification. The Z-sorting curve is generated by converting two-dimensional coordinates (i,j) in space into binary and then interleaving them to create a binary string, thereby identifying a spatial partition using an integer. Real-time trajectory points p are added to the index value list, and so on, to establish the trajectory point index corresponding to the grid. Compared to floating-point latitude and longitude numbers, integer grid index keys occupy less storage space and can be decoded into latitude and longitude ranges as needed, offering greater flexibility. The above grid index structure can be implemented using a hash table.
[0070] A local spatiotemporal cube index is established for historical trajectory points. A positive integer μ represents the resolution of the local spatiotemporal cube. Historical trajectory points are represented by latitude, longitude, and acquisition time as p = (lat, lon, timestamp). Assuming the time range of C is one day, the date portion of the acquisition time is mapped to the corresponding date C, and then the specific time portion within that day is mapped to the local spatiotemporal cube. in, D represents the corresponding date, and 86400 represents the number of seconds contained in one day, in order to normalize time to a single day. The structure and implementation of the local spatiotemporal cube index are similar to those of the grid index, and will not be described in detail here.
[0071] After establishing the grid index and the local spatiotemporal cube index, the query range is converted into a scan operator following a similar approach. Let's continue using the example above.
[0072] When converting the query range into the corresponding scan operator, if it is determined that the trajectory point query request is for real-time trajectory points, the query range is converted into the corresponding scan line on the specified surface, so as to filter the target trajectory points on the specified surface according to the trajectory point index of the grid that the corresponding scan line passes through.
[0073] For example, the query range (in this case, the spatial query range) can be represented as Q. r = (lat1, lon1, lat2, lon2), containing the boundary values for longitude and latitude respectively, maps the points (lat1, lon1), (lat1, lon2), (lat2, lon1), and (lat2, lon2) to the grid. In this process, we can obtain each scan line:
[0074]
[0075]
[0076] Get all grids Where i∈[i1,i2], j∈[j1,j2]. The returned grid's corresponding index trajectory point is used as the target trajectory point to determine the query result.
[0077] Similarly, when converting the query range into the corresponding scanning operator, if it is determined that the trajectory point query request is for historical trajectory points, the query range is converted into the corresponding scanning surface for the global spatiotemporal multidimensional volume, so as to filter the target trajectory points in the local spatiotemporal multidimensional volume according to the trajectory point index of the local spatiotemporal multidimensional volume that the corresponding scanning surface is associated with.
[0078] For example, the query range (in this case, the spatiotemporal query range) can be represented as Q. r = (lat1, lon1, lat2, lon2, timestamp1, timestamp2), which can be converted as described above:
[0079]
[0080]
[0081]
[0082]
[0083] By combining them, various scanning surfaces can be formed.
[0084] To achieve more efficient scanning of scan operators, an index key can be constructed for the scan operators. This index key is used to index the scan operators, facilitating more efficient execution of intersection and union operations. The scan operator index key has ordered index values, and these ordered index values correspond one-to-one with the fully ordered scan operators in at least two dimensions of the global spatiotemporal multidimensional volume. For a more intuitive understanding, see [link to documentation]. Figure 4 , Figure 4 The diagram shows the effect of intersection and union operations of the scanning operators provided in one or more embodiments of this specification.
[0085] exist Figure 4 In this context, key represents the index key of the scan operator. As you can see, key can be used in one dimension (see the vertical dimension) starting from 0 and following integer order as the index value of each ordered scan operator in that dimension (examples show key=2, key=11, etc.). Then, starting from another dimension (see the horizontal dimension), the same integer order is used as the index value of each ordered scan operator in that other dimension (examples show key=18, key=25, etc.). This continuous integer numbering is particularly convenient for union operations to achieve scanning.
[0086] Based on the scan operator index key, the corresponding scan operator can be obtained by transforming the scan range. Within the index value range of the scan operator index key, the union of the corresponding index values for the same dimension is taken. Then, based on the union of the index values, the intersection of the corresponding index values for different dimensions is taken to obtain the target scan operator index value. For a more intuitive understanding, see [link to documentation]. Figure 5 , Figure 5 This is a schematic diagram of a scanning operator table provided for one or more embodiments of this specification.
[0087] exist Figure 5 In the code, we can see that the keys are numbered consecutively starting from 0, each representing a scan operator used for indexing. Each index value in the key is followed by the trajectory point index in the form of a grid or local spatiotemporal cube associated with that scan operator. Figure 5 The intersection and union operations shown are corresponding to Figure 4 of.
[0088] As can be seen, for Figure 4 Calculate the union of trajectory point indices within the range key=2 to key=11 along the vertical dimension. Figure 4 In the horizontal direction, find the union of the indexes of the trajectory points within the range of key=18 to key=25. Then, find the intersection of these two unions of trajectory point indices. This gives the index range corresponding to the query range in these two dimensions. Figure 4 The rectangular area enclosed by the four dashed lines allows for real-time trajectory point queries based on the grid index. Similarly, if the query range includes a third dimension, the union of the third dimension is calculated, and then the intersection with the other two dimensions is obtained to obtain the three-dimensional index range, thus enabling historical trajectory point queries based on the local spatiotemporal cube.
[0089] Using the example above, the query range Q has been expanded. r The mapping is used to scan the surface {i1,j1,k1,i2,j2,k2}. Then, for each dimension, the union within the dimension is calculated and the intersection between dimensions is calculated, resulting in the following result, which in turn allows us to obtain the query result.
[0090] in,
[0091] SweepTable represents the scan operator table.
[0092] In one or more embodiments of this specification, as mentioned above, the global spatiotemporal multidimensional volume can be divided into multiple smaller, equally sized local spatiotemporal multidimensional volumes. In practical applications, the number of historical trajectory points is often enormous, but their distribution within the global spatiotemporal multidimensional volume may not be uniform. Therefore, some local spatiotemporal multidimensional volumes with varying trajectory point data densities can be merged, thus merging the corresponding trajectory point indexes and improving query efficiency. For example, based on the trajectory point data density corresponding to the divided local spatiotemporal multidimensional volumes, some smaller local spatiotemporal multidimensional volumes can be merged back into a larger, higher-level local spatiotemporal multidimensional volume.
[0093] In the event of a re-merging of local spatiotemporal multidimensional bodies, the aforementioned scan operator table can be updated accordingly. For example, the scan surface can be associated with a larger local spatiotemporal multidimensional body, instead of being associated with the smaller local spatiotemporal multidimensional body that has been merged.
[0094] Based on the same idea, one or more embodiments of this specification also provide apparatus and devices corresponding to the above methods, such as... Figure 6 , Figure 7 As shown. The apparatus and equipment are capable of performing the above methods and related alternatives accordingly.
[0095] Figure 6 A schematic diagram of a trajectory point query device based on a scanning operator, provided for one or more embodiments of this specification, the device comprising:
[0096] The query request receiving module 602 receives a trajectory point query request that specifies the query range;
[0097] The spatiotemporal multidimensional volume determination module 604 determines the global spatiotemporal multidimensional volume where the existing trajectory points are distributed. The global spatiotemporal multidimensional volume is divided into multiple local spatiotemporal multidimensional volumes so as to index the existing trajectory points.
[0098] The scanning operator conversion module 606 converts the query range into a corresponding scanning operator according to the partitioning resolution corresponding to the global spatiotemporal multidimensional volume. The scanning operator includes a scanning line or a scanning surface. Each scanning operator is associated with: the trajectory point index corresponding to the grid it passes through or the trajectory point index corresponding to the local spatiotemporal multidimensional volume it passes through. The grid includes the surface of the local spatiotemporal multidimensional volume.
[0099] The target trajectory point filtering module 608 filters target trajectory points in the global spatiotemporal multidimensional volume according to the trajectory point index associated with the corresponding scanning operator to determine the trajectory point query results.
[0100] Optionally, the spatiotemporal multidimensional volume is a spatiotemporal cube.
[0101] Optionally, the scanning operator conversion module 606 determines that the trajectory point query request targets real-time trajectory points, wherein the real-time trajectory points are distributed on a specified surface of the global spatiotemporal multidimensional volume, the grid includes the surface of the local spatiotemporal multidimensional volume divided by the specified surface, and the dimension corresponding to the real-time trajectory point includes the spatial dimension but not the temporal dimension;
[0102] The query range is converted into the corresponding scan line on the specified surface, so as to filter the target trajectory point on the specified surface according to the trajectory point index of the grid through which the corresponding scan line passes.
[0103] Optionally, the scanning operator conversion module 606 determines that the trajectory point query request targets historical trajectory points, wherein the historical trajectory points are at least distributed within the global spatiotemporal multidimensional volume, and the dimensions corresponding to the historical trajectory points include spatial dimensions and temporal dimensions.
[0104] The query range is converted into a corresponding scanning surface for the global spatiotemporal multidimensional volume, so that target trajectory points can be filtered in the local spatiotemporal multidimensional volume according to the trajectory point index of the local spatiotemporal multidimensional volume through which the corresponding scanning surface passes.
[0105] Optionally, the existing trajectory points are pre-mapped to the global spatiotemporal multidimensional volume according to the partition resolution corresponding to the global spatiotemporal multidimensional volume to establish a trajectory point index. The corresponding partition resolution includes the grid resolution on a specified surface of the global spatiotemporal multidimensional volume, or the local spatiotemporal multidimensional volume resolution of the global spatiotemporal multidimensional volume.
[0106] The scanning operator conversion module 606 normalizes each boundary value of the query range to obtain normalized boundary values.
[0107] Based on the partitioning resolution corresponding to the global spatiotemporal multidimensional volume, each of the normalized boundary values is mapped to the global spatiotemporal multidimensional volume to generate a corresponding scanning operator, so that the scale of the corresponding scanning operator is consistent with the scale of the minimum grid or the minimum local spatiotemporal multidimensional volume of the global spatiotemporal multidimensional volume.
[0108] Optionally, the existing trajectory points are pre-mapped to the global spatiotemporal multidimensional body based at least on the corresponding longitude and latitude values; the boundary values of the query range at least include the corresponding longitude and latitude values.
[0109] Optionally, the target trajectory point filtering module 608 determines the constructed scan operator index key, wherein the scan operator index key has ordered index values, and the ordered index values correspond one-to-one with the fully ordered scan operators in at least two dimensions of the global spatiotemporal multidimensional volume;
[0110] According to the corresponding scanning operator, within the index value range of the scanning operator index key, take the union of the corresponding index values for the same dimension, and then take the intersection of the corresponding index values for different dimensions according to the union of the index values to obtain the target scanning operator index value;
[0111] Based on the trajectory point index associated with the scan operator corresponding to the target scan operator index value, target trajectory points are filtered in the global spatiotemporal multidimensional volume.
[0112] Optionally, the ordered index values are consecutive integers.
[0113] Optionally, it also includes:
[0114] The spatiotemporal multidimensional volume merging module 610, before receiving the trajectory point query request with a specified query range, divides the global spatiotemporal multidimensional volume into local spatiotemporal multidimensional volumes in one round or multiple iterations. Each round of division divides the current global spatiotemporal multidimensional volume or local spatiotemporal multidimensional volume into multiple smaller local spatiotemporal multidimensional volumes of equal size until the set division resolution is reached.
[0115] Based on the trajectory point data density corresponding to the divided local spatiotemporal multidimensional volumes, some smaller local spatiotemporal multidimensional volumes are re-merged into larger local spatiotemporal multidimensional volumes.
[0116] Optionally, the scanning operator includes a scanning surface;
[0117] The device further includes:
[0118] Before receiving a trajectory point query request specifying a query range, the scanning operator association module 612 associates the scanning surface with the trajectory point indexes corresponding to each of the smallest local spatiotemporal multidimensional volumes it passes through.
[0119] If the smallest local spatiotemporal multidimensional volume is merged into a larger local spatiotemporal multidimensional volume, then the scanning surface is associated with the larger local spatiotemporal multidimensional volume.
[0120] Figure 7 A schematic diagram of a trajectory point query device based on a scanning operator, provided for one or more embodiments of this specification, the device comprising:
[0121] At least one processor; and,
[0122] A memory communicatively connected to the at least one processor; wherein,
[0123] The memory stores instructions executable by the at least one processor, which, when executed by the at least one processor, enable the at least one processor to:
[0124] Receive a trajectory point query request that specifies the query range;
[0125] The global spatiotemporal multidimensional volume where the existing trajectory points are distributed is determined, and the global spatiotemporal multidimensional volume is divided into multiple local spatiotemporal multidimensional volumes in order to index the existing trajectory points.
[0126] Based on the partitioning resolution corresponding to the global spatiotemporal multidimensional volume, the query range is converted into a corresponding scanning operator. The scanning operator includes a scanning line or a scanning surface. Each scanning operator is associated with: the trajectory point index corresponding to the grid it passes through or the trajectory point index corresponding to the local spatiotemporal multidimensional volume it passes through. The grid includes the surface of the local spatiotemporal multidimensional volume.
[0127] Based on the trajectory point index associated with the corresponding scanning operator, target trajectory points are filtered in the global spatiotemporal multidimensional volume to determine the trajectory point query results.
[0128] Based on the same idea, one or more embodiments of this specification also provide a non-volatile computer storage medium storing computer-executable instructions, wherein the computer-executable instructions are configured as follows:
[0129] Receive a trajectory point query request that specifies the query range;
[0130] The global spatiotemporal multidimensional volume where the existing trajectory points are distributed is determined, and the global spatiotemporal multidimensional volume is divided into multiple local spatiotemporal multidimensional volumes in order to index the existing trajectory points.
[0131] Based on the partitioning resolution corresponding to the global spatiotemporal multidimensional volume, the query range is converted into a corresponding scanning operator. The scanning operator includes a scanning line or a scanning surface. Each scanning operator is associated with: the trajectory point index corresponding to the grid it passes through or the trajectory point index corresponding to the local spatiotemporal multidimensional volume it passes through. The grid includes the surface of the local spatiotemporal multidimensional volume.
[0132] Based on the trajectory point index associated with the corresponding scanning operator, target trajectory points are filtered in the global spatiotemporal multidimensional volume to determine the trajectory point query results.
[0133] In the 1990s, improvements to a technology could be clearly distinguished as either hardware improvements (e.g., improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the methodology). However, with technological advancements, many methodological improvements today can be considered direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved methodology into the hardware circuit. Therefore, it cannot be said that a methodological improvement cannot be implemented using hardware physical modules. For example, a Programmable Logic Device (PLD) (such as a Field Programmable Gate Array (FPGA)) is such an integrated circuit whose logic function is determined by the user programming the device. Designers can program and "integrate" a digital system onto a PLD themselves, without needing chip manufacturers to design and manufacture dedicated integrated circuit chips. Furthermore, nowadays, instead of manually manufacturing integrated circuit chips, this programming is mostly implemented using "logic compiler" software. Similar to the software compiler used in program development, the original code before compilation must be written in a specific programming language, called a Hardware Description Language (HDL). There are many HDLs, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, and RHDL (Ruby Hardware Description Language). Currently, the most commonly used are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should understand that by simply performing some logic programming on the method flow using one of these hardware description languages and programming it into an integrated circuit, the hardware circuit implementing the logical method flow can be easily obtained.
[0134] The controller can be implemented in any suitable manner. For example, it can take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro)processor, logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers, and embedded microcontrollers. Examples of controllers include, but are not limited to, the following microcontrollers: ARC625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicon Labs C8051F320. A memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art will also recognize that, in addition to implementing the controller in purely computer-readable program code form, the same functionality can be achieved by logically programming the method steps to make the controller take the form of logic gates, switches, ASICs, programmable logic controllers, and embedded microcontrollers. Therefore, such a controller can be considered a hardware component, and the means included therein for implementing various functions can also be considered as structures within the hardware component. Alternatively, the means for implementing various functions can be considered as both software modules implementing the method and structures within the hardware component.
[0135] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, a computer can be, for example, a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email device, game console, tablet computer, wearable device, or any combination of these devices.
[0136] For ease of description, the above devices are described in terms of function, divided into various units. Of course, in implementing this specification, the functions of each unit can be implemented in one or more software and / or hardware components.
[0137] Those skilled in the art will understand that the embodiments of this specification can be provided as methods, systems, or computer program products. Therefore, the embodiments of this specification can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the embodiments of this specification can take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0138] This specification is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this specification. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create a machine for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0139] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0140] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0141] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0142] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0143] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0144] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0145] This specification can be described in the general context of computer-executable instructions that are executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform a specific task or implement a specific abstract data type. This specification can also be practiced in distributed computing environments, where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.
[0146] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the embodiments of apparatus, devices, and non-volatile computer storage media are basically similar to the method embodiments, so the descriptions are relatively simple; relevant parts can be referred to the descriptions of the method embodiments.
[0147] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.
[0148] The above description is merely one or more embodiments of this specification and is not intended to limit this specification. Various modifications and variations can be made to the one or more embodiments of this specification by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principle of one or more embodiments of this specification should be included within the scope of the claims of this specification.
Claims
1. A trajectory point query method based on scan operators, comprising: receiving a trajectory point query request specifying a query range; determining a global spatio-temporal hypercube in which existing trajectory points are distributed, the global spatio-temporal hypercube being divided into a plurality of local spatio-temporal hypercubes to index the existing trajectory points; converting the query range into corresponding scan operators including scan lines or scan surfaces according to a division resolution corresponding to the global spatio-temporal hypercube, each of the scan operators being associated with trajectory point indexes corresponding to grids or local spatio-temporal hypercubes that the scan operator passes through, wherein the grids include faces of the local spatio-temporal hypercubes; screening target trajectory points in the global spatio-temporal hypercube according to the trajectory point indexes associated with the corresponding scan operators to determine a trajectory point query result. 2.The method of claim 1, wherein the spatio-temporal hypercube is a spatio-temporal cube. 3.The method of claim 1, wherein the converting the query range into corresponding scan operators specifically comprises: determining that the trajectory point query request is directed to real-time trajectory points, wherein the real-time trajectory points are distributed on a specified face of the global spatio-temporal hypercube, the grids include faces of the local spatio-temporal hypercubes divided from the specified face, and dimensions corresponding to the real-time trajectory points include spatial dimensions but not temporal dimensions; converting the query range into corresponding scan lines on the specified face to screen target trajectory points on the specified face according to the trajectory point indexes corresponding to the grids that the corresponding scan lines pass through. 4.The method of claim 1, wherein the converting the query range into corresponding scan operators specifically comprises: determining that the trajectory point query request is directed to historical trajectory points, wherein the historical trajectory points are distributed at least inside the global spatio-temporal hypercube, and dimensions corresponding to the historical trajectory points include spatial dimensions and temporal dimensions; converting the query range into corresponding scan surfaces directed to the global spatio-temporal hypercube to screen target trajectory points in the local spatio-temporal hypercubes according to the trajectory point indexes corresponding to the local spatio-temporal hypercubes that the corresponding scan surfaces pass through. 5.The method of claim 1, wherein the existing trajectory points are pre-mapped to the global spatio-temporal hypercube according to a division resolution corresponding to the global spatio-temporal hypercube to establish trajectory point indexes, the division resolution including a grid resolution on a specified face of the global spatio-temporal hypercube or a local spatio-temporal hypercube resolution of the global spatio-temporal hypercube; the converting the query range into corresponding scan operators according to the division resolution corresponding to the global spatio-temporal hypercube specifically comprises: normalizing each boundary value of the query range to obtain a normalized boundary value. According to a division resolution corresponding to the global spatio-temporal multi-dimensional body, each normalized boundary value is mapped to the global spatio-temporal multi-dimensional body to generate a corresponding scanning operator, so that a scale of the corresponding scanning operator is consistent with a scale of a minimum grid of the global spatio-temporal multi-dimensional body or a minimum local spatio-temporal multi-dimensional body.
6. The method of claim 5, wherein the existing trajectory points are pre-mapped to the global spatio-temporal multi-dimensional body according to at least corresponding longitude values and latitude values, and the boundary values of the query range at least include corresponding longitude values and latitude values.
7. The method of claim 1, wherein the screening of the target trajectory points in the global spatio-temporal multi-dimensional body according to the trajectory point indexes associated with the corresponding scanning operator specifically comprises: determining a scanning operator index key of the constructed scanning operator, wherein the scanning operator index key has ordered index values, and the ordered index values one-to-one correspond to the global spatio-temporal multi-dimensional body in full order in at least two dimensions; according to the corresponding scanning operator, taking a union of corresponding index values in the same dimension within the index value range of the scanning operator index key, and then taking an intersection of corresponding index values in different dimensions according to the index value union to obtain a target scanning operator index value; screening the target trajectory points in the global spatio-temporal multi-dimensional body according to the trajectory point indexes associated with the scanning operator corresponding to the target scanning operator index value.
8. The method of claim 7, wherein the ordered index values are consecutive integers.
9. The method of claim 1, wherein before the receiving of the trajectory point query request specifying the query range, the method further comprises: performing local spatio-temporal multi-dimensional body division on the global spatio-temporal multi-dimensional body in one round or multiple rounds of iteration, and each round of division divides the current global spatio-temporal multi-dimensional body or local spatio-temporal multi-dimensional body into multiple smaller local spatio-temporal multi-dimensional bodies of equal size until a set division resolution is reached; according to the trajectory point data density corresponding to the divided local spatio-temporal multi-dimensional bodies, re-merging a part of small local spatio-temporal multi-dimensional bodies into larger local spatio-temporal multi-dimensional bodies.
10. The method of claim 9, wherein the scanning operator comprises a scanning surface; before the receiving of the trajectory point query request specifying the query range, the method further comprises: associating the scanning surface with trajectory point indexes corresponding to each minimum local spatio-temporal multi-dimensional body passed by the scanning surface; if the minimum local spatio-temporal multi-dimensional body is merged into a larger local spatio-temporal multi-dimensional body, then associating the scanning surface with the larger local spatio-temporal multi-dimensional body.
11. A scanning operator-based trajectory point query device, comprising: a query request receiving module that receives a trajectory point query request specifying a query range; a spatio-temporal multi-dimensional body determining module that determines a global spatio-temporal multi-dimensional body in which existing trajectory points are distributed, and the global spatio-temporal multi-dimensional body is divided into multiple local spatio-temporal multi-dimensional bodies so as to index the existing trajectory points; a scan operator conversion module, configured to convert the query range into corresponding scan operators according to a division resolution corresponding to the global spatiotemporal multi-dimensional body, the scan operators including scan lines or scan surfaces, each of the scan operators being associated with a track point index corresponding to a grid passed by the scan operator or a track point index corresponding to a local spatiotemporal multi-dimensional body passed by the scan operator, wherein the grid includes a face of the local spatiotemporal multi-dimensional body; a target track point screening module, configured to screen target track points in the global spatiotemporal multi-dimensional body according to the track point index associated with the corresponding scan operator, to determine a track point query result.
12. The apparatus of claim 11, wherein the spatiotemporal multi-dimensional body is a spatiotemporal cube.
13. The apparatus of claim 11, the scan operator transformation module to determine that the trajectory point query request is for real-time trajectory points, wherein, The real-time track points are distributed on a specified face of the global spatiotemporal multi-dimensional body, the grid includes a face of a local spatiotemporal multi-dimensional body divided from the specified face, and the dimensions corresponding to the real-time track points include spatial dimensions but not temporal dimensions. The query range is converted into a corresponding scan line on the specified face, so as to screen target track points on the specified face according to the track point index corresponding to the grid passed by the corresponding scan line.
14. The apparatus of claim 11, the scan operator transformation module to determine that the trajectory point query request is for a historical trajectory point, wherein, The historical track points are distributed at least in an interior of the global spatiotemporal multi-dimensional body, and the dimensions corresponding to the historical track points include spatial dimensions and temporal dimensions. The query range is converted into a corresponding scan surface for the global spatiotemporal multi-dimensional body, so as to screen target track points in a local spatiotemporal multi-dimensional body according to the track point index corresponding to the local spatiotemporal multi-dimensional body passed by the corresponding scan surface.
15. The apparatus of claim 11, wherein the existing track points are pre-mapped to the global spatiotemporal multi-dimensional body according to a division resolution corresponding to the global spatiotemporal multi-dimensional body, to establish track point indexes, and the division resolution corresponding to the global spatiotemporal multi-dimensional body includes a grid resolution on a specified face of the global spatiotemporal multi-dimensional body or a local spatiotemporal multi-dimensional body resolution of the global spatiotemporal multi-dimensional body. The scan operator conversion module performs normalization processing on each boundary value of the query range, to obtain a normalized boundary value. According to the division resolution corresponding to the global spatiotemporal multi-dimensional body, each normalized boundary value is mapped to the global spatiotemporal multi-dimensional body, to generate a corresponding scan operator, so that a scale of the corresponding scan operator is consistent with a scale of a minimum grid or a minimum local spatiotemporal multi-dimensional body of the global spatiotemporal multi-dimensional body.
16. The apparatus of claim 15, wherein the existing track points are pre-mapped to the global spatiotemporal multi-dimensional body according to at least a corresponding longitude value and a latitude value, and the boundary values of the query range include at least the corresponding longitude value and the latitude value.
17. The apparatus of claim 11, the target trajectory point screening module determines a constructed scan operator index key, wherein, The scan operator index key has ordered index values, and the ordered index values one-to-one correspond to all-quantity-ordered scan operators in at least two dimensions of the global spatiotemporal multi-dimensional body. According to the corresponding scan operator, a union of corresponding index values of the same dimension is obtained in a range of index values of the scan operator index key, and a intersection of corresponding index values of different dimensions is obtained according to the union of the index values, to obtain a target scan operator index value. According to the trajectory point index associated with the scan operator corresponding to the target scan operator index value, the target trajectory point is filtered from the global spatio-temporal hypercube.
18. The apparatus of claim 17, wherein the ordered index values are consecutive integers.
19. The apparatus of claim 11, further comprising: a spatio-temporal hypercube merging module configured to, before receiving the trajectory point query request specifying a query range, divide the global spatio-temporal hypercube into smaller local spatio-temporal hypercubes in one round or multiple rounds of division, each round of division dividing the current global spatio-temporal hypercube or local spatio-temporal hypercube into multiple smaller local spatio-temporal hypercubes of equal size until a set division resolution is reached; according to the trajectory point data density corresponding to the divided local spatio-temporal hypercubes, re-merging some small local spatio-temporal hypercubes into larger local spatio-temporal hypercubes.
20. The apparatus of claim 19, wherein the scan operator comprises a scan plane. the apparatus further comprises: a scan operator associating module configured to, before receiving the trajectory point query request specifying a query range, associate the scan plane with the trajectory point index corresponding to each smallest local spatio-temporal hypercube through which the scan plane passes; if the smallest local spatio-temporal hypercube is merged into a larger local spatio-temporal hypercube, then associating the scan plane with the larger local spatio-temporal hypercube.
21. A scan operator-based trajectory point query device, comprising: at least one processor; and a memory in communication connection with the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform: receiving a trajectory point query request specifying a query range; determining a global spatio-temporal hypercube in which existing trajectory points are distributed, the global spatio-temporal hypercube being divided into multiple local spatio-temporal hypercubes to index the existing trajectory points; according to a division resolution corresponding to the global spatio-temporal hypercube, converting the query range into a corresponding scan operator, the scan operator comprising a scan line or a scan plane, each scan operator being associated with a trajectory point index corresponding to a grid or a trajectory point index corresponding to a local spatio-temporal hypercube through which the scan operator passes, wherein the grid comprises a face of a local spatio-temporal hypercube; according to the trajectory point index associated with the corresponding scan operator, filtering a target trajectory point from the global spatio-temporal hypercube to determine a trajectory point query result.
Citation Information
Patent Citations
Method, device and electronic device for constructing spatio-temporal index in cloud environment
CN109165215A
Selectively scanning portions of a multidimensional index for processing queries
US11030177B1