Distributed elephant flow identification method and device based on SDN (Software Defined Network)
By using hash value comparison tables and hash query trees in distributed SDN networks, the consistent processing of data flows in distributed systems is solved, and the problem of difficulty in obtaining key judgment indicators of data flows is improved, and the accuracy and efficiency of elephant flow recognition is improved.
Patent Information
- Application Number
- CN202411782460.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-05
- Publication Date
- 2025-02-25
AI Technical Summary
The existing distributed SDN network cannot effectively evaluate the arrival frequency, jitter status and duration of data streams, resulting in a decrease in the accuracy of elephant stream recognition.
By receiving the data stream sent by the user, it generates its hash value, and querying the corresponding target switch node in the pre-configured hash value comparison table. Elephant stream recognition is performed by using a hash query tree to ensure that all packets of the data stream are allocated to the same switch and controller.
It solves the problem of difficulty in obtaining key data flow judgment indicators in distributed systems, avoids repeated data detection between switches, and improves the efficiency of elephant flow recognition.
Smart Images

Figure CN119520419A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technology, and in particular to a distributed elephant flow identification method and device based on an SDN network. Background Art
[0002] In communication technology, elephant flows are usually traffic that occupies a large amount of bandwidth and lasts for a long time. They may cause network congestion and affect the transmission quality of other small flows (small flow). By identifying elephant flows, the SDN controller can adopt corresponding traffic management strategies, such as dynamically adjusting routing, load balancing, and prioritizing bandwidth resources, to avoid network congestion and ensure efficient operation and service quality of the network.
[0003] SDN networks usually use a two-stage identification method to identify elephant flows. The first stage is coarse-grained screening in the switch, which preliminarily filters all data flows according to predefined indicators (such as flow duration and number of packets). The second stage of identification is performed in the controller, which conducts a more detailed analysis of the suspicious elephant flows screened out in the first stage and confirms the real elephant flows based on more detailed flow characteristics (such as packet size, flow bandwidth occupancy, and flow duration).
[0004] The existing distributed SDN network will distribute a data flow to different switches and controllers, and cannot effectively evaluate key judgment indicators such as data flow arrival frequency, jitter, and duration, resulting in a decrease in the accuracy of elephant flow identification. Summary of the invention
[0005] The present invention provides a distributed elephant flow identification method and device based on an SDN network, so as to solve the problem that the distributed SDN network in the prior art divides a data flow into different switches and controllers, and cannot well evaluate key judgment indicators such as data flow arrival frequency, jitter, and duration, resulting in a decrease in the accuracy of elephant flow identification.
[0006] The present invention provides a distributed elephant flow identification method based on an SDN network, comprising the following steps: Receive a data stream sent by a user terminal, and generate a hash value of the data stream according to a receiving address and a sending address of the data stream; According to the hash value of the data flow, query the corresponding target switch node in the hash value comparison table; the corresponding relationship between the data flow and the switch node is pre-configured in the hash value comparison table; The elephant flow of the data flow is identified by the target switch node and the controller corresponding to the target switch node.
[0007] The distributed elephant flow identification method based on the SDN network provided by the present invention also includes: Assign a hash value to each switch to obtain a hash query tree; If the target switch node is not found in the hash value comparison table, the target switch node is searched in the hash query tree.
[0008] According to the distributed elephant flow identification method based on the SDN network provided by the present invention, the switch node includes an initial switch node and a newly added switch node; the hash value is assigned to each switch to obtain a hash query tree, including: Mapping the initial switch node to the initial node of the binary tree; When a new switch node is added, the new switch node is added by node splitting; when all nodes on one layer of the binary tree have completed node splitting, node splitting is performed from the first node of the next layer until all new switch nodes are added, thereby obtaining a hash query tree of the switch node; Among them, in the hash query tree, the hash value of the initial switch node is configured as the maximum value of the hash function; the hash function is the hash function used when calculating the hash value of the data flow; the hash values of the switch nodes of each layer are configured in ascending order.
[0009] According to the SDN network-based distributed elephant flow identification method provided by the present invention, querying the target switch node in the hash query tree includes: Querying the hash value interval of the switch node where the hash value of the data flow is located; The target switch node is queried in the hash query tree according to the queried hash value interval; the hash value interval is used to limit the data flow within the switch node processing interval.
[0010] The distributed elephant flow identification method based on the SDN network provided by the present invention also includes: If the target switch node is found in the hash query tree, the corresponding relationship between the target switch node and the data flow is recorded in the hash value comparison table.
[0011] According to the distributed elephant flow identification method based on the SDN network provided by the present invention, the elephant flow identification of the data flow is performed through the target switch node and the controller corresponding to the target switch node, including: Performing a phase of elephant flow identification of the data flow through the target switch node to confirm whether the data flow is a suspicious elephant flow; When the data flow is a suspicious elephant flow, the controller corresponding to the target switch node performs a second-stage elephant flow identification on the data flow to confirm whether the data flow is an elephant flow.
[0012] The present invention also provides a distributed elephant flow identification device based on an SDN network, comprising the following parts: A data stream processing module, used for receiving a data stream sent by a user terminal, and generating a hash value of the data stream according to a receiving address and a sending address of the data stream; A node query module, used to query a corresponding target switch node in a hash value comparison table according to a hash value of the data flow; the hash value comparison table is pre-configured with a correspondence between the data flow and the switch node; The data flow identification module is used to identify the elephant flow of the data flow through the target switch node and the controller corresponding to the target switch node.
[0013] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the distributed elephant flow identification method based on the SDN network as described in any one of the above is implemented.
[0014] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the distributed elephant flow identification method based on the SDN network as described in any one of the above is implemented.
[0015] The present invention also provides a computer program product, including a computer program, wherein when the computer program is executed by a processor, the distributed elephant flow identification method based on the SDN network as described in any one of the above is implemented.
[0016] The distributed elephant flow identification method and device based on SDN network provided by the present invention receives the data flow sent by the user end, and generates the hash value of the data flow according to the receiving address and the sending address of the data flow; according to the hash value of the data flow, the corresponding target switch node is queried in the hash value comparison table; the corresponding relationship between the data flow and the switch node is pre-configured in the hash value comparison table; the data packets arriving subsequently in the data flow are allocated to the same switch and controller, which solves the problem of difficulty in obtaining key judgment indicators such as the arrival frequency, jitter, and duration of the data flow in the distributed system, avoids repeated data detection between switches, and improves the efficiency of elephant flow identification. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0018] Figure 1 This is one of the flow charts of the distributed elephant flow identification method based on the SDN network provided by the present invention.
[0019] Figure 2 It is a schematic diagram of the principle of the SDN network provided by the present invention.
[0020] Figure 3 This is the second flow chart of the distributed elephant flow identification method based on the SDN network provided by the present invention.
[0021] Figure 4 This is one of the schematic diagrams of the principle of constructing a hash query tree provided by the present invention; Figure 5 This is the second schematic diagram of the principle of constructing a hash query tree provided by the present invention; Figure 6 It is a structural schematic diagram of a distributed elephant flow identification device based on an SDN network provided by the present invention.
[0022] Figure 7 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0023] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0024] The terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the descriptions used in this way can be interchanged where appropriate, so that the embodiments can be implemented in a sequence other than that illustrated or described in the present application. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or modules is not necessarily limited to those steps or modules that are clearly listed, but may include other steps or modules that are not clearly listed or inherent to these processes, methods, products or devices. The naming or numbering of the steps that appear in the present application does not mean that the steps in the method flow must be executed in the time / logical sequence indicated by the naming or numbering. The process steps that have been named or numbered can change the execution order according to the technical purpose to be achieved, as long as the same or similar technical effects can be achieved. The division of modules in this application is a logical division. There may be other division methods when it is implemented in actual applications. For example, multiple modules can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection between units can be electrical or other similar forms, which are not limited in this application. In addition, the modules or submodules described as separate components may or may not be physically separated, may or may not be physical units, or may be distributed in multiple circuit units, and some or all of the units may be selected according to actual needs to achieve the purpose of the present application.
[0025] Combine the following Figure 1-Figure 7 The specific contents of the present invention are described.
[0026] Figure 1 It is a flow chart of a distributed elephant flow identification method based on an SDN network provided by the present invention, which is applied in a server and includes steps S101-S103.
[0027] Step S101, receiving a data stream sent by a user terminal, and generating a hash value of the data stream according to a receiving address and a sending address of the data stream.
[0028] In an embodiment of the present invention, the user terminal generates raw data through an application or device (such as inputting information, uploading files, sensor collection, etc.), and then pre-processes the raw data to obtain a data stream sent by the user terminal.
[0029] In an embodiment of the present invention, a hash value of a data stream is generated according to a receiving address and a sending address of the data stream, as follows: The data stream sent by the user end includes a five-tuple IP data packet, which consists of {protocol, src_port, dst_ip, src_ip, dst_port}. Among them, protocol represents the communication protocol used by the data stream, src_port represents the port number of the user end, dst_ip represents the receiving address of the data stream, src_ip represents the sending address of the data stream, and dst_port represents the port number of the terminal device where the data stream arrives.
[0030] By generating a hash value based on the receiving address and sending address of the data flow, the data flow can be specifically marked. The symmetry of the generated hash value can also avoid the problem of low accuracy in total flow measurement caused by separating the upstream and downstream flows.
[0031] Step S102: According to the hash value of the data flow, the corresponding target switch node is searched in the hash value comparison table; the corresponding relationship between the data flow and the switch node is pre-configured in the hash value comparison table.
[0032] In the embodiment of the present invention, in order to avoid the problem of difficulty in obtaining key judgment indicators such as packet arrival frequency, jitter, and duration due to the distribution of a data stream to different switches and controllers, it is necessary to ensure that all data packets of a data stream are distributed to the same switch to avoid communication between switches and repeated detection of data, thereby improving efficiency. The hash value of the data stream is used as an index, and the Node_id of the switch node to which the data stream is assigned is used as a hash value comparison table. When the data stream arrives, its hash value is first calculated as an index to find the value in the hash value comparison table, and then the target switch node corresponding to the data stream is queried.
[0033] Step S103, the elephant flow of the data flow is identified through the target switch node and the controller corresponding to the target switch node.
[0034] In a possible implementation, in step S103, the elephant flow of the data flow is identified by the target switch node and the controller corresponding to the target switch node, including: like Figure 2 As shown, the target switch node is used to identify the first stage of the data flow to confirm whether the data flow is a suspicious elephant flow; when the data flow is a suspicious elephant flow, the controller corresponding to the target switch node is used to identify the second stage of the data flow to confirm whether the data flow is an elephant flow. By distributing tasks to different nodes for parallel processing, the processing speed and system performance are significantly improved in scenarios where large amounts of data and computing tasks need to be processed, reducing the bottleneck of the centralized system in terms of processing rate.
[0035] In an embodiment of the present invention, a first-stage elephant flow identification of a data flow is performed through a target switch node. When the data flow is judged not to be a suspicious elephant flow during the first-stage elephant flow identification process, the elephant flow identification is terminated.
[0036] In the embodiment of the present invention, the parameters such as identification indexes and thresholds used in the first stage elephant flow identification process and the second stage elephant flow identification process are not described in detail, and the details can be referred to the related art.
[0037] In a possible implementation, Figure 3 As shown, the distributed elephant flow identification method based on the SDN network also includes steps S301-S302.
[0038] Step S301, assigning a hash value to each switch to obtain a hash query tree.
[0039] In a possible implementation, in step S301, the switch nodes include an initial switch node and a newly added switch node; a hash value is assigned to each switch to obtain a hash query tree, including: Step S301A, mapping the initial switch node to the initial node of the binary tree.
[0040] Step S301B, when a new switch node is added, the new switch node is added by node splitting; when all nodes on one layer of the binary tree have completed node splitting, node splitting is performed from the first node of the next layer until all new switch nodes are added, and a hash query tree of the switch nodes is obtained; wherein, in the hash query tree, the hash value of the initial switch node is configured as the maximum value of the hash function; the hash function is the hash function used when calculating the hash value of the data flow; the hash value of the switch node of each layer is configured in ascending order.
[0041] In a possible implementation, the switch node at each layer is responsible for processing data flows with a hash value interval of [A, B], where A is the hash value of the previous switch node, and B is the hash value of the switch node at each layer.
[0042] In one embodiment, Figure 5 As shown in the figure, if there are switch nodes 1 to 4sd in the SDN network. At a certain moment, nodes 5 and 6 are added. In the binary tree, node 1 of the third layer is first split into node 1 and node 5 of the fourth layer, and then node 3 of the third layer is split into node 3 and node 6 of the fourth layer. At this time, in the SDN network, the hash values of switch nodes 1 to 6 are determined by node 1 of the fourth layer, node 2 of the third layer, node 3 of the fourth layer, node 4 of the third layer, node 5 of the fourth layer, and node 6 of the fourth layer in the binary tree.
[0043] In an embodiment of the present invention, a hash value is assigned to each switch in the SDN network by constructing a hash query tree.
[0044] like Figure 4 As shown, the initial switch node (node 1) is mapped to the initial node of the binary tree. When a new switch node (node 2-node 8) is added, the new switch node is added by node splitting. When all nodes on one layer of the binary tree have completed node splitting, node splitting is performed from the first node of the next layer until all new switch nodes are added, and a hash query tree of the switch node is obtained.
[0045] The following is an explanation of the process of obtaining the hash value of each node in the hash query tree.
[0046] Specifically, the hash value of the initial switch node (node 1) is defined as the maximum value of the hash function; the hash function is the hash function used when calculating the hash value of the data flow. When there are two nodes in the SDN network.
[0047] In an embodiment of the present invention, in a binary subtree, the node on the left is defined as a left node, and the node on the right is defined as a right node.
[0048] Exemplarily, for the nodes in the second layer, node 1 is the left node, and node 2 is the right node. For the nodes in the third layer, node 1 and node 2 are the left nodes, and node 3 and node 4 are the right nodes.
[0049] In the embodiment of the present invention, for the i-th node in the n-th layer (arranged in order from left to right), its hash value is Defined as follows: If the i-th node of the n-th layer is a left node: = .
[0050] The above formula means that if the i-th node of the n-th layer is a left node, its hash value is half of the sum of the hash values of the node to the left of the node and the root node of the previous layer.
[0051] If the i-th node in the n-th layer is a right node: = .
[0052] The above formula means that if the i-th node of the n-th layer is a right node, its hash value is the hash value of the root node of the previous layer of the node.
[0053] Exemplarily, when the maximum value of the hash function in the embodiment of the present invention is 1, Figure 5 In the example, the hash value of each node in each layer can be determined as: At the first level, the hash value of node 1 is 1; In the second layer, the hash value of node 1 is 0.5; the hash value of node 2 is 1; At the third level, the hash value of node 1 is 0.25; the hash value of node 3 is 0.5; the hash value of node 2 is 0.75; the hash value of node 4 is 1; At the third level, the hash value of node 1 is 0.125, the hash value of node 5 is 0.25, the hash value of node 3 is 0.375, and the hash value of node 6 is 0.5.
[0054] The present invention constructs a hash query tree through the above steps, so that in the case of load balancing, the time complexity of adding nodes is reduced to 0 (1), and when there are nodes added to the SDN network, nodes can be added quickly, and the time complexity of data flow allocation nodes is 0 (logN), so that data flow allocation services can be quickly provided. The problem of high maintenance cost and slow node adding speed in the prior art of consistent hashing is solved.
[0055] Step S302: If the target switch node is not found in the hash value comparison table, the target switch node is searched in the hash query tree.
[0056] In a possible implementation, in step S302, querying a target switch node in a hash query tree includes: Query the hash value interval of the switch node where the hash value of the data flow is located; According to the queried hash value interval, the target switch node is queried in the hash query tree; the hash value interval is used to limit the data flow within the processing interval of the switch node.
[0057] In a possible implementation, a binary search method is used to query the hash value interval of the switch node where the hash value of the data flow is located.
[0058] The present invention ensures the orderliness of the hash values of the switch nodes through steps S301A-S301B, so that the binary search method can be applied when the target switch node is subsequently queried in the hash query tree. Further, the hash value is calculated for the data flow, and the corresponding node is searched in the hash query tree according to the binary search method. It is ensured that when a node is added, only a small amount of data needs to be remapped, which reduces data migration and improves the stability and scalability of the distributed system.
[0059] In a possible implementation manner, after step S302, the method further includes: Step S303: If the target switch node is found in the hash query tree, the corresponding relationship between the target switch node and the data flow is recorded in the hash value comparison table.
[0060] In an embodiment of the present invention, if the target switch node is found in the hash query tree, the hash value of the data flow is used as an index, and the Node_id of the target switch node is used as a value and stored in the hash value comparison table to facilitate the next query.
[0061] The present invention can achieve the following beneficial effects by adopting the above method: By receiving the data stream sent by the user end and generating the hash value of the data stream according to the receiving address and sending address of the data stream; according to the hash value of the data stream, the corresponding target switch node is queried in the hash value comparison table; the correspondence between the data stream and the switch node is pre-configured in the hash value comparison table; the subsequent data packets arriving in the data stream are assigned to the same switch and controller, which solves the problem of difficulty in obtaining key judgment indicators such as data stream arrival frequency, jitter, and duration in distributed systems, while avoiding repeated data detection between switches and improving the efficiency of elephant flow identification.
[0062] The following is a description of a distributed elephant flow identification device based on an SDN network provided by the present invention. The distributed elephant flow identification device based on an SDN network described below and the distributed elephant flow identification method based on an SDN network described above can be referred to each other.
[0063] Figure 6 The present invention provides a structural diagram of a distributed elephant flow identification device based on an SDN network, including the following parts: The data stream processing module 610 is used to receive the data stream sent by the user end, and generate a hash value of the data stream according to the receiving address and sending address of the data stream; The node query module 620 is used to query the corresponding target switch node in the hash value comparison table according to the hash value of the data flow; the corresponding relationship between the data flow and the switch node is pre-configured in the hash value comparison table; The data flow identification module 630 is used to identify the elephant flow of the data flow through the target switch node and the controller corresponding to the target switch node.
[0064] In a possible implementation, the distributed elephant flow identification device based on the SDN network further includes the following parts: a hash query tree construction module, which is used to assign a hash value to each switch to obtain a hash query tree.
[0065] The node query module 620 is further configured to query the target switch node in the hash query tree if the target switch node is not found in the hash value comparison table.
[0066] In a possible implementation manner, the switch node includes an initial switch node and a newly added switch node; and the hash query tree construction module is specifically used to: Map the initial switch node to the initial node of the binary tree; When a new switch node is added, it is added by node splitting. When all nodes on one layer of the binary tree have completed node splitting, node splitting is performed from the first node of the next layer until all new switch nodes are added, and the hash query tree of the switch node is obtained. Among them, in the hash query tree, the hash value of the initial switch node is configured as the maximum value of the hash function; the hash function is the hash function used when calculating the hash value of the data flow; the hash value of the switch node of each layer is configured in ascending order.
[0067] In a possible implementation, the node query module 620 is specifically used to query the hash value interval of the switch node where the hash value of the data flow is located; based on the queried hash value interval, query the target switch node in the hash query tree; the hash value interval is used to limit the data flow within the switch node processing interval.
[0068] In a possible implementation, the distributed elephant flow identification device based on the SDN network also includes the following parts The hash table updating module is used to record the corresponding relationship between the target switch node and the data flow in the hash value comparison table if the target switch node is found in the hash query tree.
[0069] In a possible implementation, the data flow identification module 630 is specifically configured to: The first stage of elephant flow identification of the data flow is performed through the target switch node to confirm whether the data flow is a suspicious elephant flow; when the data flow is a suspicious elephant flow, the second stage of elephant flow identification of the data flow is performed through the controller corresponding to the target switch node to confirm whether the data flow is an elephant flow.
[0070] Figure 7 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 7 As shown, the electronic device may include: a processor 710, a communications interface 720, a memory 730 and a communication bus 740, wherein the processor 710, the communications interface 720 and the memory 730 communicate with each other through the communication bus 740. The processor 710 may call the logic instructions in the memory 730 to execute a distributed elephant flow identification method based on an SDN network, comprising the following steps: Receive the data stream sent by the user end, and generate a hash value of the data stream according to the receiving address and sending address of the data stream; According to the hash value of the data flow, the corresponding target switch node is queried in the hash value comparison table; the corresponding relationship between the data flow and the switch node is pre-configured in the hash value comparison table; The elephant flow of the data flow is identified through the target switch node and the controller corresponding to the target switch node.
[0071] In addition, the logic instructions in the above-mentioned memory 730 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present invention can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0072] On the other hand, the present invention further provides a computer program product, the computer program product includes a computer program, the computer program can be stored on a non-transitory computer-readable storage medium, and when the computer program is executed by a processor, the computer can execute a distributed elephant flow identification method based on an SDN network provided by the above methods, including the following steps: Receive the data stream sent by the user end, and generate a hash value of the data stream according to the receiving address and sending address of the data stream; According to the hash value of the data flow, the corresponding target switch node is queried in the hash value comparison table; the corresponding relationship between the data flow and the switch node is pre-configured in the hash value comparison table; The elephant flow of the data flow is identified through the target switch node and the controller corresponding to the target switch node.
[0073] In another aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the distributed elephant flow identification method based on an SDN network provided by the above methods is implemented, comprising the following steps: Receive the data stream sent by the user end, and generate a hash value of the data stream according to the receiving address and sending address of the data stream; According to the hash value of the data flow, the corresponding target switch node is queried in the hash value comparison table; the corresponding relationship between the data flow and the switch node is pre-configured in the hash value comparison table; The elephant flow of the data flow is identified through the target switch node and the controller corresponding to the target switch node.
[0074] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0075] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0076] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A distributed elephant flow identification method based on SDN network, characterized in that: include: Receive a data stream sent by a user terminal, and generate a hash value of the data stream according to a receiving address and a sending address of the data stream; According to the hash value of the data flow, query the corresponding target switch node in the hash value comparison table; the corresponding relationship between the data flow and the switch node is pre-configured in the hash value comparison table; The elephant flow of the data flow is identified by the target switch node and the controller corresponding to the target switch node.
2. According to claim 1, the distributed elephant flow identification method based on SDN network is characterized in that: Also includes: Assign a hash value to each switch to obtain a hash query tree; If the target switch node is not found in the hash value comparison table, the target switch node is searched in the hash query tree.
3. The distributed elephant flow identification method based on SDN network according to claim 2 is characterized in that: The switch nodes include initial switch nodes and newly added switch nodes; the step of assigning a hash value to each switch to obtain a hash query tree includes: Mapping the initial switch node to the initial node of the binary tree; When a new switch node is added, the new switch node is added by node splitting; when all nodes on one layer of the binary tree have completed node splitting, node splitting is performed from the first node of the next layer until all new switch nodes are added, thereby obtaining a hash query tree of the switch node; Among them, in the hash query tree, the hash value of the initial switch node is configured as the maximum value of the hash function; the hash function is the hash function used when calculating the hash value of the data flow; the hash values of the switch nodes of each layer are configured in ascending order.
4. The distributed elephant flow identification method based on SDN network according to claim 2 is characterized in that: Querying the target switch node in the hash query tree includes: Querying the hash value interval of the switch node where the hash value of the data flow is located; The target switch node is queried in the hash query tree according to the queried hash value interval; the hash value interval is used to limit the data flow within the switch node processing interval.
5. The distributed elephant flow identification method based on SDN network according to claim 2 is characterized in that: Also includes: If the target switch node is found in the hash query tree; The corresponding relationship between the target switch node and the data flow is recorded in the hash value comparison table.
6. The distributed elephant flow identification method based on SDN network according to claim 1 is characterized in that: The step of identifying the elephant flow of the data flow by using the target switch node and the controller corresponding to the target switch node includes: Performing a phase of elephant flow identification of the data flow through the target switch node to confirm whether the data flow is a suspicious elephant flow; When the data flow is a suspicious elephant flow, the controller corresponding to the target switch node performs a second-stage elephant flow identification on the data flow to confirm whether the data flow is an elephant flow.
7. A distributed elephant flow identification device based on SDN network, characterized in that: include: A data stream processing module, used for receiving a data stream sent by a user terminal, and generating a hash value of the data stream according to a receiving address and a sending address of the data stream; A node query module, used to query a corresponding target switch node in a hash value comparison table according to a hash value of the data flow; the hash value comparison table is pre-configured with a correspondence between the data flow and the switch node; The data flow identification module is used to identify the elephant flow of the data flow through the target switch node and the controller corresponding to the target switch node.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the distributed elephant flow identification method based on the SDN network is implemented as described in any one of claims 1 to 6.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the distributed elephant flow identification method based on the SDN network as described in any one of claims 1 to 6 is implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the distributed elephant flow identification method based on the SDN network as described in any one of claims 1 to 6 is implemented.