Equipment connection method and device, electronic equipment and storage medium

By identifying the type and port of the target device and re-establishing the communication connection between the external device and the server, the problem that the server cannot determine the switch and port is solved, and the stability and efficiency of data transmission are improved.

CN120281807AActive Publication Date: 2025-07-08INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202510772642.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-11
Publication Date
2025-07-08
Estimated Expiration
2045-06-11

AI Technical Summary

Technical Problem

When an external device establishes a communication connection with the server's slot through the switch, the server cannot determine the switch and port connected to the external device, resulting in a probability reduction in data transmission rate and bandwidth.

Method used

通过确定目标设备的设备类型,识别与其连接的目标交换设备和目标端口,重新建立通信连接,降低降速降带宽问题的发生概率。

Benefits of technology

It effectively reduces the speed reduction and bandwidth problem between external devices and servers, and improves the stability and efficiency of data transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120281807A_ABST
    Figure CN120281807A_ABST
Patent Text Reader

Abstract

The invention discloses an equipment connection method and device, electronic equipment and a storage medium. The method is applied to the server technology field. The method comprises the following steps: determining a target device in at least one device which establishes communication connection with a server through a switching device and a slot on the server; wherein the target device has the problem of speed drop and bandwidth drop. As the speed drop bandwidth problem is a probabilistic event, the probability of the speed drop bandwidth problem of the target equipment can be reduced by re-establishing the communication connection between the target equipment and the server. Therefore, for the target device, the target switching device connected with the target device can be determined according to the device type of the target device, and then the target port connected with the target switching device is determined according to the target switching device. Thus, the communication connection between the target device and the server can be reestablished according to the target switching device and the target port, and the probability that the target device has a prompt drop bandwidth problem is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of servers, and in particular, to a device connection method, apparatus, electronic device, and storage medium. Background Art

[0002] Currently, an external device can establish a communication connection with a server through a slot on the server, and then perform data transmission with the server based on this communication connection. Among them, the external device can be directly connected to a port on the slot, or can be connected to the port on the slot through a switch.

[0003] In some cases, the external device may probabilistically experience problems of speed reduction and bandwidth reduction, that is, the data transmission rate of the external device probabilistically decreases significantly, and / or the data transmission bandwidth of the external device probabilistically decreases significantly. By re - establishing the communication connection between the external device and the server, the probability of the occurrence of the speed - reduction and bandwidth - reduction problems can be reduced.

[0004] However, for the case where an external device establishes a communication connection with a server through a switch and a slot on the server, the server cannot determine the switch connected to the external device and the port connected to the switch. Summary of the Invention

[0005] This application provides a device connection method, apparatus, electronic device, and storage medium, which are used to determine a target switching device connected to a device and a target port connected to the target switching device for a device that establishes a communication connection with a server through a switching device and a slot on the server.

[0006] This application provides a device connection method, and the device connection method includes:

[0007] Determine a target device among at least one device, where the at least one device is a device that establishes a communication connection with a server through a switching device and a slot on the server; the current data transmission information of the target device meets a preset requirement; the slot includes multiple ports;

[0008] Determine a target switching device connected to the target device according to the device type of the target device;

[0009] Determine a target port among the multiple ports according to the target switching device; wherein, the communication connection is established based on the target switching device and the target port;

[0010] Re - establish the communication connection between the target device and the server according to the target switching device and the target port.

[0011] This application also provides a device connection apparatus, and the device connection apparatus includes:

[0012] A first determination module, configured to determine a target device among at least one device, where the at least one device is a device that establishes a communication connection with a server through a switching device and slots on the server; the current data transmission information of the target device meets a preset requirement; and the slots include multiple ports.

[0013] A second determination module, configured to determine a target switching device connected to the target device according to the device type of the target device.

[0014] A third determination module, configured to determine a target port among multiple ports according to the target switching device; wherein, the communication connection is established based on the target switching device and the target port.

[0015] A reconstruction module, configured to re - establish a communication connection between the target device and the server according to the target switching device and the target port.

[0016] This application also provides an electronic device, including: a memory, configured to store a computer program; a processor, configured to implement the steps of any of the above - mentioned device connection methods when executing the computer program.

[0017] This application also provides a computer - readable storage medium, in which a computer program is stored, and when the computer program is executed by a processor, the steps of any of the above - mentioned device connection methods are implemented.

[0018] This application also provides a computer program product, including a computer program, and when the computer program is executed by a processor, the steps of any of the above - mentioned device connection methods are implemented.

[0019] The device connection method, device, electronic device, and storage medium provided in the embodiments of this application determine a target device among at least one device that establishes a communication connection with a server through a switching device and slots on the server. Among them, the target device has problems of speed reduction and bandwidth reduction. Since the problems of speed reduction and bandwidth reduction are probabilistic events, the probability of the target device having problems of speed reduction and bandwidth reduction can be reduced by re - establishing the communication connection between the target device and the server. Therefore, for the target device, according to the device type of the target device, a target switching device connected to the target device can be determined, and then according to the target switching device, a target port connected to the target switching device can be determined. In this way, the communication connection between the target device and the server can be re - established according to the target switching device and the target port, reducing the probability of the target device having problems of speed reduction and bandwidth reduction. Description of the Drawings

[0020] To more clearly illustrate the embodiments of the present application, the following will briefly introduce the accompanying drawings required in the embodiments. Obviously, the accompanying drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other accompanying drawings can be obtained based on these drawings.

[0021] Figure 1 Schematic diagram of the application scenario provided by the embodiment of the present application;

[0022] Figure 2 Schematic flowchart of a device connection method provided by the embodiment of the present application;

[0023] Figure 3 Schematic flowchart of a process for determining a target device provided by the embodiment of the present application;

[0024] Figure 4 Schematic flowchart of a process for re - establishing a communication connection between a target device and a server provided by the embodiment of the present application;

[0025] Figure 5 Schematic flowchart of another device connection method provided by the embodiment of the present application;

[0026] Figure 6 Schematic flowchart of a process for processing a device set provided by the embodiment of the present application;

[0027] Figure 7 Schematic flowchart of a process for adding a new device to a device set provided by the embodiment of the present application;

[0028] Figure 8 Schematic diagram of the interaction of each component in a server provided by the embodiment of the present application;

[0029] Figure 9 Schematic diagram of the structure of a device connection device provided by the embodiment of the present application;

[0030] Figure 10 Schematic diagram of the structure of an electronic device provided by the present application. Detailed implementation manners

[0031] The following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only some embodiments of the present application, rather than all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the protection scope of the present application.

[0032] It should be noted that in the description of this application, the terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or elements inherent to such process, method, article or device. The terms "first", "second", etc. in this application are used to distinguish similar objects, rather than to describe a specific order or sequence.

[0033] First, the nouns involved in this application are explained:

[0034] The Peripheral Component Interconnect Express (PCIE) is a high-speed serial bus used to connect a server to external devices. The server includes PCIE slots, and external devices can be connected to the server through the PCIE slots on the server. PCIE is developed on the basis of the Peripheral Component Interconnect (PCI) bus. The release of the PCIE 1.0 version provides the initial PCIE specification, and PCIE 1.0 supports single-channel data transmission, and the data transmission rate of each channel is 2.5 Gbps. In addition, PCIE 1.0 uses differential signal transmission during data transmission to improve the anti-interference ability during data transmission.

[0035] To meet the growing computing needs and technological development, PCIE technology has evolved from the PCIE 1.0 version to the PCIE 5.0 version. During the development of PCIE technology, not only the data transmission bandwidth, rate, and data transmission performance have been improved, but also new functions and features have been provided. Exemplarily, the new functions and features may include, for example, Single Root I / O Virtualization (SR-IOV), Advanced Error Reporting (AER), and Non-Volatile Memory Express (NVMe), etc.

[0036] With the development of PCIE technology, the application scenarios of PCIE technology have become increasingly rich. For some complex application scenarios, the connection method between external devices and servers is no longer limited to the external devices establishing a communication connection with the server through the PCIE slots on the server. The connection method between external devices and servers can also be: the external devices establish a communication connection with the server through a switching device and the PCIE slots on the server. For external devices that establish a communication connection with the server through a switching device and the PCIE slots on the server, since the communication link between the external device and the server is relatively complex, the probability of the external device experiencing speed reduction and bandwidth reduction problems increases.

[0037] In the related art, the probability of the external device experiencing speed reduction and bandwidth reduction problems can be reduced by re - establishing the communication connection between the external device and the server. For devices that establish a communication connection with the server through the PCIE slots on the server, the server cannot determine the switch connected to the external device and the port connected to the switch, and thus cannot re - establish the communication connection between the external device and the server.

[0038] In view of this, the present application provides a device connection method for a target device (the target device establishes a communication connection with the server through a switching device and a slot on the server) that has speed reduction and bandwidth reduction problems. When the target device has speed reduction and bandwidth reduction problems, the target switching device connected to the target device and the target port on the slot of the server that establishes a communication connection with the target switching device can be determined according to the device type of the target device. Then, according to the target switch and the target port, the communication connection between the target device and the server is re - established, reducing the probability of the target device experiencing speed reduction and bandwidth reduction problems.

[0039] To enable those skilled in the art of this technology to better understand the solution of the present application, the following further elaborates on the present application in conjunction with the accompanying drawings and specific embodiments.

[0040] Combined with the specific application environment architecture or specific hardware architecture on which the execution of the device connection method depends, the specific application environment architecture or specific hardware architecture is described herein. Refer to Figure 1 , Figure 1 is a schematic diagram of the application scenario provided by the embodiment of the present application. As Figure 1 shown, it includes: a server 11, a switching device 12, and a device 13. Among them, there is a slot 14 on the server 11. The slot 14 can be, for example, a PCIE slot. The switching device 12 can be, for example, a switch. The device 13 can include devices such as network cards and graphics cards.

[0041] In the actual application process, device 13 can establish a communication connection with server 11 through switching device 12 and slot 14. After device 13 establishes a communication connection with server 11, device 13 and server 11 can perform data transmission based on this communication connection.

[0042] It should be noted that Figure 1 this is only an example to illustrate an application scenario, and it is not a limitation on the application scenario.

[0043] The following uses specific embodiments to describe in detail the technical solution of the present application and how the technical solution of the present application solves the above technical problems. These several specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below with reference to the accompanying drawings.

[0044] Figure 2 It is a schematic flowchart of a device connection method provided by an embodiment of the present application. As Figure 2 shown, an embodiment of the present application provides a device connection method, and a detailed description of this method is as follows:

[0045] S201: Determine a target device among at least one device. The at least one device is a device that establishes a communication connection with a server through a switching device and a slot on the server; the current data transmission information of the target device meets a preset requirement; the slot includes multiple ports.

[0046] The execution subject of the present application can be a server or a device connection device set in the server. The device connection device can be implemented by software or through a combination of software and hardware.

[0047] In some embodiments, slots for connecting external devices are stored on the server. The slots include multiple ports, and the multiple ports are used to connect external devices and switching devices, etc. The slot can be, for example, a PCIE slot. For any external device, the way for the external device to establish a communication connection with the server can include: the external device establishes a communication connection with the server through a slot on the server, and the external device establishes a communication connection with the server through a switching device and a slot on the server. Among them, the switching device can be, for example, a switch.

[0048] It should be noted that for the way that an external device establishes a communication connection with a server through a switching device and a slot on the server, the external device can establish a communication connection with the switching device, and the switching device establishes a communication connection with the server through a slot on the server, so as to realize that the external device establishes a communication connection with the server through the switching device and the slot on the server.

[0049] At least one device is a device that establishes a communication connection with a server through a switching device and a slot on the server. The at least one device may include, for example, a network card, a graphics card, an NVMe solid-state drive, etc. Exemplarily, assuming that the switching devices that establish communication connections with the server through the slots on the server include Switch 1 and Switch 2, where Switch 1 establishes communication connections with Device A and Device B, and Switch 2 establishes a communication connection with Device C. In summary, Device A and Device B establish communication connections with the server through Switch 1 and the slots on the server; Device C establishes a communication connection with the server through Switch 2 and the slots on the server, then the at least one device includes Device A, Device B, and Device C.

[0050] For each device among the at least one device, the current data transmission information of the device may include, for example: the data transmission rate, data transmission bandwidth, etc. when the device performs data transmission with the server at the current moment.

[0051] The target device is a device among the at least one device, and the current data transmission information of the target device meets a preset requirement. Taking the current data transmission information of the target device including: the data transmission rate and data transmission bandwidth when the target device performs data transmission with the server at the current moment as an example, the preset requirement may be, for example, that the data transmission rate of the target device is less than the target rate threshold, and / or the data transmission bandwidth of the target device is less than or equal to the target bandwidth threshold. That is, when the current data transmission information of the target device meets the preset requirement, it indicates that the target device has a problem of speed reduction and bandwidth reduction.

[0052] S202: Determine the target switching device connected to the target device according to the device type of the target device.

[0053] The device type of the target device may be indicated by, for example, a type identifier of the target device. The switching device that establishes a communication connection with the target device may be determined according to the device type of the target device. The target device refers to the switching device that establishes a communication connection with the target device and establishes a communication connection with the server through a slot on the server.

[0054] In some embodiments, the number of switching devices that establish communication connections with the server through the slots on the server is multiple. The switching device that establishes a communication connection with the target device may be determined among the switching devices that establish communication connections with the server through the slots on the server according to the device type of the target device, and this switching device is determined as the target switching device.

[0055] S203: Determine the target port among multiple ports according to the target switching device; wherein, the communication connection is established based on the target switching device and the target port.

[0056] Since the slots on the server include multiple ports, the target switching device can establish a communication connection with any one of the multiple ports, thereby establishing a communication connection with the server. Among them, among the multiple ports, the port that establishes a communication connection with the target switching device is the target port.

[0057] S204: Re - establish the communication connection between the target device and the server according to the target switching device and the target port.

[0058] In the way that the target device establishes a connection with the server through the target switching device and the slot on the server, the target device establishes a communication connection with the target switching device, and the target switching device establishes a communication connection with the target port, thereby realizing the establishment of the communication connection between the target device and the server. Therefore, after determining the target switching device and the target port, the communication connection between the target device and the server can be re - established according to the target switching device and the target port.

[0059] In Figure 2 In the illustrated embodiment, among at least one device that establishes a communication connection with the server through the switching device and the slot on the server, determine the target device, and the current data transmission information of the target device meets the preset requirements. Then, according to the device type of the target device, determine the target switching device that establishes a communication connection with the target device and a communication connection with the server, and further determine the target port on the slot of the server that establishes a communication connection with the target switching device. Finally, re - establish the communication connection between the target device and the server according to the target switching device and the target port. In the above method, since there is a problem of speed reduction and bandwidth reduction for the target device, and the occurrence of the speed reduction and bandwidth reduction problem is probabilistic. For the target device with the problem of speed reduction and bandwidth reduction, determine the target switching device of the target device through the device information of the target device, and determine the target port according to the target switching device. Finally, re - establish the communication connection between the target device and the server according to the target switching device and the target port, reducing the probability of the target device having the problem of speed reduction and bandwidth reduction.

[0060] In Figure 2 Based on the illustrated embodiment, below, in combination with Figure 3 Further illustrate the process of determining the target device in the device connection method provided by the embodiments of the present application among at least one device.

[0061] Figure 3 It is a schematic flowchart of a process for determining a target device provided by an embodiment of the present application. As Figure 3 shown, this process may include the following steps:

[0062] S301: Determine at least one first device that meets the preset requirements among at least one device.

[0063] For each first device among at least one first device, the first device is a device among at least one device whose current data transmission information meets a preset requirement. The preset requirement includes: the current data transmission rate of the device is less than or equal to a target rate threshold, and / or, the current data transmission bandwidth of the device is less than or equal to a target bandwidth threshold.

[0064] Suppose at least one device includes device A, where the current data transmission rate of device A is 100 bps and the current data transmission bandwidth of device A is 8 bit / s, the target rate threshold is 500 bps, and the target bandwidth threshold is 10 bit / s. Since the current data transmission rate of device A is less than the target rate threshold and the current data transmission bandwidth of device A is less than the target bandwidth threshold. Therefore, it can be determined that device A meets the preset requirement, that is, device A can be determined as a first device.

[0065] It should be noted that the number of at least one first device is less than or equal to the number of at least one device.

[0066] In some embodiments, for each device among at least one device, the target rate threshold is the rate threshold corresponding to the device, and the target bandwidth threshold is the bandwidth threshold corresponding to the device. Specifically, the method for determining the target rate threshold and the target bandwidth threshold can be as follows: obtain the maximum data transmission rate of the device and the maximum data transmission rate of the port corresponding to the device; the port corresponding to the device is the port through which the device establishes a communication connection with the server; determine the smaller value between the maximum data transmission rate of the device and the maximum data transmission rate of the port corresponding to the device as the target rate threshold; obtain the maximum data transmission bandwidth of the device and the maximum data transmission bandwidth of the port corresponding to the device; determine the smaller value between the maximum data transmission bandwidth of the device and the maximum data transmission bandwidth of the port corresponding to the device as the target bandwidth threshold.

[0067] The maximum data transmission rate of the device refers to the maximum data transmission rate supported by the device. Similarly, the maximum bandwidth transmission bandwidth of the device refers to the maximum data transmission bandwidth supported by the device.

[0068] The port corresponding to the device refers to the logical port corresponding to the device on the slot of the server. It should be noted that there are also multiple physical connection channels on the slot. For each device, the device can be connected through at least one of the multiple physical connection channels to connect to the port on the slot. It should be noted that the larger the number of physical connection channels corresponding to the device, the larger the maximum data transmission rate and the maximum data transmission bandwidth of the port corresponding to the device. Therefore, the maximum data transmission rate of the port corresponding to the device can be the maximum data transmission rate of the physical connection channels corresponding to the device; the maximum data transmission bandwidth of the port corresponding to the device can be the maximum data transmission bandwidth of the physical connection channels corresponding to the device.

[0069] Exemplarily, assume that the maximum data transfer rate of device A is 500 bps, and the maximum transfer rate of the port corresponding to device A is 400 bps, then the target rate threshold is determined to be 400 bps; assume that the maximum data transfer bandwidth of device A is 1 MB / s; the maximum data transfer bandwidth of the port corresponding to device A is 2 MB / s, then the target bandwidth threshold is determined to be 1 MB / s.

[0070] In some embodiments, since the amount of data transferred between the device and the server varies at different time periods. And when the amount of data transferred between the device and the server is small, the requirements for the data transfer rate and data transfer bandwidth of the device are relatively low; when the amount of data transferred between the device and the server is large, the requirements for the data transfer rate and data transfer bandwidth of the device are relatively high.

[0071] Therefore, the target rate threshold and the target bandwidth threshold can be determined according to the time period in which the current moment is located. The specific method can be as follows: in the first time period and the second time period, determine the time period in which the current moment is located; for each device among at least one device, the data transfer requirement of the device in the first time period is greater than the data transfer requirement of the device in the second time period; when the time period in which the current moment is located is the first time period, the first rate threshold is determined as the target rate threshold, and the first bandwidth threshold is determined as the target bandwidth threshold; when the time period in which the current moment is located is the second time period, the second rate threshold is determined as the target rate threshold, and the second bandwidth threshold is determined as the target bandwidth threshold; wherein, the second rate threshold is less than the first rate threshold; the second bandwidth threshold is less than the first bandwidth threshold.

[0072] The first time period is a time period when the amount of data transferred between the device and the server is large. The first time period can be, for example, 9:00 - 18:00 every day; the second time period is a time period when the amount of data transferred between the device and the server is small. The second time period can be, for example, 18:00 - 9:00 of the next day. If the time period in which the current moment is located is the first time period, the requirements for the data transfer rate and data transfer bandwidth of the device are relatively high. Therefore, the first rate threshold is determined as the target rate threshold, and the first bandwidth threshold is determined as the target bandwidth threshold. In this way, when the data transfer rate of the device is less than or equal to the first rate threshold, and / or, when the data transfer bandwidth of the device is less than or equal to the first bandwidth threshold, the device is determined as the first device.

[0073] If the time period in which the current moment is located is the second time period, the requirements for the data transmission rate and data transmission bandwidth of the device are relatively low. Therefore, the second rate threshold is determined as the target rate threshold, and the second bandwidth threshold is determined as the target bandwidth threshold. In this way, when the data transmission rate of the device is less than or equal to the second rate threshold, and / or the data transmission bandwidth of the device is less than or equal to the second bandwidth threshold, the device is determined as the first device.

[0074] S302: Determine the target device among at least one first device.

[0075] In some embodiments, the method of determining the target device among at least one first device may be as follows: Obtain a device set, where the device set includes at least one device whose data transmission requirement is greater than or equal to a preset requirement value; Determine the target device among at least one first device according to the device set.

[0076] The data transmission requirement of a device refers to the requirements for the data transmission rate and data transmission bandwidth of the device during data transmission. In some embodiments, for a device with a high data transmission requirement, after the device has a problem of speed reduction and bandwidth reduction, it is necessary to solve the problem of speed reduction and bandwidth reduction of the device; for a device with a low data transmission requirement, after the device has a problem of speed reduction and bandwidth reduction, the problem of speed reduction and bandwidth reduction of the device may not be solved.

[0077] In some embodiments, a device whose data transmission requirement is greater than or equal to a preset requirement value is determined as a device with a high data transmission requirement. Among them, the preset requirement value includes a rate preset value and a bandwidth preset value; for any device, the data transmission requirement of the device being greater than or equal to the preset requirement value means that during data transmission of the device, the data transmission rate of the device needs to be greater than or equal to the rate preset value corresponding to the device, and / or the data transmission bandwidth of the device needs to be greater than or equal to the bandwidth preset value corresponding to the device.

[0078] Specifically, the method of determining the target device among at least one first device according to the device set may be as follows: For each first device among at least one first device, determine whether the device set includes the first device. If the device set includes the first device, then the first device is determined as the target device; if the device set does not include the first device, then the first device is not determined as the target device.

[0079] Exemplarily, assume that among at least one first device, there are device X, device Y, and device Z, and in the device set, there are device A, device B, device X, and device C. Then the first device X among at least one first device is determined as the target device.

[0080] In some embodiments, the method for determining the target device may also be: after determining at least one first device among at least one device, the at least one first device may be determined as the target device.

[0081] In some embodiments, the processing method for the device with the problem of speed and bandwidth reduction may be indicated by indication information. The processing methods include processing all the devices with the problem of speed and bandwidth reduction, not processing all the devices with the problem of speed and bandwidth reduction, and processing some of the devices with the problem of speed and bandwidth reduction. The indication information may be represented by 0, 1, 2, etc. Among them, 0 indicates not processing all the devices with the problem of speed and bandwidth reduction; 1 indicates processing all the devices with the problem of speed and bandwidth reduction; 2 indicates processing some of the devices with the problem of speed and bandwidth reduction.

[0082] In the case where the processing method is to process all the devices with the problem of speed and bandwidth reduction, the at least one first device is determined as the target device; in the case where the processing method is to process some of the devices with the problem of speed and bandwidth reduction, the target device is determined among the at least one first device; in the case where the processing method is not to process all the devices with the problem of speed and bandwidth reduction, determining the target device is stopped.

[0083] In some embodiments, the processing method for the device with the problem of speed and bandwidth reduction may be modified by modifying the indication information. Exemplarily, assume that the processing method in the server is not to process all the devices with the problem of speed and bandwidth reduction. The client may send a modification request to the server. The indication information included in the modification request is 2, indicating processing some of the devices with the problem of speed and bandwidth reduction. After receiving the modification request, the server changes the processing method from not processing all the devices with the problem of speed and bandwidth reduction to processing some of the devices with the problem of speed and bandwidth reduction.

[0084] For the modification of the indication information, the staff can perform operations on the client, and then the client sends a modification request to the server. Exemplarily, the way for the staff to perform modification operations on the client can be as follows: The client includes options for determining the indication information. Exemplarily, the options for the indication information can include 0, 1, and 2, where 0 means not to process any devices with speed reduction and bandwidth reduction problems; 1 means to process all devices with speed reduction and bandwidth reduction problems; 2 means to process some devices with speed reduction and bandwidth reduction problems. The staff can modify the processing method through the options of the indication information. In addition, the staff can also use the System Configuration Editor (SCE) tool under the Operating System (OS) to modify the indication information. Or, the staff can modify the processing method through a remote management tool, and the remote management tool can be, for example, the Redfish tool, which is a new generation of hardware management specification defined by the Distributed Management Task.

[0085] In addition, the embodiment of the present application also provides a method for determining a target device among at least one first device according to the load of the server. The specific implementation method can be as follows: Obtain the load information of the server, where the load information is used to indicate the load of the server; determine the target device among at least one first device according to the load of the server.

[0086] The load information of the server is used to measure the operating state and resource usage of the server. The load information of the server can be, for example, the occupancy rate of the Central Processing Unit (CPU) of the server. In some embodiments, the load of the server reflects the busyness of the server. The greater the load of the server, the busier the server; the smaller the load of the server, the more idle the server.

[0087] Therefore, a target device can be determined among at least one first device according to the load of the server. Specifically, when the load of the server is greater than or equal to the preset load threshold, the device among at least one first device with a data transmission requirement greater than or equal to the preset requirement value is determined as the target device; when the load of the server is less than the preset load threshold, at least one first device is determined as the target device.

[0088] When the load of the server is greater than or equal to the preset load threshold, it indicates that the server is in a relatively busy state. Therefore, devices in at least one first device with a data transmission requirement greater than or equal to the preset requirement can be determined as target devices; when the load of the server is less than the preset load threshold, it indicates that the server is in a relatively idle state. Therefore, each first device in at least one first device can be determined as a target device.

[0089] In Figure 3 In the illustrated embodiment, at least one first device in which a speed reduction and bandwidth reduction problem is determined to exist among at least one device is determined, and then a target device that needs to solve the speed reduction and bandwidth reduction problem is determined among at least one first device. It should be noted that there are various ways to determine the target device among at least one first device. The first device with a relatively high data transmission requirement among at least one first device can be determined as the target device according to the indication information; or at least one first device can be determined as the target device. In addition, according to the load situation of the server, when the server is busy, the first device with a relatively high data transmission requirement among at least one first device can be determined as the target device; when the server is idle, at least one first device can be determined as the target device, which improves the flexibility of determining the target device among at least one first device.

[0090] In addition, the device connection method provided in the embodiments of the present application further includes: obtaining a first difference between a target rate threshold and the current data transmission rate of the first device; obtaining a second difference between a target bandwidth threshold and the current data transmission bandwidth of the first device; and sending a prompt message when the first difference is greater than or equal to a first preset value, and / or the second difference is greater than or equal to a second preset value. The prompt message is used to prompt that the first device is in an abnormal state.

[0091] When the first difference is greater than or equal to the first preset value, and / or the second difference is greater than or equal to the second preset value, it indicates that after the target device has a speed reduction and bandwidth reduction problem, the data transmission rate of the target device is too low, and / or the data transmission bandwidth of the target device is too low. At this time, the server sends a prompt message to the client to prompt that the first device is in an abnormal state.

[0092] Based on the above embodiments, below, in combination with Figure 4 The process of re - establishing a communication connection between the target device and the server in the embodiments of the present application will be further described.

[0093] Figure 4 FIG. is a schematic flowchart of a process for re - establishing a communication connection between a target device and a server provided in an embodiment of the present application. As Figure 4 shown, this process may include the following steps:

[0094] S401: Obtain the first mapping relationship between multiple device types and the switching device.

[0095] The multiple device types are the device types of multiple devices respectively. The device types can include, for example, device types such as network cards and graphics cards, and the device types can be represented by type identifiers. In some embodiments, the switching devices connected to devices of different device types are different, and the first mapping relationship is used to represent, for each device type among the multiple device types, the switching device connected to the device of this device type.

[0096] Exemplarily, assume that the device types include network cards and graphics cards, where the switching device connected to the network card is Switch 1, and the switching device connected to the graphics card is Switch 2. Then, the first mapping relationship includes that the multiple device types are network cards and graphics cards, and the switching devices include Switch 1 and Switch 2, where there is a mapping relationship between the network card and Switch 1; there is a mapping relationship between the graphics card and Switch 2.

[0097] S402: Determine the target switching device according to the first mapping relationship and the device type of the target device.

[0098] The method for determining the target switch according to the first mapping relationship and the device type of the target device can be as follows: According to the device type of the target device, among the switching devices connected to the server, determine the switching device associated with the target device; the switching device associated with the target device includes the switching device directly connected to the target device, and / or, the switching device indirectly connected to the target device; according to the device type of the target device and the first mapping relationship, determine the target switching device among the switching devices associated with the target device.

[0099] In some embodiments, the connection method between the target device and the switching device can include a direct connection method and an indirect connection method. Among them, the switching device directly connected to the target device refers to the switching device that establishes a physical connection with the target device; the switching device indirectly connected to the target device refers to the switching device that establishes a communication connection with the target device through other switching devices. The server stores the switching devices associated with each device. Therefore, the switching device associated with the target device can be determined according to the device type of the target device.

[0100] Exemplarily, assume that the target device establishes a communication connection with the server through Switch 1, Switch 2, and a slot on the server, and the target device is connected to Switch 1, Switch 1 is connected to Switch 2, and Switch 2 is connected to the server through a slot on the server. At this time, the switching devices associated with the target device are determined to include Switch 1 and Switch 2, and Switch 1 is the switching device directly connected to the target device, and Switch 2 is the switching device indirectly connected to the target device.

[0101] Since the number of switching devices associated with the target device is one or more, in the case where the number of switching devices associated with the target device is one, this switching device can be determined as the target device. However, in the case where the number of switching devices associated with the target device is multiple, it is necessary to determine the target switching device among the multiple switching devices associated with the target.

[0102] In some embodiments, the target switching device can be determined according to the device type of the target device and the first mapping relationship among the switching devices associated with the target device. Specifically, according to the device type of the target device, the switching device having a mapping relationship with the target device can be determined in the first mapping relationship; then, for each switching device associated with the target device, it is determined whether this switching device is the switching device having a mapping relationship with the target device. In the case where this switching device is the switching device having a mapping relationship with the target device, this switching device is determined as the target switching device; in the case where this switching device is not the switching device having a mapping relationship with the target device, this switching device is determined not to be the target switching device.

[0103] In some embodiments, another way to determine the target switching device can be: according to the device type of the target device, among the switching devices connected to the server, determine the switching devices associated with the target device; the switching devices associated with the target device include the switching devices directly connected to the target device and / or the switching devices indirectly connected to the target device; determine the switching devices connected to the slot; according to the switching devices connected to the slot, determine the target switching device among the switching devices associated with the target device.

[0104] In some embodiments, the connection method between the switching device and the slot can include: the switching device is directly connected to the slot, or the switching device establishes a communication connection with the slot through other switching devices. The switching device connected to the slot refers to the way that the switching device is directly connected to the slot.

[0105] The switching devices associated with the target device can be determined among the switching devices connected to the server. Since the number of switching devices associated with the target device is one or more, the switching device directly connected to the slot can be determined. Then, for each switching device among the switching devices associated with the target device, it is determined whether this switching device is the switching device directly connected to the slot. In the case where this switching device is the switching device directly connected to the slot, this switching device is determined as the target switching device; in the case where this switching device is not the switching device directly connected to the slot, this switching device is determined not to be the target switching device.

[0106] S403: Obtain the second mapping relationship between the device information and the port encoding of multiple switching devices.

[0107] Since there are multiple ports on the slot, for any one of the multiple ports, the port corresponds to a port code, and the port code is used to identify the port. Since the communication connection between the target device and the server is established based on the target switching device and the target port, for any switching device, there is a port to which the switching device is correspondingly connected.

[0108] The server stores the device information of multiple switching devices and the second mapping relationship between the port codes. Among them, the device information of the multiple switching devices may include the device identity (DID), vendor identity (VID), subsystem identification code (SSID), and subsystem vendor identification code (SVID) of each of the multiple switching devices. The device information of the switching device can identify the switching device. For any switching device, the port code having a mapping relationship with the switching device refers to the port to which the switching device is correspondingly connected among the multiple ports of the slot.

[0109] S404: Determine the port code of the target switching device according to the second mapping relationship and the device information of the target switching device.

[0110] Exemplarily, assume that the multiple switching devices included in the second mapping relationship include Switch 1 and Switch 2. Among them, the DID of Switch 1 is 0X12, the VID is 123, the SSID is 319301, and the SVID is 294102; the DID of Switch 2 is 0X28, the VID is 242, the SSID is 138041, and the SVID is 341280. The port code having a mapping relationship with Switch 1 is 0X01, and the port code having a mapping relationship with Switch 2 is 0X02. The DID of the target switching device is 0X12, the VID is 123, the SSID is 319301, and the SVID is 294102. Then, according to the second mapping relationship and the device information of the target switching device, the port code of the target switching device is determined to be 0X01.

[0111] S405: Determine the port indicated by the port code of the target switching device among the multiple ports as the target port.

[0112] Exemplarily, assume that the multiple ports include Port 1, Port 2, and Port 3. Among them, the port code of Port 1 is 0X01, the port code of Port 2 is 0X02, the port code of Port 3 is 0X03, and the port code of the target device is 0X01. Then, the target port is determined to be Port 1.

[0113] S406: Send indication information to the target switching device, where the indication information is used to instruct the target switching device to re - establish the first communication connection between the target switching device and the target device.

[0114] The first communication connection is the communication connection between the target switching device and the target device.

[0115] After receiving the indication information sent by the server, the target switching device re - establishes the first communication connection with the target device. It should be noted that the target switching device re - establishing the first communication connection with the target device means that, without disconnecting the physical connection with the target device, the target switching device re - establishes the first communication connection with the target device by resetting the link state, refreshing the protocol negotiation, re - synchronizing the data stream, etc., that is, the target switching device and the target device re - establish the first communication connection at the logical level. The way for the target switching device and the target device to re - establish the first communication connection can be, for example, the hot - reset method. The physical connection between the target device and the target switching device means connecting the target device and the target switching device at the physical level through a connection link.

[0116] S407: Receive response information, where the response information is used to indicate that the target switching device has re - established the first communication connection with the target device.

[0117] After the target switching device and the target device re - establish the first communication connection, they send response information to the server.

[0118] S408: In the case where the first communication connection has been re - established, re - establish the second communication connection between the server and the target switching device through the target port; the communication connection between the target device and the server includes the first communication connection and the second communication connection.

[0119] After receiving the response information sent by the target switching device, the server determines that the first communication connection between the target switching device and the target device has been re - established. At this time, the server can re - establish the second communication connection between the server and the target switching device through the target port. It should be noted that re - establishing the second communication connection between the server and the target switching device means that, without disconnecting the physical connection with the target switching device, the server re - establishes the second communication connection between the server and the target switching device by resetting the link state, refreshing the protocol negotiation, re - synchronizing the data stream, etc., that is, the server and the target switching device re - establish the second communication connection at the logical level. The way to re - establish the second communication connection can be, for example, the hot - reset method. The physical connection between the server and the target switching device means connecting the target switching device and the server at the physical level through a connection link.

[0120] After the second communication connection is re-established, since the communication connection between the target device and the server includes the first communication connection and the second communication connection, and both the first communication connection and the second communication connection have been re-established, it indicates that the communication connection between the target device and the server has been completed.

[0121] In Figure 4 In the embodiment shown, first, according to the device type of the target device, the target switching device is determined in the switching device connected to the server, where the target switching device refers to the device that is connected to the target device and has established a communication connection with the server. Then, according to the device information of the target switching device, among the multiple ports on the slot of the server, the target port corresponding to the target switching device is determined. Then, an indication message is sent to the target switching device to instruct the target switching device to re-establish the first communication connection with the target device. After the target switching device re-establishes the first communication connection, the server re-establishes the second communication connection between the target switching device and the server according to the target port. In the above manner, by determining the target switching device in the switching device connected to the server and determining the target port among the multiple ports of the slot. Then, according to the target switching device and the target port, the first communication connection and the second communication connection are re-established, thereby realizing the re-establishment of the communication connection between the target device and the server, and reducing the occurrence probability of the problem of speed reduction and bandwidth reduction of the target device.

[0122] In addition, the device connection method provided in the embodiment of the present application further includes obtaining the data transmission information of the target device after the i-th re-establishment of the communication connection between the target device and the server; when the data transmission information after the i-th update meets the preset requirements, re-establishing the communication connection between the target device and the server for the (i + 1)-th time according to the target switching device and the target port; i is 1, 2, 3... in sequence.

[0123] Exemplarily, after the communication connection between the target device and the server is re-established for the first time by the method in the above embodiment, the server obtains the data transmission information of the target device at this time and determines whether the data transmission information of the target device at this time meets the preset requirements. If it is determined that the data transmission information of the target device meets the preset requirements, it indicates that there is still a problem of speed reduction and bandwidth reduction of the target device. Therefore, the communication connection between the target device and the server is established for the second time according to the target switching device and the target port.

[0124] After the server re-establishes the communication connection between the target device and the server for the second time, the server obtains the data transmission information of the target device at this time and determines whether the data transmission information of the target device at this time meets the preset requirements. If it is determined that the data transmission information of the target device does not meet the preset requirements, it indicates that there is no problem of speed reduction and bandwidth reduction of the target device at this time. Therefore, the re-establishment of the communication connection between the target device and the server is stopped.

[0125] In the above embodiments, the implementation process of the device connection method provided by the embodiments of the present application is introduced. In addition, since the server includes a Basic Input / Output System (BIOS) and a Baseboard Management Controller (BMC), the device connection method provided by the present application can be implemented based on the BIOS and BMC in the server. Next, in combination with Figure 5 , the device connection method provided by the present application will be further introduced through specific embodiments.

[0126] Figure 5 is a schematic flowchart of another device connection method provided by the embodiments of the present application. As Figure 5 shown, this process may include the following steps:

[0127] S501: Initialize the BIOS.

[0128] The BIOS is the underlying firmware program that runs when the server hardware starts. Therefore, when the server starts, the BIOS will enter the initialization stage. The initialization stage of the BIOS mainly includes detecting whether there are faults or abnormalities in the core hardware of the server. Therefore, in the initialization stage of the BIOS, it is necessary to detect whether devices such as network cards and graphics cards connected to the server are abnormal.

[0129] For at least one device such as a network card and a graphics card connected to the PCIE slot on the server through a switching device, it is also necessary to detect whether the data transfer rate and data transfer bandwidth of the at least one device are normal.

[0130] S502: The BIOS determines whether it is necessary to determine at least one first device that meets the preset requirements among at least one device according to the indication information.

[0131] If so, execute S503.

[0132] The indication information is used to indicate the processing method for devices with speed reduction and bandwidth reduction problems. The processing methods include processing all devices with speed reduction and bandwidth reduction problems, not processing all devices with speed reduction and bandwidth reduction problems, and processing some devices with speed reduction and bandwidth reduction problems. In the case where the processing method is not to process all devices with speed reduction and bandwidth reduction problems, stop determining at least one first device.

[0133] In the cases where the processing method is to process all devices with speed reduction and bandwidth reduction problems and to process some devices with speed reduction and bandwidth reduction problems, execute S503.

[0134] S503: The BIOS sets the first mapping relationship between multiple device types and the switching device.

[0135] The first mapping relationship between multiple device types and the switching device is preset. For any device type, the first mapping relationship includes the switching devices that can be connected to the devices of this device type, and there is a mapping relationship between the devices of this device type and the switching devices that can be connected to the devices of this device type.

[0136] S504: For each device in at least one device, the BIOS determines the target rate threshold according to the maximum data transfer rate of this device and the maximum data transfer rate of the port corresponding to this device; and determines the target bandwidth threshold according to the maximum data transfer bandwidth of this device and the maximum data transfer bandwidth of the port corresponding to this device.

[0137] For the specific process of determining the target rate threshold and the target bandwidth threshold, reference can be made to Figure 3 S301 in the illustrated embodiment, which will not be elaborated here.

[0138] S505: The BIOS determines at least one first device among at least one device according to the current data transfer rate of the device, the target rate threshold, the current data transfer bandwidth of the device, and the target bandwidth threshold.

[0139] For the process of determining at least one first device among at least one device, reference can be made to Figure 3 S301 in the illustrated embodiment, which will not be elaborated here.

[0140] S506: According to the indication information, the BIOS determines the method of determining the target device among at least one first device as: using the device in at least one first device whose data transfer requirement is greater than or equal to the preset requirement value as the target device, or using at least one first device as the target device.

[0141] When the method of determining the target device is to use the device in at least one first device whose data transfer requirement is greater than or equal to the preset requirement value as the target device, S507 is executed;

[0142] When the method of determining the target device is to use at least one first device as the target device, S509 is executed.

[0143] At this time, when the indication information is 1, the method of determining the target device among at least one first device is determined as: using the device in at least one first device whose data transfer requirement is greater than or equal to the preset requirement value as the target device; when the indication information is 2, the method of determining the target device among at least one first device is determined as: using at least one first device as the target device.

[0144] Therefore, when the indication information is 1, S507 is executed; when the indication information is 2, S509 is executed.

[0145] S507: When the method for determining the target device is to use the device in at least one first device whose data transmission requirement is greater than or equal to the preset requirement value as the target device, the BIOS obtains the device set.

[0146] The device set includes at least one device whose data transmission requirement is greater than or equal to the preset requirement. It should be noted that the device set is stored in the BMC of the server. Therefore, the method for the BIOS to obtain the device set can be: The BIOS sends a first acquisition request to the BMC, and the first acquisition request is used to obtain the device set. After receiving the first acquisition request, the BMC sends the device set to the BIOS. The first acquisition request can be, for example, an Intelligent Platform Management Interface (IPMI) command.

[0147] S508: The BIOS determines the target device among at least one first device according to the device set.

[0148] For the method of determining the target device among at least one first device according to the device set, reference can be made to Figure 3 S302 in the illustrated embodiment, which will not be elaborated here.

[0149] S509: When the method for determining the target device is to use at least one first device as the target device, the BIOS determines at least one first device as the target device.

[0150] S510: The BIOS determines the switching device associated with the target device among the switching devices connected to the server according to the device type of the target device.

[0151] It should be noted that the BMC also stores the device type of each of at least one device. The BIOS can obtain the device type of the target device in the BMC. The method for the BIOS to obtain the device set can be: The BIOS sends a second acquisition request to the BMC, and the second acquisition request is used to obtain the device type of the target device. After receiving the second acquisition request, the BMC sends the device type of the target device to the BIOS. The second acquisition request can be, for example, an IPMI command. After receiving the device type of the target device, the BIOS determines the switching device associated with the target device among the switching devices connected to the server according to the device type of the target device.

[0152] For the specific introduction of determining the switching device associated with the target device, reference can be made to Figure 4 S402 in the illustrated embodiment, which will not be elaborated here.

[0153] S511: The BIOS determines a target switching device in a switching device associated with the target device according to the device type of the target device and the first mapping relationship.

[0154] For a detailed introduction to determining the target switching device in the switching device associated with the target device according to the device type of the target device and the first mapping relationship, reference can be made to Figure 4 S402 in the illustrated embodiment, which will not be elaborated here.

[0155] S512: The BIOS determines a target port among multiple ports according to the target switching device.

[0156] For a detailed introduction to determining the target port among multiple ports according to the target switching device, reference can be made to Figure 4 S403, S404, and S405 in the illustrated embodiment, which will not be elaborated here.

[0157] S513: The BIOS re - establishes a communication connection between the target device and the server according to the target switching device and the target port.

[0158] For a detailed introduction to re - establishing a communication connection between the target device and the server according to the target switching device and the target port, reference can be made to Figure 4 S406, S407, and S408 in the illustrated embodiment, which will not be elaborated here.

[0159] In Figure 5 In the illustrated embodiment, among at least one device that establishes a communication connection with the server through a switching device and a slot on the server, a target device is determined, and the current data transmission information of the target device meets a preset requirement. Then, according to the device type of the target device, a target switching device that establishes a communication connection with the target device and also with the server is determined, and further, a target port on the slot of the server that establishes a communication connection with the target switching device is determined. Finally, according to the target switching device and the target port, a communication connection between the target device and the server is re - established. In the above method, since there is a problem of speed reduction and bandwidth reduction for the target device, and the occurrence of the speed - reduction and bandwidth - reduction problem is probabilistic. For the target device with the problem of speed reduction and bandwidth reduction, through the device information of the target device, the target switching device of the target device is determined, and the target port is determined according to the target switching device. Finally, according to the target switching device and the target port, a communication connection between the target device and the server is re - established, reducing the probability of the target device having the problem of speed reduction and bandwidth reduction.

[0160] In the above - mentioned embodiment, a device connection method provided by the present application is introduced. In addition, the device connection method provided by the present application further includes the processing of a device set. Next, in combination with Figure 6, introduce the processing method for the device set.

[0161] Figure 6 This is a schematic diagram of a processing flow for a device set provided by an embodiment of the present application. As Figure 6 shown, this process may include the following steps:

[0162] S601: Receive an update instruction, where the update instruction includes device information of a second device and processing method information, and the processing method information is used to indicate the processing method for the device set.

[0163] The update instruction is an IPMI command. After the server receives the update instruction, it determines the processing method for the device set according to the processing method information in the update instruction. The processing methods for the device set include addition processing and deletion processing. Among them, addition processing means adding the device information of the second device to the device set; deletion processing means deleting the device information of the second device from the device set.

[0164] In some embodiments, the update instruction further includes instruction identification information, which may be, for example, _SWEPID_, used to indicate that this instruction is an update instruction.

[0165] S602: Update the device set according to the processing method and the device information of the second device to obtain an updated device set.

[0166] For ease of understanding, the following combines Figure 7 to introduce, taking the processing method information in the update instruction being used to indicate that the processing method for the device set is addition processing as an example, the method of updating the device set according to the processing method and the device information of the second device to obtain an updated device set. Figure 7 This is a schematic diagram of a process for adding a device to a device set provided by an embodiment of the present application. As Figure 7 shown, this process may include the following steps:

[0167] S701: The BMC receives an instruction sent by the client.

[0168] Since the device set is stored in the BMC of the server, the BMC updates the device set after receiving the update instruction sent by the client.

[0169] S702: Determine whether this instruction is an update instruction according to the instruction identification information.

[0170] If so, execute S703.

[0171] After receiving the instruction sent by the client, the server determines whether the instruction is an update instruction based on the instruction identification information. In the case where the instruction is an update instruction, the processing of the device set is started; in the case where the instruction is not an update instruction, the device set is not processed.

[0172] S703: Parse and process the device information of the second device in the update instruction to obtain the parsed device information of the second device.

[0173] Parsing and processing the device information of the second device means processing the device information of the second device according to a preset parsing rule so that the format of the device information of the second device is consistent with the format of the device information of each device in the device set. Through this, the parsed device information of the second device is device information that can be understood by the server.

[0174] Taking the device information of the second device including the DID, VID, SSID, and SVID of the second device as an example, the way to parse and process the device information of the second device can be, for example: combining the DID and VID of the second device, and combining the SSID and SVID of the second device.

[0175] S704: Create a new structure and set variables in the structure, and assign the parsed device information of the second device to the variable.

[0176] After assigning the parsed device information of the second device to the variable, the parsed device information of the second device can be obtained by retrieving the variable in the structure.

[0177] S705: Read the device set in the first storage area.

[0178] S706: Determine whether the device set includes the second device according to the parsed device information of the second device.

[0179] If not, then execute S707;

[0180] If so, then S709.

[0181] S707: Write the device information of the second device into the device set.

[0182] S708: Return a second response message to the client, and the second response message is used to indicate that the second device has been newly added to the device set.

[0183] S709: Return a first response message to the client, and the first response message is used to indicate that the second device already exists in the device set.

[0184] When the processing method information indicates that the processing method for the device set is deletion processing, the process of the BMC performing deletion processing on the device set is similar to the process of performing addition processing on the device set. The difference is that when there is device information of the parsed second device in the device set, the device information of the parsed second device in the device set is deleted to obtain an updated device set. Then, the original device set is erased in the first storage area, and the updated device set is written into the first storage area. Finally, a third response message is sent to the client, and the third response message is used to indicate that the second device in the device set has been deleted.

[0185] When there is no device information of the parsed second device in the device set, a fourth response message is sent to the client, and the fourth response message is used to indicate that the second device does not exist in the device set.

[0186] In some embodiments, the BMC may also receive a query instruction, where the query instruction includes device information of a third device; and send a query response, where the query response is used to indicate whether the device set includes the third device.

[0187] After receiving the query instruction, the BMC parses the device information of the third device to obtain the parsed device information of the third device. Create a structure, create a new structure and set variables in the structure, and assign the parsed device information of the third device to the variable. Obtain the device set in the first storage area, and determine whether the device set includes the third device according to the parsed device information of the third device. If the device set includes the parsed device information of the third device, a query response is sent to the client. At this time, the query response is used to indicate that the device set includes the third device; if the device set does not include the parsed device information of the third device, a query response is sent to the client. At this time, the query response is used to indicate that the device set does not include the third device.

[0188] It should be noted that both the update instruction and the query instruction can be IPMI commands. In some embodiments, the server includes a communication medium, IPMI, BMC, BIOS, and a Representational State Transfer Application Programming Interface (RESTful API). It can be understood in combination with Figure 8 for understanding. Figure 8 This is an interaction schematic diagram of each component in a server provided by an embodiment of the present application, as Figure 8As shown in the figure, the server includes a communication medium, IPMI, BMC, BIOS, and RESTful API, and these components can communicate with each other. Among them, the communication medium is the carrier for data transmission and is used for data transmission between the IPMI management software and the underlying devices. The BMC is the core component for hardware management, which can register IPMI commands according to protocol specifications. The IPMI commands are used to indicate update processing or query processing for a set of devices, that is, the IPMI commands can be update instructions or query instructions. On the other hand, the BMC can also interact with the BIOS through redfish. IPMI is the physical or logical interface for the BMC to connect to the outside and is used to transmit relevant IPMI commands. In addition, the BMC can interact with the BIOS through IPMI. The RESTful API provides an application programming interface with a REST architecture and is used for the client to interact with the IPMI management system, facilitating the implementation of functions such as remote management.

[0189] In Figure 6 In the illustrated embodiment, an update instruction or a query instruction can be sent from the client to the server. After receiving the update instruction, the BMC of the server performs update processing on the set of devices to obtain an updated set of devices; after receiving the query instruction, the BMC of the server performs query processing on the set of devices and returns response information to the client, and the response information is used to indicate the query result in the set of devices. In this way, the flexibility of determining the set of devices is improved.

[0190] Figure 9 This is a schematic structural diagram of a device connection device provided by an embodiment of the present application. As Figure 9 shown, an embodiment of the present application also provides a device connection device 90, which includes a first determination module 91, a second determination module 92, a third determination module 93, and a reconstruction module 94, where:

[0191] The first determination module 91 is configured to determine a target device among at least one device, where the at least one device is a device that establishes a communication connection with the server through a switching device and a slot on the server; the current data transmission information of the target device meets a preset requirement; and the slot includes a plurality of ports;

[0192] The second determination module 92 is configured to determine a target switching device connected to the target device according to the device type of the target device;

[0193] The third determination module 93 is configured to determine a target port among the plurality of ports according to the target switching device; wherein, the communication connection is established based on the target switching device and the target port;

[0194] The reconstruction module 94 is configured to re - establish a communication connection between the target device and the server according to the target switching device and the target port.

[0195] For the description of the features in the corresponding embodiment of the device connection device 90, reference may be made to the relevant description in the corresponding embodiment of the device connection method, which will not be elaborated here one by one.

[0196] Figure 10 This is a schematic structural diagram of the electronic device provided by the present application. As Figure 10 shown, the electronic device 100 provided in this embodiment includes: at least one processor 101 and a memory 102. Optionally, the electronic device 100 further includes a communication component 103. Among them, the processor 101, the memory 102, and the communication component 103 are connected through a bus.

[0197] In a specific implementation process, at least one processor 101 executes the computer-executable instructions stored in the memory 102, so that at least one processor 101 executes the above-mentioned device connection method embodiment.

[0198] For the specific implementation process of the processor 101, reference may be made to the above method embodiment. The implementation principle and technical effect are similar, and will not be elaborated here in this embodiment.

[0199] In the above embodiment, it should be understood that the processor may be a central processing unit (Central Processing Unit, abbreviated as: CPU), or other general-purpose processors, digital signal processors (Digital Signal Processor, abbreviated as: DSP), application specific integrated circuits (Application Specific Integrated Circuit, abbreviated as: ASIC), etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The steps of the method disclosed in combination with the application can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules in the processor.

[0200] The memory may include a high-speed memory (Random Access Memory, RAM), and may also include a non-volatile memory (Non-volatile Memory, NVM), such as at least one disk memory.

[0201] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For the sake of easy representation, the buses in the drawings of this application are not limited to only one bus or one type of bus.

[0202] An embodiment of the present application also provides a computer-readable storage medium, in which a computer program is stored. Wherein, the computer program is configured to execute the steps in any of the above-mentioned device connection method embodiments when running.

[0203] In an exemplary embodiment, the above-mentioned computer-readable storage medium may include, but is not limited to: various media such as a USB flash drive, a read-only memory (ROM for short), a random access memory (RAM for short), a mobile hard disk, a magnetic disk, or an optical disc, etc., which can store computer programs.

[0204] An embodiment of the present application also provides a computer program product. The above-mentioned computer program product includes a computer program, and when the computer program is executed by a processor, it implements the steps in any of the above-mentioned device connection method embodiments.

[0205] An embodiment of the present application also provides another computer program product, including a non-volatile computer-readable storage medium. The non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, it implements the steps in any of the above-mentioned device connection method embodiments.

[0206] Those skilled in the art can further realize that the units and algorithm steps of each example described in combination with the embodiments disclosed in this article can be implemented by electronic hardware, computer software, or a combination of the two. To clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described according to functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods for each specific application to implement the described functions, but such implementation should not be considered to exceed the scope of this application.

[0207] The above has introduced in detail a device connection method, device, electronic device, and storage medium provided by this application. Specific examples are used in this article to elaborate on the principle and implementation manner of this application. The description of the above embodiments is only used to help understand the method and its core idea of this application. It should be noted that for those of ordinary skill in the art, without departing from the principle of this application, several improvements and modifications can be made to this application, and these improvements and modifications also fall within the protection scope of the claims of this application.

Claims

1. A device connection method, characterized in that, The method includes: Determine a target device in at least one device, where the at least one device is a device that establishes a communication connection with the server through a switching device and a slot on the server; the current data transmission information of the target device meets a preset requirement; the slot includes multiple ports; Determine a target switching device connected to the target device according to the device type of the target device; Determine a target port among the multiple ports according to the target switching device; wherein, the communication connection is established based on the target switching device and the target port; Re - establish the communication connection between the target device and the server according to the target switching device and the target port.

2. The method according to claim 1, characterized in that, The step of determining a target switching device connected to the target device according to the device type of the target device includes: Obtain a first mapping relationship between multiple device types and switching devices; Determine the target switching device according to the first mapping relationship and the device type of the target device.

3. The method according to claim 2, wherein The step of determining the target switching device according to the first mapping relationship and the device type of the target device includes: Determine a switching device associated with the target device among the switching devices connected to the server according to the device type of the target device; the switching device associated with the target device includes a switching device directly connected to the target device, and / or a switching device indirectly connected to the target device; Determine the target switching device among the switching devices associated with the target device according to the device type of the target device and the first mapping relationship.

4. The method according to claim 1, characterized in that, The step of determining a target switching device connected to the target device according to the device type of the target device includes: Determine a switching device associated with the target device among the switching devices connected to the server according to the device type of the target device; the switching device associated with the target device includes a switching device directly connected to the target device, and / or a switching device indirectly connected to the target device; Determine the switching device connected to the slot; Determine the target switching device among the switching devices associated with the target device according to the switching device connected to the slot.

5. The method according to any one of claims 1 to 4, characterized in that The step of determining a target port among the multiple ports according to the target switching device includes: Obtain a second mapping relationship between the device information of multiple switching devices and port codes; Determine the port code of the target switching device according to the second mapping relationship and the device information of the target switching device; Determine the port indicated by the port code of the target switching device among the multiple ports as the target port.

6. The method according to any one of claims 1-4, characterized in that, The step of re - establishing the communication connection between the target device and the server according to the target switching device and the target port includes: Send an indication message to the target switching device, where the indication message is used to instruct the target switching device to re - establish a first communication connection with the target device; Receive response information, where the response information is used to indicate that the target switching device has re-established the first communication connection with the target device; In the case where the first communication connection has been re-established, re-establish a second communication connection between the server and the target switching device through the target port; the communication connection between the target device and the server includes the first communication connection and the second communication connection.

7. The method according to any one of claims 1 to 4, characterized in that Determining a target device among at least one device includes: Determining at least one first device that meets the preset requirements among the at least one device; wherein, for each device among the at least one device, the preset requirements include: the current data transmission rate of the device is less than or equal to a target rate threshold, and / or, the current data transmission bandwidth of the device is less than or equal to a target bandwidth threshold; Determine the target device among the at least one first device.

8. The method according to claim 7, wherein Determining the target device among the at least one first device includes: Obtain a device set, where the device set includes at least one device whose data transmission requirement is greater than or equal to a preset requirement value; Determine the target device among the at least one first device according to the device set.

9. The method according to claim 8, characterized in that The method further includes: Receive an update instruction, where the update instruction includes device information of a second device and processing method information, and the processing method information is used to indicate the processing method for the device set; Update the device set according to the processing method and the device information of the second device to obtain an updated device set.

10. The method according to claim 8, characterized in that, The method further includes: Receive a query instruction, where the query instruction includes device information of a third device; Send a query response, where the query response is used to indicate whether the third device is included in the device set.

11. The method according to claim 7, wherein Determining the target device among the at least one first device includes: Obtain the load information of the server, where the load information is used to indicate the load of the server; Determine the target device among the at least one first device according to the load of the server.

12. The method according to claim 11, wherein Determining the target device among the at least one first device according to the load of the server includes: In the case where the load of the server is greater than or equal to a preset load threshold, determine, among the at least one first device, the device whose data transmission requirement is greater than or equal to a preset requirement value as the target device; In the case where the load of the server is less than the preset load threshold, determine the at least one first device as the target device.

13. The method according to claim 7, wherein For each device among the at least one device, the method further includes: Obtain the maximum data transmission rate of the device and the maximum data transmission rate of the port corresponding to the device; the port corresponding to the device is the port through which the communication connection between the device and the server is established; Determine the smaller value between the maximum data transmission rate of the device and the maximum data transmission rate of the port corresponding to the device as the target rate threshold; Obtain the maximum data transmission bandwidth of the device and the maximum data transmission bandwidth of the port corresponding to the device; Determine the smaller value between the maximum data transfer bandwidth of the device and the maximum data transfer bandwidth of the port corresponding to the device as the target bandwidth threshold.

14. The method according to claim 7, characterized in that, The method further includes: During a first time period and a second time period, determine the time period in which the current moment is located; for each device among the at least one device, the data transfer requirement of the device during the first time period is greater than the data transfer requirement of the device during the second time period; When the time period in which the current moment is located is the first time period, determine the first rate threshold as the target rate threshold, and determine the first bandwidth threshold as the target bandwidth threshold; When the time period in which the current moment is located is the second time period, determine the second rate threshold as the target rate threshold, and determine the second bandwidth threshold as the target bandwidth threshold; wherein, the second rate threshold is less than the first rate threshold; the second bandwidth threshold is less than the first bandwidth threshold.

15. The method according to claim 7, characterized in that The method further includes: Obtain a first difference between the target rate threshold and the current data transfer rate of the first device; Obtain a second difference between the target bandwidth threshold and the current data transfer bandwidth of the first device; When the first difference is greater than or equal to a first preset value, and / or, the second difference is greater than or equal to a second preset value, send a prompt message, where the prompt message is used to prompt that the first device is in an abnormal state.

16. The method according to any one of claims 1-4, characterized in that, The method further includes: After the communication connection between the target device and the server is re-established for the i-th time, obtain the data transfer information of the target device after the i-th update; When the data transfer information after the i-th update meets the preset requirements, re-establish the communication connection between the target device and the server for the (i + 1)-th time according to the target switching device and the target port; i is 1, 2, 3... in sequence.

17. A device connection device, characterized in that, The apparatus includes: A first determination module, configured to determine a target device among at least one device, where the at least one device is a device that establishes a communication connection with the server through a switching device and a slot on the server; the current data transfer information of the target device meets the preset requirements; the slot includes multiple ports; A second determination module, configured to determine a target switching device connected to the target device according to the device type of the target device; A third determination module, configured to determine a target port among the multiple ports according to the target switching device; wherein, the communication connection is established based on the target switching device and the target port; A reconstruction module, configured to re-establish the communication connection between the target device and the server according to the target switching device and the target port.

18. An electronic device, characterized in that, Includes: A memory, configured to store a computer program; A processor, configured to implement the steps of the device connection method according to any one of claims 1 to 16 when executing the computer program.

19. A computer-readable storage medium, characterized in that, A computer program is stored in the computer-readable storage medium, where the computer program, when executed by a processor, implements the steps of the device connection method according to any one of claims 1 to 16.

20. A computer program product comprising a computer program, characterized in that, When the computer program is executed by a processor, the steps of the device connection method described in any one of claims 1 to 16 are implemented.

Citation Information

Patent Citations

  • Equipment repairing method, repairing system and device, electronic equipment and storage medium

    CN115658375A

  • Method and device for selecting target storage server and electronic equipment

    CN115834587A

  • Method for communicating with server, electronic equipment and storage medium

    CN115865654A

  • Resource pool equipment connection detection method and device, electronic equipment and storage medium

    CN117439919A

  • Network congestion processing method, device, equipment, medium and product

    CN119906675A