Resource configuration method, system and storage medium for switch

By generating physical topology diagrams and comprehensive performance indicators to automatically generate configuration schemes, the problem of lack of global perspective in switch resource configuration is solved, and efficient and flexible network optimization is achieved.

CN119561830BActive Publication Date: 2026-01-02LONGYAN POWER SUPPLY COMPANY STATE GRID FUJIAN ELECTRIC POWER
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411596381.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-11
Publication Date
2026-01-02
Estimated Expiration
2044-11-11

AI Technical Summary

Technical Problem

Existing technologies lack a global perspective in switch resource configuration, making it impossible to achieve optimal configuration for the entire network. Furthermore, they rely on fixed configuration rules, lacking flexibility and adaptability.

Method used

By acquiring physical information between switches, a physical topology map is generated. Taking into account the performance indicators and weighting coefficients of the switches, a configuration scheme is automatically generated, and the communication paths between switches are automatically configured.

Benefits of technology

It improves the efficiency and accuracy of switch resource configuration, optimizes network stability and reliability, and achieves globally optimized switch performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119561830B_ABST
    Figure CN119561830B_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of computer network, and discloses a resource configuration method and system for a switch and a storage medium: first physical information between an intelligent control terminal and all switches and second physical information between any switch and other switches are acquired, a physical topology graph is generated based on the first physical information and the second physical information, a first value corresponding to a first performance index of any switch is acquired according to a first preset period, a second value corresponding to the first performance index of any switch is calculated based on a weight coefficient of any switch, a weight coefficient of a subordinate device in communication with any switch and the first value, and when the second value is greater than or equal to a first preset value, a configuration scheme is generated for any switch based on a connection relationship topology graph and a preset rule. The technical scheme can optimize the performance and stability of the switch network and improve the flexibility of switch configuration.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application belongs to the technical field of computer networks, and particularly relates to a resource configuration method and system for a switch and a storage medium. BACKGROUND

[0002] With the continuous development of network technology, as the core device in network architecture, the resource configuration and performance optimization of the switch become increasingly important. The traditional switch resource configuration method mostly relies on manual operation, which is not only inefficient but also prone to errors. With the expansion of network size and the increase of complexity, the demand for switch configuration becomes higher and higher, and manual configuration of switch resources almost becomes an impossible task. In order to solve this problem, the industry has begun to explore automated switch resource configuration methods.

[0003] Similar prior art is Chinese patent application No. CN116074265A, which discloses a switch port state configuration method, device, equipment and storage medium, obtains the module priority of each network module corresponding to the switch port and the state configuration of each network module to the switch port; determines and configures the state of the switch port according to the module priority of each network module, the state configuration of each network module to the switch port and the preset switch port state determination rule. Chinese patent application No. CN111130962A also discloses a switch automatic configuration method, device, system and storage medium, receives server network card configuration information including server network card mode; automatically obtains information required for configuring the switch, including switch networking mode, switch model of the switch, physical connection information of the switch and the server; automatically generates a configuration scheme according to the server network card configuration information and the information required for configuring the switch; sends the configuration scheme to the switch and automatically configures the switch according to the configuration scheme.

[0004] The above prior art considers performance factors when configuring the switch, but lacks a global perspective, can only optimize a single switch, cannot achieve optimal configuration of the entire network, and relies on fixed configuration rules, lacking flexibility and adaptability. Therefore, it is an urgent problem to provide a resource configuration method and system for a switch and a storage medium to improve the flexibility and adaptability of switch configuration and optimize the performance and stability of the switch network. SUMMARY

[0005] In view of the above technical problems, the present application provides a resource configuration method and system for a switch and a storage medium.

[0006] In a first aspect, the present application provides a resource configuration method for a switch, which comprises the following steps:

[0007] Step 1, obtaining first physical information between the intelligent control terminal and all switches and second physical information between any switch and other switches, wherein the first physical information and the second physical information include physical channel identifiers of directly connected and / or indirectly connected opposite devices;

[0008] Step 2, generating a physical topology graph based on the first physical information and the second physical information;

[0009] Step 3, obtaining a first value corresponding to a first performance index of any switch according to a first preset period, and calculating a second value corresponding to the first performance index of any switch based on a first weight coefficient of any switch, a second weight coefficient of all subordinate devices directly communicating with any switch, and the first value;

[0010] Step 4, judging whether the second value is greater than or equal to a first preset value, if yes, defining any switch as a to-be-configured switch, and then automatically generating a configuration scheme for the to-be-configured switch based on the physical topology graph and a preset rule;

[0011] Step 5, automatically configuring a communication path between switches based on the configuration scheme.

[0012] Specifically, step 2 includes:

[0013] Step 21, storing identification information of the intelligent control terminal and physical channel identifiers of all switches in a first correspondence relationship based on the first physical information, and storing identification information of any switch and physical channel identifiers of other switches in a second correspondence relationship based on the second physical information corresponding to any switch;

[0014] Step 22, performing data deduplication processing on all second correspondence relationships based on the first correspondence relationship, and constructing a channel correspondence relationship between switches based on data after the data deduplication processing;

[0015] Step 23, identifying a topology structure between all switches based on the channel correspondence relationship, and constructing a topology structure table;

[0016] Step 24, generating a physical topology graph based on the topology structure table.

[0017] Specifically, step 22 includes:

[0018] Step 221, traversing all second correspondence relationships based on the first correspondence relationship, and removing the same physical channel identifier from the second correspondence relationship when the same physical channel identifier exists in any second correspondence relationship and the first correspondence relationship;

[0019] Step 222, when there is only one physical channel identifier in any second correspondence relationship, defining the second correspondence relationship as a to-be-assigned correspondence relationship, extracting the physical channel identifier in the to-be-assigned correspondence relationship, and defining the physical channel identifier as a first physical channel identifier;

[0020] Step 223, extracting the first identification information of the first to-be-matched switch corresponding to the to-be-assigned correspondence relationship, extracting the physical channel identifier belonging to the first to-be-matched switch from the first correspondence relationship based on the first identification information, and defining the physical channel identifier as a second physical channel identifier;

[0021] Step 224, extracting the second to-be-matched switch corresponding to the first physical channel identifier, and constructing the channel correspondence relationship between the second to-be-matched switch and the first to-be-matched switch based on the first physical channel identifier and the second physical channel identifier;

[0022] Step 225, removing the first physical channel identifier from all second correspondence relationships, and then returning to step 222 until all physical channel identifiers in all second correspondence relationships are traversed.

[0023] Specifically, step 23 includes:

[0024] Step 231, identifying the initial switch connected with the intelligent control terminal based on the channel correspondence relationship, and then identifying the topology structure between any switch and other switches in sequence with the initial switch as the starting point;

[0025] Step 232, after identifying the topology structure between all switches, generating a structure table for each switch respectively, the structure table including the identification information of any switch, the identification information of the subordinate switch of any switch, and the number of switches located at the bottom layer directly connected and / or indirectly connected with any switch;

[0026] Step 233, generating a topology structure table based on all structure tables.

[0027] Specifically, step 3 further includes:

[0028] acquiring the data amount flowing through any switch in a second preset time period according to a second preset period, wherein the second preset period is an integer multiple of the first preset period;

[0029] calculating the average value of the first performance index of any switch in the second preset time period;

[0030] using the data amount divided by the average value to obtain a third value corresponding to the second performance index of any switch.

[0031] Specifically, step 4 includes:

[0032] Step 41, identifying all subordinate switches that are in communication with the to-be-configured switch, defining as first switches, identifying all upper switches that can communicate with any first switch, except the to-be-configured switch and having the same upper switch as the to-be-configured switch, defining as second switches;

[0033] Step 42, obtaining a second value corresponding to the first performance index of all second switches, defining the second switch with a second value less than or equal to a first preset value as a third switch;

[0034] Step 43, extracting any third switch, calculating a fourth value corresponding to the second performance index of any third switch, the calculation formula being:

[0035] CE4 = CE3 - CE3 x RL2,

[0036] Wherein, CE4 is the fourth value of any third switch, CE3 is the third value of any third switch, and RL2 is the second value of any third switch;

[0037] Step 44, defining the third switch with a fourth value greater than or equal to a second preset value as a candidate switch, identifying the first switch that makes the second value of the to-be-configured switch less than the first preset value, defining as a fourth switch;

[0038] Step 45, constructing a data forwarding path based on the candidate switch and the fourth switch, and then calculating a fifth value corresponding to the first performance index of the candidate switch on the data forwarding path;

[0039] Step 46, judging whether the fifth value is less than the first preset value, if yes, taking the data forwarding path as a configuration scheme, if not, returning to step 45.

[0040] Specifically, step 46 further comprises:

[0041] Step 47, if all data forwarding paths do not meet the condition of step 46, identifying all upper switches that can communicate with any first switch, except the to-be-configured switch and the second switch, and having the same connection point as the to-be-configured switch in the physical topology graph, defining as fifth switches;

[0042] Step 48, taking the fifth switch as a new second switch, and then repeating steps 42 to 44;

[0043] Step 49, constructing a new data forwarding path based on the candidate switch and the fourth switch, and then calculating a sixth value corresponding to the first performance index of each switch between the fourth switch and the connection point on the new data forwarding path;

[0044] Step 50, judging whether all sixth values are less than the first preset value, if yes, taking the new data forwarding path as the configuration scheme, if no, returning to step 49.

[0045] In a second aspect, the present application further provides a resource configuration system for switches, comprising: an intelligent control terminal and switches, the intelligent control terminal comprising a data acquisition module, configured to acquire first physical information between the intelligent control terminal and all switches, and second physical information between any switch and other switches, wherein the first physical information and the second physical information comprise physical channel identifiers of directly connected and / or indirectly connected opposite devices;

[0046] a topology graph generation module, configured to generate a physical topology graph according to the first physical information and the second physical information;

[0047] a data analysis module, configured to acquire a first value corresponding to a first performance index of any switch according to a first preset period, and calculate a second value corresponding to the first performance index of any switch based on a first weight coefficient of any switch, a second weight coefficient of all subordinate devices directly communicating with any switch, and the first value;

[0048] a configuration generation module, configured to judge whether the second value is greater than or equal to a first preset value, if yes, define any switch as a to-be-configured switch, and then automatically generate a configuration scheme for the to-be-configured switch based on the physical topology graph and a preset rule;

[0049] a configuration update module, configured to automatically configure a communication path between switches according to the configuration scheme.

[0050] In a third aspect, the present application provides a computer storage medium, which stores program instructions, wherein the program instructions control a device where the computer storage medium is located to execute any of the above resource configuration methods for switches when running.

[0051] Compared with the prior art, the present application has at least the following advantages:

[0052] 1. By automatically acquiring physical information and generating a physical topology graph, the complex connection relationship between switches is quickly processed, the time and cost of manual operation are reduced, and the efficiency and accuracy of switch resource configuration are improved.

[0053] 2. The initial performance index, weight coefficient and data flow of the switch are comprehensively considered, the second value corresponding to the first performance index of the switch is periodically calculated and analyzed, when the second value is greater than or equal to the first preset value, the configuration scheme is automatically generated based on the physical topology graph and the preset rule, the performance of the switch is globally optimized, the intelligent level of decision-making is improved, and the stability and reliability of the network are improved. BRIEF DESCRIPTION OF DRAWINGS

[0054] In order to more clearly illustrate the technical solutions of the embodiments of the present application or the prior art, the drawings needed to be used in the embodiments or prior art description will be briefly introduced. Obviously, the drawings in the following description only represent some of the embodiments of the present application, and all other drawings that can be obtained by those skilled in the art without creative work based on the provided drawings are also within the scope of protection of the present application.

[0055] Figure 1 a flow chart of the resource configuration method for the switch according to the present application;

[0056] Figure 2 a first schematic diagram of the physical topology according to the embodiment of the present application;

[0057] Figure 3 a second schematic diagram of the physical topology according to the embodiment of the present application;

[0058] Figure 4 a modular schematic diagram of the resource configuration system for the switch according to the present application. DETAILED DESCRIPTION

[0059] In order to make the objectives, technical solutions and advantages of the present application more clear, the present application will be further described in detail below with reference to the drawings and embodiments. Obviously, the specific embodiments described here only serve to explain the present application, and are only a part of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application.

[0060] It should be noted that if the present application has a description of "first", "second", etc., the description of "first", "second", etc. is only for the purpose of description, and cannot be understood as indicating or implying the relative importance of the indicated technical features or implicitly indicating the number of the indicated technical features. Therefore, the features with "first", "second" can explicitly or implicitly include at least one of the features. In addition, the technical solutions of each embodiment can be combined with each other, but it must be based on the fact that the technical solutions can be realized by those skilled in the art. When the combination of technical solutions appears contradictory or unachievable, it should be considered that the combination of technical solutions does not exist, and is not within the scope of protection required by the present application.

[0061] Figure 1 The flow chart of one embodiment of the resource configuration method for the switch according to the present application is shown, which specifically includes the following steps:

[0062] Step 1: Obtain the first physical information between the intelligent control terminal and all switches, and the second physical information between any switch and other switches. The first physical information and the second physical information include the physical channel identifier of the directly connected and / or indirectly connected peer devices.

[0063] The above physical information refers to the physical connection information between devices.

[0064] A physical channel is the channel through which any switch transmits data with other devices (intelligent control terminals, switches, terminal devices, servers, etc.). Each switch establishes a point-to-point connection with a single device through a unique physical channel.

[0065] by Figure 2 For example, CT is an intelligent control terminal. CT communicates with switch S1 through physical channel 10 of switch S1. Switch S1 communicates with switch S3 through physical channel 1 of switch S3. Switch S3 communicates with switch S7 through physical channel 1 of switch S7. Part of the first physical information of the intelligent control terminal is (S1-10, S3-1, S7-1).

[0066] Step 2: Generate a physical topology map based on the first physical information and the second physical information.

[0067] Before configuring switch resources, it is essential to clarify the network's scale and structure. A clear understanding of the network structure allows for more effective planning and allocation of network resources, and helps administrators to intuitively see the connections and paths between devices.

[0068] Specifically, step 2 includes:

[0069] Step 21: Based on the first physical information, store the identification information of the intelligent control terminal in correspondence with the physical channel identifiers of all switches, and define it as the first correspondence. Based on the second physical information corresponding to any switch, store the identification information of any switch in correspondence with the physical channel identifiers of other switches, and define it as the second correspondence.

[0070] Step 22: Based on the first correspondence, perform data deduplication on all second correspondences, and construct the channel correspondence between each switch based on the data after data deduplication.

[0071] Step 23: Based on the channel correspondence, identify the topology between all switches and construct a topology table.

[0072] Step 24: Generate a physical topology diagram based on the topology structure table.

[0073] For example, the above-mentioned identification information is a unique identifier such as device serial number, MAC address, or device code.

[0074] by Figure 2 For example, the first correspondence is (S-CT, (S1-10, S3-1, S7-1, S6-1, S10-1, S2-1, S5-1, S9-1, S4-1, S8-1)), the second correspondence for switch S1 is (S-S1, (S3-1, S7-1, S6-1, S10-1, S2-1, S5-1, S9-1, S4-1, S8-1)), the second correspondence for switch S2 is (S-S2, (S1-2, S5-1, S9-1, S4-1, S8-1)), the second correspondence for switch S3 is (S-S3, (S1-1, S6-1, S10-1, S7-1)), and the second correspondence for switch S4 is (S... -S4, (S1-2, S2-6, S8-1)), the second correspondence of switch S5 is (S-S5, (S1-2, S2-5, S9-1)), the second correspondence of switch S6 is (S-S6, (S1-1, S3-4, S10-1)), the second correspondence of switch S7 is (S-S7, (S1-1, S3-3)), the second correspondence of switch S8 is (S-S8, (S1-2, S2-6, S4-6)), the second correspondence of switch S9 is (S-S9, (S1-2, S2-5, S5-4)), the second correspondence of switch S10 is (S-S2, (S1-1, S3-4, S6-2)).

[0075] Specifically, step 22 includes:

[0076] Step 221: Based on the first correspondence, traverse all second correspondences. When any second correspondence contains the same physical channel identifier as the first correspondence, remove the same physical channel identifier from the second correspondence.

[0077] Step 222: When there is only one physical channel identifier in any second correspondence, it is defined as a correspondence to be assigned. Extract the physical channel identifier in the correspondence to be assigned and define it as the first physical channel identifier.

[0078] Step 223: Extract the first identification information of the first switch to be matched corresponding to the correspondence to be assigned, extract the physical channel identifier belonging to the first switch to be matched from the first correspondence based on the first identification information, and define it as the second physical channel identifier.

[0079] Step 224: Extract the second switch to be matched corresponding to the first physical channel identifier, and construct the channel correspondence between the second switch to be matched and the first switch to be matched based on the first physical channel identifier and the second physical channel identifier.

[0080] Step 225: Remove the first physical channel identifier from all second correspondences, then return to step 222 until all physical channel identifiers in all second correspondences have been traversed.

[0081] by Figure 2 For example, after completing step 221, the second correspondence for switch S1 is empty, the second correspondence for switch S2 is (S-S2, (S1-2)), the second correspondence for switch S3 is (S-S3, (S1-1)), the second correspondence for switch S4 is (S-S4, (S1-2, S2-6)), the second correspondence for switch S5 is (S-S5, (S1-2, S2-5)), and the second correspondence for switch S6 is... The second correspondence for switch S7 is (S-S7, (S1-1, S3-3)), the second correspondence for switch S8 is (S-S8, (S1-2, S2-6, S4-6)), the second correspondence for switch S9 is (S-S9, (S1-2, S2-5, S5-4)), and the second correspondence for switch S10 is (S-S2, (S1-1, S3-4, S6-2)). In the second correspondence for switch S2, there is only one physical channel identifier S1-2, and the switch corresponding to this second correspondence is S2. In the first correspondence, the physical channel identifier belonging to switch S2 is S2-1. Therefore, the physical channel identifier S1-2 of switch S1 and the physical channel identifier S2-1 of switch S2 have a channel correspondence, meaning that switches S1 and S2 communicate via physical channels S1-2 and S2-1. The channel identifier S1-2 is then removed from all second correspondences.

[0082] After traversing all physical channel identifiers in all second correspondences, the channel correspondences between the switches are (S1-2, S2-1), (S1-1, S3-1), (S2-5, S5-1), (S2-6, S4-1), (S4-6, S8-1), (S5-4, S9-1), (S3-3, S7-1), (S3-4, S6-1), (S6-2, S10-1).

[0083] Specifically, step 23 includes:

[0084] Step 231: Identify the initial switch connected to the intelligent control terminal based on the channel correspondence. Then, starting from the initial switch, identify the topology between any switch and other switches in sequence.

[0085] Step 232, after identifying the topology between all switches, a structure table is generated for each switch, which includes the identification information of any switch, the identification information of the subordinate switch of any switch, and the number of switches located at the bottom layer directly connected and / or indirectly connected to any switch.

[0086] Step 233, generating a topology table based on all structure tables.

[0087] Exemplarily, the structure table corresponding to switch S1 is (S-S1, (S2, S3), 4), the structure table corresponding to switch S2 is (S-S2, (S4, S5), 2), the structure table corresponding to switch S3 is (S-S3, (S6, S7), 2), the structure table corresponding to switch S4 is (S-S4, (S8), 1), the structure table corresponding to switch S5 is (S-S5, (S9), 1), the structure table corresponding to switch S6 is (S-S6, (S10), 1), the structure table corresponding to switch S7 is (S-S7, (), 0), the structure table corresponding to switch S8 is (S-S8, (), 0), the structure table corresponding to switch S9 is (S-S9, (), 0), and the structure table corresponding to switch S10 is (S-S10, (), 0).

[0088] Exemplarily, when generating the physical topology diagram, there are 4 switches (S7, S8, S9, S10) located at the leaf node, and the topology network has a total of four layers. The total width of the topology diagram is set based on the preset width of one switch icon and the interval distance between two switches in the same layer, and the total height of the topology diagram is set based on the preset height of one switch icon and the interval distance between two layers of switches. Then, the above physical topology diagram is generated based on the total width, total height, and physical channel connection relationship between switches.

[0089] By generating the physical topology diagram, the network administrator can intuitively see the physical structure of the switch network, including the connection relationship and communication path between devices. By understanding the details of the physical connection, network resources can be more effectively planned and allocated, providing a basis for network optimization and switch resource configuration.

[0090] Step 3, acquiring a first value corresponding to a first performance indicator of any switch according to a first preset period, and calculating a second value corresponding to the first performance indicator of any switch based on the first weight coefficient of any switch, the second weight coefficient of all subordinate devices directly communicating with any switch, and the first value.

[0091] The first preset period is set according to the experience of those skilled in the art or according to the actual application scene, and the embodiments of the present application are not limited thereto. Exemplarily, the first preset period is 1 min.

[0092] Exemplarily, the first performance index is resource usage rate, CPU usage rate, etc. The subordinate devices in direct communication with the switch include switches, terminals, servers, etc.

[0093] Exemplarily, the calculation formula of the second value is:

[0094]

[0095] wherein R2 is the second value, R1 is the first value, W1 is the first weight coefficient, W2 i is the second weight coefficient of the ith subordinate device, i is a positive integer from 1 to I, and I is the total number of subordinate devices in direct communication with any switch.

[0096] Different weight coefficients are set for different devices (switches, servers and terminals), and the greater the weight coefficient, the higher the priority. It can be ensured that when the network is congested, the data flow with high weight coefficient can be processed preferentially to ensure the performance of critical business applications.

[0097] Specifically, step 3 further includes:

[0098] According to the second preset period, the amount of data flowing through any switch in the second preset time period is obtained, wherein the second preset period is an integer multiple of the first preset period.

[0099] The average value of the first performance index of any switch in the second preset time period is calculated.

[0100] The third value corresponding to the second performance index of any switch is obtained by dividing the amount of data by the average value.

[0101] The second preset period is set according to the experience of those skilled in the art or according to the actual application scene, and the embodiments of the present application are not limited thereto. Exemplarily, the second preset period is 1h.

[0102] Exemplarily, the second performance index is the total throughput of the switch, which is the maximum data flow that the switch can process in an ideal case.

[0103] Generally, the total throughput of a switch is given by the manufacturer, but in an actual switch network, the models, manufacturers, etc. of switches used are different, resulting in different total throughputs, efficiencies and capabilities of each switch when processing network traffic and data switching, and the values of the first performance indicators periodically obtained can only reflect the traffic and load at that time, and cannot comprehensively reflect the performance of the switch under different traffic and load conditions. In order to more accurately grasp the differences in efficiency and capability of the switch when processing network traffic and data switching, by analyzing the values of the first performance indicators of the switch and the amount of data flowing through the switch, the third values corresponding to the second performance indicators of each switch are periodically estimated, which can more effectively grasp the performance differences of the switch and improve the efficiency and accuracy of the configuration of switch resources.

[0104] Step 4, determining whether the second value is greater than or equal to the first preset value, if yes, defining any switch as a to-be-configured switch, and then automatically generating a configuration scheme for the to-be-configured switch based on the physical topology graph and the preset rule.

[0105] The first preset value is set according to the experience of those skilled in the art or according to the actual application scenario, and the embodiments of the present application are not limited thereto. Exemplarily, the first preset value is 80%.

[0106] When the second value is greater than or equal to the first preset value, it indicates that the load of the switch is high, and there is a risk of network congestion and device overload, and the data flowing through the switch needs to be shunted.

[0107] Specifically, step 4 includes:

[0108] Step 41, identifying all subordinate switches that are communicating with the to-be-configured switch, defining as first switches, and identifying all superior switches except the to-be-configured switch that can communicate with any first switch and have the same superior switch as the to-be-configured switch, defining as second switches.

[0109] Step 42, obtaining the second values corresponding to the first performance indicators of all second switches, and defining the second switches with second values less than or equal to the first preset value as third switches.

[0110] Step 43, extracting any third switch, calculating the fourth value corresponding to the second performance indicator of any third switch, and the calculation formula is:

[0111] CE4 = CE3 - CE3 x RL2,

[0112] Wherein, CE4 is the fourth value of any third switch, CE3 is the third value of any third switch, and RL2 is the second value of any third switch.

[0113] Step 44: Define the third switch whose fourth value is greater than or equal to the second preset value as a candidate switch, and identify the first switch whose second value is less than the first preset value and define it as the fourth switch.

[0114] Step 45: Construct a data forwarding path based on the candidate switch and the fourth switch, and then calculate the fifth value corresponding to the first performance index of the candidate switch on the data forwarding path.

[0115] Step 46: Determine whether the fifth value is less than the first preset value. If yes, use the data forwarding path as the configuration scheme. If no, return to step 45.

[0116] The second preset value is set based on the experience of those skilled in the art or according to the actual application scenario, and is not limited in this embodiment. For example, the second preset value is 6Gbps.

[0117] by Figure 3 The technical solution of this invention will be described using an example. The second value corresponding to the first performance indicator of switch S5 is 89%, and the third value corresponding to the second performance indicator is 20Gbps. The downstream switches communicating with switch S5 are switches S8, S9, and S10. Switch S4 is a switch connected to switch S8 and has the same upstream switch S2 as switch S5. When transferring the data flow from switch S8 to switch S4, the second value corresponding to the first performance indicator of switch S5 can be made less than a first preset value; in this case, switch S8 is defined as the fourth switch. The second value corresponding to the first performance indicator of switch S4 is 55% (less than the first preset value), the third value corresponding to the second performance indicator is 15Gbps, and the fourth value corresponding to the second performance indicator of switch S4 is 6.75. Since the fourth value of switch S4 is greater than the second preset value, switch S4 is selected as a candidate switch. A data forwarding path from S8 to S4 to S2 can be constructed. If the amount of data forwarded from switch S8 to switch S5 is 5Gbps, and the fifth value corresponding to the first performance indicator of switch S4 is 88.3% when forwarding data through this path, which is greater than the first preset value, then this data forwarding path cannot be used as a configuration scheme. If the amount of data forwarded from switch S8 to switch S5 is 1Gbps, and the fifth value corresponding to the first performance indicator of switch S4 is 61.7% when forwarding data through this path, which is less than the first preset value, then this data forwarding path can be used as a configuration scheme.

[0118] Specifically, step 46 also includes:

[0119] Step 47, if all data forwarding paths do not meet the condition of step 46, all upper-level switches capable of communicating with any first switch except the to-be-configured switch and the second switch and having the same connection point as the to-be-configured switch in the physical topology diagram are identified, defined as fifth switches.

[0120] Step 48, the fifth switch is taken as a new second switch, and then steps 42 to 44 are repeated.

[0121] Step 49, a new data forwarding path is built based on the candidate switch and the fourth switch, and then a sixth value corresponding to the first performance index of each switch between the fourth switch and the connection point on the new data forwarding path is calculated.

[0122] Step 50, it is judged whether all sixth values are less than a first preset value, if yes, the new data forwarding path is taken as a configuration scheme, if no, step 49 is returned.

[0123] For example, Figure 3 the lower-level switches communicating with the switch S5 are switches S8, S9 and S10, the switch S6 is a switch connected with the switch S10 and having the same connection point S1 as the switch S5, and then a data forwarding path can also be built via the switch S6.

[0124] The technical scheme of the present application comprehensively considers the load conditions and performance differences of each switch in the switch network, dynamically adjusts the allocation of switch resources through real-time monitoring and prediction, globally optimizes the performance of the switch, prevents network failures caused by overload of switch resources, improves the intelligent level of decision-making, and improves the stability and reliability of the network.

[0125] Step 5, based on the configuration scheme, automatically configure the communication path between the switches.

[0126] Figure 4 As shown in the figure, an embodiment of a resource configuration system for switches provided by the present application is shown. As Figure 4 shown, the system comprises an intelligent control terminal 10 and a switch 20, and the intelligent control terminal 10 comprises a data acquisition module 110, a topology diagram generation module 120, a data analysis module 130, a configuration generation module 140 and a configuration update module 150.

[0127] The data acquisition module 110 is used to acquire first physical information between the intelligent control terminal 10 and all switches and second physical information between any switch and other switches, wherein the first physical information and the second physical information comprise physical channel identifiers of directly connected and / or indirectly connected opposite devices.

[0128] The topology graph generation module 120 is configured to generate the physical topology graph according to the first physical information and the second physical information.

[0129] The data analysis module 130 is configured to acquire a first value corresponding to the first performance index of any switch according to a first preset period, and calculate a second value corresponding to the first performance index of any switch based on the first weight coefficient of any switch, the second weight coefficient of all subordinate devices in direct communication with any switch, and the first value.

[0130] The configuration generation module 140 is configured to determine whether the second value is greater than or equal to a first preset value, and if yes, define any switch as a switch to be configured, and then automatically generate a configuration scheme for the switch to be configured based on the physical topology graph and a preset rule.

[0131] The configuration update module 150 is configured to automatically configure the communication path between switches according to the configuration scheme.

[0132] According to another aspect of the embodiments of the present application, a computer storage medium is provided, which stores program instructions, wherein the program instructions control the device where the computer storage medium is located to execute the resource configuration method for switches of any one of the above aspects when the program instructions are executed.

[0133] It should be understood that, although each step in the flowchart of each embodiment of the present application is displayed in sequence according to the arrow, these steps are not necessarily executed in sequence according to the arrow. Unless otherwise specified herein, the execution of these steps is not strictly limited in sequence, and these steps can be executed in other sequences. Moreover, at least a part of the steps in each embodiment can include multiple sub-steps or multiple stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution sequence of these sub-steps or stages is not necessarily sequential, but can be executed in rotation or alternation with at least a part of other steps or sub-steps or stages of other steps.

[0134] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The above-mentioned program can be stored in a non-volatile computer readable storage medium, and when the program is executed, the processes of the above-mentioned embodiment methods can be included. Any reference to memory, storage, database or other medium used in the embodiments provided in the present application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration but not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0135] The above-mentioned embodiments only express the preferred implementation of the present application, and the description is more specific and detailed, but it cannot be understood as a limitation on the scope of the patent of the present application. It should be noted that for those skilled in the art, without departing from the concept of the present application, a number of modifications and improvements can be made, which are within the scope of protection of the present application.

Claims

1. A resource configuration method for a switch, characterized by, The method comprises the following steps: Step 1, obtaining first physical information between the intelligent control terminal and all switches, and second physical information between any switch and other switches, wherein the first physical information and the second physical information comprise physical channel identifiers of directly connected and / or indirectly connected opposite devices; Step 2, generating a physical topology graph based on the first physical information and the second physical information; Step 3, acquiring a first value corresponding to a first performance index of any of the switches according to a first preset period, and calculating a second value corresponding to the first performance index of any of the switches based on a first weight coefficient of any of the switches, a second weight coefficient of all subordinate devices in direct communication with any of the switches, and the first value, with a calculation formula being: , Wherein, R2 is a second value, R1 is a first value, W1 is a first weight coefficient, W2 i is a second weight coefficient of the i-th subordinate device, i is a positive integer from 1 to I, and I is the total number of subordinate devices in direct communication with any switch. Step 4, judging whether the second value is greater than or equal to a first preset value, if yes, defining any of the switches as a to-be-configured switch, and then automatically generating a configuration scheme for the to-be-configured switch based on the physical topology graph and a preset rule; Step 5, automatically configuring a communication path between switches based on the configuration scheme; The step 2 comprises: Step 21, storing identification information of the intelligent control terminal and the physical channel identifiers of all the switches in a first correspondence relationship based on the first physical information, and storing identification information of any of the switches and the physical channel identifiers of other switches in a second correspondence relationship based on the second physical information corresponding to any of the switches; Step 22, performing data deduplication processing on all the second correspondence relationships based on the first correspondence relationship, and constructing a channel correspondence relationship between switches based on data after the data deduplication processing; Step 23, identifying a topology structure between all the switches based on the channel correspondence relationship, and constructing a topology structure table; Step 24, generating the physical topology graph based on the topology structure table.

2. The method of claim 1, wherein, The step 22 comprises: Step 221, traversing all the second correspondence relationships based on the first correspondence relationship, and removing the same physical channel identifiers from the second correspondence relationships when the same physical channel identifiers exist in any of the second correspondence relationships and the first correspondence relationship; Step 222, defining a to-be-assigned correspondence relationship when there is only one physical channel identifier in any of the second correspondence relationships, extracting the physical channel identifier in the to-be-assigned correspondence relationship, and defining the physical channel identifier as a first physical channel identifier; Step 223, extracting first identification information of a first to-be-matched switch corresponding to the to-be-assigned correspondence relationship, extracting the physical channel identifiers belonging to the first to-be-matched switch from the first correspondence relationship based on the first identification information, and defining the physical channel identifiers as second physical channel identifiers; Step 224, extracting a second to-be-matched switch corresponding to the first physical channel identifier, and constructing the channel correspondence relationship between the second to-be-matched switch and the first to-be-matched switch based on the first physical channel identifier and the second physical channel identifier; Step 225, removing the first physical channel identifier from all the second correspondence relationships, and then returning to the step 222 until all the physical channel identifiers in all the second correspondence relationships are traversed.

3. The method of claim 1, wherein, The step 23 comprises: Step 231, identifying an initial switch connected with the intelligent control terminal based on the channel correspondence, and then identifying the topology between any switch and other switches in sequence with the initial switch as a starting point; Step 232, after identifying the topology between all the switches, generating a structure table for each switch respectively, the structure table including identification information of any switch, identification information of lower-level switches of any switch, and the number of switches located at the bottom layer directly connected and / or indirectly connected with any switch; Step 233, generating the topology table based on all the structure tables.

4. The method of claim 1, wherein, The step 3 further includes: acquiring the data amount flowing through any switch in the second preset period according to the second preset period, wherein the second preset period is an integer multiple of the first preset period; calculating the average value of the first performance index of any switch in the second preset period; acquiring a third value corresponding to the second performance index of any switch by dividing the data amount by the average value.

5. The method of claim 4, wherein, The step 4 includes: Step 41, identifying all lower-level switches in communication with the to-be-configured switch, defined as first switches, and identifying all upper-level switches capable of communicating with any first switch except the to-be-configured switch and having the same upper-level switch as the to-be-configured switch, defined as second switches; Step 42, acquiring the second value corresponding to the first performance index of all second switches, and defining the second switch with the second value less than or equal to the first preset value as a third switch; Step 43, extract any third switch, calculate any said third switch said second performance indicators corresponding to the fourth value, the formula is: , wherein CE4 is the fourth value of any third switch, CE3 is the third value of any third switch, and RL2 is the second value of any third switch; Step 44, defining the third switch with the fourth value greater than or equal to a second preset value as a candidate switch, and identifying the first switch making the second value of the to-be-configured switch less than the first preset value, defined as a fourth switch; Step 45, constructing a data forwarding path based on the candidate switch and the fourth switch, and then calculating a fifth value corresponding to the first performance index of the candidate switch on the data forwarding path; Step 46, judging whether the fifth value is less than the first preset value, if yes, taking the data forwarding path as the configuration scheme, and if not, returning to the step 45.

6. The method of claim 5, wherein, The step 46 further includes: Step 47, if all data forwarding paths do not meet the condition of the step 46, identifying all upper-level switches capable of communicating with any first switch except the to-be-configured switch and the second switch and having the same connection point as the to-be-configured switch in the physical topology diagram, defined as fifth switches; Step 48, taking the fifth switch as a new second switch, and then repeating the steps 42 to 44; Step 49, constructing a new data forwarding path based on the candidate switch and the fourth switch, and then calculating a sixth value corresponding to the first performance index of each switch between the fourth switch and the connection point on the new data forwarding path; Step 50, judging whether all the sixth values are less than the first preset value, if yes, taking the new data forwarding path as the configuration scheme, if no, returning to the step 49.

7. A resource configuration system for a switch for implementing the method according to any one of claims 1 to 6, characterized in that Intelligent control terminal and switches, the intelligent control terminal comprising a data acquisition module, a topology graph generation module, a data analysis module, a configuration generation module and a configuration update module; The data acquisition module is configured to acquire first physical information between the intelligent control terminal and all switches, and second physical information between any switch and other switches, wherein the first physical information and the second physical information comprise physical channel identifiers of directly connected and / or indirectly connected opposite devices; The topology graph generation module is configured to generate a physical topology graph according to the first physical information and the second physical information; The data analysis module is configured to acquire a first value corresponding to a first performance index of any switch according to a first preset period, and calculate a second value corresponding to the first performance index of any switch based on a first weight coefficient of any switch, a second weight coefficient of all subordinate devices directly communicating with any switch, and the first value; The configuration generation module is configured to judge whether the second value is greater than or equal to a first preset value, if yes, define any switch as a to-be-configured switch, and then automatically generate a configuration scheme for the to-be-configured switch based on the physical topology graph and a preset rule; The configuration update module is configured to automatically configure a communication path between switches according to the configuration scheme.

8. A computer storage medium, characterized in that The computer storage medium stores program instructions, wherein the program instructions control a device where the computer storage medium is located to execute the method in any one of claims 1 to 6 when the program instructions are executed. The computer storage medium stores program instructions, wherein the program instructions control a device where the computer storage medium is located to execute the method in any one of claims 1 to 6 when the program instructions are executed.

Citation Information

Patent Citations

  • Switch automatic configuration method, device and system and storage medium

    CN111130962A

  • Switch port state configuration method, device and equipment and storage medium

    CN116074265A

  • Intelligent substation switch dynamic configuration method

    CN106452837A

  • Transmission Resource Configuration Method, Apparatus, and System

    US20200059936A1