STORAGE METHOD AND SEARCH METHOD FOR MARK EVENT ON TWO-DIMENSIONAL SPACE
First Claim
1. A storage method for mark events on a two-dimensional space, comprising:
- providing an event and a first degree and a second degree of a coordinate of the event;
performing calculation on the first degree according to an algorithm, to obtain an index pointing to a bucket position of a storage device;
judging whether or not there is a search tree stored in the bucket position;
inserting the event into a linked list of a node, corresponding to the second degree, of the search tree, if any search tree stored in the bucket position; and
establishing a new search tree whose a root node being the second degree, and inserting the event into the linked list of the root node of the established search tree, if there is no any search tree stored in the bucket position.
1 Assignment
0 Petitions
Accused Products
Abstract
A storage method and a search method for mark events on two-dimensional space are provided. First, an event and a corresponding coordinate thereof are retrieved. Next, calculation on the coordinate of the event is performed to generate an index representing a bucket position in a storage device. Next, whether or not there is any existing search tree stored in the bucket position is judged, and then the event is inserted into a linked list of a node of the search tree stored in the bucket position according to a judgment result. Besides, when a range on the two-dimensional space is designated, corresponding nodes in the search tree are rapidly accessed according to the index obtained by a hash function, and further by application of pointers pointing to the bucket position having the search tree stored therein and by real-time return of search result, the search speed is high.
-
Citations
12 Claims
-
1. A storage method for mark events on a two-dimensional space, comprising:
-
providing an event and a first degree and a second degree of a coordinate of the event; performing calculation on the first degree according to an algorithm, to obtain an index pointing to a bucket position of a storage device; judging whether or not there is a search tree stored in the bucket position; inserting the event into a linked list of a node, corresponding to the second degree, of the search tree, if any search tree stored in the bucket position; and establishing a new search tree whose a root node being the second degree, and inserting the event into the linked list of the root node of the established search tree, if there is no any search tree stored in the bucket position. - View Dependent Claims (2, 3, 4, 5, 6)
-
-
7. A search method for mark events on a two-dimensional space, comprising:
-
designating an inquiry range on a map, wherein coordinates of the inquiry range relates to a first degree, a second degree, a third degree and a fourth degree; performing calculation on the first degree and the third degree according to an algorithm to obtain a first index and a second index, wherein the first index and the second index respectively point to a first bucket position and a second bucket position of a storage device; searching a search tree stored between the first bucket position and the second bucket position; searching a corresponding node of the found search tree stored between the first bucket position and the second bucket position while taking the second degree and the fourth degree as searching conditions; and returning back all the events stored in the matched nodes, and real-time displaying the events on the two-dimensional space. - View Dependent Claims (8, 9, 10, 11, 12)
-
Specification