Method, apparatus and device for configuration difference synchronization of SDN controller and medium

By acquiring the running status and version tag information of the SDN controller, and combining it with difference completion, block packaging and rollback mechanisms, the problem of low synchronization efficiency of SDN controller and device configuration differences is solved, realizing automated and real-time configuration consistency management.

CN116389261BActive Publication Date: 2026-05-22INSPUR NETWORK TECH (SHANDONG) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
INSPUR NETWORK TECH (SHANDONG) CO LTD
Filing Date
2023-04-18
Publication Date
2026-05-22

AI Technical Summary

Technical Problem

In existing technologies, the synchronization of configuration differences between SDN controllers and devices suffers from low efficiency and low reliability. This is especially true when there are a large number of devices and complex environments, where manual detection of configuration differences is time-consuming and difficult to fully detect inconsistencies.

Method used

By acquiring the running status of the SDN controller, detecting version tag information, determining the execution status of configuration commands, and using difference completion, block packaging, and rollback mechanisms to synchronize configuration differences, the consistency of configuration between the controller and the device is ensured.

Benefits of technology

It enables real-time configuration difference synchronization without human intervention, reduces the number of device snapshots, lowers the complexity of operation and maintenance, and ensures a high degree of consistency between the controller and the device.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116389261B_ABST
    Figure CN116389261B_ABST
Patent Text Reader

Abstract

The embodiment of the specification discloses a method, device, equipment and medium for synchronizing configuration differences of an SDN controller, the method comprising: obtaining a running state of the SDN controller; if it is determined based on the running state that the SDN controller is in a pre-execution state, detecting version mark information of a network device corresponding to the SDN controller; determining the position of the version mark information according to the detection result, to judge the execution state of the configuration command based on the position; if it is in an incomplete state, performing difference complementation on the difference configuration command based on a preset difference complementation mode; if it is determined that the version mark information is complete, obtaining complete configuration commands to be issued by the SDN controller, and performing block packaging on the complete configuration commands based on the association relationship of the complete configuration commands to obtain configuration command blocks of the SDN controller; and judging the execution information of each complete configuration command in the configuration command blocks, to determine whether to perform difference synchronization on the complete configuration commands based on a preset rollback mechanism based on the execution information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This specification relates to the field of software-defined networking (SDN) technology, and in particular to a method, apparatus, device, and medium for synchronizing configuration differences of an SDN controller. Background Technology

[0002] Software-defined networking (SDN) is an application within software-defined networking that is responsible for flow control to ensure intelligent networks. With the development of SDN technology, the types and number of network devices are increasing daily. Simultaneously, the interaction between controllers and these devices is becoming increasingly complex and massive. Efficiently configuring, distributing, and managing massive numbers of network devices while ensuring data consistency and accuracy is becoming increasingly challenging. However, due to communication interruptions caused by unstable network conditions between SDN controllers and devices, and according to existing OpenFlow protocol specifications, SDN cannot detect changes in switch configurations, leading to inconsistencies between SDN and switch configurations and causing configuration discrepancies.

[0003] Currently, for discrepancies in SDN controller configurations, the only solution is to manually check the controller and switch configurations. However, this is extremely time-consuming when the environment is complex and the number of devices is large. Furthermore, it may be impossible to identify all inconsistencies, requiring a complete environment re-integration to resolve the issue. In such cases, customers whose business cannot be interrupted will face various losses.

[0004] Therefore, there is a need for an automatic and convenient method for synchronizing configuration differences of SDN controllers. Summary of the Invention

[0005] To address the aforementioned technical problems, this specification provides one or more embodiments of a method, apparatus, device, and medium for synchronizing configuration differences of an SDN controller.

[0006] One or more embodiments of this specification employ the following technical solutions:

[0007] This specification provides one or more embodiments of a method for synchronizing configuration differences of an SDN controller, the method comprising:

[0008] The running status of the SDN controller is obtained. If it is determined that the SDN controller is in a pre-execution state based on the running status, the version tag information of the network device corresponding to the SDN controller is detected. The version tag information is used to tag the configuration commands of the SDN controller.

[0009] The location of the version tag information is determined based on the detection results, and the execution status of the configuration command is determined based on the location; wherein, the execution status includes: complete status and incomplete status;

[0010] If the configuration command is incomplete, it will be padded with differences based on the preset difference padding method.

[0011] If the version tag information is determined to be complete, the complete configuration command to be issued by the SDN controller is obtained. Based on the association relationship of the complete configuration command, the complete configuration command is divided into blocks and packaged to obtain the configuration command block of the SDN controller.

[0012] The execution information of each complete configuration command in the configuration command block is determined, and based on the execution information, it is determined whether to perform differential synchronization of the complete configuration command based on the preset rollback mechanism.

[0013] Optionally, in one or more embodiments of this specification, determining the position of the version tag information based on the detection result, and then determining the execution status of the configuration command based on the position, specifically includes:

[0014] If, based on the detection results, it is determined that the version tag information is located at the end of the configuration command of the SDN controller, then the execution status of the configuration command is determined to be complete.

[0015] If, based on the detection results, it is determined that the version tag information is not located at the end of the configuration command of the SDN controller, then the execution status of the configuration command is determined to be incomplete.

[0016] Optionally, in one or more embodiments of this specification, differential configuration commands are differentially padded based on a preset differential padding method, specifically including:

[0017] Select the preset difference completion method of the difference configuration command; wherein, the preset difference completion method includes: rollback completion and reverse completion;

[0018] If the differential configuration command is differentially padded based on rollback, the previous version tag information corresponding to the version tag information of the current incomplete state is obtained, and the process rolls back to the position corresponding to the previous version tag information to re-execute the differential configuration command.

[0019] If the differential configuration command is differentially padded based on the reverse padding, then the differential configuration command is deleted.

[0020] Optionally, in one or more embodiments of this specification, based on the association relationship of the complete configuration command, the complete configuration command is divided into blocks and packaged to obtain the configuration command block of the SDN controller, specifically including:

[0021] Obtain the dependencies of each complete configuration command and the processing logic relationships between each complete configuration command, so as to determine the association relationship of each complete configuration command based on the dependencies and the processing logic relationships;

[0022] The complete configuration command is divided based on the association relationship, and the divided complete configuration command is packaged to obtain the configuration command block of the SDN controller.

[0023] Optionally, in one or more embodiments of this specification, determining the execution information of each complete configuration command in the configuration command block, and determining whether to perform differential synchronization on the complete configuration commands based on a preset rollback mechanism based on the execution information, specifically includes:

[0024] Obtain the execution order and execution status of each complete configuration command in the configuration command block;

[0025] If the execution order is the inherent order corresponding to the configuration command block, and the execution status of each complete configuration command in the configuration command block is complete, then the configuration command block is determined to have been executed successfully.

[0026] If the execution order is not the inherent order corresponding to the configuration command block, or if there is a complete configuration command in the configuration command block with an incomplete execution state, then it is determined that the complete configuration command will be differentially synchronized based on the preset rollback mechanism.

[0027] Optionally, in one or more embodiments of this specification, the complete configuration command is differentially synchronized based on a preset rollback mechanism, specifically including:

[0028] Determine the initial command state of each complete configuration command in the configuration command block;

[0029] The complete configuration command is rolled back to the initial command state to achieve configuration difference synchronization of the SDN controller.

[0030] Optionally, in one or more embodiments of this specification, after performing differential synchronization on the complete configuration command based on a preset rollback mechanism, the method further includes:

[0031] If it is determined that each complete configuration command in the configuration command block was executed successfully, a complete status marker for the configuration command block is generated based on the timestamp corresponding to each configuration command package and the execution record of each complete configuration command in the configuration command package;

[0032] The configuration command block is marked based on the complete status flag.

[0033] This specification provides one or more embodiments of a configuration difference synchronization device for an SDN controller, the device comprising:

[0034] The acquisition module is used to acquire the running status of the SDN controller. If it is determined that the SDN controller is in a pre-execution state based on the running status, the module detects the version tag information of the network device corresponding to the SDN controller. The version tag information is used to tag the configuration commands of the SDN controller.

[0035] The judgment module is used to determine the location of the version marker information based on the detection result, so as to determine the execution status of the configuration command based on the location; wherein, the execution status includes: complete status and incomplete status;

[0036] The difference completion module is used to complete the difference configuration command based on the preset difference completion method if it is incomplete.

[0037] The block packaging module is used to obtain the complete configuration command to be issued by the SDN controller if it is determined that the version tag information is complete, and to block and package the complete configuration command based on the association relationship of the complete configuration command to obtain the configuration command block of the SDN controller.

[0038] The synchronization unit is used to determine the execution information of each complete configuration command in the configuration command block, so as to determine whether to perform differential synchronization of the complete configuration command based on the execution information and a preset rollback mechanism.

[0039] This specification provides one or more embodiments of a configuration difference synchronization device for an SDN controller, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to:

[0040] The running status of the SDN controller is obtained. If it is determined that the SDN controller is in a pre-execution state based on the running status, the version tag information of the network device corresponding to the SDN controller is detected. The version tag information is used to tag the configuration commands of the SDN controller.

[0041] The location of the version tag information is determined based on the detection results, and the execution status of the configuration command is determined based on the location; wherein, the execution status includes: complete status and incomplete status;

[0042] If the configuration command is incomplete, it will be padded with differences based on the preset difference padding method.

[0043] If the version tag information is determined to be complete, the complete configuration command to be issued by the SDN controller is obtained. Based on the association relationship of the complete configuration command, the complete configuration command is divided into blocks and packaged to obtain the configuration command block of the SDN controller.

[0044] The execution information of each complete configuration command in the configuration command block is determined, and based on the execution information, it is determined whether to perform differential synchronization of the complete configuration command based on the preset rollback mechanism.

[0045] This specification provides one or more embodiments of a non-volatile computer storage medium storing computer-executable instructions, wherein the computer-executable instructions are configured as follows:

[0046] The running status of the SDN controller is obtained. If it is determined that the SDN controller is in a pre-execution state based on the running status, the version tag information of the network device corresponding to the SDN controller is detected. The version tag information is used to tag the configuration commands of the SDN controller.

[0047] The location of the version tag information is determined based on the detection results, and the execution status of the configuration command is determined based on the location; wherein, the execution status includes: complete status and incomplete status;

[0048] If the configuration command is incomplete, it will be padded with differences based on the preset difference padding method.

[0049] If the version tag information is determined to be complete, the complete configuration command to be issued by the SDN controller is obtained. Based on the association relationship of the complete configuration command, the complete configuration command is divided into blocks and packaged to obtain the configuration command block of the SDN controller.

[0050] The execution information of each complete configuration command in the configuration command block is determined, and based on the execution information, it is determined whether to perform differential synchronization of the complete configuration command based on the preset rollback mechanism.

[0051] The above-described at least one technical solution adopted in the embodiments of this specification can achieve the following beneficial effects:

[0052] After identifying differing configuration commands based on version tagging information, the commands are padded using a pre-defined padded method to achieve a complete state. This padded functionality during configuration distribution ensures real-time synchronization of configuration differences between the controller and devices, and maintains high consistency between their configurations after the distribution process is complete. By packaging complete configuration commands into blocks based on their relationships before distribution, consistency in command execution status within the same package is guaranteed. This also minimizes the number of snapshots required for the controller and devices, avoiding excessive storage space consumption due to backups. Furthermore, the entire process requires no manual intervention, resulting in low operational complexity. Attached Figure Description

[0053] To more clearly illustrate the technical solutions in the embodiments or prior art of this specification, the drawings used in the description of the embodiments or prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this specification. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. In the drawings:

[0054] Figure 1 A flowchart illustrating a configuration difference synchronization method for an SDN controller provided in an embodiment of this specification;

[0055] Figure 2 This is a schematic diagram of a configuration difference synchronization process based on version control in a certain application scenario provided in an embodiment of this specification.

[0056] Figure 3 A schematic diagram of the internal structure of a configuration difference synchronization device for an SDN controller provided in an embodiment of this specification;

[0057] Figure 4 This specification provides an internal structural diagram of an SDN controller configuration difference synchronization device as an embodiment of the present invention.

[0058] Figure 5 This is a schematic diagram of the internal structure of a non-volatile storage medium provided in the embodiments of this specification. Detailed Implementation

[0059] This specification provides a method, apparatus, device, and medium for synchronizing configuration differences of an SDN controller.

[0060] To enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this specification, and not all embodiments. Based on the embodiments of this specification, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this specification.

[0061] like Figure 1 As shown, this specification provides a flowchart illustrating a configuration difference synchronization method for an SDN controller in one or more embodiments. Figure 1 As can be seen, one or more embodiments of this specification describe a method for synchronizing configuration differences of an SDN controller, the method comprising the following steps:

[0062] S101: Obtain the operating status of the SDN controller. If it is determined that the SDN controller is in a pre-execution state based on the operating status, then detect the version tag information of the network device corresponding to the SDN controller; wherein, the version tag information is used to tag the configuration commands of the SDN controller.

[0063] With the development of SDN technology, the types and number of network devices are increasing daily. Simultaneously, the interaction between controllers and these devices is becoming increasingly complex and massive. Efficiently configuring and managing massive numbers of network devices while ensuring data consistency and accuracy is becoming increasingly challenging. However, due to communication interruptions caused by unstable network conditions between SDN controllers and devices, SDN, according to existing OpenFlow protocol specifications, cannot detect changes in switch configurations. This easily leads to inconsistencies between controller and device configurations, such as: when a device is abnormal or offline, the controller configuration may not be successfully sent to the switch, resulting in configuration failure; manual configuration of the switch can also cause inconsistencies between the switch and controller; when the switch's CPU queue is full, excess device configuration commands are automatically discarded, also causing configuration loss; when the command block sent is too large, some commands may fail and not return to the controller, resulting in configuration remnants. Currently, the only solution for these situations is to manually check the configuration differences between the controller and the switch. However, in complex environments with a large number of devices, this is extremely time-consuming and may not uncover all inconsistencies, ultimately requiring a complete environment re-integration to resolve the problem.

[0064] Therefore, to address the inefficiencies and reliability issues caused by manual configuration synchronization, this embodiment first obtains the operating status of the SDN controller. If the SDN controller is determined to be in a pre-execution state based on its operating status, then the version tag information in the network device corresponding to the SDN controller is detected. It should be noted that the version tag information is used to tag the configuration commands of the SDN controller in the corresponding network device. That is, when the SDN controller needs to issue configuration to the device, it enters a pre-execution state. In this state, the SDN controller first obtains the version tag information from the device. The version tag information is a unique identifier attached after a command is successfully executed, as recorded on the network device.

[0065] S102: Determine the position of the version marking information based on the detection result, and determine the execution status of the configuration command based on the position; wherein, the execution status includes: complete status and incomplete status.

[0066] Based on the detection results obtained in step S101 above, the location of the version marker information is determined. This allows the determination of the execution status of a configuration command based on its position within the command, thus determining whether the command has been completed. It should be noted that the execution status includes: a complete state, indicating that no other commands have been executed since the last successful execution of a command, preventing configuration overwriting or modification; and an incomplete state, indicating that other commands were executed after the last successful execution but did not reach the complete state. The execution of these other commands may be either due to the controller issuing a command that was not completely successful, causing the device configuration to enter an "intermediate state," or the device executing a command itself under human intervention, the execution status of which cannot be directly perceived by the controller in real time.

[0067] Specifically, in one or more embodiments of this specification, determining the location of the version tag information based on the detection results, and judging the execution status of the configuration command based on the location, specifically includes the following steps:

[0068] If the detection results indicate that the version tag information is located at the end of the SDN controller's configuration command, then the execution status of the configuration command can be determined to be complete, and the configuration command in this complete state can be executed directly. If the detection results indicate that the version tag information is not located at the end of the SDN controller's configuration command, then the execution status of the configuration command can be determined to be incomplete. In this case, it is necessary to pad the incomplete configuration command to ensure that the configuration differences of the SDN controller are synchronized.

[0069] S103: If the state is incomplete, the difference configuration command will be filled with differences based on the preset difference filling method.

[0070] If it is determined that the configuration command is incomplete according to step S102 above, then in this embodiment of the specification, the incomplete configuration command is used as a differential configuration command, and differential configuration command is supplemented according to a pre-set differential supplementation method.

[0071] Specifically, in one or more embodiments of this specification, the differential configuration command is differentially padded according to a pre-set differential padding method, which specifically includes the following steps:

[0072] First, select the preset difference completion method for the difference configuration command. It should be noted that the preset difference completion methods include: rollback completion and reverse completion. If the difference configuration command is completed using rollback completion, the previous version tag information corresponding to the current incomplete version tag information is obtained, and the process rolls back to the position corresponding to the previous version tag information to re-execute the difference configuration command. That is, in a certain application scenario in this manual, it is possible to roll back to the version of the last backup's complete state. If the difference configuration command is completed using reverse completion, the difference configuration command needs to be deleted. That is, the difference completion is achieved by performing the reverse operation on the configuration command that has not reached a complete state. After completing the difference configuration command of the network device in the above way, it reaches a complete state, and other configurations can continue to be issued. Difference completion during configuration issuance ensures that the configuration differences between the controller and the device are synchronized in real time, and that the configurations of the controller and the device remain highly consistent after the configuration issuance process is completed.

[0073] S104: If it is determined that the version tag information is complete, the complete configuration command to be issued by the SDN controller is obtained. Based on the association relationship of the complete configuration command, the complete configuration command is divided into blocks and packaged to obtain the configuration command block of the SDN controller.

[0074] Because SDN controller configuration commands may have a certain order, existing methods often fail to establish effective "command clusters" for managing command execution states, as each command's execution is unrelated or depends solely on its preceding command. For example, if an SDN controller needs to issue configuration to a device, and this configuration contains 10 commands, managing the execution states of these 10 commands would result in 20 possible execution states. Real-time backup and restoration would require recording the state of each command after execution and taking snapshots of the controller and device at that time, placing a significant burden on device storage. Therefore, to address this storage pressure issue, in this embodiment, after obtaining the complete configuration command based on the above steps, if the version tag information is confirmed to be complete, the complete configuration command to be issued by the SDN controller is obtained. Then, based on the relationships between the complete configuration commands, the complete configuration command is divided into blocks and packaged to obtain the SDN controller's configuration command block.

[0075] Specifically, in one or more embodiments of this specification, based on the association relationships of complete configuration commands, the complete configuration commands are divided into blocks and packaged to obtain the configuration command block of the SDN controller. This includes the following steps: First, the dependencies of each complete configuration command and the processing logic relationships between them are obtained, thereby determining the association relationships of each complete configuration command based on the dependencies and processing logic relationships. Then, the complete configuration commands are divided according to the association relationships, and the divided complete configuration commands are packaged to obtain the configuration command block of the SDN controller. In these embodiments, commands are issued in the form of packages to ensure the consistency of command execution status within the same package, while minimizing the number of snapshots of the controller and devices.

[0076] S105: Determine the execution information of each complete configuration command in the configuration command block, and determine whether to perform differential synchronization of the complete configuration command based on the execution information using a preset rollback mechanism.

[0077] Because complete configuration commands that are divided into a block should have the same execution state during the configuration distribution process to the device, this specification judges the execution information of each complete configuration command in the configuration command block, and then determines whether it is necessary to perform differential synchronization of the complete configuration commands according to the pre-set rollback mechanism based on the execution information.

[0078] Specifically, in one or more embodiments of this specification, determining the execution information of each complete configuration command in the configuration command block, and determining whether to perform differential synchronization on the complete configuration commands based on a preset rollback mechanism, specifically includes the following steps:

[0079] First, the execution order and execution status of each complete configuration command in the configuration command block are obtained. If the execution order is determined to be the inherent order corresponding to the configuration command block, and the execution status of each complete configuration command in the configuration command block is complete, then the configuration command block can be determined to have executed successfully. If the execution order is not the inherent order corresponding to the configuration command block, or if there are complete configuration commands in the configuration command block with incomplete execution status, then it is determined to perform differential synchronization on the complete configuration command based on a pre-set rollback mechanism. That is, in the embodiments of this specification, if complete configuration command A and complete configuration command B are in the same configuration command block, i.e., in the same package, then in addition to A and B maintaining their inherent execution order, it is also necessary to ensure that A and B both execute successfully for the package to be considered successful. If any command of A or B fails to execute for some reason, then the entire package is considered to have failed. At this time, it is necessary to perform a rollback operation on the commands that have already been executed successfully to ensure the configuration differential synchronization of the SDN controller.

[0080] Furthermore, in one or more embodiments of this specification, the complete configuration command is synchronized differentially based on a preset rollback mechanism, specifically including the following process:

[0081] First, determine the initial command state of each complete configuration command in the configuration command block, and then roll back the complete configuration command to the initial command state to achieve configuration difference synchronization of the SDN controller.

[0082] Furthermore, in one or more embodiments of this specification, after performing differential synchronization of the complete configuration command based on a preset rollback mechanism, the method further includes:

[0083] If it is determined that all complete configuration commands in a configuration command block have executed successfully, a complete status flag for that configuration command block is generated based on the timestamps corresponding to each configuration command package and the execution records of each complete configuration command within the package. The configuration command block is then marked according to this complete status flag. In other words, once all commands in a configuration command block have executed successfully, a complete status flag can be added to that package. The marking format is typically a timestamp added to the command execution records in the device. Therefore, the commands successfully executed between two timestamps can be considered as the configuration command blocks we have defined.

[0084] like Figure 2 As shown, after performing differential synchronization of the complete configuration command based on the preset rollback mechanism and marking the configuration command block, the system iteratively determines whether there are still configuration command blocks to be executed to determine whether the configuration differential synchronization of the SDN controller is complete, so as to ensure the differential synchronization of each configuration command block.

[0085] like Figure 3As shown, one or more embodiments of this specification provide a configuration difference synchronization device for an SDN controller, which is composed of... Figure 3 It can be seen that the device includes:

[0086] The acquisition module 301 is used to acquire the running status of the SDN controller. If it is determined that the SDN controller is in a pre-execution state based on the running status, the version tag information of the network device corresponding to the SDN controller is detected. The version tag information is used to tag the configuration commands of the SDN controller.

[0087] The judgment module 302 is used to determine the position of the version marking information based on the detection result, so as to determine the execution status of the configuration command based on the position; wherein, the execution status includes: complete status and incomplete status;

[0088] The difference completion module 303 is used to complete the difference configuration command based on the preset difference completion method if it is incomplete.

[0089] The block packaging module 304 is used to obtain the complete configuration command to be issued by the SDN controller if it is determined that the version marking information is complete, and to block and package the complete configuration command based on the association relationship of the complete configuration command to obtain the configuration command block of the SDN controller.

[0090] Synchronization unit 305 is used to determine the execution information of each complete configuration command in the configuration command block, so as to determine whether to perform differential synchronization of the complete configuration command based on the execution information and a preset rollback mechanism.

[0091] like Figure 4 As shown, one or more embodiments of this specification provide a configuration difference synchronization device for an SDN controller, the device comprising:

[0092] At least one processor;

[0093] And, a memory communicatively connected to the at least one processor;

[0094] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to:

[0095] The running status of the SDN controller is obtained. If it is determined that the SDN controller is in a pre-execution state based on the running status, the version tag information of the network device corresponding to the SDN controller is detected. The version tag information is used to tag the configuration commands of the SDN controller.

[0096] The location of the version tag information is determined based on the detection results, and the execution status of the configuration command is determined based on the location; wherein, the execution status includes: complete status and incomplete status;

[0097] If the configuration command is incomplete, it will be padded with differences based on the preset difference padding method.

[0098] If the version tag information is determined to be complete, the complete configuration command to be issued by the SDN controller is obtained. Based on the association relationship of the complete configuration command, the complete configuration command is divided into blocks and packaged to obtain the configuration command block of the SDN controller.

[0099] The execution information of each complete configuration command in the configuration command block is determined, and based on the execution information, it is determined whether to perform differential synchronization of the complete configuration command based on the preset rollback mechanism.

[0100] like Figure 5 As shown, this specification provides a schematic diagram of the internal structure of a non-volatile storage medium in one or more embodiments. Figure 5 It is known that a non-volatile storage medium stores computer-executable instructions, which are capable of:

[0101] The running status of the SDN controller is obtained. If it is determined that the SDN controller is in a pre-execution state based on the running status, the version tag information of the network device corresponding to the SDN controller is detected. The version tag information is used to tag the configuration commands of the SDN controller.

[0102] The location of the version tag information is determined based on the detection results, and the execution status of the configuration command is determined based on the location; wherein, the execution status includes: complete status and incomplete status;

[0103] If the configuration command is incomplete, it will be padded with differences based on the preset difference padding method.

[0104] If the version tag information is determined to be complete, the complete configuration command to be issued by the SDN controller is obtained. Based on the association relationship of the complete configuration command, the complete configuration command is divided into blocks and packaged to obtain the configuration command block of the SDN controller.

[0105] The execution information of each complete configuration command in the configuration command block is determined, and based on the execution information, it is determined whether to perform differential synchronization of the complete configuration command based on the preset rollback mechanism.

[0106] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to interchangeably. Each embodiment focuses on describing the differences from other embodiments. In particular, the embodiments for apparatus, devices, and non-volatile computer storage media are basically similar to the method embodiments, so the descriptions are relatively simple; relevant parts can be referred to the descriptions of the method embodiments.

[0107] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.

[0108] The above description is merely one or more embodiments of this specification and is not intended to limit this specification. Various modifications and variations can be made to the one or more embodiments of this specification by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principle of one or more embodiments of this specification should be included within the scope of the claims of this specification.

Claims

1. A method for synchronizing configuration differences of an SDN controller, characterized in that, The method includes: The running status of the SDN controller is obtained. If it is determined that the SDN controller is in a pre-execution state based on the running status, the version tag information of the network device corresponding to the SDN controller is detected. The version tag information is used to tag the configuration commands of the SDN controller. The pre-execution state is when the SDN controller needs to issue configuration to the device. The SDN controller will enter the pre-execution state when it needs to issue configuration to the device. At this time, the version tag information is an identifier added after the command recorded on the network device is successfully executed. The location of the version tag information is determined based on the detection results, and the execution status of the configuration command is determined based on the location; wherein, the execution status includes: complete status and incomplete status; If the configuration command is incomplete, it will be padded with differences based on the preset difference padding method. If the version tag information is determined to be complete, the complete configuration command to be issued by the SDN controller is obtained. Based on the association relationship of the complete configuration command, the complete configuration command is divided into blocks and packaged to obtain the configuration command block of the SDN controller. The execution information of each complete configuration command in the configuration command block is determined, and based on the execution information, it is determined whether to perform differential synchronization on the complete configuration command based on the preset rollback mechanism; Specifically, the differential configuration command is augmented based on a preset differential augmentation method, including: Select the preset difference completion method of the difference configuration command; wherein, the preset difference completion method includes: rollback completion and reverse completion; If the differential configuration command is differentially padded based on rollback, the previous version tag information corresponding to the version tag information of the current incomplete state is obtained, and the process rolls back to the position corresponding to the previous version tag information to re-execute the differential configuration command. If the difference configuration command is differentially padded based on the reverse padding, then the difference configuration command is deleted. Based on the association relationships of the complete configuration command, the complete configuration command is divided into blocks and packaged to obtain the configuration command block of the SDN controller, specifically including: Obtain the dependencies of each complete configuration command and the processing logic relationships between each complete configuration command, so as to determine the association relationship of each complete configuration command based on the dependencies and the processing logic relationships; The complete configuration command is divided based on the association relationship, and the divided complete configuration command is packaged to obtain the configuration command block of the SDN controller; Determine the execution information of each complete configuration command in the configuration command block, and determine whether to perform differential synchronization on the complete configuration commands based on the execution information using a preset rollback mechanism, specifically including: Obtain the execution order and execution status of each complete configuration command in the configuration command block; If the execution order is the inherent order corresponding to the configuration command block, and the execution status of each complete configuration command in the configuration command block is complete, then the configuration command block is determined to have been executed successfully. If the execution order is not the inherent order corresponding to the configuration command block, or if there is a complete configuration command in the configuration command block with an incomplete execution state, then it is determined that the complete configuration command will be differentially synchronized based on the preset rollback mechanism.

2. The configuration difference synchronization method for an SDN controller according to claim 1, characterized in that, The location of the version marker information is determined based on the detection results, and the execution status of the configuration command is determined based on the location. Specifically, this includes: If, based on the detection results, it is determined that the version tag information is located at the end of the configuration command of the SDN controller, then the execution status of the configuration command is determined to be complete. If, based on the detection results, it is determined that the version tag information is not located at the end of the configuration command of the SDN controller, then the execution status of the configuration command is determined to be incomplete.

3. The configuration difference synchronization method for an SDN controller according to claim 1, characterized in that, The complete configuration command is synchronized differentially based on a preset rollback mechanism, specifically including: Determine the initial command state of each complete configuration command in the configuration command block; The complete configuration command is rolled back to the initial command state to achieve configuration difference synchronization of the SDN controller.

4. The SDN controller configuration difference synchronization method according to claim 1, characterized in that, After performing differential synchronization on the complete configuration command based on a preset rollback mechanism, the method further includes: If it is determined that each complete configuration command in the configuration command block was executed successfully, a complete status marker for the configuration command block is generated based on the timestamp corresponding to each configuration command package and the execution record of each complete configuration command in the configuration command package; The configuration command block is marked based on the complete status flag.

5. A configuration difference synchronization device for an SDN controller, characterized in that, The device includes: The acquisition module is used to acquire the running status of the SDN controller. If it is determined that the SDN controller is in a pre-execution state based on the running status, the module detects the version tag information of the network device corresponding to the SDN controller. The version tag information is used to tag the configuration commands of the SDN controller. The pre-execution state is when the SDN controller needs to issue configuration to the device. The SDN controller will enter the pre-execution state when it needs to issue configuration to the device. At this time, the version tag information is an identifier added after the command recorded on the network device is successfully executed. The judgment module is used to determine the location of the version marker information based on the detection result, so as to determine the execution status of the configuration command based on the location; wherein, the execution status includes: complete status and incomplete status; The difference completion module is used to complete the difference configuration command based on the preset difference completion method if it is incomplete. The block packaging module is used to obtain the complete configuration command to be issued by the SDN controller if it is determined that the version tag information is complete, and to block and package the complete configuration command based on the association relationship of the complete configuration command to obtain the configuration command block of the SDN controller. The synchronization module is used to determine the execution information of each complete configuration command in the configuration command block, so as to determine whether to perform differential synchronization of the complete configuration command based on the execution information and a preset rollback mechanism. Specifically, the differential configuration command is augmented based on a preset differential augmentation method, including: Select the preset difference completion method of the difference configuration command; wherein, the preset difference completion method includes: rollback completion and reverse completion; If the differential configuration command is differentially padded based on rollback, the previous version tag information corresponding to the version tag information of the current incomplete state is obtained, and the process rolls back to the position corresponding to the previous version tag information to re-execute the differential configuration command. If the difference configuration command is differentially padded based on the reverse padding, then the difference configuration command is deleted. Based on the association relationships of the complete configuration command, the complete configuration command is divided into blocks and packaged to obtain the configuration command block of the SDN controller, specifically including: Obtain the dependencies of each complete configuration command and the processing logic relationships between each complete configuration command, so as to determine the association relationship of each complete configuration command based on the dependencies and the processing logic relationships; The complete configuration command is divided based on the association relationship, and the divided complete configuration command is packaged to obtain the configuration command block of the SDN controller; Determine the execution information of each complete configuration command in the configuration command block, and determine whether to perform differential synchronization on the complete configuration commands based on the execution information using a preset rollback mechanism, specifically including: Obtain the execution order and execution status of each complete configuration command in the configuration command block; If the execution order is the inherent order corresponding to the configuration command block, and the execution status of each complete configuration command in the configuration command block is complete, then the configuration command block is determined to have been executed successfully. If the execution order is not the inherent order corresponding to the configuration command block, or if there is a complete configuration command in the configuration command block with an incomplete execution state, then it is determined that the complete configuration command will be differentially synchronized based on the preset rollback mechanism.

6. A configuration difference synchronization device for an SDN controller, characterized in that, The device includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to: perform the method according to any one of claims 1-4.

7. A non-volatile storage medium storing computer-executable instructions, characterized in that, The computer-executable instructions are capable of performing the method described in any one of claims 1-4.