Network port configuration method and electronic device

By determining the target policy through a preset policy library mapping relationship, adjusting the binding relationship between the shared network port and the target network port, and updating the status parameters, the problem of low efficiency in the management of shared network ports in the existing technology is solved, and efficient and reliable state switching and configuration are achieved.

CN120729690BActive Publication Date: 2025-11-21INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511179078.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-08-21
Publication Date
2025-11-21
Estimated Expiration
2045-08-21

AI Technical Summary

Technical Problem

Existing technologies struggle to achieve fine-grained status control of shared network ports in complex network environments that require port binding, resulting in low management efficiency.

Method used

By using the preset mapping relationship between instruction information and control policies in the preset policy library, the target policy is determined, the communication binding relationship between the shared network port and the target network port is adjusted, and the running status parameters are updated and transmitted to the basic input/output system for configuration.

Benefits of technology

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.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120729690B_ABST
    Figure CN120729690B_ABST
Patent Text Reader

Abstract

The application provides a network port configuration method and electronic equipment, which can be applied to the technical field of computers. The network port configuration method comprises the following steps: in response to a switching instruction for switching the running state of a shared network port, determining a target strategy corresponding to instruction information in the switching instruction from a preset strategy library according to a preset mapping relationship between the instruction information and a control strategy in the preset strategy library; adjusting the communication binding relationship between the shared network port and a target network port based on the target strategy, so that, in the case that the adjustment is completed, the running state parameter of the shared network port is updated according to the target running state in the instruction information; and transmitting the updated running state parameter to a basic input and output system, so that the basic input and output system configures the shared network port.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and more specifically to a network port configuration method and an electronic device. Background Technology

[0002] In the daily operation and management of network devices, the switching of the operating status of shared network ports directly affects the stability of network connections and the rational utilization of device resources. Currently, related technologies typically achieve port operating status switching through user interface configuration.

[0003] The relevant technologies have at least the following problems: when faced with complex network environments that require port binding, it is difficult to achieve fine-grained 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: responding 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 instruction information and control policies in the preset policy library, wherein the preset policy library includes control policies for implementing the switching of operating states, and the control policies include a communication binding establishment policy and a communication binding deregulation 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, upon completion of the adjustment, 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] A second aspect of the present invention provides a network port configuration apparatus, comprising: a policy determination module, configured to, in response to a switching command for switching the operating state of a shared network port, determine a target policy corresponding to the instruction information in the switching command from the preset policy library according to a preset mapping relationship between instruction information and control policies in the 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 debinding policy between the shared network port and the target network port; a binding adjustment module, configured to adjust the communication binding relationship between the shared network port and the target network port based on the target policy, so that, upon completion of the adjustment, the operating state parameters of the shared network port are updated according to the target operating state in the instruction information; and a parameter transmission module, configured to transmit the updated operating state parameters to a basic input / output system (PIS) so that the PIS configures the 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 method described above.

[0008] A fourth aspect of the present invention also provides a computer-readable storage medium having a computer program or instructions stored thereon, wherein the computer program or instructions, when executed by a processor, implement the steps of the above-described method.

[0009] A fifth aspect of the present invention also provides a computer program product, including a computer program or instructions that, when executed by a processor, implement the steps of the above-described method.

[0010] According to embodiments of the present invention, by determining the corresponding target strategy based on the preset mapping relationship between instruction information and control strategies in a preset strategy library, the accuracy of strategy 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 strategy, and the port operating status parameters are updated according to the target operating status in the instruction information after the adjustment is completed. This effectively realizes the coordinated adjustment of network port binding relationship and operating status, improving the continuity and accuracy of state switching. The updated operating status parameters are transmitted to the basic input / output system to complete the configuration of the shared network port, improving the reliability and execution efficiency of shared network port state switching, and enhancing the standardization and scalability of network port state management. Attached Figure Description

[0011] The above-mentioned contents, as well as other objects, features and advantages of the present invention, will become clearer from the following description of embodiments of the present invention with reference to the accompanying drawings.

[0012] Figure 1 The diagram illustrates application scenarios of network port configuration methods, apparatuses, devices, media, and program products according to embodiments of the present invention.

[0013] Figure 2 A flowchart of a network port configuration method according to an embodiment of the present invention is shown.

[0014] Figure 3 An interactive flowchart of a network port configuration method according to an embodiment of the present invention is shown.

[0015] Figure 4 A schematic diagram illustrating the configuration interaction 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 apparatus 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 Implementation

[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 invention. In the following detailed description, numerous specific details are set forth to provide a thorough understanding of the embodiments of the invention for ease of explanation. However, it will be apparent that one or more embodiments may be practiced without these specific details. Furthermore, descriptions of well-known structures and techniques are omitted in the following description to avoid unnecessarily obscuring the concept of the invention.

[0019] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the invention. The terms “comprising,” “including,” etc., as used herein indicate the presence of the stated 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 are to be interpreted in a manner consistent with the context of this specification, and not in an idealized or overly rigid way.

[0021] When using expressions such as "at least one of A, B and C", they should generally be interpreted in accordance with the meaning that is commonly understood by those skilled in the art (e.g., "a system having at least one of A, B and C" should include, but is not limited to, a system having A alone, a system having B alone, a system having C alone, a system having A and B, a system having A and C, a system having B and C, and / or a system having A, B and C, etc.).

[0022] In the technical solution of this invention, the data involved (including but not limited to data used for analysis, data stored, data displayed, etc.) are all information and data authorized by the user or fully authorized by all parties. The collection, storage, use, processing, transmission, provision, disclosure and application of related data all comply with relevant laws, regulations and standards, necessary confidentiality measures have been taken, and they do not violate public order and good morals. Corresponding operation entry points are provided for users to choose to authorize or refuse.

[0023] An embodiment of the present invention provides a network port configuration method, comprising: responding to a switching command for switching the operating state of a shared network port; determining a target policy corresponding to the command information in the switching command from the preset policy library according to a preset mapping relationship between command information and control policies in the preset policy library, wherein the preset policy library includes control policies for implementing the switching of operating states, 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, upon completion of the adjustment, the operating state parameters of the shared network port are updated according to the target operating state in the command information; and transmitting the updated operating state parameters to a basic input / output system to enable the basic input / output system to configure the shared network port.

[0024] Figure 1 The diagram illustrates application scenarios of network port configuration methods, apparatuses, devices, media, and program products according to embodiments of the present invention.

[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] The management controller 101 and the basic input / output system 102 can communicate and interact via an internal bus or a dedicated interface. The management controller 101 is responsible for system management functions, while the basic input / output system 102 provides low-level 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 update method provided in this embodiment of the invention is executed by the management controller 101. Accordingly, the configuration update device provided in this embodiment of the invention is located 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 shown is merely illustrative. Depending on implementation needs, any number of shared network ports 1021 and target network ports 1022 can be used.

[0029] The following will be based on Figure 1 The described scene, through Figures 2-4 The network port configuration method of the present invention embodiments will be described in detail.

[0030] Figure 2 A flowchart 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 command for switching the operating state of a shared network port, a target policy corresponding to the command information in the switching command is determined from the preset policy library according to the preset mapping relationship between command information and control policies. The preset policy library includes control policies for implementing the switching of operating states, 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.

[0033] In operation S220, based on the target policy, the communication binding relationship between the shared network port and the target network port is adjusted so that, after 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.

[0034] In operation S230, the updated operating status parameters are transmitted to the basic input / output system so that the basic input / output system can configure the shared network port.

[0035] According to an embodiment of the present invention, during the daily operation and management of network devices, the switching of the operating state of shared network ports directly affects the stability of network connections and the rational utilization of device resources. When a switching instruction for switching the operating state of a shared network port is received, the instruction information contained in the switching instruction is extracted, such as the target operating state and the identifier of the target network port involved. Subsequently, a preset policy library is accessed. The preset policy library pre-stores the mapping relationship between various types of instruction information and corresponding control policies, where the control policies mainly include the communication binding establishment policy and the communication binding release policy between the shared network port and the target network port. By matching the parsed instruction information 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, specific binding relationship adjustment operations are performed according to the target policy. If the target policy is a communication binding establishment policy, the communication link configuration between the shared network port and the specified target network port is completed according to 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 removal policy, all previously established binding configurations are cleared, the communication association between the two is disconnected, and related network resources are released. After the binding relationship adjustment operation is completed, the operating status parameters of the shared network port are updated according to the target operating status specified in the switching instruction. These parameters may include port enable status, data transmission priority, connection limit, etc.

[0037] After updating the operating status parameters, the updated parameters are transmitted to the Basic Input / Output System (BIOS) via a specific interface. Upon receiving the updated operating status parameters, the BIOS performs low-level hardware configuration on the shared network port based on the parameter content, ensuring that the actual operating status of the shared network port is consistent with the updated parameters, thereby achieving effective switching of the shared network port's operating status.

[0038] By determining the corresponding target policy based on the preset mapping relationship between instruction information and control policies 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 the port operating status parameters are updated according to the target operating status in the instruction information after the adjustment. This effectively achieves coordinated adjustment of network port binding relationships and operating status, improving the consistency and accuracy of state switching. The updated operating status parameters are transmitted to the basic input / output system to complete the configuration of the shared network port, significantly improving the reliability and execution efficiency of shared network port state switching, and enhancing the standardization and scalability of network port state management.

[0039] According to an embodiment of the present invention, a target strategy corresponding to the instruction information in the switching instruction is determined from the preset strategy library based on a preset mapping relationship between instruction information and control strategies. This includes: matching the switching relationship between the target running state in the instruction information and the current running state of the acquired shared network port with the control strategies in the preset strategy library based on the preset mapping relationship to obtain the target strategy; wherein, if the switching relationship indicates that the switching of the running state requires support for the bound access of the shared network port and the target network port, the target strategy is determined to be a communication binding establishment strategy; 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 strategy is determined to be a communication binding release strategy.

[0040] In determining the target strategy, the target operating status in the instruction information and the current operating status of the shared network port acquired in real time are first compared and analyzed based on the preset mapping relationship to clarify the switching relationship between the two. Subsequently, this switching relationship is matched with various control strategies in the preset strategy library to select the corresponding target strategy.

[0041] Specifically, when the switching relationship indicates that during the transition from the current operating state to the target operating state, it is necessary to ensure that the shared network port can remain bound to the target network port to support collaborative access, then the required target policy at this time will be determined to be the communication binding establishment policy. The communication binding establishment policy will include the various 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 switching of operating states does not require the shared network port and the target network port to remain bound, but only requires supporting independent access to either the shared network port or the target network port, then the target policy will be determined as the communication binding unbinding policy. The communication binding unbinding policy will include specific operational procedures for unbinding the existing relationship to ensure that both can restore their independent operating states and meet the requirements for independent access. Through the correspondence mechanism between the switching relationship and the control policy, the targeting of binding establishment and unbinding operations is ensured, improving the logical rigor and policy adaptation efficiency of the 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, then it is determined to maintain the current communication binding relationship of the shared network port.

[0044] When a switching command is received to enable or disable shared network port access, the current operating environment is checked, with a focus on assessing whether there are scenarios that require the shared network port to maintain a binding with the target network port. During the check, currently active network connections, application port dependency configurations, and preset environment parameters are scanned to determine whether any business processes depend on the binding relationship between the two to function properly.

[0045] If it is confirmed that the current operating environment does not require port binding access, then a decision should be made to maintain the current communication binding relationship of the shared network port. This means that regardless of whether the switching command requires enabling or disabling access, the established communication binding state will remain unchanged without any adjustment or modification, ensuring that the stability and continuity of network communication are not unnecessarily interfered with. By maintaining the existing binding policy, unnecessary configuration adjustments are avoided, ensuring lightweight and efficient port state switching, and improving system resource utilization efficiency and the stability of state switching.

[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 multiple dedicated sub-ports according to the obtained port information; and completing the binding configuration of the communication link according to the association relationship between the target sub-port and the shared network port.

[0047] The target network port comprises multiple dedicated sub-ports. 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 this policy. Specifically, port information of the dedicated sub-ports is collected and obtained. This port information may include the status, load, available bandwidth, and compatibility with the shared network port of each dedicated sub-port. Based on this collected port information, target sub-ports that meet the communication requirements are selected from the multiple dedicated sub-ports. During the selection process, factors such as the performance, stability, and compatibility with the shared network port of the dedicated sub-ports must be comprehensively considered.

[0048] After identifying the target sub-port, the relationship between it and the shared network port is further analyzed, including their communication protocols, data transmission rules, and permission settings. Based on these relationships, corresponding communication parameters are configured, a data transmission channel is established, access control rules are set, and the binding configuration of the communication link between the shared network port and the target sub-port is completed, ensuring that they can communicate stably and securely 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 access to the shared network port is closed; configuring the network parameters of the target network port, and transmitting the configured network parameters to the basic input / output system so that the basic input / output system can set the network functions of the target network port accordingly.

[0050] If it is determined that access to a shared network port is blocked, the first step is to disable the traffic forwarding function of that shared network port. Specifically, this involves calling a dedicated function in the network interface control module to stop the shared network port from forwarding incoming and outgoing data, cutting off its data flow path with other network nodes, and ensuring that no data is forwarded or transmitted through that port.

[0051] Next, the network parameters for the target network ports are configured. These network parameters include, but are not limited to, Internet Protocol address, subnet mask, gateway address, server address, and port communication speed. Based on the preset network configuration strategy and the actual needs of the target network, these parameters are specifically set to ensure that the parameter values ​​comply with the target network's communication standards and security specifications.

[0052] After configuring the network parameters of the target network port, the configured parameter information needs to be encapsulated in a specific data format and transmitted to the Basic Input / Output System (BIOS) through the system's internal communication channel. Upon receiving this parameter information, the BIOS will adjust the hardware registers and related control modules of the target network port accordingly, based on the configuration details. This ensures that the target network port can correctly enable its network functions according to the newly configured parameters, guaranteeing that it can correctly identify and respond to data transmission requests during network communication, and improving the efficiency and reliability of the shared network port and dedicated sub-port binding configuration.

[0053] According to an embodiment of the present invention, the communication binding relationship between the shared network port and the target network port is adjusted based on the target strategy, 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. This includes: extracting the corresponding port control command set and state switching command sequence from the preset command library based on the target strategy and the switching relationship; and sequentially triggering the execution of the state switching command sequence when the port control command set is verified to be executed successfully.

[0054] Based on the target strategy and switching relationships, a pre-defined command library is first searched. This library stores various commands corresponding to different control strategies and switching relationships. The matching port control command set and state switching command sequence need to be accurately located and extracted from the pre-defined command library according to the specific requirements of the target strategy and the characteristics of the switching relationships. During the extraction process, keyword matching and strategy type mapping are used to ensure the accuracy of the commands and reduce the possibility of mismatched commands being incorrectly extracted.

[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 execution result of each command is monitored in real time to check whether the expected port control effect has been achieved, such as whether the shared network port has completed operations such as opening, closing, or switching modes as instructed. If all commands are executed successfully and the port status meets expectations, the port control command set is considered to have been executed effectively.

[0056] Assuming the port control command set executes successfully, commands are executed sequentially according to the predetermined order of the state transition command sequence. During execution, the command execution status is monitored in real time to ensure that the next command is initiated only after the previous one has been completed and taken effect, preventing state transition anomalies caused by disordered command execution order. This ordered triggering method ensures the stability and accuracy of the state transition process, enabling the system to complete the corresponding state transitions according to the target strategy and switching relationships. The command set verification and sequential triggering mechanism ensure the rigor of the operational logic, improving the stability and execution efficiency of the port binding and state transition process.

[0057] According to an embodiment of the present invention, the communication binding relationship between the shared network port and the target network port is adjusted based on the target strategy, 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. The method further includes: obtaining the target data structure from the shared memory with the basic input / output system based on the target strategy and the switching relationship; and executing the configuration operation sequence defined by the target data structure through the hardware register write interface of the basic input / output system.

[0058] Based on the target strategy and switching relationship, the target data structure to be obtained from the shared memory of the basic input / output system is first determined. This process requires clarifying the specific requirements of the target strategy for the data structure, as well as the parameters and configuration items involved in the switching relationship, as the basis for retrieval. By accessing the address of the basic input / output system's shared memory, the corresponding target data structure is located and read according to the preset data structure identifier and indexing rules. This target data structure contains all the necessary information related to the current configuration operation, such as hardware parameters, operation instructions, and execution order.

[0059] After obtaining the target data structure, the defined configuration operation sequence is parsed to clarify the specific content of each operation, the addresses of the hardware registers involved, and the corresponding parameter values. Then, through the hardware register write interface provided by the basic input / output system, the parsed parameter values ​​are written to the corresponding hardware registers one by one in the predetermined order of the configuration operation sequence. During the writing process, the results of each write operation must be verified in real time to ensure that the parameter values ​​are accurately received and effective by the registers. If a write exception occurs, an error handling mechanism is triggered promptly to ensure that the entire configuration operation sequence can be executed smoothly according to the definition of the target data structure, ultimately completing the corresponding hardware configuration. The target data structure ensures the consistency of the configuration logic, and the hardware register interface improves the directness and reliability of configuration execution, effectively improving the efficiency and accuracy of port-bound configuration.

[0060] According to an embodiment of the present invention, the multiple commands in the preset command library and the data structures in the shared memory are set according to multiple switching relationships. Specifically, as shown in Table 1, for the switching relationship between different current running states and target running states, the preset command library will pre-store the port control command set and state switching command sequence corresponding to each scenario, and the shared memory will pre-set the target data structure required for each scenario.

[0061] When switching from "Auto" to "On", the preset command library contains a set of port control commands corresponding to "Unbind Communication", and a sequence of state switching commands corresponding to "Enable Shared Network Port Function". The shared memory also contains a target data structure containing the configurations for these two operations. For switching from "Auto" to "Off", the preset command library contains a sequence of commands to directly execute "Off Shared Network Port Function", and the shared memory contains the corresponding configuration data structure for the off operation.

[0062] In the switching relationships between "On → Automatic" and "Off → Automatic", 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. The shared memory also contains a data structure defining the configuration operation sequence according to the order of these two steps. Whether extracting commands from the preset command library or retrieving data structures from shared memory, the purpose is to ensure the orderly execution of the "first" and "last" operations in each switching scenario in Table 1, thereby achieving accurate transitions in the running state.

[0063] Table 1

[0064]

[0065] According to an embodiment of the present invention, the received switching instruction is sent by the basic input / output system or generated by the target object through a state switching operation initiated by the front-end interactive interface.

[0066] The received switching commands mainly come from two sources. One type is sent directly by the Basic Input / Output System (PIS). These commands are usually generated based on changes in the underlying hardware state or preset startup configuration logic. For example, during system initialization, the PIS automatically issues port enable or disable commands based on hardware detection results.

[0067] Another 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 buttons or selecting options. 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, its source type can be identified first, and then subsequent processing can be performed according to the characteristics of different sources to ensure the validity of the instruction and the accuracy of its execution.

[0068] Figure 3 An interactive flowchart 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 command is sent. In operation S320, the target policy is determined. In operation S330, the communication binding relationship is adjusted. In operation S340, the running status parameters are updated. In operation S350, the shared network port is configured.

[0071] According to an embodiment of the present invention, the basic input / output system sends a switching command to the management controller. Upon receiving the command, the management controller determines the corresponding target strategy from a preset strategy library. Through orderly interaction between the basic input / output system and the management controller, and with the help of the preset strategy library, the switching logic is accurately matched, 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. Immediately after adjusting the communication binding relationship, the operating status parameters of the shared network port are updated, and finally, the updated operating status parameters are sent back to the basic input / output system. This closed-loop execution mechanism, from command to port configuration, significantly improves the efficiency and reliability of system configuration updates.

[0073] The Basic Input / Output System (BIOS) configures the shared network port based on the returned status parameters, completing the switching of operating states and configuration updates. This process not only strengthens the collaborative operation between the underlying hardware (BIOS) and management logic (management controller), but also provides a reliable guarantee for flexible switching and stable service of the shared network port. Simultaneously, through deep collaboration between the two, 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 states configured in the basic input / output system that characterize the binding access to a shared network port and a target network port, the operating states that characterize the enabled access to a shared network port, and the operating states that characterize the disabled access to a shared network port; establishing control policies corresponding to each target switching relationship based on the access logic of the port binding access, forming a preset policy library; and sending the preset policy library to the basic input / output system so that, if the validity verification of the basic input / output system is passed, the port is configured using the preset policy library.

[0075] Based on the three operational states configured in the basic input / output system—representing the state of shared network port bound to a target network port, the state of shared network port being enabled for access, and the state of shared network port being disabled for access—we first outline the possible transition scenarios between these three states, including the triggering conditions, transition paths, and expected results from one state to another. For each transition scenario, we define a relational model including the source state, target state, transition triggering conditions, and associated parameters, thereby generating multiple sets of corresponding target switching relationships to ensure coverage of all possible state transition combinations.

[0076] The access logic based on port binding includes data transmission permissions, port resource allocation rules, and status verification mechanisms. Corresponding control policies are formulated for each target switching relationship. These control policies must clearly define the operation instructions to be executed under specific switching relationships, parameter configuration standards, exception handling procedures, and status verification methods. For example, the policy for switching from a bound access state to a closed access state must include an unbinding instruction sequence, resource release rules, and status confirmation steps after closing. All control policies are organized and summarized in a unified format to form a pre-defined policy library, ensuring the completeness and logical consistency of the policies in the library.

[0077] The preset policy library is transmitted to the Basic Input / Output System (BIOS). Upon receiving the library, the BIOS verifies its validity, including checking the standardization of the policy format, the compatibility of the policy content with the hardware configuration, and whether there are any logical conflicts between the policies. If the 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 called, and the appropriate configuration operation is executed according to the target switching relationship to ensure the accuracy and stability of port state switching.

[0078] Figure 4 A schematic diagram illustrating the configuration interaction 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 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 / output system 410, and the management controller 420. The following demonstrates the multi-level collaborative management logic of the shared network port through different configuration scenarios.

[0080] Based on business requirements, the operating system 430 generates configuration parameters for the shared network port and sends them to the management controller 420. The management controller 420 parses and performs preliminary verification of the configuration parameters, and forwards the processed configuration information to the basic input / output system 410 according to preset configuration rules. The basic input / output system 410 accurately writes the configuration parameters into the shared network port register and other hardware components of the network device 440, completing the basic configuration. This configuration scenario, through the layered collaboration of the operating system 430, management controller 420, and basic input / output system 410, enables the shared network port to adapt to the data interaction needs of regular business operations.

[0081] In another configuration scenario, the operating system 430 directly generates configuration parameters for the shared network port based on business requirements and sends them to the network device 440. Simultaneously, the operating system 430 synchronizes the same configuration parameters to the management controller 420 and the basic input / output system 410. Upon receiving the configuration parameters, the network device 440 directly executes the port configuration operation at the hardware level. The management controller 420 performs configuration logic verification and records business relevance based on the synchronized parameters. The basic input / output system 410 updates the underlying hardware adaptation information based on the configuration parameters. This configuration scenario leverages the direct connection between the operating system 430 and the network device 440, while the synchronization mechanism ensures that the management controller 420 and the basic input / output system 410 are aware of and collaboratively process the configuration, improving configuration response speed and ensuring consistent understanding of port configuration status across all system levels, thus enhancing the flexibility and real-time performance of configuration management.

[0082] Furthermore, during operation, network device 440, upon detecting a need for configuration optimization of its shared network ports during hardware self-testing, proactively sends a configuration change request to the Basic Input / Output System 410. Upon receiving the request, the Basic Input / Output System 410 synchronizes it with the Management Controller 420. The Management Controller 420, combining this request with operational data from the Operating System 430, generates a final executable configuration adjustment strategy and sends it back to the Basic Input / Output System 410. The Basic Input / Output System 410 then translates the configuration strategy into executable instructions for network device 440, completing the port configuration update and simultaneously feeding the configuration result back to the Operating System 430. This configuration scenario is triggered by the hardware status of network device 440. Through multi-level reverse collaborative decision-making, intelligent configuration optimization based on the actual hardware operating status is achieved, ensuring that configuration adjustments better align with hardware health requirements and actual business operations. This enhances the system's self-maintenance and self-optimization capabilities, extends hardware lifespan, and ensures a balance between business stability and hardware reliability.

[0083] The above configuration scenarios cover a variety of configuration paths, such as layered transmission, direct connection penetration, and reverse triggering. Relying on the diverse interaction logic of the operating system 430, management controller 420, basic input / output system 410, and network device 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. The following will be combined with... Figure 5 The device is described in detail.

[0085] Figure 5 A structural block diagram of a network port configuration apparatus 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 strategy determination module 510, in response to a switching command for switching the operating state of a shared network port, determines a target strategy corresponding to the command information in the switching command from the preset strategy library, based on a preset mapping relationship between command information and control strategies in the preset strategy library. The preset strategy library includes control strategies for implementing the operating state switching, and the control strategies include a communication binding establishment strategy and a communication binding release strategy between the shared network port and the target network port. In one embodiment, the strategy determination module 510 can be used to execute the operation S210 described above, which will not be repeated here.

[0088] The binding adjustment module 520 is used to adjust the communication binding relationship between the shared network port and the target network port based on the target policy, so that, after 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. In one embodiment, the binding adjustment module 520 can be used to perform the operation S220 described above, which will not be repeated here.

[0089] The parameter transmission module 530 is used to transmit updated operating status parameters to the basic input / output system (PIS) so that the PIS can configure 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 embodiments of the present invention, any plurality of modules among the strategy determination module 510, binding adjustment module 520, and parameter transmission module 530 may be implemented in a single module, or any one of these modules may be split into multiple modules. Alternatively, at least a portion of the functionality of one or more of these modules may be combined with at least a portion of the functionality of other modules and implemented in a single module. According to embodiments of the present invention, at least one of the strategy determination module 510, binding adjustment module 520, and parameter transmission module 530 may be at least partially implemented as hardware circuitry, 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-package, an application-specific integrated circuit (ASIC), or any other reasonable means of integrating or packaging circuitry, or implemented in software, hardware, or firmware, or in any suitable combination of any of these three implementation methods. Alternatively, at least one of the strategy determination module 510, binding adjustment module 520, and parameter transmission module 530 may be at least partially implemented as a computer program module, which, when run, can perform corresponding functions.

[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 according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage portion 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 an associated chipset 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 various operations of the method flow according to embodiments of the present invention by executing programs in ROM 602 and / or RAM 603. It should be noted that programs may also be stored in one or more memories other than ROM 602 and RAM 603. Processor 601 may also execute various operations of the method flow according to embodiments of the present invention by executing programs stored in one or more memories.

[0094] According to an embodiment of the present invention, the electronic device 600 may further include an input / output (I / O) interface 605, which is also connected to a bus 604. The electronic device 600 may also include one or more of the following components connected to the input / output (I / O) interface 605: an input section 606 including a keyboard, mouse, etc.; an output section 607 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 608 including a hard disk, etc.; and a communication section 609 including a network interface card such as a LAN card, modem, etc. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the input / output (I / O) interface 605 as needed. A removable medium 611, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 610 as needed so that computer programs read from it can be installed into the 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 it may exist independently and not assembled 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 embodiments of the present invention, a computer-readable storage medium may be a non-volatile computer-readable storage medium, such as including, but not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. For example, according to embodiments of the present invention, a computer-readable storage medium may include ROM 602 and / or RAM 603 and / or one or more memories other than ROM 602 and RAM 603 described above.

[0097] Embodiments of the present invention also include a computer program product comprising a computer program containing program code for performing the methods shown in the flowchart. When the computer program product is run on a computer system, the program code is used to enable the computer system to implement the network port configuration method provided in the embodiments of the present invention.

[0098] When the computer program is executed by the processor 601, it performs the functions defined in the system / apparatus of this invention. According to embodiments of the invention, the systems, apparatuses, modules, units, etc., described above can be implemented by computer program modules.

[0099] In one embodiment, the computer program may rely on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may also be transmitted and distributed in the form of signals over a network medium, and downloaded and installed via the communication section 609, and / or installed from the removable medium 611. The program code contained in the computer program can be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., 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 the removable medium 611. When the computer program is executed by the processor 601, it performs the functions defined in the system of this embodiment of the invention. According to embodiments of the invention, the systems, devices, apparatuses, modules, units, etc., described above can be implemented by computer program modules.

[0101] According to embodiments of the present invention, program code for executing the computer programs provided in the embodiments of the present invention can be written in any combination of one or more programming languages. Specifically, these computational 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's computing device, partially on the user's device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).

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

[0103] Those skilled in the art will understand that the features described in the various embodiments of the present invention can be combined and / or combined in various ways, even if such combinations or combinations are not explicitly described in the present invention. In particular, the features described in the various embodiments of the present invention can be combined and / or combined in various ways without departing from the spirit and teachings of the present invention. All such combinations and / or combinations fall within the scope of the present invention.

[0104] The above descriptions of the embodiments are only intended to help understand the method and core ideas of the present invention. However, these embodiments are merely for illustrative purposes and are not intended to limit the scope of the invention. Although various embodiments have been described above, this does not mean that the measures in the various embodiments cannot be used advantageously in combination. Without departing from the scope of the invention, those skilled in the art can make various substitutions and modifications, all of which should fall within the scope of the invention.

Claims

1. A network port configuration method, characterized in that, Applied to a management controller, the method includes: In response to a switching command for switching the operating state of a shared network port, a target policy corresponding to the command information in the switching command is determined from the preset policy library according to a preset mapping relationship between command information and control policies. The preset policy library includes control policies for implementing the switching of operating states, 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. Based on the target strategy, the communication binding relationship between the shared network port and the target network port is adjusted so that, after 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. The updated operating status parameters are transmitted to the basic input / output system so that the basic input / output system can configure the shared network port; The step of determining the target strategy corresponding to the instruction information in the switching instruction from the preset strategy library based on the preset mapping relationship between instruction information and control strategies in the preset strategy library includes: Based on the preset mapping relationship, the switching relationship between the target running state in the instruction information and the current running state of the acquired shared network port is matched with the control policy in the preset policy library to obtain the target policy.

2. The method according to claim 1, characterized in that, The step of determining the target strategy corresponding to the instruction information in the switching instruction from the preset strategy library based on the preset mapping relationship between instruction information and control strategies in the preset strategy library further includes: If the switching relationship represents the switching of the running state and needs to support the binding access of the shared network port and the target network port, then the target policy is determined to be the communication binding establishment policy; If the switching relationship represents a change in the running state that only requires independent access to the shared network port or the target network port, then 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 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, then the current communication binding relationship of the shared network port is maintained.

4. The method according to claim 1 or 2, characterized in that, The target network port includes multiple 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: Based on the obtained port information, the target sub-port is determined from the multiple dedicated sub-ports; Based on the association between the target sub-port and the shared network port, the binding configuration of the communication link is completed.

5. The method according to claim 1, characterized in that, The method further includes: If it is determined that the shared network port is closed to access, disable the traffic forwarding function of the shared network port; Configure the network parameters of the target network port and transmit the configured network parameters to the basic input / output system so that the basic input / output system can set the network functions of the target network port accordingly.

6. The method according to claim 2, characterized in that, The step of adjusting the communication binding relationship between the shared network port and the target network port based on the target strategy, and then updating the operating status parameters of the shared network port according to the target operating status in the instruction information after the adjustment is completed, includes: Based on the target strategy and the switching relationship, the corresponding port control command set and state switching command sequence are extracted from the preset command library respectively; If the port control command set is successfully executed, the execution of the state switching command sequence is triggered sequentially.

7. The method according to claim 2, characterized in that, The step of adjusting the communication binding relationship between the shared network port and the target network port based on the target strategy, so as to update the operating status parameters of the shared network port according to the target operating status in the instruction information after the adjustment is completed, further includes: Based on the target strategy and the switching relationship, the target data structure is obtained from the shared memory with the basic input / output system; The configuration operation sequence defined by the target data structure is executed through the hardware register write interface of the basic input / output system.

8. The method according to claim 1, characterized in that, The received switching instruction is sent by the basic input / output system or 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 includes: Based on the running status of the bound access to the shared network port and the target network port configured in the basic input / output system, the running status of the enabled access to the shared network port, and the running status of the disabled access to the shared network port, multiple sets of target switching relationships are generated. Based on the access logic of port binding access, establish control strategies corresponding to the switching relationships of each target, and form the preset strategy library; The preset policy library is sent to the basic input / output system so that, if the validity verification of the basic input / output system is passed, the port configuration is performed using the preset policy library.

10. An electronic device, comprising: One or more processors; Memory, used to store one or more computer programs. The characteristic feature is 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