Port configuration updating method, electronic device, storage medium and program product

By coordinating the switches and controllers to determine the list of items to be deleted and added, the port configuration is automatically updated, solving the problem of tedious manual configuration after the terminal location changes and improving the efficiency of configuration updates.

CN122120132APending Publication Date: 2026-05-29RUIJIE NETWORKS CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
RUIJIE NETWORKS CO LTD
Filing Date
2024-11-28
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

After the terminal location changes, existing technologies require manual and tedious port configuration changes, which is inefficient, especially when the terminal location changes frequently.

Method used

When a terminal device connects via a switch, the switch obtains terminal information and its original port configuration. The controller then determines the deletion and addition list and automatically updates the port configuration, reducing manual operation.

Benefits of technology

This eliminates the need for manual configuration when switching access switches on terminal devices, improving the efficiency of port configuration updates and reducing workload.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122120132A_ABST
    Figure CN122120132A_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a port configuration updating method, an electronic device, a storage medium and a program product. The method comprises: receiving terminal information and original port configuration sent by a switch, wherein the terminal information is obtained from a terminal device by the switch when the terminal device is detected to access; determining a port configuration template corresponding to the terminal device according to the terminal information; determining a deletion list and an addition list according to the original port configuration and the port configuration template; and sending the deletion list and the addition list to the switch, so that the switch performs configuration updating by using the deletion list and the addition list. The method solves the problem of complicated port configuration change.
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 port configuration update method, electronic device, storage medium, and program product. Background Technology

[0002] In complex network environments, a terminal may migrate from one location to another for access. Because the new access location is different from the original location, it may be unable to access the network normally, and the protection method for the terminal may also change.

[0003] Currently, in related technologies, manual configuration changes are usually required after the location of the terminal changes.

[0004] However, the inventors discovered that the related technology has at least the following technical problems: in some scenarios, the terminal changes location frequently, and each time the terminal location changes, the port configuration needs to be changed manually, which is a cumbersome process. Summary of the Invention

[0005] This application provides a port configuration update method, electronic device, storage medium, and program product to solve the problem of cumbersome port configuration changes.

[0006] In a first aspect, embodiments of this application provide a port configuration update method applied to a controller, comprising: receiving terminal information and original port configuration sent by a switch, wherein the terminal information is obtained by the switch from the terminal device after detecting the access of the terminal device; determining the port configuration template corresponding to the terminal device based on the terminal information; determining a deletion list and an addition list based on the original port configuration and the port configuration template; and sending the deletion list and the addition list to the switch so that the switch uses the deletion list and the addition list to perform configuration updates.

[0007] In one possible implementation, the deletion list and the addition list are determined based on the original port configuration and the port configuration template, including: converting the original port configuration into a structured port configuration; and determining the deletion list and the addition list based on the structured port configuration and the port configuration template.

[0008] In one possible implementation, the original port configuration contains at least one configuration instruction; accordingly, the original port configuration is converted into a structured port configuration, including: obtaining the first string in the target configuration instruction, where the target configuration instruction is any configuration instruction; and using the regular expression corresponding to the first string to convert the target configuration instruction into a structured instruction.

[0009] In one possible implementation, both the original port configuration and the port configuration template contain at least one configuration instruction. Accordingly, based on the structured port configuration and the port configuration template, a deletion list and an addition list are determined, including: adding configuration instructions that exist in the structured port configuration but not in the port configuration template and belong to the preset configuration management content to a pending deletion list; if there are conflicting configuration instructions in the structured port configuration and the port configuration template, then adding the conflicting configuration instructions in the structured port configuration to the pending deletion list; adding configuration instructions that exist in the port configuration template but not in the structured port configuration to a pending addition list; sorting the configuration instructions in the pending deletion list according to their dependencies to obtain the deletion list; sorting the configuration instructions in the pending addition list according to their dependencies to obtain the addition list; if there are high-priority configuration instructions in the original port configuration, then adding the high-priority configuration instructions to both the deletion list and the addition list, where the high-priority configuration instructions are those with a higher priority than the configuration instructions in the addition list.

[0010] In one possible implementation, before determining the port configuration template corresponding to the terminal device based on the terminal information, the method further includes: receiving a template generation instruction, a binding instruction, and a switch identifier sent by the management terminal, wherein the binding instruction includes terminal information; generating a configuration template corresponding to the template generation instruction; establishing a correspondence between the configuration template and the terminal information; and sending the configuration template to the switch corresponding to the switch identifier so that the switch applies the configuration template.

[0011] In one possible implementation, after sending the deletion list and the addition list to the switch so that the switch can update its configuration using the deletion list and the addition list, the method further includes: generating terminal migration data based on the switches that each terminal device has accessed; and outputting the terminal migration data.

[0012] In one possible implementation, before receiving the terminal information and original port configuration sent by the switch, the method further includes: receiving a reporting instruction sent by the management terminal, wherein the reporting instruction includes a switch identifier; sending a preset terminal information reporting configuration to the target switch corresponding to the switch identifier, so that the target switch adds the terminal information reporting configuration; receiving a preset configuration completion information sent by the switch; and sending the configuration completion information to the management terminal, so that the management terminal outputs the configuration completion information.

[0013] Secondly, embodiments of this application provide a port configuration update method applied to a switch, comprising: if a terminal device is detected to be connected, obtaining terminal information from the terminal device and obtaining the original port configuration; sending the terminal information and the original port configuration to a controller, so that the controller determines the port configuration template corresponding to the terminal device based on the terminal information, and determines a deletion list and an addition list based on the original port configuration and the port configuration template; receiving the deletion list and the addition list sent by the controller; and updating the configuration using the deletion list and the addition list.

[0014] In one possible implementation, before obtaining terminal information from the terminal device and obtaining the original port configuration if a terminal device is detected to be connected, the method further includes: receiving a reporting instruction sent by the controller, wherein the reporting instruction is sent from the management terminal to the controller; configuring the terminal information reporting according to the reporting instruction, and sending the preset configuration completion information to the controller, so that the controller sends the configuration completion information to the management terminal.

[0015] Thirdly, embodiments of this application provide a port configuration update device, comprising: a data receiving module for receiving terminal information and original port configuration sent by a switch, wherein the terminal information is obtained by the switch from the terminal device after detecting the terminal device's access; a template determining module for determining the port configuration template corresponding to the terminal device based on the terminal information; a list determining module for determining a deletion list and an addition list based on the original port configuration and the port configuration template; and a list sending module for sending the deletion list and the addition list to the switch so that the switch uses the deletion list and the addition list for configuration update.

[0016] Fourthly, embodiments of this application provide a port configuration update device, comprising: a data acquisition module, configured to acquire terminal information from the terminal device and acquire the original port configuration if a terminal device is detected to be connected; an information sending module, configured to send the terminal information and the original port configuration to a controller, so that the controller determines the port configuration template corresponding to the terminal device based on the terminal information, and determines a deletion list and an addition list based on the original port configuration and the port configuration template; a list receiving module, configured to receive the deletion list and the addition list sent by the controller; and a configuration update module, configured to perform configuration update using the deletion list and the addition list.

[0017] Fifthly, this application provides an electronic device, including: a memory and a processor; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory, causing the processor to perform the method as described in the first or second aspect.

[0018] In a sixth aspect, this application provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the methods described in the first or second aspect.

[0019] In a seventh aspect, this application provides a computer program product, including a computer program that, when executed by a processor, implements the method as described in the first or second aspect.

[0020] The port configuration update method, electronic device, storage medium, and program product provided in this application receive terminal information and original port configuration sent by the switch to determine that the terminal is connected to the switch. Using the port configuration template corresponding to the terminal information and the original port configuration, a deletion list and an addition list are determined and sent to the switch. The switch then updates the port configuration, enabling the switch to inform the server that a terminal has connected. The server then updates the corresponding port configuration of the switch to the port configuration bound to the terminal device. When the terminal device switches to a different switch, no manual configuration of the switch port is required, reducing the manual operation process of updating the switch port configuration and increasing the efficiency of port configuration updates. Attached Figure Description

[0021] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0022] Figure 1 A schematic diagram illustrating a scenario for the port configuration update method provided in this application;

[0023] Figure 2 A flowchart illustrating the port configuration update method provided in this application embodiment. Figure 1 ;

[0024] Figure 3 A flowchart illustrating the port configuration update method provided in this application embodiment. Figure 2 ;

[0025] Figure 4 A schematic diagram of the interaction flow of the port configuration update method provided in the embodiments of this application;

[0026] Figure 5 Schematic diagram of the port configuration update device provided in this application Figure 1 ;

[0027] Figure 6 Schematic diagram of the port configuration update device provided in this application Figure 2 ;

[0028] Figure 7A schematic diagram of the structure of the electronic device provided in this application.

[0029] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation

[0030] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0031] In complex network environments, terminals may move from one location to another and reconnect to the network. Because the network environment differs between the new and original locations, the terminal may be unable to connect, and its protection measures will need to be adjusted accordingly. However, current technologies often rely on manual configuration changes to handle terminal location changes, a process that is both cumbersome and inefficient.

[0032] To address the aforementioned technical problems, the inventors propose the following technical concept: When a switch detects that a terminal device has been connected, it obtains the terminal device's information and the original port configuration currently used by the switch. The terminal device's information and the original port configuration are then sent to the controller. The controller uses the terminal device's information to find the corresponding configuration template, and uses the configuration template and the original port configuration to determine the addition, deletion, and modification of the configuration. It then creates corresponding deletion lists and addition lists and sends them to the switch, which then performs the corresponding configuration updates.

[0033] This application is applicable to scenarios involving port configuration updates. It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of related data must comply with relevant laws, regulations and standards, and corresponding operation entry points are provided for users to choose to authorize or refuse.

[0034] Figure 1 A schematic diagram illustrating a scenario for the port configuration update method provided in this application. For example... Figure 1 In this scenario, the components include: terminal device 101, switch 102, and controller 103.

[0035] In the specific implementation process, the terminal device 101 may include a wireless network access point (AP), a computer, a server, a tablet, a mobile phone, a PDA, and a laptop, etc., which can input data. Using a wireless network access point as a terminal device increases the application scenarios of this proposal. When the wireless network access point is used as a terminal device, it improves the efficiency of replacing the wireless network access point and reduces the workload in the scenario of replacing the wireless network access point.

[0036] Controller 103 can be a Software Defined Network (SDN) controller. An SDN controller is a logical component that can be deployed on a standalone server or on devices such as switches. It can be implemented using a single server or a cluster of multiple servers with more powerful processing capabilities and higher security. Where possible, it can also be replaced by a computer or laptop with strong computing power.

[0037] The connection between terminal device 101 and switch 102, and between switch 102 and SDN controller 103, can be either wired or wireless.

[0038] Switch 102 is used to obtain terminal information of terminal device 101 after connecting to terminal device 101, and send the terminal information to SDN controller 103. SDN controller 103 obtains the original port configuration of switch 102, and finds the configuration template corresponding to the terminal information. Based on the configuration template and the original port configuration, it determines the configuration to be deleted and the configuration to be added, and sends the corresponding list to switch 102, so that switch 102 can complete the configuration update.

[0039] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will be described below with reference to the accompanying drawings.

[0040] Figure 2 A flowchart illustrating the port configuration update method provided in this application embodiment. Figure 1 The execution entity of this application embodiment can be Figure 1 The controller 103 in this embodiment can also be a computer and / or a mobile phone, etc., and this embodiment does not impose any particular limitation on it. Figure 2 As shown, the method includes:

[0041] S201: Receive terminal information and original port configuration sent by the switch. The terminal information is obtained by the switch from the terminal device when it detects the terminal device accessing the network.

[0042] In this step, the terminal information and original port configuration can be sent by the switch in the form of messages, data packets, or other formats.

[0043] The terminal information may include the terminal's Media Access Control Address (MAC), IP address, hostname, etc. The access port identifier may be a port number, a switch identifier combined with the port number, etc.

[0044] S202: Determine the port configuration template corresponding to the terminal device based on the terminal information.

[0045] This step may include finding the correspondence between preset terminal information and configuration templates to obtain the port configuration template corresponding to the terminal device.

[0046] The correspondence between terminal information and configuration templates can be pre-configured by staff.

[0047] S203: Determine the deletion list and addition list based on the original port configuration and port configuration template.

[0048] This step may include comparing the original port configuration and the port configuration template to obtain the configuration instructions that need to be deleted from the original port configuration and the configuration instructions that need to be added from the port configuration template. The configuration instructions to be deleted are then combined to form a deletion list, and the configuration instructions to be added are written to an addition list. Alternatively, it may involve writing all original port configurations to the deletion list and writing the configuration information from the port configuration template to the addition list.

[0049] S204: Send the deletion list and the addition list to the switch so that the switch can use the deletion list and the addition list to update its configuration.

[0050] This step may include writing the deletion list and the addition list into a message or data packet and sending it to the switch; or it may include sending the deletion list and the addition list to the switch sequentially using a stack data format, so that the switch first deletes the configuration content that needs to be deleted and then adds other configuration content.

[0051] As can be seen from the description of the above embodiments, the embodiments of this disclosure receive terminal information and original port configuration sent by the switch, know that the terminal is connected to the switch, use the port configuration template corresponding to the terminal information and the original port configuration to determine the deletion list and the addition list, and send the deletion list and the addition list to the switch, so that the switch updates the port configuration. This realizes that the switch informs the server that a terminal has been connected, and the server updates the corresponding port configuration of the switch to the port configuration bound to the terminal device. When the terminal device switches the switch it is connected to, there is no need to manually configure the switch port, which reduces the manual operation process of updating the switch port configuration and increases the efficiency of port configuration update.

[0052] In one possible implementation, before receiving the terminal information and original port configuration sent by the switch in step S201 above, the following may also be included:

[0053] S250: Receives the access port identifier sent by the switch, and sends configuration query information to the switch based on the access port identifier, so that the switch can read the original port configuration based on the configuration query information. The access port identifier may include the identifier of the port to which the terminal device is connected.

[0054] The configuration query information can be preset or generated based on the access port identifier.

[0055] As can be seen from the description of the above embodiments, the embodiments of this disclosure receive the access port identifier sent by the switch and send the corresponding configuration query information to the switch, thereby querying the corresponding original port configuration, realizing the server actively requesting the original port configuration, and increasing the flexibility of port configuration acquisition.

[0056] In one possible implementation, step S203 above involves determining the deletion list and the addition list based on the original port configuration and the port configuration template, including steps S2031 and S2032.

[0057] S2031: Convert the original port configuration to a structured port configuration.

[0058] This step may include using newline character differential to obtain a list of single instructions, using pre-written regular expressions to traverse and match the instruction list, and converting the matched instructions into structured configuration data corresponding to the regular expressions.

[0059] The structured port configuration is a standardized port configuration that conforms to a preset format. By converting the original port configuration into a structured port configuration, it facilitates comparison and modification of subsequent configurations.

[0060] S2032: Determine the deletion list and addition list based on the structured port configuration and port configuration template.

[0061] This step may include comparing the configuration instructions in the structured port configuration and the port configuration template, identifying the intersection of the structured port configuration and the port configuration template as content that does not need to be changed, adding the configuration instructions that exist in the structured port configuration but do not belong to the intersection to the add list, and adding the configuration instructions that exist in the port configuration template but do not belong to the intersection to the delete list; or it may include adding the configuration instructions that belong to the structured port configuration but do not belong to the port configuration template to the delete list, and adding the configuration instructions that belong to the port configuration template but do not belong to the structured port configuration to the add list.

[0062] As can be seen from the description of the above embodiments, the embodiments of this disclosure convert the original port configuration into a structured port configuration, combine the structured port configuration and the port configuration template, determine the deletion list and the addition list, thereby standardizing the non-standard configuration. After standardization, a comparison is performed, and the determination of adding and deleting configurations is automatically completed, reducing the workload of staff.

[0063] In one possible implementation, the original port configuration contains at least one configuration instruction.

[0064] Accordingly, in step S2031 above, the original port configuration is converted into a structured port configuration, including steps S511 and S512.

[0065] S511: Retrieves the first string in the target configuration instruction, where the target configuration instruction is any configuration instruction.

[0066] This step may include splitting the target configuration instruction based on spaces or specific characters to obtain at least one string, or obtaining a list, taking the first string in the list as the first string, or taking the first element in the list as the first string.

[0067] S512: Use the regular expression corresponding to the first string to convert the target configuration instructions into structured instructions.

[0068] This step may include finding the correspondence between the string and the regular expression based on the first string to obtain at least one target regular expression, and using the target regular expression to convert the target configuration instruction into a structured instruction.

[0069] The correspondence between strings and regular expressions can be pre-written by staff and stored in a server or a storage unit or database connected to the server in a table, key-value pair or other format.

[0070] For example, if the first string is "rldp", then the corresponding relationship is found to obtain the target regular expressions A and B corresponding to the string "rldp". The target configuration instruction is transformed using target regular expressions A and B respectively, and the target configuration instruction is transformed into a structured instruction. During the transformation process, as long as one target regular expression can transform the target configuration instruction into a structured instruction, it is not necessary to use other target regular expressions for transformation.

[0071] As can be seen from the description of the above embodiments, the embodiments of this disclosure convert the target configuration instruction into a structured instruction by using the regular expression corresponding to the first string of the target configuration instruction, thereby reducing the number of regular expressions that need to be traversed, reducing the consumption of computing resources, and reducing the time for updating the switch port configuration.

[0072] In one possible implementation, both the original port configuration and the port configuration template contain at least one configuration instruction.

[0073] Accordingly, step S2032 above determines the deletion list and the addition list based on the structured port configuration and the port configuration template, including steps S521 to S526.

[0074] S521: Add configuration instructions that exist in the structured port configuration, but not in the port configuration template, and belong to the preset configuration management content, to the list to be sorted and deleted.

[0075] In this step, for example, if the structured port configuration includes configuration instructions A, B, C, D, E, and F, and the port configuration template includes configuration instructions C, D, and E, and configuration instruction F is not a configuration instruction belonging to the preset configuration management content, then configuration instructions A and B will be added to the pending deletion list. As another example, if the structured port configuration includes configuration instructions F, G, H, I, J, and K, and the port configuration template includes configuration instructions F, G, and H, and configuration instructions I, J, and K are all configuration instructions belonging to the preset configuration management content, then configuration instructions I, J, and K will be added to the pending deletion list.

[0076] S522: If there are conflicting configuration instructions in the structured port configuration and port configuration template, the conflicting configuration instructions in the structured port configuration will be added to the list to be sorted and deleted.

[0077] In this step, it is determined whether there are conflicting configuration instructions in the structured port configuration and the port configuration template. This can be done by finding the corresponding pre-defined conflict instructions based on the target configuration instructions in the structured port configuration, then checking the port configuration template for conflict instructions. If a conflict is found, the target configuration instruction is identified as a conflicting instruction and added to the list to be sorted and deleted. Alternatively, it can be done by finding the corresponding pre-defined conflict instructions based on the target configuration instructions in the port configuration template, then checking the structured port configuration for conflict instructions. If a conflict is found, the target configuration instruction is identified as a conflicting instruction and added to the list to be sorted and deleted.

[0078] The correspondence between conflicting instructions can be pre-defined by the staff.

[0079] S523: Add configuration directives that exist in the port configuration template but not in the structured port configuration to the list to be sorted.

[0080] This step is similar to step S522 above, and will not be repeated here.

[0081] S524: Sort the configuration instructions in the unsorted deletion list according to their dependencies to obtain the deletion list.

[0082] In this step, the dependencies of the configuration instructions in the list to be sorted for deletion can be obtained by consulting a dependency table pre-compiled by the staff. Sorting the configuration instructions in the list can include adding a sorting field to the configuration instructions. This sorting field has a default sorting value. If any configuration instruction depends on other configuration instructions, the sorting value of that instruction is adjusted to be less than the sorting value of the dependent instruction, and the deletion list is then sorted according to the sorting value.

[0083] S525: Sort the configuration instructions in the unsorted add list according to their dependencies to obtain the add list.

[0084] This step is similar to step S525 above, and will not be repeated here.

[0085] S526: If there are high-priority configuration instructions in the original port configuration, the high-priority configuration instructions will be written into the deletion list and the addition list. The high-priority configuration instructions are those with a higher priority than the configuration instructions in the addition list.

[0086] In this step, to determine if there are high-priority configuration commands in the original port configuration, we can look up the preset priority lookup table based on the original port configuration and the configuration commands in the add list to obtain the priority of each configuration command.

[0087] For example, if the original port configuration includes configuration commands A, B, C, and D with priorities of 1, 1, 0, and 2 respectively, and the add list includes configuration commands E, F, G, and H with priorities of 0, 0, 1, and 0 respectively, then configuration command D has a higher priority than the configuration commands in the add list. Therefore, configuration command D is determined as a high-priority configuration command and is added to both the delete list and the add list.

[0088] As can be seen from the description of the above embodiments, the embodiments of this disclosure write redundant configuration instructions in the structured port configuration and configuration instructions that conflict with configuration instructions in the port configuration template into a list to be sorted and deleted. The contents that need to be added to the switch port by the port configuration template are added into a list to be sorted and added. After sorting the list to be sorted and the list to be sorted according to the dependency relationship, the configuration instructions with higher priority in the original port configuration are written into the deletion list. This realizes that when the switch uses the deletion list and the addition list to update the configuration, the high-priority configuration instructions are deleted first, and then the configuration instructions are added according to the dependency relationship, so that the switch port configuration is consistent with the template.

[0089] In one possible implementation, before step S202 determines the port configuration template corresponding to the terminal device based on the terminal information, the method further includes:

[0090] S220: Receives template generation instructions, binding instructions, and switch identifiers sent by the management terminal, wherein the binding instructions include terminal information.

[0091] In this step, the template generation instructions, binding instructions, and switch identifiers can be entered by the staff. Staff can enter this information through the management terminal accessing the configuration management page or the configuration management software.

[0092] S221: Generate the configuration template corresponding to the template generation command.

[0093] This step may include combining parameters from the template generation instruction to obtain a configuration template.

[0094] S222: Establish the correspondence between configuration templates and terminal information.

[0095] This step may include writing the configuration template and terminal information into a corresponding relationship table or a corresponding relationship key-value pair.

[0096] S223: Send the configuration template to the switch corresponding to the switch identifier so that the switch applies the configuration template.

[0097] In this step, the configuration template can be sent directly to the switch corresponding to the switch identifier using message, data packet, or other formats. Alternatively, the configuration can be distributed to the switch using the methods described in steps S203 to S204 above.

[0098] As can be seen from the description of the above embodiments, the present disclosure embodiments achieve manual binding of configuration by having staff manually set configuration templates on the management terminal and bind the configuration templates to the terminal information.

[0099] In one possible implementation, after step S204 above, where the deletion list and the addition list are sent to the switch so that the switch can update its configuration using the deletion list and the addition list, the method further includes:

[0100] S230: Generate terminal migration data based on the switches that each terminal device has accessed.

[0101] This step may include using the identifiers of the terminal device and the switches it has accessed as terminal migration data, or it may include counting the number of times the terminal device has changed the switches it accesses as the terminal migration count, and using the terminal migration count as terminal migration data, or it may include using the identifier of the terminal device with the most migrations as terminal migration data.

[0102] S231: Output terminal migration data.

[0103] This step may include displaying the terminal migration data, or it may include sending the terminal migration data to a management terminal so that the management terminal outputs the terminal migration data.

[0104] As can be seen from the description of the above embodiments, the embodiments of this disclosure generate terminal migration data by recording the switches that each terminal device has accessed, and output the terminal migration data to visualize the terminal migration situation.

[0105] In one possible implementation, before receiving the terminal information and original port configuration sent by the switch in step S201, the method further includes steps S240 to S243.

[0106] S240: Receives a reporting instruction sent by the management terminal, wherein the reporting instruction includes the switch identifier.

[0107] In this step, receiving reporting instructions can be achieved by receiving messages, data packets, etc.

[0108] S241: Send the preset terminal information reporting configuration to the target switch corresponding to the switch identifier, so that the target switch can add the terminal information reporting configuration.

[0109] In this step, the information reporting configuration enables the switch to perform steps such as obtaining terminal information, obtaining access port identifier, sending terminal information and access port identifier, and updating configuration using deletion and addition lists when a terminal device is connected.

[0110] S242: Receive the preset configuration completion information sent by the switch.

[0111] This step is similar to step S240 above, and will not be repeated here.

[0112] S243: Send the configuration completion information to the management terminal so that the management terminal outputs the configuration completion information.

[0113] This step may include sending the configuration completion information to the management terminal in the form of a message, data packet, string, or other format, so that the management terminal can display or voice output the configuration completion information.

[0114] As can be seen from the description of the above embodiments, the embodiments of this disclosure receive the reporting instruction sent by the management terminal, send the terminal information reporting configuration to the corresponding switch, complete the configuration of the corresponding switch, and enable the switch to automatically report the terminal information of the access terminal device and automatically update the configuration according to the add list and delete list.

[0115] Figure 3 A flowchart illustrating the port configuration update method provided in this application embodiment. Figure 2 The execution entity of this application embodiment can be Figure 1 Switch 102 in the middle. For example... Figure 2 As shown, the method includes:

[0116] S301: If a terminal device is detected to be connected, obtain terminal information from the terminal device and obtain the original port configuration.

[0117] This step may include determining that a terminal device has been detected as connected if an Address Resolution Protocol (ARP) request or other connection request is received from the terminal device. Obtaining terminal information from the terminal device may include sending a request to the terminal device to obtain its terminal information. Obtaining the original port configuration may include reading the original configuration of the port connected to the terminal device as the original port configuration.

[0118] S302: Send the terminal information and original port configuration to the controller so that the controller can determine the port configuration template corresponding to the terminal device based on the terminal information, and determine the deletion list and addition list based on the original port configuration and the port configuration template.

[0119] In this step, terminal information and access port identifiers can be sent in formats such as messages, data packets, or strings.

[0120] Specifically, before sending the original port configuration, this step may further include: receiving configuration query information sent by the controller based on the access port identifier; and reading the original port configuration based on the configuration query information. The configuration query information may include a query command and a port number; by obtaining the port configuration corresponding to the port number, the original port configuration is obtained.

[0121] S303: Receives deletion and addition lists sent by the controller.

[0122] In this step, the deletion list and the addition list can be received directly by receiving the list or by receiving messages and data packets.

[0123] S304: Configuration updates are performed using delete and add lists.

[0124] This step may include deleting configuration items from the deletion list and adding configuration items from the addition list to complete the configuration update; or it may include executing configuration commands from the deletion list and configuration commands from the addition list to complete the configuration update.

[0125] As can be seen from the description of the above embodiments, the embodiments of this disclosure obtain terminal information and original port configuration after detecting the access of a terminal device, send them to the controller, the controller determines the deletion list and the addition list, receive the deletion list and the addition list sent by the controller, and use the deletion list and the addition list to update the configuration, so that when the terminal device accesses the switch, the switch actively reports the access status of the terminal device and port-related information, and the controller controls the deletion and addition of configuration content to complete the automatic update of the switch configuration.

[0126] In one possible implementation, before step S301 above, which detects a terminal device accessing the network and obtains terminal information and original port configuration from the terminal device, the following method is also included:

[0127] S3011: Receives a reporting instruction sent by the controller, where the reporting instruction is sent from the management terminal to the controller.

[0128] In this step, the reporting instruction can be implemented by receiving data packets, messages, etc.

[0129] S3012: Configure terminal information reporting according to the reporting instruction, and send the preset configuration completion information to the controller so that the controller can send the configuration completion information to the management terminal.

[0130] In this step, the reporting instruction may include reporting configuration parameters. The reporting configuration in the reporting instruction is added to the original configuration to complete the information reporting configuration. The reporting instruction may also include a deletion list and an addition list similar to those in step S304. The terminal information reporting configuration is performed using the configuration instructions in the deletion list and the addition list.

[0131] As can be seen from the description of the above embodiments, the embodiments of this disclosure receive a reporting instruction, configure the terminal information reporting according to the reporting instruction, and provide feedback after the configuration is completed, thereby completing the pre-configuration before the terminal device accesses, and preparing for the reporting of terminal information and original port information when the terminal device accesses in the future.

[0132] Figure 4 This is a schematic diagram illustrating the interaction flow of the port configuration update method provided in this application embodiment. For example... Figure 4 As shown, the interaction flow of the port configuration update method includes:

[0133] S401: The switch detects the access of a terminal device, obtains the access port identifier, and retrieves terminal information from the terminal device.

[0134] S402: The switch sends the access port identifier and terminal information to the controller.

[0135] S403: The controller determines the port configuration template corresponding to the terminal device based on the terminal information.

[0136] S404: The controller sends configuration query information to the switch based on the access port identifier.

[0137] S405: The switch queries information based on the configuration and reads the original port configuration.

[0138] S406: The switch sends the original port configuration to the controller.

[0139] S407: The controller determines the deletion list and the addition list based on the original port configuration and the port configuration template.

[0140] S408: The controller sends the delete list and add list to the switch.

[0141] S409: The switch uses delete and add lists for configuration updates.

[0142] Figure 5 Schematic diagram of the port configuration update device provided in this application Figure 1 .like Figure 5 As shown, the port configuration update device 500 provided in this embodiment includes: a data acquisition module 501, a template determination module 502, a list determination module 503, and a list sending module 504.

[0143] The data acquisition module 501 is used to receive terminal information and original port configuration sent by the switch. The terminal information is obtained by the switch from the terminal device when it detects the terminal device access.

[0144] Template determination module 502 is used to determine the port configuration template corresponding to the terminal device based on the terminal information.

[0145] The list determination module 503 is used to determine the deletion list and the addition list based on the original port configuration and the port configuration template.

[0146] The list sending module 504 is used to send the deletion list and the addition list to the switch so that the switch can use the deletion list and the addition list to update its configuration.

[0147] The apparatus provided in this embodiment can be used to execute the technical solutions of the above method embodiments. Its implementation principle and technical effects are similar, and will not be described again here.

[0148] In one possible implementation, the list determination module 503 is specifically used to convert the original port configuration into a structured port configuration. Based on the structured port configuration and the port configuration template, it determines the deletion list and the addition list.

[0149] The apparatus provided in this embodiment can be used to execute the technical solutions of the above method embodiments. Its implementation principle and technical effects are similar, and will not be described again here.

[0150] In one possible implementation, the original port configuration contains at least one configuration instruction. The list determination module 503 is specifically used to obtain the first string in the target configuration instruction, where the target configuration instruction is any configuration instruction. The target configuration instruction is then converted into a structured instruction using the regular expression corresponding to the first string.

[0151] The apparatus provided in this embodiment can be used to execute the technical solutions of the above method embodiments. Its implementation principle and technical effects are similar, and will not be described again here.

[0152] In one possible implementation, both the original port configuration and the port configuration template contain at least one configuration instruction. The list determination module 503 is specifically used to write configuration instructions that exist in the structured port configuration but not in the port configuration template, and belong to the preset configuration management content, into a pending deletion list. If there are conflicting configuration instructions in the structured port configuration and the port configuration template, the conflicting configuration instructions in the structured port configuration are written into the pending deletion list. Configuration instructions that exist in the port configuration template but not in the structured port configuration are written into a pending addition list. Based on the dependencies of the configuration instructions in the pending deletion list, the configuration instructions in the pending deletion list are sorted to obtain the deletion list. Based on the dependencies of the configuration instructions in the pending addition list, the configuration instructions in the pending addition list are sorted to obtain the addition list. If there are high-priority configuration instructions in the original port configuration, the high-priority configuration instructions are written into both the deletion list and the addition list, where the high-priority configuration instructions are those with a higher priority than the configuration instructions in the addition list.

[0153] The apparatus provided in this embodiment can be used to execute the technical solutions of the above method embodiments. Its implementation principle and technical effects are similar, and will not be described again here.

[0154] In one possible implementation, the port configuration update device 500 further includes a configuration binding module 505.

[0155] The configuration binding module 505 receives template generation instructions, binding instructions, and switch identifiers from the management terminal, where the binding instructions include terminal information. It generates a configuration template corresponding to the template generation instructions, establishes the mapping between the configuration template and the terminal information, and sends the configuration template to the switch corresponding to the switch identifier so that the switch applies the configuration template.

[0156] The apparatus provided in this embodiment can be used to execute the technical solutions of the above method embodiments. Its implementation principle and technical effects are similar, and will not be described again here.

[0157] In one possible implementation, the port configuration update device 500 further includes a migration record module 506.

[0158] The migration record module 506 is used to generate terminal migration data based on the switches that each terminal device has accessed. It then outputs the terminal migration data.

[0159] The apparatus provided in this embodiment can be used to execute the technical solutions of the above method embodiments. Its implementation principle and technical effects are similar, and will not be described again here.

[0160] In one possible implementation, the port configuration update device 500 further includes a pre-configuration module 507.

[0161] The pre-configuration module 507 receives a reporting instruction from the management terminal, which includes a switch identifier. It then sends a pre-defined terminal information reporting configuration to the target switch corresponding to the switch identifier, enabling the target switch to add the terminal information reporting configuration. Finally, it receives a pre-defined configuration completion message from the switch and sends this message to the management terminal, causing the management terminal to output a configuration completion message.

[0162] The apparatus provided in this embodiment can be used to execute the technical solutions of the above method embodiments. Its implementation principle and technical effects are similar, and will not be described again here.

[0163] Figure 6 Schematic diagram of the port configuration update device provided in this application Figure 2 .like Figure 6 As shown, the port configuration update device 600 includes: an information receiving module 601, an information sending module 602, a list receiving module 603, and a configuration update module 604.

[0164] The information receiving module 601 is used to obtain terminal information from the terminal device and obtain the original port configuration if the terminal device is detected to be connected.

[0165] The information sending module 602 is used to send terminal information and original port configuration to the controller, so that the controller can determine the port configuration template corresponding to the terminal device based on the terminal information, and determine the deletion list and addition list based on the original port configuration and the port configuration template.

[0166] The list receiving module 603 is used to receive the delete list and add list sent by the controller.

[0167] Configuration update module 604 is used to perform configuration updates using delete and add lists.

[0168] The apparatus provided in this embodiment can be used to execute the technical solutions of the above method embodiments. Its implementation principle and technical effects are similar, and will not be described again here.

[0169] In one possible implementation, the port configuration update device 600 further includes a configuration reporting module 605.

[0170] The configuration reporting module 605 is used to receive reporting instructions sent by the controller, whereby the reporting instructions are sent from the management terminal to the controller. Based on the reporting instructions, it performs terminal information reporting configuration and sends preset configuration completion information to the controller, so that the controller can then send the configuration completion information to the management terminal.

[0171] To implement the above embodiments, this application also provides an electronic device.

[0172] refer to Figure 7 The diagram illustrates a structural schematic of an electronic device 700 suitable for implementing embodiments of this application. The electronic device 700 can be a terminal device or a server. The terminal device can include, but is not limited to, mobile terminals such as mobile phones, laptops, digital radio receivers, personal digital assistants (PDAs), portable Android devices (PADs), portable media players (PMPs), and in-vehicle terminals (e.g., in-vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers. Figure 7 The electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.

[0173] like Figure 7 As shown, the electronic device 700 may include a processor (e.g., a central processing unit, a graphics processing unit, etc.) 701 and a memory 702 communicatively connected to the processor. The processor can perform various appropriate actions and processes based on programs stored in the memory 702, computer-executed instructions, or programs loaded from storage device 708 into random access memory (RAM) 703, implementing the port configuration update method in any of the above embodiments. The memory may be a read-only memory (ROM). The RAM 703 also stores various programs and data required for the operation of the electronic device 700. The processing device 701, the memory 702, and the RAM 703 are interconnected via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0174] Typically, the following devices can be connected to I / O interface 705: input devices 706 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 707 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 708 including, for example, magnetic tapes, hard disks, etc.; and communication devices 709. Communication device 709 allows electronic device 700 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 7An electronic device 700 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.

[0175] Specifically, according to embodiments of this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable storage medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication device 709, or installed from storage device 708, or installed from memory 702. When the computer program is executed by processing device 701, it performs the functions defined in the methods of embodiments of this application.

[0176] It should be noted that the computer-readable storage medium described above in this application can be a computer-readable signal medium, a computer storage medium, or any combination of the two. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this application, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this application, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable storage medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable storage medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.

[0177] The aforementioned computer-readable storage medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.

[0178] The aforementioned computer-readable storage medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to perform the method shown in the above embodiments.

[0179] Computer program code for performing the operations of this application can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, as well as conventional procedural programming languages ​​such as "C" or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0180] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0181] The modules described in the embodiments of this application can be implemented in software or in hardware. The names of the units do not necessarily limit the module itself; for example, a configuration reading module can also be described as a "raw port configuration reading module".

[0182] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: field-programmable gate arrays, application-specific integrated circuits (ASICs), application-specific standard products (ASICs), systems-on-a-chip (SoCs), complex programmable logic devices, and so on.

[0183] This application also provides a computer-readable storage medium storing computer-executable instructions. When the processor executes the computer-executable instructions, it implements the technical solution of the port configuration update method in any of the above embodiments. Its implementation principle and beneficial effects are similar to those of the port configuration update method. Please refer to the implementation principle and beneficial effects of the port configuration update method. It will not be repeated here.

[0184] In the context of this application, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. Machine-readable media can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory, read-only memory, erasable programmable read-only memory, optical fibers, portable compact disk read-only memory, optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0185] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the technical solution of the port configuration update method in any of the above embodiments. Its implementation principle and beneficial effects are similar to those of the port configuration update method, and can be found in the implementation principle and beneficial effects of the port configuration update method, which will not be repeated here.

[0186] The above description is merely a preferred embodiment of this application and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of disclosure in this application is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features with similar functions disclosed in this application.

[0187] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.

[0188] Finally, it should be noted that other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein, and is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.

Claims

1. A method for updating port configuration, characterized in that, Applied to controllers, including: The switch receives terminal information and original port configuration sent by the switch, wherein the terminal information is obtained by the switch from the terminal device when the terminal device is detected to be connected; Based on the terminal information, determine the port configuration template corresponding to the terminal device; Based on the original port configuration and the port configuration template, determine the deletion list and the addition list; The deletion list and the addition list are sent to the switch so that the switch can use the deletion list and the addition list to perform configuration updates.

2. The method according to claim 1, characterized in that, The step of determining the deletion list and the addition list based on the original port configuration and the port configuration template includes: Convert the original port configuration into a structured port configuration; Based on the structured port configuration and the port configuration template, determine the deletion list and the addition list.

3. The method according to claim 2, characterized in that, The original port configuration contains at least one configuration instruction; Accordingly, converting the original port configuration into a structured port configuration includes: Retrieve the first string in the target configuration instruction, where the target configuration instruction is any configuration instruction; The target configuration instruction is converted into a structured instruction using the regular expression corresponding to the first string.

4. The method according to claim 2, characterized in that, Both the original port configuration and the port configuration template contain at least one configuration instruction. Accordingly, determining the deletion list and the addition list based on the structured port configuration and the port configuration template includes: Configuration instructions that exist in the structured port configuration, do not exist in the port configuration template, and belong to the preset configuration management content are written into the list to be sorted and deleted. If there are conflicting configuration instructions in the structured port configuration and the port configuration template, the conflicting configuration instructions in the structured port configuration shall be written into the list to be sorted and deleted. The configuration instructions that exist in the port configuration template but not in the structured port configuration are written into the list to be sorted and added. Based on the dependencies of the configuration instructions in the unsorted deletion list, the configuration instructions in the unsorted deletion list are sorted to obtain the deletion list; Based on the dependencies of the configuration instructions in the unsorted add list, the configuration instructions in the unsorted add list are sorted to obtain the add list; If there is a high-priority configuration instruction in the original port configuration, the high-priority configuration instruction is written into the deletion list and the addition list, wherein the high-priority configuration instruction is a configuration instruction with a higher priority than the configuration instruction in the addition list.

5. The method according to any one of claims 1 to 4, characterized in that, Before determining the port configuration template corresponding to the terminal device based on the terminal information, the method further includes: Receive template generation instructions, binding instructions, and switch identifiers sent by the management terminal, wherein the binding instructions include the terminal information; Generate the configuration template corresponding to the template generation instruction; Establish the correspondence between the configuration template and the terminal information; The configuration template is sent to the switch corresponding to the switch identifier so that the switch applies the configuration template.

6. The method according to any one of claims 1 to 4, characterized in that, After sending the deletion list and the addition list to the switch so that the switch can update its configuration using the deletion list and the addition list, the method further includes: Based on the switches that each terminal device has accessed, generate terminal migration data; Output the terminal migration data.

7. The method according to any one of claims 1 to 4, characterized in that, Before receiving the terminal information and original port configuration sent by the switch, the following is also included: Receive a reporting instruction sent by the management terminal, wherein the reporting instruction includes a switch identifier; The preset terminal information reporting configuration is sent to the target switch corresponding to the switch identifier, so that the target switch adds the terminal information reporting configuration; Receive the preset configuration completion information sent by the switch; The configuration completion information is sent to the management terminal so that the management terminal outputs the configuration completion information.

8. A method for updating port configuration, characterized in that, Applied to switches, including: If a terminal device is detected to be connected, terminal information is obtained from the terminal device, and the original port configuration is also obtained. The terminal information and original port configuration are sent to the controller, so that the controller can determine the port configuration template corresponding to the terminal device based on the terminal information, and determine the deletion list and the addition list based on the original port configuration and the port configuration template; Receive the deletion list and the addition list sent by the controller; The configuration is updated using the deletion list and the addition list.

9. The method according to claim 8, characterized in that, Before obtaining terminal information from the terminal device and the original port configuration if a terminal device is detected to be connected, the method further includes: Receive a reporting instruction sent by the controller, wherein the reporting instruction is sent from the management terminal to the controller; The terminal information reporting configuration is performed according to the reporting instruction, and the preset configuration completion information is sent to the controller, so that the controller sends the configuration completion information to the management terminal.

10. A port configuration update device, characterized in that, include: The data receiving module is used to receive terminal information and original port configuration sent by the switch, wherein the terminal information is obtained by the switch from the terminal device when the terminal device is detected to be connected; The template determination module is used to determine the port configuration template corresponding to the terminal device based on the terminal information. The list determination module is used to determine the deletion list and the addition list based on the original port configuration and the port configuration template; The list sending module is used to send the deletion list and the addition list to the switch so that the switch can use the deletion list and the addition list to perform configuration updates.

11. A port configuration update device, characterized in that, include: The data acquisition module is used to acquire terminal information from the terminal device and obtain the original port configuration if the terminal device is detected to be connected. The information sending module is used to send the terminal information and the original port configuration to the controller, so that the controller can determine the port configuration template corresponding to the terminal device based on the terminal information, and determine the deletion list and the addition list based on the original port configuration and the port configuration template; A list receiving module is used to receive the deletion list and the addition list sent by the controller; The configuration update module is used to perform configuration updates using the deletion list and the addition list.

12. An electronic device, characterized in that, include: Memory, processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory, causing the processor to perform the method as claimed in claims 1 to 7 or any one of claims 9 and 10.

13. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as claimed in any one of claims 1 to 7 or 9 and 10.

14. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method of any one of claims 1 to 7 or claims 9 and 10.