## 5 Problem Statement  
The wavelength channels for actual communication are selective. QCh and PCh for the QKD process and the data channel (DCh) for data transmission are usually placed in the C-band and O-band [25; 48]. The total number of wavelengths should conform to the commercial WDM systems [34]. Additionally, the existing key generation rate only reaches the order of Mbps at the transmission distance of 50 km [49], so quantum keys in QKP are scarce resources. Therefore, it is important to allocate wavelengths and quantum keys efficiently and reasonably. To clearly illustrate the above, the six-node network topology in Figure 4 is taken as an example. Now, we consider the change in the service request success rate and resource utilization. For simplicity, the node pair (1, 2) is used as the request node pair, where \"1\" and \"2\" represent the serial numbers of the source and destination nodes, respectively. As shown in Figure 4, when only fixed parameters such as link lengths are used as link weights, the communication path selected by the Dijkstra algorithm is fixed as path 1\(\rightarrow\)2 (red arrow). The continuous arrival of requests (1, 2) will aggravate the load on link 1\(\rightarrow\)2, and may even run out of resources. Then, it is impossible to guarantee secure data transmission. Figure 3: QKP architecture based on SDN. Eventually, request (1, 2) is blocked. As shown in Figure 4b, when introducing the real-time residual wavelengths and quantum keys, the link weights dynamically change with the resource consumption of each service request. Assume that initially each link weight in Figure 4b is 1.0, and the weight of link 1\(\rightarrow\)2 becomes \(C_{12}\) at some point. If the relationship \(C_{12}>C_{13}+C_{23}=1.0+1.0=2.0\) is satisfied, the shortest path for the request (1, 2) is path 1\(\rightarrow\)3\(\rightarrow\)2. Each time the request (1, 2) arrives, the communication path is selected according to the dynamically changing link weight. Thereafter, path 1\(\rightarrow\)3\(\rightarrow\)6\(\rightarrow\)4\(\rightarrow\)2 may also be taken as the communication path. In short-distance QKDON, where network resources are limited and some links do not carry services (such as link 1\(\rightarrow\)3 and link 3\(\rightarrow\)2, mentioned above), too many free wavelength channels and quantum keys will be wasted. If communication paths are selected based on the real-time remaining number of wavelengths available for each link, and the real-time remaining number of quantum keys available in QKP, the load pressure on the link is relieved. Finally, the encryption efficiency of the QKP is improved indirectly, and even the success rate of requests is increased. Moreover, wavelength conflicts occur frequently when multiple service requests arrive simultaneously and occupy the same link, given the limited wavelength resources. Figure 5 demonstrates the potential conflicts due to multiple services sharing wavelength resources. As shown in Figure 5a, the horizontal coordinate represents the nodes and links, and the numbers on it represent the serial numbers of nodes. The colored boxes between every two numbers show the occupancy of the links and wavelength channels by different service requests and the vertical coordinate represents the service requests. Suppose three requests arrive simultaneously at a certain moment, namely requests R1: (1, 3), R2: (2, 3), and R3: (3, 4). Their communication paths are path 1\(\rightarrow\)2\(\rightarrow\)3, path 2\(\rightarrow\)3, and path 3\(\rightarrow\)2\(\rightarrow\)4, respectively. It can be seen that the three requests share the wavelength resources on the link 2\(\rightarrow\)3. Figure 5b shows the mapping of the corresponding case in Figure 5a in the adjacency matrix, where the upper and lower diagonal matrices are symmetrical, since the network topology is undirected. Figure 5c shows the wavelength channel occupancy of the shared link 2\(\rightarrow\)3, with each box representing a wavelength channel on the link.