Modular port adaptation method, apparatus and medium for a switch
By using a modular port adaptation method, the switch port requirements are dynamically determined, and user authentication and control signal generation are performed. This solves the applicability and security issues of the fixed port configuration of traditional switches, and enables flexible adjustment and efficient management.
Patent Information
- Application Number
- CN202411130033.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-16
- Publication Date
- 2025-10-24
- Estimated Expiration
- 2044-08-16
AI Technical Summary
The number and type of ports on traditional switch motherboards are fixed during design and cannot be adjusted based on subsequent changes in demand. This results in low resource utilization and high upgrade costs. The adjustment process is also subject to professional limitations, and its applicability and security need to be improved.
A modular port adaptation method is provided, which dynamically determines port requirements by obtaining the current device application environment information and interface module information of the switch, performs user adaptation authentication, generates module control signals to realize port adaptation, and performs real-time status detection.
It enables flexible adjustment of port configurations according to user needs, reduces professional limitations, improves system scalability and security, reduces the risk of configuration errors, and optimizes network resource allocation and management efficiency.
Smart Images

Figure CN119071153B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present specification relates to the technical field of switches, and in particular to a modular port adaptation method for a switch, a device and a medium. BACKGROUND
[0002] With the rapid development of information technology and the increasing diversification of network applications, the fixed port configuration mode of traditional switches has gradually been difficult to meet the rapidly changing market demand and the flexible network environment. Especially under the promotion of emerging technologies such as cloud computing, big data, and Internet of Things, data centers, enterprise networks, and edge computing scenarios have higher requirements for the flexibility and scalability of switches.
[0003] The number and type of ports (such as RJ45, SFP+, SFP28, etc.) on the mainboard of a traditional switch are fixed at the time of design, and cannot be adjusted according to subsequent changes in demand, resulting in low resource utilization and high upgrade costs.
[0004] When the port type needs to be changed or the number of ports needs to be increased, the entire switch often needs to be replaced, which not only involves hardware replacement, but also involves complex network configuration migration and redeployment, which is extremely likely to cause service interruption and configuration errors. With the popularity of cloud computing, virtualization, and Internet of Things technologies, network structures have become increasingly complex, and switches need to support more interface types and higher bandwidth requirements. Currently, interface expansion can be achieved through plugging, but selecting a plugging location, plugging an interface, etc. requires users to have certain professional skills, which has high requirements for the professionalism of users, and does not monitor the adjustment of the interface by the user, increasing the security risk of the switch device. Therefore, the number and type of ports on the mainboard of a traditional switch are fixed at the time of design, and cannot be adjusted according to subsequent changes in demand, and the adjustment process is subject to professional restrictions, and the applicability and security need to be improved. SUMMARY
[0005] One or more embodiments of the present specification provide a modular port adaptation method for a switch, a device and a medium, which solves the technical problem that the number and type of ports on the mainboard of a traditional switch are fixed at the time of design, and cannot be adjusted according to subsequent changes in demand, and the adjustment process is subject to professional restrictions, and the applicability and security need to be improved.
[0006] One or more embodiments of the present specification adopt the following technical solutions:
[0007] One or more embodiments of the specification provide a modular port adaptation method for a switch, applied to a modular switch including a switch mainboard, at least one interface module, and an interface connection module, the method comprising: under the triggering of a user's port reconfiguration request, obtaining current device application environment information and switch interface module information of the modular switch, to determine port requirement information of the modular switch based on the current device application environment information, wherein the port requirement information includes a required port type; performing adaptation authentication on the user through the switch interface module information and the port reconfiguration request, to determine adaptation permission information of the user on the modular switch, wherein the adaptation permission information includes a plurality of permission interface modules; determining a to-be-controlled interface module corresponding to the modular switch according to the port requirement information and the adaptation permission information; and generating a module control signal corresponding to an interface connection module based on the to-be-controlled interface module, to perform port adaptation on the modular switch through the module control signal, wherein the module control signal includes a plurality of pin control signals.
[0008] Further, based on the current device application environment information, the port requirement information of the modular switch is determined, specifically including: performing specified information extraction on the current device application environment information to determine current network data information corresponding to the modular switch, wherein the current network data information includes current network topology data and current network traffic data; based on the port reconfiguration request, determining target application environment information corresponding to the port reconfiguration request to determine target network data information, wherein the target network data information includes target network topology data and target network traffic data; and determining the port requirement information of the modular switch through the current network data information and the target network data information.
[0009] Further, the user is adapted and authenticated through the switch interface module information and the port reconfiguration request to determine the adaptation permission information of the user on the modular switch, specifically including: obtaining user authentication information corresponding to the port reconfiguration requirement, and obtaining switch permission allocation information corresponding to the modular switch, wherein the switch permission allocation information includes at least one permission organization having port reconfiguration permission and a port reconfiguration range of each of the permission organizations; performing identity authentication on the user through the user authentication information, and determining the home organization information of the user when the user identity authentication is passed; performing reconfiguration permission authentication on the user according to the home organization information of the user and the switch permission allocation information; and when the reconfiguration permission authentication of the user is passed, determining the adaptation permission information of the user on the modular switch through the port reconfiguration range of each of the permission organizations.
[0010] Further, according to the port requirement information and the adaptation permission information, a to-be-controlled interface module corresponding to the modular switch is determined, specifically including: determining a port adaptation range of the user corresponding to the adaptation permission information, wherein the port adaptation range includes at least one new port type; and matching in the port adaptation range according to a required port type in the port requirement information, to determine the to-be-controlled interface module corresponding to the modular switch.
[0011] Further, based on the to-be-controlled interface module, a module control signal corresponding to an interface connection module is generated, specifically including: matching in a pre-constructed interface mapping truth table through an interface type of the to-be-controlled interface module, to determine a pin level truth combination corresponding to the to-be-controlled interface module; and generating a connection pin level control signal of the interface connection module according to the pin level truth combination corresponding to the to-be-controlled interface module.
[0012] Further, the interface connection module includes a board-to-board connector, used for manual docking of a switch mainboard and a plurality of interface boards, and the modular switch is adapted through the module control signal, specifically including: when the interface type of the to-be-controlled interface module does not belong to a fixed interface type in the switch interface module information, plugging and unplugging labels are marked in the interface connection module according to a preset indication rule through the module control signal; and the modular switch is adapted through the module control signal based on plugging and unplugging trigger information of the interface board of the user, triggered by the plugging and unplugging trigger information.
[0013] Further, the modular switch is adapted through the module control signal, specifically including: when the interface type of the to-be-controlled interface module belongs to the fixed interface type in the switch interface module information, a target control pin of the interface connection module is determined according to the module control signal corresponding to the interface connection module; an enable state of each target control pin is determined according to the pin level truth combination corresponding to the to-be-controlled interface module; and the modular switch is adapted through the enable state of each target control pin.
[0014] Further, after the modular switch is adapted through the module control signal, the method further includes: performing port state detection on the modular switch to determine a real-time port state, so as to evaluate the port adaptation process through the real-time port state.
[0015] One or more embodiments of the present specification provide a modular port adaptation device for a switch, including:
[0016] at least one processor; and
[0017] a memory in communication with the at least one processor; wherein
[0018] The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the above method.
[0019] The one or more embodiments of the specification provide a non-volatile computer storage medium storing computer executable instructions configured to execute the above method.
[0020] The above at least one technical solution adopted by the embodiments of the specification can achieve the following beneficial effects: through the above technical solution, the port requirement is dynamically determined according to the actual demand of the user and the current device application environment information, so as to select the most suitable interface module for adaptation, thereby reducing the professional limitation in the manual configuration process, and having flexibility, so that the modular switch can easily cope with various network scenes and demand changes; when a new interface module needs to be added or the existing module needs to be upgraded, it can be realized through a simple adaptation process, without the need to make large-scale hardware or software changes to the switch, thereby improving the scalability of the system; through the adaptation authentication process, it can be ensured that only users with corresponding permissions can perform port adaptation on the modular switch, effectively preventing unauthorized access and misoperation, and enhancing the security of the system; according to the port requirement information and the adaptation permission information, the interface module to be controlled can be accurately selected, avoiding waste of resources and unnecessary configuration; through the generation of accurate module control signals, perfect adaptation between the interface connection module and the interface module to be controlled can be ensured, thereby optimizing the allocation of network resources, and the automatic adaptation process reduces the need for manual intervention, improves the efficiency and accuracy of adaptation. The module control signal generated in real time can quickly respond to the port reconfiguration request, shorten the adaptation time, and reduce the risk of business interruption caused by configuration errors or delays. BRIEF DESCRIPTION OF DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in the embodiments of the specification or the prior art, the drawings needed in the embodiment or prior art description will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments described in the specification, and those skilled in the art can also obtain other drawings according to these drawings without creative labor. In the drawings:
[0022] Figure 1 A flowchart of a modular port adaptation method for a switch is provided for the embodiments of the specification.
[0023] Figure 2 A structural schematic diagram of a modular switch provided for an embodiment of the present specification is shown in FIG. 1.
[0024] Figure 3 A structural schematic diagram of another modular switch provided for an embodiment of the present specification is shown in FIG. 2.
[0025] Figure 4 A structural schematic diagram of a modular port adaptation device for a switch provided for an embodiment of the present specification is shown in FIG. 3. DETAILED DESCRIPTION
[0026] In order to enable those skilled in the art to better understand the technical solutions in the present specification, the technical solutions in the present specification will be described clearly and completely in conjunction with the drawings in the embodiments of the present specification. Obviously, the described embodiments are only part of the embodiments of the present specification, rather than all the embodiments. Based on the embodiments of the present specification, all other embodiments obtained by those skilled in the art without creative labor should fall within the scope of protection of the present specification.
[0027] With the rapid development of information technology and the increasing diversification of network applications, the fixed port configuration mode of traditional switches has gradually been difficult to meet the rapidly changing market demand and the flexible network environment. Especially under the promotion of emerging technologies such as cloud computing, big data, and Internet of Things, data centers, enterprise networks, and edge computing scenarios have higher requirements for the flexibility and scalability of switches.
[0028] The number and type of ports (such as RJ45, SFP+, SFP28, etc.) on the mainboard of a traditional switch are fixed at the design time, and cannot be adjusted according to subsequent demand changes, resulting in low resource utilization and high upgrade cost.
[0029] When the port type needs to be changed or the number of ports needs to be increased, the entire switch often needs to be replaced, which not only involves hardware replacement, but also involves complex network configuration migration and redeployment, which is extremely likely to cause service interruption and configuration errors. With the popularization of technologies such as cloud computing, virtualization, and Internet of Things, the network structure becomes increasingly complex, and switches need to support more interface types and higher bandwidth requirements. Currently, the expansion of interfaces can be achieved through plugging, but the selection of plugging positions and plugging interfaces requires users to have certain professional skills, which has high requirements for the professionalism of users, and the adjustment of interfaces by users is not monitored, increasing the security risk of switch devices. Therefore, the number and type of ports on the mainboard of a traditional switch are fixed at the design time, and cannot be adjusted according to subsequent demand changes, and the adjustment process is subject to professional restrictions, and the applicability and security need to be improved.
[0030] The embodiment of the present specification provides a modular port adaptation method for a switch. It should be noted that the execution subject in the embodiment of the present specification can be a server or any device with data processing capability. Figure 1 A flowchart of a modular port adaptation method for a switch provided by the embodiment of the present specification is shown in Figure 1 , which mainly includes the following steps:
[0031] In step S101, under the triggering of a user's port reconfiguration request, current device application environment information and switch interface module information of a modular switch are obtained, so as to determine port requirement information of the modular switch based on the current device application environment information.
[0032] The port requirement information includes a required port type.
[0033] In an embodiment of the present specification, the modular switch includes a switch mainboard, at least one interface module, and an interface connection module. Figure 2 A structural diagram of a modular switch provided by the embodiment of the present specification is shown in Figure 2 , which includes a power supply module, a power board, a switch mainboard, and three flexible port modules given as examples. Figure 3 Another structural diagram of a modular switch provided by the embodiment of the present specification is shown in Figure 2 and Figure 3 . Unlike conventional or existing designs, the switch mainboard and the flexible port module are different. The switch mainboard and the flexible port module are connected by board-to-board connection. The switch mainboard is a mainboard that meets various high-speed interfaces, and the network main control chip uses a network control chip that supports the highest speed. The flexible port module is a general term for various network interfaces, and can include many different interface boards, such as RJ45 interface boards, SFP+ interface boards, QSFP interface boards, etc. The interface connection module is a high-speed board-to-board connector, which can also be other interface connection modules. The type and number of interface connection modules are not limited here. In this example, when the client needs a switch with only RJ45 interfaces, the flexible port module needs to be replaced with an RJ45 interface board. This flexible interface module and the switch mainboard use a board-to-board connector to realize a switch with all RJ45 interfaces. When a switch with some SFP+ interfaces is needed, the original interface board that needs to be replaced is pulled out and replaced with an SFP+ interface board without touching the switch mainboard. When a switch with some QSFP interfaces is needed, the original interface board that needs to be replaced is pulled out and replaced with a QSFP interface board without touching the switch mainboard.
[0034] In an embodiment of the present specification, the switch mainboard comprises a network master chip and a network physical layer chip. The network master chip generally refers to a network control center chip supporting the highest network rate, which can support data processing at different network interface rates. The network physical layer chip refers to converting high-speed signals such as SGMII or RGMII output by the network master chip into high-speed signals such as MDI or XFI. In addition, the modular switch further comprises an interface connection module. The interface connection module here can be a high-speed board-to-board connector. The high-speed board-to-board connector refers to a high-speed connector supporting board-to-board plugging. It is a kind of straight plug connector supporting the highest speed, which is used for docking the switch mainboard and various different interface boards.
[0035] In an embodiment of the present specification, a user-friendly interface or API interface is provided through a preset switch management platform, so that users can submit port reconfiguration requests, receive user port reconfiguration requests, and include user authentication information and modular switches that need to be reconfigured in the port reconfiguration request. The user authentication information includes user role information and user organization information. In the port reconfiguration request, if the user has sufficient professional knowledge, the user can choose to directly provide the reconfiguration type, otherwise, the user can not directly provide the reconfiguration operation, and provide professional reconfiguration operation suggestions by clearly specifying the application environment of the switch device and analyzing the subsequent switch application. For example, increasing, reducing, or changing the port type, and related port or module identification. In this case, under the trigger of the user's port reconfiguration request, the current device application environment information and switch interface module information of the modular switch are obtained. It should be noted that the switch interface module information here refers to the existing interface module, which can be the existing multiple interface modules after the last reconfiguration. Through SNMP (Simple Network Management Protocol), CLI (Command Line Interface), or other network management protocols, administrators can remotely access and monitor the status and performance of the switch. These protocols allow administrators to collect various data on the switch in real time, including but not limited to interface status, traffic statistics, error logs, etc. Based on the current device application environment information, the port requirement information of the modular switch is determined.
[0036] Based on the current device application environment information, the port requirement information of the modular switch is determined, specifically including: extracting specified information from the current device application environment information to determine the current network data information corresponding to the modular switch, wherein the current network data information includes current network topology data and current network traffic data; based on the port reconfiguration request, determining the target application environment information corresponding to the port reconfiguration request to determine the target network data information, wherein the target network data information includes target network topology data and target network traffic data; and determining the port requirement information of the modular switch through the current network data information and the target network data information.
[0037] In one embodiment of the present specification, after a large amount of raw data corresponding to the current device application environment information is collected, it is necessary to extract the key data directly related to the port reconfiguration request from the current device application environment information. The data mainly includes current network topology data and current network traffic data. The current network topology data includes the position of the switch in the network, the connection relationship with other devices (such as direct connection, cascade, stacking, etc.), VLAN division, subnet division, etc. Through the topology data, the physical and logical structure of the network can be clearly understood. The current network traffic data involves the traffic distribution, traffic size, traffic type (such as voice, video, data, etc.) and flow direction in the network. Traffic data is crucial for assessing network load, identifying potential bottlenecks and planning port reconfiguration.
[0038] Based on the port reconfiguration request, the target application environment after reconfiguration needs to be determined, including user's expected network structure, performance requirements, security needs, etc. Through the analysis of these needs, the target network topology data and the target network traffic data can be determined. The target network topology data reflects the physical and logical structure of the network after reconfiguration, including the addition or removal of connections, the redivision of VLANs, the reconstruction of subnets, etc. The target network traffic data predicts the traffic distribution and traffic size in the network after reconfiguration. According to the business requirements and expected growth, the future network traffic trend and possible peak period can be estimated. By comparing the current network data information and the target network data information, the changes in network structure and traffic demand can be identified, so as to determine the port demand information of the modular switch. According to the newly added or changed connections in the target network topology, the number of ports that need to be added or reduced can be calculated. According to the newly added or changed connections in the target network topology, the number of ports that need to be added or reduced can be calculated. According to the proportion of different traffic types and performance requirements in the target network traffic data, the type of required ports (such as copper, fiber, gigabit, etc.) can be determined. In addition, based on the security requirements and performance requirements of the target network, the VLAN attribution, QoS policy, security policy, etc. of the port can also be configured. In the modular switch, different positions of the modules may have different performance and functions. Therefore, when determining the port demand, the physical location of the port also needs to be considered in order to achieve the best performance and scalability.
[0039] Through the technical solution, the modular switch can flexibly adjust the port configuration according to needs, adapt to different network application environments, help to quickly respond to network changes, meet business development needs, and through detailed analysis of current network data information and target network data information, the actual needs of the switch port can be more accurately determined, thereby avoiding resource waste, for example, in an environment that does not require high-speed ports, unnecessary high-cost investment can be avoided; configuration adjustment based on accurate port demand information can ensure reasonable allocation and efficient use of network resources, thereby improving the overall performance of the network, for example, increasing bandwidth and port quantity in high-traffic areas can significantly reduce network latency and packet loss rate; the automatic information extraction and demand analysis process can reduce manual intervention, avoid the professional limitations of manual reconfiguration, and reduce the risk of human error. Precise port configuration can prolong the service life of the equipment and reduce the cost of frequent equipment replacement or upgrade.
[0040] In step S102, the user is authenticated for adaptation through the switch interface module information and the port reconfiguration request to determine the adaptation permission information of the user to the modular switch.
[0041] The adaptation permission information includes a plurality of permission interface modules.
[0042] In an embodiment of the present specification, the user is authenticated for adaptation through the switch interface module information and the port reconfiguration request to determine the adaptation permission information of the user to the modular switch, ensuring that only authorized users can configure or modify the switch, thereby protecting the security and stability of the network.
[0043] The user is authenticated for adaptation through the switch interface module information and the port reconfiguration request to determine the adaptation permission information of the user to the modular switch, specifically including: obtaining user authentication information corresponding to the port reconfiguration demand, and obtaining switch permission allocation information corresponding to the modular switch, wherein the switch permission allocation information includes at least one permission organization with port reconfiguration permission and a port reconfiguration range of each permission organization; through the user authentication information, the user is authenticated for identity, and when the user identity authentication is passed, the home organization information of the user is determined; according to the home organization information of the user and the switch permission allocation information, the user is authenticated for reconfiguration permission; when the reconfiguration permission authentication of the user is passed, through the port reconfiguration range of each permission organization, the adaptation permission information of the user to the modular switch is determined.
[0044] In an embodiment of the present specification, user authentication information and switch permission allocation information are obtained. User authentication information: this usually includes the user's username, password, digital certificate, token or other information required by the identity verification mechanism, used to verify the user's identity. Switch permission allocation information contains detailed allocation of port reconfiguration permissions on the switch. Specifically, it includes at least two parts: one is the list of permission organizations with port reconfiguration permissions, and the other is the port reconfiguration range authorized for each permission organization (for example, a specific port number range, a specific interface module, etc.). Using the obtained user authentication information, the system or authentication server verifies the user's identity, and the verification process may include password comparison, digital certificate verification, token validity check, etc. If the user's identity authentication is passed, the system continues to process; if not, the user's request is rejected and an error message may be returned.
[0045] After the user's identity authentication is passed, the system needs to determine the user's permission organization, which is usually achieved by querying the user information database or user configuration file, which records the association information between the user and the permission organization. According to the user's home organization information and switch permission allocation information, the system checks whether the user has the permission to reconfigure the ports of the modular switch. Compare the user's home organization with the list of permission organizations in the switch permission allocation information, and check whether the user is within the port reconfiguration range of his home organization. If the user's reconfiguration permission authentication is passed, the system will further determine the specific adaptation permission information of the user for the modular switch, including the port number range that the user can modify and the parameter type that can be configured, and it needs to be noted that the adaptation permission information is determined according to the port reconfiguration range of the user's home organization in the switch permission allocation information. After the user's adaptation permission information is determined and meets the requirements, the user's submitted port reconfiguration request can be executed to modify the configuration of the modular switch accordingly. If the user fails in any authentication step (such as identity authentication, reconfiguration permission authentication), the system will refuse to execute the request and return the corresponding error prompt information to the user.
[0046] Through the above technical solution, through strict user identity authentication and reconfiguration permission authentication, it can be ensured that only users who are legal and have corresponding permissions can reconfigure the modular switch, reducing the risk of unauthorized access and malicious configuration, thereby enhancing the overall security of the network; The automated identity authentication and permission verification process reduces the need for manual review, allowing administrators to more efficiently handle user requests, and clear permission allocation and adaptation permission information allows users to clearly understand their operating range and limitations in the network, improving management efficiency; By setting specific port reconfiguration ranges for each permission organization, it can be ensured that network resources are allocated reasonably, and only authorized organizations can make configuration changes within their permission range, avoiding waste and abuse of resources.
[0047] In step S103, a to-be-controlled interface module corresponding to the modular switch is determined according to the port requirement information and the adaptation permission information.
[0048] According to the port requirement information and the adaptation permission information, the to-be-controlled interface module corresponding to the modular switch is determined, specifically including: determining a port reconfiguration range of the user corresponding to the adaptation permission information, wherein the port reconfiguration range includes at least one new port type; and matching the demand port type in the port requirement information in the port reconfiguration range to determine the to-be-controlled interface module corresponding to the modular switch. The to-be-controlled interface module here belongs to the new port type in the port reconfiguration range and also matches the demand port type in the port requirement information.
[0049] By matching the adaptation permission information of the user and the actual port requirement information, it can be accurately determined which interface module should be modified or controlled, unnecessary operations are avoided, the risk of incorrect configuration is reduced, and effective use of network resources is ensured; the port reconfiguration range of the user can include multiple different types of ports, such as high-speed Ethernet ports, fiber ports, etc., by matching the demand port type, the system can flexibly select the most suitable interface module for configuration to meet different network requirements, reducing the time for manually searching and configuring interface modules and improving management efficiency; the adaptation permission information limits the port range that can be modified by the user, reduces potential security risks, and protects the network from unauthorized access or malicious configuration.
[0050] In step S104, a module control signal corresponding to the interface connection module is generated based on the to-be-controlled interface module, so as to perform port adaptation on the modular switch through the module control signal.
[0051] The module control signal includes a plurality of pin control signals.
[0052] Based on the to-be-controlled interface module, a module control signal corresponding to the interface connection module is generated, specifically including: matching the interface type of the to-be-controlled interface module in a pre-constructed interface mapping truth table to determine a pin level truth combination corresponding to the to-be-controlled interface module; and generating a connection pin level control signal of the interface connection module according to the pin level truth combination corresponding to the to-be-controlled interface module.
[0053] In one embodiment of the present specification, different types of interface mapping truth tables are constructed in advance, as shown in the following table, taking the RJ45 interface board as an example. The network physical layer chip of the switch mainboard has 3 pins, which are defined as BOARD ID0, BOARD ID1, and BOARD PRSNT N signal respectively. BOARD ID0 and BOARD ID1 are used to determine the type of interface board, and BOARD PRSNT N signal is used to identify whether the interface board is normally inserted into the switch mainboard. The interface board (taking the RJ45 interface board as an example, not specifically referred to) also has 3 pins from the high-speed board-to-board connector, which have the same definition as the corresponding pins of the switch board. The BOARD PRSNT N signal must be connected to GND on the interface board to prove that the interface board has been connected to the switch mainboard. BOARD ID0 and BOARD ID1 are used to distinguish different interface boards, with high level as "1" and low level as "0".
[0054] Interface board type BOARD ID 0 BOARD ID 1 RJ45 interface board 1 1 SFP+ interface board 1 0 QSFP+ interface board 0 1 QSFP28 interface board 0 0
[0055] In addition to the above interface mapping truth table, the pin level configuration on the physical layer of each interface type can also be determined, which can include high level (High), low level (Low), floating (Floating), or specific voltage value, etc. According to the relationship between the interface type and the pin level, an interface mapping truth table is created. This table should include the interface type as input and the corresponding pin level truth combination as output. The interface type of the interface module to be controlled is used as input, and the corresponding pin level truth combination is found in the interface mapping truth table. According to the pin level truth combination corresponding to the interface module to be controlled, the connection pin level control signal of the interface connection module is generated. According to the pin level truth combination queried from the truth table, the level state that each pin should be in is parsed. Based on the parsed pin level state, the signal for controlling the level of the connection pin of the interface connection module is generated, which can be sent to the control circuit of the interface connection module in the form of digital signal (such as 0 and 1 representing low level and high level). The generated control signal is sent to the interface connection module through a suitable communication interface (such as I2C, SPI, GPIO, etc.). The interface connection module adjusts the level state of its connection pin according to the received control signal to realize the correct connection with the interface module to be controlled.
[0056] The interface connection module includes a board-to-board connector for manual docking of the switch mainboard and various interface boards, and port adaptation of the modular switch is controlled by the module control signal. Specifically, when the interface type of the control interface module does not belong to the fixed interface type in the switch interface module information, plug-in labeling is performed in the interface connection module according to a preset indication rule through the module control signal. Through the plug-in labeling, interface board plug-in trigger information of the user is received, and the modular switch is port adapted under the trigger of the interface board plug-in trigger information.
[0057] In an embodiment of the present specification, when the interface type of the control interface module does not belong to the fixed interface type in the switch interface module information, the user needs to be guided to manually plug in the peripheral interface. Through the module control signal, plug-in labeling is performed in the interface connection module according to a preset indication rule, for example, an RJ45 interface board is indicated by red. Through the plug-in labeling, the user is guided to plug in the interface board of the specified type, and the interface board plug-in trigger information of the user is received. The modular switch is port adapted under the trigger of the interface board plug-in trigger information.
[0058] The modular switch is port adapted by the module control signal. Specifically, when the interface type of the control interface module belongs to the fixed interface type in the switch interface module information, the target control pin of the interface connection module is determined according to the module control signal corresponding to the interface connection module. The enable state of each target control pin is determined according to the true value combination of the pin level corresponding to the control interface module. The modular switch is port adapted through the enable state of each target control pin.
[0059] In one embodiment of the present specification, when the interface type of the to-be-controlled interface module belongs to the fixed interface type in the switch interface module information, it indicates that the to-be-controlled interface module belongs to this switch but is not connected. The control signal is decoded to obtain the specific control instruction of each pin; the decoded control instruction is mapped to the actual physical pin on the interface connection module, and the physical pin will adjust its level state or perform other control functions according to the control signal. The pin level true value combination corresponding to the to-be-controlled interface module determined before is used as a reference to represent the level state (such as high level, low level or specific voltage value) that each pin should be in during the adaptation process. Each level state in the pin level true value combination is matched with the target control pin to determine the enable state of each pin. The enable state can be activated (such as high level) or disabled (such as low level), depending on the communication protocol and electrical specification between the interface connection module and the to-be-controlled interface module. According to the enable state of the target control pin, the corresponding control signal is sent to the interface connection module. These signals can be direct level signals or instructions sent through a certain communication protocol (such as I2C, SPI, etc.). After receiving the control signal, the interface connection module will adjust the level state of its target control pin according to the signal indication, ensuring that the interface connection module can correctly interface with the to-be-controlled interface module, realizing the matching of physical connection and electrical signal.
[0060] By generating the module control signal, the interface connection module can be flexibly controlled to adapt to different types and specifications of to-be-controlled interface modules, so that the modular switch can adapt to various network environments and application requirements. When new interface modules need to be added or existing modules need to be upgraded, only the corresponding module control signal needs to be regenerated, without the need for large-scale software modification of the switch; by accurately controlling the pin level and other parameters of the interface connection module, perfect adaptation of the to-be-controlled interface module to the switch port can be ensured, avoiding network failures caused by configuration errors or compatibility problems; the generation and transmission process of the module control signal usually follows strict protocols and specifications, reducing signal interference and transmission errors and improving the reliability of port adaptation; the module control signal can be automatically generated by programming or configuration tools, which can realize the automatic configuration of the switch port and simplify the configuration process; the module control signal can be centrally generated and managed, so that the network administrator can more conveniently perform batch configuration and monitoring of the switch port.
[0061] After the port adaptation of the modular switch through the module control signal, the method further comprises: performing port state detection on the modular switch to determine the corresponding real-time port state, so as to evaluate the port adaptation process through the real-time port state.
[0062] In an embodiment of the present specification, the current state data of each port is collected in real time by using the monitoring tool built-in the switch or external network management system (NMS), including link state (such as linked / unlinked), speed (such as 100 Mbps, 1 Gbps, etc.), duplex mode (full duplex / half duplex), error count (such as CRC error, frame error, etc.), and traffic statistics, etc. The collected port state data is parsed and processed to extract key state information for subsequent adaptation evaluation.
[0063] According to the parsed port state data, the port state is divided into different categories, such as normal state, warning state, error state, etc., and the state classification should be based on the preset threshold and condition. The real-time port state is fed back to the network administrator in the form of graphical interface, log record or alarm notification, etc. Before port adaptation, a set of clear adaptation evaluation criteria is formulated, including port connection speed, data transmission stability, error rate, packet loss rate, etc. The real-time port state is compared with the adaptation evaluation criteria to evaluate the effect of port adaptation, and the evaluation process involves comprehensive analysis of multiple indicators to determine whether the port meets the expected performance and stability requirements. Through real-time port state detection, problems such as unstable port connection and data transmission error can be found in time, so that faults can be quickly located and repaired, avoiding the problem of expanding the influence on the overall stability and reliability of the network. Adaptation evaluation can predict and identify potential network risks such as mismatched port speed and duplex mode conflict, and by adjusting and optimizing the configuration in advance, these risks can be effectively prevented.
[0064] Through the above technical solutions, the port requirements can be dynamically determined according to the actual needs of the user and the current device application environment information, so as to select the most suitable interface module for adaptation, reducing the professional limitations in the manual configuration process and having flexibility, so that the modular switch can easily cope with various network scenarios and changes in demand; when new interface modules need to be added or existing modules need to be upgraded, it can be realized through a simple adaptation process without the need for large-scale hardware or software changes to the switch, thereby improving the scalability of the system; through the adaptation authentication process, only users with appropriate permissions can perform port adaptation on the modular switch, effectively preventing unauthorized access and misoperation, and enhancing the security of the system; according to the port requirement information and adaptation permission information, the interface module to be controlled can be accurately selected, avoiding waste of resources and unnecessary configuration; by generating accurate module control signals, perfect adaptation between the interface connection module and the interface module to be controlled can be ensured, thereby optimizing the allocation of network resources. The automatic adaptation process reduces the need for manual intervention, improves the efficiency and accuracy of adaptation. The real-time generated module control signal can quickly respond to port reconfiguration requests, shorten the adaptation time, and reduce the risk of business interruption caused by configuration errors or delays.
[0065] The embodiment of the present specification also provides a modular port adaptation device for a switch, as shown in the accompanying drawings, the device comprises: at least one processor; and a memory connected with the at least one processor in communication; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the above method. Figure 4 The embodiment of the present specification also provides a modular port adaptation device for a switch, as shown in the accompanying drawings, the device comprises: at least one processor; and a memory connected with the at least one processor in communication; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the above method.
[0066] The embodiment of the present specification also provides a non-volatile computer storage medium, which stores computer executable instructions, and the computer executable instructions are configured to execute the above method.
[0067] Each of the embodiments in the present specification is described in a progressive manner, and the same or similar parts of each embodiment can be referred to each other. Each embodiment focuses on the difference from other embodiments. In particular, for the device, equipment, and non-volatile computer storage medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the part of the method embodiment.
[0068] The above describes specific embodiments of the present specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in an order different than the order in the embodiments and still achieve the desired result. In addition, the processes depicted in the accompanying drawings do not necessarily require the particular order shown or sequential order to achieve the desired results. In certain implementations, multitasking and parallel processing can be advantageous or possible.
[0069] The device and medium provided by the embodiments of the present specification are one-to-one corresponding to the method, and therefore, the device and medium also have similar beneficial technical effects to the method. Since the beneficial technical effects of the method have been described in detail above, the beneficial technical effects of the device and medium will not be described here.
[0070] Those skilled in the art will appreciate that the embodiments of the present specification can be provided as a method, system, or computer program product. Therefore, the present specification can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present specification can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0071] The specification is presented with reference to flow diagrams and / or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the specification. It will be understood that each block of the flow diagrams and / or block diagrams, and combinations of blocks in the flow diagrams and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processing element or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flow diagrams and / or block diagrams block or blocks. Figure 1 The flow diagrams and / or block diagrams in the specification can present a method, apparatus or computer program product according to embodiments of the specification. Flow diagrams and / or block diagrams can also present a method, apparatus or computer program product to achieve functions specified in flow diagrams and / or block diagrams block or blocks. Figure 1 The flow diagrams and / or block diagrams in the specification can present a method, apparatus or computer program product according to embodiments of the specification. Flow diagrams and / or block diagrams can also present a method, apparatus or computer program product to achieve functions specified in flow diagrams and / or block diagrams block or blocks.
[0072] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instructions which implement the flow diagrams and / or block diagrams block or blocks. Figure 1 The flow diagrams and / or block diagrams in the specification can present a method, apparatus or computer program product according to embodiments of the specification. Flow diagrams and / or block diagrams can also present a method, apparatus or computer program product to achieve functions specified in flow diagrams and / or block diagrams block or blocks. Figure 1 The flow diagrams and / or block diagrams in the specification can present a method, apparatus or computer program product according to embodiments of the specification. Flow diagrams and / or block diagrams can also present a method, apparatus or computer program product to achieve functions specified in flow diagrams and / or block diagrams block or blocks.
[0073] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the flow diagrams and / or block diagrams block or blocks. Figure 1 The flow diagrams and / or block diagrams in the specification can present a method, apparatus or computer program product according to embodiments of the specification. Flow diagrams and / or block diagrams can also present a method, apparatus or computer program product to achieve functions specified in flow diagrams and / or block diagrams block or blocks. Figure 1 The flow diagrams and / or block diagrams in the specification can present a method, apparatus or computer program product according to embodiments of the specification. Flow diagrams and / or block diagrams can also present a method, apparatus or computer program product to achieve functions specified in flow diagrams and / or block diagrams block or blocks.
[0074] In one typical configuration, the computing device includes one or more processors (CPU's), input / output interfaces, network interfaces, and memory.
[0075] The memory can include non-persistent memory and / or persistent memory, such as flash memory, read-only memory (ROM), and / or volatile or non-volatile random access memory (RAM), among others. The memory is an example of computer-readable media.
[0076] Computer-readable media includes permanent and non-permanent, movable and non-movable media that can implement information storage by any method or technology. Information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information accessible to a computing device. According to the definition herein, computer-readable media does not include transitory media such as modulated data signals and carriers.
[0077] It should also be noted that the terms "comprising", "containing", or any other variant thereof are intended to cover non-exclusive inclusions, such that a process, method, article or apparatus that comprises a list of elements does not only include those elements, but can also include other elements not expressly listed or inherent to such process, method, article or apparatus. Without more limitations, the element defined by the phrase "comprising a" does not exclude the presence of additional identical elements in the process, method, article or apparatus that includes the element.
[0078] The above description is only one or more embodiments of the present specification and is not intended to limit the present specification. One or more embodiments of the present specification can have various modifications and changes for those skilled in the art. Any modification, equivalent replacement, improvement, etc. within the spirit and principles of one or more embodiments of the present specification should be included in the scope of the claims of the present specification.
Claims
1. A modular port adaptation method for a switch, characterized by, The method is applied to a modular switch, the modular switch comprising a switch mainboard, at least one interface module and an interface connection module, and the method comprises: Under the triggering of a port reconfiguration request of a user, current device application environment information and switch interface module information of the modular switch are acquired to determine port requirement information of the modular switch based on the current device application environment information, wherein the port requirement information comprises a required port type; Through the switch interface module information and the port reconfiguration request, the user is authenticated for adaptation to determine adaptation permission information of the user to the modular switch, wherein the adaptation permission information comprises a plurality of permission interface modules; According to the port requirement information and the adaptation permission information, a to-be-controlled interface module corresponding to the modular switch is determined; Based on the to-be-controlled interface module, a module control signal corresponding to an interface connection module is generated to perform port adaptation on the modular switch through the module control signal, wherein the module control signal comprises a plurality of pin control signals; Based on the current device application environment information, the port requirement information of the modular switch is determined, specifically comprising: The current device application environment information is extracted for specified information to determine current network data information corresponding to the modular switch, wherein the current network data information comprises current network topology data and current network traffic data; Based on the port reconfiguration request, target application environment information corresponding to the port reconfiguration request is determined to determine target network data information, wherein the target network data information comprises target network topology data and target network traffic data; Through the current network data information and the target network data information, the port requirement information of the modular switch is determined.
2. The modular port adaptation method for a switch of claim 1, wherein, Through the switch interface module information and the port reconfiguration request, the user is authenticated for adaptation to determine adaptation permission information of the user to the modular switch, specifically comprising: User authentication information corresponding to the port reconfiguration requirement is acquired, and switch permission allocation information corresponding to the modular switch is acquired, wherein the switch permission allocation information comprises at least one permission organization having port reconfiguration permission and a port reconfiguration range of each permission organization; Through the user authentication information, the user is authenticated for identity, and when the user identity authentication is passed, the home organization information of the user is determined; According to the home organization information of the user and the switch permission allocation information, the user is authenticated for reconfiguration permission; When the reconfiguration permission authentication of the user is passed, the adaptation permission information of the user to the modular switch is determined through the port reconfiguration range of each permission organization.
3. The modular port adaptation method for a switch of claim 1, wherein, According to the port requirement information and the adaptation permission information, the to-be-controlled interface module corresponding to the modular switch is determined, specifically comprising: The port reconfiguration range of the user corresponding to the adaptation permission information is determined, wherein the port reconfiguration range comprises at least one new port type; According to the demand port type in the port demand information, matching is performed in the port reconfiguration range to determine a to-be-controlled interface module corresponding to the modular switch.
4. The modular port adaptation method for a switch of claim 1, wherein, Based on the to-be-controlled interface module, a module control signal corresponding to an interface connection module is generated, specifically including: Through the interface type of the to-be-controlled interface module, matching is performed in a pre-constructed interface mapping truth table to determine a pin level truth combination corresponding to the to-be-controlled interface module; According to the pin level truth combination corresponding to the to-be-controlled interface module, a connection pin level control signal of the interface connection module is generated.
5. The modular port adaptation method for a switch of claim 4, wherein, The interface connection module includes a board-to-board connector for manual docking of a switch mainboard and various interface boards, and through the module control signal, port adaptation of the modular switch is performed, specifically including: When the interface type of the control interface module does not belong to the fixed interface type in the switch interface module information, through the module control signal, plug-in labeling is performed in the interface connection module according to a preset indication rule; Through the plug-in labeling, interface board plug-in trigger information of the user is received, and under the trigger of the interface board plug-in trigger information, port adaptation of the modular switch is performed.
6. The modular port adaptation method for a switch of claim 4, wherein, Through the module control signal, port adaptation of the modular switch is performed, specifically including: When the interface type of the control interface module belongs to the fixed interface type in the switch interface module information, according to the module control signal corresponding to the interface connection module, a target control pin of the interface connection module is determined; According to the pin level truth combination corresponding to the to-be-controlled interface module, an enable state of each target control pin is determined; Through the enable state of each target control pin, port adaptation of the modular switch is performed.
7. The modular port adaptation method for a switch of claim 1, wherein, After port adaptation of the modular switch is performed through the module control signal, the method further includes: Port state detection of the modular switch is performed to determine a corresponding real-time port state, so as to perform adaptation evaluation of the port adaptation process through the real-time port state.
8. A modular port adapting device for a switch, characterized in that The device includes: at least one processor; and a memory connected in communication with the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-7.
9. A non-transitory computer storage medium storing computer-executable instructions that, when executed, cause a computer to perform: The computer executable instructions are configured to perform the method of any one of claims 1-7.
Citation Information
Patent Citations
Switch port adaptation method, system and device and readable storage medium
CN115604374A
Extension structure of switch
CN221177742U