Extensible network configuration synthesis method based on autoregression model
By dividing the network into multiple regions, using autoregressive model and beam search algorithm to generate configuration candidates, combined with SMT solver correction, the problems of low computing efficiency and insufficient accuracy in large-scale network configurations are solved, and efficient and accurate network configuration synthesis is achieved.
Patent Information
- Application Number
- CN202510734635.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-04
- Publication Date
- 2025-08-08
AI Technical Summary
When the prior art deals with large-scale network configurations, traditional methods of computing time grow exponentially. Neural network-based methods cannot guarantee the correctness of the generation configuration and cannot meet the real-time requirements of large-scale network configurations.
The autoregressive model is used to divide the network into multiple smaller areas, combine the decomposition-combination strategy and the beam search algorithm, and generate configuration candidates using the autoregressive model, select the optimal configuration sequence through the beam search algorithm, and correct it with the SMT solver to ensure the accuracy and efficiency of the configuration.
It significantly improves the efficiency and scalability of large-scale network configurations, ensures configuration accuracy and consistency, enhances the robustness and flexibility of the system, and can be dynamically adjusted under changing network conditions.
Smart Images

Figure CN120455301A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to an extensible network configuration synthesis method based on an autoregressive model, belonging to the field of information technology, in particular to the field of automatic network configuration synthesis technology in large-scale computer networks. Background Art
[0002] Network configuration synthesis is a critical task in network management, aiming to generate network device configurations that meet high-level requirements. As networks continue to expand, the task of synthesizing network configurations becomes increasingly complex. Traditional network configuration methods, typically based on SMT solvers, can guarantee the correctness of the generated configurations. However, as the network scale increases, these methods face exponential growth in computational time, making them impractical for large-scale networks (e.g., with thousands of devices). While current neural network-based configuration synthesis methods can accelerate the configuration generation process, they cannot guarantee the correctness of the generated configurations and typically still rely on SMT solvers for error correction. However, when the network scale exceeds 1,000 nodes, the efficiency of this method decreases significantly, making it unable to meet the real-time requirements of large-scale network configuration.
[0003] With the development of artificial intelligence (AI), autoregressive models (such as ChatGPT and LLaMA) are gaining increasing attention due to their powerful text understanding and processing capabilities. Autoregressive models can effectively model and fit the data distribution of network configurations and infer the configuration parameters of network protocols. Effectively leveraging the modeling and global perception capabilities of autoregressive models to overcome the shortcomings of existing technologies and solve the problem of automatic network configuration synthesis in large-scale networks has become a pressing technical challenge in the field of automated network configuration technology for computer networks. Summary of the Invention
[0004] In view of this, the purpose of the present invention is to solve large-scale network configuration problems based on an autoregressive model and generate corresponding network configuration parameters to meet network requirements.
[0005] To achieve the above object, the present invention proposes a scalable network configuration synthesis method based on an autoregressive model, the method comprising the following steps:
[0006] Step S100, obtaining network topology and routing requirement information;
[0007] Step S200: Based on the network topology, a decomposition algorithm is used to divide the network into multiple smaller network areas, and network requirements are rewritten to set the network solution area and the corresponding network requirements as well as the current network configuration.
[0008] Step S300: If the entire network has been configured, go to step S700; otherwise, use the joint probability distribution obtained by autoregressive model training to generate multiple sets of candidate configurations for the current network area, and go to step S400;
[0009] Step S400: Use a beam search algorithm to screen the candidate configurations and select the top k candidate configuration sequences with the best probability, ensuring that other candidate configurations can be selected when the current candidate configuration does not meet the requirements, thereby correctly implementing the network configuration with a higher probability;
[0010] Step S500: Use the most likely candidate configuration to guide the SMT solver to generate a configuration that meets the network requirements. If the SMT output does not contain a solution, use another set of unused candidate configurations generated in step S400 to update the current network topology to be solved, network configuration requirements, and existing parameters and re-execute the current step. Otherwise, go to step S600.
[0011] Step S600: Combine the network area with the next area to be solved, and modify the corresponding network requirements and existing network configuration; return to step S300;
[0012] Step S700: Output the final configuration file to ensure that the selected configuration can be correctly deployed in the target network and meets all specified routing and configuration requirements.
[0013] The step S100 includes the following steps:
[0014] Step S110 , obtaining network topology data, using a graph G=(V,E) to describe the device nodes in the network and the connection relationships between them, where V is the set of device nodes in the network, and E is the set of connection edges between the device nodes;
[0015] Step S120: extract routing requirement information, define each routing requirement as a path constraint, and each path constraint can be expressed as a path P = (R1, R2, ..., R n ), represents the route from source router R1 to destination router R n The path, in which the intermediate router nodes realize data transmission through their respective connections;
[0016] Step S130, define the configuration target as calculating a configuration mapping R->C, where C is the space of all valid device configurations, so that the obtained network meets the network configuration requirement φ R .
[0017] The step S200 includes the following steps:
[0018] Step S210: Decompose the network topology into several smaller regions using the Stoer-Wagner algorithm until the number of nodes in each region does not exceed a set threshold m, ensuring that each region is of moderate size.
[0019] Step S220: Identify the boundary nodes and connection interfaces of each region. The boundary nodes serve as connections between network regions to maintain connectivity between regions. The principle for selecting boundary nodes is to solve the adjacency matrix of each network region to ensure connectivity between network regions.
[0020] Step S230, assign routing requirements to each area, and remap the global routing requirements to local routing requirements based on the boundary nodes of the network area; the routing requirements of each area will be rewritten according to the device nodes and connections in the area to adapt to the local network configuration.
[0021] The step S300 includes the following steps:
[0022] Step S310: Input the topology information and local routing requirements of the current area into the trained autoregressive model to generate configuration candidates for the area; specifically, for the configuration (C1, C2, ..., C n ) area, the autoregressive model will be based on the joint probability distribution Generate configuration candidates for each device, where G is the network topology information, For local routing requirements, C i is the target configuration of the i-th region;
[0023] Step S320: The autoregressive model generates configuration candidates by learning the joint probability distribution, specifically by calculating the conditional probability distribution of the device configuration. To gradually generate configuration candidates for the current area; the configuration of each device is selected based on the probability of the previous device configuration and the current topology and routing requirements;
[0024] Step S330: Generate multiple configuration candidates and select the configuration with the largest joint probability value as the final configuration candidate to provide input for subsequent steps. The calculation formula for the maximum joint probability value is:
[0025]
[0026] Among them C net That is, the network configuration with the maximum probability that meets the network configuration requirements.
[0027] The step S400 includes the following steps:
[0028] Step S410: Apply the beam search algorithm to retain the best N candidate configurations each time the region configuration candidate is generated. Each candidate configuration has a probability. For the i-th region, Indicates that the index is j in several candidate configurations corresponding to the i-th region i Candidate configurations, where 0≤j i ≤N-1, that is, the candidate configurations selected from the i-th, i-1-th regions to the first region are expressed as The i-th region configuration candidate The probability can be defined as:
[0029]
[0030] Step S420: define a scoring function as the configuration joint probability of the first i network areas. The scoring function calculation formula is as follows:
[0031]
[0032] In the above formula,
[0033]
[0034] In step S430, the top-k configuration sequences with the highest scores are selected using a beam search algorithm to reduce the search space and ensure that the optimal configuration sequence is selected. The beam search algorithm ensures that only the most promising configuration sequences are retained, avoiding excessive invalid configurations during the calculation process. The beam search algorithm formula is as follows:
[0035]
[0036] Among them, BeamQueue i is the optimal top k configuration sequence of the ith network area, where k is a set parameter and is a natural number;
[0037] The step S500 includes the following steps:
[0038] Step S510: Using the current reference configuration as a soft constraint. During the SMT solution process, soft constraints can provide a correct direction for the configuration solution, thereby making the solution result closer to the expected result. Based on this, the network topology and network requirements are used as hard constraints, that is, constraints that must be met, and the SMT solution is performed.
[0039] Step S520: If the SMT returns a feasible solution, the solution is used as the solution for the current region. Considering that the SMT is generated under the guidance of the reference configuration generated by the autoregressive model, the solution generally meets the overall network requirements.
[0040] In step S530, if SMT does not return a feasible solution, it is considered that no configuration parameters in the current area can meet the corresponding network constraints, that is, the previous area configuration is wrong and the current beam search direction is infeasible. Another configuration sequence is selected from the first k configuration sequences of the previous area, and the current network topology to be solved, network configuration requirements and existing parameters are updated, and the process returns to step S510.
[0041] The step S600 includes the following steps:
[0042] Step S610: Based on the previously configured network area configuration result, overwrite it as the existing configuration and add it to the current configuration, that is, merge the current configuration area into the configured area;
[0043] Step S620: Continue configuring the next network area based on the existing configuration, and return to step S300 until all areas are configured.
[0044] The beneficial effects of the present invention are as follows: the method of the present invention can effectively alleviate the problems of excessive complexity and slow solution faced in the configuration synthesis process by dividing the network into multiple smaller sub-areas and adopting a decomposition-combination strategy. Compared with traditional methods, the efficiency of configuration synthesis can be significantly improved when processing large-scale networks, thereby improving the scalability of large-scale networks. The present invention adopts an autoregressive model to capture the complex dependencies between network areas and ensure the compatibility and consistency between the configurations of each sub-area. The present invention combines the beam search algorithm to select the optimal configuration sequence, and there is basically no configuration conflict, and the search space is greatly reduced. The incremental network area configuration strategy is used to configure several network sub-areas in turn to ensure that the final output configuration meets the routing requirements of the entire network, thereby ensuring the accuracy and efficiency of the configuration problem. The present invention can perform dynamic adjustments under constantly changing network conditions through incremental configuration of the network and a configuration generation strategy based on autoregression, thereby enhancing the robustness and flexibility of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 This is a flowchart of a metadata-driven cloud-native heterogeneous data association method proposed by the present invention;
[0046] Figure 2 is an example diagram of step S400 in an embodiment of the present invention;
[0047] Figure 3 is an example diagram of the method of the present invention in an embodiment of the present invention; DETAILED DESCRIPTION
[0048] In order to make the objectives, technical solutions and advantages of the present invention more clear, the present invention is further described in detail below with reference to the accompanying drawings.
[0049] See also Figure 1 , introduces a scalable network configuration synthesis method based on an autoregressive model proposed by the present invention, the method comprising the following steps:
[0050] Step S100, obtaining network topology and routing requirement information;
[0051] Step S200: Based on the network topology, a decomposition algorithm is used to divide the network into multiple smaller network areas, and network requirements are rewritten to set the network solution area and the corresponding network requirements as well as the current network configuration.
[0052] Step S300: If the entire network has been configured, go to step S700; otherwise, use the joint probability distribution obtained by autoregressive model training to generate multiple sets of candidate configurations for the current network area, and go to step S400;
[0053] Step S400: Use a beam search algorithm to screen the candidate configurations and select the top k candidate configuration sequences with the best probability, ensuring that other candidate configurations can be selected when the current candidate configuration does not meet the requirements, thereby correctly implementing the network configuration with a higher probability;
[0054] Step S500: Use the most likely candidate configuration to guide the SMT solver to generate a configuration that meets the network requirements. If the SMT output does not contain a solution, use another set of unused candidate configurations generated in step S400 to update the current network topology to be solved, network configuration requirements, and existing parameters and re-execute the current step. Otherwise, go to step S600.
[0055] Step S600: Combine the network area with the next area to be solved, and modify the corresponding network requirements and existing network configuration; return to step S300;
[0056] Step S700: Output the final configuration file to ensure that the selected configuration can be correctly deployed in the target network and meets all specified routing and configuration requirements.
[0057] The step S100 includes the following steps:
[0058] Step S110 , obtaining network topology data, using a graph G=(V,E) to describe the device nodes in the network and the connection relationships between them, where V is the set of device nodes in the network, and E is the set of connection edges between the device nodes;
[0059] Step S120: extract routing requirement information, define each routing requirement as a path constraint, and each path constraint can be expressed as a path P = (R1, R2, ..., R n ), represents the route from source router R1 to destination router R nThe path, in which the intermediate router nodes realize data transmission through their respective connections;
[0060] Step S130, define the configuration target as calculating a configuration mapping R->C, where C is the space of all valid device configurations, so that the obtained network meets the network configuration requirement φ R .
[0061] The step S200 includes the following steps:
[0062] Step S210: Decompose the network topology into several smaller regions using the Stoer-Wagner algorithm until the number of nodes in each region does not exceed a set threshold m, ensuring that each region is of moderate size.
[0063] In the embodiment, the pseudo code of the specific algorithm for decomposing the network topology into several smaller areas using the Stoer-Wagner algorithm is shown in Table 1:
[0064] Table 1
[0065]
[0066] Using the algorithm shown in Table 1, the entire network topology is recursively decomposed into multiple regions, ensuring that each region has at most m nodes. For a region, where the boundary nodes connect to other regions, the other regions are treated as abstract nodes from the perspective of the region itself, connected to the region through the boundary nodes. In this embodiment, m is set to 20.
[0067] Step S220: Identify the boundary nodes and connection interfaces of each region. The boundary nodes serve as connections between network regions to maintain connectivity between regions. The principle for selecting boundary nodes is to solve the adjacency matrix of each network region to ensure connectivity between network regions.
[0068] Step S230, assign routing requirements to each area, and remap the global routing requirements to local routing requirements based on the boundary nodes of the network area; the routing requirements of each area will be rewritten according to the device nodes and connections in the area to adapt to the local network configuration.
[0069] In an embodiment, the pseudo code of the network demand rewriting algorithm is shown in Table 2.
[0070] Table 2
[0071]
[0072]
[0073] Network configuration requirements can be divided into two categories: the first category is requirements that can be achieved by configuring a single device, that is, it does not involve configuration with other devices, and this type of configuration can be completed directly on the corresponding device; the second category is requirements that require joint configuration through multiple devices. In this case, requirement decomposition is required. The purpose of requirement decomposition is to convert global network configuration requirements into regional network requirements.
[0074] In each routing requirement, the node rewriting method is determined by the node type. For a routing path Path∷=Src→R1→R2→…→Dst and the area Segment in the routing requirement, the nodes in the Path can be divided into three types: node N in the Segment in Node N connected to the external AS AS Node N outside the segment out For N in With N AS Type nodes are not rewritten. For N out Nodes of this type are rewritten as region-level connections represented by the region they are in, while preserving the original path.
[0075] For example, consider the following path: NodeA->NodeB->NodeC->NodeD->NodeE->NodeF. NodeC and NodeD are nodes within the local area, NodeB and NodeE are border nodes connecting to external autonomous systems, and NodeA and NodeF are nodes outside the local area. Assume that NodeA is located in Segment 1 and NodeF is located in Segment 3. Since NodeC and NodeD are nodes within the local area, and NodeB and NodeE are border nodes, they and their connections in the path are retained. However, since NodeA and NodeF are outside the local area, their locations are replaced with their respective locations. The resulting path is rewritten as Segment 1->NodeB->NodeC->NodeD->NodeE->Segment 3.
[0076] The step S300 includes the following steps:
[0077] Step S310: Input the topology information and local routing requirements of the current area into the trained autoregressive model to generate configuration candidates for the area; specifically, for the configuration (C1, C2, ..., C n ) area, the autoregressive model will be based on the joint probability distribution Generate configuration candidates for each device, where G is the network topology information, For local routing requirements, C iis the target configuration of the i-th region;
[0078] Step S320: The autoregressive model generates configuration candidates by learning the joint probability distribution, specifically by calculating the conditional probability distribution of the device configuration. To gradually generate configuration candidates for the current area; the configuration of each device is selected based on the probability of the previous device configuration and the current topology and routing requirements;
[0079] Step S330: Generate multiple configuration candidates and select the configuration with the largest joint probability value as the final configuration candidate to provide input for subsequent steps. The calculation formula for the maximum joint probability value is:
[0080]
[0081] Among them C net That is, the network configuration with the maximum probability that meets the network configuration requirements.
[0082] The step S400 includes the following steps:
[0083] Step S410: Apply the beam search algorithm to retain the best N candidate configurations each time the region configuration candidate is generated. Each candidate configuration has a probability. For the i-th region, Indicates that the index is j in several candidate configurations corresponding to the i-th region i Candidate configurations, where 0≤j i ≤N-1, that is, the candidate configurations selected from the i-th, i-1-th regions to the first region are expressed as The i-th region configuration candidate The probability can be defined as:
[0084]
[0085] Step S420: define a scoring function as the configuration joint probability of the first i network areas. The scoring function calculation formula is as follows:
[0086]
[0087] In the above formula,
[0088]
[0089] In step S430, the top-k configuration sequences with the highest scores are selected using a beam search algorithm to reduce the search space and ensure that the optimal configuration sequence is selected. The beam search algorithm ensures that only the most promising configuration sequences are retained, avoiding excessive invalid configurations during the calculation process. The beam search algorithm formula is as follows:
[0090]
[0091] Among them, BeamQueue i is the optimal top k configuration sequence of the ith network area, where k is a set parameter and is a natural number;
[0092] Reference Figure 2 The above process is illustrated as follows:
[0093] When using the autoregressive model to generate multiple sets of solutions for the current region configuration, as the number of configuration regions increases, the final possible configuration results will also increase exponentially. The beam search aims to reduce the search space while ensuring correctness as much as possible, and only retains the top-k candidate solutions each time. Figure 2 In the example, let k = 2, that is, only the first two candidate solutions with the highest probability are retained at each step. Figure 2 middle Denotes the jth candidate solution for region i. For the first region of the configuration, there are solutions from the region that satisfy the current region configuration. arrive The five candidate solutions are obtained by retaining the first two candidate solutions with the largest joint probability. and In the configuration of area 2, it is necessary to and The candidate solutions that satisfy the configuration of area 2 are obtained respectively. arrive Finally, by calculating the joint probability The two configurations with the highest probability are obtained. The configuration of the next region is similar. Each region calculates the joint probability based on the previously configured regions to obtain the top two configurations with the highest probability until all regions are configured.
[0094] The step S500 includes the following steps:
[0095] Step S510: Using the current reference configuration as a soft constraint. During the SMT solution process, soft constraints can provide a correct direction for the configuration solution, thereby making the solution result closer to the expected result. Based on this, the network topology and network requirements are used as hard constraints, that is, constraints that must be met, and the SMT solution is performed.
[0096] Step S520: If the SMT returns a feasible solution, the solution is used as the solution for the current region. Considering that the SMT is generated under the guidance of the reference configuration generated by the autoregressive model, the solution generally meets the overall network requirements.
[0097] In step S530, if SMT does not return a feasible solution, it is considered that no configuration parameters in the current area can meet the corresponding network constraints, that is, the previous area configuration is wrong and the current beam search direction is infeasible. Another configuration sequence is selected from the first k configuration sequences of the previous area, and the current network topology to be solved, network configuration requirements and existing parameters are updated, and the process returns to step S510.
[0098] The step S600 includes the following steps:
[0099] Step S610: Based on the previously configured network area configuration result, overwrite it as the existing configuration and add it to the current configuration, that is, merge the current configuration area into the configured area;
[0100] Step S620: Continue configuring the next network area based on the existing configuration, and return to step S300 until all areas are configured.
[0101] See also Figure 3 , the specific contents of the present invention are now described with examples. Figure 3 As shown, there is a network consisting of 10 nodes involving four adjacent autonomous systems (AS).
[0102] The routing requirements for this network are as follows:
[0103] AS4→R4→R3→R2→R1→AS1 = AS4→R4→R5→R6→R1→AS1 (OSPF ECMP, meaning the corresponding paths must have equal priorities. In this requirement, the two paths from AS4 to AS1 have equal priorities).
[0104] AS4→R4→R5→R6>>AS4→R4→R3 (OSPF Ordered, meaning path priorities must descend in descending order. In this requirement, the path AS4→R4→R5→R6 must have a higher priority than the path AS4→R4→R3).
[0105] First, the network topology and network requirements are decomposed. For topology decomposition, a decomposition method is used to divide the network topology into multiple smaller areas. In this example, the network topology is divided into two areas, and the area division is achieved by disconnecting the R3 and R6 nodes. The two divided areas are connected by boundary nodes, and R3 and R6 are shared boundary nodes. For network requirement decomposition, the requirements are decomposed into area-level requirements and rewritten accordingly. Specifically, the requirements for corresponding path constraints within the segment are captured. The rewrite rules replace nodes outside the segment with segment identifiers and path information. In this example, the requirement decomposition results are as follows:
[0106] Area 1: AS4 → R4 → Seg2 (R4, R3) → R3 → R2 → R1 → AS1 = AS4 → R4 → Seg2 (R4, R5, R6) → R6 → R1 → AS1 (OSPF ECMP)
[0107] Region 2:
[0108] AS4→R4→R3→Seg1(R3,R2,R1)→R1→AS1=AS4→R4→R5→R6→Seg2(R6,R1)→R1→AS1 (OSPF ECMP)
[0109] AS4→R4→R5→R>>AS4→R4→R3(OSPF Ordered)
[0110] Next, integration is performed using beam search. Because each segment has multiple feasible configuration solutions, the search space for assembling segments grows exponentially with the number of segments. Since the AR model inference process returns k different sequences, describing k configuration alternatives that meet the requirements of the corresponding segment, the present invention uses the score of each beam as its value function to perform a beam search on these k options. This setup allows for high parallelism between beams, significantly improving speed when parallel computing resources are available. In this example, assume that the beam search algorithm obtains two configuration candidates, candidate1(Segment1), i.e., candidate configuration 1 for region 1, and candidate2(Segment1), i.e., candidate configuration 2 for region 1. The configuration candidates are then used to adjust the region-level requirements. For example, the requirement Seg1(R6, R1) in Segment1 is rewritten as Seg1(cost: 2) because the cost between nodes R6 and R1 in candidate1(Segment1) is 2. This means that the system adjusts the routing requirements based on the existing configuration (path or connection cost in the candidate configuration). These redefined region-level requirements contain the information of the previous configuration as conditional requirements and feed the rewritten requirements into the AR model to reason about the candidate configuration.
[0111] Finally, the generated configuration is revised. During this revision process, conflicts inevitably arise, posing a significant challenge to simultaneously meeting all requirements. In this example, the introduction of candidate1(Segment1) transforms the ECMP constraint expression into an equation. However, the left-hand side of the constraint expression, which represents the ordering requirement, remains small, leading to a conflict. This conflict highlights the limitations of the current configuration: candidate1(Segment1) cannot meet all requirements in Segment2.
[0112] In this case, beam search provides an effective solution. By retaining multiple candidate configurations, including candidate1(Segment1) and candidate2(Segment1), beam search ensures the flexibility required for subsequent adjustments. Therefore, when processing Segment2, reintroducing candidate2(Segment1) can synthesize candidate2(Segment2) without conflict, that is, configuration result 2 for region 2, demonstrating the ability of beam search to mitigate conflicts by utilizing multiple configuration candidates.
[0113] For the already configured areas, the configured results and the requirements of the new area are used as the premise to configure the current area. Repeat the above process until all areas are configured.
[0114] The inventors conducted a large number of simulation experiments on the method proposed in the present invention, and the experimental results are as follows:
[0115] The autoregressive model used in this invention uses Llama-3-1B-Instruct as its base model. The inventors addressed the scarcity of network configuration datasets, particularly for large-scale networks, by generating 200,000 valid network configuration samples for model training. The network configuration samples were generated based on the number of network nodes, covering scales ranging from 200 to 20,000 nodes.
[0116] During the training data generation process, we first randomly generate network topology configurations, covering network nodes of varying sizes. Next, we simulate relevant protocols to obtain the forwarding plane and check for errors. If errors are detected, the configuration is discarded. From the valid configurations, we randomly select properties that meet the forwarding plane requirements, ensuring that the output configurations are consistent with the input topology and required specifications. Finally, we verify the validity of the generated configuration samples and use those that meet the requirements for subsequent training datasets.
[0117] During the training process, LoRA was used to fine-tune the model, and the learning rate was set to 10 -5 During the model inference phase, the temperature parameter is set to 0.8, the top_p parameter is set to 0.7, and the number of model returns (number of statements) is set to 5.
[0118] Experimental results show that existing configuration synthesis tools such as SyNet and NetComplete perform well in terms of computational time on smaller networks, but their efficiency drops significantly when the network scales to larger nodes. In contrast, our method maintains low computational time when processing networks with up to 17,000 nodes, successfully completing the configuration synthesis task within 24 hours.
[0119] The experimental results prove that the method proposed in the present invention is feasible and effective.
Claims
1. A scalable network configuration synthesis method based on an autoregressive model, characterized by: The method comprises the following steps: Step S100, obtaining network topology and routing requirement information; Step S200: Based on the network topology, a decomposition algorithm is used to divide the network into multiple smaller network areas, and network requirements are rewritten to set the network solution area and the corresponding network requirements as well as the current network configuration. Step S300: If the entire network has been configured, go to step S700; otherwise, use the joint probability distribution obtained by autoregressive model training to generate multiple sets of candidate configurations for the current network area, and go to step S400; Step S400: Use a beam search algorithm to screen the candidate configurations and select the top k candidate configuration sequences with the best probability, ensuring that other candidate configurations can be selected when the current candidate configuration does not meet the requirements, thereby correctly implementing the network configuration with a higher probability; Step S500: Use the most likely candidate configuration to guide the SMT solver to generate a configuration that meets the network requirements. If the SMT output does not contain a solution, use another set of unused candidate configurations generated in step S400 to update the current network topology to be solved, network configuration requirements, and existing parameters and re-execute the current step. Otherwise, go to step S600. Step S600: Combine the network area with the next area to be solved, and modify the corresponding network requirements and existing network configuration; return to step S300; Step S700: Output the final configuration file to ensure that the selected configuration can be correctly deployed in the target network and meets all specified routing and configuration requirements.
2. The scalable network configuration synthesis method based on an autoregressive model according to claim 1, characterized in that: The step S100 includes the following steps: Step S110 , obtaining network topology data, using a graph G=(V,E) to describe the device nodes in the network and the connection relationships between them, where V is the set of device nodes in the network, and E is the set of connection edges between the device nodes; Step S120: extract routing requirement information, define each routing requirement as a path constraint, and each path constraint can be expressed as a path P = (R1, R2, ..., R n ), represents the route from source router R1 to destination router R n The path, in which the intermediate router nodes realize data transmission through their respective connections; Step S130, define the configuration target as calculating a configuration mapping R->C, where C is the space of all valid device configurations, so that the obtained network meets the network configuration requirement φ R .
3. The scalable network configuration synthesis method based on an autoregressive model according to claim 1, characterized in that: The step S200 includes the following steps: Step S210: Decompose the network topology into several smaller regions using the Stoer-Wagner algorithm until the number of nodes in each region does not exceed a set threshold m, ensuring that each region is of moderate size. Step S220: Identify the boundary nodes and connection interfaces of each region. The boundary nodes serve as connections between network regions to maintain connectivity between regions. The principle for selecting boundary nodes is to solve the adjacency matrix of each network region to ensure connectivity between network regions. Step S230, assign routing requirements to each area, and remap the global routing requirements to local routing requirements based on the boundary nodes of the network area; the routing requirements of each area will be rewritten according to the device nodes and connections in the area to adapt to the local network configuration.
4. The scalable network configuration synthesis method based on an autoregressive model according to claim 1, characterized in that: The step S300 includes the following steps: Step S310: Input the topology information and local routing requirements of the current area into the trained autoregressive model to generate configuration candidates for the area; specifically, for the configuration (C1, C2, ..., C n ) area, the autoregressive model will be based on the joint probability distribution Generate configuration candidates for each device, where G is the network topology information, For local routing requirements, C i is the target configuration of the i-th region; Step S320: The autoregressive model generates configuration candidates by learning the joint probability distribution, specifically by calculating the conditional probability distribution of the device configuration. To gradually generate configuration candidates for the current area; the configuration of each device is selected based on the probability of the previous device configuration and the current topology and routing requirements; Step S330: Generate multiple configuration candidates and select the configuration with the largest joint probability value as the final configuration candidate to provide input for subsequent steps. The calculation formula for the maximum joint probability value is: Among them C net That is, the network configuration with the maximum probability that meets the network configuration requirements.
5. The scalable network configuration synthesis method based on an autoregressive model according to claim 1, characterized in that: The step S400 includes the following steps: Step S410: Apply the beam search algorithm to retain the best N candidate configurations each time the region configuration candidate is generated. Each candidate configuration has a probability. For the i-th region, Indicates that the index is j in several candidate configurations corresponding to the i-th region i Candidate configurations, where 0≤j i ≤N-1, that is, the candidate configurations selected from the i-th, i-1-th regions to the first region are expressed as The i-th region configuration candidate The probability can be defined as: Step S420: define a scoring function as the configuration joint probability of the first i network areas. The scoring function calculation formula is as follows: In the above formula, In step S430, the top-k configuration sequences with the highest scores are selected using a beam search algorithm to reduce the search space and ensure that the optimal configuration sequence is selected. The beam search algorithm ensures that only the most promising configuration sequences are retained, avoiding excessive invalid configurations during the calculation process. The beam search algorithm formula is as follows: Among them, BeamQueue i is the optimal top k configuration sequence of the i-th network area, where k is a set parameter and its value is a natural number.
6. The scalable network configuration synthesis method based on an autoregressive model according to claim 1, characterized in that: The step S500 includes the following steps: Step S510: Using the current reference configuration as a soft constraint. During the SMT solution process, soft constraints can provide a correct direction for the configuration solution, thereby making the solution result closer to the expected result. Based on this, the network topology and network requirements are used as hard constraints, that is, constraints that must be met, and the SMT solution is performed. Step S520: If the SMT returns a feasible solution, the solution is used as the solution for the current region. Considering that the SMT is generated under the guidance of the reference configuration generated by the autoregressive model, the solution generally meets the overall network requirements. In step S530, if SMT does not return a feasible solution, it is considered that no configuration parameters in the current area can meet the corresponding network constraints, that is, the previous area configuration is wrong and the current beam search direction is infeasible. Another configuration sequence is selected from the first k configuration sequences of the previous area, and the current network topology to be solved, network configuration requirements and existing parameters are updated, and the process returns to step S510.
7. The scalable network configuration synthesis method based on an autoregressive model according to claim 1, characterized in that: The step S600 includes the following steps: Step S610: Based on the previously configured network area configuration result, overwrite it as the existing configuration and add it to the current configuration, that is, merge the current configuration area into the configured area; Step S620: Continue configuring the next network area based on the existing configuration, and return to step S300 until all areas are configured.