# A Novel Video Transmission Latency Measurement Method for Intelligent Cloud Computing
## 3 Methodology
### Method 3: Lossless Remote Video Online Measurement
In order to reduce the amount of data to be processed while retaining useful information, the original video frame and the reconstructed video frame are subjected to block and down sampling processing. The device divides the \(Y_{On}(i,j)\) and \(Y_{Rm}(i,j)\) frames into 16 \(\times\) 16-pixel blocks and assigns the average pixel value of each block to \(Y^{\prime}_{On}(i^{\prime},j^{\prime})\) and \(Y^{\prime}_{Rm}(i^{\prime},j^{\prime})\), as shown in Equation (6). The downsampling of the original video frame and the reconstructed video frame is realized, and the original video frame sequence \(Y^{\prime}_{On}(i^{\prime},j^{\prime})\) and the reconstructed video frame sequence \(Y^{\prime}_{Rm}(i^{\prime},j^{\prime})\), with a resolution of 80 \(\times\) 45, are obtained, where \(i^{\prime}\in(0,\ 44),j^{\prime}\in(0,\ 79),\ \mathrm{i}=16\times i^{\prime},j=16 \times j^{\prime}\). \[Y^{\prime}\big{(}i^{\prime},j^{\prime}\big{)}=\frac{\sum_{i}^{i+15}\sum_{j}^{ j+15}Y(i,j)}{256} \tag{6}\]  
The downsampled original video sequence \(Y^{\prime}_{On}(i^{\prime},j^{\prime})\) and the downsampled reconstructed video sequence \(Y^{\prime}_{Rm}(i^{\prime},j^{\prime})\) are subjected to frame difference processing according  
Figure 6: Lossless remote video delay measurement algorithm. to Equation (7), and obtain the video sequence \(\mathfrak{s}\delta_{O(n)}(i^{\prime},j^{\prime})\) and \(\delta_{R(m)}(i^{\prime},j^{\prime})\) that reflect the pixel changes of the previous and previous frames. \[\Delta\big{(}i^{\prime},j^{\prime}\big{)}=\big{|}Y_{n+1}^{\prime}\big{(}i^{ \prime},j^{\prime}\big{)}-Y_{n}^{\prime}\big{(}i^{\prime},j^{\prime}\big{)} \big{|} \tag{7}\]  
A threshold value \(\varepsilon\) is selected to binarize \(\delta_{O(n)}(i^{\prime},j^{\prime})\) and \(\delta_{R(m)}(i^{\prime},j^{\prime})\) according to Equation (8). The pixel value greater than the threshold value is set to 1 and the pixel value less than the threshold value is set to 0 to obtain binarized images \(B_{O(n)}(i^{\prime},j^{\prime})\) and \(B_{R(m)}(i^{\prime},j^{\prime})\). \[B\big{(}i^{\prime},j^{\prime}\big{)}= \begin{cases}1,&F(i^{\prime},j^{\prime})> \varepsilon\\ 0,&F(i^{\prime},j^{\prime})\leq\varepsilon\end{cases}  \tag{8}\]  
where \(F(i^{\prime},j^{\prime})\) represents the pixel value of the pixel with coordinate \((i^{\prime},j^{\prime})\). The binarized image is expanded line by line to obtain the hash codes of each frame of the original video and the reconstructed video. The hash code and frame timestamp of each frame of the original video are composed of hash packets which are packaged and sent to the latency measurement device at the receiver, as shown in Figure 7.  
The latency measurement device at the receiver performs hash matching to find the original video frame that matches the reconstructed video. In the hash library, HashBD, at the receiver, \(H_{O(n)}\) and \(H_{R(m)}\) are used to represent the hash codes of the original video frame and the reconstructed video frame respectively, and \(H_{O(n)}^{k},~{}H_{R(m)}^{k}\) is the value of the kth bit of the hash code. The Hamming distance is used to calculate the distance of two code strings, that is, the corresponding bits of the reconstructed video frame feature hash value and the original video frame feature hash value are XOR processed and the number of 1 is counted, as shown in Equation (9). The distance determines the correspondence between two frames. The smaller the distance, the stronger the correlation between the two frames, and the less the correlation. In this way, the original video frame matching with the reconstructed video frame can be found, and the end-to-end latency of video transmission can be obtained by using the time stamps carried by the two video frames. \[D(m,n)=\sum(H_{O(n)}^{k}\oplus H_{R(m)}^{k}) \tag{9}\]  
Method 3 can carry out high-precision real-time latency monitoring online without damaging the transmitted video. It balances the tradeoff between computational demand, out of band bandwidth utilization, and robustness across different content.