Optical network routing and spectrum allocation algorithm based on GCN-LSTM
By using a hybrid GCN-LSTM model to predict optical network traffic and dynamically select modulation formats, the problems of low spectral efficiency and high computational complexity in traditional optical network resource scheduling are solved, achieving efficient utilization and accurate prediction of spectrum resources in optical networks.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHAOXING RES INST OF ZHEJIANG UNIV
- Filing Date
- 2025-12-30
- Publication Date
- 2026-05-12
AI Technical Summary
Existing optical network resource scheduling methods struggle to dynamically and collaboratively handle changes in network traffic, leading to bottlenecks in improving spectrum efficiency. Traditional methods suffer from resource waste and high computational complexity in spectrum allocation strategies.
A hybrid model based on GCN-LSTM is adopted, which uses graph convolutional networks to capture the spatial characteristics of network topology and long short-term memory networks to learn the temporal characteristics of traffic data, predicts future traffic and dynamically selects the optimal modulation format, and combines the K-shortest path algorithm for routing and spectrum allocation.
It improves the utilization rate and prediction accuracy of spectrum resources in optical networks, realizes intelligent resource allocation in dynamic network environments, and reduces spectrum channel occupancy.
Smart Images

Figure CN122027918A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of optical network resource allocation technology, specifically involving an optical network routing and spectrum allocation (RSA) algorithm based on GCN-LSTM (Graph Convolutional Network-Long Short-Term Memory). Background Technology
[0002] With the rapid development of mobile internet, cloud computing, and the Internet of Things, traditional optical networks are no longer sufficient to meet the demands. Elastic optical networks (OONs) have emerged as a new type of optical network technology. Through flexible spectrum allocation and variable modulation formats, they improve the bandwidth utilization and flexibility of optical networks. RSA (Responsive Optical Array) is one of the key technologies in OONs and a crucial technology for optical network resource scheduling.
[0003] RSA mainly consists of two parts: routing and spectrum allocation. The paper "Online routing and spectrum allocation in elastic optical networks based on dueling Deep Q-network" points out that routing refers to determining a feasible transmission path from the source node to the destination node while meeting service requirements; spectrum allocation refers to allocating sufficient spectrum resources to the selected path based on the specific needs of the service. Specifically, it involves establishing an optical connection between the source and destination nodes and allocating an appropriate number of contiguous, continuous, and non-overlapping frequency slots (FSs).
[0004] Among them, "contiguous" represents a continuity constraint, requiring that the frequency band allocated to a service demand must consist of consecutive FSs; "continuous" represents a continuity constraint, requiring that consecutive FSs with the same location index must be allocated on each link of the traffic demand path; and "non-overlapping" represents a non-overlapping constraint, meaning that an occupied FS cannot be allocated to another traffic demand.
[0005] Currently widely used traditional RSA methods, such as the Shortest Path with First-Fit (SFT) and Mixed Integer Linear Programming (MILP) methods, all have their shortcomings. The paper "Efficient statistical QoT-aware resource allocation in EONs over the C+L-band: a multi-period and low-margin perspective" points out that while the SFT-aware method offers advantages such as simplicity and stability, its spectrum allocation strategy often leads to low bandwidth utilization and resource waste. The paper "Nonlinear Impairment-Aware RMSA Under the Sliding Scheduled Traffic Model for EONs Based on Deep Reinforcement Learning" proposes that the MILP method can theoretically optimize resource allocation and improve utilization. However, this method has high computational complexity and poor real-time performance, making it difficult to effectively adapt to dynamically changing network environments and real-time service requests.
[0006] The main shortcoming of existing technologies lies in their inability to dynamically and collaboratively handle changes in network traffic. They are often based on fixed rules or optimize only a single link, failing to accurately predict the temporal and spatial trends of traffic changes, nor can they combine the prediction results with modulation format selection. This has become a key bottleneck restricting the improvement of spectral efficiency. This invention addresses this core problem by proposing an optical network routing and spectrum allocation algorithm based on GCN-LSTM.
[0007] Therefore, further improvements will be made to address the aforementioned issues. Summary of the Invention
[0008] The main objective of this invention is to provide an optical network routing and spectrum allocation algorithm based on GCN-LSTM, which optimizes and improves aspects such as traffic data prediction, setting of dynamic traffic thresholds, and determination of modulation formats, thereby addressing the problems of low spectrum resource utilization in traditional heuristic algorithms.
[0009] To achieve the above objectives, this invention provides an optical network routing and spectrum allocation algorithm based on GCN-LSTM, comprising the following steps: Step S1: Define the optical network environment and algorithm initialization, and build the basic framework of the traffic prediction GCN-LSTM model; Step S2: Based on historical network traffic data, use machine learning methods to predict network traffic data; Step S3: Determine the optimal modulation format in advance based on the predicted traffic results; Step S4: Make efficient RSA decisions based on the determined modulation format.
[0010] As a further preferred technical solution to the above technical solution, step S1 is specifically implemented as follows: Step S1.1: The GCN network is used to capture the spatial characteristics of the network topology. Edge information is used to aggregate node information to generate new node representations. The propagation method between layers in the network is as follows: ; in Let A be the input adjacency matrix and I be the identity matrix. yes The degree matrix is a diagonal matrix, where each diagonal element represents the number of other nodes connected to that node, calculated using the formula: This involves summing each row of the adjacency matrix A. H is the feature matrix of all nodes in the GCN network, with each row corresponding to a node. H is continuously updated as the number of network layers increases. It is a non-linear activation function. These are the trainable weights of the network; Step S1.2: Input the spatial features output by the GCN network into the LSTM network and use its gating mechanism to learn the temporal characteristics of the flow data. The LSTM gating mechanism includes a forget gate, an input gate, an update gate, and an output gate. The forget gate receives the state information h(t-1) from the previous neuron and the newly input information x(t), processes all the information using the sigmoid function, and obtains f(t) which is input to the cell state c(t). f(t) is between 0 and 1, with the closer to 0 representing more forgetting and the closer to 1 representing more remembering. The input gate performs calculations on h(t-1) and x(t) using the sigmoid and tanh functions respectively to determine the data that needs to be updated. The update gate performs matrix multiplication and matrix addition to input the data to be forgotten and the data to be updated into the cell state c(t) to update the cell state. The output gate updates the cell state c(t) using the tanh function to obtain new information h(t) and outputs it to the next LSTM neuron. Step S1.3: Define the mapping rules between traffic thresholds and modulation formats, preset multiple traffic threshold intervals, clarify the candidate modulation formats corresponding to each interval, and define the constraints that the mapping rules need to consider, including transmission distance, signal quality requirements and spectral efficiency, so as to provide a rule basis for subsequent modulation format selection, thereby completing the basic framework of the GCN-LSTM model.
[0011] As a further preferred technical solution to the above technical solution, for step S2: The GCN-LSTM model is used as input. The connection relationship of nodes in the network and historical traffic data are input. The temporal and spatial characteristics of the traffic data in the network are captured by dual feature extraction, and the network traffic data is predicted.
[0012] As a further preferred technical solution to the above technical solution, for step S3: Based on the predicted network traffic data, multiple traffic threshold ranges are set, and the mapping rules between the traffic threshold ranges and modulation formats defined in step S1.3 are matched. When the predicted traffic is in a lower range, a higher-order modulation format is selected to improve spectral efficiency; when the predicted traffic is in a higher range, a lower-order modulation format is selected to ensure transmission quality. Taking into account the constraints of transmission distance, signal quality requirements, and spectral efficiency, the optimal scheme is determined from the matched candidate modulation formats; Calculate the number of spectral slots required to establish an optical connection based on the selected modulation format; The routing selection uses the K-shortest path algorithm to generate a set of candidate paths, and then performs spectrum allocation on the candidate paths.
[0013] As a further preferred technical solution to the above technical solution, for step S4: The GCN-LSTM model was trained using historical traffic data and network topology data. For each new optical path request, the trained GCN-LSTM model is called to obtain traffic prediction data. Based on the modulation format and spectrum slot quantity requirements determined in step S3, spectrum allocation is performed on the candidate path set. The first-fit spectrum allocation method is adopted, starting from the lowest index of the spectrum resource and searching sequentially to find the first continuous free spectrum block that meets the constraints of continuity, consistency and non-overlap, and then allocating it to the current service request. After completing path and spectrum allocation, the network status is updated in a timely manner. During the training and decision-making process, the prediction results, spectrum channel occupancy rate, and selection ratio of different modulation formats for each node are recorded. By dynamically adjusting the modulation format selection, the spectrum channel occupancy rate in the optical network is reduced, and the resource utilization rate is continuously improved.
[0014] In summary, the present invention has the following technical effects: (1) In the complex routing and spectrum allocation problem of optical networks, this invention improves the problem of low spectrum resource utilization in traditional heuristic algorithms applied to routing and spectrum allocation (RSA), and provides a more reliable and accurate traffic prediction basis for routing and spectrum allocation of optical networks.
[0015] (2) This invention utilizes the learning capability of the GCN-LSTM hybrid model to simultaneously capture the spatial correlation and temporal dependence of network traffic through spatial and temporal feature extraction mechanisms. In the spatial dimension, it aggregates the topological relationships between nodes using graph convolutional networks, and in the temporal dimension, it learns the dynamic laws of traffic changes through the gating mechanism of LSTM, thus establishing a more accurate traffic prediction model.
[0016] (3) This invention deeply integrates the GCN-LSTM hybrid model with the routing spectrum allocation algorithm, comprehensively optimizing feature extraction, model fusion, and prediction accuracy. This not only improves the accuracy of traffic prediction but also adaptively selects the optimal modulation format based on the prediction results, thereby achieving more intelligent resource allocation in dynamically changing network environments. Future research will focus on combining the model with other RSA algorithms and improving model prediction accuracy, further enhancing the algorithm's applicability in real-world network environments. The scope of protection for the algorithm model and resource allocation method provided by this invention also includes various derivative algorithms formed by combining this invention with other RSA algorithms in the future. Attached Figure Description
[0017] Figure 1 This is a flowchart based on the GCN-LSTM algorithm combined with routing and spectrum allocation; Figure 2 This is a schematic diagram of the GCN-LSTM algorithm combined with RSA; Figure 3 This is a flowchart of the GCN-LSTM algorithm combined with RSA; Figure 4 It is a graph of the loss function during model training; Figure 5 It is a comparison chart of predicted data and actual data for a certain node in the network; Figure 6 This is a comparison chart of the spectrum channel occupancy rates between the traditional method and the algorithm of this invention; Figure 7 This is a comparison chart of network spectrum channel occupancy rates between the traditional algorithm and the algorithm of this invention; Figure 8 This is a ratio diagram of two methods, the traditional algorithm and the algorithm of this invention, using different modulation formats. Detailed Implementation
[0018] The following description is intended to disclose the present invention and enable those skilled in the art to implement it. The preferred embodiments described below are merely examples, and other obvious variations will occur to those skilled in the art. The basic principles of the invention defined in the following description can be applied to other embodiments, modifications, improvements, equivalents, and other technical solutions that do not depart from the spirit and scope of the invention.
[0019] In the preferred embodiments of the present invention, those skilled in the art should note that GCN, LSTM, etc. involved in the present invention can be regarded as prior art.
[0020] Preferred embodiment.
[0021] The quality of optical network routing and spectrum allocation (RSA) decisions directly impacts the efficiency of network bandwidth resource utilization. To achieve more refined resource management, dynamically changing network traffic factors can be incorporated into RSA considerations. Currently, some research has attempted to introduce traffic awareness into RSA. The paper "Efficient statistical QoT-aware resource allocation in EONs over the C+L-band: a multi-period and low-margin perspective" employs an iterative modulation format selection method based on a signal-to-noise ratio (SNR) threshold. This method first calculates the minimum SNR threshold required for different modulation formats (such as BPSK and M-QAM) based on the target bit error rate (BER). The specific calculation formula is as follows: ; ; The algorithm then tries candidate paths starting with the highest-order modulation format, calculating its actual SNR and comparing it with the corresponding threshold. If the condition is not met, the modulation format is progressively lowered and retried until the highest-order format that meets the conditions is found or the path is deemed unusable. Although this method can adaptively select the modulation format based on channel conditions, its iterative "trial and error" process increases computational overhead and may lead to decision delays in dynamic network environments.
[0022] The machine learning-assisted method proposed in the paper "Machine-learning-based impairment-aware dynamic RMSCA in multi-core elastic optical networks" focuses on using machine learning models to optimize a single task in RSA, such as using the model for path selection or traffic prediction. Although this method can improve the computational efficiency of a single task, it lacks systematic integration and collaborative optimization of traffic prediction, modulation format decision and RSA allocation process, and fails to form an overall solution, thus making it difficult to maximize global resource efficiency.
[0023] This invention proposes a collaborative optimization method for RSA based on traffic data prediction. First, a machine learning model is used to predict network traffic data. Second, the optimal modulation format is pre-determined for optical path requests based on the predicted traffic. Finally, RSA decisions are executed based on the known modulation format requirements. To achieve traffic data prediction, this invention employs a hybrid model combining Graph Convolutional Networks (GCN) and Long Short-Term Memory Networks (LSTM). The GCN module is dedicated to capturing the spatial dependencies between nodes in the network topology, learning the spatial distribution characteristics of traffic by aggregating neighbor node information. The LSTM module learns the complex temporal dynamics and long-term evolution patterns in the traffic data. Working together, the two modules extract spatiotemporal features from historical data, thereby achieving accurate and robust prediction of future network traffic and providing a reliable data foundation for subsequent intelligent RSA decisions.
[0024] like Figure 1-8 As shown, this invention provides an optical network routing and spectrum allocation algorithm based on GCN-LSTM. See [link to relevant documentation]. Figure 2 It mainly includes the following main parts: 1. Definition of optical network environment, including the spatial characteristics of network topology and the temporal characteristics reflected by traffic data that changes over time. In the figure, No.0:8->3 indicates that the optical path request is to establish an optical path from node 8 to node 3.
[0025] 2. The GCN and LSTM collaborative prediction model: The GCN network simultaneously receives network topology and node traffic data, and generates spatial features that integrate network connectivity through graph convolution operations; the LSTM network receives the time series composed of the spatial features output by GCN, learns its time dependence, and then combines the two to achieve accurate prediction of future traffic.
[0026] 3. Modulation format selection and execution RSA decision based on traffic prediction: Based on the predicted traffic volume, the applicable modulation format is determined by setting a threshold, thereby providing a decision basis for subsequent routing and spectrum allocation, realizing a closed-loop intelligent decision-making process from traffic prediction to optical network resource scheduling.
[0027] The specific principle and process are as follows: First, historical network traffic data and network topology are input; the GCN network extracts the spatial features of the network based on the connection relationships between nodes, capturing the dependencies between connections in the topology; the LSTM network receives traffic sequences containing a time dimension and learns the patterns between them and time. Both work together to output accurate predictions of future traffic; then, based on the predicted traffic volume, the optimal modulation format is determined through a preset threshold; finally, efficient routing and spectrum allocation decisions are made based on the selected modulation format.
[0028] Includes the following steps: Step S1: Define the optical network environment and algorithm initialization, and build the basic framework of the traffic prediction GCN-LSTM model; Step S1 is specifically implemented as follows: Step S1.1: The GCN network is used to capture the spatial characteristics of the network topology. Edge information is used to aggregate node information to generate new node representations. The propagation method between layers in the network is as follows: ; in Let A be the input adjacency matrix and I be the identity matrix. yes The degree matrix is a diagonal matrix, where each diagonal element represents the number of other nodes connected to that node, calculated using the formula: That is, summing each row of the adjacency matrix A. H is the feature matrix of all nodes in the GCN network. Each row corresponds to a node. As the number of network layers increases, H is continuously updated (each layer will integrate more information from its neighboring nodes into the node features, which is the feature of each layer). It is a non-linear activation function. These are the trainable weights of the network; Step S1.2: Input the spatial features output by the GCN network into the LSTM network, and use its gating mechanism to learn the temporal characteristics of the flow data. The LSTM gating mechanism includes a forget gate, an input gate, an update gate, and an output gate. The forget gate receives the state information h(t-1) from the previous neuron and the newly input information x(t), processes all the information through the sigmoid function, and obtains f(t) as the input cell state c(t). f(t) is between 0 and 1. The closer it is to 0, the more it is forgotten; the closer it is to 1, the more it is remembered. The calculation formula can be expressed as: .; The input gate functions by applying the sigmoid and tanh functions to h(t-1) and x(t) respectively, determining the data that needs to be updated. The calculation formula is as follows: ; ; The update gate functions by passing the data to be forgotten and the data to be updated into the cell state c(t) through matrix multiplication and matrix addition, thus updating the cell state. The calculation formula is expressed as follows: ; The function of the output gate is to update the cell state c(t) using the tanh function to obtain new information h(t), and then output it to the next LSTM neuron. The calculation formula is expressed as: ; ; in, These are the weight matrices for the forget gate, input gate, candidate cell state, and output gate, respectively. These are the bias terms for the forget gate, input gate, candidate cell state, and output gate, respectively. This represents the cell state at the previous time step. The sigmoid function maps the input to the interval (0,1), while the hyperbolic tangent function maps the input to the interval (-1,1).
[0029] Step S1.3: Define the mapping rules between traffic thresholds and modulation formats, preset multiple traffic threshold intervals, clarify the candidate modulation formats corresponding to each interval, and define the constraints that the mapping rules need to consider, including transmission distance, signal quality requirements and spectral efficiency, so as to provide a rule basis for subsequent modulation format selection, thereby completing the basic framework of the GCN-LSTM model.
[0030] In step S1: A: The preparation of optical network environment and traffic data mainly includes defining the network topology and historical traffic data. The network topology is represented by an adjacency matrix, storing the network connection status within the matrix `adjacency_matrix`. The matrix dimension is the number of network nodes multiplied by the number of network nodes. Each row of the matrix represents the connection status from a given node to other nodes, represented by a 0-1 matrix, where 1 indicates a connection and 0 indicates no connection.
[0031] Simultaneously, a traffic matrix `traffic_data` is defined to store the spatiotemporal traffic data of the network. The matrix dimension is the number of time steps × the number of network nodes. Each row of the matrix represents the traffic data of all nodes at a given time step, and each column represents the traffic sequence of a given node across all time steps. Continuous monitoring data is used, with each 5-minute interval serving as one time step, to ensure the continuity of the time series.
[0032] B: The initialization and training of the GCN-LSTM model mainly includes defining model parameters, data preprocessing, and training. First, define the parameters required for the GCN-LSTM model, including the number of network nodes, time step length, GCN hidden layer dimension, LSTM hidden layer size, number of training epochs, batch size, etc.
[0033] Then, data preprocessing is performed: the raw traffic data is divided into training and testing sets in chronological order, with a ratio of 8:2. A sliding window mechanism can be set up to input historical data for 10 consecutive time steps and predict the traffic data for the next time step, or to input a fixed length of historical data to predict multiple consecutive future steps. Simultaneously, the data is normalized to ensure training stability.
[0034] Next, the GCN-LSTM model structure is initialized: a GCN module is constructed to extract spatial topological features between nodes, and neighbor node information is aggregated through graph convolutional layers; an LSTM module is constructed to learn the temporal dynamic features of traffic data, and long-term dependencies are captured through a gating mechanism. The two modules work together through a feature fusion layer.
[0035] Finally, the training environment was configured: the MSE loss function was set to measure prediction error, the Adam optimizer was used to dynamically adjust the learning rate, and the number of training epochs was set to 1000. During training, each batch of data was input into the model, forward propagation was used to calculate the predicted value, back propagation was used to update the model parameters, and the optimal model parameters were saved.
[0036] C: The RSA decision framework based on traffic prediction includes three stages: traffic prediction, modulation format selection, and resource allocation. First, a trained GCN-LSTM model is used to predict future traffic. The current network state and the traffic data at the most recent time step are input, and the predicted traffic values for each node at the next future time step are output.
[0037] Then, the modulation format is determined based on the predicted traffic value: modulation format thresholds corresponding to different traffic ranges are pre-set, and the predicted traffic is mapped to the corresponding modulation format level. Different modulation formats correspond to different spectral efficiencies and transmission distances, providing constraints for subsequent path selection.
[0038] Finally, an RSA decision is made: based on the determined modulation format and predicted traffic demand, the available spectrum resources of each path in the candidate path set are evaluated. Taking into account path length, spectrum continuity, and modulation format compatibility, the optimal path and spectrum allocation scheme are selected to achieve efficient utilization of network resources.
[0039] Step S2: Based on historical network traffic data, use machine learning methods to predict network traffic data; For step S2: The GCN-LSTM model is used, taking the connection relationships of nodes in the network (in the form of an adjacency matrix) and historical traffic data as input. It then uses dual feature extraction to collaboratively capture the temporal and spatial characteristics of the network traffic data, predicting the network traffic data. The specific implementation is as follows: A: First, define the functions needed for traffic prediction and modulation format decision-making, including: The data loading function is used to read the network topology file to generate an adjacency matrix and to read the historical traffic data file to generate a time series matrix. The data preprocessing function normalizes the raw traffic data in chronological order and divides it into training and test sets according to a set ratio. Graph Convolutional Network (GCN) functions, based on the input adjacency matrix and node features, aggregate neighbor node information through graph convolutional layers to extract network spatial topological features; The Long Short-Term Memory (LSTM) network function receives the spatial feature sequence output by the GCN and uses its gating mechanism to learn the temporal dynamic characteristics of the traffic data; the model training function configures the MSE loss function and the Adam optimizer, trains the model for a set number of rounds, and saves the best model parameters. In addition, there is a traffic prediction function, which loads a pre-trained GCN-LSTM model, takes the current network state and historical traffic data from the most recent time step as input, and outputs the predicted traffic values for each node in the future time step; a modulation format decision function, which converts the predicted traffic values into the corresponding modulation format level according to a preset traffic threshold mapping table; and a path feasibility assessment function, which calculates the number of spectrum slots required for the path based on the determined modulation format and path length, and verifies whether the available spectrum resources of each link on the path meet the continuity and continuity constraints.
[0040] B: Then, the network status and historical traffic are received, and future traffic is predicted using the GCN-LSTM model. In step S1.2, the final spatiotemporal features have been mapped through a fully connected layer, allowing the output of predicted traffic values for each node at future time steps in step S2. The model is then trained using the training set data, and the network weights are updated through backpropagation. The trained model is then saved. Specifically: The GCN module receives network topology information represented by the adjacency matrix, aggregates the features of nodes and their neighbors through graph convolution operations, and extracts the spatial correlation of network traffic. The LSTM module receives the spatial feature sequence output by GCN, and uses its gating mechanism to learn the dynamic laws of traffic data changes over time, including long-term dependencies and temporal fluctuations. The two modules work together to continuously optimize model parameters through the backpropagation algorithm, and finally output accurate network traffic prediction data, providing data support for subsequent modulation format selection.
[0041] Step S3: Determine the optimal modulation format in advance based on the predicted traffic results; For step S3: Based on the predicted network traffic data, multiple traffic threshold ranges are set, and the mapping rules (mapping table) between the traffic threshold ranges and modulation formats defined in step S1.3 are matched. When the predicted traffic is in a lower range, a higher-order modulation format is selected to improve spectral efficiency; when the predicted traffic is in a higher range, a lower-order modulation format is selected to ensure transmission quality. Taking into account the constraints of transmission distance, signal quality requirements, and spectral efficiency, the optimal scheme is determined from the matched candidate modulation formats; Calculate the number of spectral slots required to establish an optical connection based on the selected modulation format; The routing selection uses the K-shortest path algorithm to generate a set of candidate paths, and then performs spectrum allocation on the candidate paths.
[0042] Step S3 completes the modulation format determination and RSA pre-decision.
[0043] For step S3: Based on the traffic data of each node predicted by the model, and combined with the preset modulation format traffic threshold mapping table, select the modulation format that meets the transmission quality requirements and has the highest spectral efficiency; then, based on the selected modulation format, determine the number of continuous spectrum slots required to establish the optical connection. This includes, but is not limited to: using 64QAM modulation format when the predicted traffic value is ≤20, occupying 2 spectrum blocks; using 16QAM modulation format when the predicted traffic value is ≤40, occupying 3 spectrum blocks; using 8QAM modulation format when the predicted traffic value is ≤60, occupying 4 spectrum blocks; and using QPSK modulation format when the predicted traffic value is ≤80, occupying 6 spectrum blocks, etc.
[0044] Step S4: Make efficient RSA decisions based on the determined modulation format.
[0045] For step S4: The GCN-LSTM model is trained using historical traffic data and network topology data. The MSE loss function is configured to measure the prediction error. The Adam optimizer is used to dynamically adjust the learning rate. The model parameters are optimized through multiple rounds of training to ensure the accuracy of traffic prediction. For each new optical path request, the trained GCN-LSTM model is called to obtain traffic prediction data. Based on the modulation format and spectrum slot quantity requirements determined in step S3, spectrum allocation is performed on the candidate path set. The first-fit spectrum allocation method is adopted, starting from the lowest index of the spectrum resource and searching sequentially to find the first continuous free spectrum block that meets the constraints of continuity, consistency and non-overlap, and then allocating it to the current service request. After completing path and spectrum allocation, the network status (including spectrum resource occupancy, node traffic load, etc.) is updated in a timely manner. During the training and decision-making process, the prediction results, spectrum channel occupancy rate and the proportion of different modulation formats selected for each node are recorded. By dynamically adjusting the modulation format selection, the spectrum channel occupancy rate in the optical network is reduced, and the resource utilization rate is continuously improved.
[0046] During the RSA decision-making phase, when a new network request arrives, the trained GCN-LSTM model is invoked, inputting recent historical traffic data to obtain traffic predictions for each node over a future period. Based on the predicted traffic values, a preset traffic-modulation format mapping threshold table is consulted to determine the appropriate modulation format level (e.g., BPSK, QPSK, 8QAM, 16QAM, etc.) and the number of spectrum slots required to meet the demand. Furthermore, the candidate path set is searched for paths and spectrum blocks that satisfy the constraints of spectrum continuity, contiguousness, and non-overlapping. Finally, the paths and spectrum locations that meet the conditions are selected for allocation, completing the optical path establishment and updating the network spectrum resource status.
[0047] For step S4, based on the source and destination nodes required by the optical path request, the K-shortest path algorithm is used to traverse the network topology, generating K candidate paths and forming a candidate path set. Subsequently, on each candidate path, spectrum allocation is performed according to the calculated number of consecutive spectrum slots required. The spectrum allocation adopts the first-fit method, that is, starting from the lowest index of the spectrum resource, sequentially searching to find the first consecutive free spectrum block that satisfies the constraints of continuity, continuity, and non-overlap, and allocating it to the current service request.
[0048] See Figure 4 The graph shows the change in the loss function of the GCN-LSTM model during training. The model is trained on historical traffic data across 207 nodes and 1076 time steps, using the first 788 time steps as input to predict traffic for the next 288 time steps. Training is performed for 1000 epochs, using MSE as the loss function and employing the Adam optimizer for parameter updates. The graph shows that as the number of training epochs increases, the MSE value continuously decreases and eventually converges to below 0.0045, indicating that the model is effectively optimized and possesses good learning capabilities.
[0049] See Figure 5The figure compares the traffic of a randomly selected node in the network during the prediction period. It compares the actual observed traffic values of this node over 288 consecutive time steps (with a time resolution of 5 minutes) with the predicted traffic values from the GCN-LSTM model. The two curves show a high degree of consistency throughout the time range, with the predicted values closely following the fluctuations of the actual values. This intuitively verifies the accuracy and reliability of the model in capturing the spatiotemporal variation patterns of node traffic.
[0050] See Figure 6 This paper presents a comparison between the algorithm of this invention and traditional methods in terms of overall network spectrum channel occupancy. Traditional methods, due to their use of high fixed traffic thresholds, can only use low-order modulation formats (such as QPSK) during routing and spectrum allocation, thus maintaining a relatively stable spectrum channel occupancy throughout the observation period. In contrast, the algorithm of this invention, based on traffic prediction and dynamic threshold adjustment, can flexibly select higher-order modulation formats according to the actual load, thereby significantly reducing the overall spectrum channel occupancy.
[0051] See Figure 7 Furthermore, the differences between the two methods in terms of average network spectrum channel occupancy were compared. Statistical results show that the RSA method based on traffic prediction proposed in this invention reduces the average spectrum channel occupancy by approximately 17.2% compared to the traditional method, verifying the effectiveness of the proposed method in improving spectrum resource utilization efficiency.
[0052] See Figure 8 The paper presents the proportional distribution of different modulation formats used by the two algorithms in actual scheduling. Traditional methods, due to threshold constraints, focus entirely on the QPSK format; while the algorithm of this invention achieves dynamic selection of modulation format through traffic prediction. In actual scheduling, it not only uses QPSK, but also reasonably introduces higher-order modulation formats such as 8QAM, 16QAM and 64QAM, thereby significantly improving the utilization efficiency of spectrum resources while ensuring transmission quality.
[0053] It is worth mentioning that the technical features such as GCN and LSTM involved in this patent application should be regarded as prior art. The specific structure, working principle and possible control methods and spatial arrangement of these technical features can be adopted using conventional choices in the field, and should not be regarded as the inventive point of this patent. This patent will not be further elaborated in detail.
[0054] For those skilled in the art, modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this invention should be included within the protection scope of this invention.
Claims
1. A routing and spectrum allocation algorithm for optical networks based on GCN-LSTM, characterized in that, Includes the following steps: Step S1: Define the optical network environment and algorithm initialization, and build the basic framework of the traffic prediction GCN-LSTM model; Step S2: Based on historical network traffic data, use machine learning methods to predict network traffic data; Step S3: Determine the optimal modulation format in advance based on the predicted traffic results; Step S4: Make efficient RSA decisions based on the determined modulation format.
2. The optical network routing and spectrum allocation algorithm based on GCN-LSTM according to claim 1, characterized in that, Step S1 is specifically implemented as follows: Step S1.1: The GCN network is used to capture the spatial characteristics of the network topology. Edge information is used to aggregate node information to generate new node representations. The propagation method between layers in the network is as follows: ; in Let A be the input adjacency matrix and I be the identity matrix. yes The degree matrix is a diagonal matrix, where each diagonal element represents the number of other nodes connected to that node, calculated using the following formula: This involves summing each row of the adjacency matrix A. H is the feature matrix of all nodes in the GCN network, with each row corresponding to a node. H is continuously updated as the number of network layers increases. It is a non-linear activation function. These are the trainable weights of the network; Step S1.2: Input the spatial features output by the GCN network into the LSTM network and use its gating mechanism to learn the temporal characteristics of the flow data. The LSTM gating mechanism includes a forget gate, an input gate, an update gate, and an output gate. The forget gate receives the state information h(t-1) from the previous neuron and the newly input information x(t), processes all the information using the sigmoid function, and obtains f(t) which is input to the cell state c(t). f(t) is between 0 and 1, with the closer to 0 representing more forgetting and the closer to 1 representing more remembering. The input gate performs calculations on h(t-1) and x(t) using the sigmoid and tanh functions respectively to determine the data that needs to be updated. The update gate performs matrix multiplication and matrix addition to input the data to be forgotten and the data to be updated into the cell state c(t) to update the cell state. The output gate updates the cell state c(t) using the tanh function to obtain new information h(t) and outputs it to the next LSTM neuron. Step S1.3: Define the mapping rules between traffic thresholds and modulation formats, preset multiple traffic threshold intervals, clarify the candidate modulation formats corresponding to each interval, and define the constraints that the mapping rules need to consider, including transmission distance, signal quality requirements and spectral efficiency, so as to provide a rule basis for subsequent modulation format selection, thereby completing the basic framework of the GCN-LSTM model.
3. The optical network routing and spectrum allocation algorithm based on GCN-LSTM according to claim 2, characterized in that, For step S2: The GCN-LSTM model is used as input. The connection relationship of nodes in the network and historical traffic data are input. The temporal and spatial characteristics of the traffic data in the network are captured by dual feature extraction, and the network traffic data is predicted.
4. The optical network routing and spectrum allocation algorithm based on GCN-LSTM according to claim 3, characterized in that, For step S3: Based on the predicted network traffic data, multiple traffic threshold ranges are set, and the mapping rules between the traffic threshold ranges and modulation formats defined in step S1.3 are matched. When the predicted traffic is in a lower range, a higher-order modulation format is selected to improve spectral efficiency; when the predicted traffic is in a higher range, a lower-order modulation format is selected to ensure transmission quality. Taking into account the constraints of transmission distance, signal quality requirements, and spectral efficiency, the optimal scheme is determined from the matched candidate modulation formats; Calculate the number of spectral slots required to establish an optical connection based on the selected modulation format; The routing selection uses the K-shortest path algorithm to generate a set of candidate paths, and then performs spectrum allocation on the candidate paths.
5. The optical network routing and spectrum allocation algorithm based on GCN-LSTM according to claim 4, characterized in that, For step S4: The GCN-LSTM model was trained using historical traffic data and network topology data. For each new optical path request, the trained GCN-LSTM model is called to obtain traffic prediction data. Based on the modulation format and spectrum slot quantity requirements determined in step S3, spectrum allocation is performed on the candidate path set. The first-fit spectrum allocation method is adopted, starting from the lowest index of the spectrum resource and searching sequentially to find the first continuous free spectrum block that meets the constraints of continuity, consistency and non-overlap, and then allocating it to the current service request. After completing path and spectrum allocation, the network status is updated in a timely manner. During the training and decision-making process, the prediction results, spectrum channel occupancy rate, and selection ratio of different modulation formats for each node are recorded. By dynamically adjusting the modulation format selection, the spectrum channel occupancy rate in the optical network is reduced, and resource utilization is continuously improved.