Server management method, device, electronic device and readable storage medium
By obtaining the request of the mobile terminal device at the server node and identifying and obtaining the configuration information of the target server, the problem of low positioning efficiency in server management is solved, and fast positioning and efficient management are achieved.
Patent Information
- Application Number
- CN202411281633.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-13
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2044-09-13
AI Technical Summary
In the existing technology, server management efficiency is low, and the server location cannot be quickly located, requiring manual assistance to confirm the location information.
By obtaining the server configuration information acquisition request of the mobile terminal device when the server node is the main server node, identifying the type of external device, and obtaining the information of the target server node based on the configuration information, including the node role, level and port number, hard-wired connection and communication are carried out through the Type-C bus to achieve rapid positioning.
The server positioning efficiency and management efficiency are improved. Staff can quickly obtain server configuration information through mobile terminal devices to achieve efficient management of the server.
Smart Images

Figure CN118869793B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer management technology, and in particular to a server management method, device, electronic device and computer-readable storage medium. Background Art
[0002] Currently, server information is mainly obtained through the TCP / IP (Transmission Control Protocol / Internet Protocol) bus in server on-site management. However, this method requires the IP (Internet Protocol) addresses of other servers to be configured on the management server in advance. When the management server obtains the server information of other servers, it controls the location light of the server according to the IP address of the corresponding server, and then locates the position of the server through the location light, and then further obtains the server information of the server. If the management server is not set up at the server site, the staff at the server site must cooperate to inform the location information of the lit server before further obtaining the server information of the server. The entire process cannot quickly locate the location of the server device, affecting the efficiency of server management.
[0003] It can be seen that how to quickly locate the server location and improve server management efficiency is a problem that technical personnel in this field need to solve. Summary of the Invention
[0004] The purpose of the embodiments of the present invention is to provide a server management method, device, electronic device and computer-readable storage medium, which can improve the efficiency of locating server devices and the efficiency of server management.
[0005] To solve the above technical problems, an embodiment of the present invention provides a server management method, applied to a server node, comprising:
[0006] In the case where the server node is a primary server node, obtaining a server configuration information acquisition request sent by a mobile terminal device connected to the primary server node;
[0007] Obtaining server configuration information of a target server node based on the server configuration information acquisition request; the server configuration information includes a node role, a node level, and a port number to which the node is connected;
[0008] The server configuration information is returned to the mobile terminal device.
[0009] In some embodiments, when the server node is a primary server node, before obtaining the server configuration information acquisition request sent by the mobile terminal device connected to the primary server node, the method further includes:
[0010] When detecting that an external device is connected, identifying the device type of the connected external device;
[0011] In the case that the connected external devices include mobile terminal devices, the own server node is determined as the main server node, and the node information of the own server node is configured.
[0012] In some embodiments, when the connected external device further includes a display terminal device, the method further includes:
[0013] The server configuration information is sent to the display terminal device for display.
[0014] In some embodiments, when the connected external device further includes a server node, the method further includes:
[0015] Determine the node role of the connected server node as a slave node;
[0016] Determine the node level of the connected server node based on the node information of the main server node;
[0017] Get the port number of the connected server node;
[0018] The node information of the connected server node is configured according to the node role, the node level and the port number.
[0019] In some embodiments, when detecting that an external device is connected, identifying the device type of the connected external device includes:
[0020] In the case where a hard-wire connection signal is detected through the communication bus, the connection port of the own server node is determined as a downlink port; the hard-wire connection signal is generated when an external device is connected to the own server node through the communication bus;
[0021] outputting a voltage signal via the connection port and the communication bus;
[0022] Obtaining a current device type from a pre-stored device list, and determining whether the device type of the external device is consistent with the current device type;
[0023] In a case where it is determined that the device type of the external device is consistent with the current device type, determining the device type of the external device to be the current device type;
[0024] When it is determined that the device type of the external device is inconsistent with the current device type, the next device type in the device list is obtained, and the next device type is used as the current device type, and the step of determining whether the device type of the external device is consistent with the current device type is returned to.
[0025] In some embodiments, after identifying the device type of the connected external device, the method further includes:
[0026] In the case that the external device is a terminal device, a driver registration service corresponding to the device type of the terminal device is activated so as to communicate with the terminal device through the driver registration server.
[0027] In some embodiments, acquiring the server configuration information of the target server node based on the server configuration information acquisition request includes:
[0028] The master server node broadcasts the server configuration information acquisition request and control instructions to slave nodes at all levels, so that the slave nodes at all levels determine whether their own server nodes are target server nodes based on the server configuration information, and if their own server nodes are target server nodes, generate corresponding response information according to the control instructions, and return the response information to the server node at the upper level, wherein the response information includes the server configuration information;
[0029] Receive each response information returned by the next-level target server node;
[0030] According to the server configuration information acquisition request, determine whether its own main server node is the target server node. If so, generate corresponding response information according to the control instruction, and obtain the server configuration information of each target server node based on the various response information returned by the next-level target server node and the response information generated by the main server node; if not, obtain the server configuration information of each target server node based on the various response information returned by the next-level target server node.
[0031] In some embodiments, further comprising:
[0032] In the case where the server node is a slave server node, upon detecting that a server node has been connected, determining the node role of the connected server node as a slave node;
[0033] Add 1 to the node level of the own server node to obtain the node level of the connected server node;
[0034] Get the port number of the connected server node;
[0035] The node information of the connected server node is configured based on the node role, node level and port number corresponding to the connected server node.
[0036] Another embodiment of the present invention provides a server management device, applied to a server node, including:
[0037] A first acquisition module is configured to, when the server node is a primary server node, acquire a server configuration information acquisition request sent by a mobile terminal device connected to the primary server node;
[0038] A second acquisition module is configured to acquire server configuration information of a target server node based on the server configuration information acquisition request; the server configuration information includes a node role, a node level, and a port number to which the node is connected;
[0039] The sending module is used to return the server configuration information to the mobile terminal device.
[0040] Another embodiment of the present invention provides an electronic device, including:
[0041] memory for storing computer programs;
[0042] A processor is used to execute the computer program to implement the steps of the server management method as described above.
[0043] Another aspect of an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the server management method described above are implemented.
[0044] It can be seen from the above technical solution that the beneficial effects of the present invention are:
[0045] An embodiment of the present invention provides a server management method, which is applied to a server node. The method includes: when the server node is a main server node, obtaining a server configuration information acquisition request sent by a mobile terminal device connected to the main server node; obtaining server configuration information of the target server node based on the server configuration information acquisition request; the server configuration information includes the node role, node level and the port number to which the node is connected; and returning the server configuration information to the mobile terminal device.
[0046] It can be seen that in the embodiment of the present invention, when managing the server, when the current server node is the main server node, when there is a mobile terminal device connected to the main server node, the server configuration information acquisition request sent by the mobile terminal device can be obtained, and the server configuration information of the corresponding target server in the main node server and the slave node servers at all levels can be obtained according to the server configuration information acquisition request, wherein the server configuration information includes the node role, node level and the port number to which the node is connected, and the server configuration information is sent to the mobile terminal device so that the staff can quickly locate the position of the target server through the server configuration information received by the mobile terminal device, thereby improving the server positioning efficiency and the management efficiency of the server. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] In order to more clearly illustrate the embodiments of the present invention, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0048] Figure 1 A flow chart of a server management method provided by an embodiment of the present invention;
[0049] Figure 2 This is a diagram of the interface definition of a Type-C female connector provided by an embodiment of the present invention;
[0050] Figure 3 This is a diagram of the interface definition of the male end of a Type-C cable provided by an embodiment of the present invention;
[0051] Figure 4 A schematic diagram of a connection protocol between a server node and an external device provided in an embodiment of the present invention;
[0052] Figure 5 A schematic diagram of a connection protocol between a server node and a display terminal device provided by an embodiment of the present invention;
[0053] Figure 6 A schematic diagram of a cascade relationship between master and slave server nodes provided in an embodiment of the present invention;
[0054] Figure 7 A schematic structural diagram of a server management device provided by an embodiment of the present invention;
[0055] Figure 8 A schematic structural diagram of an electronic device provided by an embodiment of the present invention;
[0056] Figure 9A schematic structural diagram of a computer-readable storage medium provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0057] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making any creative efforts shall fall within the scope of protection of the present invention.
[0058] The terms "including" and "having," as used in the present description and accompanying drawings, and any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus comprising a series of steps or elements is not limited to the listed steps or elements and may include steps or elements that are not listed.
[0059] In order to enable those skilled in the art to better understand the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific implementation methods.
[0060] Next, a server management method provided by an embodiment of the present invention is introduced in detail. Figure 1 A flow chart of a server management method provided in an embodiment of the present invention, which is applied to any server node at a server site, includes:
[0061] S110: When the server node is a primary server node, obtain a server configuration information acquisition request sent by a mobile terminal device connected to the primary server node;
[0062] It should be noted that when the server node is a main server node, it indicates that there is a mobile terminal device connected to the main server node, and the server configuration information acquisition request sent by the mobile terminal device connected to the main server node can be obtained, wherein the server configuration information acquisition request may include a server ID or server identifier.
[0063] S120: Obtaining server configuration information of the target server node based on the server configuration information acquisition request; the server configuration information includes the node role, node level, and the port number to which the node is connected;
[0064] In actual applications, the master server node can obtain the server configuration information of the target server corresponding to the server configuration information from the master server node and the slave server nodes at all levels under the master server node based on the obtained server configuration information. The server configuration information includes the node role, node level and the port number to which the node is connected, and its format can be (node role, node level, port number).
[0065] Furthermore, the process of acquiring the server configuration information of the target server node based on the server configuration information acquisition request in S120 may include:
[0066] The master server node broadcasts the server configuration information acquisition request and control instructions to slave nodes at all levels, so that the slave nodes at all levels determine whether their own server node is the target server node based on the server configuration information. If their own server node is the target server node, they generate corresponding response information according to the control instructions and return the response information to the server node at the previous level, where the response information includes the server configuration information.
[0067] Receive each response information returned by the next-level target server node;
[0068] According to the server configuration information acquisition request, determine whether its own main server node is the target server node. If so, generate corresponding response information according to the control instruction, and obtain the server configuration information of each target server node based on the various response information returned by the next-level target server node and the response information generated by the main server node; if not, obtain the server configuration information of each target server node based on the various response information returned by the next-level target server node.
[0069] It can be understood that the master server node in the embodiment of the present invention can send the server configuration information acquisition request and the corresponding control command to the slave nodes at all levels by broadcasting. After each slave node receives the server configuration information acquisition request and the corresponding control command, it checks whether the server ID or server identifier of its own server node matches the server configuration information acquisition request. If it matches, the slave node is the target server node. The target server node generates a response message based on the control instruction and returns it to the upper-level server node. The response message includes the server configuration information of the target server node. Of course, the response message can also include server operation data information. If the upper-level server node is also the target server node, it will send the received response message and its own response information together to its upper-level server node until the response information of all target server nodes is sent to the master server node, so that the master server node obtains the response information of each target server node, that is, obtains the server configuration information of each target server node. Of course, the master server node itself will also determine whether the server ID or server identifier of the master server node matches the server configuration information acquisition request based on the server configuration information acquisition request. In the case of a match, the master server node is also the target server node, and will also generate corresponding response information (including its own server configuration information). At this time, the response information obtained by the master server node includes its own response information and the response information of each other target server node, that is, the master server node can obtain its own server configuration information and the server configuration information of each other target server node.
[0070] S130: Return the server configuration information to the mobile terminal device.
[0071] It is understood that after the master server node obtains the server configuration information of all target server nodes, it sends all the server configuration information to the mobile terminal device. Because the server configuration information includes the server node's node role, node level, and the port number to which the node is connected, the location of the server node can be determined based on the server configuration information, thereby achieving rapid positioning of the server node. Of course, when sending the server node configuration information, the target server node may also simultaneously display the server ID or server identifier bound to the server node configuration information.
[0072] Of course, in actual applications, in addition to obtaining the server configuration information of the target server node, the main server node can also obtain the server operation data of the target server node (such as equipment assets, performance data, alarm data, etc.), and then send the response information containing the server configuration information and server operation data information of the target server node as a whole to the mobile terminal device, so that the staff can locate and manage the server more efficiently based on the information received by the mobile terminal device.
[0073] In some embodiments, in the case where the server node is a primary server node, before obtaining a server configuration information acquisition request sent by a mobile terminal device connected to the primary server node, the method may further include:
[0074] When detecting that an external device is connected, identifying the device type of the connected external device;
[0075] In the case that the connected external devices include mobile terminal devices, the own server node is determined as the main server node, and the node information of the own server node is configured.
[0076] It should be noted that for the current server node, when the server node detects the presence of an external device connected, the device type of the connected external device can be further identified. If it is determined that the device type of the connected external device is a mobile terminal, that is, when the connected external device includes a mobile terminal device, it means that the current server node is the main server node. At this time, the node role of its own server node can be determined as the main server node, and when it is determined that its own server node is the main server node, the server configuration information of the main server node can also be configured.
[0077] Furthermore, the above process of configuring the node information of the own server node may include:
[0078] Determine the node role of its own server node as the master node;
[0079] Determine the node level of its own server node as the first level;
[0080] Determine the port number to which the server node is connected as the default port number;
[0081] Configure the node information of your own server node based on the node role, node level and connected port number of your own server node.
[0082] It is understood that when a server node is determined to be a master server node, during the process of configuring the server configuration information for the master server node, the node role of the server node is determined to be a master node, the node level is determined to be level 1 (where level 1 can be represented by the number 0), and the port number connected to the master server node can be a default port number (e.g., 1). In other words, the node role of the master server node can be determined to be master, the node level of the master server node can be determined to be level 0, and the port number connected to the master server node can be determined to be 1, thereby obtaining the configuration information of the master server node (master, 0, 1).
[0083] In some embodiments, after identifying the device type of the connected external device, it is determined that the connected external device includes a display terminal device in addition to the mobile terminal device, the method further includes:
[0084] Send the server configuration information to the display terminal device for display.
[0085] It should be noted that among the external devices connected to the main server node, in addition to mobile terminal devices, there are also connected display terminal devices. The server configuration information of each target server node obtained can be sent to the display terminal device for display, so that the staff can quickly determine the location of the server node through the server configuration information displayed by the display terminal device, and manage the server node accordingly, further improving the server positioning efficiency and server management efficiency.
[0086] In some embodiments, after identifying the device type of the connected external device, it is determined that the connected external device includes a server node in addition to the mobile terminal device. The method may further include:
[0087] Determine the node role of the connected server node as a slave node;
[0088] Determine the node level of the connected server node based on the node information of the main server node;
[0089] Get the port number of the connected server node;
[0090] Configure the node information of the connected server node according to the node role, node level and port number.
[0091] It should be noted that, that is, cascade node identification is performed in the case of device cascade. Among the external devices connected to the main server node, in addition to the mobile terminal device, there are other connected server nodes. The connected server node can be called a cascade node, and the cascade node is the slave server node, that is, the server configuration information of the connected server node can be further determined based on the server configuration information of the main server node itself. The node role of the connected server node is the slave node slave, that is, the server node connected to the main server node is the slave server node. The slave server node is directly connected to the main server node. Therefore, according to the node level (first level) of the main server node, it can be determined that the node level of the slave server node is the second level, and the port number of the slave server node connected to the main server node can be further obtained, so that the server configuration information of the slave server node (slave node, second level, port number) can be obtained, and the node information of the slave server node can be configured according to the server configuration information.
[0092] For example, after the cascade node is connected to the master server node, the master server node reads the port number M-Port of the hard-wired connection of the cascade node. Since the cascade node is connected to the master server node, the node information (that is, the server configuration information) of the cascade node can be set to (slave, 1, M-Port).
[0093] It should be noted that the communication bus in the embodiment of the present invention can adopt a high-speed bus (such as a Type-C bus) with a transmission rate greater than a preset rate, that is, the server node can be provided with a USB (Universal Serial Bus) Type-C interface, and the external device can be connected to the server node through the USB Type-C interface. The server nodes can also be hard-wired through the Type-C bus.
[0094] USB Type-C is a type of USB interface. The width of the USB Type-C interface is usually 8.3 mm and the thickness is 2.5 mm. Type-C wiring is divided into male "J" and female "K". Observe the appearance and shape, check the polarity, and distinguish them based on size and shape. Among them, the female end interface is defined as follows Figure 2 As shown, the male end interface is defined as follows Figure 3As shown. The Type-C connector has two pins, CC1 and CC2, which are used to identify the connector's insertion direction and different inserted devices. The DFP (Downstream Facing Port) is a downstream port that provides VBUS. The UFP (Upstream Facing Port) is an upstream port that draws power from VBUS. The DRP (Dual Role Port) can function as both a DFP and a UFP, dynamically switching between the two as needed. Type-C interface packages include 24-pin Type-C, 16-pin Type-C, 12-pin Type-C, and 6-pin Type-C.
[0095] The USB Type-C protocol is a standard USB interface that supports power up to 100W and transfer rates between 10Gb / s and 32Gb / s. In embodiments of the present invention, the USB Type-C protocol enables external terminal / server master / slave device configuration and master / slave device communication; server / server master / slave device configuration, rapid server micro-grouping, asset and performance data acquisition, and quick consistency configuration.
[0096] In some embodiments, the process of identifying the device type of the connected external device when detecting that an external device has been connected may include:
[0097] In the case where a hard-wire connection signal is detected through the communication bus, the connection port of the own server node is determined as a downlink port; the hard-wire connection signal is generated when an external device is connected to the own server node through the communication bus;
[0098] Output voltage signal through connection port and communication bus;
[0099] Obtain the current device type from the pre-stored device list, and determine whether the device type of the external device is consistent with the current device type;
[0100] When it is determined that the device type of the external device is consistent with the current device type, determining the device type of the external device to be the current device type;
[0101] When it is determined that the device type of the external device is inconsistent with the current device type, the next device type in the device list is obtained, and the next device type is used as the current device type, and the step of determining whether the device type of the external device is consistent with the current device type is returned.
[0102] It should be noted that the communication connection method of the server node in the embodiment of the present invention is to establish a hard-wired connection through the communication bus in a hot-plug manner, for example, through a Type-C hard-wired interface connection. When the current server node detects a hard-wired connection signal, it indicates that an external device is currently connected to the server node. At this time, the current server node can identify the terminal device through the USB Type-C protocol, add the terminal device driver, register the device and start the response service, establish a connection with the terminal device, and respond. Figure 4 As shown, after an external device connects to the current server node via Type-C, the current server node and the external device are hardwired via CC signals. Specifically, after the current server node detects the CC signal hardwire connection, it can determine its own server node connection port as a downlink port (i.e., the connection port is designated as a DFP (Downstream Facing Port)). Once the external device's role switches to an UFP (Upstream Facing Port), the current server node outputs a voltage signal through the connection port and the communication bus to power the external device, establishing a connection between the current server node and the external device. After the connection is established, the current server node can still detect CC signals (the server node detects a valid Rp / Rd connection). By enumerating each device type in a pre-stored device list, the external device determines the external device's device type based on the CC signals it detects (the external device detects a valid Rp / Rd connection). Rp is a pull-up resistor, and Rd is a pull-down resistor.
[0103] In actual applications, the current device type in the pre-stored device list can be obtained and the current device type can be sent to the external device. The external device determines whether the current device type is consistent with its own device type based on the received current device type and returns a response result. The server node determines whether the device type of the external device is consistent with the current device type based on the corresponding result returned by the external device. When the device type in the response result is consistent, it is determined that the device type of the external device is consistent with the current device type. If the device type in the response result is inconsistent, it is determined that the device type of the external device is inconsistent with the current device type. At this time, the next device type in the device list can be used for identification until the device type of the external device is determined.
[0104] In some embodiments, after identifying the device type of the connected external device, the method may further include:
[0105] In the case where the external device is a terminal device, a driver registration service corresponding to the device type of the terminal device is activated so as to communicate with the terminal device through the driver registration server.
[0106] It should be noted that if it is determined that the external device connected to the server node is a terminal device, for example, it is determined that the external device is a mobile terminal device, the server node can activate the driver registration service corresponding to the device type of the external device (mobile terminal device), and similarly, the mobile terminal device wakes up the corresponding management terminal program (such as) based on the monitored CC signal (the terminal detects a valid Rp / Rd connection). Figure 4 As shown), the server node can communicate with the management terminal program of the mobile terminal device by driving the registration server. The connected external device includes the mobile terminal device. Then, the server node is the main server node, and the mobile terminal device can send a server configuration information acquisition request to the main server node.
[0107] If it is determined that the external device connected to the server node is a display terminal device, in the server node display management scenario, the main server node determines whether the Type-C interface is reversed and the DFP current capacity by detecting the voltage of the CC pin pull-up resistor Rp. According to the voltage collected by the pull-up resistor Rp, the main server node adjusts the output power setting to the power supply capacity of the display terminal. The main server node activates the driver corresponding to the display terminal device and establishes communication with the display terminal device so that the obtained server configuration information can be sent to the display terminal device for display through the DP (DisplayPort, display interface) protocol. Specifically, the relevant information of each server node can be displayed in a loop.
[0108] It should be noted that, when the current server node is determined to be the master server node, the node role of the master server node is determined to be the master node master, the node level of the master server node is determined to be level 0, and the port number to which the master server node is connected is determined to be 1, so that the configuration information of the master server node (master, 0, 1) can be obtained.
[0109] When the current server node is determined to be the master server node, and the Type-C CC signal is used to identify external devices connected to the master server node, if there are other connected server nodes besides mobile terminal devices (when a server node is connected to the master server node via a USB Type-C hardwire), a connection is established between the connected server node and the master server node, with the node role of the connected server node being the slave node. The server configuration information (slave node, second level, port number) of the slave server node is obtained, and the node information of the slave server node is configured based on the server configuration information. For example, after the cascade node is connected to the master server node, the master server node reads the port number M-Port of the cascade node's hardwire connection. Since the cascade node is connected to the master server node, the node information (i.e., server configuration information) of the cascade node can be set to (slave, 1, M-Port).
[0110] In some embodiments, the method may further include:
[0111] In the case where the server node is a slave server node, when it is detected that a server node has been connected, the node role of the connected server node is determined to be a slave node;
[0112] Add 1 to the node level of the own server node to obtain the node level of the connected server node;
[0113] Get the port number of the connected server node;
[0114] The node information of the connected server node is configured based on the node role, node level and port number corresponding to the connected server node.
[0115] It should be noted that if the current server node is a slave server node, and other server nodes are connected to the slave server node via a USB Type-C hard line, and the slave server node detects the Type-C CC signal and identifies that the connected one is a server node, the node role of the connected server node can be directly determined as a slave node, and the node level of the connected slave server node can be determined based on its own node level. The node level of the connected slave server node can be obtained by adding 1 to its own node level, and the port number of the connected slave server node can be obtained. Then, the server node information of the connected slave server node can be configured according to (slave node, its own node level + 1, port number) to obtain server configuration information.
[0116] For example, the slave server node obtains the port number of the Typc-C interface connection of the connected server node as S-Port, and based on its own slave server node (slave, Level-S, Node-S), it can construct the server configuration information of the connected server node as (slave, Level-S + 1, S-Port). Among them, the relationship between the master server node and the slave server nodes at all levels is as follows: Figure 6 shown.
[0117] In actual applications, the slave server nodes can also upload their server configuration information to their parent nodes. Through the level-by-level reporting, the master server node obtains the server configuration information of each slave server node and sends the server configuration information of each server node to the mobile terminal device, so that the mobile terminal device can manage each server node. Of course, when each slave server node reports the server configuration information, it can also upload information such as node data to its parent node, so that the mobile terminal device can obtain more complete node information, so as to more efficiently manage the server.
[0118] It can be seen that in the embodiment of the present invention, when managing the server, when the current server node is the main server node, when there is a mobile terminal device connected to the main server node, the server configuration information acquisition request sent by the mobile terminal device can be obtained, and the server configuration information of the corresponding target server in the main node server and the slave node servers at all levels can be obtained according to the server configuration information acquisition request, wherein the server configuration information includes the node role, node level and the port number to which the node is connected, and the server configuration information is sent to the mobile terminal device so that the staff can quickly locate the position of the target server through the server configuration information received by the mobile terminal device, thereby improving the server positioning efficiency and the management efficiency of the server.
[0119] Furthermore, it should be noted that, based on the present invention, a temporary monitoring domain can be constructed using a full-featured USB Type-C port in the server deployment site—the computer room—to quickly query, modify, and display server information. The server nodes in the present invention can be hardwired to external devices via dual Type-C ports, with channel selection performed via CC signal connections. Connections can also be established with external devices (such as mobile terminal devices (cell phones, handheld devices, etc.) and display terminal devices (handheld monitors, laptops)), enabling more operations on the server. Specifically, in the embodiments of the present invention, communication between the server nodes and terminal devices can be achieved via the USB Type-C high-speed protocol, and between server nodes can also be achieved via the USB Type-C high-speed protocol. This allows for rapid and efficient acquisition of massive amounts of data, which can be displayed to staff in real time, allowing staff to promptly understand the server's operating status and more efficiently manage the server.
[0120] The present invention also provides a corresponding device for the server management method, which further makes the method more practical. Among them, the device can be described from the perspective of functional modules and hardware. The server management device provided by the present invention is introduced below. The device is used to implement the server management method provided by the present invention. In this embodiment, the server management device may include or be divided into one or more program modules. The one or more program modules are stored in a storage medium and executed by one or more processors to complete the server management method disclosed in the above embodiment. The program module referred to in the present invention refers to a series of computer program instruction segments that can complete specific functions, which is more suitable for describing the execution process of the server management device in the storage medium than the program itself. The following description will specifically introduce the functions of each program module of this embodiment. The server management device described below and the server management method described above can be referenced to each other.
[0121] From the perspective of functional modules, see Figure 7 , Figure 7 A structural diagram of a server management device provided by the present invention in a specific embodiment, the device may include:
[0122] The first acquisition module 11 is used to acquire a server configuration information acquisition request sent by a mobile terminal device connected to the main server node when the server node is a main server node;
[0123] The second acquisition module 12 is used to acquire server configuration information of the target server node based on the server configuration information acquisition request; the server configuration information includes the node role, node level and the port number to which the node is connected;
[0124] The sending module 13 is used to return the server configuration information to the mobile terminal device.
[0125] In some embodiments, further comprising:
[0126] An identification module is used to identify the type of the connected external device when detecting that an external device is connected;
[0127] The setting module is used to determine the own server node as the main server node and configure the node information of the own server node when the connected external devices include mobile terminal devices.
[0128] In some embodiments, the sending module is further configured to send the server configuration information to the display terminal device for display when the connected external device also includes a display terminal device.
[0129] In some embodiments, the setting module is also used to determine the node role of the connected server node as a slave node when the connected external device also includes a server node; determine the node level of the connected server node based on the node information of the master server node; obtain the port number of the connected server node; and configure the node information of the connected server node based on the node role, node level and port number.
[0130] In some embodiments, the identification module includes:
[0131] The first determining unit is configured to determine the connection port of the own server node as a downlink port when a hard-wire connection signal is detected via the communication bus; the hard-wire connection signal is generated when an external device is connected to the own server node via the communication bus;
[0132] An output unit, used for outputting a voltage signal through a connection port and a communication bus;
[0133] a judgment unit, configured to obtain a current device type from a pre-stored device list and judge whether the device type of the external device is consistent with the current device type;
[0134] a second determining unit, configured to determine the device type of the external device as the current device type when it is determined that the device type of the external device is consistent with the current device type;
[0135] The third determining unit is configured to, when determining that the device type of the external device is inconsistent with the current device type, obtain the next device type in the device list, set the next device type as the current device type, and trigger the judging unit.
[0136] In some embodiments, further comprising:
[0137] The activation module is used to activate the driver registration service corresponding to the device type of the terminal device when the external device is a terminal device, so as to communicate with the terminal device through the driver registration server.
[0138] In some embodiments, further comprising:
[0139] a determination module configured to, when the server node is a slave server node and when detecting that a server node has been connected, determine the node role of the connected server node as a slave node;
[0140] The calculation module is used to add 1 to the node level of its own server node to obtain the node level of the connected server node;
[0141] The third acquisition module is used to obtain the port number of the connected server node;
[0142] The configuration module is used to configure the node information of the connected server node based on the node role, node level and port number corresponding to the connected server node.
[0143] It should be noted that the server management device provided in the embodiment of the present invention has the same beneficial effects as the server management method provided in the above embodiment, and for the specific introduction of the server management method involved in the embodiment of the present invention, please refer to the above embodiment and the present invention will not go into details here.
[0144] The server management device mentioned above is described from the perspective of functional modules. Furthermore, the present invention also provides an electronic device, which is described from the perspective of hardware. Figure 8 A structural diagram of an electronic device provided by an embodiment of the present invention, such as Figure 8 As shown, the electronic equipment includes:
[0145] Memory 20, for storing computer programs;
[0146] The processor 21 is configured to implement the steps of the server management method in the above embodiment when executing a computer program.
[0147] The electronic device provided in this embodiment may include but is not limited to a smart phone, a tablet computer, a laptop computer, or a desktop computer.
[0148] Among them, the processor 21 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 21 can be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 21 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 21 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 21 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.
[0149] The memory 20 may include one or more computer-readable storage media, which may be non-transitory. The memory 20 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In some embodiments, the memory 20 may be an internal storage unit of the electronic device, such as a server's hard drive. In other embodiments, the memory 20 may also be an external storage device of the electronic device, such as a plug-in hard drive equipped on a server, a Smart Media Card (SMC), a Secure Digital (SD) card, a flash memory card, etc. Furthermore, the memory 20 may include both an internal storage unit and an external storage device of the electronic device. The memory 20 may be used not only to store application software installed on the electronic device and various types of data, such as program code used during the execution of the server management method, but also to temporarily store data that has been output or is to be output. In this embodiment, the memory 20 is used to store at least the following computer program 201, which, when loaded and executed by the processor 21, is capable of implementing the relevant steps of the server management method disclosed in any of the aforementioned embodiments. In addition, resources stored in memory 20 may also include an operating system 202 and data 203, which may be stored in a temporary or permanent manner. Operating system 202 may include Windows, Unix, Linux, etc. Data 203 may include, but is not limited to, a set offset (data corresponding to server management results), etc.
[0150] In some embodiments, the electronic device may further include a display screen 22, an input / output interface 23, a communication interface 24, a power supply 25, and a communication bus 26. Among them, the display screen 22 and the input / output interface 23, such as a keyboard, are user interfaces, and the optional user interface may also include a standard wired interface, a wireless interface, etc. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic Light-Emitting Diode) touch device, etc. The display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the electronic device and to display a visual user interface. The communication interface 24 may optionally include a wired interface and / or a wireless interface, such as a WI-FI interface, a Bluetooth interface, etc., which is generally used to establish a communication connection between the electronic device and other electronic devices. The communication bus 26 may be a peripheral component interconnect (PCI) bus or 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 ease of representation, Figure 8 Only one thick line is used in the diagram, but this does not mean that there is only one bus or one type of bus.
[0151] Those skilled in the art will understand that Figure 6 The structure shown in the figure does not constitute a limitation of the electronic device, and may include more or fewer components than shown in the figure.
[0152] It is understandable that if the server management method in the above embodiment is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the existing technology, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and executes all or part of the steps of the various embodiments of the present invention. The aforementioned storage medium includes: USB flash drive, mobile hard disk, read-only memory (ROM), random access memory (RAM), electrically erasable programmable ROM, register, hard disk, removable disk, CD-ROM, magnetic disk or optical disk, etc. Various media that can store program code.
[0153] Based on this, Figure 9As shown, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program 31 is stored. When the computer program 31 is executed by a processor, the steps of the above-mentioned server management method are implemented.
[0154] Based on this, an embodiment of the present invention further provides a computer program product, including a computer program / instruction, which implements the steps of the above-mentioned server management method when executed by a processor.
[0155] The above describes in detail a server management method, device, electronic device, and computer-readable storage medium provided by embodiments of the present invention. The various embodiments are described in a progressive manner in this specification, with each embodiment focusing on the differences from other embodiments. Similar or identical parts between the various embodiments can be referenced to each other. For the devices disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple. For relevant details, refer to the method description.
[0156] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present invention.
[0157] The above is a detailed introduction to a server management method, device, electronic device and computer-readable storage medium provided by the present invention. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present invention, the present invention can also be improved and modified in several ways, and these improvements and modifications also fall within the scope of protection of the claims of the present invention.
Claims
1. A server management method, characterized in that: Applicable to server nodes, including: In the case where the server node is a primary server node, obtaining a server configuration information acquisition request sent by a mobile terminal device connected to the primary server node; Obtaining server configuration information of a target server node based on the server configuration information acquisition request; the server configuration information includes a node role, a node level, and a port number to which the node is connected; Returning the server configuration information to the mobile terminal device; In the case where the server node is a master server node, before obtaining the server configuration information acquisition request sent by the mobile terminal device connected to the master server node, the method further includes: When detecting that an external device is connected, identifying the device type of the connected external device; the external device is connected via a hard-wired connection; In the case where the connected external devices include mobile terminal devices, determining the own server node as the main server node and configuring the node information of the own server node; The method of obtaining the server configuration information of the target server node based on the server configuration information acquisition request includes: the master server node broadcasting the server configuration information acquisition request and control instructions to slave server nodes at all levels, and obtaining the server configuration information of the target server node according to the response information of the target server node.
2. The server management method according to claim 1, wherein: In the case where the connected external device also includes a server node, the method further includes: Determine the node role of the connected server node as a slave server node; Determine the node level of the connected server node based on the node information of the main server node; Get the port number of the connected server node; The node information of the connected server node is configured according to the node role, the node level and the port number.
3. The server management method according to claim 1, wherein: The step of identifying the type of the connected external device upon detecting that the external device has been connected includes: In the case where a hard-wire connection signal is detected through the communication bus, the connection port of the own server node is determined as a downlink port; the hard-wire connection signal is generated when an external device is connected to the own server node through the communication bus; outputting a voltage signal via the connection port and the communication bus; Obtaining a current device type from a pre-stored device list, and determining whether the device type of the external device is consistent with the current device type; In a case where it is determined that the device type of the external device is consistent with the current device type, determining the device type of the external device to be the current device type; When it is determined that the device type of the external device is inconsistent with the current device type, the next device type in the device list is obtained, and the next device type is used as the current device type, and the step of determining whether the device type of the external device is consistent with the current device type is returned to.
4. The server management method according to claim 3, wherein: After identifying the device type of the connected external device, the method further includes: In the case that the external device is a terminal device, a driver registration service corresponding to the device type of the terminal device is activated so as to communicate with the terminal device through a driver registration server.
5. The server management method according to claim 2, wherein: The acquiring the server configuration information of the target server node based on the server configuration information acquisition request includes: The master server node broadcasts the server configuration information acquisition request and the control instruction to slave server nodes at all levels, so that the slave server nodes at all levels determine whether their own server nodes are target server nodes based on the server configuration information, and if their own server nodes are target server nodes, generate corresponding response information according to the control instruction, and return the response information to the upper-level server node, wherein the response information includes the server configuration information; Receive each response information returned by the next-level target server node; According to the server configuration information acquisition request, determine whether its own main server node is the target server node. If so, generate corresponding response information according to the control instruction, and obtain the server configuration information of each target server node based on the various response information returned by the next-level target server node and the response information generated by the main server node; if not, obtain the server configuration information of each target server node based on the various response information returned by the next-level target server node.
6. The server management method according to claim 5, wherein: After determining the node role of the connected server node as a slave server node, the method further includes: In the case where the server node is a slave server node, when it is detected that a server node has been connected to the slave server node, determining the node role of the connected server node as a slave server node; Add 1 to the node level of the own server node to obtain the node level of the connected server node; Get the port number of the connected server node; The node information of the connected server node is configured based on the node role, node level and port number corresponding to the connected server node.
7. A server management device, characterized in that: Applicable to server nodes, including: A first acquisition module is configured to, when the server node is a primary server node, acquire a server configuration information acquisition request sent by a mobile terminal device connected to the primary server node; a sending module, configured to send the server configuration information acquisition request and control instructions to slave server nodes at all levels by broadcasting, and return the server configuration information to the mobile terminal device; The second acquisition module is used to obtain server configuration information of the target server node according to the response information of the target server node; the server configuration information includes the node role, node level and the port number to which the node is connected; An identification module is used to identify the type of the external device connected when detecting that an external device is connected; the external device is connected by a hard-wired connection; The setting module is used to determine the own server node as the main server node and configure the node information of the own server node when the connected external devices include mobile terminal devices.
8. An electronic device, characterized in that: include: memory for storing computer programs; A processor, configured to execute the computer program to implement the steps of the server management method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the server management method according to any one of claims 1 to 6.
Citation Information
Patent Citations
MEC node identifier implementation method, mobile terminal, server and storage medium
CN110381131A
Cluster deployment method and computing device
CN118426685A