Flow table generation method and device, equipment, storage medium and product

By introducing version number, resource type, and resource identifier fields into the cookie item of the flow table, the problem of insufficient association between the flow table and resources is solved, thereby improving the processing efficiency and operational efficiency of the SDN controller.

CN120880980AInactive Publication Date: 2025-10-31CHINA MOBILE (SUZHOU) SOFTWARE TECH CO LTD +1
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202511374678.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-25
Publication Date
2025-10-31
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The lack of effective association between existing flow tables and resources results in low efficiency of the SDN controller when processing business logic.

Method used

Introduce version number, resource type, and resource identifier fields into the Cookie field of the flow table, including Virtual Private Cloud ID, Virtual NIC Port ID, and Resource ID, to achieve effective association between the flow table and the resource.

Benefits of technology

It improves the efficiency of SDN controllers in processing business logic, simplifies flow table management processes, enhances operational efficiency, and supports batch operations and rapid fault location.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120880980A_ABST
    Figure CN120880980A_ABST
Patent Text Reader

Abstract

The invention discloses a flow table generation method and device, equipment, a storage medium and a product, and the method comprises the steps: generating a flow table after an SDN controller is started; wherein the Cookie item of the flow table at least comprises the following fields: a version number field, which is used for marking the current version number of the SDN controller; the resource type field is used for marking a resource type associated with the flow table; and the resource identification field is used for marking the resource identification associated with the flow table. By adopting the embodiment of the invention, the flow table and the resource can be effectively associated, so that the controller can accurately process service logic, execute batch operation and quickly perform fault positioning based on the resource type field and the resource identification field.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technology, and in particular to a method, apparatus, device, storage medium and product for generating flow tables. Background Technology

[0002] Software-defined networking (SDN) is an implementation of network virtualization. Its core technology, OpenFlow (OF), separates the control plane from the data plane of network devices, thereby enabling flexible control of network traffic, making the network more intelligent, and providing a good platform for innovation in core networks and applications. The flow table is an important component of OpenFlow, used to guide the forwarding of data packets.

[0003] However, during the implementation process, the inventors discovered that the existing flow tables lacked an effective association with resources, resulting in low efficiency of the controller when processing business logic. Summary of the Invention

[0004] This application provides a flow table generation method, apparatus, device, storage medium, and product to solve the problem in the prior art where the lack of effective association between flow tables and resources leads to low efficiency of the controller when processing business logic.

[0005] To achieve the above objectives, embodiments of this application provide a flow table generation method, including: When the SDN controller starts, it generates flow tables; the Cookie entries in these flow tables include at least the following fields: The version number field is used to mark the current version number of the SDN controller; The resource type field is used to identify the resource type associated with the flow table; The resource identifier field is used to mark the resource identifier associated with the flow table.

[0006] As an improvement to the above scheme, the resource identifier field includes: The Virtual Private Cloud ID field is used to identify the Virtual Private Cloud ID to which the resource associated with the flow table belongs; The Virtual NIC Port ID field is used to identify the virtual NIC port ID to which the resource associated with the flow table belongs; The resource ID field is used to identify the resource ID associated with the flow table.

[0007] As an improvement to the above scheme, the resource identifier field further includes: The Virtual Private Cloud ID length field is used to indicate the length occupied by the Virtual Private Cloud ID field; The virtual network interface card (NIC) port ID length field is used to indicate the length occupied by the virtual NIC port ID field; The resource ID length field is used to indicate the length occupied by the resource ID field.

[0008] As an improvement to the above solution, the virtual private cloud ID length field is configured by the number of virtual private clouds; The virtual network interface card (NIC) port ID length field is configured by the number of virtual NIC ports; The resource ID length field is configured by the number of resources.

[0009] As an improvement to the above scheme, the current version number of the SDN controller is determined by the number of times the SDN controller has been started or the number of times the SDN controller has reconnected to the open virtual switch.

[0010] As an improvement to the above solution, the method further includes: After the flow table is sent, the current version number of the SDN controller is compared with the value represented by the version number field of the existing flow table in the open virtual switch to obtain the comparison result; If the comparison results are inconsistent, delete the flow table corresponding to the inconsistent comparison results.

[0011] As an improvement to the above scheme, the Cookie item further includes: an optional field for marking information customized according to the resource type associated with the flow table.

[0012] To achieve the above objectives, embodiments of this application also provide a flow table generation apparatus, comprising: The generation module is used to generate flow tables after the SDN controller starts; wherein the Cookie item of the flow table includes at least the following fields: The version number field is used to mark the current version number of the SDN controller; The resource type field is used to identify the resource type associated with the flow table; The resource identifier field is used to mark the resource identifier associated with the flow table.

[0013] To achieve the above objectives, embodiments of this application also provide a flow table generation device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements the flow table generation method as described above.

[0014] To achieve the above objectives, embodiments of this application also provide a computer-readable storage medium, the computer-readable storage medium including a stored computer program; wherein, when the computer program is executed, it controls the device where the computer-readable storage medium is located to perform the flow table generation method as described above.

[0015] To achieve the above objectives, embodiments of this application also provide a computer program product, including a computer program / instructions, which, when executed by a processor, implement the flow table generation method as described above.

[0016] Compared with existing technologies, the flow table generation method, apparatus, device, storage medium, and product provided in this application generate flow tables after the SDN controller is started. The cookie item of the flow table includes at least the following fields: a version number field, used to mark the current version number of the SDN controller; a resource type field, used to mark the resource type associated with the flow table; and a resource identifier field, used to mark the resource identifier associated with the flow table. Therefore, this application effectively associates flow tables with resources through the resource type and resource identifier fields of the flow table cookie item. This enables the controller to accurately process business logic, perform batch operations, and quickly locate faults based on the resource type and resource identifier fields. This not only improves the efficiency of the controller in processing business logic but also simplifies the management process of complex flow table entries in the SDN network, significantly enhancing overall operational efficiency. Attached Figure Description

[0017] Figure 1 This is a flowchart of a flow table generation method provided in an embodiment of this application; Figure 2 This is a structural diagram of a Cookie item provided in an embodiment of this application; Figure 3 This is a structural diagram of a resource identifier field provided in an embodiment of this application; Figure 4 This is a structural diagram of a flow table generation and deployment architecture provided in an embodiment of this application; Figure 5 This is a flowchart illustrating how an SDN controller processes DHCP request messages, as provided in an embodiment of this application. Figure 6 This is a structural block diagram of a flow table generation device provided in an embodiment of this application; Figure 7 This is a structural block diagram of a flow table generation device provided in an embodiment of this application. Detailed Implementation

[0018] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0019] In the description of this application, the sequence number of each process does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0020] In this application description, the terms "exemplary" or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of terms such as "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.

[0021] In this application description, the terms "first," "second," etc., are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented, for example, in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus. The term "based on" means "at least partially based on." The term "according to" means "at least partially according to." The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments." The term "and / or" means at least one of the connected objects, such as A and / or B, indicating three cases: including only A, only B, and both A and B. Unless otherwise stated, the term "multiple" means two or more.

[0022] See Figure 1 , Figure 1 This is a flowchart of a flow table generation method provided in an embodiment of this application. The flow table generation method includes: S1. After the SDN controller starts, a flow table is generated; wherein, the Cookie item of the flow table includes at least the following fields: The version number field is used to mark the current version number of the SDN controller; The resource type field is used to identify the resource type associated with the flow table; The resource identifier field is used to mark the resource identifier associated with the flow table.

[0023] It is worth noting that the embodiments of this application are applied to an SDN controller. After the SDN controller starts up, it can generate flow tables to guide the forwarding of data packets. Each flow table contains a set of flow table entries. Each flow table entry consists of a matching field, a priority field, a counter field, a command field, a timeout field, and a cookie field. The cookie field is a 64-bit field parameter defined by the SDN controller, and the values ​​filled in its inner fields are in binary format.

[0024] This application does not impose specific restrictions on matching fields, priority items, counter items, instruction items, or timeout items. Instead, it designs the Cookie item to effectively associate the flow table with the resource, specifically designing it to include at least the following fields: The Version field is used to identify the current version number of the SDN controller; The Resource Type (Type) field is used to mark the resource type associated with the flow table; the resource type associated with the flow table is also the resource type to which the flow table belongs. The Identification field is used to identify the resource associated with the flow table.

[0025] The version number field described in this application embodiment can be used to process service unsubscription data during hot upgrades or disconnection periods, reducing the risk of service traffic interruption caused by erroneous deletion of flow tables.

[0026] This application embodiment maintains a resource type enumeration through a resource type field, defining all resource types according to business needs. For example, virtual network interface card (NIC) port resources are represented as 1, routing resources as 2, firewall resources as 3, and so on. Resource types can be dynamically added or deleted according to business needs. When the SDN controller issues flow tables, it fills the Cookie's Type field according to the resource type. This field enables batch management of flow tables for a specific resource type, as well as the direct association between flow table entries and resources, and the indirect association between flow table entries and processing modules.

[0027] This application combines the resource type field and the resource identifier field, and can achieve the following functions: (1) Flow table entries are associated with resources and processing modules. The SDN controller directly associates flow table entries with resources, thereby realizing the indirect association between flow table entries and processing modules. This enables the SDN controller to send the received message to the processing module corresponding to the resource type associated with the matched flow table for processing.

[0028] (2) Batch Management of Flow Tables. Based on the resource type field and resource identifier field, all flow tables related to the processing module corresponding to a certain resource type can be accurately filtered for batch operations, simplifying flow table management. For example, if a security group is defined as a resource type, and the security group resource type number is 10, its binary value is 1010, if it is necessary to delete the flow table related to the security group of a certain virtual network card, it can be deleted in batches by filtering the flow table entries whose Type field in the Cookie is 1010 and whose virtual network card port ID in the Identification field matches that port.

[0029] (3) Fault location and flow table analysis. By filtering the resource identifier field of the Cookie item, all flow table entries of a certain resource can be quickly retrieved. Further filtering by resource type can help locate the fault and quickly determine the problem, or perform flow table analysis and statistics, greatly improving operation and maintenance efficiency.

[0030] In an optional embodiment, the resource identifier field includes: The Virtual Private Cloud ID field is used to identify the Virtual Private Cloud ID to which the resource associated with the flow table belongs; The Virtual NIC Port ID field is used to identify the virtual NIC port ID to which the resource associated with the flow table belongs; The resource ID field is used to identify the resource ID associated with the flow table.

[0031] This application embodiment uses Virtual Private Cloud (VPC) ID, Virtual NIC Port ID, and Resource ID to jointly determine the resource identifier, thus characterizing the network attributes and identity features of the resource from multiple dimensions and providing reliable information for the refined management of resources.

[0032] In an optional embodiment, the resource identifier field further includes: The Virtual Private Cloud ID length field is used to indicate the length occupied by the Virtual Private Cloud ID field; The virtual network interface card (NIC) port ID length field is used to indicate the length occupied by the virtual NIC port ID field; The resource ID length field is used to indicate the length occupied by the resource ID field.

[0033] In order to dynamically adapt to the growth of resources in the SDN network, this application embodiment adds a Virtual Private Cloud ID field, a Virtual Network Interface Card (NIC) Port ID field, and a Resource ID field to the Resource Identifier field, which respectively represent the length occupied by the corresponding part. This allows for dynamic planning of the length occupied by each ID field, saving the use of Cookie bits and adapting to the growth of service resource volume.

[0034] For example, the Virtual Private Cloud ID length field, the Virtual Network Interface Card (VNIC) Port ID length field, and the Resource ID length field each occupy 4 bits, meaning they can represent values ​​from 0 to 15. Thus, the minimum value for each ID length field is 0, and the maximum value is 15. For instance, if the Virtual Private Cloud ID length field is filled with 0101, it means the Virtual Private Cloud ID occupies a length of 2 bits. 2 +2 0 =5 bits.

[0035] In one optional embodiment, the Virtual Private Cloud ID length field is configured by the number of Virtual Private Clouds; The virtual network interface card (NIC) port ID length field is configured by the number of virtual NIC ports; The resource ID length field is configured by the number of resources.

[0036] In this embodiment, the ID length field of each type of resource is configured according to the quantity of each type of resource to ensure that each type of resource has its own unique ID.

[0037] Specifically, according to Calculate the length occupied by the Virtual Private Cloud ID field. In the formula, Indicates the number of virtual private clouds. This indicates the floor function. Convert to binary and fill into the Virtual Private Cloud ID length field.

[0038] according to Calculate the length of the virtual network interface card port ID field. In the formula, This indicates the number of virtual network adapter ports. Convert to binary and fill it into the virtual network interface card port ID length field.

[0039] according to Calculate the length occupied by the resource ID field. In the formula, Indicates the number of processing modules. Convert to binary and fill into the resource ID length field.

[0040] For example, if the number of virtual private clouds is 2000, the length of the virtual private cloud ID field is calculated to be 11 according to the above formula. Convert 11 to binary and fill it into the virtual private cloud ID length field, and then fill it with the associated virtual private cloud ID.

[0041] If the number of virtual network interface ports is 8000, the length of the virtual network interface port ID field is calculated to be 13 using the above formula. Convert 13 to binary and fill it into the virtual network interface port ID length field, and then fill it with the associated virtual network interface port ID afterward.

[0042] If a resource type is a security group, for example, the number of security groups is 15000, the length of the resource ID field calculated using the above formula is 14. Convert 14 to binary and fill it into the resource ID length field, and then fill in the associated resource ID after it.

[0043] In one alternative embodiment, the current version number of the SDN controller is determined by the number of times the SDN controller has been started or the number of times the SDN controller has reconnected to the Open Virtual Switch.

[0044] In this embodiment of the application, to distinguish flow tables left over from the previous startup, the current version number of the SDN controller is determined based on the number of times the SDN controller has been started, or the number of times the SDN controller has reconnected with the Open vSwitch (OVS). For example, each time the SDN controller starts up, or when the SDN controller reconnects to OVS, the current version number of the SDN controller is incremented by 1 (or decremented by 1). When the value filled in the version number field reaches the maximum value that the version number field can represent, the version number field is cleared to zero and the count starts again. For example, if the version number field occupies 2 bits, and the value filled in the version number field is 11, which is the maximum value that 2 bits can represent, then the version number field is cleared to zero and the count starts again.

[0045] In an optional embodiment, the method further includes: After the flow table is sent, the current version number of the SDN controller is compared with the value represented by the version number field of the existing flow table in the open virtual switch to obtain the comparison result; If the comparison results are inconsistent, delete the flow table corresponding to the inconsistent comparison results.

[0046] This application embodiment deletes flow tables in OVS that already contain a version number field that is inconsistent with the current version number of the SDN controller. For example, the SDN controller records its current version number as 2, and there is a flow table 1 in OVS with a Version field filled with a value of 11, meaning that the Version field indicates that the current version number of the SDN controller is 2. 1 +2 0 If the value is 3, then the current version number 2 of the SDN record is inconsistent with the version number 3 represented by the Version field, so flow table 1 is deleted from OVS.

[0047] This application embodiment records the current version number of the SDN controller in the cookie item, which can accurately identify and delete the flow table of the old rule, avoid service interruption due to incorrect deletion of flow table, and does not affect the forwarding performance of OVS.

[0048] Furthermore, the above comparison and deletion can be performed after all flow tables have been sent to avoid service interruption. Specifically, if no flow tables are sent within a preset time period, it is considered that all flow table sending is complete, and at this time, the above comparison and deletion can be performed.

[0049] In an alternative embodiment, the Cookie item further includes an optional field for marking information customized according to the resource type associated with the flow table.

[0050] Furthermore, if there is still unused space in the Cookie field, custom information can be added to the Options field based on the resource type associated with the flow table. For example, the Resource Type field marks the primary type of the resource associated with the flow table, while the Options field can be used to mark the secondary type of the resource associated with the flow table. Secondary types are subsets of primary types.

[0051] See Figure 2 This is a structural diagram of a Cookie item provided in an embodiment of this application. The Cookie item has a length of 64 bits; the Version field occupies 2 bits; the Type field occupies 6 bits; the Identification field has a variable length, which can occupy a maximum of 64-2-6=56 bits; the Options field has a variable length, and the remaining bits are available for use.

[0052] See Figure 3 This is a structural diagram of a resource identifier field provided in an embodiment of this application. The VPC ID length field occupies 4 bits; the virtual network interface card (NIC) port ID length field occupies 4 bits; the resource ID length field occupies 4 bits; the lengths of the VPC ID field, the NIC port ID field, and the resource ID field are x, y, and z, respectively. The lengths of these three IDs are determined according to their respective quantities, and the total length of these three IDs does not exceed 64-2-6-4. 3 = 44 bits.

[0053] See Figure 4This is a structural diagram of a flow table generation deployment architecture provided in an embodiment of this application. An SDN controller connects to one or more OVSs, which are responsible for forwarding service packets. The SDN controller is responsible for generating flow tables based on configuration data and sending them to the OVSs, as well as processing the packets sent by the OVSs. Each OVS connects to a virtual machine (VM) through one or more ports, with one VM corresponding to one port. The VMs send and receive service packets through these ports.

[0054] For example, define DHCP (Dynamic Host Configuration Protocol) as a resource type, assuming this resource type is labeled 15. When issuing DHCP-related flow tables, generate cookie entries according to the following steps: a. Populate the current version number of the SDN control into the Version field; b. Convert 15 to binary and fill it into the Type field; c. Calculate the length of the VPC ID, virtual network adapter port ID, and DHCP ID respectively, and fill the Identification field with the length of each ID and the corresponding ID value in sequence.

[0055] The SDN controller processes service messages of various resource types in the same way. The following explanation uses the process of processing DHCP request messages as an example. Figure 5 As shown. The VM sends a DHCP request message to OVS. When a flow table entry matches a DHCP request message, OVS will send the matching flow table and the DHCP request message to the SDN controller. The SDN controller processes the reported data, specifically: 1. The VM sends a DHCP request message to OVS.

[0056] 2. DHCP request messages are forwarded in OVS, and the flow table of DHCP request messages is matched according to the matching field entry.

[0057] 3. According to the instruction entries in the matched flow table, send the matched DHCP request message and flow table to the SDN controller.

[0058] 4. The SDN controller parses the resource type as DHCP from the Type field in the flow table Cookie entry; then, according to the lengths shown in the VPCID length field, the virtual NIC port ID length field, and the resource ID length field, it parses each ID from the resource identifier field, including the VPC ID, virtual NIC port ID, and DHCP ID.

[0059] 5. The SDN controller finds the processing module (hereinafter referred to as the DHCP processing module) whose resource type is DHCP, and sends the DHCP request message and each ID to the DHCP processing module.

[0060] 6. The DHCP processing module obtains DHCP resource data based on each ID, that is, the DHCP resource data indicated by the VPC ID, virtual network card port ID, and DHCP ID is used as the obtained DHCP resource data.

[0061] 7. The DHCP processing module parses the received DHCP request message and obtains the destination MAC (Media Access Control Address).

[0062] 8. Assemble the DHCP response message by combining the destination MAC address and DHCP resource data.

[0063] 8. The DHCP processing module sends the DHCP response message to OVS.

[0064] 9. OVS forwards the DHCP response message to the VM.

[0065] See Figure 6 , Figure 6 This is a structural block diagram of a flow table generation device 10 provided in an embodiment of this application. The flow table generation device 10 includes: Generation module 11 is used to generate flow tables after the SDN controller starts; wherein the Cookie item of the flow table includes at least the following fields: The version number field is used to mark the current version number of the SDN controller; The resource type field is used to identify the resource type associated with the flow table; The resource identifier field is used to mark the resource identifier associated with the flow table.

[0066] Optionally, the resource identifier field includes: The Virtual Private Cloud ID field is used to identify the Virtual Private Cloud ID to which the resource associated with the flow table belongs; The Virtual NIC Port ID field is used to identify the virtual NIC port ID to which the resource associated with the flow table belongs; The resource ID field is used to identify the resource ID associated with the flow table.

[0067] Optionally, the resource identifier field further includes: The Virtual Private Cloud ID length field is used to indicate the length occupied by the Virtual Private Cloud ID field; The virtual network interface card (NIC) port ID length field is used to indicate the length occupied by the virtual NIC port ID field; The resource ID length field is used to indicate the length occupied by the resource ID field.

[0068] Optionally, the virtual private cloud ID length field is configured by the number of virtual private clouds; The virtual network interface card (NIC) port ID length field is configured by the number of virtual NIC ports; The resource ID length field is configured by the number of resources.

[0069] Optionally, the current version number of the SDN controller is determined by the number of times the SDN controller has been started or the number of times the SDN controller has reconnected to the open virtual switch.

[0070] Optionally, the flow table generation device 10 further includes: The comparison module is used to compare the current version number of the SDN controller with the value represented by the version number field of the existing flow table in the open virtual switch after the flow table is sent, and obtain the comparison result. The deletion module is used to delete the flow table corresponding to the inconsistent comparison results when the comparison results are inconsistent.

[0071] Optionally, the Cookie item may further include: an optional field for marking information customized according to the resource type associated with the flow table.

[0072] It is worth noting that the working process of each module in the flow table generation device 10 described in this application embodiment can refer to the working process of the flow table generation method described in the above embodiment, and will not be repeated here.

[0073] This application provides a flow table generation device 10 that generates flow tables after the SDN controller is started. The cookie entries of the flow tables include at least the following fields: a version number field, used to mark the current version number of the SDN controller; a resource type field, used to mark the resource type associated with the flow table; and a resource identifier field, used to mark the resource identifier associated with the flow table. Therefore, this application embodiment effectively associates flow tables with resources through the resource type and resource identifier fields of the flow table cookie entries. This enables the controller to accurately process business logic, perform batch operations, and quickly locate faults based on the resource type and resource identifier fields. This not only improves the efficiency of the controller in processing business logic but also simplifies the management process of complex flow table entries in the SDN network, significantly enhancing overall operational efficiency.

[0074] Furthermore, this application also provides a computer-readable storage medium, which includes a stored computer program; wherein, when the computer program is executed, it controls the device where the computer-readable storage medium is located to perform the flow table generation method as described in any of the above embodiments.

[0075] Furthermore, this application also provides a computer program product, including a computer program / instructions, which, when executed by a processor, implements the flow table generation method as described in any of the above embodiments.

[0076] See Figure 7 , Figure 7 This is a structural block diagram of a flow table generation device 20 provided in an embodiment of this application. The flow table generation device 20 includes: a processor 21, a memory 22, and a computer program stored in the memory 22 and executable on the processor 21. When the processor 21 executes the computer program, it implements the steps in the above-described flow table generation method embodiments. Alternatively, when the processor 21 executes the computer program, it implements the functions of each module / unit in the above-described device embodiments.

[0077] For example, the computer program may be divided into one or more modules / units, which are stored in the memory 22 and executed by the processor 21 to complete this application. The one or more modules / units may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of the computer program in the flow table generation device 20.

[0078] The flow table generation device 20 may include, but is not limited to, a processor 21 and a memory 22. Those skilled in the art will understand that the schematic diagram is merely an example of the flow table generation device 20 and does not constitute a limitation on the flow table generation device 20. It may include more or fewer components than illustrated, or combine certain components, or different components. For example, the flow table generation device 20 may also include input / output devices, network access devices, buses, etc.

[0079] The processor 21 can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor. The processor 21 is the control center of the flow table generation device 20, connecting all parts of the flow table generation device 20 via various interfaces and lines.

[0080] The memory 22 can be used to store the computer programs and / or modules. The processor 21 implements various functions of the flow table generation device 20 by running or executing the computer programs and / or modules stored in the memory 22 and calling the data stored in the memory 22. The memory 22 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the mobile phone (such as audio data, phonebook, etc.). In addition, the memory 22 may include high-speed random access memory, and may also include non-volatile memory, such as hard disk, memory, plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, at least one disk storage device, flash memory device, or other volatile solid-state storage device.

[0081] If the modules / units integrated in the flow table generation device 20 are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by the processor 21, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc.

[0082] It should be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Furthermore, in the accompanying drawings of the device embodiments provided in this application, the connection relationships between modules indicate that they have communication connections, which can be specifically implemented as one or more communication buses or signal lines. Those skilled in the art can understand and implement this without any creative effort.

[0083] The above description is the preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications are also considered to be within the scope of protection of this application.

Claims

1. A method for generating flow tables, characterized in that, include: When the SDN controller starts, it generates flow tables; the Cookie entries in these flow tables include at least the following fields: The version number field is used to mark the current version number of the SDN controller; The resource type field is used to identify the resource type associated with the flow table; The resource identifier field is used to mark the resource identifier associated with the flow table.

2. The flow table generation method as described in claim 1, characterized in that, The resource identifier field includes: The Virtual Private Cloud ID field is used to identify the Virtual Private Cloud ID to which the resource associated with the flow table belongs; The Virtual NIC Port ID field is used to identify the virtual NIC port ID to which the resource associated with the flow table belongs; The resource ID field is used to identify the resource ID associated with the flow table.

3. The flow table generation method as described in claim 2, characterized in that, The resource identifier field also includes: The Virtual Private Cloud ID length field is used to indicate the length occupied by the Virtual Private Cloud ID field; The virtual network interface card (NIC) port ID length field is used to indicate the length occupied by the virtual NIC port ID field; The resource ID length field is used to indicate the length occupied by the resource ID field.

4. The flow table generation method as described in claim 3, characterized in that, The Virtual Private Cloud ID length field is configured by the number of Virtual Private Clouds; The virtual network interface card (NIC) port ID length field is configured by the number of virtual NIC ports; The resource ID length field is configured by the number of resources.

5. The flow table generation method as described in claim 1, characterized in that, The current version number of the SDN controller is determined by the number of times the SDN controller has been started or the number of times the SDN controller has reconnected to the Open Virtual Switch.

6. The flow table generation method as described in claim 1, characterized in that, The method further includes: After the flow table is sent, the current version number of the SDN controller is compared with the value represented by the version number field of the existing flow table in the open virtual switch to obtain the comparison result; If the comparison results are inconsistent, delete the flow table corresponding to the inconsistent comparison results.

7. The flow table generation method as described in claim 1, characterized in that, The Cookie item also includes an optional field for marking information customized according to the resource type associated with the flow table.

8. A flow table generation device, characterized in that, include: The generation module is used to generate flow tables after the SDN controller starts; wherein the Cookie item of the flow table includes at least the following fields: The version number field is used to mark the current version number of the SDN controller; The resource type field is used to identify the resource type associated with the flow table; The resource identifier field is used to mark the resource identifier associated with the flow table.

9. A flow table generation device, characterized in that, It includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor, when executing the computer program, implements the flow table generation method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored computer program; wherein, when the computer program is executed, it controls the device where the computer-readable storage medium is located to perform the flow table generation method as described in any one of claims 1 to 7.

11. A computer program product, characterized in that, Includes a computer program / instruction that, when executed by a processor, implements the flow table generation method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Tracking method of flow table rule generation process

    CN108512763A

  • State recognition information generation method, system and device and storage medium thereof

    CN111726236A

  • Port resource reservation method, electronic equipment and storage medium

    CN113543234A

  • Self-adaptive instruction set code automatic generation method and device

    CN117435248A

  • Multicast copying and forwarding system

    CN118200416A