## 3 Efficient Network AOS Comprehensive Multiplexing Algorithm
### Asynchronous Real-Time Traffic  
#### 3.2.1 Frame Generation Algorithm  
In the packet multiplexing layer, an adaptive frame generation algorithm based on traffic prediction is proposed. Assuming that there are \(N_{s}\) virtual channels for asynchronous real-time traffic, the frame generation algorithm for any virtual channel \(j\) (where \(j\) = 0, 1, 2...\(N_{s}-\)1) can be expressed as follows:  
\[F_{s,j}=\left\{\begin{array}{ll}1,&v_{s,j}>V\cdot\eta_{s}(r)\text{ or }\Delta t_{s,j}\geq T_{s,wj}\\ 0,&v_{s,j}<V\cdot\eta_{s}(r)\text{ and }\Delta t_{s,j}<T_{s,wj}\end{array}\right. \tag{3}\]  
In the equation, \(F_{s,j}\) represents whether a frame is generated for the \(j\)-th VC at the current moment. A value of 1 indicates that a frame is generated, while 0 indicates that no frame is generated. \(v_{s,j}\) is the amount of data currently in the buffer at the current moment, \(\eta_{s}(r)\) is the transmission efficiency, \(\Delta t_{s,j}\) is the time interval between the current moment and the last framing moment for the \(j\)-th VC, and \(T_{s,wj}\) is the frame generation period threshold.  
For \(\eta_{s}(r)\), traditional adaptive frame generation algorithms typically set it to 1, meaning that frames are only generated when the transmission frame data area is filled with data and are then scheduled for subsequent transmission. However, this approach does not efficiently utilize channel capacity when the channel load is light. In this paper, the traffic size is predicted to estimate the available channel capacity within the scheduling period. When there is spare channel capacity, the efficiency of the frame generation algorithm is reduced to reduce data transmission delay.  
Assuming at the scheduling moment \(\left(r,0\right)_{sche}\) that the remaining data quantity for the \(j\)-th virtual channel is \(q_{s\_j}(r)\), the predicted traffic for the next scheduling cycle is \(p_{s\_j}(r)\), and the total scheduling capacity of the scheduling algorithm for each scheduling cycle is \(M_{s}=KV\), where \(K\) represents the number of scheduling slots in a scheduling cycle, \(V\) represents the total amount of data transmitted in one transmission frame time slot, which are defined in the multiplexing model parameters presented in Section 2. Then, at the scheduling moment \(\left(r,0\right)_{sche}\) the total amount of data \(M_{\mathrm{w}}(r)\) that needs to be scheduled for the next scheduling cycle is as follows:  
\[M_{\mathrm{w}}(r)=\sum_{j=0}^{N_{\mathrm{s}}-1}\left(q_{s\_j}(r)+p_{s\_j}(r)\right) \tag{4}\]  
In each scheduling cycle, the frame generation efficiency parameter adjustment algorithm for the virtual channel is as follows:  
\[\eta_{s}(r)=\left\{\begin{array}{c}1,\quad M_{s}\leq M_{w}(r)\\ \\ \frac{M_{\mathrm{w}}(r)}{M_{\mathrm{s}}},\quad M_{\mathrm{s}}>M_{w}(r),\frac{ M_{\mathrm{w}}(r)}{M_{\mathrm{s}}}>\eta_{s\_min}\\ \\ \eta_{s\_min},\quad M_{\mathrm{s}}>M_{w}(r),\frac{M_{\mathrm{w}}(r)}{M_{ \mathrm{s}}}\leq\eta_{s\_min}\end{array}\right. \tag{5}\]  
in which \(\eta_{s\_min}\) is the minimum frame generation efficiency constraint for the user on the virtual channel. According to the above formula, at each \(\left(r,0\right)_{sche}\) scheduling moment, the parameter \(\eta_{s}(r)\) is adjusted based on traffic prediction.