Configuration information synchronization method, electronic equipment and computer readable storage medium

By automatically determining the target port and sending configuration information in the switch using the preset port correspondence table in the switch, the problem of cumbersome and error-prone manual configuration in the switch network is solved, and the automation level and management efficiency of configuration information synchronization are improved.

CN120223533APending Publication Date: 2025-06-27TP-LINK
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510360558.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-24
Publication Date
2025-06-27

AI Technical Summary

Technical Problem

The existing technology lacks an automated configuration information synchronization mechanism in the switch network, which makes manual configuration cumbersome and error-prone, making it difficult to meet the needs of large-scale network management.

Method used

By implementing the configuration information synchronization method in the switch, the preset port correspondence table is used to characterize the correspondence between the transmission port and the group, and the target port is automatically determined and configuration information is sent to the corresponding switch.

Benefits of technology

It improves the automation level of configuration information synchronization, reduces the risk of configuration errors caused by manual operations, and improves the efficiency and reliability of switch network management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120223533A_ABST
    Figure CN120223533A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of communication, and provides a configuration information synchronization method, electronic equipment and a computer readable storage medium, and the method comprises the steps: responding to received configuration information, and obtaining a preset port corresponding table which is used for representing the corresponding relation between a plurality of transmission ports and a plurality of groups; and according to a preset port corresponding table and the configuration information, determining at least one target port, or executing an instruction corresponding to the configuration information, the at least one target port being a port in the plurality of transmission ports. And sending configuration information to at least one second switch based on at least one target port, the at least one target port being in one-to-one correspondence with the at least one second switch, and the at least one second switch being electrically connected with the first switch. According to the method, the automation level of configuration information synchronization can be improved, the risk of configuration errors caused by manual operation is reduced, and the efficiency and reliability of switch networking management are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technologies, and in particular, to a configuration information synchronization method, an electronic device, and a computer-readable storage medium. Background Art

[0002] GARP (Generic Attribute Registration Protocol) is a protocol used to register and propagate attribute information between network devices (such as switches). Its extended protocols, GMRP (GARP Multicast Registration Protocol) and GVRP (Generic Attribute Registration Protocol), are used to configure multicast MAC addresses (Media Access Control Address) and VLAN (Virtual Local Area Network) information, respectively.

[0003] However, GMRP and GVRP are mainly used to maintain information between terminals, and there is no relevant maintenance for the configuration information between switches in a switch network. In addition, the configuration of the switch subnet depends on manual operations. Especially in a complex networking environment of a large number of switches, manual configuration is not only cumbersome but also error-prone, making it difficult to meet the requirements of large-scale network management. Summary of the Invention

[0004] Embodiments of this application provide a configuration information synchronization method, apparatus, chip, electronic device, and computer-readable storage medium, which can improve the automation level of configuration information synchronization, reduce the risk of configuration errors caused by manual operations, and enhance the efficiency and reliability of switch network management.

[0005] In a first aspect, this application provides a configuration information synchronization method, which is applied to a first switch. The first switch includes a plurality of transmission ports, and the method includes: in response to received configuration information, obtaining a preset port correspondence table, where the preset port correspondence table is used to represent the correspondence between the plurality of transmission ports and the plurality of groups. Determining at least one target port according to the preset port correspondence table and the configuration information, or executing an instruction corresponding to the configuration information, where the at least one target port is a port among the plurality of transmission ports. Sending the configuration information to at least one second switch based on the at least one target port, where the at least one target port corresponds to the at least one second switch one by one, and the at least one second switch and the first switch are both in an electrically connected state.

[0006] In some embodiments, the configuration information includes a first group and a registration instruction, the transmission port that receives the configuration information is a first transmission port, and the first transmission port is one of a plurality of transmission ports. After obtaining the preset port correspondence table, the method further includes: in the preset port correspondence table, incrementing the quantity of the first group corresponding to the first transmission port by one.

[0007] In some embodiments, the configuration information includes a second group and a deregistration instruction, the transmission port that receives the configuration information is a second transmission port, and the second transmission port is one of a plurality of transmission ports. After obtaining the preset port correspondence table, the method further includes: in the preset port correspondence table, decrementing the quantity of the second group corresponding to the second transmission port by one.

[0008] In some embodiments, the configuration information includes a third group and a query instruction, the transmission port that receives the configuration information is a third transmission port, and the third transmission port is one of a plurality of transmission ports. The method further includes: sending a reply message to a third switch corresponding to the third transmission port, where the reply message is used to indicate that the first switch is in an online state, and the third switch is electrically connected to the first switch through the third transmission port.

[0009] In some embodiments, at least one target port is all transmission ports among the plurality of transmission ports that are different from the port that receives the configuration information.

[0010] In some embodiments, the configuration information includes a fourth group and an attribute declaration instruction. Determining at least one target port according to the preset port correspondence table and the configuration information includes: according to the preset port correspondence table, determining at least one port among the plurality of groups that includes the fourth group as at least one target port.

[0011] In some embodiments, if the group corresponding to the first switch is the fourth group, then execute the attribute declaration instruction.

[0012] In some embodiments, before obtaining the preset port correspondence table, the method further includes: determining whether the message format corresponding to the configuration information is a preset message format. If the message format corresponding to the configuration information is the preset message format, then obtain the preset port correspondence table.

[0013] In a second aspect, based on the first aspect, the present application provides a configuration information synchronization device. The configuration information synchronization device may be a first switch, and the first switch includes a plurality of transmission ports. The configuration information synchronization device includes:

[0014] An obtaining module, configured to obtain a preset port correspondence table in response to the received configuration information, where the preset port correspondence table is used to represent the correspondence relationship between a plurality of transmission ports and a plurality of groups.

[0015] A processing module, configured to determine at least one target port according to a preset port correspondence table and configuration information, where the at least one target port is a port among a plurality of transmission ports.

[0016] The processing module is further configured to send the configuration information to at least one second switch based on the at least one target port, where the at least one target port corresponds to the at least one second switch one by one, and the at least one second switch and the first switch are both in an electrically connected state.

[0017] In a third aspect, the present application provides a chip, which is used to execute the method in any one of the above first aspects.

[0018] In a fourth aspect, the present application provides an electronic device, including a processor and a memory, where the processor is configured to execute a computer program stored in the memory to implement the method in any one of the above first aspects. Or,

[0019] The electronic device includes the chip in the third aspect.

[0020] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the method in any one of the above first aspects is implemented.

[0021] In the technical solution provided by the embodiment of the present application, the switch can, in response to the received configuration information, obtain a preset port correspondence table, which is used to represent the correspondence between a plurality of transmission ports and groups. And according to the preset port correspondence table and the configuration information, determine at least one target port, or execute the instruction corresponding to the configuration information, where the at least one target port is a port among a plurality of transmission ports. Then, based on the at least one target port, send the configuration information to at least one second switch, where the at least one target port corresponds to the at least one second switch one by one, and the at least one second switch and the first switch are both in an electrically connected state. Through the technical solution provided by the embodiment of the present application, the switch can automatically send the configuration information to the target port according to the correspondence between the plurality of transmission ports and the plurality of groups, thereby reducing manual intervention. It can improve the automation level of configuration information synchronization and reduce the risk of configuration errors caused by manual operations, further improving the efficiency and reliability of switch networking management, and is applicable to a large-scale switch networking environment. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0023] Figure 1 It is a schematic diagram of the core fields of a GARP data packet structure provided by an embodiment of the present application;

[0024] Figure 2 It is a schematic flowchart of a configuration information synchronization method provided by an embodiment of the present application;

[0025] Figure 3 It is a schematic diagram of an application scenario of a configuration information synchronization method provided by an embodiment of the present application;

[0026] Figure 4 It is a schematic diagram of the corresponding relationship of preset ports of a configuration information synchronization method provided by an embodiment of the present application;

[0027] Figure 5 It is another schematic flowchart of a configuration information synchronization method provided by an embodiment of the present application;

[0028] Figure 6 It is yet another schematic flowchart of a configuration information synchronization method provided by an embodiment of the present application;

[0029] Figure 7 It is a schematic diagram of the network configuration of switch groups of a configuration information synchronization method provided by an embodiment of the present application;

[0030] Figure 8 It is yet another schematic flowchart of a configuration information synchronization method provided by an embodiment of the present application;

[0031] Figure 9 It is yet another schematic flowchart of a configuration information synchronization method provided by an embodiment of the present application;

[0032] Figure 10 It is yet another schematic diagram of the network configuration of switch groups of a configuration information synchronization method provided by an embodiment of the present application;

[0033] Figure 11 It is a schematic diagram of the structure of a configuration information synchronization device provided by an embodiment of the present application;

[0034] Figure 12 It is a schematic diagram of the structure of an electronic device provided by an embodiment of the present application. Detailed implementation manners

[0035] In the following description, for the purpose of illustration rather than limitation, specific details such as specific system architectures, technologies, etc. are presented to provide a thorough understanding of the embodiments of the present application. However, those skilled in the art should clearly understand that the present application can also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid unnecessary details from interfering with the description of the present application.

[0036] It should be understood that when used in the specification and the appended claims of the present application, the term "comprising" indicates the presence of the described features, wholes, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components, and / or their combinations.

[0037] It should also be understood that the term "and / or" used in the specification and the appended claims of the present application refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0038] As used in the specification and the appended claims of the present application, the term "if" can be interpreted as "when" or "once" or "in response to determining" or "in response to detecting" depending on the context. Similarly, the phrase "if determined" or "if detecting [the described condition or event]" can be interpreted as meaning "once determined" or "in response to determining" or "once detecting [the described condition or event]" or "in response to detecting [the described condition or event]" depending on the context.

[0039] In addition, in the description of the specification and the appended claims of the present application, the terms "first", "second", "third", etc. are only used for differentiating descriptions and cannot be understood as indicating or implying relative importance.

[0040] The reference to "one embodiment" or "some embodiments" or the like described in the specification of the present application means that a specific feature, structure, or characteristic described in connection with that embodiment is included in one or more embodiments of the present application. Thus, statements such as "in one embodiment", "in some embodiments", "in other some embodiments", "in still other embodiments", etc. that appear in different places in this specification are not necessarily all referring to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in another way. The terms "comprising", "including", "having", and their variants all mean "including but not limited to", unless otherwise specifically emphasized in another way.

[0041] GARP (Generic Attribute Registration Protocol) is mainly used to distribute, propagate, and register attribute information in a switch network, such as VLAN attributes, multicast addresses, etc. By dynamically registering and propagating attribute information, GARP assists switches in managing member relationships and attribute changes in the network. GARP participants consist of GARP application components and information declaration components (GID) of the GARP protocol related to switch ports. In a switch, the information interaction between GARP participants of the same application is executed through the GARP information propagation component (GIP). The protocol interaction mode between GARP participants is carried out in the form of LLC type 1 service (connectionless unreliable service mode), using the group MAC address and the PDU (Protocol Data Unit) format defined for the corresponding GARP application.

[0042] Among them, GVRP (GARP VLAN Registration Protocol) is used to automatically propagate and register VLAN information, mainly applied to the VLAN module, and can dynamically register and cancel VLAN IDs to achieve dynamic VLAN division in a switch network. GMRP (GARP Multicast Registration Protocol) is used to dynamically manage multicast member relationships, can be applied to technical fields such as intelligent substations, and can dynamically register and cancel multicast MAC addresses to achieve layer 2 forwarding of switch multicast packets.

[0043] However, GARP still has certain limitations in practical applications. During the transmission of configuration instructions, it is necessary to manually configure ports to ensure that the ports can participate in the registration and propagation of attribute information, thus ensuring the normal operation of GARP. In a large-scale switch network, the number of ports is huge. Manual configuration is not only cumbersome and time-consuming, but also prone to configuration errors due to human mistakes, which in turn affects the stability and performance of the network. In addition, as the scale of the switch network expands, the management complexity of manual configuration increases significantly, making it difficult to meet the requirements of efficient operation and maintenance of the switch network.

[0044] In view of this, the embodiments of this application provide a configuration information synchronization method, which can optimize the configuration process of GARP, reduce manual intervention, and improve the automation level of configuration information synchronization.

[0045] Figure 1 This is a schematic diagram of the core fields of a GARP packet structure provided by the embodiments of this application. As Figure 1As shown in the figure, the core fields of the GARP data packet structure include DA (Destination Address), SA (Source Address), Length, DSAP (Destination Service Access Point), SSAP (Source Service Access Point), CTRL (Control), and PDU (Protocol Data Unit).

[0046] Among them, DA is used to represent the address of the device that receives this data frame. For an Ethernet frame, DA can be a 48-bit destination MAC. SA is used to represent the address of the device that sends this data frame, which can be a 48-bit destination MAC. Length is used to indicate the length of the payload part in the data frame. DSAP is used to represent the destination service access point, indicating the upper-layer protocol or service used by the receiving device. SSAP is used to represent the service access point of the sending device. CTRL is used to provide additional control information. PDU is used to represent the data unit transmitted at a specific layer. In GARP, PDU can contain specific information of the GARP protocol, such as attribute type, attribute value, and events of attribute description, etc.

[0047] As shown in Table 1, PDU can include: Protocol ID (Protocol Identifier), Message1 to MessageN, and End Mark.

[0048] Among them, Protocol ID is used to identify the protocol type used. In GARP, Protocol ID can be fixed as 0x0001, which is used to represent the protocol used by GARP. In GARP, End Mark represents the end mark of the GARP protocol data unit, and its value can be 0x00. For any one of Message 1 to Message N, it includes Attribute Type and Attribute list.

[0049] Attribute Type is used to identify the type of an attribute. For example, a VLAN attribute or a multicast attribute. When the value of AttributeType is 0x01, it represents a group membership attribute, that is, a VLAN attribute (for GVRP). When the value of Attribute Type is 0x02, it represents a service requirement, that is, a multicast attribute (for GMRP). An Attribute list consists of multiple attributes Attribute1 (attribute 1) to Attribute N (attribute N) and an End Mark. The Attribute list includes length, event, and value.

[0050] For any one of the multiple attributes, Attribute N, it can include an attribute length (AttributeLength), an attribute event (Attribute Event), and an attribute value (Attribute Value).

[0051] Among them, Attribute Length is used to represent the length of the attribute value (in bytes), and the value can range from 2 to 255 bytes. For example, for the VLAN attribute, Attribute Length can be 0x02 (2 bytes), and for the multicast attribute, the attribute length is 0x06 (6 bytes). Attribute Value is used to represent the specific content of the attribute, such as a VLAN ID or a multicast address. For the VLAN attribute, the attribute value is the VLAN ID (2 bytes). For example, 0x000A represents VLAN 10. For the multicast attribute, the attribute value is the multicast group address (6 bytes), such as 01-00-5E-01-01-01.

[0052] Attribute Event characterizes the event described by the attribute, that is, it is used to control the declaration, registration, and revocation behaviors of the attribute. The values can be 0x00, 0x01, 0x02, 0x03, 0x04, and 0x05.

[0053]

[0054] As shown in Table 2, 0x00: LeaveAll (i.e., LeaveAll Event) means that all attributes leave, and is used to notify the receiver to cancel all attributes. 0x01: JoinEmpty (i.e., JoinEmpty Event) is used to declare an attribute that is not registered itself. When a device needs to query whether a certain attribute exists in the network, it can send JoinEmpty. 0x02: JoinIn (i.e., JoinIn Event) is used to declare an attribute that is already registered itself. When a device needs to notify that a certain attribute already exists in the network, it sends JoinIn. 0x03: LeaveEmpty (i.e., LeaveEmpty Event) is used to cancel an attribute that is not registered itself. 0x04: LeaveIn (i.e., LeaveIn Event) is used to cancel an attribute that is already registered itself. When a device needs to notify that a certain attribute no longer exists in the network, it can send LeaveIn. 0x05: Empty (i.e., Empty Event) is used by a device that detects a message and hopes to obtain a declaration of this attribute.

[0055] Value Event Meaning 0x00 LeaveAll Notify the recipient to cancel all attributes 0x01 JoinEmpty Declare attributes not registered by itself 0x02 JoinIn Declare attributes already registered by itself 0x03 LeaveEmpty Cancel attributes not registered by itself 0x04 LeaveIn Cancel attributes already registered by itself 0x05 Empty Declare the device that hopes to obtain the attribute for detecting the message

[0056] Based on Figure 1 the GARP data packet in, an embodiment of the present application provides a schematic flowchart of a configuration information synchronization method. As Figure 2 shown, the following processes may be included:

[0057] Step S201: In response to the received configuration information, obtain a preset port correspondence table, and the preset port correspondence table is used to represent the correspondence between multiple transmission ports and groups.

[0058] The technical solution provided by the embodiment of the present application can be applied to a switch, and the switch may be provided with multiple different transmission ports (ports). Exemplarily, Figure 3 is a schematic diagram of an application scenario provided by the embodiment of the present application. As Figure 3 shown, multiple switches (including switch A1, switch A2, switch A3, switch B1, switch B2, switch C1, and switch C2) are in an electrically connected state, and the technical solution provided by the embodiment of the present application can be applied to any one of the multiple switches.

[0059] In the embodiments of the present application, multiple switches can use the same destination MAC as the identifier of the packets for which the patent solution is configured and applied. After receiving the configuration information (transmitted through configuration packets), the switch can determine whether the packet is for this application based on the destination MAC carried in the configuration information. Specifically, if the destination MAC carried in the configuration information is the same as the application packet identifier stored locally, the switch determines that the configuration information is the configuration information for this application; if the destination MAC carried in the configuration information is different from the application packet identifier stored locally, the switch determines that the configuration information is not the configuration information for this application. If it is the configuration information for this application, the switch can process the configuration information through the technical solution provided in the embodiments of the present application; if it is not the configuration information for this application, the switch does not process the configuration information.

[0060] The user can send configuration information to the switch through the information configuration device, and the switch that receives the configuration information can forward the configuration information within the switch networking according to the content of the configuration information. For example, continue to refer to Figure 3 , the user can send configuration information to switch A2 through the configuration device. The configuration device can be a computer, a switch, a tablet computer, etc., which is not limited in the present application.

[0061] The preset port correspondence table (also referred to as the configuration group information forwarding port correspondence table) can be used to represent the correspondence between each transmission port and the group. The structure of the preset port correspondence table can be in the form of {group: port}, {port: group}, or {port: group: quantity}, which is not limited in the present application.

[0062] Exemplarily, Figure 4 is a schematic diagram of a preset port correspondence relationship provided by the embodiments of the present application. Refer to Figure 4 , the structure of the preset port correspondence table can be in the form of {port: group: quantity}. If the groups corresponding to switch A1, switch A2, and switch A3 are group 1, the groups corresponding to switch B1 and switch B2 are group 2, and the groups corresponding to switch C1 and switch C2 are group 3. For switch B1, its corresponding preset port correspondence table can be: port1 (port 1) → group 1 (1 unit); port2 (port 2) → group 3 (1 unit); port3 (port 3) → group 1 (2 units), group 2 (1 unit), group 3 (1 unit). For switch A2, its corresponding preset port correspondence table can be: port1 → group 1 (1 unit), group 2 (1 unit), group 3 (1 unit); port2 (port 2) → group 1 (1 unit), group 2 (1 unit), group 3 (1 unit). It should be understood that each switch can maintain its own preset port correspondence table according to the connection relationship of the current switch networking.

[0063] In a large-scale networking scenario, the network topology is complex, involving a large number of switches, and these switches often come from different manufacturers or different series of the same manufacturer. Since the configuration methods or configuration instructions for certain specific functions of switches from different manufacturers or different series of the same manufacturer are not unified. Therefore, in order to configure these specific functions, the staff need to manually select the configuration according to the switch model, which is not only complex and cumbersome, but also very likely to introduce configuration errors.

[0064] Each switch stores its own version number. In the technical solution provided by the embodiments of the present application, the version number of the switch can be identified, and the switches are divided into multiple different groups according to the manufacturer and product series number. For example, switches of brands such as brand A, brand B, brand C, and brand D maintain the product label of the switch inside the switch. The present application can determine the manufacturer to which the switch belongs by obtaining this product label and divide different configuration groups according to the manufacturer. It can be understood that since the configuration instructions for fixed functions of different manufacturers are often different, the technical solution provided by the present application can transmit different configuration instructions to different configuration groups. Switches in the same group can recognize the same configuration instructions and perform corresponding configuration operations.

[0065] In some embodiments, since the configuration instructions will also change due to updates and iterations of different series of the same manufacturer, the present application can further refine the grouping strategy and divide the switches into different groups according to different series and different versions, so that each subdivided group can receive configuration instructions that perfectly match the switch manufacturer and series. Switches in the same group can recognize the same configuration instructions and perform corresponding configuration operations.

[0066] It can be understood that in the technical solution provided by the embodiments of the present application, a switch that has enabled the configuration information synchronization method can maintain its own group number by obtaining the product label.

[0067] Step S202: Determine at least one target port according to the preset port correspondence table and the configuration information, or execute the instruction corresponding to the configuration information, where the at least one target port is a port among multiple transmission ports.

[0068] In an embodiment of the present application, after the switch determines that the message in the configuration information is a message of this application based on the destination MAC carried in the configuration information, it can determine the instruction type in the configuration information according to the PDU in the message, and determine at least one target port according to the instruction type in the configuration information and the preset port correspondence table. It should be understood that the instruction type in the configuration information may include multiple types in Table 2 above, including: 0x00: LeaveAll Event, 0x01: JoinEmptyEvent, 0x02: JoinIn Event, 0x03: LeaveEmpty Event, 0x04: LeaveIn Event, and 0x05: EmptyEvent.

[0069] Among them, 0x01: JoinEmpty Event and 0x02: JoinIn Event are recorded as registration instructions; 0x03: LeaveEmpty Event and 0x04: LeaveIn Event are recorded as cancellation instructions; 0x00: LeaveAll Event is a query instruction; 0x05: Empty Event is recorded as an attribute declaration instruction.

[0070] When the instruction type in the configuration information is a registration instruction (0x01: JoinEmpty Event or 0x02: JoinInEvent), the configuration information includes the group of the switch that issues the registration instruction (denoted as the first group) and the content of the registration instruction (0x01: JoinEmpty Event or 0x02: JoinIn Event).

[0071] When the instruction type in the configuration information is a cancellation instruction (0x03: LeaveEmpty Event or 0x04: LeaveInEvent), the configuration information includes the group of the switch that issues the cancellation instruction (denoted as the second group) and the content of the cancellation instruction (0x03: LeaveEmpty Event or 0x04: LeaveIn Event).

[0072] When the instruction type in the configuration information is a query instruction (0x00: LeaveAll Event), the configuration information includes the group of the switch that issues the query instruction (denoted as the third group) and the content of the query instruction (0x00: LeaveAllEvent).

[0073] When the instruction type in the configuration information is an attribute declaration instruction (0x05: Empty Event), the configuration information includes the group corresponding to the attribute declaration instruction (denoted as the fourth group) and the content of the attribute declaration instruction.

[0074] Step S203: Based on at least one target port, send configuration information to at least one second switch, where at least one target port corresponds to at least one second switch one by one, and at least one second switch and the first switch are both in an electrically connected state.

[0075] In the embodiment of the present application, after the switch determines at least one target port, it can send configuration information to at least one switch through at least one target port.

[0076] It should be understood that if the types of the received configuration information are different, the at least one target port determined according to the preset port correspondence table is different, and the at least one second switch corresponding to the at least one target port is also different. The second switch can be a switch other than the first switch in the switch networking. The method for the switch to synchronize configuration information in the networking will be exemplarily described below in combination with the type of configuration information.

[0077] If the instruction type in the configuration information is a registration instruction (0x01: JoinEmpty Event or 0x02: JoinInEvent), the method for the switch to synchronize configuration information in the networking may include Figure 5 the steps shown:

[0078] Step S501: Based on the received configuration information, obtain the first group corresponding to the configuration information.

[0079] In the embodiment of the present application, the configuration information includes a first group and a registration instruction. The transmission port that receives the configuration information can be any one of multiple transmission ports, such as the first transmission port.

[0080] After receiving the configuration information, the switch can determine whether the configuration information is the configuration information of this application according to the destination MAC carried in the configuration information. If the destination MAC carried in the configuration information is the same as the application message identifier stored locally, the switch determines that the configuration information is the configuration information of this application, and determines the type of the configuration information according to the PDU in the message. If the instruction type in the configuration information is a registration instruction (0x01: JoinEmpty Event or 0x02: JoinIn Event), the switch executes Step S501. If the destination MAC carried in the configuration information is different from the application message identifier stored locally, the switch determines that the configuration information is not the configuration information of this application, and the switch does not process the configuration information.

[0081] When the switch declares to other switches that it does not have registered attribute information, it can send a JoinEmpty instruction (field) externally. When the switch declares to other switches that it has already registered attribute information, it can send a JoinIn instruction externally.

[0082] Exemplarily, when a switch registers its own attribute information with other switches, it can send a Join instruction to other switches; when a switch receives a Join instruction from other switches or statically configures certain attributes and needs other switches to register, it can also send a Join instruction to other switches. The Join instruction includes JoinEmpty (declaring attributes that are not registered) and Joinln (declaring attributes that are already registered).

[0083] Step S502: When the configuration information includes a registration instruction, in the preset port correspondence table, increment the number of the first group corresponding to the first transmission port by one.

[0084] In the embodiment of the present application, if the first group corresponding to the configuration information is included in the preset port correspondence table, the switch can increment the number of the first group corresponding to the configuration information of the port that receives the configuration information by one in the preset port correspondence table. If the first group corresponding to the configuration information is not included in the preset port correspondence table, the switch can create the first group corresponding to the configuration information and set the number of the first group corresponding to the configuration information of the port that receives the configuration information to 1.

[0085] For example, continue to refer to Figure 4 , if switch C1 needs to join the switch networking, switch C1 can, after being enabled, access its own model through the grouping specification to determine that its own group is 3. And send configuration information from its own port 1 (port 1) to port 2 of switch B1. The configuration information includes a Join instruction and the group 3 corresponding to switch C1. The format of the configuration information can be Join: 3. After receiving the configuration information, switch B1 determines that there is a group 3 in the configuration information received by its own port 2 (port 2), and can then add the group 3 corresponding to port 2 in the preset port correspondence table corresponding to switch B1.

[0086] Step S503: Send the configuration information to multiple second switches corresponding to multiple transmission ports.

[0087] In the embodiment of the present application, if the instruction type in the configuration information is a registration instruction, the switch can determine that at least one target port is all transmission ports among the multiple transmission ports that are different from the port that receives the configuration information.

[0088] For example, continue to refer to Figure 4 , after switch B1 receives the configuration information with the instruction type being a registration instruction in the configuration information, it can send the configuration information to switches A1 and A2 corresponding to port 1 (port 1) and port 3 (port 3) of switch B1 respectively.

[0089] It can be understood that after receiving the configuration information, switch A1 and switch A2 can also maintain the number of groups in the corresponding preset port correspondence table through the technical solutions provided in steps S501 to S503 above.

[0090] If the instruction type in the configuration information is a cancellation instruction (0x03: LeaveEmpty Event or 0x04: LeaveInEvent), the method for the switch to synchronize the configuration information within the network can include Figure 6 the steps shown below:

[0091] Step S601: Based on the received configuration information, obtain the second group corresponding to the configuration information.

[0092] In the embodiments of the present application, the configuration information includes a second group and a cancellation instruction, and the transmission port that receives the configuration information can be any one of multiple transmission ports, such as the second transmission port.

[0093] When the switch cancels the attribute information that it has not registered itself to other switches, it can send a LeaveEmpty instruction (field) externally. When the switch cancels the attribute information that it has already registered itself to other switches, it can send a LeaveIn instruction.

[0094] Exemplarily, when the switch cancels its own attribute information to other switches, it can send a Leave instruction to other switches. When the switch receives a Leave instruction sent by other switches or statically cancels some attributes, it can also send a Leave instruction to other switches. The Leave instruction includes LeaveEmpty (canceling an attribute that has not been registered itself) and Leaveln (canceling an attribute that has already been registered itself).

[0095] Step S602: When the configuration information includes a cancellation instruction, in the preset port correspondence table, subtract one from the number of the second group corresponding to the second transmission port.

[0096] In the embodiments of the present application, after the switch obtains the second group corresponding to the configuration information, it can subtract one from the number of the second group corresponding to the configuration information of the port that receives the configuration information in the preset port correspondence table.

[0097] For example, refer to Figure 7, if switch C1 needs to leave the switch network, switch C1 can determine that its own group is 3. And send configuration information through its own port 1 (port 1) to port 2 of switch B1. The configuration information contains the Leave instruction and the corresponding group 3 of switch C1. The format of the configuration information can be Leave: 3. After receiving the configuration information, switch B1 determines that its own port 2 (port 2) needs to cancel group 3, then it can delete the correspondence between port 2 and group 3 in the corresponding preset port correspondence table of switch B1. Since the number of group 3 under port 2 of switch B1 is 0, therefore, switch B1 can delete the correspondence between port 2 and group 3.

[0098] Step S603: Send configuration information to multiple second switches corresponding to multiple transmission ports.

[0099] In the present embodiment, if the instruction type in the configuration information is a cancellation instruction, the switch can determine that at least one target port is all transmission ports different from the port that receives the configuration information among the multiple transmission ports.

[0100] For example, continue to refer to Figure 7 , after switch B1 receives the configuration information with the instruction type of cancellation instruction in the configuration information, it can send the configuration information to switch A1 and switch A2 corresponding to port 1 (port 1) and port 3 (port 3) of switch B1 respectively.

[0101] It can be understood that after switch A1 and switch A2 receive the configuration information, they can also maintain the group numbers in the corresponding preset port correspondence table through the technical solutions provided in the above steps S601 to S603.

[0102] Since port 1 of switch A1 also includes switch C2 corresponding to group 3, therefore, switch A1 does not need to delete group 3, and only needs to subtract one from the number of group 3 in the correspondence between port 1 and group 3.

[0103] Continue to refer to Figure 7 , after switch A2 receives the configuration information with the format Leave: 3, it determines that its own port 1 (port 1) needs to cancel group 3, then it can delete the correspondence between port 1 and group 3 in the corresponding preset port correspondence table of switch A2. Since the number of group 3 under port 1 of switch A2 was originally 1 and becomes 0 after deletion, therefore, switch A2 can delete the correspondence between port 1 and group 3.

[0104] When the instruction type in the configuration information is a query instruction (0x00: LeaveAll Event), the method for the switch to synchronize the configuration information in the network can includeFigure 8 The steps shown are as follows:

[0105] Step S801: Based on the received configuration information, obtain the third group corresponding to the configuration information.

[0106] In the embodiments of the present application, the configuration information includes a query instruction and a third group. The transmission port for receiving the configuration information can be any one of multiple transmission ports, such as the third transmission port.

[0107] After each switch is started, a timer (such as a LeaveAll timer) can be started. When the time recorded by the timer exceeds the preset time (for example, 10 s), the switch can send a query instruction (0x00: LeaveAll Event) to other switches through multiple transmission ports. So that other switches can re-register all the attribute information on the switch, which is used to periodically clear the invalid registered attributes in the switch networking. The switch that receives the query instruction (0x00: LeaveAll Event) can set the time recorded by its own timer to 0. After receiving the query instruction, the first switch can also send a reply message to the switch connected to the third transmission port that receives the configuration information (the switch in an electrically connected state with the first switch) to indicate that the current switch is in an online state.

[0108] In the embodiments of the present application, the timer can include a LeaveAllTimer timer, a JoinTimer timer, a LeaveTimer timer, and a HoldTimer timer. Among them, the LeaveAllTimer timer is used to control the sending frequency of the LeaveAll instruction. The LeaveAll instruction is used to notify the switches in the switch networking that all attributes need to be re-registered. After sending the LeaveAll instruction, the LeaveAllTimer will restart and enter the next round of loop. The JoinTimer timer is used to control the sending rate of the Join instruction. When the JoinTimer times out, the switch will send the Join instruction, and the JoinTimer timer will only start after the Leave instruction or the LeaveAll instruction has been sent on the port. The LeaveTimer timer is used to control the deregistration behavior of attributes. When a port needs to deregister a certain attribute, the switch will send a Leave instruction and wait for the LeaveTimer to time out before deregistering. The HoldTimer timer is used to control the sending timing of the Join instruction to avoid sending the Join instruction frequently. When the switch receives a certain registration information, the HoldTimer timer is started, and the Join instruction is sent after the HoldTimer times out.

[0109] Step S802: Send configuration information to multiple second switches corresponding to multiple transmission ports.

[0110] In the embodiment itself, if the instruction type in the configuration information is a deregistration instruction, the switch can determine that at least one target port is all the transmission ports among the multiple transmission ports that are different from the port receiving the configuration information.

[0111] In some embodiments, if the instruction type in the configuration information is a registration instruction or a query instruction, the switch can also determine that at least one target port is all the transmission ports among the multiple transmission ports that are different from the port receiving the configuration information, and send the configuration information to the switches corresponding to at least one target port through the technical solutions provided in the above steps S801 to S802.

[0112] For example, continue to refer to Figure 7 , after receiving the configuration information sent by switch C1, switch B1 can also send the configuration information to switches A1 and A2 corresponding to port 1 (port 1) and port 3 (port 3) of switch B1 respectively.

[0113] It can be understood that after receiving the configuration information, switches A1 and A2 can also synchronize the configuration information through the technical solutions provided in the above steps S801 to step S802.

[0114] When the instruction type in the configuration information is an attribute declaration instruction (0x05: Empty Event), the method for the switch to synchronize the configuration information within the network can include Figure 9 the steps shown in

[0115] Step S901: Based on the received configuration information, obtain the fourth group corresponding to the configuration information.

[0116] In the embodiment of the present application, when the instruction type in the configuration information is an attribute declaration instruction, the configuration information may include the fourth group required to be passed by the attribute declaration instruction.

[0117] For example, as Figure 10 shown, the attribute declaration instruction can be poe inline supply enable (enable or activate the function of power supply through in-line power supply in the network cable (i.e., PoE power supply)), the group can be 3, and the format of the configuration information can be 3+poeinline supply enable (i.e., attached Figure 10 with Empty: 3).

[0118] Step S902: According to the preset port correspondence table, determine at least one target port among the multiple groups that includes the fourth group.

[0119] In the embodiment itself, if the instruction type in the configuration information is an attribute declaration instruction, the switch can determine, according to the fourth group corresponding to the configuration information, that the port of the group corresponding to the fourth group in the preset port correspondence table is the target port.

[0120] Step S903: Send the configuration information to multiple second switches corresponding to at least one target port.

[0121] After the switch determines the target port, it sends the configuration information to the switch connected to the target port.

[0122] For example, continue to refer to Figure 10 , after switch B1 receives the configuration information Empty: 3 sent by switch C1, it determines through the preset port correspondence table that port 3 corresponds to group 3, and then it can send the configuration information to switch A2 corresponding to port 3 (port 3).

[0123] In the embodiment of the present application, after the switch receives the configuration information with the instruction type being an attribute declaration instruction, it can also determine whether its own group is the same as the fourth group included in the configuration information, that is, determine whether its own group is the fourth group. If its own group is the same as the group included in the configuration information (its own group is the fourth group), the switch can execute the attribute declaration instruction. If its own group is different from the group included in the configuration information (its own group is not the fourth group), the switch only needs to execute the configuration information forwarding process.

[0124] Continue to refer to Figure 10 , after switch A2 receives the configuration information Empty: 3, it determines the target port as port 2 (port 2) according to its own preset port correspondence table. And its own group is 2, which is different from group 3. Switch A2 can then send the configuration information Empty: 3 to all ports corresponding to group 3 maintained in the switch. That is, it sends the configuration information Empty: 3 to switch B1 through port 1, and sends the configuration information Empty: 3 to switch C2 through port 2, without executing the attribute declaration instruction.

[0125] After switch C2 receives the configuration information Empty: 3, it determines that there is no target port according to its own preset port correspondence table. And according to its own group being 3, it determines that it is the same as group 3 in the configuration information Empty: 3, so switch C2 executes the attribute declaration instruction.

[0126] In the technical solution provided by the embodiments of the present application, the switch can, in response to the received configuration information, obtain a preset port correspondence table, which is used to represent the correspondence between multiple transmission ports and multiple groups. And according to the preset port correspondence table and the configuration information, determine at least one target port, or execute the instruction corresponding to the configuration information, where at least one target port is a port among the multiple transmission ports. Then, based on at least one target port, send the configuration information to at least one second switch, where at least one target port corresponds to at least one second switch one by one, and at least one second switch and the first switch are both in an electrically connected state. Through the technical solution provided by the embodiments of the present application, the switch can automatically send the configuration information to the target port according to the correspondence between the multiple transmission ports and the multiple groups, thereby reducing manual intervention. It can improve the automation level of configuration information synchronization and reduce the risk of configuration errors caused by manual operations, further improving the efficiency and reliability of switch networking management, and is applicable to large-scale switch networking environments.

[0127] It should be understood that, on the premise of no logical conflict, the above-mentioned various application embodiments can be combined and implemented with each other to meet the actual application requirements. The specific embodiments or implementation schemes obtained after these combinations still fall within the protection scope of the present application.

[0128] Corresponding to the configuration information synchronization method in the above embodiments, the embodiments of the present application provide a configuration information synchronization device. The configuration information synchronization device can be a switch for multiple transmission ports, and the configuration information synchronization device can be implemented by software, hardware, or a combination of both to become part or all of a computer device, and is used to execute the steps in the configuration information synchronization method in the above embodiments.

[0129] Figure 11 FIG. shows a schematic structural diagram of a configuration information synchronization device 110 provided by an embodiment of the present application. For the sake of illustration, only the parts related to the embodiments of the present application are shown.

[0130] Referring to Figure 11 , the device 30 includes an acquisition module 1110 and a processing module 1120.

[0131] The acquisition module 1110 is configured to, in response to the received configuration information, obtain a preset port correspondence table, which is used to represent the correspondence between multiple transmission ports and multiple groups.

[0132] The processing module 1120 is configured to, according to the preset port correspondence table and the configuration information, determine at least one target port, or execute the instruction corresponding to the configuration information, where at least one target port is a port among the multiple transmission ports.

[0133] The processing module 1120 is further configured to send configuration information to at least one second switch based on at least one target port, where the at least one target port corresponds to the at least one second switch one by one, and the at least one second switch and the first switch are both in an electrically connected state.

[0134] In some embodiments, the configuration information includes a first group and a registration instruction, and the transmission port that receives the configuration information is a first transmission port, and the first transmission port is one of a plurality of transmission ports. The processing module 1120 is further configured to: in a preset port correspondence table, increment the quantity of the first group corresponding to the first transmission port by one.

[0135] In some embodiments, the configuration information includes a second group and a deregistration instruction, and the transmission port that receives the configuration information is a second transmission port, and the second transmission port is one of a plurality of transmission ports. The processing module 1120 is further configured to: in a preset port correspondence table, decrement the quantity of the second group corresponding to the second transmission port by one.

[0136] In some embodiments, the configuration information includes a third group and a query instruction, and the transmission port that receives the configuration information is a third transmission port, and the third transmission port is one of a plurality of transmission ports. The processing module 1120 is further configured to: send a reply message to a third switch corresponding to the third transmission port, where the reply message is used to indicate that the first switch is online, and the third switch is in an electrically connected state with the first switch through the third transmission port.

[0137] In some embodiments, the at least one target port is all transmission ports among the plurality of transmission ports that are different from the port that receives the configuration information.

[0138] In some embodiments, the configuration information includes a fourth group and an attribute declaration instruction. Specifically, the processing module 1120 is configured to: according to a preset port correspondence table, determine that at least one port among the plurality of groups that includes the fourth group is the at least one target port.

[0139] In some embodiments, if the group corresponding to the first switch is the fourth group, then execute the attribute declaration instruction.

[0140] In some embodiments, the processing module 1120 is further configured to: determine whether the message format corresponding to the configuration information is a preset message format. If the message format corresponding to the configuration information is the preset message format, then obtain the preset port correspondence table.

[0141] It should be noted that for the information interaction, execution process, etc. between the above-mentioned devices / units, since they are based on the same concept as the method embodiment of the present application, for their specific functions and the technical effects brought, reference may be specifically made to the method embodiment part, and details are not described herein again.

[0142] It should be understood that the sequence numbers of the steps in the above embodiments do not imply the order of execution. The execution order of each process should be determined according to its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.

[0143] Based on the same inventive concept, an embodiment of the present application also provides an electronic device.

[0144] Figure 12 FIG. is a schematic structural diagram of an electronic device provided by an embodiment of the present application. As Figure 12 shown, the electronic device 12 of this embodiment includes: at least one processor 1210 ( Figure 12 only one is shown in the figure), a memory 1220, and a communication module 1240. A computer program 1230 that may run on the processor 1210 is stored in the memory 1220. When the processor 1210 executes the computer program 1230, it implements the steps in the embodiment of the above configuration information synchronization method, such as Figure 2 steps 201 to 203 shown in FIG. Or, when the processor 1210 executes the computer program 1230, it implements the functions of each module / unit in the above device embodiments, such as Figure 11 the functions of module 1110 to module 1120 shown in FIG. The communication module 1240 may be a separate communication unit for communicating with an external server or a terminal device.

[0145] The electronic device 12 may include, but is not limited to: a processor 1210 and a memory 1220. Those skilled in the art can understand that Figure 12 this is only an example of the electronic device 12 and does not constitute a limitation to the electronic device 12. It may include more or fewer components than shown in the figure, or combine certain components, or different components. For example, the electronic device 12 may also include an input and sending device, a network access device, a bus, etc.

[0146] The processor 1210 may be a central processing unit (CPU), or may also be 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 may be a microprocessor or the processor may also be any conventional processor, etc.

[0147] The memory 1220 may be an internal storage unit of the electronic device 12 in some embodiments, such as a hard disk or memory of the electronic device 12. The memory 1220 may also be an external storage device of the electronic device 12, such as a plug-in hard disk equipped on the electronic device 12, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, etc. The memory 1220 may also include both an internal storage unit of the electronic device 12 and an external storage device. The memory 1220 is used to store an operating system, application programs, a BootLoader, data, and other programs, such as program codes of the computer program 1230. The memory 1220 may also be used to temporarily store data that has been sent or will be sent.

[0148] In addition, those skilled in the art can clearly understand that, for the convenience and simplicity of description, only the above-mentioned division of each functional unit and module is used as an example for illustration. In practical applications, the above functions can be allocated to different functional units and modules according to needs, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. In each embodiment of the present application, each functional unit may be integrated in a processing unit, or each unit may exist physically alone, or two or more units may be integrated in one unit. The above integrated unit may be implemented in the form of hardware or in the form of a software functional unit.

[0149] The embodiments of the present application provide a computer-readable storage medium. The computer-readable storage medium stores a computer program. When the computer program runs on an electronic device, the electronic device is caused to execute the steps in the above-mentioned method embodiments.

[0150] The embodiments of the present application provide a chip. The chip includes a processor and a memory. The memory stores a computer program. When the computer program is executed by the processor, the steps in the above-mentioned method embodiments are implemented.

[0151] The embodiments of the present application provide a computer program product. When the computer program product runs on an electronic device, the electronic device is caused to execute the steps in the above-mentioned method embodiments.

[0152] It should be understood that the processor mentioned in the embodiments of the present application may be a central processing unit (CPU), or may also be 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 may be a microprocessor or the processor may also be any conventional processor, etc.

[0153] It should also be understood that the memory mentioned in the embodiments of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable ROM (PROM), an erasable programmable ROM (EPROM), an electrically erasable programmable ROM (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchlink DRAM (SLDRAM), and direct rambus RAM (DR RAM).

[0154] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the above division of each functional unit and module is used as an example. In actual applications, the above functions can be allocated to different functional units and modules according to needs, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiments can be integrated into a processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit. In addition, the specific names of each functional unit and module are only for the convenience of mutual distinction and do not limit the protection scope of this application. The specific working processes of the units and modules in the above system can refer to the corresponding processes in the foregoing method embodiments and will not be elaborated here.

[0155] In the above embodiments, the descriptions of each embodiment have their own emphases. For the parts not detailed or recorded in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0156] Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, or by a combination of computer software and electronic hardware. Whether these functions are executed in the form of hardware or software depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.

[0157] In the embodiments provided in this application, it should be understood that the disclosed device and method can be implemented in other ways. For example, the system embodiments described above are only illustrative. For example, the division of the modules or units is only a logical function division. In actual implementation, there can be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces. The indirect couplings or communication connections of the devices or units can be in electrical, mechanical or other forms.

[0158] The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they can be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0159] In addition, in each embodiment of the present application, each functional unit can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of a software functional unit.

[0160] If the above-mentioned integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, to implement all or part of the processes in the above-mentioned embodiment methods of the present application, a computer program can be used to instruct relevant hardware to complete. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, the steps of the above-mentioned various method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in the form of source code, object code, executable file or some intermediate form, etc. The computer-readable medium can at least include: any entity or device that can carry the computer program code to the large-screen device, recording medium, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electrical carrier signal, telecommunication signal, and software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disc, etc. In some jurisdictions, according to legislation and patent practice, the computer-readable medium cannot be an electrical carrier signal and a telecommunication signal.

[0161] Finally, it should be noted that the above are only specific embodiments of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application should be covered by the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A configuration information synchronization method, characterized in that: Applied to a first switch, the first switch includes a plurality of transmission ports, the method includes: In response to the received configuration information, a preset port correspondence table is obtained, wherein the preset port correspondence table is used to characterize the correspondence between the plurality of transmission ports and the groups; Determine at least one target port according to the preset port correspondence table and the configuration information, or execute an instruction corresponding to the configuration information, wherein the at least one target port is a port among the multiple transmission ports; Based on the at least one target port, the configuration information is sent to at least one second switch, the at least one target port corresponds to the at least one second switch in a one-to-one manner, and the at least one second switch is electrically connected to the first switch.

2. The configuration information synchronization method according to claim 1, characterized in that: The configuration information includes a first group and a registration instruction, the transmission port receiving the configuration information is a first transmission port, and the first transmission port is one of the multiple transmission ports; After obtaining the preset port correspondence table, the method further includes: In the preset port correspondence table, the first group quantity corresponding to the first transmission port is increased by one.

3. The configuration information synchronization method according to claim 1, characterized in that: The configuration information includes a second group and a logout instruction, the transmission port receiving the configuration information is a second transmission port, and the second transmission port is one of the multiple transmission ports; After obtaining the preset port correspondence table, the method further includes: In the preset port correspondence table, the number of the second group corresponding to the second transmission port is reduced by one.

4. The configuration information synchronization method according to claim 1, characterized in that: The configuration information includes a third group and a query instruction, the transmission port receiving the configuration information is a third transmission port, and the third transmission port is one of the multiple transmission ports. The method further includes: Send reply information to the third switch corresponding to the third transmission port, where the reply information is used to indicate that the first switch is in an online state, and the third switch is in an electrically connected state with the first switch through the third transmission port.

5. The configuration information synchronization method according to any one of claims 2 to 4, characterized in that: The at least one target port is all transmission ports among the multiple transmission ports that are different from the port that receives the configuration information.

6. The configuration information synchronization method according to claim 1, characterized in that: The configuration information includes a fourth group and an attribute declaration instruction; The step of determining at least one target port according to the preset port correspondence table and the configuration information includes: According to the preset port correspondence table, at least one port in the plurality of groups including the fourth group is determined as the at least one target port.

7. The configuration information synchronization method according to claim 6, characterized in that ; If the group corresponding to the first switch is the fourth group, the attribute declaration instruction is executed.

8. The configuration information synchronization method according to any one of claims 1 to 4, 6 and 7, characterized in that: Before obtaining the preset port correspondence table, the method further includes: Determine whether the message format corresponding to the configuration information is a preset message format; If the message format corresponding to the configuration information is the preset message format, the preset port correspondence table is obtained.

9. An electronic device, characterized in that: The device comprises a processor and a memory, wherein the processor is used to execute a computer program stored in the memory to implement the configuration information synchronization method as described in any one of claims 1 to 8.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the configuration information synchronization method as described in any one of claims 1 to 8 is implemented.