Resource configuration method and system for switch, and storage medium
By generating physical topology diagrams and comprehensively considering switch performance indicators and automatically generating configuration solutions, the problem of lack of global vision for switch configuration in the existing technology is solved, and the global optimization and stability improvement of the switch network is achieved.
Patent Information
- Application Number
- CN202411596381.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-11
- Publication Date
- 2025-03-04
- Estimated Expiration
- 2044-11-11
AI Technical Summary
The prior art lacks a global perspective when configuring switches, cannot achieve optimal configuration of the entire network, and depends on fixed configuration rules, lacks flexibility and adaptability.
By obtaining physical information between the intelligent control terminal and the switch, generating a physical topology diagram, comprehensively considering the switch's performance indicators and weight coefficients, automatically generate configuration plans, and dynamically adjust switch resource allocation to optimize network performance.
It improves the efficiency and accuracy of switch resource configuration, enhances the stability and reliability of the network, and realizes the ability to globally optimize switch performance.
Smart Images

Figure CN119561830A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of computer networks, and in particular relates to a resource configuration method, system and storage medium for a switch. Background Art
[0002] With the continuous advancement of network technology, resource configuration and performance optimization of switches, as core devices in network architectures, have become increasingly important. Traditional switch resource configuration methods mostly rely on manual operations, which are not only inefficient but also prone to errors. As network scale and complexity increase, the demands on switch configuration are becoming increasingly demanding, making manual configuration of switch resources almost impossible. To address this issue, the industry has begun exploring automated switch resource configuration methods.
[0003] Similar prior art includes Chinese patent application publication number CN116074265A, which discloses a switch port status configuration method, apparatus, device, and storage medium. The method obtains the module priority of each network module corresponding to the switch port and the status configuration of each network module for the switch port; determines and configures the switch port status based on the module priority of each network module, the status configuration of each network module for the switch port, and a preset switch port status determination rule. There is also Chinese patent application publication number CN111130962A, which discloses a switch automated configuration method, apparatus, system, and storage medium. The method receives server network card configuration information, including the server network card mode; automatically obtains information required to configure the switch, including the switch networking method, the switch model, and the physical connection information between the switch and the server; automatically generates a configuration plan based on the server network card configuration information and the information required to configure the switch; and sends the configuration plan to the switch, automatically configuring the switch according to the configuration plan.
[0004] While the aforementioned existing technologies take performance factors into account when configuring switches, they lack a global perspective and can only optimize individual switches, failing to achieve optimal configuration for the entire network. Furthermore, they rely on fixed configuration rules, lacking flexibility and adaptability. Therefore, providing a resource configuration method, system, and storage medium for switches to improve the flexibility and adaptability of switch configuration and optimize the performance and stability of switch networks is an urgent issue to be addressed. Summary of the Invention
[0005] In response to the above-mentioned technical problems, the present invention provides a resource configuration method, system and storage medium for a switch.
[0006] In a first aspect, the present invention provides a resource configuration method for a switch, the method comprising the following steps:
[0007] Step 1: 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 include physical channel identifiers of directly and / or indirectly connected counterpart devices;
[0008] Step 2: Generate a physical topology map based on the first physical information and the second physical information;
[0009] Step 3: Obtain a first value corresponding to the first performance indicator of any switch according to a first preset period, and calculate a second value corresponding to the first performance indicator of any switch based on a first weight coefficient of any switch, second weight coefficients of all lower-level devices that directly communicate with the switch, and the first value;
[0010] Step 4: Determine whether the second value is greater than or equal to the first preset value. If so, define any switch as a switch to be configured, and then automatically generate a configuration plan for the switch to be configured based on the physical topology diagram and preset rules;
[0011] Step 5: Automatically configure the communication path between switches based on the configuration plan.
[0012] Specifically, step 2 includes:
[0013] Step 21: Based on the first physical information, the identification information of the intelligent control terminal is stored in correspondence with the physical channel identifiers of all switches, which is defined as a first correspondence relationship. Based on the second physical information corresponding to any switch, the identification information of any switch is stored in correspondence with the physical channel identifiers of other switches, which is defined as a second correspondence relationship.
[0014] Step 22: Deduplication is performed on all second correspondences based on the first correspondences, and channel correspondences between switches are constructed based on the deduplication-processed data.
[0015] Step 23: Based on the channel correspondence, identify the topology between all switches and build a topology table;
[0016] Step 24: Generate a physical topology map based on the topology structure table.
[0017] Specifically, step 22 includes:
[0018] Step 221: Traverse all second correspondences based on the first correspondence. When any second correspondence contains the same physical channel identifier as that in the first correspondence, remove the same physical channel identifier from the second correspondence.
[0019] Step 222: When there is only one physical channel identifier in any second corresponding relationship, it is defined as a corresponding relationship to be allocated, and the physical channel identifier in the corresponding relationship to be allocated is extracted and defined as the first physical channel identifier;
[0020] Step 223: Extract the first identification information of the first to-be-matched switch corresponding to the to-be-assigned correspondence relationship, extract the physical channel identifier belonging to the first to-be-matched switch from the first correspondence relationship based on the first identification information, and define it as the second physical channel identifier;
[0021] Step 224: Extract the second switch to be matched corresponding to the first physical channel identifier, and establish a channel correspondence relationship 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.
[0022] Step 225: Remove the first physical channel identifier from all second corresponding relationships, and then return to step 222 until all physical channel identifiers in all second corresponding relationships are traversed.
[0023] Specifically, step 23 includes:
[0024] Step 231: Identify the initial switch connected to the intelligent control terminal based on the channel correspondence relationship, and then identify the topology between any switch and other switches in sequence, starting from the initial switch;
[0025] Step 232: After identifying the topology between all switches, a structure table is generated for each switch. The structure table includes identification information of each switch, identification information of the switches below each switch, and the number of switches at the bottom layer that are directly and / or indirectly connected to each switch.
[0026] Step 233: Generate a topology structure table based on all structure tables.
[0027] Specifically, after step 3, the following steps are also included:
[0028] Obtaining the amount of data flowing through any switch within 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 an average value of the first performance indicator of any switch within a second preset time period;
[0030] Divide the data volume by the average value to obtain a third value corresponding to the second performance indicator of any switch.
[0031] Specifically, step 4 includes:
[0032] Step 41: Identify all lower-level switches that are communicating with the switch to be configured, which are defined as first switches. Identify all upper-level switches that can communicate with any first switch, excluding the switch to be configured, and that have the same upper-level switch as the switch to be configured, which are defined as second switches.
[0033] Step 42: Obtain the second values corresponding to the first performance indicators of all second switches, and define the second switches whose second values are less than or equal to the first preset value as third switches;
[0034] Step 43: Extract any third switch and calculate the fourth value corresponding to the second performance indicator of any third switch. The calculation formula is:
[0035] CE4=CE3-CE3×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: 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 of the switch to be configured is less than the first preset value as the fourth switch;
[0038] Step 45: Construct a data forwarding path based on the candidate switch and the fourth switch, and then calculate a fifth value corresponding to the first performance indicator of the candidate switch on the data forwarding path;
[0039] Step 46 , determining whether the fifth value is less than the first preset value; if so, using the data forwarding path as a configuration solution; if not, returning to step 45 .
[0040] Specifically, step 46 further includes:
[0041] Step 47: If all data forwarding paths do not meet the conditions of step 46, identify all upper-level switches that can communicate with any first switch, excluding the switch to be configured and the second switch, and that have the same connection point as the switch to be configured in the physical topology diagram, and define them as fifth switches.
[0042] Step 48: Use the fifth switch as the new second switch, and then repeat steps 42 to 44;
[0043] Step 49: Construct a new data forwarding path based on the candidate switch and the fourth switch, and then calculate a sixth value corresponding to the first performance indicator of each switch between the fourth switch and the connection point on the new data forwarding path;
[0044] Step 50 , determining whether all sixth values are smaller than the first preset value; if so, using the new data forwarding path as a configuration solution; if not, returning to step 49 .
[0045] In a second aspect, the present invention further provides a resource configuration system for a switch, the system comprising: an intelligent control terminal and a switch, 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 include physical channel identifiers of directly and / or indirectly connected counterpart devices;
[0046] A topology map generating module, configured to generate a physical topology map according to the first physical information and the second physical information;
[0047] a data analysis module, configured to obtain a first value corresponding to a first performance indicator of any switch according to a first preset period, and calculate a second value corresponding to the first performance indicator of any switch based on a first weight coefficient of any switch, second weight coefficients of all lower-level devices that directly communicate with the switch, and the first value;
[0048] a configuration generation module, configured to determine whether the second value is greater than or equal to a first preset value, and if so, define any switch as a switch to be configured, and then automatically generate a configuration plan for the switch to be configured based on the physical topology diagram and preset rules;
[0049] The configuration update module is used to automatically configure the communication path between switches according to the configuration plan.
[0050] In a third aspect, the present invention provides a computer storage medium storing program instructions, wherein when the program instructions are executed, the device where the computer storage medium is located is controlled to execute any one of the above-mentioned resource configuration methods for a switch.
[0051] Compared with the prior art, the beneficial effects of the present invention are at least as follows:
[0052] 1. By automatically acquiring physical information and generating physical topology diagrams, the system can quickly process complex connection relationships between switches, reduce the time and cost of manual operations, and improve the efficiency and accuracy of switch resource configuration.
[0053] 2. Taking into account the initial performance indicators, weight coefficients, and data traffic of the switch, the second value corresponding to the first performance indicator of the switch is periodically calculated and analyzed. When the second value is greater than or equal to the first preset value, a configuration plan is automatically generated based on the physical topology diagram and preset rules. This optimizes the performance of the switch from a global perspective, improves the intelligent level of decision-making, and enhances the stability and reliability of the network. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are merely embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0055] Figure 1 A flow chart of a resource configuration method for a switch according to the present invention;
[0056] Figure 2 This is a first schematic diagram of a physical topology diagram according to an embodiment of the present invention;
[0057] Figure 3 This is a second schematic diagram of a physical topology diagram according to an embodiment of the present invention;
[0058] Figure 4 This is a modular schematic diagram of the resource configuration system for a switch according to the present invention. DETAILED DESCRIPTION
[0059] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below with reference to the accompanying drawings and embodiments. Obviously, the specific embodiments described herein are only used to explain the present invention and are part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0060] It should be noted that if there are descriptions involving "first", "second", etc. in the embodiments of the present invention, the descriptions of "first", "second", etc. are only for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of such features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in this field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such a combination of technical solutions does not exist and is not within the scope of protection required by the present invention.
[0061] Figure 1 FIG. 1 is a flow chart of an embodiment of a resource configuration method for a switch provided by the present invention, and the flow chart specifically includes the following steps:
[0062] Step 1: Obtain 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 and / or indirectly connected counterpart devices.
[0063] The above physical information is the physical connection information between devices.
[0064] The physical channel is the channel for data transmission between any switch and 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 via physical channel 10 of switch S1. Switch S1 communicates with switch S3 via physical channel 1 of switch S3. Switch S3 communicates with switch S7 via 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, clarify the scale and structure of the network. Having a clear understanding of the network structure can more effectively plan and allocate network resources and help managers intuitively see the connection relationships and paths between devices.
[0068] Specifically, step 2 includes:
[0069] Step 21: Based on the first physical information, the identification information of the intelligent control terminal is stored in correspondence with the physical channel identifiers of all switches, which is defined as a first correspondence relationship. Based on the second physical information corresponding to any switch, the identification information of any switch is stored in correspondence with the physical channel identifiers of other switches, which is defined as a second correspondence relationship.
[0070] Step 22: perform data deduplication processing on all second correspondences based on the first correspondences, and construct channel correspondences between switches based on the data after the data deduplication processing.
[0071] Step 23: Based on the channel correspondence, identify the topology between all switches and build a topology table.
[0072] Step 24: Generate a physical topology map based on the topology structure table.
[0073] Exemplarily, the above identification information is a unique identifier such as a device serial number, MAC address, or device code.
[0074] by Figure 2 For example, the first corresponding relationship 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 corresponding relationship corresponding to 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 corresponding relationship corresponding to switch S2 is (S-S2, (S1-2, S5-1, S9-1, S4-1, S8-1)), the second corresponding relationship corresponding to switch S3 is (S-S3, (S1-1, S6-1, S10-1, S7-1)), and the second corresponding relationship corresponding to switch S4 is (S-S4, (S-S5, (S1-1, S6-1, S10-1, S7-1)). -S4, (S1-2, S2-6, S8-1)), the second corresponding relationship corresponding to switch S5 is (S-S5, (S1-2, S2-5, S9-1)), the second corresponding relationship corresponding to switch S6 is (S-S6, (S1-1, S3-4, S10-1)), the second corresponding relationship corresponding to switch S7 is (S-S7, (S1-1, S3-3)), the second corresponding relationship corresponding to switch S8 is (S-S8, (S1-2, S2-6, S4-6)), the second corresponding relationship corresponding to switch S9 is (S-S9, (S1-2, S2-5, S5-4)), and the second corresponding relationship corresponding to switch S10 is (S-S2, (S1-1, S3-4, S6-2)).
[0075] Specifically, step 22 includes:
[0076] Step 221: Traverse all second corresponding relationships based on the first corresponding relationship. When any second corresponding relationship contains the same physical channel identifier as that in the first corresponding relationship, remove the same physical channel identifier from the second corresponding relationship.
[0077] Step 222: When there is only one physical channel identifier in any second corresponding relationship, it is defined as a corresponding relationship to be allocated, and the physical channel identifier in the corresponding relationship to be allocated is extracted and defined as the first physical channel identifier.
[0078] Step 223: Extract the first identification information of the first to-be-matched switch corresponding to the to-be-assigned correspondence relationship, extract the physical channel identifier belonging to the first to-be-matched switch from the first correspondence relationship 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 establish a channel correspondence relationship 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 corresponding relationships, and then return to step 222 until all physical channel identifiers in all second corresponding relationships are traversed.
[0081] by Figure 2 For example, after completing step 221, the second corresponding relationship corresponding to switch S1 is empty, the second corresponding relationship corresponding to switch S2 is (S-S2, (S1-2)), the second corresponding relationship corresponding to switch S3 is (S-S3, (S1-1)), the second corresponding relationship corresponding to switch S4 is (S-S4, (S1-2, S2-6)), the second corresponding relationship corresponding to switch S5 is (S-S5, (S1-2, S2-5)), and the second corresponding relationship corresponding to switch S6 is The second correspondence relationship corresponding to switch S7 is (S-S7, (S1-1, S3-3)), the second correspondence relationship corresponding to switch S8 is (S-S8, (S1-2, S2-6, S4-6)), the second correspondence relationship corresponding to switch S9 is (S-S9, (S1-2, S2-5, S5-4)), and the second correspondence relationship corresponding to switch S10 is (S-S2, (S1-1, S3-4, S6-2)). The second correspondence relationship corresponding to switch S2 has only one physical channel identifier S1-2. The switch corresponding to this second correspondence relationship is S2. The physical channel identifier belonging to switch S2 in the first correspondence relationship 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 relationship. That is, switches S1 and S2 communicate via physical channel S1-2 and physical channel S2-1. The channel identifier S1-2 is then deleted 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, and then identify the topology between any switch and other switches in sequence starting from the initial switch.
[0085] Step 232: After identifying the topology between all switches, a structure table is generated for each switch. The structure table includes the identification information of any switch, the identification information of any lower-level switch, and the number of switches at the bottom layer that are directly and / or indirectly connected to any switch.
[0086] Step 233: Generate a topology structure 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 a physical topology map, there are 4 switches (S7, S8, S9, S10) located at the leaf nodes, and the topology network has a total of four layers. The total width of the topology map is set based on the preset width of a switch icon and the spacing distance between two switches on the same layer. The total height of the topology map is set based on the preset height of a switch icon and the spacing distance between two layers of switches. Then, the above-mentioned physical topology map is generated based on the total width, total height and the physical channel connection relationship between each switch.
[0089] By generating a physical topology diagram, network administrators can intuitively see the physical structure of the switch network, including the connection relationships and communication paths between devices. By understanding the details of the physical connections, network resources can be planned and allocated more effectively, providing a basis for network optimization and switch resource configuration.
[0090] Step 3: Obtain a first value corresponding to the first performance indicator of any switch according to a first preset period, and calculate a second value corresponding to the first performance indicator of any switch based on the first weight coefficient of any switch, the second weight coefficients of all lower-level devices that directly communicate 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 actual application scenarios, and is not limited in the embodiments of the present application.
[0092] For example, the first performance indicator is resource utilization, CPU utilization, etc. Lower-level devices that communicate directly with the switch include switches, terminals, servers, and the like.
[0093] Exemplarily, the calculation formula of the second value is:
[0094]
[0095] Among them, 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 i-th lower-level device, i is a positive integer from 1 to I, and I is the total number of lower-level devices that directly communicate with any switch.
[0096] Set different weight coefficients for different devices (switches, servers, and terminals). The larger the weight coefficient, the higher the priority. This ensures that when the network is congested, data flows with high weight coefficients can be processed first to ensure the performance of critical business applications.
[0097] Specifically, after step 3, the following steps are also included:
[0098] The amount of data flowing through any switch within a second preset time period is obtained according to a second preset period, wherein the second preset period is an integer multiple of the first preset period.
[0099] Calculate an average value of the first performance indicator of any switch within the second preset time period.
[0100] Divide the data volume by the average value to obtain a third value corresponding to the second performance indicator of any switch.
[0101] The second preset period is set according to the experience of those skilled in the art or according to actual application scenarios, and is not limited in the present embodiment.
[0102] Exemplarily, the second performance indicator is the total throughput of the switch, which is the maximum data flow that the switch can process under ideal circumstances.
[0103] Typically, the total throughput of a switch is specified by the manufacturer. However, in actual switch networks, the models and manufacturers of the switches used vary, resulting in individual switches having varying total throughput, efficiency, and capabilities in handling network traffic and data exchange. Furthermore, the periodically obtained value of the first performance indicator only reflects the current traffic and load conditions, and cannot fully reflect the switch's performance under varying traffic and load conditions. To more accurately assess the differences in the efficiency and capabilities of switches in handling network traffic and data exchange, the third value corresponding to each switch's second performance indicator is periodically estimated by analyzing the value of the first performance indicator and the amount of data flowing through the switch. This allows for a more effective understanding of switch performance differences and improves the efficiency and accuracy of switch resource allocation.
[0104] Step 4: Determine whether the second value is greater than or equal to the first preset value. If so, define any switch as a switch to be configured, and then automatically generate a configuration plan for the switch to be configured based on the physical topology diagram and preset rules.
[0105] The first preset value is set according to the experience of those skilled in the art or according to actual application scenarios, and is not limited in the embodiments of the present application.
[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, there is a risk of network congestion and device overload, and the data flowing through the switch needs to be diverted.
[0107] Specifically, step 4 includes:
[0108] Step 41: Identify all lower-level switches that are communicating with the switch to be configured, which are defined as first switches. Identify all upper-level switches that can communicate with any first switch, excluding the switch to be configured, and that have the same upper-level switch as the switch to be configured, which are defined as second switches.
[0109] Step 42: Obtain second values corresponding to the first performance indicators of all second switches, and define second switches whose second values are less than or equal to the first preset value as third switches.
[0110] Step 43: Extract any third switch and calculate the fourth value corresponding to the second performance indicator of any third switch. The calculation formula is:
[0111] CE4=CE3-CE3×RL2,
[0112] 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 of the switch to be configured 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 a fifth value corresponding to the first performance indicator of the candidate switch on the data forwarding path.
[0115] Step 46 , determining whether the fifth value is less than the first preset value; if so, using the data forwarding path as a configuration solution; if not, returning to step 45 .
[0116] The second preset value is set based on the experience of those skilled in the art or based on actual application scenarios, and is not limited in the embodiments of the present application.
[0117] by Figure 3 The technical solution of the present invention is 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 20 Gbps. The lower-level switches communicating with switch S5 are switches S8, S9, and S10. Switch S4 is a switch connected to switch S8 and has the same upper-level switch S2 as switch S5. When transferring the data flow of switch S8 to switch S4, the second value corresponding to the first performance indicator of switch S5 can be made less than the 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 15 Gbps, 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 of S8-S4-S2 can be constructed. If the data volume forwarded from switch S8 to switch S5 is 5 Gbps, when data is forwarded through this path, the fifth value corresponding to the first performance indicator of switch S4 is 88.3%, which is greater than the first preset value. In this case, this data forwarding path cannot be used as a configuration solution. If the data volume forwarded from switch S8 to switch S5 is 1 Gbps, when data is forwarded through this path, the fifth value corresponding to the first performance indicator of switch S4 is 61.7%, which is less than the first preset value. In this case, this data forwarding path can be used as a configuration solution.
[0118] Specifically, step 46 further includes:
[0119] Step 47: If all data forwarding paths do not meet the conditions of step 46, identify all upper-level switches other than the switch to be configured and the second switch that can communicate with any first switch and have the same connection point as the switch to be configured in the physical topology diagram, and define them as fifth switches.
[0120] Step 48: Set the fifth switch as the new second switch, and then repeat steps 42 to 44.
[0121] Step 49: Construct a new data forwarding path based on the candidate switch and the fourth switch, and then calculate a sixth value corresponding to the first performance indicator of each switch between the fourth switch and the connection point on the new data forwarding path.
[0122] Step 50 , determining whether all sixth values are smaller than the first preset value; if so, using the new data forwarding path as a configuration solution; if not, returning to step 49 .
[0123] by Figure 3 For example, the lower-level switches with which switch S5 communicates are switches S8, S9, and S10, and switch S6 is a switch connected to switch S10 and has the same connection point S1 as switch S5. Then, a data forwarding path can also be established through switch S6.
[0124] The technical solution of the present invention comprehensively considers the load conditions and performance differences of each switch in the switch network, dynamically adjusts switch resource allocation through real-time monitoring and prediction, optimizes switch performance globally, prevents network failures caused by switch resource overload, improves the intelligent level of decision-making, and enhances network stability and reliability.
[0125] Step 5: Automatically configure the communication path between switches based on the configuration plan.
[0126] Figure 4 FIG. 1 is a schematic diagram showing a structure of an embodiment of a resource configuration system for a switch provided by the present invention. Figure 4 As shown, the system includes: an intelligent control terminal 10 and a switch 20 , wherein the intelligent control terminal 10 includes a data acquisition module 110 , a topology map 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 obtain 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 include physical channel identifiers of directly and / or indirectly connected counterpart devices.
[0128] The topology map generating module 120 is configured to generate a physical topology map according to the first physical information and the second physical information.
[0129] The data analysis module 130 is configured to obtain a first value corresponding to a first performance indicator of any switch according to a first preset period, and calculate a second value corresponding to the first performance indicator of any switch based on a first weight coefficient of any switch, second weight coefficients of all lower-level devices that directly communicate with the 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. If so, any switch is defined as a switch to be configured, and then a configuration solution is automatically generated for the switch to be configured based on the physical topology diagram and preset rules.
[0131] The configuration update module 150 is used to automatically configure the communication path between switches according to the configuration scheme.
[0132] According to another aspect of an embodiment of the present invention, a computer storage medium is provided. The computer storage medium stores program instructions, wherein when the program instructions are executed, the device where the computer storage medium is located is controlled to execute any one of the above-mentioned resource configuration methods for a switch.
[0133] It should be understood that, although the various steps in the flow chart of each embodiment of the present invention are shown in sequence according to the indication of the arrows, these steps are not necessarily performed in sequence according to the order indicated by the arrows. Unless otherwise specified herein, the execution of these steps is not strictly limited in order, and these steps can be performed in other orders. Moreover, at least a portion of the steps in each embodiment may include a plurality of sub-steps or a plurality of stages, and these sub-steps or stages are not necessarily performed at the same time, but can be performed at different times, and the execution order of these sub-steps or stages is not necessarily performed in sequence, but can be performed in turn or alternately with at least a portion of other steps or sub-steps or stages of other steps.
[0134] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program. The above-mentioned program can be stored in a non-volatile computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this 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 and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), 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).
[0135] The above embodiments merely represent preferred implementations of the present invention. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that a person skilled in the art would be able to make numerous variations and improvements without departing from the spirit of the present invention, all of which fall within the scope of protection of the present invention.
Claims
1. A resource configuration method for a switch, characterized in that: The steps include: Step 1: 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 include physical channel identifiers of directly and / or indirectly connected counterpart devices; Step 2: Generate a physical topology map based on the first physical information and the second physical information; Step 3: obtaining a first value corresponding to the first performance indicator of any of the switches according to a first preset period, and calculating a second value corresponding to the first performance indicator of any of the switches based on a first weight coefficient of any of the switches, a second weight coefficient of all lower-level devices that directly communicate with any of the switches, and the first value; Step 4: determine whether the second value is greater than or equal to a first preset value; if so, define any of the switches as a switch to be configured, and then automatically generate a configuration plan for the switch to be configured based on the physical topology diagram and preset rules; Step 5: Based on the configuration scheme, automatically configure the communication path between switches.
2. The method according to claim 1, characterized in that The step 2 comprises: Step 21: Based on the first physical information, the identification information of the intelligent control terminal is stored correspondingly with the physical channel identifications of all the switches, which is defined as a first corresponding relationship; based on the second physical information corresponding to any of the switches, the identification information of any of the switches is stored correspondingly with the physical channel identifications of other switches, which is defined as a second corresponding relationship; Step 22: performing data deduplication processing on all the second corresponding relationships based on the first corresponding relationships, and constructing channel corresponding relationships between the switches based on the data after the data deduplication processing; Step 23: Based on the channel correspondence, identify the topology between all the switches and construct a topology table; Step 24: Generate the physical topology map based on the topology structure table.
3. The method according to claim 2, characterized in that The step 22 comprises: Step 221: traverse all the second corresponding relationships based on the first corresponding relationship, and when any second corresponding relationship contains the same physical channel identifier as that in the first corresponding relationship, remove the same physical channel identifier from the second corresponding relationship; Step 222: When there is only one physical channel identifier in any of the second corresponding relationships, it is defined as a corresponding relationship to be allocated, and the physical channel identifier in the corresponding relationship to be allocated is extracted and defined as a first physical channel identifier; Step 223: extract the first identification information of the first to-be-matched switch corresponding to the to-be-assigned correspondence relationship, extract the physical channel identifier belonging to the first to-be-matched switch from the first correspondence relationship based on the first identification information, and define it as the second physical channel identifier; Step 224: extract the second switch to be matched corresponding to the first physical channel identifier, and construct the channel correspondence relationship 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; Step 225: Remove the first physical channel identifier from all the second corresponding relationships, and then return to step 222 until all the physical channel identifiers in all the second corresponding relationships are traversed.
4. The method according to claim 2, characterized in that: The step 23 comprises: Step 231: Identify the initial switch connected to the intelligent control terminal based on the channel correspondence, and then identify the topology between any switch and other switches in sequence, starting from the initial switch; Step 232: after identifying the topological structures among all the switches, generate a structure table for each switch, the structure table including identification information of any of the switches, identification information of the lower switches of any of the switches, and the number of switches at the bottom layer directly and / or indirectly connected to any of the switches; Step 233: Generate the topology structure table based on all the structure tables.
5. The method according to claim 1, characterized in that The step 3 further includes: Acquire the amount of data flowing through any of the switches within the second preset time period according to a second preset period, wherein the second preset period is an integer multiple of the first preset period; Calculating an average value of the first performance indicator of any of the switches within the second preset time period; The data volume is divided by the average value to obtain a third value corresponding to the second performance indicator of any of the switches.
6. The method according to claim 5, characterized in that The step 4 comprises: Step 41: Identify all lower-level switches that are communicating with the switch to be configured, which are defined as first switches; identify all upper-level switches that can communicate with any first switch except the switch to be configured and have the same upper-level switch as the switch to be configured, which are defined as second switches; Step 42: Obtain the second value corresponding to the first performance indicator of all the second switches, and define the second switch whose second value is less than or equal to the first preset value as a third switch; Step 43: extract any third switch, and calculate a fourth value corresponding to the second performance indicator of any third switch, using the following calculation formula: CE4=CE3-CE3×RL2, Wherein, CE4 is the fourth value of any of the third switches, CE3 is the third value of any of the third switches, and RL2 is the second value of any of the third switches; 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 of the switch to be configured is less than the first preset value as the fourth switch; Step 45: construct a data forwarding path based on the candidate switch and the fourth switch, and then calculate a fifth value corresponding to the first performance indicator of the candidate switch on the data forwarding path; Step 46, determine whether the fifth value is less than the first preset value, if so, use the data forwarding path as the configuration scheme, if not, return to step 45.
7. The method according to claim 6, characterized in that The step 46 further comprises: Step 47: If all the data forwarding paths do not satisfy the condition of step 46, identify all upper-level switches that can communicate with any first switch except the switch to be configured and the second switch and have the same connection point as the switch to be configured in the physical topology diagram, and define them as fifth switches; Step 48: Use the fifth switch as a new second switch, and then repeat steps 42 to 44; Step 49: construct a new data forwarding path based on the candidate switch and the fourth switch, and then calculate a sixth value corresponding to the first performance indicator of each switch between the fourth switch and the connection point on the new data forwarding path; Step 50, determine whether all the sixth values are smaller than the first preset value, if so, use the new data forwarding path as the configuration scheme, if not, return to step 49.
8. A resource configuration system for a switch, used to implement the method according to any one of claims 1 to 7, characterized in that: It includes: an intelligent control terminal and a switch, wherein the intelligent control terminal includes a data acquisition module, a topology map generation module, a data analysis module, a configuration generation module and a configuration update module; The data acquisition module is used to obtain 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 counterpart devices; The topology map generating module is used to generate a physical topology map according to the first physical information and the second physical information; The data analysis module is configured to obtain a first value corresponding to a first performance indicator of any of the switches according to a first preset period, and calculate a second value corresponding to the first performance indicator of any of the switches based on a first weight coefficient of any of the switches, a second weight coefficient of all lower-level devices that directly communicate with any of the switches, and the first value; The configuration generation module is used to determine whether the second value is greater than or equal to a first preset value, and if so, define any of the switches as a switch to be configured, and then automatically generate a configuration scheme for the switch to be configured based on the physical topology diagram and preset rules; The configuration updating module is used to automatically configure the communication path between switches according to the configuration scheme.
9. A computer storage medium, characterized in that The computer storage medium stores program instructions, wherein when the program instructions are executed, the device where the computer storage medium is located is controlled to execute the method according to any one of claims 1 to 7.
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
Transmission path selection method, information configuration method, terminal, and network device
US20220015002A1
Cited By
Switch configuration method and system
CN121193695A