Disclosure of Invention
In view of this, an object of the present application is to provide an SDN network data transmission method, an SDN network, a device, and a medium, which can generate a relatively accurate flow table, thereby reducing the matching times between a network traffic and the flow table, and improving network traffic forwarding efficiency, and directly issue the generated flow table to a data plane of a kernel state, without switching between the kernel state and a user state in a network traffic forwarding process, so as to further improve network traffic forwarding efficiency. The specific scheme is as follows:
in a first aspect, the present application discloses a SDN network data transmission method, including:
generating a routing strategy by a management surface in an SDN network by using a target routing strategy model obtained in advance based on machine learning training, and issuing the routing strategy to a control surface in the SDN network;
generating a flow table through the control plane based on the routing strategy, and issuing the flow table to a data plane of a kernel state in the SDN network;
and storing the flow table through the data surface, and forwarding the input network flow based on the flow table when the input network flow is received.
Optionally, before the generating, by a management plane in the SDN network, a routing policy by using a target routing policy model obtained in advance based on machine learning training, the method further includes:
and training a preset machine learning model by using a pre-acquired data set to obtain the target routing strategy model, wherein the data set comprises a training data set and a testing data set.
Optionally, the machine learning model is any one of a decision tree, a random forest, a neural network, a hidden markov model, and a self-organizing map.
Optionally, the training a preset machine learning model by using a pre-obtained data set to obtain the target routing policy model includes:
training a preset machine learning model by using a training data set in a pre-acquired data set to obtain a routing strategy model to be tested;
and testing and optimizing the routing strategy model to be tested by using the test data set in the data set to obtain the target routing strategy model.
Optionally, the training a preset machine learning model by using a training data set in a pre-acquired data set to obtain a routing strategy model to be tested, including:
performing feature extraction on a training data set in a pre-acquired data set to obtain quintuple information corresponding to each network data in the training data set;
and training a preset machine learning model by utilizing quintuple information corresponding to each network data to obtain a routing strategy model to be tested.
Optionally, the storing, by the data plane, the flow table, and forwarding, when receiving an input network traffic, the input network traffic based on the flow table includes:
storing the flow table through the data plane;
extracting quintuple information in input network flow when the input network flow is received;
matching the extracted quintuple information in the input network flow with the flow table, and forwarding the input network flow based on a matching result.
In a second aspect, the present application discloses an SDN network, comprising:
the management surface is used for generating a routing strategy by utilizing a target routing strategy model obtained in advance based on machine learning training and issuing the routing strategy to the control surface in the SDN network;
the control plane is used for generating a flow table based on the routing strategy and issuing the flow table to a data plane of a kernel state in the SDN network;
and the data surface is used for storing the flow table and forwarding the input network flow based on the flow table when the input network flow is received.
Optionally, the management plane is configured to:
and training a preset machine learning model by using a pre-acquired data set to obtain the target routing strategy model, wherein the data set comprises a training data set and a testing data set.
In a third aspect, the present application discloses an electronic device, comprising:
a memory and a processor;
wherein the memory is used for storing a computer program;
the processor is configured to execute the computer program to implement the SDN network data transmission method disclosed in the foregoing.
In a fourth aspect, the present application discloses a computer readable storage medium for storing a computer program, wherein the computer program when executed by a processor implements the SDN network data transmission method disclosed in the foregoing.
In this application, a management plane in an SDN network generates a routing policy by using a target routing policy model obtained in advance based on machine learning training, and issues the routing policy to a control plane in the SDN network; generating a flow table through the control plane based on the routing strategy, and issuing the flow table to a data plane of a kernel state in the SDN network; and storing the flow table through the data surface, and forwarding the input network flow based on the flow table when the input network flow is received. It can be seen that, in the present application, a routing policy is generated by a target router policy generation model, which is obtained based on machine learning training in advance, in a management plane of an SDN network, and then the routing policy is issued to a control plane in the SDN network, the control plane may generate a flow table based on the routing policy and issue the flow table to a data plane in a kernel state in the SDN network, and when receiving an input network traffic, the data plane may forward the input network traffic based on the flow table, so that since the routing policy model obtained based on machine learning training in advance may generate a routing policy that is more matched with a current SDN network, the flow table issued based on the routing policy may be more accurate, thereby reducing the matching times of the network traffic and the flow table, and thus reducing the matching times of the network traffic and the flow table, the network flow forwarding efficiency is improved, the generated flow tables are directly issued to the data plane of the kernel mode, switching between the kernel mode and the user mode is not needed in the network flow forwarding process, and the network flow forwarding efficiency is further improved.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Referring to fig. 1, an embodiment of the present application discloses an SDN network data transmission method, including:
step S11: generating a routing strategy by a management surface in the SDN by using a target routing strategy model obtained in advance based on machine learning training, and issuing the routing strategy to a control surface in the SDN.
In practical application, a management plane in an SDN network needs to generate a routing policy by using a target routing policy model obtained in advance based on machine learning training, and issue the routing policy to a control plane in the SDN network.
That is, a management plane in a user state needs to generate a routing policy corresponding to the SDN network by using a target routing policy model obtained based on machine learning training in advance, and then issue the generated routing policy to a control plane in the SDN network, so that the control plane generates a flow table by using the routing policy.
Step S12: and generating a flow table through the control plane based on the routing strategy, and issuing the flow table to a data plane of a kernel state in the SDN network.
Correspondingly, the control plane needs to receive the routing policy issued by the management plane, and generates a flow table based on the routing policy, where the flow table is used to transmit network traffic, and after the flow table is generated, the flow table needs to be issued to a data plane located in a kernel state in the SDN network, so that the data plane stores the flow table for subsequent network traffic transmission.
Therefore, after the control plane generates the flow table, the generated flow table is directly issued to the data plane of the kernel mode, the data plane can be directly forwarded based on the flow table in the data plane after receiving the network flow, and compared with the prior art that the flow table is not hit in the data plane, the kernel mode and the user mode need not be switched back and forth, the method and the device do not need to be switched back and forth between the user mode and the kernel mode, the processing time of the network flow in the SDN network is saved, and the data transmission efficiency is improved.
Step S13: and storing the flow table through the data surface, and forwarding the input network flow based on the flow table when the input network flow is received.
Correspondingly, the data plane needs to receive the flow table issued by the control plane, store the flow table, and forward the input network traffic based on the flow table when receiving the input network traffic. Specifically, the data plane stores the flow table; when receiving input network flow, extracting quintuple information in the input network flow; matching the extracted quintuple information in the input network flow with the flow table, and forwarding the input network flow based on a matching result.
The quintuple in the quintuple information is a communication term, and generally refers to a source IP (Internet Protocol Address), a source port, a destination IP Address, a destination port, and a transport layer Protocol.
Since the target route generation model in the management plane generates the route policy for the SDN network, the control plane also generates the flow table for the SDN network, so that the generated flow table can be more accurate, thereby reducing the matching times of the input network traffic and the flow table, reducing the matching times of the network traffic and the flow table, and improving the network traffic forwarding efficiency.
In this application, a management plane in an SDN network generates a routing policy by using a target routing policy model obtained in advance based on machine learning training, and issues the routing policy to a control plane in the SDN network; generating a flow table through the control plane based on the routing strategy, and issuing the flow table to a data plane of a kernel state in the SDN network; and storing the flow table through the data surface, and forwarding the input network flow based on the flow table when the input network flow is received. It can be seen that, in the present application, a routing policy is generated by a target router policy generation model, which is obtained based on machine learning training in advance, in a management plane of an SDN network, and then the routing policy is issued to a control plane in the SDN network, the control plane may generate a flow table based on the routing policy and issue the flow table to a data plane in a kernel state in the SDN network, and when receiving an input network traffic, the data plane may forward the input network traffic based on the flow table, so that since the routing policy model obtained based on machine learning training in advance may generate a routing policy that is more matched with a current SDN network, the flow table issued based on the routing policy may be more accurate, thereby reducing the matching times of the network traffic and the flow table, and thus reducing the matching times of the network traffic and the flow table, the network flow forwarding efficiency is improved, the generated flow tables are directly issued to the data plane of the kernel mode, switching between the kernel mode and the user mode is not needed in the network flow forwarding process, and the network flow forwarding efficiency is further improved.
Referring to fig. 2, an embodiment of the present application discloses a specific SDN network data transmission method, where the method includes:
step S21: and training a preset machine learning model by using a pre-acquired data set to obtain the target routing strategy model, wherein the data set comprises a training data set and a testing data set.
In a specific implementation process, a preset machine learning model needs to be trained by using a pre-acquired data set to obtain the target routing strategy model, wherein the data set comprises a training data set and a testing data set. The machine learning model is any one of a decision tree, a random forest, a neural network, a hidden Markov model and a self-organizing map, and can be determined according to actual conditions.
Specifically, training a preset machine learning model by using a pre-acquired data set to obtain the target routing strategy model, including: training a preset machine learning model by using a training data set in a pre-acquired data set to obtain a routing strategy model to be tested; and testing and optimizing the routing strategy model to be tested by using the test data set in the data set to obtain the target routing strategy model.
That is, the preset machine learning model is trained by using the data in the training data set, and then the trained machine learning model is tested and optimized by using the data in the testing data set until the output of the machine learning model meets a preset condition, for example, the output error is smaller than a preset error, and the target route generation strategy is obtained.
The method includes the following steps that a preset machine learning model is trained by using a training data set in a pre-acquired data set, and a routing strategy model to be tested is obtained, and the method includes the following steps: performing feature extraction on a training data set in a pre-acquired data set to obtain quintuple information corresponding to each network data in the training data set; and training a preset machine learning model by utilizing quintuple information corresponding to each network data to obtain a routing strategy model to be tested.
That is, extracting quintuple information from the network data in the test data set to obtain quintuple information corresponding to each network data in the training data set, and then training a preset machine learning model by using the quintuple information corresponding to each network data to obtain a to-be-tested routing strategy model.
Referring to fig. 3, a flow chart of machine learning model training is shown. The method comprises the steps of firstly extracting quintuple information from data in a training data set, training a machine learning model by using the extracted quintuple information, extracting the quintuple information in a testing data set, and then testing and optimizing the trained machine learning model by using the extracted quintuple information to obtain a target routing strategy model.
Step S22: and generating a routing strategy by using the target routing strategy model through a management surface in the SDN network, and issuing the routing strategy to a control surface in the SDN network.
Step S23: and generating a flow table through the control plane based on the routing strategy, and issuing the flow table to a data plane of a kernel state in the SDN network.
Step S24: and storing the flow table through the data surface, and forwarding the input network flow based on the flow table when the input network flow is received.
And after the data plane receives the flow table, the flow table is stored, and when input network flow is received, the input network flow can be forwarded based on the flow table. The incoming network traffic is also a data packet.
That is, as shown in fig. 4, when a packet is obtained, the packet may be parsed to extract five-tuple information, and then the extracted five-tuple information in the packet is matched with the flow table, and corresponding actions, such as discarding, forwarding, and the like, are performed based on a matching result, and then the packet is output.
Referring to fig. 5, an overall block diagram of SDN network data transmission is shown. A machine learning module in a management surface of the SDN network utilizes data set training to obtain a target routing strategy model, a routing strategy is generated by the target routing strategy model and issued to a control surface, the control surface generates a flow table based on the routing strategy and issues the flow table to a data surface, and the data surface receives data and outputs the data based on the flow table.
Referring to fig. 6, an embodiment of the present application discloses an SDN network, including:
themanagement surface 11 is configured to generate a routing policy by using a target routing policy model obtained in advance based on machine learning training, and issue the routing policy to a control surface in the SDN network;
thecontrol plane 12 is configured to generate a flow table based on the routing policy, and issue the flow table to a data plane of a kernel state in the SDN network;
thedata plane 13 is configured to store the flow table, and forward the input network traffic based on the flow table when the input network traffic is received.
In this application, a management plane in an SDN network generates a routing policy by using a target routing policy model obtained in advance based on machine learning training, and issues the routing policy to a control plane in the SDN network; generating a flow table through the control plane based on the routing strategy, and issuing the flow table to a data plane of a kernel state in the SDN network; and storing the flow table through the data surface, and forwarding the input network flow based on the flow table when the input network flow is received. It can be seen that, in the present application, a routing policy is generated by a target router policy generation model, which is obtained based on machine learning training in advance, in a management plane of an SDN network, and then the routing policy is issued to a control plane in the SDN network, the control plane may generate a flow table based on the routing policy and issue the flow table to a data plane in a kernel state in the SDN network, and when receiving an input network traffic, the data plane may forward the input network traffic based on the flow table, so that since the routing policy model obtained based on machine learning training in advance may generate a routing policy that matches a current SDN network, the flow table issued based on the routing policy may be made more accurate, thereby reducing the matching times of the network traffic and the flow table, and thus reducing the matching times of the network traffic and the flow table, the network flow forwarding efficiency is improved, the generated flow tables are directly issued to the data plane of the kernel mode, switching between the kernel mode and the user mode is not needed in the network flow forwarding process, and the network flow forwarding efficiency is further improved.
In some specific implementations, themanagement plane 11 is configured to:
and training a preset machine learning model by using a pre-acquired data set to obtain the target routing strategy model, wherein the data set comprises a training data set and a testing data set.
In some specific implementations, the machine learning model is any one of a decision tree, a random forest, a neural network, a hidden markov model, and a self-organizing map.
In some specific implementations, themanagement plane 11 is configured to:
training a preset machine learning model by using a training data set in a pre-acquired data set to obtain a routing strategy model to be tested;
and testing and optimizing the routing strategy model to be tested by using the test data set in the data set to obtain the target routing strategy model.
In some specific implementations, themanagement plane 11 is configured to:
performing feature extraction on a training data set in a pre-acquired data set to obtain quintuple information corresponding to each network data in the training data set;
and training a preset machine learning model by utilizing quintuple information corresponding to each network data to obtain a routing strategy model to be tested.
In some specific implementations, thedata plane 13 is configured to:
storing the flow table;
extracting quintuple information in input network flow when the input network flow is received;
matching the extracted quintuple information in the input network flow with the flow table, and forwarding the input network flow based on a matching result.
Referring to fig. 7, a schematic structural diagram of anelectronic device 20 provided in the embodiment of the present application is shown, where theelectronic device 20 may be a server, a notebook computer, a desktop computer, or the like, and may implement the SDN network data transmission method steps disclosed in the foregoing embodiment.
In general, theelectronic device 20 in the present embodiment includes: aprocessor 21 and a memory 22.
Theprocessor 21 may include one or more processing cores, such as a four-core processor, an eight-core processor, and so on. Theprocessor 21 may be implemented by at least one hardware of a DSP (digital signal processing), an FPGA (field-programmable gate array), and a PLA (programmable logic array). Theprocessor 21 may also include a main processor and a coprocessor, where the main processor is a processor for processing data in an awake state, and is also called a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, theprocessor 21 may be integrated with a GPU (graphics processing unit) which is responsible for rendering and drawing images to be displayed on the display screen. In some embodiments, theprocessor 21 may include an AI (artificial intelligence) processor for processing computing operations related to machine learning.
Memory 22 may include one or more computer-readable storage media, which may be non-transitory. Memory 22 may also include high speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In this embodiment, the memory 22 is at least used for storing a computer program 221, wherein after being loaded and executed by theprocessor 21, the computer program is capable of implementing the SDN network data transmission method steps disclosed in any of the foregoing embodiments.
In some embodiments, theelectronic device 20 may further include a display 23, an input/output interface 24, acommunication interface 25, a sensor 26, a power supply 27, and a communication bus 28.
Those skilled in the art will appreciate that the configuration shown in FIG. 7 is not limiting ofelectronic device 20 and may include more or fewer components than those shown.
Further, an embodiment of the present application also discloses a computer readable storage medium for storing a computer program, wherein the computer program, when executed by a processor, implements the following steps:
generating a routing strategy by a management surface in an SDN network by using a target routing strategy model obtained in advance based on machine learning training, and issuing the routing strategy to a control surface in the SDN network; generating a flow table through the control plane based on the routing strategy, and issuing the flow table to a data plane of a kernel state in the SDN network; and storing the flow table through the data surface, and forwarding the input network flow based on the flow table when the input network flow is received.
In this application, a management plane in an SDN network generates a routing policy by using a target routing policy model obtained in advance based on machine learning training, and issues the routing policy to a control plane in the SDN network; generating a flow table through the control plane based on the routing strategy, and issuing the flow table to a data plane of a kernel state in the SDN network; and storing the flow table through the data surface, and forwarding the input network flow based on the flow table when the input network flow is received. It can be seen that, in the present application, a routing policy is generated by a target router policy generation model, which is obtained based on machine learning training in advance, in a management plane of an SDN network, and then the routing policy is issued to a control plane in the SDN network, the control plane may generate a flow table based on the routing policy and issue the flow table to a data plane in a kernel state in the SDN network, and when receiving an input network traffic, the data plane may forward the input network traffic based on the flow table, so that since the routing policy model obtained based on machine learning training in advance may generate a routing policy that is more matched with a current SDN network, the flow table issued based on the routing policy may be more accurate, thereby reducing the matching times of the network traffic and the flow table, and thus reducing the matching times of the network traffic and the flow table, the network flow forwarding efficiency is improved, the generated flow tables are directly issued to the data plane of the kernel mode, switching between the kernel mode and the user mode is not needed in the network flow forwarding process, and the network flow forwarding efficiency is further improved.
In this embodiment, when the computer subprogram stored in the computer-readable storage medium is executed by the processor, the following steps may be specifically implemented: and training a preset machine learning model by using a pre-acquired data set to obtain the target routing strategy model, wherein the data set comprises a training data set and a testing data set.
In this embodiment, when the computer subprogram stored in the computer-readable storage medium is executed by the processor, the following steps may be specifically implemented: training a preset machine learning model by using a training data set in a pre-acquired data set to obtain a routing strategy model to be tested; and testing and optimizing the routing strategy model to be tested by using the test data set in the data set to obtain the target routing strategy model.
In this embodiment, when the computer subprogram stored in the computer-readable storage medium is executed by the processor, the following steps may be specifically implemented: performing feature extraction on a training data set in a pre-acquired data set to obtain quintuple information corresponding to each network data in the training data set; and training a preset machine learning model by utilizing quintuple information corresponding to each network data to obtain a routing strategy model to be tested.
In this embodiment, when the computer subprogram stored in the computer-readable storage medium is executed by the processor, the following steps may be specifically implemented: storing the flow table through the data plane; extracting quintuple information in input network flow when the input network flow is received; matching the extracted quintuple information in the input network flow with the flow table, and forwarding the input network flow based on a matching result.
The embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
Finally, it is further noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of other elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The SDN network data transmission method, the SDN network, the device, and the medium provided by the present application are introduced in detail above, and a specific example is applied in the present application to explain the principle and the implementation of the present application, and the description of the above embodiment is only used to help understanding the method and the core idea of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.