Skip to main content
. 2024 Nov 22;10:e2235. doi: 10.7717/peerj-cs.2235

Algorithm 7. Simulator 7.

Input: I,T,TKi,Q
Output: Search results R
 1: Parse ph(w) as [(t1,pf1),(t2,pf2),...,(tc,pfc)]
 2: Parse {tw1¯,tw2¯,...,twt¯,E1,E2,..Et1}minsp(TKi,Q¯)
 3: for twj¯minsp(TKi,Q¯) do
 4:    vBR{0,1}(l+λ);(Bwj||SLwji)R{0,1}(l+λ)
 5: end for
 6: B=B1B2Bt
 7: Get IDB={1,2,...,p} from B
 8:  for iIDB do
 9:      flag={000...000}t1
10:    if X^[i]= then
11:       X^[i]R{0,1}n
12:    else
13:        X^[i]pfi
14:    end if
15:    (E(pos11),E(pos21),E(posm1))SLw11
16:   for d=2t do
17:       (E(pos1i),E(pos2i),E(posni))SLwji
18:      for k=1m;k=1n do
19:         if E(pos1k)=E(pos1k)×E(d1) then
20:            Set the position (i1) of flag to 1
21:            break
22:         end if
23:      end for
24:   end for
25:   If all positions of flag are 1
26:   get ciT[i], RRci
27: end for
28: Server sends { X^} to the blockchain for verification, and sends R to the data user