As shown in Fig. 1, let the number of edge servers be N. It can be cached from the video resource library in remote servers, and can also perform codec operations. Two-way data exchange between high-speed links between edge servers. At the same time, it can also be directly linked to remote servers by the backhaul link. The cache and codec operations of edge servers are subject to scheduling and control of the control center.
Video coding encryption technology
The rapid development of communication technology provides users with diversified and differentiated video requirements. At the same time, the importance of video information transmission security to both video providers and users cannot be ignored. At present, the industry generally uses H.264/AVC encoding standard to compress and transmit videos with low distortion. This paper uses an encryption algorithm based on Logistic chaotic-Quantum-dot Cellular Automata (QCA) [29] to encrypt video coding.
The flow of Logistic chaotic-QCA key generation algorithm is shown in Fig. 2. Among them, Quantum Cellular Neural Network (QCNN) matrix A is obtained by QCA using Logistic chaotic system for h consecutive iterations. h is a multiple of 512, and Logistic chaotic system is shown in formula (1).
$$ {X}_{h+1}=f\left({X}_n\right)=\varPsi {X}_n\left(1-{X}_n\right) $$
(1)
where Ψ∈(0, 4), Xh + 1∈(0, 1), h = 1, 2, 3, …; Xn (n = 1, 2, 3, 4) is the QCA state vector, which satisfies
$$ \Big\{{\displaystyle \begin{array}{c}{\dot{X}}_1=-2{\omega}_{01}\sqrt{1-{X}_1^2}\sin {x}_2\\ {}{\dot{X}}_2=-{\omega}_{02}\left({X}_1-{X}_3\right)+2{\omega}_{01}\frac{X_1}{\sqrt{1-{X}_1^2}}\cos {X}_2\\ {}{\dot{X}}_3=-2{\omega}_{03}\sqrt{1-{X}_3^2}\sin {X}_4\\ {}{\dot{X}}_4=-{\omega}_{04}\left({X}_3-{X}_4\right)+2{\omega}_{03}\frac{X_3}{\sqrt{1-{X}_3^2}}\cos {X}_4\end{array}} $$
(2)
where x1, x3 are the polarizability; x2, x4 are the quantum phases; ω01, ω03 are the coefficients proportional to the energy between points in each cell; ω02, ω04 are the weighted effects of difference in the polarizability of adjacent cells coefficient.
Suppose the generated matrix A satisfies
$$ A=\left[\begin{array}{ccccc}{X}_{11}& {X}_{12}& \cdots & {X}_{1\left(n-1\right)}& {X}_{1n}\\ {}{X}_{21}& {X}_{22}& \cdots & {X}_{2\left(n-1\right)}& {X}_{2n}\\ {}{X}_{31}& {X}_{32}& \cdots & {X}_{3\left(n-1\right)}& {X}_{3n}\\ {}{X}_{41}& {X}_{42}& \cdots & {X}_{4\left(n-1\right)}& {X}_{4n}\end{array}\right] $$
(3)
Split matrix A into matrix B composed of the first 3 rows of elements and matrix C composed of the last row of elements, that is
$$ B=\left[\begin{array}{ccccc}{X}_{11}& {X}_{12}& \cdots & {X}_{1\left(n-1\right)}& {X}_{1n}\\ {}{X}_{21}& {X}_{22}& \cdots & {X}_{2\left(n-1\right)}& {X}_{2n}\\ {}{X}_{31}& {X}_{32}& \cdots & {X}_{3\left(n-1\right)}& {X}_{3n}\end{array}\right] $$
(4)
$$ C=\left[{X}_{41}\kern0.5em {X}_{42}\kern0.5em \cdots \kern0.5em {X}_{4\left(n-1\right)}\kern0.5em {X}_{4n}\right] $$
(5)
The matrix B is further processed and converted into a row vector to form a key sequence, denoted as S, as shown in the following formula
$$ S=\left\{{S}_1,{S}_2,\dots, {S}_{3\times \mathrm{n}}\right\}=\left\{{X}_{11},{X}_{12},\dots, {X}_{21},{X}_{22},\dots, {X}_{3\left(n-1\right)},{X}_{3n}\right\} $$
(6)
The elements in S are in order, and each 512 forms a group to form a chaotic sequence pool H, as shown in Eq. (7).
$$ H=\left\{{h}_1,{h}_2,\dots, {h}_L\right\} $$
(7)
$$ \Big\{{\displaystyle \begin{array}{c}{h}_1=\left\{{S}_1,{S}_2,...,{S}_{512}\right\}\\ {}{h}_2=\left\{{S}_{513},{S}_{514},...,{S}_{1024}\right\}\\ {}\vdots \\ {}{h}_L=\left\{{S}_{\left(L-1\right)\times 512+1},{S}_{\left(L-1\right)\times 512+2},...,{S}_{L\times 512}\right\}\end{array}} $$
(8)
where L is an integer between (0, 3n/512].
For the elements in sequence C, the index sequence Index is generated according to formula (9):
$$ Index=\mathrm{map}\ \min\ \max \left(C,0,1\right) $$
(9)
where map min max(C, 0, 1) means to map the value in sequence C to interval [0, 1].
Index(i) and Index(j) are selected from matrix Index as the initial values and Index_Log1 and Index_Log2 are generated by perform Logistic transformation. And further we round up according to formula (10) to map to the integers IndexC_Log1 and IndexC_Log2 in interval [1, L].
$$ \Big\{{\displaystyle \begin{array}{c} IndexC\_ Log1=\left\lceil Index\_ Log1\times L\right\rceil \\ {} IndexC\_ Log2=\left\lceil Index\_ Log2\times L\right\rceil \end{array}} $$
(10)
Finally, the key generation is selected from key sequence S according to IndexC_Log1 and IndexC_Log2, and the key is obtained by comparing bit by bit according to formula (11), until a 512-bit complete key is obtained.
$$ Key={S}_{Index\_ Log1}\ge \left({S}_{Index\_ Log2}?1:0\right) $$
(11)
The original video is encoded with H.264/AVC and contains two types of compressed video data and residual data [30]. In order to improve the reliability of video transmission, this paper uses different keys to encrypt these two types of data. That is, for the compressed video data, the first 256 bits of the Key are used for encryption. For residual data, the last 256 bits of the Key are used for encryption.
Multi-rate video cache model
Let collection V = {1, 2, …, s, …, S} be the video collection. Each video can be encoded into M different versions of files. The definition set vs = {vsm| m = 1, 2, …, M} is represented as a variant set of the s video file. For video files, we can use bit rate and playback duration to characterize. In addition, note that for the same video, the playback duration of different variant files is the same. Therefore, video file vsm can be described by the following binary vector, namely
$$ {v}_{sm}:\left({r}_{sm},{l}_s\right) $$
(12)
where rsm and ls are the bit rate and playing time of vsm respectively.
Without loss of generality, let each variant file in vs be stored in ascending order of bit rate, that is, rs1 < rs2 < … < rsM. Besides, low bit rate files can be transcoded from high bit rate files. Let each edge server have a cache user of size C to store a copy of the video, and C is greater than the size of the video corresponding to maximum bit rate, i.e.
$$ C=\alpha {r}_{sM} $$
(13)
where α is a coefficient greater than 1.
Based on the above analysis, first it assume that the cache capacity of each edge server is limited. However, video files of any bit rate can be cached to meet the video requests of different users. However, it should be noted that although videos generally have multiple versions with different bit rates. However, considering user QoE and its own network conditions, the current mainstream commercial streaming media system usually adaptively adjusts the transmitted video files to a level that matches the current network conditions. Thus, as shown in Fig. 3, the video caching strategy in this paper is:
When a user k(=1, 2, …, K) requests video vs, if no edge server within k single-hop communication range caches a video copy of any bit rate of video vs, then k will directly use the lowest bit rate that the current network can afford. The remote server directly caches video vs. Conversely, user k will cache the highest bit rate version cached by edge servers within the single-hop communication range.
Video distribution strategy design
Under the edge server collaborative computing framework, user video requests can be obtained from a remote server or an edge server directly connected to users by a single-hop connection, and can also be obtained by other edge server transcoding operations. Figure 4 shows all possible distribution methods when a user requests a 360p version of a video file.
Combining with Fig. 4, the following 8 binary variables are introduced to characterize the feasible video distribution scheme in multi-edge collaborative computing environment:
-
1)
\( {a}_n^{sm}(t)=1 \) means that users directly obtain video vsm from the cache area of edge servers connected to it with a single hop (may be set to n, the same below); if not, \( {a}_n^{sm}(t)=0 \), as shown in Fig. 4(a);
-
2)
\( {b}_n^{sm}(t)=1 \) means that video vsm requested by users is obtained by transcoding operation of the high-bit rate version by edge server n connected to it with a single hop; if not, then \( {b}_n^{sm}(t)=0 \), as shown in Fig. 4(b);
-
3)
\( {c}_{n{n}^{\prime}}^{sm}(t)=1 \) means that video vsm requested by users is directly obtained from edge server n′(n ≠ n′); if not, then \( {c}_{n{n}^{\prime}}^{sm}(t)=0 \), as shown in Fig. 4(c);
-
4)
\( {d}_{n{n}^{\prime}}^{sm}(t)=1 \) means that video vsm requested by users is obtained by transcoding from the higher version in edge server n′(n ≠ n′); if not, then \( {d}_{n{n}^{\prime}}^{sm}(t)=0 \), as shown in Fig. 4(d);
-
5)
\( {e}_{n{n}^{\prime}}^{sm{m}^{\prime }}(t)=1 \) indicates that video vsm requested by users is first obtained by edge server n from edge server n′(n ≠ n′), and then obtained after performing a forwarding operation locally; if not, \( {e}_{n{n}^{\prime}}^{sm{m}^{\prime }}(t)=0 \), as shown in Fig. 4(e);
-
6)
\( {f}_{n{n}^{\prime}}^{sm}(t)=1 \) indicates that video vsm requested by users is first obtained by edge server n′(n ≠ n′) from edge server n with a high bit rate version. Then edge server n′(n ≠ n′) performs the forwarding operation and returns it to edge server n; if not, \( {f}_{n{n}^{\prime}}^{sm}(t)=0 \), as shown in Fig. 4(f). It should be noted that there is a working mechanism of the two-hop cooperation of edge servers in this distribution mode;
-
7)
\( {g}_{n{n}^{\prime }{n}^{{\prime\prime}}}^{sm{m}^{\prime }}(t)=1 \) indicates that video vsm requested by users is first obtained by edge server n″ from edge server n′ and then transcoded to edge server n; if not, then \( {g}_{n{n}^{\prime }{n}^{{\prime\prime}}}^{sm{m}^{\prime }}(t)=1 \), as shown in Fig. 4(g). It should be noted that in this distribution mode, there is also a working mechanism of the two-hop cooperation of edge servers;
-
8)
hsm(t) = 1 means that video vsm requested by users is obtained from a remote server; if not, hsm(t) = 0 is shown in Fig. 4(h).