## 3 Network Model
### CPSR-HQ KDN Routing Scheme  
Addressing the issues related to key management and routing in existing QKD networks, this paper proposes a Classified Packet Security Requirement-based QKD Network Routing scheme (CPSR-HQKDN). Considering the scenario where a large volume of packets with diverse security requirements arrive at backbone nodes within a short timeframe, CPSR-HQKDN adjusts the processing order of packets based on the included security requirement level information in the requests. This enables the fulfillment of a maximum number of key usage demands within the limited resources of the QKD network. Furthermore, CPSR-HQKDN grants a higher priority for retry attempts to packets that are prepared for discard due to timeout, aiming to enhance the overall service quality of the routing scheme. Due to the classification based on the security requirements carried in the packet requests, the CPSR-HQKDN solution is capable of handling high-concurrency data transmission scenarios and significant gaps in packet security requirements compared to previous solutions. This section provides a detailed description of the packet security requirement classification, the processing queue flow structure, and the routing scheme. Table 1 presents the symbols used along with their meanings. It is important to note that the security requirement of a packet is not established by the packet itself, but rather assessed and defined by the routing based on the information carried in the request. \begin{table}
\begin{tabular}{l l} \hline \hline
**Symbols** & **Meanings** \\ \hline  & Security requirement level for data packets, where N represents no use of QKD \\ \(\mathbf{p}_{sd}\) & technology encryption, L represents the key generated using the BB84 protocol, and \\  & H represents the key generated using the MDI-QKD protocol. \\ T & Lifetime of the network topology \\ t & A single time slot, where \(t\in T\) \\ \(\mathbf{t}_{last}\) & The previous time slot, where \(t_{last}\in T\) \\ \(\mathbf{p}_{kd}\) & Key requirement for a single data packet \\ L & Set of all linkages in the network topology \\ \(\mathbf{l}_{t}\) & Trusted relay link, where \(l_{t}\in L\) \\ \(\mathbf{l}_{nt}\) & Untrusted relay link, where \(l_{ut}\in L\) \\ \(\mathbf{l}_{s}\) & Current status of the link \\ N & Set of all nodes \\ \(\mathbf{n}_{ut}\) & Untrusted relay node, where \(n_{ut}\in N\) \\ \(\mathbf{n}_{t}\) & Trusted relay node, where \(n_{t}\in N\) \\ \(\mathbf{n}_{back}\) & Backbone node, where \(n_{back}\in N\) \\ \(\mathbf{Q}_{n}\) & Length of the queue of data packets awaiting encryption at node n \\ \(\mathbf{k}_{t1}\) & Remaining key amount for the current link \\ \(kg_{1}\) & Key update rate for the current link \\ TD & Transmission delay for data packet transmission \\ \(\mathbf{p}_{n}\) & Number of nodes a data packet goes through \\ \(S(\mathbf{n})\) & Amount of data packets waiting for forwarding at the current node \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Symbols and their meanings. In the actual usage of quantum network packet transmission, the importance of key requests and specific encryption requirements varies. Purely employing key-based shortest path strategies or first-come-first-serve methods cannot provide sufficient service quality and high network resource utilization. In such scenarios, the CPSR-HQKDN scheme categorizes the packets to be forwarded based on the security requirement information included in the request headers sent by the application layer to the controller. Then, different routing schemes are determined for each category of packets. First, a routing algorithm based on a transmission delay is employed for category N packets that do not require quantum key usage. It should be noted that in the QKD technology embedding scheme, the key preparation devices of the BB84 protocol and MDI-QKD protocol are added to the traditional SDN optical network. Therefore, when packets do not require QKD technology, they can also be forwarded using the traditional SDN optical network.