A switch configuration method, device and medium based on an SDN network

By saving and comparing switch configuration information in the SDN controller, and selecting reasonable and valid configuration information for recovery, the problems of configuration errors and long recovery times in the prior art are solved, and efficient switch configuration recovery and reference are achieved.

CN115567396BActive Publication Date: 2026-05-22INSPUR NETWORK TECH (SHANDONG) CO LTD
View PDF 1 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
2022-09-20
Publication Date
2026-05-22

Smart Images

  • Figure CN115567396B_ABST
    Figure CN115567396B_ABST
Patent Text Reader

Abstract

The application discloses a switch configuration method and device based on an SDN network and a medium, belongs to the field of communication technology, and is used for solving the technical problems of the recovery configuration of the existing network device, the matching error of the configuration command, the long configuration time and the difficulty in checking and comparing the configuration of the switch. The method comprises the following steps: based on a preset time interval, the configuration information of the switch is stored correspondingly; through an SDN controller, the first record entry of the switch to be recovered is acquired, and the first configuration information is obtained according to the first record entry; the second configuration information corresponding to the second record entry is acquired, and the first configuration information is compared with the second configuration information to obtain the effective configuration information; wherein the second record entry corresponds to the switch to be recovered; and the effective configuration information is transmitted to the switch to be recovered to complete the configuration recovery of the switch to be recovered.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technology, and in particular to a switch configuration method, device and medium based on SDN network. Background Technology

[0002] Software-defined networking (SDN) is a new network architecture whose core idea is to control or drive the entire network through software. The SDN controller, acting as the brain of the SDN system, is responsible for managing the entire network, and manages multiple switches. With the continuous development of the internet, SDN technology has been widely implemented in data centers and campus networks.

[0003] In practical networks, when network devices malfunction or network configuration changes prevent them from meeting current business needs, it is necessary to restore the network to its previous normal state. Existing traditional recovery methods require executing each configuration command line by line into the memory of each switch. This method has many technical drawbacks, such as errors due to incorrect configuration commands and long processing times. Summary of the Invention

[0004] This application provides a switch configuration method, device, and medium based on SDN networks to solve the following technical problems: the restoration and configuration of existing network devices is prone to configuration command matching errors, long configuration time, and difficulty in viewing and comparing switch configurations.

[0005] The embodiments of this application adopt the following technical solutions:

[0006] On one hand, this application provides a switch configuration method based on an SDN network. The method includes: storing the configuration information of the switch according to a preset time interval; obtaining a first record entry of the switch to be restored through an SDN controller, and obtaining first configuration information based on the first record entry; obtaining second configuration information corresponding to a second record entry, and comparing the first configuration information with the second configuration information to obtain valid configuration information; wherein the second record entry corresponds to the first record entry; and transmitting the valid configuration information to the switch to be restored to complete the configuration restoration of the switch to be restored.

[0007] This application embodiment stores switch configuration information in the non-volatile configuration memory of the SDN controller, while distinguishing configuration information from different switches at different times in a database. By viewing and comparing the configuration information of different switches at different times through the SDN controller, the most reasonable and valid configuration information can be selected, effectively solving the problem of insufficient storage space for configuration information. It also provides selectivity for configuration recovery, enabling configuration recovery without restarting the switch, avoiding the risk of data mismatch caused by restarting the switch, and providing a reference for switch configuration recovery, eliminating the possibility of errors caused by simply restoring the configuration to the previous time slot.

[0008] In one feasible implementation, the configuration information of the switches is stored accordingly based on a preset time interval. Specifically, this includes: obtaining the configuration information of several switches through the SDN controller based on the preset time interval; wherein the SDN controller and several switches are interconnected; reading and processing the configuration information according to the configuration memory in the SDN controller, and determining the storage path of the configuration information; and storing the configuration information in the corresponding file of the configuration memory according to the storage path.

[0009] In one feasible implementation, before obtaining the first record entry of the switch to be recovered through the SDN controller, the method further includes: obtaining the switch IP and configuration time corresponding to the configuration information through the SDN controller; marking the switch IP and configuration time with the storage path corresponding to the configuration information, and constructing identification information based on the information after the same marking; recording the identification information and the storage path in the database of the SDN controller, and constructing data record entries in the database through the recorded identification information and its corresponding storage path.

[0010] In one feasible implementation, the first record entry of the switch to be restored is obtained through the SDN controller, and the first configuration information is obtained based on the first record entry. Specifically, this includes: obtaining the data record entry corresponding to the switch to be restored through the SDN controller; determining the first entry information in the data record entry as the first record entry; wherein the first record entry includes at least the switch's identification information and storage path; reading the configuration information under the storage path according to the storage path corresponding to the first record entry, and determining the read configuration information as the first configuration information of the switch to be restored.

[0011] In one feasible implementation, obtaining the second configuration information corresponding to the second record entry and comparing the first configuration information with the second configuration information to obtain valid configuration information specifically includes: obtaining the second entry information in the data record entry corresponding to the switch to be restored, and determining the second entry information as the second record entry; reading the configuration information under the storage path according to the storage path corresponding to the second record entry, and determining the configuration information as the second configuration information of the switch to be restored; comparing the first configuration information and the second configuration information of the switch to be restored through the SDN controller to obtain a configuration difference value; wherein, the difference comparison includes at least the comparison of relevant parameters in the configuration information and the comparison of relevant management VLANs; and filtering the configuration information corresponding to other record entries in the data record entry according to the configuration difference value to obtain the valid configuration information.

[0012] In this embodiment, the selected valid configuration information is actively sent to the switch to be restored. The switch reads the configuration information and loads it into memory, realizing the function of viewing and comparing configuration information at different times. This provides a reference for configuration restoration and eliminates the possibility of errors caused by restoring the configuration to the previous time slot.

[0013] In one feasible implementation, the configuration information corresponding to other record entries in the data record entry is filtered according to the configuration difference value to obtain the valid configuration information. Specifically, this includes: comparing the configuration difference value with a first preset threshold; if the configuration difference value is less than or equal to the first preset threshold, then the first configuration information and the second configuration information are the valid configuration information; if the configuration difference value is greater than the first preset threshold, then the first configuration information and the second configuration information are invalid configuration information, and the remaining entry information in the data record entry is re-acquired, and the remaining entry information is determined as the remaining record entries; wherein, the remaining entry information is entry information other than the first entry information and the second entry information; comparing the remaining configuration information corresponding to the remaining record entries to obtain the configuration difference value of the remaining configuration information; and comparing the configuration difference value of the remaining configuration information with the first preset threshold to determine the valid configuration information among the remaining configuration information.

[0014] In one feasible implementation, transmitting the valid configuration information to the switch to be restored to complete the configuration restoration of the switch to be restored specifically includes: filtering the valid configuration information based on the switch's preset restoration requirements to obtain valid configuration information that meets the preset restoration requirements; inputting the valid configuration information that meets the preset restoration requirements into the switch to be restored; and performing a read operation on the valid configuration information through the switch to be restored, and loading the read valid configuration information into memory to complete the configuration restoration of the switch to be restored.

[0015] In one feasible implementation, after transmitting the valid configuration information to the switch to be restored to complete the configuration restoration of the switch to be restored, the method further includes: determining the restored switch to be restored as a restored switch, and obtaining restoration completion information in the restored switch; wherein, the restoration completion information is status change information automatically generated by the restored switch; and inputting the restoration completion information into the SDN controller to prompt the network administrator that the switch to be restored has completed configuration restoration.

[0016] Secondly, embodiments of this application also provide a switch configuration device based on an SDN network, the device 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 to enable the at least one processor to execute a switch configuration method based on an SDN network as described in any of the above embodiments.

[0017] Thirdly, embodiments of this application also provide a non-volatile computer storage medium, characterized in that the storage medium is a non-volatile computer-readable storage medium, the non-volatile computer-readable storage medium stores at least one program, each program including instructions, and when the instructions are executed by a terminal, the terminal executes a switch configuration method based on an SDN network as described in any of the above embodiments.

[0018] This application provides a switch configuration method, device, and medium based on an SDN network. By storing switch configuration information in the non-volatile configuration memory of the SDN controller, and distinguishing configuration information from different switches at different times in a database, the SDN controller can view and compare configuration information from different switches at different times, selecting the most reasonable and valid configuration information. This effectively solves the problem of insufficient storage space for configuration information and provides selectivity for configuration recovery, enabling configuration recovery without restarting the switch. This avoids the risk of data mismatch caused by restarting the switch and provides a reference for switch configuration recovery, eliminating the possibility of errors caused by simply restoring the configuration to the previous time slot. Attached Figure Description

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

[0020] Figure 1 A flowchart illustrating a switch configuration method based on an SDN network, provided for embodiments of this application;

[0021] Figure 2 This is a schematic diagram of an SDN network provided in an embodiment of this application;

[0022] Figure 3 This is a schematic diagram of the structure of a switch configuration device based on an SDN network, provided in an embodiment of this application. Detailed Implementation

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

[0024] This application provides a switch configuration method based on an SDN network, such as... Figure 1 As shown, the switch configuration method based on SDN network specifically includes steps S101-S104:

[0025] S101. Based on a preset time interval, store the switch configuration information accordingly.

[0026] Specifically, based on preset time intervals, the configuration information of several switches is obtained through the SDN controller. The SDN controller and the switches are interconnected. The configuration information is read and processed from the configuration memory in the SDN controller, and the storage path for the configuration information is determined. Based on the storage path, the configuration information is stored in the corresponding file in the configuration memory.

[0027] In one embodiment, Figure 2 This is a schematic diagram of an SDN network provided in an embodiment of this application, as shown below. Figure 2 As shown, the SDN controller reads configuration information from all connected switches at intervals T, and saves the configuration information to the SDN controller's memory (configuration memory). Each time the configuration information of a different switch to be restored is saved, the storage path of the corresponding file is recorded in the SDN controller's database. The size of the interval T can be flexibly adjusted and controlled by the SDN controller.

[0028] S102. Obtain the first record entry of the switch to be restored through the SDN controller, and obtain the first configuration information based on the first record entry.

[0029] Specifically, the SDN controller obtains the switch IP address and configuration time corresponding to the configuration information. The switch IP address and configuration time are then matched with the storage path corresponding to the configuration information, and identification information is constructed based on this matched information.

[0030] Furthermore, based on the database in the SDN controller, the identification information and storage path are recorded accordingly, and data record entries in the database are constructed using the recorded identification information and their corresponding storage paths.

[0031] As a feasible implementation method, based on the IP address of different switches and / or the configuration time corresponding to the configuration information, the storage path corresponding to the configuration information is marked with the same identifier. Then, the identifier information is constructed by using the same identifiers of switch IP, configuration time, and storage path. The storage path corresponding to the configuration information and the obtained identifier information are then put into the database of the SDN controller. Based on the data table in the database, the recorded identifier information and its corresponding storage path are updated accordingly to obtain the data record entries in the database.

[0032] Furthermore, the SDN controller retrieves the data record entries corresponding to the switch to be restored. The first entry in the data record entries is identified as the first record entry. The first record entry includes at least the switch's identification information and its storage path. Based on the storage path corresponding to the first record entry, the configuration information under that storage path is read, and this read configuration information is identified as the first configuration information of the switch to be restored.

[0033] In one embodiment, such as Figure 2 As shown, check the record entry a1 (first record entry) in the database of the SDN controller corresponding to the switch A that needs to be restored. Obtain the storage path of the configuration information corresponding to record entry a1 through the data record entry in the database, and read the configuration information (first configuration information) under the storage path.

[0034] S103. Obtain the second configuration information corresponding to the second record entry, and compare the first configuration information with the second configuration information to obtain the valid configuration information.

[0035] Specifically, the second entry information in the data record entry corresponding to the switch to be restored is obtained, and the second entry information is identified as the second record entry. According to the storage path corresponding to the second record entry, the configuration information under the storage path is read, and the configuration information is identified as the second configuration information of the switch to be restored.

[0036] Furthermore, the SDN controller compares the first and second configuration information of the switch to be restored to obtain a configuration difference value. This difference comparison includes at least comparing relevant parameters and management VLANs within the configuration information. Based on the configuration difference value, the configuration information corresponding to other records in the data record entries is filtered to obtain valid configuration information.

[0037] In one embodiment, such as Figure 2 As shown, record entry a2 (the second record entry) of the data record bar in the database of the SDN controller corresponding to switch A is obtained. The configuration information (the second configuration information) corresponding to record entry a2 is read in the same way as record entry a1 (the first record entry). The configuration information of a1 and a2 is compared to obtain their configuration differences (configuration difference value).

[0038] Specifically, the configuration difference value is compared with a first preset threshold. If the configuration difference value is less than or equal to the first preset threshold, then the first configuration information and the second configuration information are valid configuration information.

[0039] If the configuration difference value exceeds a first preset threshold, the first and second configuration information are invalid configuration information. The remaining entry information in the data record entries is then re-acquired and identified as the remaining record entries. The remaining entry information refers to the entry information other than the first and second entry information. The remaining configuration information corresponding to the remaining record entries is compared to obtain the configuration difference value of the remaining configuration information. The configuration difference value of the remaining configuration information is then compared with the first preset threshold to determine the valid configuration information within the remaining configuration information.

[0040] As a feasible implementation method, it is determined whether record entries a1 and a2 are reasonable and valid configuration information. If they are not satisfied, other remaining record entries in the data record entries of switch A database are selected, and the remaining configuration information corresponding to the remaining record entries is compared to obtain the configuration difference value of the remaining configuration information. The configuration difference value of the remaining configuration information is compared with the first preset threshold, and the judgment is continuously iterated until reasonable and valid configuration information is obtained.

[0041] S104. Transmit the valid configuration information to the switch to be restored to complete the configuration restoration of the switch to be restored.

[0042] Specifically, based on the switch's preset recovery requirements, valid configuration information is filtered to obtain valid configuration information that meets the preset recovery requirements. This valid configuration information is then input into the switch to be recovered. The switch to be recovered then reads the valid configuration information and loads it into memory to complete the configuration recovery of the switch.

[0043] Furthermore, the switch to be restored after configuration recovery is identified as the restored switch, and the recovery completion information from the restored switch is obtained. This recovery completion information is automatically generated status change information from the restored switch. The recovery completion information is then input into the SDN controller to notify the network administrator that the switch to be restored has completed its configuration recovery.

[0044] In addition, embodiments of this application also provide a switch configuration device based on an SDN network, such as... Figure 3 As shown, the SDN-based switch configuration device 300 specifically includes:

[0045] At least one processor 301. And a memory 302 communicatively connected to the at least one processor 301; wherein the memory 302 stores instructions executable by the at least one processor 301, enabling the at least one processor 301 to execute:

[0046] Based on preset time intervals, the switch configuration information is stored accordingly.

[0047] The first record entry of the switch to be recovered is obtained through the SDN controller, and the first configuration information is obtained based on the first record entry;

[0048] Obtain the second configuration information corresponding to the second record entry, and compare the first configuration information with the second configuration information to obtain the valid configuration information; wherein, the second record entry corresponds to the switch to be restored;

[0049] The valid configuration information is transmitted to the switch to be restored in order to complete the configuration restoration of the switch.

[0050] This application provides a switch configuration method, device, and medium based on an SDN network. By storing switch configuration information in the non-volatile configuration memory of the SDN controller, and distinguishing configuration information from different switches at different times in a database, the SDN controller can view and compare configuration information from different switches at different times, selecting the most reasonable and valid configuration information. This effectively solves the problem of insufficient storage space for configuration information and provides selectivity for configuration recovery, enabling configuration recovery without restarting the switch. This avoids the risk of data mismatch caused by restarting the switch and provides a reference for switch configuration recovery, eliminating the possibility of errors caused by simply restoring the configuration to the previous time slot.

[0051] The various embodiments in this application are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the device and medium embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the description of the method embodiments.

[0052] The devices and media provided in this application are one-to-one with the methods. Therefore, the devices and media also have similar beneficial technical effects as their corresponding methods. Since the beneficial technical effects of the methods have been described in detail above, the beneficial technical effects of the devices and media will not be repeated here.

[0053] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0054] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0055] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0056] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0057] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0058] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0059] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0060] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0061] The above description is merely an embodiment of this application and is not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.

Claims

1. A switch configuration method based on SDN network, characterized in that, The method includes: Based on preset time intervals, the switch configuration information is stored accordingly. The switch IP address and configuration time corresponding to the configuration information are obtained through the SDN controller. The switch IP address and the configuration time are marked with the storage path corresponding to the configuration information, and identification information is constructed based on the information after the same marking. According to the database in the SDN controller, the identification information and the storage path are recorded accordingly, and data record entries in the database are constructed using the recorded identification information and their corresponding storage paths; The SDN controller obtains the first record entry of the switch to be restored, and based on the first record entry, obtains the first configuration information, specifically including: The SDN controller obtains the data record entries corresponding to the switch to be restored. The first entry information in the data record entry is determined as the first record entry; wherein, the first record entry includes at least the switch's identification information and the storage path; Based on the storage path corresponding to the first record entry, read the configuration information under the storage path, and determine the read configuration information as the first configuration information of the switch to be restored; Obtain the second configuration information corresponding to the second record entry, and compare the first configuration information with the second configuration information to obtain valid configuration information; wherein, the second record entry corresponds to the first record entry, specifically including: Obtain the second entry information from the data record entry corresponding to the switch to be restored, and determine the second entry information as the second record entry; Based on the storage path corresponding to the second record entry, read the configuration information under the storage path, and determine the configuration information as the second configuration information of the switch to be restored; The SDN controller compares the first configuration information and the second configuration information of the switch to be restored to obtain a configuration difference value; wherein, the difference comparison includes at least the comparison of relevant parameters in the configuration information and the comparison of relevant management VLANs. Based on the configuration difference value, the configuration information corresponding to other record entries in the data record entry is filtered to obtain the valid configuration information; The valid configuration information is transmitted to the switch to be restored in order to complete the configuration restoration of the switch to be restored.

2. The switch configuration method based on SDN network according to claim 1, characterized in that, Based on preset time intervals, the switch configuration information is stored accordingly, specifically including: Based on a preset time interval, the configuration information of several switches is obtained through the SDN controller; wherein the SDN controller and several switches are interconnected. The configuration information is read from the configuration memory in the SDN controller, and the storage path of the configuration information is determined. According to the storage path, the configuration information is stored in the corresponding file of the configuration storage.

3. The switch configuration method based on SDN network according to claim 1, characterized in that, Based on the configuration difference value, the configuration information corresponding to other record entries in the data record entry is filtered to obtain the valid configuration information, specifically including: The configuration difference value is compared with a first preset threshold. If the configuration difference value is less than or equal to the first preset threshold, then the first configuration information and the second configuration information are the valid configuration information; If the configuration difference value is greater than the first preset threshold, then the first configuration information and the second configuration information are invalid configuration information, and the remaining entry information in the data record entry is re-acquired, and the remaining entry information is determined as the remaining record entry; wherein, the remaining entry information is the entry information other than the first entry information and the second entry information; The remaining configuration information corresponding to the remaining record entries is compared to obtain the configuration difference value of the remaining configuration information. The configuration difference value of the remaining configuration information is compared with the first preset threshold to determine the valid configuration information in the remaining configuration information.

4. The switch configuration method based on SDN network according to claim 1, characterized in that, The valid configuration information is transmitted to the switch to be restored to complete the configuration restoration of the switch, specifically including: Based on the switch's preset recovery requirements, the valid configuration information is filtered to obtain valid configuration information that meets the preset recovery requirements; Input the valid configuration information that meets the preset recovery requirements into the switch to be recovered; The valid configuration information is read from the switch to be restored, and then loaded into memory to complete the configuration restoration of the switch.

5. The switch configuration method based on an SDN network according to claim 4, characterized in that, After transmitting the valid configuration information to the switch to be restored to complete the configuration restoration of the switch, the method further includes: The switch to be restored after configuration recovery is identified as the restored switch, and the recovery completion information in the restored switch is obtained; wherein, the recovery completion information is the status change information automatically generated by the restored switch; The recovery completion information is input into the SDN controller to prompt the network administrator that the switch to be recovered has completed the configuration recovery.

6. A switch configuration device based on an SDN network, 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 to enable the at least one processor to execute a switch configuration method based on an SDN network according to any one of claims 1-5.

7. A non-volatile computer storage medium, characterized in that, The storage medium is a non-volatile computer-readable storage medium that stores at least one program, each program including instructions that, when executed by a terminal, cause the terminal to perform a switch configuration method based on an SDN network according to any one of claims 1-5.