CN112615783B - Table item updating method and device, electronic equipment and storage medium - Google Patents
Table item updating method and device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN112615783B CN112615783B CN202011282902.0A CN202011282902A CN112615783B CN 112615783 B CN112615783 B CN 112615783B CN 202011282902 A CN202011282902 A CN 202011282902A CN 112615783 B CN112615783 B CN 112615783B
- Authority
- CN
- China
- Prior art keywords
- group
- identifier
- signal
- entry
- switching device
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/02—Topology update or discovery
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/74—Address processing for routing
- H04L45/745—Address table lookup; Address filtering
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L49/00—Packet switching elements
- H04L49/25—Routing or path finding in a switch fabric
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The application provides a table item updating method, a table item updating device, electronic equipment and a storage medium, wherein the method is applied to exchange equipment and comprises the following steps: receiving an openflow flow table updating instruction sent by an SDN control module in a server for controlling signal source switching; according to the openflow flow table updating instruction, deleting the table entry contents in the group table associated with the flow table corresponding to each first IP signal corresponding to the first group entry identifier stored in the switching device chip, and sequentially copying the table entry contents in the group table corresponding to each second IP signal corresponding to the first group exit identifier in all group exit identifiers cached in the local memory to the group table associated with the flow table corresponding to each third IP signal corresponding to the second group entry identifier. The embodiment of the application can greatly save the table entry updating time.
Description
Technical Field
The present application relates to the field of communications technologies, and in particular, to a method and an apparatus for updating a table entry, an electronic device, and a storage medium.
Background
The impact of internet videos and the driving of national policies promote the evolution of various television stations from standard definition and high definition signal sources to 4K signal sources and the like.
For a television station, different 4K signal sources generally need to be switched to broadcast different programs, in order to ensure smooth switching of signal sources, after receiving a signal source switching instruction input by a user, an upper application module in a server for controlling signal source switching respectively obtains a matching item corresponding to a plurality of first Internet Protocol (IP) signals transmitted to a switching device corresponding to a signal source before switching, an action item corresponding to a plurality of second IP signals transmitted to the switching device corresponding to the signal source before switching, and a matching item corresponding to a plurality of third IP signals transmitted to the switching device corresponding to a signal source to be switched from a database, and sends the obtained contents to a Software Defined Network (SDN) control module in the server. Here, the number of all the first IP signals, all the second IP signals, and all the third IP signals is the same.
After receiving the contents, the SDN control module generates, for each first IP signal and each third IP signal, an openflow table deletion instruction for deleting contents of entries in a group (group) table associated with a flow table corresponding to the first IP signal (i.e., contents of an action item corresponding to the specified second IP signal), and sends the openflow table deletion instruction to the switching device, and the switching device deletes, according to the instruction, contents of entries in a group table associated with a flow table corresponding to the first IP signal.
Then, the SDN control module generates an openflow table adding instruction for adding the entry content in the group table corresponding to the third IP signal and an appointed second IP signal in the group table associated with the flow table, and sends the openflow table adding instruction to the switching device, and the switching device adds the flow table corresponding to the third IP signal according to the instruction and adds the entry content in the group table corresponding to the appointed second IP signal in the group table associated with the flow table, so that the subsequent switching device can normally forward the entry content to the television station dedicated device when receiving the third IP signal.
It can be seen that, when a signal source needs to be switched, the switching device needs to delete one relevant table entry and add one relevant flow table and the table entry content of the associated group table in the process of executing the update of the relevant table entry, so that the time consumption is long when the number of IP signals corresponding to the signal source needing to be switched is large.
Disclosure of Invention
In order to overcome the problems in the related art, the application provides a table entry updating method, a table entry updating device, an electronic device and a storage medium.
According to a first aspect of the embodiments of the present application, there is provided an entry updating method, where the method is applied to a switching device, and the method includes:
receiving an openflow flow table updating instruction sent by an SDN control module in a server for controlling signal source switching, wherein the openflow flow table updating instruction is used for instructing the switching device to cancel an association relationship between a first group entering identifier and a first group exiting identifier and add an association relationship between a second group entering identifier and the first group exiting identifier, and the openflow flow table updating instruction is a first group entering identifier of a first group entering corresponding to a plurality of first IP signals transmitted to the switching device and belonging to the switching device together, a first group exiting identifier of a first group exiting corresponding to a plurality of second IP signals transmitted to the switching device and belonging to a plurality of third IP signals transmitted to the switching device and belonging to the switching device together, which are acquired from a database by the upper layer application module based on a signal source switching instruction input by a user, of the SDN control module, and corresponds to a plurality of signal sources transmitted to the switching device and belonging to the plurality of second IP signals transmitted to the switching device and belonging to the switching device together Generating a second grouping identifier of grouping;
according to the openflow flow table updating instruction, deleting table item contents corresponding to the first group outlet identifier in a group table associated with a flow table corresponding to each first IP signal corresponding to the first group inlet identifier stored in a chip of the switching device, and sequentially copying table item contents in a group table corresponding to each second IP signal corresponding to the first group outlet identifier in all group outlet identifiers cached in a local memory to a group table associated with a flow table corresponding to each third IP signal corresponding to the second group inlet identifier;
wherein the number of all the first IP signals, all the second IP signals and all the third IP signals is the same.
According to a second aspect of the embodiments of the present application, there is provided an entry updating apparatus, where the apparatus is applied to a switching device, and the apparatus includes:
a receiving module, configured to receive an openflow flow table update instruction sent by an SDN control module in a server that controls signal source switching, where the openflow flow table update instruction is used to instruct the switching device to cancel an association relationship between a first group entry identifier and a first group exit identifier and add an association relationship between a second group entry identifier and the first group exit identifier, and the openflow flow table update instruction is a first group entry identifier of a first group entry to which a plurality of first IP signals that are sent to the switching device and belong together and are obtained by the upper layer application module from a database according to a signal source switching instruction input by a user, where the plurality of first group entry identifiers correspond to a signal source before switching and are obtained by the SDN control module based on the upper layer application module in the server, a first group exit identifier of a first group to which a plurality of second IP signals that are sent to the switching device and a plurality of third IP signals that are sent to the switching device and belong to which a plurality of second IP signals that are sent to the switching device and belong together and correspond to a plurality of signal sources to be switched and are sent to the switching device The second group entering identification of the second group entering which the user belongs together is generated;
an updating module, configured to delete, according to the openflow flow table update instruction, entry contents corresponding to the first group exit identifier in a group table associated with a flow table corresponding to each first IP signal corresponding to the first group entry identifier stored in a chip of the switch device, and copy, in sequence, entry contents in a group table corresponding to each second IP signal corresponding to each first group exit identifier in all group exit identifiers cached in a local memory, to a group table associated with a flow table corresponding to each third IP signal corresponding to the second group entry identifier;
wherein the number of all the first IP signals, all the second IP signals and all the third IP signals is the same.
According to a third aspect of embodiments herein, there is provided an electronic device comprising a processor and a machine-readable storage medium storing machine-executable instructions executable by the processor, the processor being caused by the machine-executable instructions to: implementing any of the above described table entry updating method steps.
According to a fourth aspect of the embodiments of the present application, there is provided a computer-readable storage medium, having stored therein a computer program, which when executed by a processor, implements any of the table entry updating method steps.
The technical scheme provided by the embodiment of the application can have the following beneficial effects:
in this embodiment of the present application, for a switching device, when an openflow flow table update instruction issued by an SDN control module in a server for controlling signal source switching is received, each flow table corresponding to an entry identifier of an entry group to which a plurality of IP signals transmitted to the switching device belong together and a group table whose associated entry content is empty have been stored in a chip of the switching device, and each group table corresponding to an exit group identifier of an exit group to which an IP signal transmitted from the switching device belongs together and corresponding to each signal source have been cached in a local memory, so that the switching device may directly delete, according to the openflow table update instruction, entry contents corresponding to the exit group identifier in the group table associated with each flow table corresponding to the entry identifier corresponding to the signal source before switching and corresponding to the group identifier before switching stored in the chip of the switching device, and delete, from the local memory, entry contents corresponding to the exit group table corresponding to the group identifier corresponding to the signal source before switching in all the group identifiers cached in the local memory The table entry contents are sequentially copied to the group table associated with each flow table corresponding to the group entry identifier corresponding to the switched signal source, so that the updating time of the related table entries is greatly saved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this application, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application.
Fig. 1 is a schematic flowchart of an entry updating method according to an embodiment of the present application;
fig. 2 is a schematic structural diagram of an entry updating apparatus according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present application. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
Next, examples of the present application will be described in detail.
An embodiment of the present application provides a table entry updating method, which is applied to a switching device, and as shown in fig. 1, the method may include the following steps:
and S11, receiving an openflow flow table updating instruction sent by an SDN control module in the server.
In this step, the openflow flow table update instruction is used to instruct the switching device to cancel the association relationship between the first group entry identifier and the first group exit identifier and add the association relationship between the second group entry identifier and the first group exit identifier.
The openflow flow table updating instruction is actually generated by the SDN control module based on a first grouping identifier, to which a plurality of first IP signals transmitted to the switching device belong together, of an upper application module issued by an upper application module in the server according to a signal source switching instruction input by a user, the first grouping identifier, to which a plurality of second IP signals transmitted to the switching device belong together, of the signal source before switching obtained from the database according to the signal source switching instruction, and a second grouping identifier, to which a plurality of third IP signals transmitted to the switching device belong together, of the signal source before switching belong to a first grouping identifier.
And S12, deleting the table entry content corresponding to the first group identifier in the group table associated with the flow table corresponding to each first IP signal corresponding to the first group identifier stored in the chip of the switching device according to the openflow flow table updating instruction, and sequentially copying the table entry content in the group table corresponding to each second IP signal corresponding to the first group identifier in all the group identifiers cached in the local memory to the group table associated with the flow table corresponding to each third IP signal corresponding to the second group identifier.
It should be noted that, in the embodiment of the present application, the number of all the first IP signals, all the second IP signals, and all the third IP signals is the same.
Further, in this embodiment of the present application, before receiving the openflow flow table update instruction, the switching device may further perform the following operations:
receiving a flow table corresponding to each IP signal corresponding to an incoming group identifier to which a plurality of IP signals transmitted to the switching device belong together, a group table associated with the flow table corresponding to each IP signal corresponding to each incoming group identifier, and a group table corresponding to each IP signal corresponding to a plurality of outgoing group identifiers to which the IP signals transmitted to the switching device belong together, wherein the content of the group table associated with each flow table is empty during initialization;
and storing the flow table corresponding to each IP signal corresponding to each group entering identifier and the group table associated with the flow table corresponding to each IP signal corresponding to each group entering identifier into a switching equipment chip, and caching the group table corresponding to each IP signal corresponding to each group exiting identifier into a local memory.
It should be noted that, in this operation flow, a flow table corresponding to each IP signal corresponding to a group entry identifier to which a plurality of IP signals transmitted to the switching device belong together (which may also be referred to as a group entry identifier corresponding to each signal source) corresponding to each IP signal is actually generated by the SDN control module according to a matching item corresponding to each IP signal corresponding to each group entry identifier issued by the upper-layer application module; a group table corresponding to each IP signal corresponding to an out-group identifier to which a plurality of IP signals transmitted from the switching device belong together (which may also be referred to as an in-group identifier corresponding to each signal source) corresponding to each signal source is generated by the SDN control module according to an action item corresponding to each IP signal corresponding to each out-group identifier issued by the upper application module.
Initially, when generating a flow table corresponding to each IP signal corresponding to the group entry identifier corresponding to each signal source, the SDN control module automatically associates a group table with empty entry content for each flow table, so as to save the update time of the subsequent switching device for updating the relevant entries.
In this operational flow, each signal source may be a 4K signal source or the like.
Further, in the embodiment of the present application, after the step S12 is executed, the following operations may be executed for the switching device:
when any third IP signal in the second group is received, searching a flow table matched with the third IP signal from the flow table corresponding to each third IP signal corresponding to the second group identification;
and processing the third IP signal according to the found action item in the group table associated with the flow table, and forwarding the processed IP signal.
The following describes the above-mentioned table entry updating method in detail with reference to specific embodiments.
Suppose there are 2 signal sources, signal source 1 and signal source 2, which are transmitted into the special equipment of the television station.
Assume that the number of IP signals corresponding to these 2 signal sources, which are transmitted to the switching device and transmitted from the switching device, is 3. For each signal source in the 2 signal sources, a server for controlling signal source switching divides the IP signals transmitted into the switching equipment corresponding to the signal source into the same group in advance, and creates a matching item corresponding to each IP signal corresponding to the group; and dividing the IP signals of the outgoing switching equipment corresponding to the signal source into the same outgoing group, and creating action items corresponding to all the IP signals corresponding to the outgoing group. Here, different groups are distinguished by using different group entry identifiers, and different groups are distinguished by using different group exit identifiers, and specific examples are as follows:
group 0: IP signal 1 match;
group 0: IP signal 2 match;
group 0: IP signal 3 match;
group 1: IP signal 4 match;
group 1: IP signal 5 match;
group 1: IP signal 6 matches;
and (3) group 0: IP signal 7 action item;
and (3) group 0: IP signal 8 action item;
and (3) group 0: IP signal 9 action item;
and (3) group discharge 1: IP signal 10 action item;
and (3) group discharge 1: IP signal 11 action item;
and (3) group discharge 1: IP signal 12 action items.
The group 0 and the group 0 correspond to the signal source 1, and the group 1 correspond to the signal source 2.
It should be noted that if a signal source can be transmitted from different output ports by the switching device, the signal source can correspond to different output groups.
And the upper application module stores the created matching items corresponding to the IP signals corresponding to each group and the created action item information corresponding to the IP signals corresponding to each group into a local database, and copies and sends all the information to the SDN control module in the server.
After receiving the information, the SDN control module generates flow tables corresponding to each IP signal corresponding to group entry 0 and group entry 1, where each flow table includes matching item content corresponding to a corresponding IP signal (for example, information such as an entry port, a destination IP address, a User Datagram Protocol (UDP) port number), and associates a group table whose entry content is empty for each flow table, and also generates group tables corresponding to each IP signal corresponding to group entry 0 and group exit 1, and each group table includes action item content (including a corresponding action instruction) used for obtaining a corresponding IP signal, which includes the following specific examples:
group 0: IP signal 1flow table group table;
group 0: IP signal 2flow table group table;
group 0: an IP signal 3flow table group table;
group 1: IP signal 4flow table group table;
group 1: IP signal 5flow table group table;
group 1: IP signal 6flow table group table;
and (3) group 0: IP signal 7group table;
and (3) group 0: an IP signal 8group table;
and (3) group 0: IP signal 9group table;
and (3) group discharge 1: IP signal 10group table;
and (3) group discharge 1: an IP signal 11group table;
and (3) group discharge 1: IP signal 12group table.
And the SDN control module sends the generated table entries to the switching device through an openflow flow table adding instruction.
The switching device stores the flow tables corresponding to the IP signals corresponding to the group entry 0 and the group entry 1 and the group tables associated with the flow tables corresponding to the IP signals corresponding to the group entry 0 and the group entry 1 into the switching device chip, and caches the group tables corresponding to the IP signals corresponding to the group exit 0 and the group exit 1 in the local memory.
Subsequently, if the switching device receives openflow flow table association instructions associated with the group 0 and the group 0 sent by the SDN control module, the switching device sequentially copies the table entry contents in the group table corresponding to each IP signal corresponding to the group 0 cached in the local memory to the group table associated with the flow table corresponding to each IP signal corresponding to the group 0, so that when the switching device receives any IP signal corresponding to the group 0, the switching device can finally process the IP signal according to the action item in the corresponding group table and forward the processed IP signal to the television station dedicated device.
If the switching device receives an openflow flow table update instruction sent by the SDN control module to cancel the association relationship between the group 0 and add the association relationship between the group 1 and the group 0, the switching device deletes the entry content corresponding to the group 0 in the group table associated with the flow table corresponding to each IP signal corresponding to the group 0 stored in the switching device chip, and sequentially copies the locally cached entry content in the group table corresponding to each IP signal corresponding to the group 0 into the group table associated with the flow table corresponding to each IP signal corresponding to the group 1, so that when the switching device receives any IP signal corresponding to the group 1, the switching device can finally process the IP signal according to the action item in the corresponding group table and then forward the processed IP signal to the television station dedicated device to complete the switching of different signal sources.
As can be seen from the above technical solutions, in the embodiment of the present application, for the switching device, when an openflow flow table update instruction issued by an SDN control module in a server for controlling signal source switching is received, each flow table corresponding to an entry identifier to which a plurality of IP signals transmitted to the switching device belong together and an associated group table having empty table entry contents are stored in a chip of the switching device, and each group table corresponding to an exit identifier to which a plurality of IP signals transmitted from the switching device belong together and corresponding to a plurality of signal sources are cached in a local memory, so that the switching device may directly delete the table entry contents in the group table associated with each flow table corresponding to the entry identifier corresponding to the signal source before switching stored in the chip of the switching device according to the openflow flow table update instruction, and delete the table entry contents in the group table associated with each flow table corresponding to the exit identifier corresponding to the signal source before switching in all the exit identifiers cached in the local memory and corresponding to the exit identifier corresponding to the group identifier before switching The list item contents in each group table are sequentially copied to the group table associated with each flow table corresponding to the grouping identifier corresponding to the switched signal source, so that the updating time of the related list items is greatly saved.
Based on the same inventive concept, the present application further provides an entry updating apparatus, which is applied to a switching device, and a schematic structural diagram of the apparatus is shown in fig. 2, and specifically includes:
a receiving module 21, configured to receive an openflow flow table update instruction sent by an SDN control module in a server for controlling signal source switching, where the openflow flow table update instruction is used to instruct the switching device to cancel an association relationship between a first group entry identifier and a first group exit identifier and add an association relationship between a second group entry identifier and the first group exit identifier, and the openflow table update instruction is a first group entry identifier of a first group entry to which a plurality of first IP signals that are sent to the switching device and correspond to a plurality of signal sources before switching and correspond to which the plurality of first IP signals that are sent to the switching device and correspond to a plurality of signal sources to be switched and correspond to a plurality of switching devices and correspond to a plurality of signal sources to be switched and correspond to a plurality of first group exit identifiers to which a plurality of signal sources before switching and correspond to a plurality of signal sources to be sent to the switching device and correspond to a plurality of signal sources to be switched and correspond to each other A second group identifier of a second group to which the standby third IP signal belongs together is generated;
an updating module 22, configured to delete, according to the openflow flow table updating instruction, entry contents corresponding to the first group exit identifier in a group table associated with a flow table corresponding to each first IP signal corresponding to the first group entry identifier stored in a chip of the switching device, and copy, in sequence, entry contents in a group table corresponding to each second IP signal corresponding to each first group exit identifier in all group exit identifiers cached in a local memory, to a group table associated with a flow table corresponding to each third IP signal corresponding to the second group entry identifier;
wherein the number of all the first IP signals, all the second IP signals and all the third IP signals is the same.
Preferably, the receiving module 21 is further configured to receive, before receiving an openflow flow table update instruction, a flow table corresponding to each IP signal corresponding to a group entry identifier to which a plurality of IP signals transmitted to the switching device belong together, a group table associated with the flow table corresponding to each IP signal corresponding to each group entry identifier, and a group table corresponding to each IP signal corresponding to a plurality of group exit identifiers to which a plurality of IP signals transmitted from the switching device belong together, where table entry content of the group table associated with each flow table is empty when initializing;
the device further comprises:
a storage module (not shown in fig. 2), configured to store, in the switching device chip, a flow table corresponding to each IP signal corresponding to each group entry identifier and a group table associated with the flow table corresponding to each IP signal corresponding to each group entry identifier, and cache, in the local memory, the group table corresponding to each IP signal corresponding to each group exit identifier;
wherein, a flow table corresponding to each IP signal corresponding to an entry identifier of an entry group to which a plurality of IP signals transmitted to the switching device belong together is generated by the SDN control module according to a matching item corresponding to each IP signal corresponding to each entry identifier issued by the upper application module;
and a group table corresponding to each IP signal corresponding to a group identifier of a group to which a plurality of IP signals transmitted from the switching device belong together is generated by the SDN control module according to an action item corresponding to each IP signal corresponding to each group identifier issued by the upper application module.
Preferably, each signal source is a 4K signal source.
Preferably, the apparatus further comprises:
a searching module (not shown in fig. 2), configured to, after the updating module sequentially copies, in all the group identifiers cached in the local memory, entry contents in a group table corresponding to each second IP signal corresponding to the first group identifier to a group table associated with a flow table corresponding to each third IP signal corresponding to the second group identifier, and when any third IP signal in the second group is received, search, from a flow table corresponding to each third IP signal corresponding to the second group identifier, a flow table matched with the third IP signal;
and a processing module (not shown in fig. 2) configured to process the third IP signal according to the action item in the group table associated with the found flow table, and forward the processed IP signal.
As can be seen from the above technical solutions, in the embodiment of the present application, for the switching device, when an openflow flow table update instruction issued by an SDN control module in a server for controlling signal source switching is received, each flow table corresponding to an entry identifier to which a plurality of IP signals transmitted to the switching device belong together and an associated group table having empty table entry contents are stored in a chip of the switching device, and each group table corresponding to an exit identifier to which a plurality of IP signals transmitted from the switching device belong together and corresponding to a plurality of signal sources are cached in a local memory, so that the switching device may directly delete the table entry contents in the group table associated with each flow table corresponding to the entry identifier corresponding to the signal source before switching stored in the chip of the switching device according to the openflow flow table update instruction, and delete the table entry contents in the group table associated with each flow table corresponding to the exit identifier corresponding to the signal source before switching in all the exit identifiers cached in the local memory and corresponding to the exit identifier corresponding to the group identifier before switching The list item contents in each group table are sequentially copied to the group table associated with each flow table corresponding to the grouping identifier corresponding to the switched signal source, so that the updating time of the related list items is greatly saved.
An electronic device is further provided in the embodiments of the present application, as shown in fig. 3, including a processor 31 and a machine-readable storage medium 32, where the machine-readable storage medium 32 stores machine-executable instructions that can be executed by the processor 31, and the processor 31 is caused by the machine-executable instructions to: and implementing the table item updating method.
The machine-readable storage medium may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Alternatively, the machine-readable storage medium may be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also 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.
In yet another embodiment provided by the present application, a computer-readable storage medium is further provided, in which a computer program is stored, and the computer program, when executed by a processor, implements the steps of the above-mentioned entry updating method.
The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the scope of protection of the present application.
Claims (10)
1. An entry updating method, applied to a switching device, the method comprising:
receiving an openflow flow table updating instruction sent by a Software Defined Network (SDN) control module in a server for controlling signal source switching, wherein the openflow flow table updating instruction is used for instructing the switching device to cancel an association relationship between a first group entering identifier and a first group exiting identifier and add an association relationship between a second group entering identifier and the first group exiting identifier, and the openflow table updating instruction is used for indicating that the SDN control module cancels an association relationship between the first group entering identifier and the first group exiting identifier and a relationship between the second group entering identifier and the first group exiting identifier, and the openflow table updating instruction is used for indicating that the SDN control module obtains a first group entering identifier of a first group entering to which a plurality of first IP signals transmitted to the switching device jointly belong, a first group exiting identifier of a first group to which a plurality of second IP signals transmitted to the switching device jointly belong, and a plurality of third IP signals transmitted to the switching device and jointly belong to a plurality of second IP signals transmitted to the switching device, which the plurality of first group exiting identifiers correspond to which second IP signals transmitted to the switching device jointly belong, and correspond to which the switching device correspond to be switched signal source Generating a second group entering identifier of a second group entering with the attribution;
according to the openflow flow table updating instruction, deleting table item contents corresponding to the first group-out identifier in a group table associated with a flow table corresponding to each first IP signal corresponding to the first group-in identifier stored in a chip of the switching device, and sequentially copying table item contents in a group table corresponding to each second IP signal corresponding to each first group-out identifier in all group-out identifiers cached in a local memory to a group table associated with a flow table corresponding to each third IP signal corresponding to the second group-in identifier;
wherein the number of all the first IP signals, all the second IP signals and all the third IP signals is the same.
2. The method of claim 1, wherein prior to receiving an openflow flow table update instruction, the method further comprises:
receiving a flow table corresponding to each IP signal corresponding to a group entry identifier to which a plurality of IP signals transmitted to the switching device belong together, a group table associated with each flow table corresponding to each IP signal corresponding to each group entry identifier, and a group table corresponding to each IP signal corresponding to a plurality of group exit identifiers to which a plurality of IP signals transmitted from the switching device belong together, wherein the table entry content of the group table associated with each flow table is empty during initialization;
storing a flow table corresponding to each IP signal corresponding to each group entering identifier and a group table associated with the flow table corresponding to each IP signal corresponding to each group entering identifier into a switching equipment chip, and caching the group table corresponding to each IP signal corresponding to each group exiting identifier into a local memory;
wherein, a flow table corresponding to each IP signal corresponding to an entry identifier of an entry group to which a plurality of IP signals transmitted to the switching device belong together is generated by the SDN control module according to a matching item corresponding to each IP signal corresponding to each entry identifier issued by the upper application module;
and a group table corresponding to each IP signal corresponding to a group identifier of a group to which a plurality of IP signals transmitted from the switching device belong together is generated by the SDN control module according to an action item corresponding to each IP signal corresponding to each group identifier issued by the upper application module.
3. The method of claim 2, wherein each signal source is a 4K signal source.
4. The method according to claim 1, wherein after sequentially copying table entry contents in the group table corresponding to each second IP signal corresponding to the first group identifier among all group identifiers cached in the local memory to the group table associated with the flow table corresponding to each third IP signal corresponding to the second group identifier, the method further comprises:
when any third IP signal in the second group is received, searching a flow table matched with the third IP signal from the flow table corresponding to each third IP signal corresponding to the second group identification;
and processing the third IP signal according to the found action item in the group table associated with the flow table, and forwarding the processed IP signal.
5. An entry updating apparatus, applied to a switching device, the apparatus comprising:
a receiving module, configured to receive an openflow flow table update instruction sent by a software defined network SDN control module in a server that controls signal source switching, where the openflow flow table update instruction is used to instruct a switching device to cancel an association relationship between a first group entry identifier and a first group exit identifier and add an association relationship between a second group entry identifier and the first group exit identifier, and the openflow flow table update instruction is a first group entry identifier of a first group entry to which a plurality of first IP signals that are sent to the switching device and belong together, a first group exit identifier of a first group to which a plurality of second IP signals that are sent to the switching device and belong together, and a plurality of signals that are sent to the switching device and belong together, where the plurality of first group entry identifiers are obtained by the SDN control module from a database based on a signal source switching instruction input by a user, where the upper layer application module issues the SDN control module, and belong to the server, and a plurality of signals that are sent to the switching device and belong together The second group identifier of a second group to which the third IP signal belongs together is generated;
an updating module, configured to delete, according to the openflow flow table update instruction, entry contents corresponding to the first group exit identifier in a group table associated with a flow table corresponding to each first IP signal corresponding to the first group entry identifier stored in a chip of the switching device, and copy, in sequence, entry contents in a group table corresponding to each second IP signal corresponding to each first group exit identifier in all group exit identifiers cached in a local memory, to a group table associated with a flow table corresponding to each third IP signal corresponding to the second group entry identifier;
wherein the number of all the first IP signals, all the second IP signals and all the third IP signals is the same.
6. The apparatus of claim 5,
the receiving module is further configured to receive, before receiving an openflow flow table update instruction, a flow table corresponding to each IP signal corresponding to a group entry identifier to which a plurality of IP signals transmitted to the switching device belong together, a group table associated with the flow table corresponding to each IP signal corresponding to each group entry identifier, and a group table corresponding to each IP signal corresponding to a plurality of group exit identifiers to which a plurality of IP signals transmitted from the switching device belong together, where table entry content of the group table associated with each flow table is empty during initialization;
the device further comprises:
the storage module is used for storing the flow table corresponding to each IP signal corresponding to each group entering identifier and the group table associated with the flow table corresponding to each IP signal corresponding to each group entering identifier into the switching equipment chip, and caching the group table corresponding to each IP signal corresponding to each group exiting identifier to the local;
wherein, a flow table corresponding to each IP signal corresponding to an entry identifier of an entry group to which a plurality of IP signals transmitted to the switching device belong together is generated by the SDN control module according to a matching item corresponding to each IP signal corresponding to each entry identifier issued by the upper application module;
and a group table corresponding to each IP signal corresponding to a group identifier of a group to which a plurality of IP signals transmitted from the switching device belong together is generated by the SDN control module according to an action item corresponding to each IP signal corresponding to each group identifier issued by the upper application module.
7. The apparatus of claim 6, wherein each signal source is a 4K signal source.
8. The apparatus of claim 5, further comprising:
a searching module, configured to, after the updating module sequentially copies table entry contents in group tables corresponding to the second IP signals corresponding to the first group id in all group ids cached in a local memory to group tables associated with flow tables corresponding to the third IP signals corresponding to the second group id, and when any third IP signal in the second group is received, search a flow table matched with the third IP signal from a flow table corresponding to each third IP signal corresponding to the second group id;
and the processing module is used for processing the third IP signal according to the found action item in the group table associated with the flow table and forwarding the processed IP signal.
9. An electronic device comprising a processor and a machine-readable storage medium storing machine-executable instructions executable by the processor, the processor being caused by the machine-executable instructions to: carrying out the method steps of any one of claims 1 to 4.
10. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of any one of claims 1 to 4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011282902.0A CN112615783B (en) | 2020-11-17 | 2020-11-17 | Table item updating method and device, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011282902.0A CN112615783B (en) | 2020-11-17 | 2020-11-17 | Table item updating method and device, electronic equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112615783A CN112615783A (en) | 2021-04-06 |
CN112615783B true CN112615783B (en) | 2022-02-22 |
Family
ID=75225468
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011282902.0A Active CN112615783B (en) | 2020-11-17 | 2020-11-17 | Table item updating method and device, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112615783B (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR101674169B1 (en) * | 2015-08-17 | 2016-11-08 | 성균관대학교산학협력단 | Openflow switch and management methid of flow table |
CN109361607A (en) * | 2018-10-15 | 2019-02-19 | 迈普通信技术股份有限公司 | List item data capture method, device and communication equipment |
CN109842814A (en) * | 2018-12-26 | 2019-06-04 | 深圳Tcl数字技术有限公司 | Switching method, device, television set and the readable storage medium storing program for executing of program |
CN109889350A (en) * | 2017-12-06 | 2019-06-14 | 杭州达乎科技有限公司 | A kind of method and device for toggle path in SDN network failure |
CN111404810A (en) * | 2019-01-02 | 2020-07-10 | 中国移动通信有限公司研究院 | Openflow flow table recovery method and device, electronic equipment and medium |
-
2020
- 2020-11-17 CN CN202011282902.0A patent/CN112615783B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR101674169B1 (en) * | 2015-08-17 | 2016-11-08 | 성균관대학교산학협력단 | Openflow switch and management methid of flow table |
CN109889350A (en) * | 2017-12-06 | 2019-06-14 | 杭州达乎科技有限公司 | A kind of method and device for toggle path in SDN network failure |
CN109361607A (en) * | 2018-10-15 | 2019-02-19 | 迈普通信技术股份有限公司 | List item data capture method, device and communication equipment |
CN109842814A (en) * | 2018-12-26 | 2019-06-04 | 深圳Tcl数字技术有限公司 | Switching method, device, television set and the readable storage medium storing program for executing of program |
CN111404810A (en) * | 2019-01-02 | 2020-07-10 | 中国移动通信有限公司研究院 | Openflow flow table recovery method and device, electronic equipment and medium |
Also Published As
Publication number | Publication date |
---|---|
CN112615783A (en) | 2021-04-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7349382B2 (en) | Reverse path forwarding protection of packets using automated population of access control lists based on a forwarding information base | |
WO2017201970A1 (en) | Branch base database system and routing method therefor | |
US20110320705A1 (en) | Method for tcam lookup in multi-threaded packet processors | |
CN108595207A (en) | A kind of gray scale dissemination method, regulation engine, system, terminal and storage medium | |
CN111506602B (en) | Data query method, device, equipment and storage medium | |
US10459729B2 (en) | Map tables for hardware tables | |
CN107004013A (en) | System and method for providing distributed tree traversal using hardware based processing | |
US7007100B1 (en) | Method for synchronization of multicast routing table changes with a plurality of multicast routing protocols | |
WO2020114239A1 (en) | Multicast message processing method and apparatus, storage medium and processor | |
CN113271359A (en) | Method and device for refreshing cache data, electronic equipment and storage medium | |
CN105282057B (en) | Flow table updating method, controller and flow table analysis device | |
CN111914020A (en) | Data synchronization method and device and data query method and device | |
US11012542B2 (en) | Data processing method and apparatus | |
EP2382635B1 (en) | Content assembly memory and method | |
CN112615783B (en) | Table item updating method and device, electronic equipment and storage medium | |
CN110046286A (en) | Method and apparatus for search engine caching | |
JP2002016623A (en) | Method and system for downloading software managing tree in network processing system | |
CN104702508B (en) | List item dynamic updating method and system | |
CN105245428A (en) | Method and device for configuring message processing rule | |
US20180091415A1 (en) | Inline processing of learn actions in a virtual switch | |
US11032216B2 (en) | Merging read requests in network device architecture | |
CN116599892A (en) | Server system, routing method, routing device, electronic equipment and storage medium | |
CN109039911B (en) | Method and system for sharing RAM based on HASH searching mode | |
CN104536784B (en) | Real-time system update method and device | |
CN115002028B (en) | Message processing method, device and medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |