Equipment detection method and device, server and storage medium
By acquiring and traversing the specifications and actual address sets of server devices, detecting abnormalities and new devices, and displaying their topological structure, the problem of low detection efficiency in the existing technology is solved, automated detection and precise positioning are achieved, and detection efficiency and accuracy are improved.
Patent Information
- Application Number
- CN202311507901.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-13
- Publication Date
- 2025-05-13
AI Technical Summary
In the prior art, server equipment detection efficiency is low, requires a lot of labor costs, the detection process is cumbersome, and the location of abnormal equipment cannot be located in time, resulting in poor detection effect.
By obtaining the standard address set in the design document, iterates through each device component to obtain the actual address set, including the device address of the forwarding address, until all device addresses are obtained. Then, abnormal equipment and new equipment are detected based on the actual and standardized address sets, and their topology is demonstrated for precise positioning.
It realizes automatic detection of server equipment information, saves labor costs, improves detection efficiency, and can accurately locate abnormalities and new equipment, ensuring the comprehensiveness and accuracy of equipment detection.
Smart Images

Figure CN119988110A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of operation and maintenance technology, and in particular to an equipment detection method, device, server and storage medium. Background Art
[0002] During the development and testing of the server, it is necessary to frequently check whether the various functional devices in the server are connected normally to ensure the smooth execution of the server development and testing process.
[0003] In the prior art, the detection of each functional device in the server is usually completed through an Inter-Integrated Circuit (I2C) tool. Specifically, a tester completes the status query of each functional device in a manual operation through the I2C tool, thereby realizing the status detection of each functional device in the server.
[0004] However, this detection method not only requires a lot of manpower costs, has low detection efficiency, and a cumbersome detection process, but also makes it difficult to locate abnormal addresses. It is impossible to know the location of abnormal devices in a timely manner, and the detection effect is poor. Summary of the invention
[0005] The present invention provides a device detection method, device, server and storage medium to solve the problem of low device detection efficiency.
[0006] According to one aspect of the present invention, a device detection method is provided, which is applied to a baseboard management controller of a server, comprising:
[0007] Get the standard address set corresponding to each device component in the design document;
[0008] Traverse each device component to obtain the actual address set corresponding to each device component; if the actual address set of the current device component includes the transfer address, continue to obtain the device address under the transfer address until all device addresses under the transfer address are obtained, and then continue to traverse other device components;
[0009] Detect abnormal and newly added devices in the server based on the actual address set and standard address set of each device component.
[0010] After detecting abnormal devices and newly added devices in the server according to the actual address set and the standard address set of each device component, at least one of the following items is also included: if an abnormal device component is detected in the server, the topological structure of the abnormal device component is displayed based on the design document; if an abnormal device is detected in the server, the topological structure of the device component where the abnormal device is located is displayed based on the design document; if a new device component is detected in the server, the design document is updated according to the new device component, and the topological structure of the new device component is displayed; if a new device is detected in the server, the design document is updated according to the new device, and the topological structure of the device component where the new device is located is displayed based on the updated design document. By displaying the topological structure of abnormal devices and newly added devices, accurate positioning of abnormal devices and newly added devices is achieved, which facilitates operation and maintenance personnel to promptly learn the structural relationship between abnormal devices and newly added devices and other devices, thereby improving equipment detection efficiency.
[0011] After detecting abnormal devices and newly added devices in the server according to the actual address set and the standard address set of each device component, it also includes: if it is detected that there are newly added devices in the target device component of the server, according to the numerical relationship between the total number of newly added devices in the target device component and the total number of standard devices, or the numerical relationship between the total number of newly added devices in the target device component and the number of standard devices of the same type, determining whether the newly added devices in the target device component are redundant devices. When there are newly added devices in the server, redundant detection of the newly added devices is implemented, which not only reduces the operating load of the server, but also avoids the waste of hardware resources and simplifies the topological structure of the server.
[0012] After detecting that a new device exists in the target device component of the server, the method further includes: determining whether the new device in the target device component is a redundant device according to the new device type of the target device component and the component type of the target device component. When a new device exists in the server, the type detection of the new device is implemented, which not only reduces the operation load of the server, but also avoids the waste of hardware resources and simplifies the topology structure of the server.
[0013] After detecting that a new device exists in the target device component of the server, the method further includes: determining whether the new device in the target device component is an overload device according to the new device operation parameter of the target device component. When a new device exists in the server, overload detection of the new device is implemented, which not only reduces the overall operation load of the server, but also avoids the phenomenon that the new device cannot operate due to excessive load, thereby saving hardware resources of the server.
[0014] After detecting abnormal devices and newly added devices in the server according to the actual address set and the standard address set of each device component, it also includes: if an abnormal device is detected in the server, obtaining the data communication record of the abnormal device through the central processing unit, or obtaining the operation status record of the abnormal device through the basic input and output system; through the data communication record or the operation status record, detecting whether the abnormal device in the server is a missing device. Obtaining the abnormal cause of the abnormal device through other detection methods other than bus detection effectively distinguishes between missing devices and communication abnormal devices, ensuring the integrity and accuracy of the device detection results.
[0015] After obtaining the actual address sets corresponding to each device component, it also includes: obtaining the standard transfer level of each device according to the standard address sets of each device component, and obtaining the actual transfer level of each device according to the actual address sets of each device component; if the actual transfer level of the target device does not match the corresponding standard transfer level, the target device is marked as a non-standard device. While realizing the detection of missing devices, abnormal communication devices and newly added devices in the server, it also realizes the detection of non-standard devices with low communication efficiency and high data loss risk, further improving the comprehensiveness of device detection and ensuring the integrity of device detection results.
[0016] According to another aspect of the present invention, there is provided a device detection apparatus, which is applied to a baseboard management controller of a server, and includes:
[0017] A standard address acquisition module is used to obtain the standard address set corresponding to each device component in the design document;
[0018] The actual address acquisition module is used to traverse each device component to obtain the actual address set corresponding to each device component; if the actual address set of the current device component includes the transfer address, continue to obtain the device address under the transfer address until all device addresses under the transfer address are obtained, and continue to traverse other device components;
[0019] The device detection execution module is used to detect abnormal devices and newly added devices in the server based on the actual address set and the standard address set of each device component.
[0020] According to another aspect of the present invention, a server is provided, the server comprising:
[0021] at least one processor; and
[0022] a memory communicatively connected to the at least one processor; wherein,
[0023] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the device detection method described in any embodiment of the present invention.
[0024] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the device detection method described in any embodiment of the present invention when executed.
[0025] The technical solution of the embodiment of the present invention, after obtaining the standard address set corresponding to each device component in the design document, traverses each device component to obtain the actual address set corresponding to each device component, especially when the actual address set of the current device component includes a transfer address, continues to obtain the device address under the transfer address; and then detects abnormal devices and new devices in the server based on the actual address set and the standard address set of each device component; thereby, not only automatic detection of device information in the server is achieved, the manpower cost of device detection is saved, and the efficiency of device detection is improved, but also accurate positioning of abnormal devices and new devices is achieved, ensuring the comprehensiveness of the device detection range.
[0026] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of 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 creative work.
[0028] Figure 1A is a schematic diagram of an application scenario of the device detection method provided by the present invention;
[0029] Figure 1B is a flow chart of a device detection method provided according to Embodiment 1 of the present invention;
[0030] Figure 2 is a flow chart of another device detection method provided according to Embodiment 2 of the present invention;
[0031] Figure 3 is a flow chart of another device detection method provided according to Embodiment 3 of the present invention;
[0032] Figure 4is a structural schematic diagram of a device detection apparatus provided according to a fourth embodiment of the present invention;
[0033] Figure 5 It is a structural diagram of a server for implementing the device detection method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0034] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only 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 should fall within the scope of protection of the present invention.
[0035] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0036] The Inter-Integrated Circuit (IIC), also known as the I2C bus, is a serial communication bus with a multi-master-slave architecture. Each master device is connected to multiple slave devices. The I2C bus includes two signal lines, namely the serial data line (SDA) and the serial clock line (SCL). Figure 1A As shown, the central processing component (i.e., device component A) in the server can be used as the main device component, which can include one or more central processing units (CPUs). Figure 1A In the example, two central processors (ie, device A1 and device A2) are used.
[0037] The device component A is connected to other device components (i.e., slave device components) through the I2C bus, for example, a graphics processing component and a storage component. Figure 1AIn the example, four slave device components are included; among them, the graphics processing component may include one or more graphics processors (Graphics Processing Unit, GPU); the storage component may include one or more memories (Memory), for example, read-only memory (Read-Only Memory, ROM) and random access memory (RandomAccess Memory, RAM), etc. Each of the above CPU, GPU, ROM and RAM is a device, and each has a different device address.
[0038] like Figure 1A As shown, the device detection method disclosed in the present invention can be configured in a baseboard management controller (BMC) in a server, and the BMC is connected to different device components in the server through different buses.
[0039] Embodiment 1
[0040] Figure 1B This is a flow chart of a device detection method provided in the first embodiment of the present invention. This embodiment can be applied to detect abnormal devices and newly added devices in a server by traversing various device components. The method can be executed by a device detection device, which can be implemented in the form of hardware and / or software. The device detection device is configured in the BMC of the server. Figure 1B As shown, the method includes:
[0041] S101. Obtain the standard address sets corresponding to each device component in the design document.
[0042] The design document records the hardware information that a server must have in order to meet specific business requirements, including the required device components, the number and type of devices included in each device component, and the address, function, operating parameters and other related information of each device; among which, a device component is a collection of hardware devices of a certain type; taking the above technical solution as an example, the central processing component, graphics processing component and storage component can be used as different device components respectively.
[0043] In order to facilitate the orderly management of devices by the server, the design document assigns a specified device address (i.e., standard address) to each device. Each device component corresponds to a standard address set, and each standard address corresponds to a device in the device component. Obviously, depending on the number of devices included in the device component, the standard address set may include one or more standard addresses; in particular, since the design document usually only records the hardware information that must be available to meet specific business needs, and in order to improve the performance of the server or expand the functionality of the server, other devices or device components may actually be added to the server, therefore, if a device component has a device address outside the design document, then the device corresponding to the device address is the newly added device; if the BMC is connected to a new bus outside the design document, and the device addresses under the bus are all outside the design document, then the component corresponding to the new bus is the newly added device component.
[0044] S102, traverse each device component to obtain the actual address set corresponding to each device component; if the actual address set of the current device component includes a transfer address, continue to obtain the device address under the transfer address until all device addresses under the transfer address are obtained, and continue to traverse other device components.
[0045] When scanning a device component under a bus, all device addresses (i.e., actual addresses) scanned and obtained under the device component constitute an actual address set; wherein, the above-mentioned actual address may include a transfer address; the transfer address is the address of a transfer device (e.g., a switch chip), and the transfer device is used to increase the I2C bus channel to mount more devices in the current device component; a device component may mount other devices through one or more transfer devices, especially devices whose mounted device type is different from the current device component type; for example, in a graphics processing component, in order to improve the data processing speed of the graphics processing component, it may be necessary to configure a memory for temporarily storing intermediate data therein, and the memory needs to be connected to the graphics processing component through a transfer device.
[0046] The BMC uses the I2C tool to traverse the device components under each bus in turn according to the buses it is connected to, and records all device addresses in each device component. Since the above device addresses are actually obtained by scanning with the I2C tool, the device addresses obtained by scanning are the actual addresses, and all actual addresses of the current device components constitute the actual address set.
[0047] Since the address of the transfer device has a fixed composition format, the above composition format can be recorded through the transfer address table in the design document. After scanning and obtaining each device address (i.e., actual address) in the current device component, the above device address is compared with the transfer address table to determine whether there is a transfer address in the device address; if there is no transfer address, it indicates that all device addresses in the device component have been obtained, and continue to traverse and obtain the device address in the next device component according to other buses connected to the BMC until the device addresses under all device components are completely obtained.
[0048] If a transfer address exists, it indicates that other devices are connected to the transfer device corresponding to the transfer address. At this time, the I2C tool is used to continue to obtain the device address under the transfer address. In particular, the device address obtained together with the above transfer address can be used as the zero-layer device address, that is, the device address directly scanned and obtained in the device component; and the device address obtained under the transfer address can be used as the first-layer device address, that is, the device address transferred through a transfer device.
[0049] In addition, if a forwarding address (for example, the address of forwarding device G) is obtained again in the device address under the forwarding address (for example, the address of forwarding device F), it means that other devices are still connected to forwarding device G. At this time, the device address under forwarding device G continues to be obtained. This device address is used as the second-layer device address, that is, the device address obtained by forwarding two forwarding devices (i.e., forwarding device F and forwarding device G); optionally, in the embodiment of the present invention, the number of forwarding devices in the device component and the forwarding level are not specifically limited.
[0050] S103: Detect abnormal devices and newly added devices in the server according to the actual address set and the standard address set of each device component.
[0051] If a device address appears in the standard address set but not in the actual address set, it means that the device corresponding to the device address has an abnormality, which may be due to the missing device, resulting in the inability to detect the device address, or a communication abnormality between the BMC and the device, resulting in the inability to detect the device address. If no device address is obtained under a bus connected to the BMC, it means that there is an abnormality in the device component under the bus, which may also be caused by the missing device, or a communication abnormality between the BMC and the device component.
[0052] If a device address appears in the actual address set but not in the standard address set, it means that the server has undergone functional expansion or performance expansion, and a new device has been added to the current device component; if the device addresses obtained by the BMC under a bus are not in the standard address set, it also means that the server has undergone functional expansion or performance expansion, and the expansion method is to add a new device component.
[0053] In particular, for the identity acquisition of the newly added device, the identity document (ID) of the device can be read through the address obtained according to the newly added device address, and then the device information such as the device name, device type and operating parameters corresponding to the identity identification number can be obtained by querying the database; the device can also be directly accessed through the newly added device address to obtain the operating parameters of the device such as the capacity and read and write speed of the device, and then the device type of the device can be determined based on the obtained operating parameters.
[0054] Optionally, in an embodiment of the present invention, after detecting abnormal devices and newly added devices in the server according to the actual address sets and standard address sets of each device component, it also includes at least one of the following: if an abnormal device component is detected in the server, displaying the topological structure of the abnormal device component based on the design document; if an abnormal device is detected in the server, displaying the topological structure of the device component where the abnormal device is located based on the design document; if a new device component is detected in the server, updating the design document according to the new device component, and displaying the topological structure of the new device component; if a new device is detected in the server, updating the design document according to the new device, and displaying the topological structure of the device component where the new device is located based on the updated design document.
[0055] Specifically, when an abnormal device component is detected in the server, the topological structure of the abnormal device component is displayed based on the design document, and when an abnormal device is detected in the server, the topological structure of the device component where the abnormal device is located is displayed based on the design document. By displaying the topological structure of the abnormal device, the abnormal device is accurately located, which facilitates operation and maintenance personnel to promptly learn the structural relationship between the abnormal device and other devices, thereby improving the detection efficiency of abnormal devices.
[0056] At the same time, when a new device component is detected in the server, the design document is updated according to the new device component; wherein the topological structure of the new device component includes the number of devices and the switching level of each device; and when a new device is detected in the server, the design document is updated according to the new device; thereby, by displaying the topological structure of the new device, accurate positioning of the new device is also achieved, and it is also convenient for operation and maintenance personnel to promptly know the structural relationship between the new device and other devices, thereby improving the detection efficiency of the new device.
[0057] Optionally, in an embodiment of the present invention, after detecting abnormal devices and newly added devices in the server according to the actual address sets and standard address sets of each device component, it also includes: if an abnormal device is detected in the server, obtaining the data communication record of the abnormal device through the central processing unit, or obtaining the operating status record of the abnormal device through the basic input and output system; and detecting whether the abnormal device in the server is a missing device through the data communication record or the operating status record.
[0058] Specifically, the central processing unit serves as the master device in the server, and each slave device will generate data communication with the central processing unit, and the basic input output system (BIOS) serves as the basic input output program of the server, which records the operating status of each device. Therefore, when an abnormal device is detected in the server through the above technical solution, if the relevant information of the abnormal device is not detected through the data communication record or the operating status record, it means that the device is missing in the server; if the relevant information of the abnormal device is detected through the data communication record or the operating status record, it means that a communication abnormality has occurred between the device and the BMC, thereby obtaining the abnormal cause of the abnormal device through other detection methods other than bus detection, effectively distinguishing between the missing device and the communication abnormal device, and ensuring the integrity and accuracy of the device detection result.
[0059] Optionally, in an embodiment of the present invention, after obtaining the actual address sets corresponding to each device component, it also includes: obtaining the standard switching level of each device based on the standard address set of each device component, and obtaining the actual switching level of each device based on the actual address set of each device component; if the actual switching level of the target device does not match the corresponding standard switching level, the target device is marked as a non-standard device.
[0060] Specifically, if a device has more actual transfer levels than the standard transfer levels, when the device performs data transmission, the intermediate forwarding function of the transfer device may reduce the data transmission speed and there is a risk of data loss. At this time, although there are no missing devices, abnormal communication devices, or new devices, it is actually an irregular topology. At this time, the target device with more actual transfer levels than the standard transfer levels needs to be marked as a non-standard device. In this way, while realizing the detection of missing devices, abnormal communication devices, and new devices in the server, it also realizes the detection of non-standard devices with low communication efficiency and high data loss risk, further improving the comprehensiveness of device detection and ensuring the integrity of device detection results.
[0061] The technical solution of the embodiment of the present invention, after obtaining the standard address set corresponding to each device component in the design document, traverses each device component to obtain the actual address set corresponding to each device component, especially when the actual address set of the current device component includes a transfer address, continues to obtain the device address under the transfer address; and then detects abnormal devices and new devices in the server based on the actual address set and the standard address set of each device component; thereby, not only automatic detection of device information in the server is achieved, the manpower cost of device detection is saved, and the efficiency of device detection is improved, but also accurate positioning of abnormal devices and new devices is achieved, ensuring the comprehensiveness of the device detection range.
[0062] Embodiment 2
[0063] Figure 2 This is a flow chart of a device detection method provided by Embodiment 2 of the present invention. The relationship between this embodiment and the above embodiments is that after detecting that a new device exists in the target device component of the server, it is necessary to further determine whether the new device is a redundant device or an overloaded device. Figure 2 As shown, the method includes:
[0064] S201. Obtain the standard address sets corresponding to each device component in the design document.
[0065] S202, traverse each device component to obtain the actual address set corresponding to each device component; if the actual address set of the current device component includes a transfer address, continue to obtain the device address under the transfer address until all device addresses under the transfer address are obtained, and continue to traverse other device components.
[0066] S203: Detect abnormal devices and newly added devices in the server according to the actual address set and the standard address set of each device component.
[0067] S204. If it is detected that there are new devices in the target device component of the server, determine whether the new devices in the target device component are redundant devices based on the numerical relationship between the total number of new devices in the target device component and the total number of standard devices, or the numerical relationship between the total number of new devices in the target device component and the number of standard devices of the same type.
[0068] Specifically, the total number of standard devices is the total number of all devices under the device component recorded in the design document, for example, the total number of all devices in the storage component; the number of standard devices of the same type refers to the total number of devices of the device type recorded in the design document. For example, when the newly added device is a ROM, the number of standard devices of the same type refers to the total number of ROMs in the storage component recorded in the design document.
[0069] If the ratio of the total number of new devices to the total number of standard devices in a device component is greater than or equal to the first ratio threshold, or the ratio of the total number of new devices to the number of standard devices of the same type is greater than or equal to the second ratio threshold, it indicates that a large number of devices are mounted in the device component. Since the design document has specified the required devices for each device component, functional redundancy often occurs when the number of new devices is too large. Therefore, when there are new devices in the server, redundant detection of the new devices is implemented, which not only reduces the operating load of the server, but also avoids the waste of hardware resources and simplifies the server topology.
[0070] Optionally, in an embodiment of the present invention, after detecting the presence of a new device in the target device component of the server, it also includes: determining whether the new device in the target device component is a redundant device according to the new device type of the target device component and the component type of the target device component.
[0071] Specifically, since different device components are used to implement different functions, even if I2C channels can be added through adapter devices, channel expansion is often only performed under limited device types. For example, for a storage component, a graphics processor will not be mounted inside it, because a graphics processor mounted inside the storage component will not actually play any auxiliary computing function, and the small storage space of the graphics processor itself determines that it is not suitable for use as a storage device. Therefore, according to the component type of the target device component, if the type of the newly added device does not match the current component type, the newly added device is determined to be a functional redundant device. Therefore, when a new device exists in the server, the type of the new device is detected, which not only reduces the operating load of the server, but also avoids the waste of hardware resources and simplifies the topology of the server.
[0072] Optionally, in the embodiment of the present invention, after detecting that a new device exists in the target device component of the server, the method further includes: determining whether the new device in the target device component is an overloaded device according to operating parameters of the new device in the target device component.
[0073] Specifically, the design document records the operating parameters of each required device. A newly added device may require too many resources (for example, CPU resources, memory resources, and storage resources, etc.), exceeding the single device load threshold set by the server for each device. It may also cause the server's operating load to exceed the overall load threshold after it is mounted. Therefore, the operating parameters of the newly added device can be used to determine whether the newly added device is an overloaded device. When there is a new device in the server, overload detection of the new device is implemented, which not only reduces the overall operating load of the server, but also avoids the phenomenon that the new device cannot operate due to excessive load, thereby saving the server's hardware resources.
[0074] The technical solution of the embodiment of the present invention, when it is detected that there are new devices in the target device component of the server, determines whether there are redundant devices in the target device component according to the numerical relationship between the total number of new devices in the target device component and the total number of standard devices, or the numerical relationship between the total number of new devices in the target device component and the number of standard devices of the same type. Thus, when there are new devices in the server, the number of new devices is detected, which not only reduces the operating load of the server, but also avoids the waste of hardware resources and simplifies the topological structure of the server.
[0075] Embodiment 3
[0076] Figure 3 This is a flow chart of a device detection method provided in Embodiment 3 of the present invention. In this embodiment of the present invention, missing devices, redundant devices, overloaded devices and non-standard devices in the server are detected. Figure 3 As shown, the method includes:
[0077] S301. Obtain the standard address sets corresponding to each device component in the design document; and execute S302.
[0078] S302, traverse each device component to obtain the actual address set corresponding to each device component; if the actual address set of the current device component includes a transfer address, continue to obtain the device address under the transfer address until all device addresses under the transfer address are obtained, and continue to traverse other device components.
[0079] S303. Detect abnormal devices and newly added devices in the server according to the actual address set and the standard address set of each device component; if a newly added device is detected, execute S304; if an abnormal device is detected, execute S306.
[0080] S304. Determine whether the newly added device is a redundant device based on the numerical relationship between the total number of newly added devices and the total number of standard devices, or the numerical relationship between the total number of newly added devices and the number of standard devices of the same type; and execute S305.
[0081] S305. Determine whether the newly added device is an overloaded device according to the operating parameters of the newly added device; and execute S307.
[0082] S306. Obtain data communication records of the abnormal device through the central processing unit, or obtain operation status records of the abnormal device through the basic input and output system, and detect whether the abnormal device in the server is a missing device; execute S307.
[0083] S307. Obtain the canonical transfer level of each device according to the canonical address set of each device component, and obtain the actual transfer level of each device according to the actual address set of each device component; execute S308.
[0084] S308: If the actual transfer level of the target device does not match the corresponding standard transfer level, mark the target device as a non-standard device.
[0085] The technical solution of the embodiment of the present invention, after obtaining the standard address set corresponding to each device component in the design document, traverses each device component to obtain the actual address set corresponding to each device component, especially when the actual address set of the current device component includes a transfer address, continues to obtain the device address under the transfer address; and then detects abnormal devices and new devices in the server based on the actual address set and the standard address set of each device component; thereby, not only automatic detection of device information in the server is achieved, the manpower cost of device detection is saved, and the efficiency of device detection is improved, but also accurate positioning of abnormal devices and new devices is achieved, ensuring the comprehensiveness of the device detection range.
[0086] Embodiment 4
[0087] Figure 4 : is a structural block diagram of a device detection device provided by Embodiment 4 of the present invention, and the device specifically includes:
[0088] The standard address acquisition module 401 is used to acquire the standard address set corresponding to each device component in the design document;
[0089] The actual address acquisition module 402 is used to traverse each device component to obtain the actual address set corresponding to each device component; if the actual address set of the current device component includes the transfer address, continue to obtain the device address under the transfer address until all the device addresses under the transfer address are obtained, and continue to traverse other device components;
[0090] The device detection execution module 403 is used to detect abnormal devices and newly added devices in the server according to the actual address set and the standard address set of each device component.
[0091] The technical solution of the embodiment of the present invention, after obtaining the standard address set corresponding to each device component in the design document, traverses each device component to obtain the actual address set corresponding to each device component, especially when the actual address set of the current device component includes a transfer address, continues to obtain the device address under the transfer address; and then detects abnormal devices and new devices in the server based on the actual address set and the standard address set of each device component; thereby, not only automatic detection of device information in the server is achieved, the manpower cost of device detection is saved, and the efficiency of device detection is improved, but also accurate positioning of abnormal devices and new devices is achieved, ensuring the comprehensiveness of the device detection range.
[0092] Optionally, the device detection device is also used to display the topological structure of the abnormal device component based on the design document if an abnormal device component is detected in the server; to display the topological structure of the device component where the abnormal device is located based on the design document if an abnormal device is detected in the server; to update the design document according to the new device component and display the topological structure of the new device component if a new device component is detected in the server; and to update the design document according to the new device and display the topological structure of the device component where the new device is located based on the updated design document if a new device is detected in the server.
[0093] Optionally, the device detection device is also used to determine whether the new devices in the target device component are redundant devices based on the numerical relationship between the total number of new devices in the target device component and the total number of standard devices, or the numerical relationship between the total number of new devices in the target device component and the number of standard devices of the same type, if a new device is detected in the target device component.
[0094] Optionally, the device detection device is further used to determine whether the newly added device in the target device component is a redundant device according to the newly added device type of the target device component and the component type of the target device component.
[0095] Optionally, the equipment detection device is further used to determine whether the newly added equipment in the target equipment component is an overloaded equipment according to the operating parameters of the newly added equipment in the target equipment component.
[0096] Optionally, the device detection device is also used to obtain data communication records of the abnormal device through a central processing unit, or obtain operating status records of the abnormal device through a basic input and output system if an abnormal device is detected in the server; and detect whether the abnormal device in the server is a missing device through the data communication records or the operating status records.
[0097] Optionally, the device detection device is also used to obtain the standard transfer level of each device based on the standard address set of each device component, and to obtain the actual transfer level of each device based on the actual address set of each device component; if the actual transfer level of the target device does not match the corresponding standard transfer level, the target device is marked as a non-standard device.
[0098] The above device can execute the device detection method provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method. For technical details not described in detail in this embodiment, please refer to the device detection method provided by any embodiment of the present invention.
[0099] Embodiment 5
[0100] Figure 5A schematic diagram of a server 10 that can be used to implement an embodiment of the present invention is shown. The server is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The server may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0101] like Figure 5 As shown, the server 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the server 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0102] A number of components in the server 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the server 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0103] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 performs the various methods and processes described above, such as a device detection method.
[0104] In some embodiments, the device detection method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit. In some embodiments, part or all of the computer program may be loaded and / or installed on a heterogeneous hardware accelerator via a ROM and / or a communication unit. When the computer program is loaded into RAM and executed by a processor, one or more steps of the device detection method described above may be performed. Alternatively, in other embodiments, the processor may be configured to perform the device detection method in any other appropriate manner (e.g., by means of firmware).
[0105] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0106] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0107] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0108] To provide interaction with a user, the systems and techniques described herein may be implemented on a heterogeneous hardware accelerator having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and pointing device (e.g., a mouse or trackball) through which a user can provide input to the heterogeneous hardware accelerator. Other types of devices may also be used to provide interaction with a user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0109] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0110] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0111] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0112] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A device detection method, characterized in that: Baseboard management controller for servers, including: Get the standard address set corresponding to each device component in the design document; Traverse each device component to obtain the actual address set corresponding to each device component; if the actual address set of the current device component includes the transfer address, continue to obtain the device address under the transfer address until all device addresses under the transfer address are obtained, and then continue to traverse other device components; Detect abnormal and newly added devices in the server based on the actual address set and standard address set of each device component.
2. The method according to claim 1, characterized in that: After detecting abnormal devices and newly added devices in the server according to the actual address sets and the standard address sets of each device component, at least one of the following is also included: If an abnormal device component is detected in the server, the topology of the abnormal device component is displayed based on the design document; If an abnormal device is detected in the server, the topology of the device component where the abnormal device is located is displayed based on the design document; If a new device component is detected in the server, the design document is updated according to the new device component and the topology of the new device component is displayed; If a new device is detected in the server, the design document is updated according to the new device, and the topology of the device component where the new device is located is displayed based on the updated design document.
3. The method according to claim 1, characterized in that After detecting abnormal devices and newly added devices in the server based on the actual address set and the standard address set of each device component, it also includes: If it is detected that there are new devices in the target device component of the server, determine whether the new devices in the target device component are redundant devices based on the numerical relationship between the total number of new devices in the target device component and the total number of standard devices, or the numerical relationship between the total number of new devices in the target device component and the number of standard devices of the same type.
4. The method according to claim 3, characterized in that After detecting that a new device exists in the target device component of the server, the following further includes: According to the newly added device type of the target device component and the component type of the target device component, it is determined whether the newly added device in the target device component is a redundant device.
5. The method according to claim 3, characterized in that: After detecting that a new device exists in the target device component of the server, the following further includes: According to the newly added device operating parameters of the target device component, it is determined whether the newly added device in the target device component is an overloaded device.
6. The method according to claim 1, characterized in that After detecting abnormal devices and newly added devices in the server based on the actual address set and the standard address set of each device component, it also includes: If an abnormal device is detected in the server, the data communication record of the abnormal device is obtained through the central processing unit, or the operation status record of the abnormal device is obtained through the basic input and output system; Through the data communication record or the operation status record, it is detected whether the abnormal device in the server is a missing device.
7. The method according to claim 1, characterized in that After obtaining the actual address sets corresponding to each device component, it also includes: Obtaining the canonical transfer level of each device according to the canonical address set of each device component, and obtaining the actual transfer level of each device according to the actual address set of each device component; If the actual switching level of the target device does not match the corresponding standard switching level, the target device is marked as a non-standard device.
8. A device detection device, characterized in that: Baseboard management controller for servers, including: A standard address acquisition module is used to obtain the standard address set corresponding to each device component in the design document; The actual address acquisition module is used to traverse each device component to obtain the actual address set corresponding to each device component; if the actual address set of the current device component includes the transfer address, continue to obtain the device address under the transfer address until all device addresses under the transfer address are obtained, and continue to traverse other device components; The device detection execution module is used to detect abnormal devices and newly added devices in the server based on the actual address set and the standard address set of each device component.
9. A server, characterized in that: The server comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can perform the device detection method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the device detection method according to any one of claims 1 to 7 when executed.
Citation Information
Patent Citations
Method for automatically detecting system I2C address abnormity based on sequence traversal
CN112306867A
IIC topology checking method and device and storage medium
CN112596968A
System and method for automatically generating network topology based on network equipment resource discovery algorithm
CN115314392A
Network anomaly detection method and device
CN116545883A
Monitoring method and device, equipment and storage medium
CN116755961A