Spectrum allocation method based on byte coding and regular ordering

The spectrum allocation method using byte encoding and regular expression sorting optimizes the spectrum resource allocation process, solves the problems of low efficiency and low utilization in traditional technologies, and achieves fast and effective spectrum resource management.

CN120075125BActive Publication Date: 2026-05-01YANGTZE DELTA REGION INST (QUZHOU) UNIV OF ELECTRONIC SCI & TECH OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
YANGTZE DELTA REGION INST (QUZHOU) UNIV OF ELECTRONIC SCI & TECH OF CHINA
Filing Date
2025-02-28
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

Traditional wavelength division multiplexing (WDM) technology cannot flexibly cope with dynamically changing network load and service requests in spectrum resource management and scheduling. Existing spectrum allocation algorithms suffer from low efficiency, high computational complexity, or low resource utilization.

Method used

A spectrum allocation method based on byte encoding and regular expression sorting is adopted. By encoding the spectrum resources of the link in binary form, regular expression matching and sorting are used to optimize the spectrum resource allocation process, select the optimal path and allocate spectrum blocks.

Benefits of technology

It improves the rate and efficiency of spectrum allocation, reduces computation time, maintains spectrum utilization, and adapts to the needs of dynamic networks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120075125B_ABST
    Figure CN120075125B_ABST
Patent Text Reader

Abstract

The application discloses a spectrum allocation method based on byte coding and regular sorting, which is mainly used for efficient spectrum resource allocation in the field of optical communication, and can realize fast and accurate spectrum resource allocation under the condition of known service request transmission path. The method calculates K possible transmission paths after the service request arrives. Usually, the sorting basis of the paths is the length of the path or the number of hops of the path, and the path with the shortest length or the least number of hops is preferentially selected as the main working path for service transmission. Secondly, spectrum resource allocation is carried out according to the selected working path, the spectrum resources of each link in the path are pre-integrated and binary coded to obtain the spectrum usage of the whole path, then the integrated spectrum resources are sorted and screened to obtain the spectrum block suitable for the current service request, and finally spectrum allocation is carried out according to the required spectrum size of the service request.
Need to check novelty before this filing date? Find Prior Art

Description

Spectrum Allocation Method Based on Byte Encoding and Regular Sorting Technical Field

[0001] This invention belongs to the field of optical communication technology in wireless sensor networks, and specifically relates to a spectrum allocation technology. Background Technology

[0002] With the rapid development of technologies such as the Internet of Things (IoT), cloud computing, and 5G, the demand for network traffic from various new services and applications is increasing dramatically, driving higher requirements for network transmission capacity and service flexibility. Against this backdrop, optical networks, as information and communication infrastructure, are carrying increasingly more traffic and need to provide higher capacity and more flexible service capabilities. Traditional Wavelength Division Multiplexing (WDM) technology has been widely used in backbone networks and metropolitan area networks. WDM achieves efficient utilization of optical fiber resources by multiplexing optical signals of different wavelengths into the same optical fiber. However, with the continuous growth of network demands, WDM faces some challenges, mainly including the allocation of spectrum resources. Traditional WDM networks are relatively fixed in their management and scheduling of spectrum resources, and cannot flexibly respond to dynamically changing network loads and service requests.

[0003] To address these issues, in recent years, optical network spectrum allocation technologies have gradually shifted towards the more flexible "flexible wavelength division multiplexing" (Flex-grid) technology. This technology allows for finer-grained allocation of spectrum resources across different wavelengths, thereby improving spectrum utilization and meeting diverse service requirements. Traditional wavelength division multiplexing only needs to consider wavelength consistency and continuity. However, in flexible wavelength division multiplexing systems, spectrum resource allocation must consider not only wavelength but also spectrum continuity, spectrum consistency, and spectrum adjacency.

[0004] Furthermore, with the increasing complexity of network services and the growing demand for real-time performance, the efficiency and accuracy of spectrum allocation algorithms have become crucial. Especially in optical transmission networks, how to quickly and accurately allocate spectrum resources for known service requests and transmission paths has become an urgent problem to be solved. Existing research largely focuses on improving the overall utilization of spectrum resources; however, in practical applications, how to quickly respond to and rationally allocate spectrum resources remains a challenging task.

[0005] For spectrum allocation in optical networks, the main allocation methods currently include First Fit, Random Fit, and Best Fit. 1. First Fit: This method searches for spectrum resources along the path sequentially until the first spectrum block that meets the service requirements is found. Once a suitable spectrum block is found, it is immediately allocated to the current service request. 2. Random Fit: In this method, all spectrum blocks that meet the service requirements are first searched, and then a spectrum block is randomly selected for allocation. 3. Best Fit: This method comprehensively searches all available spectrum resources along the working path and selects the optimal spectrum block for allocation. The optimal criterion is usually to select the spectrum block that best suits the current service requirements, thereby maximizing resource utilization or improving network performance. Each of these spectrum allocation methods has its advantages and disadvantages. For example, random fit can quickly allocate spectrum, but due to its randomness, it is prone to generating more spectrum fragmentation on the working path (i.e., spectrum block length is less than the minimum number of spectrum required by the service), resulting in low spectrum resource utilization. In severe cases, this fragmentation can block the allocation of subsequent services. While initial allocation is simple to implement, its drawback is the potential for repeated searches along the path, leading to low allocation efficiency. Furthermore, the spectral utilization of initial allocation typically falls short of optimal levels. Optimal allocation, while significantly improving spectral utilization, suffers from a longer allocation time and higher computational complexity compared to the other two methods. Summary of the Invention

[0006] To address the aforementioned technical problems, this invention proposes a spectrum allocation method based on byte encoding and regular sorting, aiming to balance allocation efficiency and spectrum utilization, and optimize the use of spectrum resources in optical networks.

[0007] The technical solution adopted in this invention is a spectrum allocation method based on byte encoding and regular sorting, comprising the following steps:

[0008] S1. First, for the known network topology, obtain the spectrum resource usage of each link in the network; and encode the spectrum usage of each link using binary encoding.

[0009] S2. Based on the current service request information, calculate the length of the continuous spectrum block required by the current service request;

[0010] S3. Based on the source and destination information of the business request, calculate several possible paths that meet the source and destination conditions;

[0011] S4. Based on specific business needs, select the shortest path or the path with the fewest hops from the possible paths obtained in step S3 as the working path.

[0012] S5. After selecting the working path, integrate the binary encoded spectrum resource information of all links on that path;

[0013] S6. Use regular expressions to match the integrated spectrum resource information to obtain several consecutive available spectrum blocks;

[0014] S7. Filter out the continuous available spectrum blocks that meet the current business needs;

[0015] S8. Select the optimal continuous spectrum block and allocate the spectrum resource to the current service request;

[0016] S9. Update the spectrum resource usage on the selected working path.

[0017] The beneficial effects of this invention are as follows: First, after a service request arrives, the method calculates K possible transmission paths. Typically, these paths are ranked based on their length or hop count, with the shortest or fewest path selected as the primary working path for service transmission. Second, spectrum resources are allocated based on the selected working paths. This is achieved by pre-integrating and binary-encoding the spectrum resources of each link in the path to obtain the spectrum usage of the entire path. Then, the integrated spectrum resources are sorted and filtered to obtain spectrum blocks suitable for the current service request. Finally, spectrum allocation is performed based on the required spectrum size for the service request. Throughout the entire process, byte encoding is used to represent the spectrum resources of the path, and the use of regular expressions significantly improves the spectrum allocation rate. Attached Figure Description

[0018] Figure 1 is a flowchart of the complete spectrum allocation algorithm based on byte encoding and regular sorting.

[0019] Figure 2 is a flowchart of the working path byte encoding.

[0020] Figure 3 shows the algorithm flowchart for regular sorting and spectrum allocation.

[0021] Figure 4 is a schematic diagram of the available spectrum blocks in the example initialization path.

[0022] Figure 5 is a schematic diagram of the principle of continuous spectrum blocks available in the example retrieval path resources.

[0023] Figure 6 is a schematic diagram illustrating the principle of selecting continuous spectrum blocks from available spectrum resources to meet current business needs.

[0024] Figure 7 is a schematic diagram illustrating the principle of selecting the best continuous spectrum block from the available spectrum blocks after filtering.

[0025] Figure 8 shows a performance comparison between the prior art and the algorithm proposed in this invention.

[0026] Among them, (a) is a performance comparison between the European optical backbone network and the algorithm proposed in this invention, (b) is a performance comparison between the US optical backbone network and the algorithm proposed in this invention, (c) is a performance comparison between COST269 and the algorithm proposed in this invention, and (d) is a performance comparison between 6-point 9-edge and the algorithm proposed in this invention. Detailed Implementation

[0027] To facilitate understanding of the technical content of this invention by those skilled in the art, the following description, in conjunction with the accompanying drawings, further illustrates the invention.

[0028] As shown in Figure 1, the method of the present invention includes the following steps:

[0029] S1. First, for the known network topology, obtain the spectrum resource usage of each link in the network;

[0030] S2. Based on the current service request information, calculate the length of the continuous spectrum block required by the current service request;

[0031] S3. Based on the source and destination information of the business request, calculate the K possible paths that meet the source and destination conditions;

[0032] S4. Based on specific business needs, select the shortest path or the path with the fewest hops from the K possible paths obtained in step S3 as the working path.

[0033] S5. After selecting the working path, integrate the spectrum resource information of all links on that path;

[0034] S6. Based on the integrated spectrum resource information, perform spectrum allocation operations to meet business needs and optimize resource utilization;

[0035] S7. Filter out continuous spectrum blocks that meet the current business requirements;

[0036] S8. Select the most suitable continuous spectrum block and allocate the spectrum resource to the current service request;

[0037] S9. Update the spectrum resource usage on the selected working path.

[0038] As shown in Figure 2, the implementation process of step S1 is as follows:

[0039] S11. Traverse all links in the entire network topology and store the spectrum resource usage of each link in the spectrum usage field of its respective link.

[0040] S12. The spectrum resources for each link are stored in binary character form, where "0" indicates that the spectrum has been used and "1" indicates that the spectrum is idle and unused. The spectrum usage of each link is represented by a string of "01".

[0041] In this embodiment, step S2 specifically calculates the spectrum length required for service transmission based on different modulation methods. The specific formula is B=R / SE, where SE is the spectral efficiency of the modulation method, measured in bits per hertz (bits / Hz), B is the required spectrum length, and R is the requested transmission rate of the service.

[0042] The implementation process of step S3 is as follows:

[0043] S31. Use routing algorithms such as Floyd algorithm, two-layer Dijkstra algorithm, and depth-first search to calculate the shortest path cost table of the entire network topology graph, denoted as u;

[0044] S32. Using the shortest path cost table u calculated in S31 as the evaluation function in the A* algorithm, and then using Yen's K shortest path algorithm based on A* optimization, calculate K candidate paths.

[0045] The value of K is generally determined based on application requirements, network size, resource conditions, and experience. If traffic needs to be distributed across multiple paths, the value of K can be increased appropriately, typically choosing 3 to 5 paths. If the network has high reliability requirements and requires multiple backup paths, the value of K can be set to 2 to 4. If only the optimal path needs to be found, the value of K can be set to 1 or 2. When there are few nodes and links, the value of K can be set larger (e.g., 5 to 10) because the computational complexity is lower. When there are many nodes and links, the value of K should not be too large (usually 3 to 5) to avoid excessive consumption of computational resources. If computational resources are limited (e.g., embedded devices or real-time systems), the value of K should be smaller (e.g., 2 to 3). If computational resources are sufficient (e.g., high-performance servers), the value of K can be increased appropriately. If the cost of paths in the network (e.g., hop count, latency, bandwidth) varies greatly, the value of K can be smaller because the first few paths may already be of sufficient quality. If the cost differences of paths are small, the value of K can be increased appropriately to find more feasible alternative paths.

[0046] The implementation process of step S5 is shown in Figure 4. First, the available spectrum (FS) information for each path is initialized from the obtained KSP dictionary u, denoted as Fp. Initially, Fp is represented as a string of "1", where each "1" represents an available FS. For each link e on the path, the available FS information Fp is updated by performing a logical AND operation between Fp on each link, denoted as F[e]. This ensures that the final FS string Fp accurately represents only the available FS on all links of the entire path p. Figures 6 and 7 show the regular expression sorting and binary transformation-based spectrum allocation process for two requests, one requiring 3 FS and the other requiring 4 FS, both of which are transmitted along the path (A, B, C). First, the available FS information for the path (A, B, C) is calculated by performing a logical AND operation on the FS availability of links AB and BC. As shown in step 1 of Figure 4, the obtained FS information Fp is represented by the string '011100111000011010', where '1' indicates that the FS is available and '0' indicates that the FS is occupied.

[0047] The process of regular sorting and spectrum allocation in steps S6-S7 is shown in Figure 3. After obtaining the binary encoding result of the working path, regular expressions are used to find all continuous available spectrum blocks, and the found spectrum blocks are sorted in ascending order of length. If there is a continuous spectrum block that is the same as the current service, the spectrum block is allocated to the current service; otherwise, the selection is made from continuous spectrum blocks that are greater than the sum of the number of spectrum blocks required by the current service and the minimum length of the spectrum block required by the service, and the spectrum blocks are allocated to the current service.

[0048] The implementation process of step S6 is shown in Figure 5. It identifies contiguous blocks of available FS by matching all consecutive '1' sequences in the FS information string using regular expressions. Then, each contiguous block of available FS is added to the block list Bp specific to that path. This invention uses regular expressions to identify contiguous blocks of available fs in the obtained Fp. The goal of this invention is to find the largest contiguous block of available fs. For example, given that fs '1' and '5' are occupied, the algorithm identifies a usable block [2,3,4] with a length of 3. The identified blocks include a block of length 1 located at

[19] , a block of length 2 located at [16,17], a block of length 3 located at [2,3,4], and a block of length 5 located at [7,8,9,10,11]. The regular expression-based method can effectively identify all available contiguous segments, thereby achieving efficient allocation.

[0049] The basic elements of regular expressions consist of characters and operators (metacharacters), mainly including the following categories: 1. Character classes ([az], [AZ], [0-9], [a-zA-Z0-9]); 2. Predefined character classes (\d: matches any digit, equivalent to [0-9], \D: matches any non-digit character, equivalent to [^0-9], \w: matches any letter, digit, or underscore, equivalent to [a-zA-Z0-9_], \W: matches any non-letter, digit, or underscore, equivalent to [^a-zA-Z0-9_], \s: matches any whitespace character (space, tab, newline, etc.), \S: matches any non-whitespace character); 3. Quantifiers; 4. Boundary matching characters, etc. This article mainly uses character classes.

[0050] The matching process of regular expressions can be understood using finite state automata (FSAs). There are two common types of matching processes: deterministic finite automata (DFAs) and nondeterministic finite automata (NFAs). In an NFA, each element of the regular expression can have multiple transition paths. The regular expression engine tries multiple possible matching paths; this process is called backtracking. The regular expression engine uses backtracking to complete pattern matching. The backtracking mechanism allows the engine to progressively try matching characters and, if a match fails, return to a previous state to try other possibilities. For example, if a regular expression includes `.*abc`, during the matching process, `.*` will try to match as many characters as possible until it can no longer match, then it will backtrack until a suitable matching position is found. Backtracking is the core of NFA matching, ensuring the flexibility of regular expressions, but it can also lead to performance issues, especially with complex regular expressions. Each time a match fails, the NFA returns to a previous state and tries other paths. Unlike NFAs, DFAs can only traverse one path at a time during the matching process, making the matching process more efficient. However, the downside is that it may require more states to represent the regular expression. DFAs do not backtrack, making the matching process very efficient, especially suitable for quickly processing long strings.

[0051] Regular expressions are powerful and flexible text pattern matching tools. Utilizing elements such as character classes, quantifiers, grouping, and boundary markers, they can efficiently describe the structure of strings. Regular expression engines perform matching using either backtracking (NFA) or state machine (DFA) methods. The time complexity of the matching process is affected by the complexity of the regular expression itself and the length of the input string. Through optimization and proper use of regular expressions, various text matching tasks can be handled efficiently in practical applications. Therefore, by binary encoding the spectrum resources on the path and then using regular expressions for matching, fast retrieval and efficient resource allocation can be achieved.

[0052] The implementation process of step S7 is shown in Figure 6. By filtering the blocks in Bp, it is determined which blocks are suitable for allocation. The length of a suitable data block must be at least equal to the number of FSs required by request r. Each data block that meets the criteria after filtering from Bp is added to a separate list of suitable data blocks, denoted as Hp. If no block suitable for a specific path is found, the algorithm terminates the evaluation of that path and continues to the next candidate path. Consecutive FS blocks are allocated according to the request's requirements. For request 1, which requires 3 FSs, the highest priority block is [2,3,4], while the next available block [7,8,9,10,11] belongs to the second priority category, and no block is suitable for the third priority. For request 2, which requires 4 FSs, only the third priority block [7,8,9,10,11] is available. Therefore, FS block [2,3,4] is allocated to request 1, and FS block [7,8,9,10] is allocated to request 2. Therefore, [2,3,4] is assigned to request 1, and the FS blocks 7 through 10 of [7,8,9,10,11] are assigned to request 2. Finally, FS blocks [2,3,4] and [7,8,9,10] are assigned to requests 1 and 2, respectively. The available FS information for the updated path (A,B,C) reflects these assignments, being '00000011001111010' for link (A,B) and '00001000001000011111' for link (B,C). This indicates that these FS blocks with '0' are now occupied and cannot be used for further requests.

[0053] The implementation process of step S8 is as follows:

[0054] S81. After calculating the number of spectrum blocks (num) required for the service request, filter the available spectrum block set according to the value of num. Then, find the spectrum block with a length exactly equal to num from the available spectrum block set and assign it to the current service request;

[0055] S82. If there is no available continuous spectrum block of the same length as num in the available spectrum block set, then use the previously calculated minimum required continuous spectrum block size (num_min) as the offset, and then search for a continuous spectrum block of length num+num_min in the available spectrum set. Once found, allocate it to the current service request.

[0056] S83. If no suitable available spectrum block is found in the first two steps, then the smallest spectrum block greater than the value of num + num_min is selected for allocation, based on the value of num + num_min.

[0057] Figure 8 shows a performance comparison of different algorithms with the algorithm proposed in this invention under four network scenarios. The computation time of all spectrum allocation algorithms increases continuously with the increase of the number of service requests in all four network topologies. This trend indicates that as network demand increases, the complexity of spectrum allocation increases, leading to longer computation times for all algorithms. Figures 8(a) to (d) illustrate the differences between the proposed algorithm, initial allocation, and optimal allocation in 6-point 9-edge, COST269, European optical backbone, and US optical backbone network topologies. For both the initial allocation and optimal allocation algorithms, the computation time increases significantly with the increase of the number of requests. The optimal allocation algorithm consistently shows the highest computation time, indicating its inefficiency in handling increased demand. While the initial allocation performs slightly better than the optimal allocation, it also faces a significant increase in computation time with the increase of the number of requests. In contrast, our proposed algorithm consistently outperforms both initial and optimal allocation, maintaining the lowest computation time in all scenarios. Notably, regardless of the network topology or the number of service requests, our method maintains a stable and low computation time (less than 1 second). This consistency across different network topologies and request matrices highlights the superior efficiency and scalability of our method. In summary, regardless of network size or the number of service requests, our proposed spectrum allocation algorithm demonstrates higher computational efficiency compared to initial and optimal allocations. The results show that our method effectively manages the complexity of spectrum allocation while maintaining low computation time.

[0058] Those skilled in the art will recognize that the embodiments described herein are intended to help the reader understand the principles of the invention, and should be understood that the scope of protection of the invention is not limited to such specific statements and embodiments. Various modifications and variations can be made to the invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the invention should be included within the scope of the claims of the invention.

Claims

1. A spectrum allocation method based on byte encoding and regular sorting, characterized in that, Includes the following steps: S1. First, for the known network topology, obtain the spectrum resource usage of each link in the network; and encode the spectrum usage of each link using binary encoding. S2. Calculate the length of the continuous spectrum block required by the current service request based on the current service request information; S3. Calculate several possible paths that meet the source and destination conditions based on the source and destination information of the service request; S4. Select the shortest path or the path with the fewest hops from the possible paths obtained in step S3 as the working path according to specific service requirements; S5. After selecting the working path, integrate the binary encoded spectrum resource information of all links on the path; Step S5 specifically includes the following sub-steps: S51. For the selected working path, traverse all links on the path and record the spectrum usage of each link; S52. Perform a bitwise AND operation on the binary strings corresponding to the spectrum usage of all links to obtain the overall spectrum resource binary string information of the working path; S6. Use regular expressions to match the integrated spectrum resource information to obtain several continuous available spectrum blocks; Step S6 specifically includes the following sub-steps: S61. Use regular expressions to match the spectrum resources in binary string form on the working path to find continuous available spectrum blocks; S62. Sort all continuous available spectrum blocks in ascending order of length. S7. Filter out the continuous available spectrum blocks that meet the current business needs; S8. Select the optimal continuous spectrum block and allocate the spectrum resource to the current business request; S9. Update the spectrum resource usage on the selected working path.

2. The spectrum allocation method based on byte encoding and regular sorting according to claim 1, characterized in that, Step S1 specifically includes the following sub-steps: S11, traverse all links in the entire network topology diagram and store the spectrum resource usage of each link in the spectrum usage field of each link; S12, for the spectrum resource of each link, store it in binary character form, where "0" indicates that the spectrum has been used and "1" indicates that the spectrum is idle and has not been used; thus, the spectrum usage of each link is represented by a binary string.

3. The spectrum allocation method based on byte encoding and regular sorting according to claim 2, characterized in that, Step S2 specifically calculates the spectrum length required for service transmission based on different modulation methods; the calculation formula is: B=R / SE; where SE is the spectral efficiency of the modulation method, B is the required spectrum length, and R is the transmission rate requested by the service.

4. The spectrum allocation method based on byte encoding and regular sorting according to claim 3, characterized in that, Step S3 specifically includes the following sub-steps: S31, calculate the shortest path cost table of the entire network topology; S32, use the shortest path cost table as the evaluation function in the A* algorithm, and calculate K candidate paths based on Yen's K shortest path algorithm optimized by A*.

5. The spectrum allocation method based on byte encoding and regular sorting according to claim 4, characterized in that, Step S7 specifically includes the following sub-steps: S71. For the sorted consecutive available spectrum blocks, first filter out consecutive available spectrum blocks whose length is greater than or equal to the minimum spectrum block length num_min required by the service; S72. In the filtered consecutive available spectrum blocks, sort them in order of the length of the consecutive available spectrum blocks from smallest to largest and the starting index of the consecutive available spectrum blocks from smallest to largest.

6. The spectrum allocation method based on byte encoding and regular sorting according to claim 5, characterized in that, Step S8 specifically includes the following sub-steps: S81, calculate the number of spectrum blocks num required by the service request, and select the available spectrum block set from the consecutive available spectrum blocks sorted in step S7 according to the value of num; S82, if there is a consecutive available spectrum block with a length equal to num in the available spectrum block set, then allocate the consecutive available spectrum block to the current service request; otherwise, proceed to step S83. S83. Using num_min as the offset, find a continuous spectrum block of length num+num_min from the available spectrum block set, and assign it to the current service request; otherwise, proceed to step S84; S84. Using the value of num + num_min as the benchmark, select the smallest spectrum block greater than the benchmark value for allocation.