{'fraction_non_alphanumeric': 0.022169437846397466, 'fraction_numerical': 0.0, 'mean_word_length': 4.934272300469484, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
SPI-Tree : Spatial and profile indexing for large scale location based services platforms

The SPI-tree was designed and implemented for a prototype large scale platform allowing location based services between moving clients. The system’s users define their profile in XML and create services available for others, which they are informed automatically about them if they are nearby and their profile matches the creator’s. Our goal is to offer this facility in a metropolis level, handling hundreds of thousands users at the same time and respond real-time. We propose SPI-Tree that combines a PR-Quadtree with the Non-deterministic Finite Automata (NFAs) provided from an XML-matching system like YFilter. It is a quad tree, it indexes the two dimensional space by recursively partitioning it in rectangles, however, the leaf nodes of the SPI-Tree do not contain pointers or buckets of pointers to the moving users but consist of a Non-deterministic Finite Automaton. It is memory based with rapid insert, delete and move operations and allows fast range and nearest neighbor queries with profile matching. A special locking mechanism was implemented for SPITree and is described with detail. Finally we designed a series of experiments that prove our concept.