Network port configuration method and electronic equipment
The target policy is determined by the preset policy library mapping relationship, the binding relationship between the shared network port and the target network port is adjusted and the status parameters are updated, which solves the problem of low efficiency in shared network port management in complex network environments and realizes efficient and reliable status switching and configuration.
Patent Information
- Application Number
- CN202511179078.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-21
- Publication Date
- 2025-09-30
- Estimated Expiration
- 2045-08-21
AI Technical Summary
In the face of complex network environments, existing technologies have difficulty in achieving refined status control of shared network ports, resulting in low management efficiency.
Through the preset mapping relationship between the instruction information and the control strategy in the preset strategy library, the target strategy is determined, the communication binding relationship between the shared network port and the target network port is adjusted, and the operating status parameters are updated and transmitted to the basic input and output system for configuration.
It improves the consistency and accuracy of state switching, enhances the standardization and scalability of network port state management, and improves the reliability and execution efficiency of shared network port state switching.
Smart Images

Figure CN120729690A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a network port configuration method and electronic equipment. Background Art
[0002] In the daily operation and management of network devices, the switching of the operating status of shared network ports is directly related to the stability of network connections and the rational use of device resources. Currently, related technologies usually implement the switching of port operating status through user interface configuration.
[0003] The related technologies have at least the following problems: in a complex network environment requiring port binding, it is difficult to achieve refined status control of shared network ports, resulting in low management efficiency. Summary of the Invention
[0004] In view of the above problems, the present invention provides a network port configuration method, apparatus, device, medium and program product.
[0005] According to a first aspect of the present invention, a network port configuration method is provided, comprising: in response to a switching instruction for switching the operating state of a shared network port, determining a target policy corresponding to the instruction information in the switching instruction from the preset policy library according to a preset mapping relationship between the instruction information and the control policy in a preset policy library, wherein the preset policy library includes a control policy for implementing operating state switching, and the control policy includes a communication binding establishment policy and a communication binding release policy between the shared network port and the target network port; based on the target policy, adjusting the communication binding relationship between the shared network port and the target network port, so that when the adjustment is completed, the operating state parameters of the shared network port are updated according to the target operating state in the instruction information; and transmitting the updated operating state parameters to a basic input / output system so that the basic input / output system configures the shared network port.
[0006] The second aspect of the present invention provides a network port configuration device, including: a policy determination module, which is used to respond to a switching instruction for switching the operating state of a shared network port, and determine a target policy corresponding to the instruction information in the switching instruction from the above-mentioned preset policy library according to a preset mapping relationship between the instruction information and the control policy in the preset policy library, wherein the above-mentioned preset policy library includes a control policy for realizing operating state switching, and the above-mentioned control policy includes a communication binding establishment policy and a communication binding release policy between the above-mentioned shared network port and the target network port; a binding adjustment module, which is used to adjust the communication binding relationship between the above-mentioned shared network port and the above-mentioned target network port based on the above-mentioned target policy, so as to update the operating state parameters of the above-mentioned shared network port according to the target operating state in the above-mentioned instruction information when the adjustment is completed; a parameter transmission module, which is used to transmit the updated operating state parameters to the basic input and output system, so that the above-mentioned basic input and output system configures the above-mentioned shared network port.
[0007] A third aspect of the present invention provides an electronic device, comprising: one or more processors; and a memory for storing one or more computer programs, wherein the one or more processors execute the one or more computer programs to implement the steps of the above method.
[0008] The fourth aspect of the present invention further provides a computer-readable storage medium having a computer program or instructions stored thereon, which implements the steps of the above method when the computer program or instructions are executed by a processor.
[0009] The fifth aspect of the present invention further provides a computer program product, comprising a computer program or instructions, which implement the steps of the above method when executed by a processor.
[0010] According to an embodiment of the present invention, by determining the corresponding target policy based on the preset mapping relationship between the instruction information and the control policy in the preset policy library, the accuracy of policy matching during state switching can be improved. The communication binding relationship between the shared network port and the target network port is adjusted based on the target policy, and after the adjustment is completed, the port operation state parameters are updated according to the target operation state in the instruction information, effectively realizing the coordinated adjustment of the network port binding relationship and the operation state, and improving the consistency and accuracy of the state switching. The updated operation state parameters are transmitted to the basic input and output system to complete the configuration of the shared network port, thereby improving the reliability and execution efficiency of the shared network port state switching and enhancing the standardization and scalability of the network port state management. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] The above contents and other objects, features and advantages of the present invention will become more apparent through the following description of the embodiments of the present invention with reference to the accompanying drawings.
[0012] Figure 1 A diagram illustrating an application scenario of a network port configuration method, apparatus, device, medium, and program product according to an embodiment of the present invention is shown.
[0013] Figure 2 A flow chart of a network port configuration method according to an embodiment of the present invention is shown.
[0014] Figure 3 An interactive flow chart of a network port configuration method according to an embodiment of the present invention is shown.
[0015] Figure 4 A configuration interaction diagram of a network port configuration method according to an embodiment of the present invention is shown.
[0016] Figure 5 A structural block diagram of a network port configuration device according to an embodiment of the present invention is shown.
[0017] Figure 6 A block diagram of an electronic device suitable for implementing a network port configuration method according to an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0018] Hereinafter, embodiments of the present invention will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present invention. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of embodiments of the present invention. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessary confusion of the concept of the present invention.
[0019] The terms used herein are only for describing specific embodiments and are not intended to limit the present invention. The terms "comprise", "include", etc. used herein indicate the presence of the features, steps, operations and / or components, but do not exclude the presence or addition of one or more other features, steps, operations or components.
[0020] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification and should not be interpreted in an idealized or overly rigid manner.
[0021] When expressions such as "at least one of A, B, and C, etc." are used, they should generally be interpreted in accordance with the meaning commonly understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).
[0022] In the technical solution of the present invention, the data involved (including but not limited to data used for analysis, stored data, displayed data, etc.) are all information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of the relevant data comply with relevant laws, regulations and standards, take necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0023] An embodiment of the present invention provides a network port configuration method, comprising: in response to a switching instruction for switching the operating state of a shared network port, determining a target policy corresponding to the instruction information in the switching instruction from a preset policy library according to a preset mapping relationship between the instruction information and the control policy in the preset policy library, wherein the preset policy library includes a control policy for implementing operating state switching, and the control policy includes a communication binding establishment policy and a communication binding release policy between the shared network port and the target network port; based on the target policy, adjusting the communication binding relationship between the shared network port and the target network port, so that when the adjustment is completed, the operating state parameters of the shared network port are updated according to the target operating state in the instruction information; and transmitting the updated operating state parameters to a basic input / output system so that the basic input / output system configures the shared network port.
[0024] Figure 1 A diagram illustrating an application scenario of a network port configuration method, apparatus, device, medium, and program product according to an embodiment of the present invention is shown.
[0025] like Figure 1 As shown, the application scenario according to this embodiment may include a management controller 101 and a basic input / output system 102. The basic input / output system 102 includes a shared network port 1021 and a target network port 1022.
[0026] Management controller 101 and BIOS 102 can communicate and interact via an internal bus or dedicated interface. Management controller 101 is responsible for system management functions, while BIOS 102 provides underlying hardware operation support. Its internal shared network port 1021 and target network port 1022 participate in network port-related configuration and interaction processes.
[0027] It should be noted that the configuration updating method provided in the embodiment of the present invention is executed by the management controller 101. Accordingly, the configuration updating apparatus provided in the embodiment of the present invention is provided in the management controller 101.
[0028] It should be understood that Figure 1 The number of shared network ports 1021 and target network ports 1022 in FIG. 1 is merely illustrative. Any number of shared network ports 1021 and target network ports 1022 may be provided as required.
[0029] The following will be based on Figure 1 The scene described by Figures 2 to 4 The network port configuration method according to the embodiment of the present invention is described in detail.
[0030] Figure 2 A flow chart of a network port configuration method according to an embodiment of the present invention is shown.
[0031] like Figure 2 As shown, the network port configuration method of this embodiment includes operations S210 to S230.
[0032] In operation S210, in response to a switching instruction for switching the operating state of the shared network port, a target policy corresponding to the instruction information in the switching instruction is determined from the preset policy library according to a preset mapping relationship between the instruction information and the control policy in the preset policy library, wherein the preset policy library includes a control policy for implementing operating state switching, and the control policy includes a communication binding establishment policy and a communication binding release policy between the shared network port and the target network port.
[0033] In operation S220 , the communication binding relationship between the shared network port and the target network port is adjusted based on the target policy, so that when the adjustment is completed, the operating state parameter of the shared network port is updated according to the target operating state in the instruction information.
[0034] In operation S230 , the updated operating status parameter is transmitted to the basic input / output system, so that the basic input / output system configures the shared network port.
[0035] According to an embodiment of the present invention, in the daily operation and management process of network equipment, the switching of the operating state of the shared network port is directly related to the stability of the network connection and the rational use of equipment resources. When a switching instruction for switching the operating state of the shared network port is received, the instruction information contained in the switching instruction is extracted, such as the target operating state, the target network port identifier involved, and other key contents. Subsequently, the preset policy library is accessed, and the preset policy library pre-stores the mapping relationship between various types of instruction information and corresponding control policies, wherein the control policy mainly includes the communication binding establishment policy and the communication binding release policy between the shared network port and the target network port. By matching the instruction information obtained by parsing with the mapping relationship in the policy library, the target policy corresponding to the current switching instruction can be accurately determined.
[0036] After determining the target policy, perform specific binding relationship adjustment operations based on the target policy. If the target policy is a communication binding establishment policy, complete the communication link configuration between the shared network port and the specified target network port according to the preset steps, including parameter synchronization, permission verification, routing rule settings, etc., to ensure that the two can establish a stable communication binding. If the target policy is a communication binding release policy, clear the previously established binding configurations, disconnect the communication association between the two, and release related network resources. When the binding relationship adjustment operation is completed, update the operating status parameters of the shared network port according to the target operating status specified by the instruction information in the switching instruction. These parameters may include port enablement status, data transmission priority, connection limit, etc.
[0037] After the operating state parameters are updated, they are transmitted to the Basic Input / Output System (BIOS) through a specific interface. Upon receiving the updated operating state parameters, the BIOS will configure the underlying hardware of the shared network port based on the parameters to ensure that the actual operating state of the shared network port is consistent with the updated parameters, thereby effectively switching the operating state of the shared network port.
[0038] By determining the corresponding target policy based on the preset mapping relationship between the instruction information and the control policy in the preset policy library, the accuracy of policy matching during state switching can be improved. Based on the target policy, the communication binding relationship between the shared network port and the target network port is adjusted, and after the adjustment is completed, the port operating state parameters are updated according to the target operating state in the instruction information, effectively achieving the coordinated adjustment of the network port binding relationship and the operating state, and improving the consistency and accuracy of state switching. The updated operating state parameters are transmitted to the basic input and output system to complete the configuration of the shared network port, which significantly improves the reliability and execution efficiency of the shared network port state switching and enhances the standardization and scalability of network port state management.
[0039] According to an embodiment of the present invention, based on the preset mapping relationship between the instruction information and the control policy in the preset policy library, the target policy corresponding to the instruction information in the switching instruction is determined from the preset policy library, including: based on the preset mapping relationship, the switching relationship between the target operating state in the instruction information and the acquired current operating state of the shared network port is matched with the control policy in the preset policy library to obtain the target policy; wherein, if the switching relationship represents that the switching of the operating state needs to support binding access between the shared network port and the target network port, then the target policy is determined to be a communication binding establishment policy; if the switching relationship represents that the switching of the operating state only requires independent access to the shared network port or the target network port, then the target policy is determined to be a communication binding release policy.
[0040] To determine the target policy, the system first compares and analyzes the target operating state in the command information and the current operating state of the shared network port, obtained in real time, based on a preset mapping relationship to determine the switching relationship between the two. This switching relationship is then matched against various control policies in the preset policy library to select the corresponding target policy.
[0041] Specifically, when the switching relationship indicates that the shared network port must remain bound to the target network port to support collaborative access during the transition from the current operating state to the target operating state, the target policy is determined to be the communication binding establishment policy. The communication binding establishment policy includes the configuration rules and execution steps required to establish the binding relationship between the two to ensure normal communication after binding.
[0042] If the switching relationship indicates that the shared network port and the target network port do not need to remain bound to each other during the operational transition, but only require independent access to either the shared network port or the target network port, the target policy will be determined as the communication unbinding policy. The communication unbinding policy will include the specific operational procedures for unbinding the existing binding relationship to ensure that both can resume independent operation and meet independent access requirements. This mapping mechanism between switching relationships and control policies ensures the targeted nature of binding establishment and unbinding operations, improving the logical rigor and policy adaptation efficiency of shared network port binding mode switching.
[0043] According to an embodiment of the present invention, the network port configuration method further includes: if the switching instruction is used to enable or disable access to the shared network port, and the current operating environment does not require port binding access, determining to maintain the current communication binding relationship of the shared network port.
[0044] When a command is received to enable or disable access to a shared network port, the system checks the current operating environment, focusing on assessing whether there are scenarios where the shared network port needs to be bound to the target network port. During this process, the system scans active network connections, application port dependency configurations, and pre-set environment parameters to determine if any business processes rely on this binding relationship for proper operation.
[0045] If it is confirmed that port binding access is not required in the current operating environment, the decision should be made to maintain the existing communication binding relationship of the shared network port. This means that regardless of whether the switch instruction requests access to enable or disable, if port binding is not required, the established communication binding state will remain unchanged without any adjustment or modification, ensuring the stability and continuity of network communications without unnecessary interference. By maintaining the existing binding policy, unnecessary configuration adjustments can be avoided, ensuring lightweight and efficient port state switching, improving system resource utilization efficiency and state switching stability.
[0046] According to an embodiment of the present invention, the target network port includes multiple dedicated sub-ports; if the target policy is a communication binding establishment policy, the communication binding relationship between the shared network port and the target network port is adjusted based on the target policy, including: determining the target sub-port from the multiple dedicated sub-ports based on the acquired port information; and completing the binding configuration of the communication link based on the association relationship between the target sub-port and the shared network port.
[0047] The target network port contains multiple dedicated subports. When the target policy is a communication binding establishment policy, the communication binding relationship between the shared network port and the target network port is adjusted based on the target policy. Specifically, port information for the dedicated subports is collected and obtained. This port information may include the status, load, available bandwidth, and compatibility with the shared network port. Based on this collected port information, the target subport that meets the communication requirements is selected from the multiple dedicated subports. The selection process comprehensively considers factors such as the performance, stability, and compatibility of the dedicated subports with the shared network port.
[0048] After determining the target subport, the relationship between the target subport and the shared network port is further analyzed, including their communication protocols, data transmission rules, and permission settings. Based on these relationships, the corresponding communication parameters are configured, a data transmission channel is established, and access control rules are set. This completes the binding configuration of the communication link between the shared network port and the target subport, ensuring stable and secure communication between the two as expected.
[0049] According to an embodiment of the present invention, the network port configuration method further includes: disabling the traffic forwarding function of the shared network port when it is determined that the shared network port is closed to access; configuring the network parameters of the target network port, and transmitting the configured network parameters to the basic input and output system so that the basic input and output system performs corresponding settings on the network function of the target network port.
[0050] If access to a shared network port is determined to be blocked, the first step is to disable the shared network port's traffic forwarding functionality. Specifically, by calling a dedicated function in the network interface control module, the shared network port stops forwarding incoming and outgoing data, severing the data flow path between it and other network nodes, and ensuring that no data is forwarded or transmitted through the port.
[0051] Next, configure the network parameters for the target network port. These parameters include, but are not limited to, the Internet Protocol address, subnet mask, gateway address, server address, and port communication speed. These parameters are specifically set based on the pre-defined network configuration strategy and the actual needs of the target network, ensuring that the parameter values meet the target network's communication standards and security regulations.
[0052] After completing the network parameter configuration for the target network port, the configured parameter information must be encapsulated in a specific data format and transmitted to the Basic Input / Output System (BIOS) via the system's internal communication channels. Upon receiving this parameter information, the BIOS will configure the target network port's hardware registers and related control modules accordingly, enabling the target network port to properly activate network functions according to the newly configured parameters. This ensures that the target network port can correctly identify and respond to data transmission requests during network communications, improving the efficiency and reliability of the binding configuration between the shared network port and the dedicated sub-port.
[0053] According to an embodiment of the present invention, based on the target policy, the communication binding relationship between the shared network port and the target network port is adjusted, so that when the adjustment is completed, the operating status parameters of the shared network port are updated according to the target operating status in the instruction information, including: based on the target policy and the switching relationship, respectively extracting the corresponding port control command set and state switching command sequence from the preset command library; when it is verified that the port control command set is executed successfully, sequentially triggering the execution of the state switching command sequence.
[0054] Based on the target policy and switching relationship, the preset command library is first searched. This library contains various commands corresponding to different control policies and switching relationships. Based on the specific requirements of the target policy and the characteristics of the switching relationship, the matching port control command set and state switching command sequence must be accurately located and extracted from the preset command library. During the extraction process, keyword matching and policy type mapping are used to ensure command accuracy and reduce the possibility of mis-extraction of mismatched commands.
[0055] After extracting the port control command set, it is executed and verified. Specifically, the commands in the port control command set are executed sequentially, and the results of each command are monitored in real time to check whether the expected port control effect is achieved, such as whether the shared network port is turned on, off, or switched to another mode as instructed. If all commands are executed successfully and the port status is as expected, the port control command set is considered valid.
[0056] After confirming the successful execution of the port control command set, each command is triggered sequentially according to the established state transition command sequence. During execution, the system maintains real-time tracking of command execution status to ensure that the previous command has completed and taken effect before initiating the next command. This prevents state transition anomalies caused by misaligned command execution order. This orderly triggering approach ensures the stability and accuracy of the state transition process, enabling the system to complete the corresponding state transition according to the target policy and transition relationships. Command set verification and sequential triggering mechanisms ensure the rigor of operational logic, improving the stability and execution efficiency of the port binding and state transition processes.
[0057] According to an embodiment of the present invention, based on the target policy, the communication binding relationship between the shared network port and the target network port is adjusted, so that when the adjustment is completed, the operating state parameters of the shared network port are updated according to the target operating state in the instruction information. It also includes: based on the target policy and the switching relationship, obtaining the target data structure from the shared memory with the basic input and output system; and executing the configuration operation sequence defined by the target data structure through the hardware register write interface of the basic input and output system.
[0058] Based on the target policy and switching relationships, the target data structure to be retrieved from the BIOS's shared memory is first determined. This process requires clarifying the specific data structure requirements of the target policy, as well as the parameters and configuration items involved in the switching relationships, which serve as the retrieval basis. By accessing the address of the BIOS's shared memory and following the pre-set data structure identification and indexing rules, the corresponding target data structure is located and read. This target data structure contains all necessary information related to the current configuration operation, such as hardware parameters, operation instructions, and execution order.
[0059] After obtaining the target data structure, parse the configuration operation sequence defined therein to clarify the specific content of each operation step, the hardware register addresses involved, and the corresponding parameter values. Subsequently, through the hardware register write interface provided by the basic input and output system, the parsed parameter values are written one by one into the corresponding hardware registers in the established order of the configuration operation sequence. During the writing process, the results of each write operation need to be verified in real time to ensure that the parameter values are accurately received by the register and take effect. If a write anomaly occurs, the error handling mechanism is triggered in time to ensure that the entire configuration operation sequence can be smoothly executed according to the definition of the target data structure, and finally complete the corresponding configuration of the hardware. The consistency of the configuration logic is ensured through the target data structure, and the directness and reliability of the configuration execution are improved with the help of the hardware register interface, effectively improving the efficiency and accuracy of the port binding configuration.
[0060] According to an embodiment of the present invention, multiple commands in the preset command library and data structures in the shared memory are configured based on multiple switching relationships. Specifically, as shown in Table 1, for different switching relationships between the current operating state and the target operating state, the preset command library pre-stores the port control command set and state switching command sequence corresponding to each scenario, and the shared memory pre-stores the target data structure required for each scenario.
[0061] When the "Auto → Enable" switch occurs, the preset command library contains a port control command set corresponding to "releasing communication bindings" and a state switching command sequence corresponding to "enabling the shared network port function." Shared memory also contains a target data structure containing the configurations for these two operations. For the "Auto → Disable" switch, the preset command library contains a command sequence for directly executing "disabling the shared network port function," and shared memory contains a configuration data structure for the corresponding disable operation.
[0062] For the "On → Auto" and "Off → Auto" switching relationships, the preset command library stores the control command set for "creating a communication binding relationship" and the state switching command sequence for "setting the target network port to be bound," respectively. Shared memory also contains a data structure for the configuration operation sequence defined by these two steps. Whether extracting commands from the preset command library or retrieving data structures from shared memory, the goal is to ensure the orderly execution of the "before" and "after" operations in each switching scenario listed in Table 1, achieving accurate transitions between operating states.
[0063] Table 1
[0064]
[0065] According to an embodiment of the present invention, the received switching instruction is sent by a basic input and output system, or is generated by a state switching operation initiated by a target object through a front-end interactive interface.
[0066] There are two main sources of received switching commands. One is sent directly by the BIOS. These commands are usually generated based on changes in the underlying hardware status of the system or preset startup configuration logic. For example, during system initialization, the BIOS automatically issues port enable or disable commands based on hardware detection results.
[0067] The other type originates from state switching operations initiated by the target object through the front-end interactive interface. The target object performs corresponding operations on the front-end interactive interface, such as clicking a button or selecting an option. These operations are captured and converted into corresponding switching instructions, such as a network port switching command manually triggered by a user in the management interface. After receiving the switching instruction, the source type can be identified and then processed according to the characteristics of each source to ensure the effectiveness and accuracy of the instruction.
[0068] Figure 3 An interactive flow chart of a network port configuration method according to an embodiment of the present invention is shown.
[0069] like Figure 3 As shown, the interaction process of this embodiment includes operations S310 to S350.
[0070] like Figure 3 As shown, in operation S310, a switching instruction is sent. In operation S320, a target policy is determined. In operation S330, a communication binding relationship is adjusted. In operation S340, an operating state parameter is updated. In operation S350, a shared network port is configured.
[0071] According to an embodiment of the present invention, the BIOS sends a switching instruction to the management controller. Upon receiving the instruction, the management controller determines the corresponding target policy from a preset policy library based on the switching instruction. Through orderly interaction between the BIOS and the management controller, the preset policy library accurately matches the switching logic, ensuring the accuracy of communication binding relationship adjustments and status parameter updates.
[0072] Next, the management controller adjusts the communication binding relationship between the shared network port and the target network port based on the target policy. After completing the communication binding adjustment, the shared network port's operating status parameters are immediately updated and then transmitted back to the BIOS. This closed-loop execution mechanism, from command transmission to port configuration, significantly improves the efficiency and reliability of system configuration updates.
[0073] The BIOS configures the shared network port based on the status parameters transmitted back, completing operational state switching and configuration updates. This process not only strengthens the collaborative operation of the underlying hardware (BIOS) and management logic (management controller), but also provides reliable guarantees for flexible switching and stable service of the shared network port. Furthermore, through deep collaboration between the two parties, the overall manageability and environmental adaptability of the system are further optimized.
[0074] According to an embodiment of the present invention, the network port configuration method further includes: generating multiple sets of target switching relationships based on the operating status configured in the basic input / output system, which represents the bound access to the shared network port and the target network port, the operating status representing the enabled access to the shared network port, and the operating status representing the disabled access to the shared network port; establishing a control strategy corresponding to each target switching relationship according to the access logic of the port binding access to form a preset strategy library; and sending the preset strategy library to the basic input / output system so that, when it is determined that the basic input / output system has passed the validity verification, the preset strategy library is used to perform port configuration.
[0075] Based on the three operational states configured in the basic input / output system (BIOS): those representing the bound access between a shared network port and a target network port, those representing the enabled access state of a shared network port, and those representing the disabled access state, the possible transition scenarios between these three states were first identified, including the triggering conditions, transition paths, and expected outcomes from one state to another. For each transition scenario, a relationship model was defined, encompassing the source state, target state, transition triggering conditions, and associated parameters. This model then generated multiple sets of corresponding target switching relationships, ensuring coverage of all possible state transition combinations.
[0076] Based on the access logic for port binding access, including data transmission permissions, port resource allocation rules, and status verification mechanisms, corresponding control policies are developed for each set of target switching relationships. These control policies must clearly define the operational instructions, parameter configuration standards, exception handling procedures, and status verification methods to be executed under specific switching relationships. For example, a policy for switching from a bound access state to a closed access state must include an unbinding instruction sequence, resource release rules, and post-closed state confirmation steps. All control policies are organized and summarized in a unified format to form a preset policy library to ensure the integrity and logical consistency of the policies in the library.
[0077] The preset policy library is transmitted to the BIOS. Upon receipt, the BIOS verifies the policy library's validity, including checking the policy format's compliance, the compatibility of the policy content with the hardware configuration, and any logical conflicts between policies. If verification passes, the BIOS stores the preset policy library in a designated secure storage area. During subsequent port configuration, the corresponding control policy in the library is directly invoked, executing the corresponding configuration operations based on the target switching relationship to ensure the accuracy and stability of port state switching.
[0078] Figure 4 A configuration interaction diagram of a network port configuration method according to an embodiment of the present invention is shown.
[0079] like Figure 4 As shown, during the operation of the network device 440 in the server, the configuration of the shared network port can be achieved through the collaborative interaction between the operating system 430, the basic input and output system 410, and the management controller 420. The following uses different configuration scenarios to demonstrate the management logic of the shared network port through multi-level collaboration.
[0080] Based on service requirements, operating system 430 generates configuration parameters for the shared network port and sends them to management controller 420. Management controller 420 parses and initially verifies the configuration parameters and, based on pre-set configuration rules, forwards the processed configuration information to BIOS 410. BIOS 410 accurately writes the configuration parameters into hardware components such as the shared network port registers of network device 440, completing the basic configuration. This configuration scenario, through the layered collaboration of operating system 430, management controller 420, and BIOS 410, enables the shared network port to adapt to the data exchange requirements of regular services.
[0081] In another configuration scenario, the operating system 430 directly generates the configuration parameters of the shared network port based on business needs and sends them to the network device 440. At the same time, the operating system 430 synchronizes the same configuration parameters to the management controller 420 and the basic input and output system 410. After receiving the configuration parameters, the network device 440 directly performs the port configuration operation at the hardware level. The management controller 420 performs configuration logic verification and business relevance recording based on the synchronization parameters. The basic input and output system 410 updates the underlying hardware adaptation information based on the configuration parameters. This configuration scenario utilizes the direct connection capability between the operating system 430 and the network device 440, and at the same time uses a synchronization mechanism to ensure the perception and collaborative processing of the configuration by the management controller 420 and the basic input and output system 410, thereby improving the configuration response speed and allowing each level of the system to maintain a consistent understanding of the port configuration status, thereby enhancing the flexibility and real-time performance of configuration management.
[0082] In addition, when the network device 440 is in operation, the hardware self-check finds that the shared network port needs to be optimized, and the network device 440 actively sends a configuration change request to the basic input and output system 410. After receiving the request, the basic input and output system 410 synchronizes the configuration change request to the management controller 420. The management controller 420 combines the business operation data of the operating system 430 to generate a final executable configuration adjustment policy and returns it to the basic input and output system 410. The basic input and output system 410 then converts the configuration policy into executable instructions for the network device 440, completes the port configuration update, and feeds back the configuration results to the operating system 430. This configuration scenario is triggered by the hardware status of the network device 440. Through multi-level reverse collaborative decision-making, intelligent configuration optimization based on the actual operating status of the hardware is realized, so that the configuration adjustment is more in line with the hardware health needs and the actual business operation, improving the system's self-maintenance and self-optimization capabilities, extending the hardware service life, and ensuring a balance between business stability and hardware reliability.
[0083] The above configuration scenarios cover multiple configuration paths such as layered transmission, direct penetration, and reverse triggering. Relying on the multi-faceted interaction logic of the operating system 430, management controller 420, basic input and output system 410 and network equipment 440, it can flexibly adapt to configuration management systems with different needs.
[0084] Based on the above network port configuration method, the present invention also provides a network port configuration device. Figure 5 The device is described in detail.
[0085] Figure 5 A structural block diagram of a network port configuration device according to an embodiment of the present invention is shown.
[0086] like Figure 5 As shown, the network port configuration device 500 of this embodiment includes a policy determination module 510 , a binding adjustment module 520 and a parameter transmission module 530 .
[0087] The policy determination module 510 is configured to, in response to a switching instruction for switching the operating state of the shared network port, determine a target policy corresponding to the instruction information in the switching instruction from a preset policy library based on a preset mapping relationship between the instruction information and the control policies in the preset policy library. The preset policy library includes control policies for implementing operating state switching, and the control policies include a communication binding establishment policy and a communication binding removal policy between the shared network port and the target network port. In one embodiment, the policy determination module 510 can be configured to perform operation S210 described above, and will not be further described herein.
[0088] The binding adjustment module 520 is configured to adjust the communication binding relationship between the shared network port and the target network port based on the target policy, so that when the adjustment is completed, the operating state parameters of the shared network port are updated according to the target operating state in the instruction information. In one embodiment, the binding adjustment module 520 can be configured to perform the operation S220 described above, which will not be repeated here.
[0089] The parameter transmission module 530 is used to transmit the updated operating state parameters to the basic input and output system so that the basic input and output system configures the shared network port. In one embodiment, the parameter transmission module 530 can be used to perform the operation S230 described above, which will not be repeated here.
[0090] According to an embodiment of the present invention, any multiple modules among the policy determination module 510, the binding adjustment module 520, and the parameter transmission module 530 may be combined into a single module, or any one of these modules may be split into multiple modules. Alternatively, at least part of the functionality of one or more of these modules may be combined with at least part of the functionality of other modules and implemented in a single module. According to an embodiment of the present invention, at least one of the policy determination module 510, the binding adjustment module 520, and the parameter transmission module 530 may be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application-specific integrated circuit (ASIC), or may be implemented in hardware or firmware through any other reasonable means of circuit integration or packaging, or may be implemented in any one of the three implementation methods of software, hardware, and firmware, or any appropriate combination of any of these. Alternatively, at least one of the policy determination module 510, the binding adjustment module 520, and the parameter transmission module 530 may be at least partially implemented as a computer program module that, when executed, performs the corresponding functionality.
[0091] Figure 6 A block diagram of an electronic device suitable for implementing a network port configuration method according to an embodiment of the present invention is shown.
[0092] like Figure 6As shown, an electronic device 600 according to an embodiment of the present invention includes a processor 601, which can perform various appropriate actions and processes based on programs stored in a read-only memory (ROM) 602 or programs loaded from a storage unit 608 into a random access memory (RAM) 603. The processor 601 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or related chipsets and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 601 may also include onboard memory for caching purposes. The processor 601 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present invention.
[0093] RAM 603 stores various programs and data required for the operation of electronic device 600. Processor 601, ROM 602, and RAM 603 are interconnected via bus 604. Processor 601 executes the programs in ROM 602 and / or RAM 603 to perform various operations according to the method flow of the embodiment of the present invention. It should be noted that the programs may also be stored in one or more memories other than ROM 602 and RAM 603. Processor 601 may also execute the programs stored in one or more memories to perform various operations according to the method flow of the embodiment of the present invention.
[0094] According to an embodiment of the present invention, electronic device 600 may further include an input / output (I / O) interface 605, which is also connected to bus 604. Electronic device 600 may also include one or more of the following components connected to I / O interface 605: an input section 606 including a keyboard, mouse, etc.; an output section 607 including devices such as a cathode ray tube (CRT), liquid crystal display (LCD), and speakers; a storage section 608 including a hard disk; and a communication section 609 including a network interface card such as a LAN card or modem. Communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to I / O interface 605 as needed. Removable media 611, such as a magnetic disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed in drive 610 as needed, so that computer programs read from the removable media can be installed into storage section 608 as needed.
[0095] The present invention also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments, or may exist independently and not incorporated into the device / apparatus / system. The computer-readable storage medium carries one or more programs, which, when executed, implement the method according to the embodiments of the present invention.
[0096] According to an embodiment of the present invention, a computer-readable storage medium may be a non-volatile computer-readable storage medium, and may include, for example, but not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present invention, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. For example, according to an embodiment of the present invention, a computer-readable storage medium may include the ROM 602 and / or RAM 603 described above, and / or one or more memories other than ROM 602 and RAM 603.
[0097] An embodiment of the present invention further includes a computer program product comprising a computer program containing program code for executing the method shown in the flowchart. When the computer program product is executed in a computer system, the program code is used to cause the computer system to implement the network port configuration method provided in an embodiment of the present invention.
[0098] The computer program executes the above functions defined in the system / device of the embodiment of the present invention when executed by the processor 601. According to the embodiment of the present invention, the system, device, module, unit, etc. described above can be implemented by a computer program module.
[0099] In one embodiment, the computer program may be stored on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may be transmitted and distributed in the form of a signal on a network medium, downloaded and installed via the communication portion 609, and / or installed from a removable medium 611. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to wireless, wired, or any suitable combination thereof.
[0100] In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 609 and / or installed from a removable medium 611. When the computer program is executed by the processor 601, the above-described functions defined in the system of the embodiment of the present invention are performed. According to the embodiment of the present invention, the systems, devices, means, modules, units, etc. described above can be implemented by computer program modules.
[0101] According to an embodiment of the present invention, the program code for executing the computer program provided by the embodiment of the present invention can be written in any combination of one or more programming languages. Specifically, these computer programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, languages such as Java, C++, Python, "C" or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, using an Internet service provider to connect via the Internet).
[0102] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present invention. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the above-mentioned module, program segment, or a part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0103] It will be understood by those skilled in the art that the features described in the various embodiments of the present invention may be combined and / or coupled in various ways, even if such combinations or couplings are not explicitly described in the present invention. In particular, the features described in the various embodiments of the present invention may be combined and / or coupled in various ways without departing from the spirit and teachings of the present invention. All such combinations and / or couplings fall within the scope of the present invention.
[0104] The description of the above embodiments is only intended to help understand the method and core concept of the present invention. However, these embodiments are only for illustrative purposes and are not intended to limit the scope of the present invention. Although each embodiment has been described above, this does not mean that the measures in each embodiment cannot be advantageously used in combination. Without departing from the scope of the present invention, those skilled in the art may make various substitutions and modifications, and these substitutions and modifications should all fall within the scope of the present invention.
Claims
1. A network port configuration method, characterized in that: Applied to a management controller, the method includes: In response to a switching instruction for switching the operating state of the shared network port, determining a target policy corresponding to the instruction information in the switching instruction from the preset policy library according to a preset mapping relationship between instruction information and control policies in a preset policy library, wherein the preset policy library includes control policies for implementing operating state switching, and the control policies include a communication binding establishment policy and a communication binding release policy between the shared network port and the target network port; Adjusting the communication binding relationship between the shared network port and the target network port based on the target policy, so that when the adjustment is completed, the operating state parameter of the shared network port is updated according to the target operating state in the instruction information; The updated operating status parameter is transmitted to a basic input / output system, so that the basic input / output system configures the shared network port.
2. The method according to claim 1, characterized in that The determining, from the preset strategy library according to a preset mapping relationship between the instruction information and the control strategy in the preset strategy library, a target strategy corresponding to the instruction information in the switching instruction includes: Based on the preset mapping relationship, matching the switching relationship between the target operating state in the instruction information and the acquired current operating state of the shared network port with the control policies in the preset policy library to obtain the target policy; If the switching relationship represents that the switching of the running state needs to support binding access between the shared network port and the target network port, then determining that the target policy is the communication binding establishment policy; If the switching relationship indicates that the switching of the running state only requires independent access to the shared network port or the target network port, the target policy is determined to be the communication binding release policy.
3. The method according to claim 1, characterized in that The method further comprises: If the switching instruction is used to enable or disable access to the shared network port, and the current operating environment does not require port binding access, it is determined to maintain the current communication binding relationship of the shared network port.
4. The method according to claim 1 or 2, characterized in that The target network port includes a plurality of dedicated sub-ports; if the target policy is the communication binding establishment policy, adjusting the communication binding relationship between the shared network port and the target network port based on the target policy includes: Determining a target sub-port from the plurality of dedicated sub-ports according to the acquired port information; The binding configuration of the communication link is completed according to the association relationship between the target sub-port and the shared network port.
5. The method according to claim 1, wherein The method further comprises: If it is determined that the shared network port is closed to access, disabling the traffic forwarding function of the shared network port; The network parameters of the target network port are configured, and the configured network parameters are transmitted to the basic input and output system, so that the basic input and output system performs corresponding settings on the network function of the target network port.
6. The method according to claim 2, characterized in that The adjusting, based on the target policy, the communication binding relationship between the shared network port and the target network port, so as to update the operating state parameter of the shared network port according to the target operating state in the instruction information when the adjustment is completed, includes: Based on the target strategy and the switching relationship, extracting the corresponding port control command set and state switching command sequence from a preset command library; When it is verified that the port control command set is executed successfully, the execution of the state switching command sequence is triggered in sequence.
7. The method according to claim 2, characterized in that The adjusting, based on the target policy, the communication binding relationship between the shared network port and the target network port, so as to update the operating state parameter of the shared network port according to the target operating state in the instruction information when the adjustment is completed, further comprising: Based on the target strategy and the switching relationship, obtaining a target data structure from a shared memory with the basic input and output system; The configuration operation sequence defined by the target data structure is executed through the hardware register write interface of the basic input and output system.
8. The method according to claim 1, characterized in that The received switching instruction is sent by the basic input and output system, or is generated by a state switching operation initiated by the target object through the front-end interactive interface.
9. The method according to claim 2, characterized in that The method further comprises: generating a plurality of target switching relationships according to an operation state representing bound access to the shared network port and the target network port, an operation state representing enabled access to the shared network port, and an operation state representing disabled access to the shared network port, configured in the basic input and output system; According to the access logic of the port binding access, a control strategy corresponding to each of the target switching relationships is established to form the preset strategy library; The preset policy library is sent to the basic input and output system, so as to use the preset policy library to perform port configuration when it is determined that the basic input and output system passes the validity verification.
10. An electronic device comprising: one or more processors; a memory for storing one or more computer programs, It is characterized in that the one or more processors execute the one or more computer programs to implement the steps of the method according to any one of claims 1 to 9.
Citation Information
Patent Citations
Method for dynamically reconfiguring interconnection network between systems-on-chip
CN102929329A
Method for identifying shared port in multi-network port, storage medium and server
CN108768693A
Server BMC dynamic network linkage management method and management system
CN115134215A
Port sharing method and related equipment
CN115905063A
Network switch with automated port provisioning
US20230224213A1