Spatio-temporal data mining and analysis method and device thereof

Through the spatiotemporal data mining and analysis method, the limitations of the spatiotemporal data set calculation algorithm in the prior art are solved, and the spatiotemporal k nearest neighbor connections of any spatial data type are realized in a distributed environment, accurately obtain spatiotemporal objects with similar spatiotemporal characteristics, and improve the accuracy of the calculation results.

CN113868310BActive Publication Date: 2025-05-27JINGDONG CITY BEIJING DIGITS TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111159375.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-30
Publication Date
2025-05-27
Estimated Expiration
2041-09-30

AI Technical Summary

Technical Problem

The distributed spatial k nearest neighbor connection algorithm in the prior art only supports k nearest neighbor calculations between spatial points and does not support other complex spatial data types. Moreover, the connection algorithm of spatiotemporal big data mainly only considers the spatial correlation between objects and fails to fully utilize the characteristics of spatiotemporal data.

Method used

A spatiotemporal data mining and analysis method is proposed. By obtaining spatiotemporal data sets from spatiotemporal trajectory databases, performing spatiotemporal divisions, allocating spatiotemporal objects to corresponding spatiotemporal partitions, and performing spatiotemporal k nearest neighbor calculations, supporting spatiotemporal data sets of any spatial data type, and considering temporal correlation.

Benefits of technology

The space-time k nearest neighbor connection algorithm that supports spatiotemporal data sets of any spatial data type in a distributed environment is realized, which can accurately obtain spatiotemporal objects with similar spatiotemporal characteristics, and improve the accuracy of the calculation results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113868310B_ABST
    Figure CN113868310B_ABST
Patent Text Reader

Abstract

This application discloses a spatio-temporal data mining and analysis method and apparatus thereof. The method is applied to a scenario of obtaining spatio-temporal objects with similar spatio-temporal characteristics, and the method includes: obtaining a first spatio-temporal data set and a second spatio-temporal data set from a spatio-temporal trajectory database; wherein, the first spatio-temporal data set contains a first spatio-temporal object, its first time range and first spatial attribute, and the second spatio-temporal data set contains a second spatio-temporal object, its second time range and second spatial attribute; dividing the entire time range and spatial range according to the first time range, the first spatial attribute, the second time range and the second spatial attribute to generate spatio-temporal partitions of multiple spatio-temporal ranges, and calculating the spatio-temporal objects from the two spatio-temporal data sets within each spatio-temporal partition to obtain spatial k-nearest neighbors that meet the time constraints. This application can implement a spatio-temporal k-nearest neighbor join algorithm in a distributed environment and support spatio-temporal data sets of any spatial data type.
Need to check novelty before this filing date? Find Prior Art

Claims

1. A spatio-temporal data mining and analysis method, characterized in that, the method is applied to a scenario of obtaining spatio-temporal objects with similar spatio-temporal characteristics, and the method includes: obtaining a first spatio-temporal data set and a second spatio-temporal data set from a spatio-temporal trajectory database; wherein, the first spatio-temporal data set contains a first spatio-temporal object and a first time range and a first spatial attribute of the first spatio-temporal object, and the second spatio-temporal data set contains a second spatio-temporal object and a second time range and a second spatial attribute of the second spatio-temporal object; performing spatio-temporal partitioning according to the first time range, the first spatial attribute, the second time range and the second spatial attribute to obtain a plurality of time partitions and spatio-temporal partitions under each of the time partitions; allocating the second spatio-temporal object to a spatio-temporal partition that spatio-temporally intersects with the second spatio-temporal object according to the minimum bounding rectangle of the second time range and the second spatial attribute, and statistically analyzing the time distribution information of the second spatio-temporal object in each of the spatio-temporal partitions; allocating the first spatio-temporal object to a corresponding spatio-temporal partition according to the first time range, the first spatial attribute, the time distribution information and a target time partition; performing spatio-temporal k-nearest neighbor calculation according to the first spatio-temporal object and the second spatio-temporal object allocated in the spatio-temporal partition to obtain the result of spatio-temporal k-nearest neighbor connection of the first spatio-temporal data set and the second spatio-temporal data set.

2. The method according to claim 1, characterized in that, the performing spatio-temporal partitioning according to the first time range, the first spatial attribute, the second time range and the second spatial attribute to obtain a plurality of time partitions and spatio-temporal partitions under each of the time partitions includes: determining a global time domain and a global spatial domain according to the first time range, the second time range and the second spatial attribute; performing time partitioning according to the second spatio-temporal data set, the global time domain, a positive integer k, a time threshold, a preset number of time partitions and a target number of spatial partitions in each time partition to obtain a plurality of time partitions; performing spatial partitioning in the corresponding time partition according to the second spatio-temporal object in each time partition, the global spatial domain, the positive integer k and the target number to obtain spatio-temporal partitions under each of the time partitions.

3. The method according to claim 2, characterized in that, the determining a global time domain and a global spatial domain according to the first time range, the second time range and the second spatial attribute includes: statistically analyzing a first time domain of the first spatio-temporal data set according to the first time range; statistically analyzing a second time domain and a second spatial domain of the second spatio-temporal data set according to the second time range and the second spatial attribute; determining an extended time domain of the first spatio-temporal data set according to the first time domain and the time threshold; determining a global time domain according to the extended time domain and the second time domain, and determining a global spatial domain according to the second spatial domain.

4. The method according to claim 2, characterized in that, Performing time partitioning according to the second spatio-temporal data set, the global time domain, a positive integer k, a time threshold, a preset number of time partitions, and a target number of spatial partitions within each time partition to obtain a plurality of time partitions, including: Sampling from the second spatio-temporal data set at a preset sampling rate to obtain a sample set, and sorting the second spatio-temporal objects in the sample set in ascending order according to the start time; Calculating the minimum range of a time partition according to the global time domain, the time threshold, the number of time partitions, and the time range of the second spatio-temporal objects in the sample set; Calculating the minimum number of samples within a time partition according to the sample set, the time threshold, the number of time partitions, k, and the sampling rate; Traversing the second spatio-temporal objects in the sample set in ascending order of time, adding the currently traversed second spatio-temporal object to a first set, and relocating the scan time line to the minimum time within the time range of the currently traversed second spatio-temporal object; In response to the time span between the scan time line and the partition start time being greater than or equal to the minimum range, and the number of samples in the first set being greater than or equal to the minimum number of samples, taking the partition start time and the minimum time within the time range of the currently traversed second spatio-temporal object as the time range of a time partition, and adding it to the time partition set; Positioning the start time of the next time partition to the minimum time within the time range of the currently traversed second spatio-temporal object, and filtering the samples in the first set that do not belong to the next time partition; Traversing the next second spatio-temporal object in the sample set, and returning to execute the step of adding the currently traversed second spatio-temporal object to the first set until all the second spatio-temporal objects in the sample set are traversed.

5. The method according to claim 2, wherein, Performing spatial partitioning within a corresponding time partition according to the second spatio-temporal objects within each time partition, the global spatial domain, the positive integer k, and the target number to obtain spatio-temporal partitions under each time partition, including: Initializing a priority queue, which is used to store information about spatial partitions, and the spatial partition information in the priority queue is sorted in descending order according to the number of samples within the spatial partition; Determining a first parameter according to the second spatio-temporal objects, k, and the target number within the i-th time partition; where i is a positive integer greater than or equal to 1 and less than or equal to N, and N is the total number of time partitions; Circularly taking out the head spatial partition of the priority queue, and jumping out of the loop and stopping the partitioning in response to the number of samples within the head spatial partition being less than the first parameter; In response to the number of samples within the head spatial partition being greater than or equal to the first parameter, continuing to divide the head partition of the priority queue into multiple sub-partitions, and adding the multiple sub-partitions and the samples within them to the priority queue; Perform loop division until the number of spatial partitions in the priority queue reaches the target number, at which point the loop ends. At this time, determine the spatial partition in the priority queue as the spatio-temporal partition of the i-th time partition.

6. The method according to claim 1, wherein, the step of allocating the first spatio-temporal object to the corresponding spatio-temporal partition according to the first time range, the first spatial attribute, the time distribution information, and the target time partition includes: querying the target time partition that intersects with the first spatio-temporal object in time according to the first time range; finding the first spatio-temporal partition closest to the first spatio-temporal object in the target time partition according to the minimum bounding rectangle of the first spatial attribute; wherein, at least one time distribution information in the first spatio-temporal partition is completely included in the extended time range of the first spatio-temporal object; allocating the first spatio-temporal object to the first spatio-temporal partition.

7. The method according to claim 1, wherein, the step of performing spatio-temporal k-nearest neighbor calculation on the first spatio-temporal object and the second spatio-temporal object allocated in the spatio-temporal partition to obtain the result of spatio-temporal k-nearest neighbor connection of the first spatio-temporal data set and the second spatio-temporal data set includes: constructing a spatial index for the second spatio-temporal object in the j-th spatio-temporal partition; where j is greater than or equal to 1 and less than or equal to the total number of spatio-temporal partitions; querying the spatial k-nearest neighbors that satisfy the time proximity constraint on the spatial index for the first spatio-temporal object in the j-th spatio-temporal partition to obtain a first candidate set composed of k second spatio-temporal objects; wherein, the distance between the second spatio-temporal object s that is farthest from the first spatio-temporal object r in the first candidate set and the first spatio-temporal object r is defined as the minimum extended distance of the first spatio-temporal object r; merging and deduplicating the first candidate sets corresponding to each spatio-temporal partition, and determining the set obtained after the merging and deduplicating process as the result of spatio-temporal k-nearest neighbor connection of the first spatio-temporal data set and the second spatio-temporal data set.

8. The method according to claim 7, wherein, the method further includes: determining a target first spatio-temporal object from the first spatio-temporal data set, where the target first spatio-temporal object includes a first spatio-temporal object for which no spatio-temporal partition that satisfies the time proximity constraint is found on the spatial index, and a first spatio-temporal object whose minimum extended distance exceeds the spatial range of the j-th spatio-temporal partition; allocating the target first spatio-temporal object to all spatio-temporal partitions that intersect with the target first spatio-temporal object in terms of time and spatial range according to the extended time range and extended bounding rectangle of the target first spatio-temporal object; calculating the k-nearest neighbors of the target first spatio-temporal object in the spatio-temporal partition where it is located that satisfy the time proximity constraint and whose distance is less than or equal to the minimum extended distance of the target first spatio-temporal object to obtain a second candidate set composed of k second spatio-temporal objects; wherein, the step of merging and deduplicating the first candidate sets corresponding to each spatio-temporal partition includes: Merge and deduplicate the first candidate set and the second candidate set corresponding to each of the spatio-temporal partitions.

9. The method according to claim 8, wherein, the merging and deduplication processing of the first candidate set and the second candidate set corresponding to each of the spatio-temporal partitions includes: Merge the first candidate set and the second candidate set corresponding to each of the spatio-temporal partitions to obtain a second set; Calculate the time reference point and the space reference point of the first spatio-temporal object and the second spatio-temporal object in the second set; wherein, the time reference point is the start time of the intersection time period between the extended time range of the first spatio-temporal object and the time range of the second spatio-temporal object, and the space reference point is the lower left corner point of the intersection space range between the extended bounding rectangle of the first spatio-temporal object and the minimum bounding rectangle of the second spatio-temporal object; Deduplicate the second set according to the time reference point and the space reference point.

10. A spatio-temporal data mining and analysis device, wherein, the device is applied to the scenario of obtaining spatio-temporal objects with similar spatio-temporal characteristics, and the device includes: A first acquisition module, configured to acquire a first spatio-temporal data set and a second spatio-temporal data set from a spatio-temporal trajectory database; wherein, the first spatio-temporal data set includes a first spatio-temporal object, a first time range of the first spatio-temporal object, and a first spatial attribute, and the second spatio-temporal data set includes a second spatio-temporal object, a second time range of the second spatio-temporal object, and a second spatial attribute; A spatio-temporal partitioning module, configured to perform spatio-temporal partitioning according to the first time range, the first spatial attribute, the second time range, and the second spatial attribute to obtain a plurality of time partitions and spatio-temporal partitions under each of the time partitions; A first allocation module, configured to allocate the second spatio-temporal object to a spatio-temporal partition that spatio-temporally intersects with the second spatio-temporal object according to the minimum bounding rectangle of the second time range and the second spatial attribute, and count the time distribution information of the second spatio-temporal object in each of the spatio-temporal partitions; A second allocation module, configured to allocate the first spatio-temporal object to a corresponding spatio-temporal partition according to the first time range, the first spatial attribute, the time distribution information, and a target time partition; A calculation module, configured to perform spatio-temporal k-nearest neighbor calculation according to the first spatio-temporal object and the second spatio-temporal object allocated in the spatio-temporal partition to obtain the result of spatio-temporal k-nearest neighbor connection of the first spatio-temporal data set and the second spatio-temporal data set.

11. The device according to claim 10, wherein, the spatio-temporal partitioning module includes: A determination unit, configured to determine a global time domain and a global space domain according to the first time range, the second time range, and the second spatial attribute; A time partitioning unit, configured to perform time partitioning according to the second spatio-temporal data set, the global time domain, a positive integer k, a time threshold, a preset number of time partitions, and a target number of spatial partitions in each preset time partition to obtain a plurality of time partitions; A space division unit, configured to perform space division within a corresponding time partition according to the second spatio-temporal objects within each of the time partitions, the global space domain, the positive integer k, and the target quantity, so as to obtain spatio-temporal partitions under each of the time partitions.

12. The apparatus according to claim 11, wherein, the determining unit is specifically configured to: statistically calculate a first time domain of the first spatio-temporal data set according to the first time range; statistically calculate a second time domain and a second space domain of the second spatio-temporal data set according to the second time range and the second space attribute; determine an extended time domain of the first spatio-temporal data set according to the first time domain and the time threshold; determine a global time domain according to the extended time domain and the second time domain, and determine a global space domain according to the second space domain.

13. The apparatus according to claim 11, wherein, the time division unit is specifically configured to: sample from the second spatio-temporal data set at a preset sampling rate to obtain a sample set, and sort the second spatio-temporal objects in the sample set in ascending order according to the start time; calculate a minimum range of the time partition according to the global time domain, the time threshold, the number of time partitions, and the time range of the second spatio-temporal objects in the sample set; calculate a minimum number of samples within the time partition according to the sample set, the time threshold, the number of time partitions, the k, and the sampling rate; traverse the second spatio-temporal objects in the sample set in ascending order of time, add the currently traversed second spatio-temporal object to a first set, and relocate the scan time line to the minimum time within the time range of the currently traversed second spatio-temporal object; in response to the time span between the scan time line and the partition start time being greater than or equal to the minimum range, and the number of samples in the first set being greater than or equal to the minimum number of samples, use the partition start time and the minimum time within the time range of the currently traversed second spatio-temporal object as the time range of a time partition, and add it to the time partition set; locate the start time of the next time partition to the minimum time within the time range of the currently traversed second spatio-temporal object, and filter the samples in the first set that do not belong to the next time partition; traverse the next second spatio-temporal object in the sample set, and return to execute the step of adding the currently traversed second spatio-temporal object to the first set until all the second spatio-temporal objects in the sample set are traversed.

14. The apparatus according to claim 11, wherein, the space division unit is specifically configured to: initialize a priority queue, where the priority queue is used to store information of spatio-temporal partitions, and the information of spatio-temporal partitions in the priority queue is sorted in descending order according to the number of samples within the spatio-temporal partitions; determine a first parameter according to the second spatio-temporal objects, k, and the target quantity within the i-th time partition; where i is a positive integer greater than or equal to 1 and less than or equal to N, and N is the total number of the time partitions; Circularly take out the head space partition of the priority queue, and jump out of the loop and stop dividing in response to the number of samples in the head space partition being less than the first parameter; In response to the number of samples in the head space partition being greater than or equal to the first parameter, continue to divide the head partition of the priority queue into multiple sub-partitions, and add the multiple sub-partitions and the samples inside them to the priority queue; Perform circular division until the number of space partitions in the priority queue reaches the target number, at which point the loop ends, and the space partitions in the priority queue are determined as the spatio-temporal partitions of the i-th time partition.

15. The apparatus according to claim 10, wherein, the second allocation module is specifically configured to: query the target time partition that intersects with the first spatio-temporal object time according to the first time range; according to the minimum bounding rectangle of the first spatial attribute, find the first spatio-temporal partition in the target time partition that is closest to the first spatio-temporal object; wherein, at least one time distribution information in the first spatio-temporal partition is completely included in the extended time range of the first spatio-temporal object; allocate the first spatio-temporal object to the first spatio-temporal partition.

16. The apparatus according to claim 10, wherein, the calculation module is specifically configured to: in the j-th spatio-temporal partition, construct a spatial index for the second spatio-temporal objects in the j-th spatio-temporal partition; where j is greater than or equal to 1 and less than or equal to the total number of spatio-temporal partitions; for the first spatio-temporal object in the j-th spatio-temporal partition, query the spatial k-nearest neighbors that satisfy the time proximity constraint on the spatial index, and obtain a first candidate set composed of k second spatio-temporal objects; wherein, the distance between the second spatio-temporal object s that is farthest from the first spatio-temporal object r in the first candidate set and the first spatio-temporal object r is defined as the minimum extended distance of the first spatio-temporal object r; merge and deduplicate the first candidate sets corresponding to each spatio-temporal partition, and determine the set obtained after the merge and deduplication process as the result of the spatio-temporal k-nearest neighbor join of the first spatio-temporal data set and the second spatio-temporal data set.

17. The apparatus according to claim 16, wherein, further includes: a determination module, configured to determine a target first spatio-temporal object from the first spatio-temporal data set, where the target first spatio-temporal object includes a first spatio-temporal object for which no spatio-temporal partition that satisfies the time proximity constraint is found on the spatial index, and a first spatio-temporal object whose minimum extended distance exceeds the spatial range of the j-th spatio-temporal partition; wherein, the second allocation module is further configured to: according to the extended time range and extended bounding rectangle of the target first spatio-temporal object, allocate the target first spatio-temporal object to all spatio-temporal partitions that intersect with the target first spatio-temporal object in terms of time and space range; the calculation module is further configured to: calculate the k-nearest neighbors of the target first spatio-temporal object in the spatio-temporal partition where it is located that satisfy the time proximity constraint and the distance is less than or equal to the minimum extended distance of the target first spatio-temporal object, and obtain a second candidate set composed of k second spatio-temporal objects; Among them, the calculation module is specifically configured to: merge and deduplicate the first candidate set and the second candidate set corresponding to each of the spatio-temporal partitions.

18. The apparatus according to claim 17, wherein, the calculation module is specifically configured to: merge the first candidate set and the second candidate set corresponding to each of the spatio-temporal partitions to obtain a second set; calculate the time reference point and the space reference point of the first spatio-temporal object and the second spatio-temporal object in the second set; wherein, the time reference point is the start time of the intersection period between the extended time range of the first spatio-temporal object and the time range of the second spatio-temporal object, and the space reference point is the lower left corner point of the intersection space range between the extended bounding rectangle of the first spatio-temporal object and the minimum bounding rectangle of the second spatio-temporal object; deduplicate the second set according to the time reference point and the space reference point.

19. A computer device, wherein, it includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein, the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the spatio-temporal data mining and analysis method according to any one of claims 1 to 9.

20. A computer-readable storage medium, on which a computer program is stored, wherein, the computer program is used to cause the computer to execute the spatio-temporal data mining and analysis method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • K nearest neighbor connection inquiry method oriented to large data

    CN109344216A

  • Marine space-time big data parallel KNN query processing method based on PID

    CN113010525A