Research Article
Achieve Efficient and Privacy-Preserving Compound Substring Query over Cloud
Algorithm 2
Search substring
in a position heap
, where
and
.(1) | initial empty sets and ; | (2) | let be the root node of the ; | (3) | for each in do | (4) | find the child of , where ; | (5) | if does exist then | (6) | ifthen | (7) | ; | (8) | for each descendant of do | (9) | ; | (10) | end for | (11) | else | (12) | ; | (13) | end if | (14) | ; | (15) | else | (16) | break; | (17) | end if | (18) | end for | (19) | for each in do | (20) | if is not equal to then | (21) | ; | (22) | end if | (23) | end for | (24) | return ; |
|