Disclosure of Invention
The invention aims to solve the problems that the existing SDN architecture cannot realize flexible routing strategies due to the limitation of a bottom network structure and has high requirements on network hardware resources in the process of storing and forwarding flow table items, and provides an SDN routing method and a routing system based on virtual network mapping.
To achieve the above objective, the present invention provides an SDN routing method based on virtual network mapping, where the method includes:
constructing a topological structure of a virtual network, wherein the topological structure comprises virtual nodes and virtual links;
Converting the user routing request into a flow table entry by using the SDN controller, and distributing the flow table entry to a virtual node in the virtual network;
calculating the resource quantity required by each allocated flow table item when executing routing, generating a virtual network mapping request according to the resource quantity, and mapping the virtual network to the bottom network equipment;
The flow table items are stored in a flow table tree with a multi-way tree structure, and are distributed on different types of nodes in the flow table tree according to different granularities, the flow table items on the middle node of the flow table tree record the sub-flow table item intervals contained in the flow table items, and the flow table items on the leaf nodes correspond to the user routing requests;
determining the assigned virtual node according to the path of the flow table item in the flow table tree;
The virtual network and the flow table tree are synchronously expanded along with the newly added flow table items.
Further preferably, the multi-tree structure flow table tree is a k-tree structure flow table tree, the SDN controller is set on the root node, k sub-nodes of the SDN controller store flow table entries with maximum granularity in the whole flow table tree, and each leaf node store flow table entries with minimum granularity in the whole flow table tree.
Further preferably, the topology of the virtual network is recursively extended by a level 1 networking;
The 1-level networking comprises a central switch and k edge switches, wherein all the edge switches are scattered on the periphery of the central switch and are connected with the central switch;
Wherein the n-level networking is formed by expanding all edge switches on the n-1 level networking into 1 level networking, and the n-level networking Edge switches and/>, on the nth layer in the flow table treeThe nodes correspond one by one.
Further preferably, the calculation process of the resource amount is:
Setting resource quantity attributes including the resource storage quantity, the resource calculation quantity and the resource occupation time length, and setting corresponding weight coefficients for the resource quantity attributes;
Carrying out standardization and normalization processing on the resource storage amount, the resource calculation amount and the resource occupation time length;
weighting and summing the normalization processing results by using the weight coefficient, and taking the weighted sum as the amount of resources required by executing routing;
the resource storage amount is determined according to the length of the data stream of the user request route;
the resource calculated amount is obtained according to the control instruction of the control instruction field in the flow table item matched with the data flow;
the resource occupancy time is determined by the effective time in the flow entry.
Further preferably, the procedure of storing the flow table entry in the flow table tree is as follows:
step 1-1), sorting the flow table items according to the amount of resources required by the flow table items to form a flow table sequence;
Step 1-2) extracting stream table items from the stream table sequence in sequence, alternately executing positive sequence and reverse sequence allocation, and loading the extracted stream table items into each child node of the root node one by one;
step 1-3) forming the stream list items allocated to each sub-node into a new stream list sequence, and continuously loading the stream list items to other sub-nodes contained in the current sub-node according to the allocation mode of step 1-2) until the stream list items are loaded into the leaf nodes.
Preferably, the process of storing the flow table item in the flow table tree is as follows:
step 2-1), calculating the preference degree of the data flow of the user request route to the resource quantity attribute by using the resource preference function;
step 2-2) selecting the resource quantity attribute with the highest preference degree as a preference object of the current data stream, and loading stream table items matched with the data stream into a corresponding preference object set;
step 2-3) establishing a flow table subtree for each resource amount attribute in the flow table tree, and distributing each preference object set to the corresponding flow table subtree;
Step 2-4) sorting elements in each preference object set according to the amount of resources required by the flow table entry to form a flow table sequence;
Step 2-5) extracting stream table items from the stream table sequence in sequence, alternately executing a positive sequence and a reverse sequence allocation mode, and loading the extracted stream table items into all child nodes of the stream table subtree one by one;
Step 2-6) forming the stream list items allocated to each sub-node into a new stream list sequence, and continuously loading the stream list items to other sub-nodes contained in the current sub-node according to the allocation mode of step 2-5) until the stream list items are loaded into the leaf nodes.
The invention also provides an SDN routing system based on the virtual network mapping, which comprises: the system comprises a network construction server, a user application terminal, an SDN controller and a network mapping server;
network construction server: the method comprises the steps of connecting a southbound interface of an SDN system structure with an SDN controller to construct a topological structure of a virtual network, wherein the topological structure comprises virtual nodes and virtual links;
User application terminal: the method comprises the steps of connecting a north interface of an SDN architecture with an SDN controller, and generating a user routing request according to application requirements;
SDN controller: the method comprises the steps of converting a user routing request into stream table entries, distributing the stream table entries to virtual nodes in a virtual network, calculating the resource amount required by each distributed stream table entry when routing is executed, and sending the resource amount to a network construction server;
Network mapping server: connecting with a network construction server, generating a virtual network mapping request according to the resource quantity, and mapping the virtual network to the bottom network equipment;
The flow table items are stored in a flow table tree with a multi-way tree structure, each flow table item is distributed on different nodes in the flow table tree according to different granularities, the flow table item on the middle node records the sub-flow table item interval contained in the flow table item, and the flow table item on the leaf node corresponds to a user routing request;
determining the assigned virtual node according to the path of the flow table item in the flow table tree;
The virtual network and the flow table tree are synchronously expanded along with the newly added flow table items.
The beneficial effects of the invention are as follows:
The invention changes the connection object in the original SDN architecture, establishes a virtual network in a forwarding layer, connects the virtual network with an SDN controller of a control layer, abstracts a bottom physical network on the virtual network, enables the SDN controller not to directly issue a flow table to physical equipment but to a virtual node with an abstract structure, provides routing service for the forwarding layer by the virtual node, generates a virtual network mapping request according to the resource quantity by counting the resource quantity required by the distributed flow table items when executing routing on the virtual node, and then maps the virtual node to bottom network equipment meeting the resource requirement of the virtual node, and can reasonably allocate resources according to the practical application requirement of an upper network object in consideration of the virtual network.
By establishing a flow table tree index flow table item, a virtual network is synchronously expanded with the flow table tree, so that flow table tree nodes are in one-to-one correspondence with virtual network nodes, the distributed virtual nodes can be determined according to the paths of the flow table items in the flow table tree, in the stage of executing flow table item matching on the data flow, the flow table items can be addressed through the paths, the middle node recorded with the current flow table item can be found in the flow table tree, the virtual nodes to which the flow table item is issued can be further indexed, the flow table items are distributed on different nodes in the flow table tree according to different granularities, the flow table item zone management can be realized, and all the flow table items are distributed and deployed on the virtual network, so that the problem of overload of load caused by centralized processing and storage of a large number of flow table items by a switch is avoided, the work load of the switch mapped by the virtual nodes is reduced, the network switching equipment has no requirement on the performance too high, and the resource energy consumption and the network operation cost are reduced.
The method comprises the steps of sorting according to the required resource quantity of the flow table items, extracting the flow table items from a flow table sequence in sequence, loading the extracted flow table items into all the child nodes one by one in a positive sequence and reverse sequence alternating allocation mode, so that all the child nodes of any father node can be allocated to the flow table items with the same quantity and balanced resource quantity requirement, load balancing of bottom network resources is achieved, a large number of nodes are not needed to participate in executing a flow table scheduling strategy, and resource allocation capacity is optimized.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present invention more apparent, the embodiments of the present invention will be described in further detail with reference to the accompanying drawings.
The SDN architecture is divided into three layers, wherein the uppermost layer is an application layer, and consists of a network application program and service logic, the application submits a user request or defined strategy to the SDN controller in a programming mode through interaction between the northbound interface and the controller, and the controller opens control rights of the network to the application. The middle layer is a control layer, and the control layer mainly operates an SDN controller and is responsible for converting a strategy of an application layer into a flow table item which can be identified by network equipment, issuing the flow table item into the network equipment and providing an abstract model of an infrastructure layer for the application layer. The lowest layer is an infrastructure layer and is composed of network equipment with data forwarding functions such as a switch and a router, and in an SDN network, the network equipment does not have control capability any more, only has a basic data processing function and is responsible for forwarding traffic and concrete execution of policies.
In addition, the northbound interface between the control layer and the application layer and the southbound interface between the control layer and the infrastructure layer are also important components in the SDN architecture. The northbound interface is responsible for presenting an abstract network view of the underlying network infrastructure to the application layer so that traffic can directly control the behavior of the network. The southbound interface is used for realizing control forwarding behavior, statistics of network information, inquiry of equipment performance, event notification and the like, the currently mainstream southbound interface adopts OpenFlow protocol standard definition, a flow table is used for replacing a forwarding table, and the core idea is that the control and forwarding functions of network equipment are respectively handed to a controller and a switch to be realized.
The flow table is responsible for the lookup and forwarding of data packets. The flow table consists of flow entries, a counter and a set of actions that are adapted to match the packet's multiple operations. The data packet arrives at the exchanger and firstly searches whether there is a matched flow table item in the flow table, if the matching is successful, the data packet is processed according to the action specified in the flow table item, otherwise, the data packet is forwarded to the controller through the safety channel, and the controller decides how to process the data packet. The flow table is issued into an active mode and a passive mode, the controller actively issues the flow table information collected by the controller to the switch, the switch performs data flow matching and forwarding according to the flow table, in the passive mode, the switch does not receive the flow table in advance, only when actual flow is generated, the flow table is obtained from the controller, then corresponding operation is executed according to a flow table instruction, the switch does not need to maintain all the flow tables, after the counter is overtime, the corresponding flow table can be deleted, the memory space of the switch is greatly saved, the flow table failure rate generated in time according to the requirement is lower, the switch is particularly suitable for QoS sensitive services such as video and voice calls, but because the flow table is not distributed in advance, the SDN controller has limited overall route sensing capability on a network, the flow table is not easy to control from the whole, the distribution of the flow table is easy to be unbalanced, and the data flow congestion or the flow table overflow condition occurs at partial switch nodes.
Therefore, the invention provides an improved SDN flow table distribution model, which still adopts the flow table distribution process to be executed according to the need in a passive mode, and utilizes the established virtual network to bear SDN routing service, thereby improving the overall scheduling capability of an SDN controller on network resources. As shown in fig. 1, the present invention provides an SDN routing method based on virtual network mapping, where the method specifically includes:
constructing a topological structure of a virtual network, wherein the topological structure comprises virtual nodes and virtual links;
Converting the user routing request into a flow table entry by using the SDN controller, and distributing the flow table entry to a virtual node in the virtual network;
calculating the resource quantity required by each allocated flow table item when executing routing, generating a virtual network mapping request according to the resource quantity, and mapping the virtual network to the bottom network equipment;
The flow table items are stored in a flow table tree with a multi-way tree structure, the flow table items are distributed on different types of nodes in the flow table tree according to different granularities, the node types are divided into root nodes, middle nodes and leaf nodes according to the flow table tree structure, the flow table items on the middle nodes of the flow table tree record sub-flow table item intervals contained in the flow table items, and the flow table items on the leaf nodes correspond to user routing requests, so that the granularity of the flow table items stored closer to the root node is larger, and the granularity of the flow table items stored on the leaf nodes is minimum;
determining the assigned virtual node according to the path of the flow table item in the flow table tree;
The virtual network and the flow table tree are synchronously expanded along with the newly added flow table items.
As shown in fig. 2, in the invention, a virtual network is established between the bottom network and the SDN controller for the routing environments of the user 1 and the user 2, so that not only is the bottom network device provided with an abstract model at an application layer and a global network abstract view provided for a control layer, but also the bottom network device is abstract at a control layer, the SDN controller does not consider frequent detection of the bottom network device, and gets rid of binding of the hardware network device on the network control function, and gets rid of limitation of the topology structure of network solidification of a data center, and the routing forwarding strategy and resources can be flexibly and reasonably laid out according to the individual requirements of the user application.
The method comprises the steps of storing stream table items in a stream table tree with a multi-way tree structure, distributing each stream table item on different nodes in the stream table tree according to different granularities, wherein the stream table item comprises a first stream table item generated by a user routing request, the first stream table item is stored on a leaf child node of the stream table, a unique item identification ID is set for the first stream table item to realize addressing operation, the second stream table item customized by an SDN controller is stored on a middle node of the stream table tree, each second stream table item is defined by the SDN controller to contain a stream table item section, the stream table item section is represented by a continuous item identification ID and used for controlling the first stream table item addressing operation, the granularity is used for measuring the number of the sub-stream table items contained in each stream table item, and the larger number is, so that the granularity of the first stream table item is the lowest in the whole stream table tree, the second stream table item on the child node of the root node is the highest in granularity, and the current item identification ID is contained in the middle node, and the leaf node can be located on the leaf by searching the middle node of the current item identification ID. By establishing the flow tree index flow table entry, the SDN controller can customize the dividing mode of the flow table entry according to the resource load balance, the resource preference degree, the user application type and the like, customize the service quality and the security policy for each group, realize reasonable resource allocation and improve the resource utilization rate.
In one embodiment provided by the invention, in a flow table tree with a k-way tree structure, k is a finite integer, and generally has a value between 3 and 8, an SDN controller is set on a root node, so that k child nodes of the SDN controller store flow table entries with the maximum granularity in the whole flow table tree, and each leaf node stores flow table entries with the minimum granularity in the whole flow table tree. As shown in fig. 3, let k=4, generate a flow table tree with a quadtree structure, in the flow table tree with the current structure, the present embodiment deploys the flow table entries in a resource load balancing manner, and specifically, a procedure of storing the flow table entries in the flow table tree is as follows:
Step 1-1), sorting according to the required resource amount of the flow table items to form a flow table sequence; since the second flow table entry is customized by the SDN controller and stored on the designated intermediate node, the implementation includes only the processing of the first flow table entry, and the flow table sequence includes only all the first flow table entries, assuming that the flow table sequence exists If/>Then there is/>,/>And/>Respectively represent the/>Individual flow entries and/>The amount of resources required by the individual flow entries;
Step 1-2) extracting flow table items from the flow table sequence in sequence, alternately executing a positive sequence and a reverse sequence allocation mode, and loading the extracted flow table items into each child node of the root node one by one; as shown in fig. 3, the solid curve and the dashed curve represent positive sequence and reverse sequence allocations, respectively, for four child nodes contained in the root node, the positive sequence initiator is at the first child node The reverse sequence initiating terminal is arranged at the fourth child node/>First child node/>Will be assigned to the flow entry/>, in positive orderThen in reverse order will be assigned to the flow entry/>Fourth child node/>Will be assigned to the flow entry/>, in positive orderThen in reverse order will be assigned to the flow entry/>Make/>In the forward order, the flow table entry with the highest resource demand is owned, and in the reverse order, the flow table entry with the lowest resource demand is owned,/>Then the contrary is true for the other two child nodes/>And/>The same characteristics are kept on the positions of the nodes, so that the nodes in the same family have relatively balanced loads;
Step 1-3) forming a new flow table sequence by the flow table items distributed to each sub-node, and continuously loading the flow table items to other sub-nodes contained in the current sub-node according to the distribution mode of the step 1-2) until the flow table items are loaded into leaf nodes; with a first sub-node For example, assume/>Assigned to the flow entry set/>The set is divided into/>, along with alternately performing positive and negative order allocation、/>、/>AndIs allocated from left to right to/>The set of flow entries divided as the hierarchy increases is smaller until the flow entries are divided into corresponding leaf nodes.
The flow table item allocation operation in the embodiment is simple, the resource load balancing can be effectively realized, the SDN controller does not need to frequently monitor the working progress of the switch and update the routing strategy, the workload of the SDN controller is reduced, and the operation cost brought by a load balancing mode by a large amount of scheduling flow table data is avoided.
In one embodiment provided by the invention, the topology structure of the virtual network is defined in a recursive manner, and specifically, a custom level 1 networking is adopted to perform recursive layer-by-layer expansion. The 1-level networking comprises a central switch and k edge switches, wherein all the edge switches are scattered on the periphery of the central switch and are connected with the central switch; wherein the n-level networking is formed by expanding all edge switches on the n-1 level networking into 1 level networking, and the n-level networkingEdge switches and/>, on the nth layer in the flow table treeThe nodes correspond one by one. As shown in fig. 4, in this embodiment, k=4, each level 1 networking has 4 edge switches, so that the flow table tree nodes correspond to the virtual network nodes one by one, the topology center represents the SDN controller, the edge nodes correspond to the only leaf nodes in the flow table tree, and the virtual network can keep synchronous expansion along with the flow table tree.
The advantage of the above-described architecture is that the virtual nodes assigned to can be determined from the path of the flow entries in the flow table tree. Specifically, in the stage of executing flow table item matching on the data flow, the flow table item can be addressed through a path, an intermediate node recorded with the current flow table item is found in the flow table tree, and further the virtual node to which the flow table item is issued can be indexed. According to different granularities, each flow table item is distributed on different types of nodes in the flow table tree, so that flow table item zone management can be realized, and all flow table items are distributed and deployed on a virtual network, so that the problem of overload load caused by centralized processing and storage of a large number of flow table items by a switch is avoided, the workload of the switch mapped by the virtual nodes is reduced, network switching equipment does not have excessively high requirements on performance, and resource energy consumption and network operation cost are reduced.
In another embodiment of the present invention, the resource amount is defined by a plurality of attribute value combinations, and specifically, the calculation process of the resource amount is:
Setting resource quantity attributes including the resource storage quantity, the resource calculation quantity and the resource occupation time length, and setting corresponding weight coefficients for the resource quantity attributes;
determining the required resource storage amount according to the length of the data stream of the user request route;
Extracting control instruction fields in stream table items matched with data streams, and analyzing the calculated amount of resources required by executing the control instructions;
The resource occupancy time period is determined by the validity time in the flow entry.
Taking the OpenFlow standard protocol as an example, a flow table item is composed of fields such as a matching field, a priority, a control instruction, statistical data, overtime and the like, message fields such as an interface, a physical interface, data among the flow tables, a two-layer message header, a three-layer message header, a four-layer port number and the like can be matched according to a matching field rule, the priority field defines a matching sequence among the flow table items, the priority is matched firstly, the statistical data field is used for counting how many messages and bytes of a data flow are matched to a current flow table item, and the control instruction field defines a processing action required by a message matched to the flow table item by an action instruction set.
The core of the flow entry timeout mechanism of the OpenFlow protocol is a valid time (timeout), which can be set when the SDN controller issues the flow entries by assigning a valid time to each flow entry. If the existing time or unmatched time of a certain flow table entry exceeds a preset valid time, the OpenFlow switch actively removes the flow table entry. The effective time is further divided into hard timeout (hard timeout) and idle timeout (idle timeout). An idle timeout (idle timeout) field of the flow table entry is not 0, and during this period of idle timeout, if no datagram matches the flow table entry, the switch will actively remove the flow table entry from the flow table, reflecting the idle time that the flow table entry can be accepted by the system. Hard timeout (hard timeout), the hard timeout field of the stream entry is not 0. When the presence time of the flow entry exceeds a preset hard timeout, the flow entry is removed from the flow table by the switch. That is, whether or not there is a message matching the current flow entry, the flow entry is deleted, reflecting the flow entry's time of survival in the system.
After generating a flow table item corresponding to the data flow, counting the number of data packets and the corresponding length in the data flow through a data field; then calculating the total length of the data stream, the length being counted in bytes, i.e. the memory space the switch needs to allocate to the data stream; then determining the unit calculated amount required by processing the data of the unit byte amount according to the instruction set by the control instruction field, and accumulating the total calculated amount according to the number of the unit byte amount contained in the data stream; and finally, determining the duration of the switch occupied by the current flow table item through the Hard Time field.
After each attribute value of the resource quantity is obtained, the attribute value needs to be standardized due to different measurement units and magnitudes of each attribute value, the attribute of each resource quantity is converted into a distribution with a mean value of 0 and a standard deviation of 1, so that the influence of dimension is eliminated, and the standardized processing process is expressed as follows:
Wherein, Represents the/>Individual data flows with respect to resource amount attributes/>The corresponding normalized processing result is,/>Representing the resource storage/>Or resource calculation amount/>Or resource occupation duration/>,/>All data streams representing statistics are related to resource amount attributes/>Mean value of/(I)Representing resource amount Property/>Therefore, the normalized value/>, of the three resource quantity attributes can be obtained by the above operation、/>And/>; Said standard deviation/>Further expressed as:
Wherein, Representing a total count of the data stream;
Then further adopting Max-Min algorithm to execute normalization processing, making linear conversion on data and making said data undergo the process of The values are mapped between [0,1], expressed as:
Wherein, Represents the/>Individual data flows with respect to resource amount attributes/>Normalized value,/>And/>Respectively represent normalized set/>Is the minimum and maximum of (a).
Finally, weighting and summing the normalization processing results by using the weight coefficient:
Wherein, 、/>And/>Respectively represent the resource storage/>Resource calculation amount/>Duration of resource occupationThe weight coefficient of the network equipment is assigned according to different resource quantity attributes to different degrees of network equipment hardware requirements, and meets the/>,/>Represents the/>The aggregate value of the resource amount of each data stream with respect to all the resource amount attributes is used as the resource amount required for routing.
The network virtualization technology can run a plurality of heterogeneous virtual networks on the basis of the underlying network resource virtualization, and a user can obtain resource guarantee in the created virtual network, so that the user sets the topology structure of the virtual network and the resource request description according to an application scene and requests to allocate underlying network resources. The resource description of the virtual network request includes two types of resource types, namely a virtual node and a virtual link, and generally, the attribute of the virtual network node includes constraints such as computing resources, storage resources, memory resources, bandwidth constraints and the like, and the attribute of the virtual network link includes constraints such as bandwidth of the link, delay of the link and the like. When the virtual network is successfully mapped, the virtual network will run on the shared underlying network hardware resources. In the generated virtual network topology structure, counting the total resource quantity required by the flow table item allocated to each virtual node, taking the total resource quantity as a resource demand characteristic to establish resource constraint of the virtual node and a virtual link, constructing information such as waiting mapping time, survival time and the like of a virtual network mapping request, sending the request to a virtual network control layer, receiving the virtual network mapping request by the control layer, storing the request in a queue, recording arrival time of the virtual network, selecting a virtual network waiting to be mapped in the queue, selecting a proper virtual network mapping algorithm, if the mapping algorithm successfully maps the virtual network, allocating bottom network resources to the current virtual network, and moving the virtual network into a virtual network receiving queue; if the virtual network mapping fails, the virtual network is put into a waiting mapping queue, the mapping failure times are recorded, and the next mapping action is continuously executed according to the rounds.
The virtual network mapping problem involves modeling virtual network mappings, with common use of undirected graphs and directed graphs modeling underlying and virtual networks. Taking undirected graph as an example, an underlying networkUsing weighted undirected graphsDescription of the preferred embodiments wherein/>Representing the underlying network node set,/>Representing underlying network link set,/>Representing a constraint set of node attributes,/>Representing a constraint set of link attributes, the node attributes generally take CPU computing resources, geographic locations, internal and external storage spaces, etc., and the link attributes generally take bandwidth, delay, length, etc. In the link mapping procedure, let/>Representing a set of loop-free paths between all nodes of the underlying network,/>Representing underlying network nodes/>And/>A set of loop-free paths between. Underlying network Path/>Is the underlying network node/>And/>A minimum of bandwidth remaining along the path. Request/>, for virtual networkCan also be expressed as an undirected graph/>Wherein/>Node set representing virtual network mapping request,/>Link set representing virtual network mapping request,/>Representing a set of virtual node attribute constraints, and/>Having the same attribute structure,/>Representing a set of virtual link attribute constraints, and/>Having the same attribute structure,/>Representing the requested virtual network duration.
The mapping process of the virtual network is to map the virtual network with the requestDeployment to underlying network/>Subset/>Above, and conform to/>Constraint process for node and link attribute sets, mapping process can be generally divided into node mapping/>And link mapping/>The node map may be expressed as:
Wherein the method comprises the steps of ,/>Mapping each virtual node/>, in the request to a virtual networkMapping to corresponding physical nodes/>, according to attribute requirementsIn the above, it is marked as/>;
The link map may be expressed as:
Wherein, ,/>Mapping each virtual link/>, in a request to a virtual networkMapping to corresponding physical links/>, according to attribute requirementsIn the above, it is marked as/>。
The survivable constraint condition of the virtual network is introduced into the network mapping model, and the network mapping process can be completed by combining the related mapping algorithm, and the content is a mature technology and does not belong to the technical points of the invention, so that the description is omitted here.
In another embodiment provided by the present invention, a method for calculating attribute preference of resource amount is provided, attribute preference is calculated according to data flow parameters, so that data flows with different preference are divided into corresponding clusters, then resource nodes adapting to current cluster characteristics are selected as virtual network mapping objects, so that resource nodes with highlighting capability on part of attributes can play a role, for example: the method comprises the steps of distributing the resources with strong computing power to the data streams with high requirements on the attributes of the computing amount of the resources, distributing the resources with large storage space to the data streams with high requirements on the attributes of the storage amount of the resources, and distributing the resources with low load degree and long standby time to the data streams with long occupied time of the resources. The deployment of the flow table item is decided based on the preference of the resource quantity attribute, and specifically, the process of storing the flow table item in the flow table tree is as follows:
step 2-1) calculating the preference degree of the data flow of the user request route about each resource quantity attribute by using the resource preference function; the preference degree of each resource amount attribute can be calculated by the following function:
Wherein, Represents the/>Individual data flows with respect to resource amount attributes/>Preference of/>Representing resource amount Property/>Can be replaced by weight coefficients, i.e. < - >、/>、/>,/>Represents the/>Individual data flows with respect to resource amount attributes/>Value of/>All data streams representing statistics are related to resource amount attributes/>Is the average value of (2);
the first operation can be obtained Individual data streams are related to/>、/>、/>Preference degree of three resource quantity attributes;
Step 2-2) selecting the resource quantity attribute with the highest preference degree as a preference object of the current data stream, and loading stream table items matched with the data stream into a corresponding preference object set; assume three preference degrees 、/>、/>The median value is highest is/>Then determine the/>The data flow preference object is the resource calculation amount, and the corresponding flow table item is added into/>Preference object set, in addition to this, includes/>Preference object set,/>And the preference object set respectively stores stream table items corresponding to the data streams with the preference of the resource storage amount and the resource occupation duration.
Step 2-3) establishing a flow table subtree for each resource amount attribute in the flow table tree, and distributing each preference object set to the corresponding flow table subtree; because the embodiment has three resource quantity attributes, a flow table tree with a three-fork tree structure can be established, and three subtrees contained in the root node are respectively endowed with one resource quantity attribute;
Step 2-4) sorting elements in each preference object set according to the amount of resources required by the flow table entry to form a flow table sequence;
Step 2-5) extracting stream table items from the stream table sequence in sequence, alternately executing a positive sequence and a reverse sequence allocation mode, and loading the extracted stream table items into all child nodes of the stream table subtree one by one;
Step 2-6) forming the stream list items allocated to each sub-node into a new stream list sequence, and continuously loading the stream list items to other sub-nodes contained in the current sub-node according to the allocation mode of step 2-5) until the stream list items are loaded into the leaf nodes.
In order to implement the SDN routing method in any of the above embodiments, the present invention further provides an SDN routing system based on virtual network mapping, as shown in fig. 5, where the system includes: the system comprises a network construction server, a user application terminal, an SDN controller and a network mapping server;
network construction server: the method comprises the steps of connecting a southbound interface of an SDN system structure with an SDN controller to construct a topological structure of a virtual network, wherein the topological structure comprises virtual nodes and virtual links;
User application terminal: the method comprises the steps of connecting a north interface of an SDN architecture with an SDN controller, and generating a user routing request according to application requirements;
SDN controller: the method comprises the steps of converting a user routing request into stream table entries, distributing the stream table entries to virtual nodes in a virtual network, calculating the resource amount required by each distributed stream table entry when routing is executed, and sending the resource amount to a network construction server;
Network mapping server: connecting with a network construction server, generating a virtual network mapping request according to the resource quantity, and mapping the virtual network to the bottom network equipment;
The flow table items are stored in a flow table tree with a multi-way tree structure, each flow table item is distributed on different nodes in the flow table tree according to different granularities, the flow table item on the middle node records the sub-flow table item interval contained in the flow table item, and the flow table item on the leaf node corresponds to a user routing request;
determining the assigned virtual node according to the path of the flow table item in the flow table tree;
The virtual network and the flow table tree are synchronously expanded along with the newly added flow table items.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential characteristics thereof. The present embodiments are, therefore, to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference sign in a claim should not be construed as limiting the claim concerned.