Algorithm: An algorithm for extracting operation patterns of industrial robots

Input: Hash sequence 0: Q = H 1 H 2 H n

Output: Hash sequence 3: Q 3 = H 1 1 H 2 1 H i 1

Definition 1: Definition H i , i = 1 n is the image hash value calculated after image segmentation of a single frame industrial robot.

Definition 2: Definition H i 1 H i 2 robot attitude vector H i 1 and H i 2 approximately equal, so that D ( H 1 , H 2 ) δ , where D(H1, H2) is Hamming distance between H1 and H2, and δ is the given similarity threshold.

Steps:

1) Set Q suffix sequence of S ( Q ) = { H i H i + 1 H n | i = 1 n }

2) Make any hash sequence Q 1 , Q 2 S ( Q )

3) st. Q 1 + Q 2 = S ( Q )

4) Let Q 1 = H 1 1 H 2 1 H n 1 and Q 2 = H 1 2 H 2 2 H n 2

5) get the common prefix subsequence of Q1, Q2

6) for i in n:

7) if H 1 1 H 1 2 H 2 1 H 2 2 H i 1 H i 2 ,

8) Add to common prefix subsequence set H(Q)

9) end for

10) Q3 = Softmax(H(Q))

11) Output Q3