Virtual local area network distribution method, system and device and computer equipment
By obtaining network status data and using reinforcement learning models to generate virtual LAN allocation strategies, dynamically adjusting VLAN tags, the resource waste and network overload problems caused by static configuration methods are solved, and resource utilization and network efficiency are improved.
Patent Information
- Application Number
- CN202510763475.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-09
- Publication Date
- 2025-09-02
AI Technical Summary
Traditional static VLAN configuration methods cannot dynamically adjust VLAN tags or bandwidth allocation in multi-tenant environments, resulting in waste or overload of network resources.
By obtaining network status data, using reinforcement learning model to process state vectors, a virtual LAN allocation strategy is generated, and the tags are allocated to the network device after verification is passed, and the VLAN tags are dynamically adjusted.
It has achieved the improvement of resource utilization and optimization of network efficiency, avoiding network congestion and resource waste.
Smart Images

Figure CN120582983A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of network resource management, and in particular to a virtual local area network allocation method, system, device and computer equipment. Background Art
[0002] A Virtual Local Area Network (VLAN) is a technology that achieves isolation through logical division within the same physical network. It is widely used in network resource management, load balancing, and security control.
[0003] Traditional VLAN allocation methods usually use static VLAN configuration methods, which rely on manual settings and static rules. That is, administrators pre-allocate fixed tags and resources to each VLAN based on network topology and business needs.
[0004] However, since the traffic demands of different tenants may vary significantly, and static configuration cannot dynamically adjust VLAN tags or bandwidth allocation, static configuration methods may lead to waste or overload of network resources in a multi-tenant environment. Summary of the Invention
[0005] Based on this, it is necessary to provide a virtual local area network allocation method, system, device and computer equipment that can improve network resource utilization in response to the above technical problems.
[0006] In a first aspect, the present application provides a virtual local area network allocation method, comprising:
[0007] Obtain network status data and preprocess the network status data to obtain a state vector; network status data includes network traffic data, service instance data, and resource usage data;
[0008] The state vector is processed by a reinforcement learning model to obtain a virtual local area network allocation strategy; the virtual local area network allocation strategy includes a virtual local area network label to be allocated;
[0009] When the VLAN allocation policy is verified to be successful, the VLAN allocation policy is sent to the network controller to instruct the network controller to allocate the VLAN labels to corresponding network devices according to the VLAN allocation policy.
[0010] In one embodiment, the training process of the reinforcement learning model includes:
[0011] Obtain historical traffic data and historical service load data, and build a virtual network environment based on the historical traffic data and historical service load data;
[0012] In a virtual network environment, historical state data at the target moment is obtained, and the historical state data is used as the input of the reinforcement learning model, and the output is a simulated allocation strategy;
[0013] According to historical traffic data and historical service load data, obtain simulation action results corresponding to the simulation allocation strategy;
[0014] According to the results of the simulated action, the reward value is obtained, and the model parameters of the reinforcement learning model are adjusted according to the reward value. The process returns to the step of obtaining the historical state data at the target time and continues to execute until the reinforcement learning model training is completed.
[0015] In one embodiment, the method further comprises:
[0016] When the service instance data or resource usage data is updated, the network status data is reacquired, and the step of preprocessing the network status data to obtain the state vector is returned to, and the execution is continued until an updated virtual local area network allocation strategy is obtained;
[0017] When the updated virtual local area network allocation policy is verified to be successful, the updated virtual local area network allocation policy is sent to the network controller.
[0018] In one embodiment, the method further comprises:
[0019] Obtain traffic patterns and network behaviors corresponding to historical traffic data;
[0020] Optimize VLAN allocation policies based on traffic patterns and network behavior.
[0021] In a second aspect, the present application further provides a virtual local area network allocation method, comprising:
[0022] receiving a virtual local area network allocation policy sent from an intelligent network interface card; the virtual local area network allocation policy includes a virtual local area network tag to be allocated;
[0023] According to the virtual local area network allocation policy, the virtual local area network labels are allocated to corresponding network devices.
[0024] In one embodiment, allocating virtual local area network labels to corresponding network devices according to a virtual local area network allocation policy includes:
[0025] According to the virtual local area network allocation strategy, obtain the routing path of each virtual local area network label;
[0026] Optimize routing paths based on the topology of network devices;
[0027] The virtual local area network (VLAN) labels are allocated to corresponding network devices according to the priorities of the VLAN labels and the optimized routing paths.
[0028] In a third aspect, the present application further provides a virtual local area network allocation system, comprising:
[0029] An intelligent network interface card communicates with a network controller to obtain network status data and pre-process the network status data to obtain a state vector; the network status data includes network traffic data, service instance data, and resource usage data; the state vector is processed using a reinforcement learning model to obtain a virtual local area network allocation policy; the virtual local area network allocation policy includes a virtual local area network label to be allocated; and if the virtual local area network allocation policy is verified to be successful, the virtual local area network allocation policy is sent to the network controller;
[0030] The network controller is configured to receive the virtual local area network allocation policy sent from the intelligent network interface card; and allocate the virtual local area network labels to corresponding network devices according to the virtual local area network allocation policy.
[0031] In a fourth aspect, the present application further provides a virtual local area network allocation device, comprising:
[0032] The data acquisition module is used to obtain network status data and pre-process the network status data to obtain a state vector; the network status data includes network traffic data, service instance data and resource usage data;
[0033] A strategy acquisition module is used to process the state vector through a reinforcement learning model to obtain a virtual local area network allocation strategy; the virtual local area network allocation strategy includes a virtual local area network label to be allocated;
[0034] The first allocation module is used to send the virtual LAN allocation policy to the network controller when the virtual LAN allocation policy is verified to instruct the network controller to allocate the virtual LAN label to the corresponding network device according to the virtual LAN allocation policy.
[0035] In a fifth aspect, the present application further provides a virtual local area network allocation device, comprising:
[0036] The policy receiving module is used to receive the virtual local area network allocation policy sent from the intelligent network interface card; the virtual local area network allocation policy includes the virtual local area network label to be allocated;
[0037] The second allocation module is configured to allocate the virtual local area network labels to corresponding network devices according to the virtual local area network allocation policy.
[0038] In a sixth aspect, the present application further provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the method steps of any one of the above-mentioned first or second aspects are implemented.
[0039] In a seventh aspect, the present application further provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the method steps of any one of the above-mentioned first aspect or second aspect are implemented.
[0040] In an eighth aspect, the present application further provides a computer program product, comprising a computer program, which, when executed by a processor, implements the method steps of any one of the above-mentioned first or second aspects.
[0041] The above-mentioned virtual local area network allocation method, system, device and computer equipment obtain network status data and preprocess the network status data to obtain a state vector, process the state vector through a reinforcement learning model to obtain a virtual local area network allocation strategy, and when the virtual local area network allocation strategy is verified, send the virtual local area network allocation strategy to the network controller to instruct the network controller to allocate virtual local area network labels to corresponding network devices according to the virtual local area network allocation strategy. The virtual local area network labels can be adjusted in real time, resource allocation can be optimized, network congestion or resource waste can be avoided, and resource utilization and network efficiency can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following briefly introduces the drawings required for use in the embodiments of the present application or related technical descriptions. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying any creative work.
[0043] Figure 1 is a structural block diagram of a virtual local area network allocation system in one embodiment;
[0044] Figure 2 A flowchart of a virtual local area network allocation method according to an embodiment;
[0045] Figure 3 A flowchart of a virtual local area network allocation method according to an embodiment;
[0046] Figure 4 A flowchart of a virtual local area network allocation method according to another embodiment;
[0047] Figure 5 It is a structural block diagram of a virtual local area network allocation device in one embodiment;
[0048] Figure 6 It is a structural block diagram of a virtual local area network allocation device in another embodiment;
[0049] Figure 7 FIG. 1 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0050] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0051] It should be noted that the terms "first", "second", etc. used in this application may be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from the second element. The terms "including" and "having" used in this application and any variations thereof are intended to cover non-exclusive inclusions. The term "plurality" used in this application refers to two or more. The term "and / or" used in this application refers to one of the solutions or any combination of multiple solutions.
[0052] In an exemplary embodiment, Figure 1 As shown, a virtual local area network (VLAN) allocation system is provided, including: an intelligent network interface card (INIC) 102 and a network controller (104). The intelligent network interface card (INIC) 102 communicates with the network controller (104) to obtain network status data and pre-process the network status data to obtain a state vector. The network status data includes network traffic data, service instance data, and resource usage data. The state vector is processed using a reinforcement learning model to obtain a VLAN allocation policy. The VLAN allocation policy includes a VLAN tag to be allocated. If the VLAN allocation policy is verified, the VLAN allocation policy is sent to the network controller (104). The network controller (104) is configured to receive the VLAN allocation policy sent by the intelligent network interface card (INIC) 102 and allocate the VLAN tags to corresponding network devices based on the VLAN allocation policy.
[0053] The intelligent network interface card 102 may be, but is not limited to, an edge computing node deployed with an inference engine. The network controller 104 may be an SDN (Software-Defined Networking Controller) controller.
[0054] In an exemplary embodiment, Figure 2 As shown, a virtual local area network allocation method is provided, which is applied to Figure 1Taking the intelligent network interface card 102 in FIG. 1 as an example, the method includes the following steps 202 to 206. In which:
[0055] Step S202: Acquire network status data and pre-process the network status data to obtain a state vector; the network status data includes network traffic data, service instance data, and resource usage data.
[0056] Optionally, network traffic data includes the current traffic load, traffic trends, and traffic types for each VLAN. Service instance data includes CPU usage, memory usage, and bandwidth requirements for containerized service instances. Resource usage data includes resource utilization, the number of allocated services, and congestion conditions for each VLAN. Network state data is preprocessed to convert it into a state vector in the state space.
[0057] Step S204 , processing the state vector through a reinforcement learning model to obtain a virtual local area network allocation strategy; the virtual local area network allocation strategy includes a virtual local area network label to be allocated.
[0058] Optionally, the reinforcement learning model includes a state space and an action space, wherein the state space includes a state vector obtained based on network state data, which is used to characterize the current network environment. The action space is a tag allocation strategy for VLAN. The virtual local area network allocation strategy includes a VLAN tag allocation strategy and a VLAN tag priority adjustment strategy. The VLAN tag allocation strategy refers to selecting the best VLAN tag allocation scheme based on the current network state. For example, a specific VLAN tag can be selected for a specific traffic type or service instance. The priority adjustment strategy refers to adjusting the priority of the corresponding VLAN for a service instance with a heavy load to ensure that it obtains sufficient bandwidth.
[0059] Optionally, the inference engine of the reinforcement learning model is deployed on a smart NIC. As an edge computing node, the smart NIC can perform inference and decision-making directly close to the source of network traffic, thereby avoiding the delay of transmitting large amounts of data to a centralized server for calculation. When deploying the inference engine, a lightweight inference framework can be used to enable the reinforcement learning model to run efficiently on resource-constrained smart NICs. The inference engine can quickly obtain network traffic data and service instance status information, make quick decisions based on the current status, and optimize VLAN tag allocation. Whenever network traffic or service instance status changes, the smart NIC triggers the inference engine to recalculate and pass the optimized VLAN configuration plan to the SDN controller to implement the network configuration change.
[0060] Step S206 : If the VLAN allocation policy is verified to be successful, the VLAN allocation policy is sent to the network controller to instruct the network controller to allocate VLAN labels to corresponding network devices according to the VLAN allocation policy.
[0061] Optionally, the purpose of verifying the VLAN allocation policy is to ensure its effectiveness. This is done by simulating the network environment after executing the VLAN allocation policy and evaluating whether the network status after execution meets the requirements, thereby verifying the effectiveness of the VLAN allocation policy. If the VLAN allocation policy is verified, the VLAN allocation policy is sent to the SDN controller, which implements the VLAN allocation policy and allocates VLAN labels to the corresponding network devices.
[0062] In the above-mentioned virtual LAN allocation method, network status data is obtained and preprocessed to obtain a state vector, and the state vector is processed by a reinforcement learning model to obtain a virtual LAN allocation strategy. When the virtual LAN allocation strategy is verified, the virtual LAN allocation strategy is sent to the network controller to instruct the network controller to allocate virtual LAN labels to corresponding network devices according to the virtual LAN allocation strategy. The virtual LAN labels can be adjusted in real time, resource allocation can be optimized, network congestion or resource waste can be avoided, and resource utilization and network efficiency can be improved.
[0063] In an exemplary embodiment, the training process of the reinforcement learning model includes:
[0064] Obtain historical traffic data and historical service load data, and build a virtual network environment based on the historical traffic data and historical service load data;
[0065] In a virtual network environment, historical state data at the target moment is obtained, and the historical state data is used as the input of the reinforcement learning model, and the output is a simulated allocation strategy;
[0066] According to historical traffic data and historical service load data, obtain simulation action results corresponding to the simulation allocation strategy;
[0067] According to the results of the simulated action, the reward value is obtained, and the model parameters of the reinforcement learning model are adjusted according to the reward value. The process returns to the step of obtaining the historical state data at the target time and continues to execute until the reinforcement learning model training is completed.
[0068] Optionally, when training a reinforcement learning model, historical traffic data can be combined with real-time monitoring data to dynamically update the model to enhance its intelligence. Specifically, by analyzing historical traffic data, the model can identify common traffic patterns and network behaviors, thereby developing more efficient VLAN allocation strategies. Analyzing historical data can improve the model's responsiveness to specific types of network load, enabling it to react quickly and effectively avoid traffic overloads.
[0069] Optionally, a virtual network environment is simulated based on historical traffic data and service load data. Historical state data at a specific point in time within the virtual network environment is obtained. This historical state data is used as input to a reinforcement learning model, and a simulated allocation strategy is output. A reward function is constructed by obtaining state data after executing the simulated allocation strategy. The reward function evaluates the effectiveness of the simulated allocation strategy, including VLAN utilization efficiency, traffic load balancing, service instance demand satisfaction, and the optimization objective. For VLAN utilization efficiency, the reward is related to VLAN resource utilization, ensuring that each VLAN's resources are effectively utilized. For traffic load balancing, the reward is higher if the traffic load is evenly distributed across VLANs; it is lower if a VLAN is overloaded or idle. For service instance demand satisfaction, the reward increases when a service instance (such as a pod) has sufficient bandwidth and low latency. As for the optimization objective, the model aims to maximize overall network resource utilization while ensuring the bandwidth requirements of highly loaded service instances. By monitoring network traffic, CPU usage, and bandwidth usage of service instances in real time, the reward function's reward value is obtained, allowing fine-tuning and updating of the reinforcement learning model.
[0070] In this embodiment, the reinforcement learning model is trained using historical traffic data and historical service load data, which can improve the accuracy of the reinforcement learning model and increase the response rate of the model.
[0071] In an exemplary embodiment, the method further includes: when there is an update to the service instance data or resource usage data, reacquiring the network status data, returning to the step of preprocessing the network status data to obtain a state vector, and continuing to execute until an updated virtual LAN allocation policy is obtained; and when the updated virtual LAN allocation policy is verified to be successful, sending the updated virtual LAN allocation policy to the network controller.
[0072] Optionally, service instances managed by the service mesh can provide real-time feedback to the reinforcement learning model through regular health checks and resource status updates. This service instance status information is not only used to adjust the VLAN allocation strategy but also provides contextual data for the model. For example, the runtime resource usage of each service instance (e.g., pod), such as CPU utilization, memory usage, and network bandwidth requirements, serves as input parameters for the reinforcement learning model. This service instance status information is combined with network traffic data and fed back to the reinforcement learning model in real time to serve as a basis for adjusting the VLAN allocation strategy. Furthermore, the resource requirements of the service instance (such as CPU or memory load) can be used to intelligently select the corresponding VLAN tag. For example, when a pod's CPU utilization reaches 80%, it will be preferentially assigned a VLAN tag with higher bandwidth and lower load to ensure service stability.
[0073] In this embodiment, by reacquiring network status data when service instance data or resource usage data is updated, the reliability of the virtual local area network allocation strategy can be improved, thereby increasing the network rate.
[0074] In an exemplary embodiment, the method further includes: obtaining traffic patterns and network behaviors corresponding to historical traffic data; and optimizing the virtual local area network allocation strategy based on the traffic patterns and network behaviors.
[0075] Optionally, in order to improve the intelligence of the reinforcement learning model, historical traffic data can be combined to update the model. By analyzing traffic patterns and network behaviors, the model can identify common traffic patterns and network behaviors, thereby determining a more efficient virtual LAN allocation strategy.
[0076] In this embodiment, by optimizing the VLAN allocation strategy based on historical traffic patterns and network behaviors, the accuracy of the reinforcement learning model can be improved, thereby improving the reliability and effectiveness of the VLAN allocation strategy.
[0077] In an exemplary embodiment, Figure 3 As shown, a virtual local area network allocation method is provided, which is applied to Figure 1 The network controller 104 in FIG. 1 is taken as an example to illustrate the method, which includes the following steps 302 to 304. Among them:
[0078] Step S302: Receive a virtual local area network allocation policy sent from an intelligent network interface card; the virtual local area network allocation policy includes a virtual local area network tag to be allocated.
[0079] Step S304: Allocate the virtual local area network labels to corresponding network devices according to the virtual local area network allocation policy.
[0080] Optionally, the SDN controller communicates with the smart NIC, and upon receiving the virtual LAN allocation policy sent by the smart NIC, sends it to the corresponding network device via the open network control protocol to ensure that the VLAN tag is updated in all relevant nodes in the network.
[0081] In the above-mentioned virtual LAN allocation method, by receiving the virtual LAN allocation policy sent by the intelligent network interface card, the virtual LAN label is allocated to the corresponding network device according to the virtual LAN allocation policy, and the virtual LAN label can be adjusted in real time to optimize resource allocation, avoid network congestion or resource waste, thereby improving resource utilization and network efficiency.
[0082] In an exemplary embodiment, the step of allocating virtual LAN tags to corresponding network devices according to the virtual LAN allocation policy includes: obtaining a routing path for each virtual LAN tag according to the virtual LAN allocation policy; optimizing the routing path based on the topology of the network device; and allocating the virtual LAN tag to the corresponding network device according to the priority of the virtual LAN tag and the optimized routing path.
[0083] Optionally, the SDN controller optimizes VLAN tag routing based on the topology to ensure optimal allocation of network resources. During this process, the SDN controller receives new VLAN allocation policies from the reinforcement learning model and dynamically updates the VLAN configuration in the network. If a VLAN is detected as overloaded or inefficiently used, the controller adjusts bandwidth allocation for that VLAN based on the new policy to ensure efficient resource utilization.
[0084] In this embodiment, by optimizing the routing path based on the topology of the network devices, the accuracy of virtual local area network label allocation can be improved, the network resource utilization rate can be effectively improved, and the network speed can be increased.
[0085] In an exemplary embodiment, Figure 4 As shown, a virtual local area network allocation method is provided, which includes the following steps:
[0086] The intelligent network interface card obtains historical traffic data and historical service load data, and builds a virtual network environment based on the historical traffic data and historical service load data; in the virtual network environment, obtains historical status data at a target moment, uses the historical status data as input to a reinforcement learning model, and outputs a simulated allocation strategy; obtains simulation action results corresponding to the simulated allocation strategy based on the historical traffic data and historical service load data; obtains a reward value based on the simulation action result, and adjusts model parameters of the reinforcement learning model based on the reward value, returns to the step of obtaining the historical status data at the target moment, and continues to execute until the reinforcement learning model training is completed.
[0087] The intelligent network interface card obtains network status data and pre-processes the network status data to obtain a state vector; the network status data includes network traffic data, service instance data and resource usage data.
[0088] The intelligent network interface card processes the state vector through a reinforcement learning model to obtain a virtual local area network allocation strategy; the virtual local area network allocation strategy includes a virtual local area network label to be allocated.
[0089] When the intelligent network interface card verifies the virtual LAN allocation policy, it sends the virtual LAN allocation policy to the network controller to instruct the network controller to allocate the virtual LAN labels to the corresponding network devices according to the virtual LAN allocation policy.
[0090] The network controller receives a virtual local area network (VLAN) allocation policy sent from an intelligent network interface card; the VLAN allocation policy includes VLAN tags to be allocated; according to the VLAN allocation policy, a routing path for each VLAN tag is obtained; based on the topology of the network device, the routing path is optimized; and according to the priority of the VLAN tag and the optimized routing path, the VLAN tag is allocated to the corresponding network device.
[0091] When service instance data or resource usage data is updated, the intelligent network interface card reacquires network status data, returns to the step of preprocessing the network status data to obtain a state vector, and continues to execute until an updated virtual local area network allocation policy is obtained; when the updated virtual local area network allocation policy is verified to be successful, the updated virtual local area network allocation policy is sent to the network controller.
[0092] The intelligent network interface card obtains the traffic pattern and network behavior corresponding to the historical traffic data; and optimizes the virtual local area network allocation strategy according to the traffic pattern and network behavior.
[0093] In this embodiment, network status data is obtained and preprocessed to obtain a state vector, and the state vector is processed through a reinforcement learning model to obtain a virtual local area network allocation strategy. When the virtual local area network allocation strategy is verified, the virtual local area network allocation strategy is sent to the network controller to instruct the network controller to allocate virtual local area network labels to corresponding network devices according to the virtual local area network allocation strategy. The virtual local area network labels can be adjusted in real time, resource allocation can be optimized, network congestion or resource waste can be avoided, and resource utilization and network efficiency can be improved.
[0094] It should be understood that, although the various steps in the flowcharts involved in the above embodiments are displayed in sequence according to the instructions of the arrows, these steps are not necessarily performed in sequence in the order indicated by the arrows. Unless clearly stated herein, the execution of these steps is not strictly limited in order, and these steps can be performed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily performed at the same time, but can be performed at different times, and the execution order of these steps or stages is not necessarily performed in sequence, but can be performed in turn or alternately with at least a portion of the steps or stages in other steps or other steps. It is understandable that the various steps in different embodiments can be freely combined as needed, and the various non-contradictory schemes formed by the combination all fall within the scope of protection of this application.
[0095] Based on the same inventive concept, embodiments of the present application also provide a virtual local area network (VLAN) allocation device for implementing the aforementioned VLAN allocation method. The solution provided by this device is similar to the solution described in the aforementioned method. Therefore, the specific limitations of one or more VLAN allocation device embodiments provided below can be found in the aforementioned limitations of the VLAN allocation method and will not be further elaborated here.
[0096] In an exemplary embodiment, Figure 5 As shown, a virtual local area network allocation device is provided, including: a data acquisition module 502, a policy acquisition module 504 and a first allocation module 506, wherein:
[0097] The data acquisition module 502 is used to acquire network status data and pre-process the network status data to obtain a state vector; the network status data includes network traffic data, service instance data and resource usage data.
[0098] The strategy acquisition module 504 is configured to process the state vector through a reinforcement learning model to obtain a virtual local area network allocation strategy; the virtual local area network allocation strategy includes a virtual local area network label to be allocated.
[0099] The first allocation module 506 is configured to send the VLAN allocation policy to the network controller if the VLAN allocation policy is verified to instruct the network controller to allocate VLAN labels to corresponding network devices according to the VLAN allocation policy.
[0100] In an exemplary embodiment, the strategy acquisition module 504 is also used to obtain historical traffic data and historical service load data, and build a virtual network environment based on the historical traffic data and historical service load data; in the virtual network environment, the historical status data at the target moment is obtained, and the historical status data is used as the input of the reinforcement learning model, and the simulated allocation strategy is output; based on the historical traffic data and historical service load data, the simulation action results corresponding to the simulated allocation strategy are obtained; based on the simulation action results, the reward value is obtained, and based on the reward value, the model parameters of the reinforcement learning model are adjusted, and the step of obtaining the historical status data at the target moment is returned to, and the execution is continued until the reinforcement learning model training is completed.
[0101] In an exemplary embodiment, the first allocation module 506 is also used to re-acquire network status data when there is an update to service instance data or resource usage data, return to the step of pre-processing the network status data to obtain a state vector, and continue to execute until an updated virtual LAN allocation policy is obtained; if the updated virtual LAN allocation policy is verified to be successful, the updated virtual LAN allocation policy is sent to the network controller.
[0102] In an exemplary embodiment, the first allocation module 506 is further configured to obtain traffic patterns and network behaviors corresponding to historical traffic data; and optimize the virtual local area network allocation strategy according to the traffic patterns and network behaviors.
[0103] In an exemplary embodiment, Figure 6 As shown, a virtual local area network allocation device is provided, including: a policy receiving module 602 and a second allocation module 604, wherein:
[0104] The policy receiving module 602 is configured to receive a virtual local area network allocation policy sent from an intelligent network interface card; the virtual local area network allocation policy includes a virtual local area network tag to be allocated.
[0105] The second allocation module 604 is configured to allocate the VLAN labels to corresponding network devices according to the VLAN allocation policy.
[0106] In an exemplary embodiment, the second allocation module 604 is also used to obtain the routing path of each virtual LAN label according to the virtual LAN allocation policy; optimize the routing path based on the topology of the network device; and allocate the virtual LAN label to the corresponding network device according to the priority of the virtual LAN label and the optimized routing path.
[0107] Each module in the aforementioned virtual local area network allocation device may be implemented in whole or in part through software, hardware, or a combination thereof. Each module may be embedded in or independent of a processor within a computer device in the form of hardware, or may be stored in a computer device memory in the form of software, so that the processor can call and execute the corresponding operations of each module.
[0108] In an exemplary embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as shown in FIG. Figure 7 As shown. The computer device includes a processor, memory, an input / output interface, a communication interface, a display unit, and an input device. The processor, memory, and input / output interface are connected via a system bus, and the communication interface, display unit, and input device are connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used to communicate with external terminals via wired or wireless means, and the wireless means can be implemented via Wi-Fi, a mobile cellular network, near-field communication (NFC), or other technologies. When executed by the processor, the computer program implements a virtual local area network allocation method. The display unit of the computer device is used to form a visually visible image and can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device casing, or an external keyboard, touchpad or mouse.
[0109] Those skilled in the art will understand that Figure 7 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
[0110] In an exemplary embodiment, a computer device is provided, comprising a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented: obtaining network status data and preprocessing the network status data to obtain a state vector; the network status data includes network traffic data, service instance data, and resource usage data; processing the state vector through a reinforcement learning model to obtain a virtual local area network allocation strategy; the virtual local area network allocation strategy includes a virtual local area network label to be allocated; and when the virtual local area network allocation strategy is verified, sending the virtual local area network allocation strategy to a network controller to instruct the network controller to allocate the virtual local area network label to the corresponding network device according to the virtual local area network allocation strategy.
[0111] In one embodiment, the training process of the reinforcement learning model involved in the execution of a computer program by a processor includes: obtaining historical traffic data and historical service load data, and constructing a virtual network environment based on the historical traffic data and historical service load data; in the virtual network environment, obtaining historical status data at a target moment, using the historical status data as input to the reinforcement learning model, and outputting a simulated allocation strategy; obtaining simulation action results corresponding to the simulated allocation strategy based on the historical traffic data and historical service load data; obtaining a reward value based on the simulation action result, and adjusting the model parameters of the reinforcement learning model based on the reward value, returning to the step of obtaining the historical status data at the target moment, and continuing execution until the reinforcement learning model training is completed.
[0112] In one embodiment, when executing the computer program, the processor further implements the following steps: when there is an update in the service instance data or the resource usage data, reacquires the network status data, returns to the step of preprocessing the network status data to obtain the state vector, and continues to execute until an updated virtual LAN allocation policy is obtained; when the updated virtual LAN allocation policy is verified, sends the updated virtual LAN allocation policy to the network controller.
[0113] In one embodiment, when executing the computer program, the processor further implements the following steps: obtaining traffic patterns and network behaviors corresponding to historical traffic data; and optimizing the virtual local area network allocation strategy according to the traffic patterns and network behaviors.
[0114] In an exemplary embodiment, a computer device is provided, comprising a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented: receiving a virtual local area network (VLAN) allocation policy sent from an intelligent network interface card; the virtual local area network (VLAN) allocation policy includes a virtual local area network (VLAN) tag to be allocated; and allocating the virtual local area network tag to a corresponding network device according to the virtual local area network allocation policy.
[0115] In one embodiment, the processor executes a computer program that allocates virtual local area network (VLAN) tags to corresponding network devices according to a VLAN allocation policy, including: obtaining a routing path for each VLAN tag according to the VLAN allocation policy; optimizing the routing path based on a topological structure of the network device; and allocating the VLAN tag to the corresponding network device according to a priority of the VLAN tag and the optimized routing path.
[0116] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented: obtaining network status data and preprocessing the network status data to obtain a state vector; the network status data includes network traffic data, service instance data, and resource usage data; processing the state vector through a reinforcement learning model to obtain a virtual local area network allocation strategy; the virtual local area network allocation strategy includes a virtual local area network label to be allocated; and when the virtual local area network allocation strategy is verified, sending the virtual local area network allocation strategy to a network controller to instruct the network controller to allocate the virtual local area network label to a corresponding network device according to the virtual local area network allocation strategy.
[0117] In one embodiment, the training process of the reinforcement learning model involved when the computer program is executed by the processor includes: obtaining historical traffic data and historical service load data, and building a virtual network environment based on the historical traffic data and historical service load data; in the virtual network environment, obtaining historical status data at the target moment, using the historical status data as input to the reinforcement learning model, and outputting a simulated allocation strategy; obtaining simulation action results corresponding to the simulated allocation strategy based on the historical traffic data and historical service load data; obtaining a reward value based on the simulation action result, and adjusting the model parameters of the reinforcement learning model based on the reward value, returning to the step of obtaining the historical status data at the target moment, and continuing execution until the reinforcement learning model training is completed.
[0118] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: when there is an update in the service instance data or the resource usage data, the network status data is reacquired, the step of preprocessing the network status data to obtain a state vector is returned, and the execution is continued until an updated virtual local area network allocation policy is obtained; when the updated virtual local area network allocation policy is verified, the updated virtual local area network allocation policy is sent to the network controller.
[0119] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: obtaining traffic patterns and network behaviors corresponding to historical traffic data; and optimizing the virtual local area network allocation strategy according to the traffic patterns and network behaviors.
[0120] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented: receiving a virtual local area network allocation policy sent from an intelligent network interface card; the virtual local area network allocation policy includes a virtual local area network tag to be allocated; and allocating the virtual local area network tag to a corresponding network device according to the virtual local area network allocation policy.
[0121] In one embodiment, when a computer program is executed by a processor, the steps involved in allocating virtual local area network (VLAN) tags to corresponding network devices according to a VLAN allocation policy include: obtaining a routing path for each VLAN tag according to the VLAN allocation policy; optimizing the routing path based on a topological structure of the network device; and allocating the VLAN tag to the corresponding network device according to a priority of the VLAN tag and the optimized routing path.
[0122] In one embodiment, a computer program product is provided, comprising a computer program that, when executed by a processor, implements the following steps: obtaining network status data and preprocessing the network status data to obtain a state vector; the network status data includes network traffic data, service instance data, and resource usage data; processing the state vector using a reinforcement learning model to obtain a virtual local area network allocation policy; the virtual local area network allocation policy includes a virtual local area network label to be allocated; and, if the virtual local area network allocation policy is verified to be successful, sending the virtual local area network allocation policy to a network controller to instruct the network controller to allocate the virtual local area network label to a corresponding network device according to the virtual local area network allocation policy.
[0123] In one embodiment, the training process of the reinforcement learning model involved when the computer program is executed by the processor includes: obtaining historical traffic data and historical service load data, and building a virtual network environment based on the historical traffic data and historical service load data; in the virtual network environment, obtaining historical status data at the target moment, using the historical status data as input to the reinforcement learning model, and outputting a simulated allocation strategy; obtaining simulation action results corresponding to the simulated allocation strategy based on the historical traffic data and historical service load data; obtaining a reward value based on the simulation action result, and adjusting the model parameters of the reinforcement learning model based on the reward value, returning to the step of obtaining the historical status data at the target moment, and continuing execution until the reinforcement learning model training is completed.
[0124] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: when there is an update in the service instance data or the resource usage data, the network status data is reacquired, the step of preprocessing the network status data to obtain a state vector is returned, and the execution is continued until an updated virtual local area network allocation policy is obtained; when the updated virtual local area network allocation policy is verified, the updated virtual local area network allocation policy is sent to the network controller.
[0125] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: obtaining traffic patterns and network behaviors corresponding to historical traffic data; and optimizing the virtual local area network allocation strategy according to the traffic patterns and network behaviors.
[0126] In one embodiment, a computer program product is provided, comprising a computer program that, when executed by a processor, implements the following steps: receiving a virtual local area network (VLAN) allocation policy sent from an intelligent network interface card; the VLAN allocation policy includes a VLAN tag to be allocated; and allocating the VLAN tag to a corresponding network device according to the VLAN allocation policy.
[0127] In one embodiment, when a computer program is executed by a processor, the steps involved in allocating virtual local area network (VLAN) tags to corresponding network devices according to a VLAN allocation policy include: obtaining a routing path for each VLAN tag according to the VLAN allocation policy; optimizing the routing path based on a topological structure of the network device; and allocating the VLAN tag to the corresponding network device according to a priority of the VLAN tag and the optimized routing path.
[0128] Those skilled in the art will understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. In particular, any reference to memory, database, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The databases involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the various embodiments provided herein may be, but are not limited to, general-purpose processors, central processing units (CPUs), graphics processing units (GPUs), digital signal processors (DSPs), programmable logic devices (PLDs), quantum computing-based data processing logic devices, artificial intelligence (AI) processors, and the like.
[0129] The technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0130] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present application. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.
Claims
1. A virtual local area network allocation method, characterized in that: Applied to an intelligent network interface card; the method comprises: Acquire network status data and preprocess the network status data to obtain a state vector; the network status data includes network traffic data, service instance data, and resource usage data; Processing the state vector through a reinforcement learning model to obtain a virtual local area network allocation strategy; the virtual local area network allocation strategy includes a virtual local area network label to be allocated; When the virtual local area network allocation policy is verified to be successful, the virtual local area network allocation policy is sent to a network controller to instruct the network controller to allocate the virtual local area network label to a corresponding network device according to the virtual local area network allocation policy.
2. The method according to claim 1, characterized in that The training process of the reinforcement learning model includes: Acquiring historical traffic data and historical service load data, and building a virtual network environment based on the historical traffic data and the historical service load data; In the virtual network environment, historical state data at a target time is obtained, the historical state data is used as input to a reinforcement learning model, and a simulated allocation strategy is obtained as output; Obtaining simulation action results corresponding to the simulation allocation strategy according to the historical traffic data and the historical service load data; According to the simulation action result, a reward value is obtained, and according to the reward value, the model parameters of the reinforcement learning model are adjusted, and the step of obtaining the historical state data at the target moment is returned to, and the execution is continued until the reinforcement learning model training is completed.
3. The method according to claim 1, characterized in that The method further comprises: When the service instance data or the resource usage data is updated, reacquiring the network status data, returning to the step of preprocessing the network status data to obtain the state vector, and continuing the process until an updated virtual local area network allocation strategy is obtained; When the updated virtual local area network allocation policy is verified to be successful, the updated virtual local area network allocation policy is sent to the network controller.
4. The method according to claim 2, characterized in that The method further comprises: Obtaining traffic patterns and network behaviors corresponding to the historical traffic data; The virtual local area network allocation strategy is optimized based on the traffic pattern and the network behavior.
5. A virtual local area network allocation method, characterized in that: Applied to a network controller; the method comprises: Receiving a virtual local area network allocation policy sent from an intelligent network interface card; the virtual local area network allocation policy includes a virtual local area network tag to be allocated; According to the virtual local area network allocation strategy, the virtual local area network label is allocated to the corresponding network device.
6. The method according to claim 5, characterized in that Allocating the virtual local area network label to the corresponding network device according to the virtual local area network allocation policy includes: Obtaining a routing path for each virtual local area network label according to the virtual local area network allocation strategy; Optimizing the routing path based on the topology of the network devices; The virtual local area network label is allocated to a corresponding network device according to the priority of the virtual local area network label and the optimized routing path.
7. A virtual local area network distribution system, characterized in that: include: An intelligent network interface card, communicating with a network controller, is configured to obtain network status data and pre-process the network status data to obtain a state vector; the network status data includes network traffic data, service instance data, and resource usage data; the state vector is processed using a reinforcement learning model to obtain a virtual local area network allocation policy; the virtual local area network allocation policy includes a virtual local area network label to be allocated; and upon verification of the virtual local area network allocation policy, the virtual local area network allocation policy is sent to the network controller; The network controller is configured to receive a virtual local area network allocation policy sent from an intelligent network interface card; and allocate the virtual local area network labels to corresponding network devices according to the virtual local area network allocation policy.
8. A virtual local area network allocation device, characterized in that: Applicable to an intelligent network interface card; the device includes: A data acquisition module is used to acquire network status data and pre-process the network status data to obtain a state vector; the network status data includes network traffic data, service instance data and resource usage data; a strategy acquisition module, configured to process the state vector through a reinforcement learning model to obtain a virtual local area network allocation strategy; the virtual local area network allocation strategy includes a virtual local area network label to be allocated; The first allocation module is configured to send the virtual LAN allocation policy to the network controller if the virtual LAN allocation policy is verified to instruct the network controller to allocate the virtual LAN label to the corresponding network device according to the virtual LAN allocation policy.
9. A virtual local area network allocation device, characterized in that: Applicable to a network controller; the device comprises: A policy receiving module, configured to receive a virtual local area network allocation policy sent from an intelligent network interface card; the virtual local area network allocation policy includes a virtual local area network tag to be allocated; The second allocation module is configured to allocate the virtual local area network label to a corresponding network device according to the virtual local area network allocation policy.
10. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Cited By
Virtual network configuration method and device, equipment, storage medium and program product
CN121000605A
