## 3 Model Design
### Algorithm  
The new probability matrix is obtained by using the matrix of social relation transformation and the matrix of cooperation forwarding relation. Because meeting the probability matrix is obtained by node meet history information, which is often incomplete, we need to fill in the missing value with additional information or update the encounter value with the cooperation degree and social of the devices. We called the newly updated probability matrix the encounter cooperation matrix containing the encounter cooperation (EC) values. Our algorithm is shown as follows:  
Figure 2: Probability prediction model. ```
1:\(M\): The encounter matrix formed by the node encounter probability map in the \(T\) period \(Sim\), \(Move\), \(Conn\), \(Pref\), \(Rel\), \(Act\), \(Need\), \(E\) \(T\) period 1:Let \(t=0\); // \(t\) is used to record the elapsed time after the new matrix is updated; Let A [ ]; //Record all nodes that carry the message. 2:\(S\gets getSocialMatrix(Sim,Move,Conn,T)\) // get the social relations matrix 3:\(R\gets getCooperationMatrix(Pref,Rel,Act,Need,E,T)\) // get the cooperation relations matrix 4:\(\widetilde{M}\gets getMeetProbalityMatrix(M,S,R,T)\) //The new probability matrix of meeting is calculated based on the historical meeting, social relations and cooperation relations of the past \(T\) time period 5:\(M^{T}\gets getUpdateMatrixAccordAlgorithm2(M)\) 6:For each\(i\in(1,A.length]\)do 7: Create a set of neighbor nodes \(N_{adj}//\)Devices in A looks for the neighbor within the communication range after \(\Delta t\) time. 8:If\(N_{adj}\) contains a destination node; break; //If neighbors contains a destination node, the information transmission is successful and the loop ends. 9:Else If\(M^{T}\) has the column vectors of the destination node Then
10:For each\(z\in\left[1,N_{adj}.length\right]\) 11:If the EC value of the node \(n_{z}\) in \(N_{adj}\) and destination node> the EC value of node \(n_{i}\) and destination node //The neighbor with the highest EC Value of the target node is selected as the next hop node. 12:Choose next hop nodes \(n_{z}\) 13:A. add (\(n_{z}\)); // The selected devices are used as a new message-carrying devices. 14:End if
15:End for
16:End if
17:Else If\(M^{T}\) does not have the column vectors of the destination node Then
18:\(M^{\prime}\gets M^{T}.getRemoveColVector(M)\) // The nodes contained in \(M\) are the area. We need to find nodes with high probability of encountering other area and remove the column vectors corresponding to the area nodes. 19:\(N[]\gets N_{adj}.getChooseColMaxMR(M^{\prime},M^{\prime}.getLine(N_{adj},A. get(i))\) //If the corresponding EC value of node \(n_{i}\) is the largest, this column is invalidated, and the nodes corresponding to the maximum EC value of each column are selected in turn. 20:A.add(\(N\)) 21:End if
22:End for
23:\(t\) = getTime();
24:If\((t\geq\) T) 25:\(M^{T}\gets getUpdateNewMeetMatrix(M^{T},R^{T},S^{T},T)\) //After the \(\Delta t\) time information is passed, the updated target encounter probability matrix is used as the input for calculating the encounter probability matrix in the next round of information transfer. Return Step 5;
26:End if
```  
**Algorithm 1**PEBN (predict the probability of encounters between nodes). ```
0:\(M\) The matrix trained by Algorithm 1 \(M^{\mathrm{th}}\cdots M^{\mathrm{t_{k}}}\) The encounter matrixes carried by the nodes entering the area that are received at different time intervals. 0:\(M^{\mathrm{T}}\) Complete the updated matrix 1. Let \(k\in[1,n]\); \(i,j\in[1,z]/\mathit{n}\) is the total number of encounter matrices transmitted by nodes in the area at different time periods, \(z\) is the maximum number of rows or columns of the matrix \(M^{\mathrm{t_{k}}}\) 2. For \(k=n\) to 1 do//The later the matrix arrives, the more it will be processed first. 3. If matrix \(M\) does not contain the node \(i\) in the matrix \(M^{\mathrm{t_{k}}}\)do//If the matrix \(M\) does not contain a row or a column. 4.