Research Article
Travel Trajectory Frequent Pattern Mining Based on Differential Privacy Protection
Algorithm 2
Trajectory graph frequency calculation (TGFC).
Input: Graph Database , Canonical Code of Trajectory Subgraph , the number of edges with as the node | Output: the number of trajectory subgraph in graph database | 1. , trajectory subgraph , | 2. According to the definition of , has the largest node degree, and takes the node with the highest degree as the starting match query point. | 3. Each time, select the node with the highest degree from for matching. Update to . | 4. for each node in : | 5. if & &: / / | 6. | 7. end for | 8. for each node in : | 9. | 10. end for | 11. return num | 12. -------Subgraph Isomorphism Search,------13. if: | 14. num+=1 | 15. return num | 16. else if | 17. if is the last node of : | 18. num +=1 | 19. return num | 20. for each unvisited node in : | 21. if & &: | 22. traversing all the remaining isomorphism points, obtained isomorphism subgraph by the adjacency matrix. | 23. num+= : | 24. else | 25. : | 26. end for | 27. return num |
|