## 4 Methodology
### Bionic Traffic Generation  
We now explain the principle of generating bionic traffic trace and give more details about the operations. The browser requests different resources through multiple threads simultaneously during the page loading process. For example, three resources in the priority group may be loaded simultaneously or successively, and cells generated by loading them will be included in an arrangement, as shown in Figure 2. The loading time of each resource depends on the state of the network link of the corresponding thread. Therefore, accessing the same website in a short time will also produce different packet sequences. We simulate the impact of network state fluctuations during the resource loading phase by shuffling the order of SRPs. Figure 4 shows the generation process of bionic traces. We first pick two traces of the same website and compare them cell by cell. Then we mark the position where cells from two traces have different directions as the noise points. It is easy to infer that cells within a certain distance around the noise point have a higher probability of forming a priority group. We randomly selected noise points and set search intervals around them. The search interval length gives the priority group's approximate location. We simulate the priority groups by allowing the boundary of the search interval to be extended or shrunk to encompass a complete SRP. Finally, we generate bionic traces by reorganizing the SRPs within the simulation priority group. The process of searching and reorganizing the simulation priority group is described in Algorithm 1. The overall procedure of bionic traffic generation is described in Algorithm 2. The proposed generation algorithm can work at a low cost with \(O(n)\) time complexity. Figure 3: Heatmaps of website traffic traces based on SRPs statistics. (**a**) shows four heatmaps of the portal livedoor.jp. A large number of hyperlinks and other textual resources on this website result in brief responses (fewer incoming cells). (**b**) shows that numerous thumbnails and advertising animation results in lengthy responses to the shopping site amazon.com. (**c**) shows the statistics for the home page of the Mozilla project group. The mozilla.org shows some pictures and descriptions of their projects, resulting in both lengthy and brief responses. The limited resources on their page result in a limited number of SRPs. ```
1:Procedure SR Simulation_Priority_Group(\(\vec{A}\), \(i\), \(L\))
2:start \(\gets i-L/2\) // Searching backward for SRP
3:while\(start>0\) and \(a_{start}>0\) and \(a_{start-1}>0\)do
4:\(start\gets start-1\)
5:endwhile
6:end\(\gets i+L/2\) // Searching forward for SRP
7:if\(a_{end}-1>0\)then
8:while\(a_{end}\
eq 0\) and \(a_{end-1}>0\) and \(a_{end}>0\)do
9:end\(\leftarrow\)end\(+1\)
10:endwhile
11:end\(\leftarrow\)end\(+1\)
12:while\(a_{end}\
eq 0\) and \(a_{end-1}<0\) and \(a_{end}<0\)do
13:end\(\leftarrow\)end\(+1\)
14:endwhile
15:else
16:while\(a_{end}\
eq 0\) and \(a_{end-1}<0\) and \(a_{end}<0\)do
17:end\(\leftarrow\)end\(+1\)
18:endwhile
19:endif
20:\(\vec{P}\leftarrow\vec{A}[start:end]\) // Take the simulation priority group. 21:\(\vec{P}\leftarrow\)operate_SRPs(\(\vec{P}\)) // Finding and shuffling SRPs. 22:\(\vec{S}\leftarrow\)Merge(\(\vec{A}[:start]\), \(\vec{P}\), \(\vec{A}[end:]\))
23:return\(\vec{S}\)
24:Endprocedure
```  
**Algorithm 1** Search and reorganize simulation priority group. Figure 4: The process of bionic trace generation. ```
0: Traffic trace \(\vec{A}=(a_{1},a_{2},\ldots,a_{5000})\), Traffic trace \(\vec{B}=(b_{1},b_{2},\ldots,b_{5000})\)
0: Bionic traffic trace \(\vec{S}=(s_{1},s_{2},\ldots,s_{5000})\)
1: Setting \(U_{noise}\leftarrow\emptyset\)
2:for each \(i\in[1,5000]\)do
3:if\(a_{i}\
eq b_{i}\)then
4:\(U_{noise}\leftarrow U_{noise}\cup\{i\}\)
5:endif
6:endfor
7:\(U_{noise}\leftarrow Compare\_Instances(\vec{A},\vec{B})\)
8:\(U_{pick}\leftarrow Random\_Pick\_Noise\_Points(U_{noise},R_{perc})\) //Randomly pick \(R_{perc}\) of the noise points.