Server management method, device and system

By using USB communication links instead of network connections in server management, the problem of server management relying on the network connection environment in the existing technology is solved, stable, safe, and efficient server management is achieved, and server management performance is improved.

CN118869680APending Publication Date: 2024-10-29INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411038861.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-31
Publication Date
2024-10-29

AI Technical Summary

Technical Problem

The existing server management method relies heavily on the network connection environment. As a result, in scenarios such as high-security network or interface resource shortage or computer room maintenance, normal communication connections cannot be established between the client and the OS, affecting server management performance.

Method used

Through the first universal serial bus interface of the client and the second universal serial bus interface of the baseboard management controller of the target server, according to the task types of different KVM tasks, select the device file of the port associated with the task type, and establish the client The USB communication link with the baseboard management controller enables data interaction of keyboard and mouse data, video data, and streaming media data, avoiding limitations of the network connection environment.

Benefits of technology

It realizes that the client only needs a USB cable to connect to the OS for access channels for different KVM tasks, making server management more stable, secure and efficient, and improving server management performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118869680A_ABST
    Figure CN118869680A_ABST
Patent Text Reader

Abstract

The invention provides a server management method, device and system, and the method comprises the steps: obtaining an equipment file of a first port from equipment files of a plurality of ports corresponding to a first universal serial bus interface according to the task type of a keyboard video mouse management task corresponding to a target server; establishing a communication link between the first port and a monitoring module in the substrate management controller according to the equipment file of the first port; and executing a management operation corresponding to the keyboard video mouse management task on an operating system of the target server according to a target thread corresponding to the first port and the communication link. According to the invention, the client can perform access channel connection of different KVM tasks with the OS only through one USB cable, so that the limitation of a network connection environment is effectively avoided, server management can be performed more stably, safely and efficiently, and the management performance of the server is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a server management method, device and system. Background Art

[0002] With the rapid development of information technology, the management of data centers and server clusters has increasingly become one of the core challenges of information technology operation and maintenance. Efficient, secure and flexible management methods are essential to ensure business continuity, improve operation and maintenance efficiency and reduce operating costs. In this context, the Baseboard Management Controller (BMC) came into being. As part of the server hardware, it provides a set of remote management functions independent of the server operating system (OS), greatly enhancing the manageability and availability of the server.

[0003] As a key component of BMC, the Keyboard Video Mouse (KVM) module realizes remote access and control of server hardware resources. At present, the implementation of KVM technology is mainly through the user logging in to the network on the client to establish a keyboard and mouse control connection between the client and the OS, and capture the video data stream at the same time, so that the user can directly operate the OS desktop through the network connection in the KVM, thereby realizing server management.

[0004] However, this server management method is heavily dependent on the network connection environment. If the network connection is limited in scenarios such as high-security networks, tight interface resources, or computer room maintenance, it will lead to the inability to establish a normal communication connection between the client and the OS, thereby affecting the server management performance. Summary of the invention

[0005] The present invention provides a server management method, device and system to solve the problem that the server management mode in the prior art is heavily dependent on the network connection environment. In scenarios where the network connection is limited, such as a high-security network or tight interface resources or computer room maintenance, it will lead to the inability to establish a normal communication connection between the client and the OS, thereby affecting the server management performance. The method, device and system are used to solve the problem that the server management mode in the prior art is heavily dependent on the network connection environment. In this way, the server management performance can be improved while reducing the restrictions on the network connection environment.

[0006] The present invention provides a server management method, which is applied to a client, wherein a first universal serial bus interface of the client is connected to a second universal serial bus interface of a baseboard management controller of a target server, and the method comprises: According to the task type of the keyboard, video and mouse management task corresponding to the target server, acquiring the device file of the first port from the device files of the plurality of ports corresponding to the first universal serial bus interface; Establishing a communication link between the first port and a monitoring module in the baseboard management controller according to the device file of the first port; According to the target thread corresponding to the first port and the communication link, a management operation corresponding to the keyboard, video and mouse management task is performed on the operating system of the target server.

[0007] According to a server management method provided by the present invention, the task type of the keyboard, video and mouse management task corresponding to the target server, obtaining the device file of the first port from the device files of the multiple ports corresponding to the first universal serial bus interface, comprises: Obtaining a port identifier of each of the ports; According to each of the port identifiers, obtaining function information of each of the ports; According to the function information, determining whether each of the ports has a keyboard, video and mouse management function, and obtaining a first determination result; According to the first judgment result, searching at least one candidate port having the keyboard, video and mouse management function among the multiple ports; In the case of finding at least one candidate port, matching the function information of each candidate port with the task type of the keyboard, video and mouse management task; According to the matching result, determining whether the function information of each candidate port matches the task type of the keyboard, video and mouse management task, to obtain a second determination result; According to the second judgment result, acquiring a port whose function information matches the task type of the keyboard, video and mouse management task from at least one of the candidate ports; The port whose function information matches the task type of the keyboard, video and mouse management task is used as the first port; According to the port identifier of the first port, a device file of the first port is acquired.

[0008] According to a server management method provided by the present invention, the management operation corresponding to the keyboard, video and mouse management task is performed on the operating system of the target server according to the target thread corresponding to the first port and the communication link, including: When it is determined that the task type of the keyboard video mouse management task is the keyboard and mouse management type, the target thread corresponding to the first port is called, keyboard and mouse operation data is obtained on the client, the keyboard and mouse operation data is encapsulated into a target data packet according to a target data format, and the target data packet is sent to the monitoring module through the communication link so that the monitoring module processes the target data packet, and the processed target data packet is sent to the operating system through the driver unit of the second universal serial bus interface.

[0009] According to a server management method provided by the present invention, the management operation corresponding to the keyboard, video and mouse management task is performed on the operating system of the target server according to the target thread corresponding to the first port and the communication link, including: In the case of determining that the task type of the keyboard, video and mouse management task is a video management type, calling the target thread corresponding to the first port, sending a video data acquisition request to the monitoring module through the communication link, and receiving the video data returned by the monitoring module; The video data is obtained by the monitoring module through the video capture driving unit when receiving the video data acquisition request.

[0010] According to a server management method provided by the present invention, the management operation corresponding to the keyboard, video and mouse management task is performed on the operating system of the target server according to the target thread corresponding to the first port and the communication link, including: In the case of determining that the task type of the keyboard, video and mouse management task is a streaming media management type, calling the target thread corresponding to the first port, sending a streaming media data mounting request to the monitoring module through the communication link, and receiving the streaming media data returned by the monitoring module; The streaming media data is loaded by the monitoring module according to the media directory and media quantity information mounted by the operating system when the monitoring module receives the streaming media data mounting request.

[0011] According to a server management method provided by the present invention, the method further includes: Receive device file upgrade request; According to the device file upgrade request, obtaining a target universal serial bus interface corresponding to the port to be upgraded, as well as a port identifier and upgrade version information; the target universal serial bus interface includes the first universal serial bus interface and / or the second universal serial bus interface; According to the port identifier corresponding to the port to be upgraded and the upgrade version information, loading the upgrade package corresponding to the port to be upgraded in the driver unit of the target universal serial bus interface; The device file of the port to be upgraded is upgraded according to the upgrade package.

[0012] According to a server management method provided by the present invention, establishing a communication link between the first port and a monitoring module in the baseboard management controller according to the device file of the first port includes: According to the device file of the first port, a link request is sent to the listening module, so that when the listening module receives the link request, it obtains the device file of the second port in the driver unit of the second universal serial bus interface according to the device file of the first port, and establishes the communication link through the device file of the second port.

[0013] The present invention also provides a server management device, applied to a client, wherein a first universal serial bus interface of the client is connected to a second universal serial bus interface of a baseboard management controller of a target server, and the device comprises: An acquiring unit, configured to acquire a device file of a first port from device files of a plurality of ports corresponding to the first universal serial bus interface according to a task type of a keyboard, video and mouse management task corresponding to the target server; A creating unit, configured to establish a communication link between the first port and a monitoring module in the baseboard management controller according to a device file of the first port; A management unit is used to perform a management operation corresponding to the keyboard, video and mouse management task on the operating system of the target server according to the target thread corresponding to the first port and the communication link.

[0014] The present invention also provides a server management system, comprising a client and a target server; The client comprises a first universal serial bus interface and a driving unit of the first universal serial bus interface; The target server includes a baseboard management controller and an operating system; The baseboard management controller includes a monitoring module, a second universal serial bus interface, a video capture driving unit, and a driving unit of the second universal serial bus interface; The first universal serial bus interface and the second universal serial bus interface are connected to each other; The client is used to execute any one of the server management methods described above.

[0015] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, any of the server management methods described above is implemented.

[0016] The present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the server management method described in any one of the above is implemented.

[0017] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the server management method described above is implemented.

[0018] The server management method, device and system provided by the present invention select the device file of the first port associated with the task type according to the task type of different KVM tasks, so as to establish a USB communication link between the first port in the client and the monitoring module of the BMC through the device file of the first port, thereby realizing the access channel of different KVM tasks between the client and the OS through the USB physical link, so that the client and the OS can realize the data interaction of keyboard and mouse data, video data and streaming media data through the access channel of the USB physical link of different KVM tasks, thereby realizing that the client only needs one USB cable to connect with the OS for the access channel of different KVM tasks, which not only effectively avoids the limitation of the network connection environment, but also can perform server management more stably, safely and efficiently, thereby improving the management performance of the server. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0020] Figure 1 It is a flow chart of the server management method provided by the present invention.

[0021] Figure 2 This is one of the structural diagrams of the server management system provided by the present invention.

[0022] Figure 3 This is the second structural diagram of the server management system provided by the present invention.

[0023] Figure 4 This is the third structural diagram of the server management system provided by the present invention.

[0024] Figure 5 This is the fourth structural diagram of the server management system provided by the present invention.

[0025] Figure 6 It is a structural schematic diagram of the server management device provided by the present invention.

[0026] Figure 7 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0027] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0028] The KVM module is an important module of the BMC management server, which provides users with a very convenient method of remote control and management of the server. It is usually implemented in the following way: the user logs in to the BMC's WorldWide Web (Web) through the network, uses a client with H5 KVM or Java KVM functions to establish a keyboard and mouse control connection with the OS, and captures the video data stream at the same time, so that the user can directly log in to the network in the KVM to operate the OS desktop. The above management method can cover most maintenance and usage scenarios, but there are some scenarios with limited network connection, such as the strict network security level of the switch connected to the server, or the tight interface. When the computer room is maintained, due to limited network connection, it will cause the client and OS to be unable to establish a normal communication connection, thereby affecting the server management performance.

[0029] Therefore, how to provide KVM with other interface modes to facilitate users to quickly and easily operate and use the server's OS, and then realize server management is one of the important topics that need to be studied urgently.

[0030] In this regard, the present embodiment provides a server management method, in which the device file of the corresponding port is selected according to the task type of different KVM tasks, so that the Universal Serial Bus (USB) interface of the client is connected to the USB interface of the BMC of the server through the device file of the corresponding port, thereby realizing the formation of a KVM access channel between the client and the OS through the USB physical link, so that the client and the OS can exchange keyboard and mouse data, video data and streaming media data through the USB physical link, thereby adding an available KVM access channel, which not only avoids the limitation of the network connection environment, but also the USB interface of the BMC is usually not used, and there is almost no crowding during debugging. The client only needs a USB cable to connect to the OS, which is convenient for the client to remotely access and operate the OS, effectively filling the situation that the server OS can still be managed through the BMC through the USB cable when the network cannot be used in some scenarios, and provides a convenient and fast way for server debugging and server management in special scenarios, thereby realizing efficient and convenient server management and improving server management performance.

[0031] Figure 1 It is a flow chart of the server management method provided by the present invention; Figure 2 This is one of the structural diagrams of the server management system provided by the present invention; the method can be implemented under the server management system. Figure 2 As shown, the server management system includes a hardware layer, a driver layer, an application layer and a client (or Client); wherein the application layer includes a BMC monitoring module (or Adviser module) and an interface library, and the so-called interface library includes at least the first USB interface of the client and the second USB interface of the BMC of the target server. The driver layer is the basis for the underlying hardware to connect and transmit data. The driver layer includes but is not limited to a video capture driver unit, a driver unit for each USB interface, and a driver unit for a human interface device (HID); the hardware layer includes but is not limited to video acquisition devices, USB devices, HID, etc., and the so-called HID includes but is not limited to input devices such as a mouse and a keyboard. The method is implemented with the mutual support of the hardware layer, the driver layer, the application layer and the client.

[0032] The execution subject of this method is the client, such as Figure 1 As shown, the method includes step 110 , step 120 and step 130 .

[0033] Step 110: According to the task type of the keyboard, video and mouse management task corresponding to the target server, obtain the device file of the first port from the device files of the multiple ports corresponding to the first universal serial bus interface.

[0034] It should be noted that the client is the interface software operated by the user, which currently supports the Linux system; the first USB interface of the client is connected to the second USB interface of the BMC of the target server to establish a USB communication link between the client and the target server; after the USB communication link between the client and the target server is established, the client will create corresponding device files (or device instances) for different ports under the first USB interface. For example, if the first USB interface contains 5 ports, the corresponding device instance created is / dev / ttyUSBbmc[0-4], where the dev directory is the storage location of the device file in the Linux system, ttyUSBbmc is the port in the client that connects to the BMC device through USB, and [0-4] represents the number range of the device file.

[0035] After the client is started, the client software will open these device instances and use them as socket device files to monitor the connection status of the port, and then realize the USB communication connection with the server through the interface. The so-called ports include but are not limited to the main port, keyboard and mouse management port, video management port and streaming media management port. Among them, the main port is responsible for monitoring and synchronizing the BMC's KVM connection status, media mounting status, etc. It is the main monitoring port and is responsible for maintaining the synchronization of the client software itself and the BMC's KVM related module management. The keyboard and mouse management port is used to perform keyboard and mouse management tasks; the video management port is used to perform video management tasks; the streaming media management port is used to perform streaming media management tasks. In addition, the client is also configured with corresponding threads for different ports, such as the main port is configured with the main thread, the keyboard and mouse management port is configured with the keyboard and mouse management thread, the video management port is configured with the video management thread, and the streaming media management port is configured with the streaming media management thread. Each thread uses a device file, such as the keyboard and mouse management thread uses device file 0 (or ttyUSBbmc0), the video management thread uses device file 1 (or ttyUSBbmc1), and the streaming media management thread uses device file 2 (or ttyUSBbmc2), so as to realize the efficient execution of different types of management tasks of the server through different ports and different threads, thereby improving the efficiency and accuracy of server management.

[0036] When it is necessary to manage the target server, you can first obtain the task type of the keyboard, video and mouse management task corresponding to the target server. The so-called target server is the server on which KVM remote management is required, and the so-called keyboard, video and mouse management task is the KVM remote management task that needs to be performed on the target server, including but not limited to at least one of keyboard and mouse management tasks, video management tasks and streaming media management tasks. Accordingly, the task type of the so-called keyboard, video and mouse management task may include at least one of the keyboard and mouse management type, video management type and streaming media management type.

[0037] After the task type of the KVM management task corresponding to the target server is obtained, the device file of the first port associated with the task type may be obtained from the device files of the multiple ports corresponding to the first universal serial bus interface according to the task type.

[0038] Here, the method of obtaining the device file of the first device port can be achieved through multiple logical matching or based on pre-trained recognition model recognition; for example, for multiple logical matching, the corresponding first port can be matched based on the task type, and then the device file of the first port can be associated and matched based on the port identifier of the first port; for pre-trained recognition model recognition, a large number of sample KVM management task task types and device file identification labels can be collected, and the task types of the sample KVM management tasks are used as samples, and the device file identification labels are used as labels to train the neural network model, so as to obtain a recognition model that can identify the device file of the port that matches it based on the task type, and then the task type of the keyboard, video and mouse management task corresponding to the target server is input into the recognition model to obtain the device file of the first port that matches the task type.

[0039] The so-called first port includes but is not limited to a keyboard and mouse management port, a video management port or a streaming media management port, and is adaptively determined according to the task type of the KVM task.

[0040] Step 120: Establish a communication link between the first port and a monitoring module in the baseboard management controller according to the device file of the first port.

[0041] The monitoring module here is the module in the BMC responsible for the execution and distribution of KVM tasks, control commands, and various operation instructions. It can capture the video data of the OS interface from the driver layer and pass it to the client. It can also forward the client's control instructions, such as keyboard and mouse operations, to the driver layer, that is, the USB driver unit, which will pass them to the OS, thereby realizing effective management of the OS.

[0042] Optionally, after acquiring the device file of the first port, a USB communication link between the first port and the monitoring module may be established based on the configuration information of the device file of the first port, thereby achieving effective management of the OS through the communication link between the first port and the monitoring module.

[0043] Step 130: Execute the management operation corresponding to the keyboard, video and mouse management task on the operating system of the target server according to the target thread corresponding to the first port and the communication link.

[0044] Optionally, after the USB communication link between the first port and the listening module is established, the client may call the target thread corresponding to the first port, and write control instructions, such as keyboard and mouse operation data, to the listening module through the USB communication link between the first port and the listening module according to the management operation corresponding to the keyboard, video and mouse management task, so that the listening module can forward the data to the driver layer and then to the OS, or request the listening module to capture video data or streaming media data from the OS of the target server, thereby implementing the management operation of the OS of the target server.

[0045] The method provided in this embodiment selects the device file of the first port associated with the task type according to the task type of different KVM tasks, so as to establish a USB communication link between the first port in the client and the monitoring module of the BMC through the device file of the first port, thereby realizing the access channel of different KVM tasks between the client and the OS through the USB physical link, so that the client and the OS can realize the data interaction of keyboard and mouse data, video data and streaming media data through the access channel of the USB physical link of different KVM tasks, thereby realizing that the client only needs one USB cable to connect with the OS for the access channel of different KVM tasks, which not only effectively avoids the limitation of the network connection environment, but also can manage the server more stably, safely and efficiently, thereby improving the management performance of the server.

[0046] In some embodiments, in step 110, according to the task type of the keyboard, video and mouse management task corresponding to the target server, obtaining the device file of the first port from the device files of the plurality of ports corresponding to the first universal serial bus interface includes: Obtaining a port identifier of each of the ports; According to each of the port identifiers, obtaining function information of each of the ports; According to the function information, determining whether each of the ports has a keyboard, video and mouse management function, and obtaining a first determination result; According to the first judgment result, searching at least one candidate port having the keyboard, video and mouse management function among the multiple ports; In the case of finding at least one candidate port, matching the function information of each candidate port with the task type of the keyboard, video and mouse management task; According to the matching result, determining whether the function information of each candidate port matches the task type of the keyboard, video and mouse management task, to obtain a second determination result; According to the second judgment result, acquiring a port whose function information matches the task type of the keyboard, video and mouse management task from at least one of the candidate ports; The port whose function information matches the task type of the keyboard, video and mouse management task is used as the first port; According to the port identifier of the first port, a device file of the first port is acquired.

[0047] Optionally, the step of obtaining the device file of the first port may be implemented by multiple logical judgments, and the specific steps include: First, the port identifiers of all ports under the first USB interface are obtained.

[0048] Subsequently, for each port, based on the association between the port identifier and the functional information, the functional information of each port is associated and queried to determine whether each port supports the KVM management function, that is, whether each port supports the keyboard and mouse management function, the video management function or the streaming media management function.

[0049] Then, according to the judgment result, a port having a keyboard and mouse management function, a video management function or a streaming media management function is searched among the multiple ports under the first USB interface as a candidate port.

[0050] Subsequently, the functional information of each candidate port is matched with the specific task type of the KVM management task to select the port whose functional information matches the specific task type of the KVM management task as the first port; for example, if the specific task type of the KVM management task is a keyboard and mouse management type, then the functional information of the corresponding first port found includes at least the keyboard and mouse management functional information; for another example, if the specific task type of the KVM management task is a video management type, then the functional information of the corresponding first port found includes at least the video management functional information; for another example, if the specific task type of the KVM management task is a streaming media management type, then the functional information of the corresponding first port found includes at least the streaming media management functional information.

[0051] Then, according to the association relationship between the port identifier of the first port and the device file, the device file of the first port is searched for by association.

[0052] The method provided in this embodiment performs multiple associated searches by combining the port identifier of the port and the functional information of the port, and can dynamically, efficiently and intelligently select the corresponding task processing port for different KVM management task types, so as to efficiently, conveniently and flexibly execute different KVM management tasks on the server's OS based on the processing port, thereby improving the server management performance.

[0053] In some embodiments, according to the target thread corresponding to the first port and the communication link, performing the management operation corresponding to the keyboard, video and mouse management task on the operating system of the target server includes: When it is determined that the task type of the keyboard video mouse management task is the keyboard and mouse management type, the target thread corresponding to the first port is called, keyboard and mouse operation data is obtained on the client, the keyboard and mouse operation data is encapsulated into a target data packet according to a target data format, and the target data packet is sent to the monitoring module through the communication link so that the monitoring module processes the target data packet, and the processed target data packet is sent to the operating system through the driver unit of the second universal serial bus interface.

[0054] Optionally, when it is determined that the task type of the keyboard video mouse management task is the keyboard mouse management type, it can be known from the above-mentioned acquisition step of the first port that the first port is the keyboard mouse management port, and the target thread corresponding to the first port is the keyboard mouse management thread. At this time, the keyboard mouse management thread is in the client mode in terms of working mode, and the BMC is in the server mode. After a USB communication link is established between the keyboard mouse management port and the listening module in the BMC, the client can call the keyboard mouse management thread to obtain the keyboard and mouse operation data generated in the client in real time, and compose the keyboard and mouse operation data into a target data packet in a target format, and send the target data packet to the listening module through the USB communication link established between the keyboard mouse management port and the listening module in the BMC, so that the listening module processes the target data packet and sends it to the OS through the driver unit of the second universal serial bus interface.

[0055] The so-called target format may be a data template configured according to the data attributes of keyboard and mouse operation data, in which the data packet header fields are defined, such as type identification, length, sequence number, timestamp, etc.; keyboard data fields are also defined, such as key codes, key status, modifier key status, etc.; mouse data fields are also defined, such as movement coordinate changes, button status, scroll wheel information, etc., so as to unify the data format according to this target format, thereby ensuring that the keyboard and mouse data exchanged between the client and the server have the same structure and format, so as to ensure the integrity and accuracy of data transmission, and thereby improve server management performance.

[0056] The so-called processing includes but is not limited to one or more of data decompression, decryption and parsing to extract keyboard and mouse operation data to facilitate corresponding management operations on the OS.

[0057] The method provided in this embodiment, when executing keyboard and mouse management tasks, executes the keyboard and mouse management tasks on the OS by calling the corresponding keyboard and mouse management threads and through the USB communication link corresponding to the corresponding keyboard and mouse management tasks. This can not only more efficiently capture and process keyboard and mouse operation data, but also reduce context switching and unnecessary resource consumption, improve task execution efficiency, ensure efficient processing and reliable transmission of keyboard and mouse management tasks, and thus improve the overall performance of server management and user experience.

[0058] In some embodiments, according to the target thread corresponding to the first port and the communication link, performing the management operation corresponding to the keyboard, video and mouse management task on the operating system of the target server includes: In the case of determining that the task type of the keyboard, video and mouse management task is a video management type, calling the target thread corresponding to the first port, sending a video data acquisition request to the monitoring module through the communication link, and receiving the video data returned by the monitoring module; The video data is obtained by the monitoring module through the video capture driving unit when receiving the video data acquisition request.

[0059] It should be noted that the server management system also includes an interface layer, which is mainly responsible for data forwarding, namely data forwarding between the BMC function module and the driver unit of the USB interface, interaction between the BMC function module and data interaction with the OS. Figure 3 This is the second structural diagram of the server management system provided by the present invention; Figure 3 As shown, KVM task processing is realized through the USB interface, that is, KVM data interaction between the client and the Adviser module is realized through the USB channel. In the data interaction process, the socket encoding format can be used for data transmission between the client and the Adviser module.

[0060] Optionally, when it is determined that the task type of the keyboard video mouse management task is a video management type, it can be known from the above-mentioned acquisition step of the first port that the first port is a video management port, and the target thread corresponding to the first port is a video management thread. At this time, the video management thread is in client mode in terms of working mode. After a USB communication link is established between the video management port and the monitoring module in the BMC, the client calls the video management thread, and continuously sends video data acquisition requests to the monitoring module through the USB communication link established between the video management port and the monitoring module in the BMC, so as to request to obtain video data of the OS interface.

[0061] The monitoring module periodically captures the video data of the OS interface through the video capture driving unit, and after obtaining the video data acquisition request, returns the captured video data to the client through the USB communication link established between the video management port and the monitoring module in the BMC.

[0062] The method provided in this embodiment, when executing a video management task, executes the video management task on the OS by calling the corresponding video management thread and through the USB communication link corresponding to the corresponding video management task. This can not only capture and process video data more efficiently, but also reduce context switching and unnecessary resource consumption, improve task execution efficiency, ensure efficient processing and reliable transmission of video management tasks, and thus improve the overall performance of server management and user experience.

[0063] In some embodiments, performing the management operation corresponding to the keyboard, video and mouse management task on the operating system of the target server according to the target thread corresponding to the first port and the communication link includes: In the case of determining that the task type of the keyboard, video and mouse management task is a streaming media management type, calling the target thread corresponding to the first port, sending a streaming media data mounting request to the monitoring module through the communication link, and receiving the streaming media data returned by the monitoring module; The streaming media data is loaded by the monitoring module according to the media directory and media quantity information mounted by the operating system when the monitoring module receives the streaming media data mounting request.

[0064] Optionally, when it is determined that the task type of the keyboard, video and mouse management task is a streaming media management type, it can be known from the above-mentioned acquisition step of the first port that the first port is a streaming media management port, and the target thread corresponding to the first port is a streaming media management thread. At this time, the streaming media management thread is in client mode in terms of working mode, and the BMC is in server mode. If the client needs to mount streaming media, the streaming media management thread can be called to initiate a request to establish a USB communication link between the streaming media management port and the listening module in the BMC. After the USB communication link is established between the streaming media management port and the listening module in the BMC, a streaming media data mounting request is sent to the listening module through the USB communication link established between the streaming media management port and the listening module in the BMC to request to obtain the streaming media data mounted by the OS.

[0065] After receiving the streaming media data mount request, the monitoring module may first obtain the media directory and media quantity information mounted by the OS, load and obtain all media data in the media directory according to the media quantity information, and then return it to the client through the USB communication link established between the streaming media management port and the monitoring module in the BMC, so that the client software can realize the virtual desktop.

[0066] The method provided in this embodiment, when executing a streaming media management task, executes the streaming media management task on the OS by calling the corresponding streaming media management thread and through the USB communication link corresponding to the corresponding streaming media management task. This can not only capture and process streaming media data more efficiently, but also reduce context switching and unnecessary resource consumption, improve task execution efficiency, ensure efficient processing and reliable transmission of streaming media management tasks, and thus improve the overall performance of server management and user experience.

[0067] In some embodiments, the method further comprises: Receive device file upgrade request; According to the device file upgrade request, obtaining a target universal serial bus interface corresponding to the port to be upgraded, as well as a port identifier and upgrade version information; the target universal serial bus interface includes the first universal serial bus interface and / or the second universal serial bus interface; According to the port identifier corresponding to the port to be upgraded and the upgrade version information, loading the upgrade package corresponding to the port to be upgraded in the driver unit of the target universal serial bus interface; The device file of the port to be upgraded is upgraded according to the upgrade package.

[0068] like Figure 2As shown, the driver layer of the server management system includes a video capture driver unit and a USB interface driver unit; each USB interface driver unit can update and create corresponding device files according to the different functional ports of the corresponding USB interface, that is, it can create device instances with the same functional ports under its corresponding device directory, such as the device instance of the keyboard and mouse management port, the device instance of the video management port, and the device instance of the streaming media management port, so as to realize KVM communication between the client and the OS, and then realize different types of KVM task management for the OS.

[0069] Figure 4 This is the third structural diagram of the server management system provided by the present invention; Figure 4 As shown, the so-called USB interface driver unit includes a driver unit of the first USB interface of the client and a driver unit of the second USB interface of the BMC of the target server. Among them, the driver unit of the first USB interface is the USB driver of the client, which is responsible for creating device files of different ports under the first USB interface and performing data forwarding between the client and the monitoring module of the BMC; the driver unit of the second USB interface is the USB driver of the BMC end, which is responsible for creating device files of different ports under the second USB interface for the monitoring module to read and write device files, and performing data forwarding between the monitoring module and the client. The driver unit of the first USB interface and the driver unit of the second USB interface are both configured with different versions of upgrade packages of different ports under the corresponding USB interface, so that when the device file of any port needs to be upgraded, the corresponding upgrade package can be directly loaded to upgrade the device file, and then the connection channel between the port and the monitoring module is established again through the KVM connection module of the driver unit of the first USB interface and the KVM connection module of the driver unit of the second USB interface, so as to realize the basic functions required for KVM management and ensure the effective implementation of KVM management.

[0070] Optionally, the implementation steps of the device file upgrade specifically include: after receiving the device file upgrade request, the client may parse the device file upgrade request to obtain the target universal serial bus interface corresponding to the port to be upgraded, as well as the port identifier and upgrade version information. According to the correlation between the port identifier and the upgrade package and the correlation between the upgrade version information and the upgrade package, the driver unit of the target universal serial bus interface corresponding to the port to be upgraded obtains the upgrade package that matches both the port identifier and the upgrade version information as the upgrade package corresponding to the port to be upgraded, so as to upgrade the device file of the port to be upgraded according to the upgrade package, thereby realizing automatic and convenient device file upgrade of different ports, so as to enhance the communication performance and task processing performance of different ports, and thereby improve the efficiency and stability of server management.

[0071] In some embodiments, establishing a communication link between the first port and a monitoring module in the baseboard management controller according to the device file of the first port includes: According to the device file of the first port, a link request is sent to the listening module, so that when the listening module receives the link request, it obtains the device file of the second port in the driver unit of the second universal serial bus interface according to the device file of the first port, and establishes the communication link through the device file of the second port.

[0072] Figure 5 This is the fourth structural diagram of the server management system provided by this application; Figure 5 As shown, since the present application no longer accesses BMC through a web browser, but the client software accesses BMC through a USB channel. Therefore, a monitoring thread for the USB channel can be newly added in the monitoring module, so as to monitor whether the driver unit of the second USB interface of the BMC end is configured with device files of different ports through the monitoring thread of the USB channel, that is, the device file of the keyboard and mouse management port, the device file of the video management port, and the device file of the streaming media port. If the device files of these ports are configured, the device file of any port can be opened first, so as to monitor whether there is a connection request sent by the client according to the device file of the first port in the monitoring module through the port. In the case of monitoring a connection request sent by the client according to the device file of the first port, it indicates that a USB communication channel has been established between the port and the client. At this time, according to the device file of the first port, in the second universal serial bus interface, the device file of the second port with the same functional information as the first port can be obtained, and the device file of the second port can be opened to connect the second port with the first port, thereby establishing a communication link between the first port and the monitoring module in the baseboard management controller.

[0073] For example, the device file of the first port is the device file ttyUSBbmc1 of the video management port in the first universal serial bus interface. The Adviser module first opens the device file (or devUSB0) of the keyboard and mouse management port in the second universal serial bus interface to monitor whether there is a connection request sent by the client based on ttyUSBbmc1 in the keyboard and mouse management port monitoring module. When a connection request sent by the client based on ttyUSBbmc1 is monitored, it indicates that a USB communication channel has been established between the keyboard and mouse management port and the client. At this time, according to ttyUSBbmc1, the device file (or devUSB1) of the video management port with the same functional information as the video management port can be obtained in the second universal serial bus interface, and devUSB1 is opened to connect the video management port in the second universal serial bus interface with the video management port in the first universal serial bus interface, thereby establishing a communication link between the client and the monitoring module in the baseboard management controller, and then realizing the processing of the video management task.

[0074] The method provided in this embodiment realizes the establishment of an efficient USB communication link between the client and the monitoring module inside the baseboard management controller by accurately identifying and utilizing the device file information of the first port, thereby improving the efficiency and security of data transmission and providing strong technical support for improving server management performance.

[0075] The server management device provided by the present invention is described below. The server management device described below and the server management method described above can be referenced to each other.

[0076] Figure 6 Schematic diagram of the structure of the server management device provided by the present invention; Figure 6 As shown, the device includes an acquisition unit 610 , a creation unit 620 and a management unit 630 .

[0077] The acquisition unit 610 is used for acquiring the device file of the first port from the device files of the multiple ports corresponding to the first universal serial bus interface according to the task type of the keyboard, video and mouse management task corresponding to the target server; The creation unit 620 is used to establish a communication link between the first port and the monitoring module in the baseboard management controller according to the device file of the first port; The management unit 630 is used to perform the management operation corresponding to the keyboard, video and mouse management task on the operating system of the target server according to the target thread corresponding to the first port and the communication link.

[0078] The device provided in this embodiment selects the device file of the first port associated with the task type according to the task type of different KVM tasks, so as to establish a USB communication link between the first port in the client and the listening module of the BMC through the device file of the first port, thereby realizing the access channel of different KVM tasks between the client and the OS through the USB physical link, so that the client and the OS can realize the data interaction of keyboard and mouse data, video data and streaming media data through the access channel of the USB physical link of different KVM tasks, thereby realizing that the client only needs one USB cable to connect with the OS for the access channel of different KVM tasks, which not only effectively avoids the limitation of the network connection environment, but also can manage the server more stably, safely and efficiently, thereby improving the management performance of the server.

[0079] The device provided by the present invention is used to execute the above-mentioned method embodiments. Please refer to the above-mentioned embodiments for the specific processes and detailed contents, which will not be repeated here.

[0080] In some embodiments, this embodiment further provides a server management system, the system comprising a client and a target server; The client comprises a first universal serial bus interface and a driving unit of the first universal serial bus interface; The target server includes a baseboard management controller and an operating system; The baseboard management controller includes a monitoring module, a second universal serial bus interface, a video capture driving unit, and a driving unit of the second universal serial bus interface; The first universal serial bus interface and the second universal serial bus interface are connected to each other; The client is used to execute the server management method provided in the above embodiments, which will not be described in detail here.

[0081] Optionally, the first universal serial bus interface of the client is configured with multiple ports, including but not limited to a main port, a keyboard and mouse management port, a video management port, and a streaming media management port, wherein the main port is responsible for monitoring and synchronizing the KVM connection status, media mounting status, etc. of the BMC, and is the main monitoring port, responsible for maintaining the synchronization of the client software itself and the KVM-related module management of the BMC. The keyboard and mouse management port is used to perform keyboard and mouse management tasks; the video management port is used to perform video management tasks; and the streaming media management port is used to perform streaming media management tasks. In addition, the client is also configured with corresponding threads for different ports, such as the main port is configured with a main thread, the keyboard and mouse management port is configured with a keyboard and mouse management thread, the video management port is configured with a video management thread, and the streaming media management port is configured with a streaming media management thread, so as to realize the efficient execution of different types of management tasks of the server through different ports and different threads, thereby improving the efficiency and accuracy of server management.

[0082] The driver unit of the first USB interface is the USB driver of the client, responsible for creating device files for different ports under the first USB interface, and performing data forwarding between the client and the monitoring module of the BMC; the driver unit of the second USB interface is the USB driver of the BMC end, responsible for creating device files for different ports under the second USB interface, for the monitoring module to read and write device files, and performing data forwarding between the monitoring module and the client. The driver unit of the first USB interface and the driver unit of the second USB interface are both configured with different versions of upgrade packages for different ports under the corresponding USB interfaces, so that when the device file of any port needs to be upgraded, the corresponding upgrade package can be directly loaded to upgrade the device file, and then the connection channel between the port and the monitoring module is re-established through the KVM connection module of the driver unit of the first USB interface and the KVM connection module of the driver unit of the second USB interface, thereby realizing the basic functions required for KVM management and ensuring the effective implementation of KVM management.

[0083] The monitoring module here is the module in the BMC responsible for the execution and distribution of KVM tasks, control commands, and various operation instructions. It can capture the video data of the OS interface from the driver layer and pass it to the client. It can also forward the client's control instructions, such as keyboard and mouse operations, to the driver layer, that is, the USB driver unit, which will pass them to the OS, thereby realizing effective management of the OS.

[0084] The system provided in this embodiment selects the device file of the first port associated with the task type according to the task type of different KVM tasks, so as to establish a USB communication link between the first port in the client and the listening module of the BMC through the device file of the first port, thereby realizing the access channel of different KVM tasks between the client and the OS through the USB physical link, so that the client and the OS can realize the data interaction of keyboard and mouse data, video data and streaming media data through the access channel of the USB physical link of different KVM tasks, thereby realizing that the client only needs one USB cable to connect with the OS for the access channel of different KVM tasks, which not only effectively avoids the limitation of the network connection environment, but also can manage the server more stably, safely and efficiently, thereby improving the management performance of the server.

[0085] Figure 7 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 7 As shown, the electronic device may include: a processor 710, a communication interface 720, a memory 730 and a communication bus 740, wherein the processor 710, the communication interface 720 and the memory 730 communicate with each other through the communication bus 740. The processor 710 may call the logic instructions in the memory 730 to execute the server management method, which includes: according to the task type of the keyboard video mouse management task corresponding to the target server, in the device files of the multiple ports corresponding to the first universal serial bus interface, obtaining the device file of the first port; according to the device file of the first port, establishing a communication link between the first port and the monitoring module in the baseboard management controller; according to the target thread corresponding to the first port and the communication link, executing the management operation corresponding to the keyboard video mouse management task on the operating system of the target server.

[0086] In addition, the logic instructions in the above-mentioned memory 730 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present invention can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0087] On the other hand, the present invention also provides a computer program product, which includes a computer program, which can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the server management method provided by the above-mentioned methods, which includes: according to the task type of the keyboard, video and mouse management task corresponding to the target server, obtaining the device file of the first port in the device files of multiple ports corresponding to the first universal serial bus interface; according to the device file of the first port, establishing a communication link between the first port and the listening module in the baseboard management controller; according to the target thread corresponding to the first port and the communication link, executing the management operation corresponding to the keyboard, video and mouse management task on the operating system of the target server.

[0088] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the server management method provided by the above-mentioned methods, the method comprising: obtaining a device file of a first port from the device files of multiple ports corresponding to the first universal serial bus interface according to the task type of the keyboard, video and mouse management task corresponding to the target server; establishing a communication link between the first port and a listening module in the baseboard management controller according to the device file of the first port; and executing management operations corresponding to the keyboard, video and mouse management task on the operating system of the target server according to the target thread corresponding to the first port and the communication link.

[0089] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0090] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0091] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A server management method, characterized in that: Applied to a client, a first universal serial bus interface of the client is connected to a second universal serial bus interface of a baseboard management controller of a target server, and the method comprises: According to the task type of the keyboard, video and mouse management task corresponding to the target server, acquiring the device file of the first port from the device files of the plurality of ports corresponding to the first universal serial bus interface; Establishing a communication link between the first port and a monitoring module in the baseboard management controller according to the device file of the first port; According to the target thread corresponding to the first port and the communication link, a management operation corresponding to the keyboard, video and mouse management task is performed on the operating system of the target server.

2. The server management method according to claim 1, characterized in that: The acquiring the device file of the first port from the device files of the plurality of ports corresponding to the first universal serial bus interface according to the task type of the keyboard, video and mouse management task corresponding to the target server comprises: Obtaining a port identifier of each of the ports; According to each of the port identifiers, obtaining function information of each of the ports; According to the function information, determining whether each of the ports has a keyboard, video and mouse management function, and obtaining a first determination result; According to the first judgment result, searching at least one candidate port having the keyboard, video and mouse management function among the multiple ports; In the case of finding at least one candidate port, matching the function information of each candidate port with the task type of the keyboard, video and mouse management task; According to the matching result, determining whether the function information of each candidate port matches the task type of the keyboard, video and mouse management task, to obtain a second determination result; According to the second judgment result, acquiring a port whose function information matches the task type of the keyboard, video and mouse management task from at least one of the candidate ports; The port whose function information matches the task type of the keyboard, video and mouse management task is used as the first port; According to the port identifier of the first port, a device file of the first port is acquired.

3. The server management method according to claim 1 or 2, characterized in that: The performing the management operation corresponding to the keyboard, video and mouse management task on the operating system of the target server according to the target thread corresponding to the first port and the communication link includes: When it is determined that the task type of the keyboard video mouse management task is the keyboard and mouse management type, the target thread corresponding to the first port is called, keyboard and mouse operation data is obtained on the client, the keyboard and mouse operation data is encapsulated into a target data packet according to a target data format, and the target data packet is sent to the monitoring module through the communication link so that the monitoring module processes the target data packet, and the processed target data packet is sent to the operating system through the driver unit of the second universal serial bus interface.

4. The server management method according to claim 1 or 2, characterized in that: The performing the management operation corresponding to the keyboard, video and mouse management task on the operating system of the target server according to the target thread corresponding to the first port and the communication link includes: In the case of determining that the task type of the keyboard, video and mouse management task is a video management type, calling the target thread corresponding to the first port, sending a video data acquisition request to the monitoring module through the communication link, and receiving the video data returned by the monitoring module; The video data is obtained by the monitoring module through the video capture driving unit when receiving the video data acquisition request.

5. The server management method according to claim 1 or 2, characterized in that: The performing the management operation corresponding to the keyboard, video and mouse management task on the operating system of the target server according to the target thread corresponding to the first port and the communication link includes: In the case of determining that the task type of the keyboard, video and mouse management task is a streaming media management type, calling the target thread corresponding to the first port, sending a streaming media data mounting request to the monitoring module through the communication link, and receiving the streaming media data returned by the monitoring module; The streaming media data is loaded by the monitoring module according to the media directory and media quantity information mounted by the operating system when the monitoring module receives the streaming media data mounting request.

6. The server management method according to claim 1 or 2, characterized in that: The method further comprises: Receive device file upgrade request; According to the device file upgrade request, obtaining a target universal serial bus interface corresponding to the port to be upgraded, as well as a port identifier and upgrade version information; the target universal serial bus interface includes the first universal serial bus interface and / or the second universal serial bus interface; According to the port identifier corresponding to the port to be upgraded and the upgrade version information, loading the upgrade package corresponding to the port to be upgraded in the driver unit of the target universal serial bus interface; The device file of the port to be upgraded is upgraded according to the upgrade package.

7. The server management method according to claim 1 or 2, characterized in that: The establishing a communication link between the first port and a monitoring module in the baseboard management controller according to the device file of the first port includes: According to the device file of the first port, a link request is sent to the listening module, so that when the listening module receives the link request, it obtains the device file of the second port in the driver unit of the second universal serial bus interface according to the device file of the first port, and establishes the communication link through the device file of the second port.

8. A server management device, characterized in that: Applied to a client, a first universal serial bus interface of the client is connected to a second universal serial bus interface of a baseboard management controller of a target server, and the device comprises: An acquiring unit, configured to acquire a device file of a first port from device files of a plurality of ports corresponding to the first universal serial bus interface according to a task type of a keyboard, video and mouse management task corresponding to the target server; A creating unit, configured to establish a communication link between the first port and a monitoring module in the baseboard management controller according to a device file of the first port; A management unit is used to perform a management operation corresponding to the keyboard, video and mouse management task on the operating system of the target server according to the target thread corresponding to the first port and the communication link.

9. A server management system, characterized in that: Includes client and target server; The client comprises a first universal serial bus interface and a driving unit of the first universal serial bus interface; The target server includes a baseboard management controller and an operating system; The baseboard management controller includes a monitoring module, a second universal serial bus interface, a video capture driving unit, and a driving unit of the second universal serial bus interface; The first universal serial bus interface and the second universal serial bus interface are connected to each other; The client is used to execute the server management method according to any one of claims 1 to 7.

10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the server management method according to any one of claims 1 to 7 is implemented.

11. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the server management method according to any one of claims 1 to 7 is implemented.