Link state detection method and device, electronic equipment and storage medium

By applying load pressure to the hardware of computer equipment and using BMC to access I2C bus link devices to obtain response signals, the shortcomings of existing technologies in link stability detection under varying pressure scenarios are solved, achieving efficient and accurate link status assessment and fault diagnosis, and ensuring the stable operation of the server.

CN120434154BActive Publication Date: 2025-10-17INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510932629.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-07
Publication Date
2025-10-17
Estimated Expiration
2045-07-07

AI Technical Summary

Technical Problem

Existing technologies lack effective methods for detecting link stability under varying stress scenarios, making it impossible to accurately assess the link status of computer equipment.

Method used

By applying different load pressures to the target device's hardware, the Baseboard Management Controller (BMC) sends a query command to access the link device on the I2C bus, obtains the response signal, and determines the link status based on the response signal, including the analysis of response duration, status value, and presence identifier.

Benefits of technology

It achieves efficient and accurate detection of link status under variable pressure scenarios, timely discovers potential problems, and ensures stable operation and performance optimization of the server.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120434154B_ABST
    Figure CN120434154B_ABST
Patent Text Reader

Abstract

The application discloses a link state detection method and device, electronic equipment and storage medium, and relates to the technical field of computers. The link state detection method comprises the following steps: in the process of applying different load pressures to the device hardware of a target device, a query instruction carrying address information of a link of the target device is acquired; a link device is arranged on the link and is used for monitoring the running environment state of the device hardware; further, based on the query instruction, the link device on the link is accessed, and a response signal fed back by the link device based on the link when the query instruction is received is acquired; and the link state of the link is determined through the response signal. Through the process of applying different load pressures to the device hardware of the target device, the link device on the link where the address information is located is accessed based on the query instruction, and the response signal is acquired, and then the link state of the target link can be efficiently and accurately detected based on the response signal in a variable pressure scene.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computers, and particularly relates to a link state detection method and device, electronic equipment and a storage medium. BACKGROUND

[0002] In the field of computers, the complexity of computers requires that they can monitor hardware indicators such as environmental temperature, power state, fan speed, hard disk state in real time. In the actual operation of computers, various pressure scenarios will be encountered, including but not limited to CPU (Central Processing Unit) high load, memory pressure, hard disk I / O busy, network traffic surge, etc. The stability of the link becomes particularly critical in these scenarios.

[0003] At present, when detecting the stability of the link, only a single pressure scenario is often targeted, such as fixed CPU load or constant temperature environment, and there is a lack of methods for verifying the stability of the link under variable pressure scenarios. SUMMARY

[0004] The present application provides a link state detection method to at least solve the problem of lack of effective detection of the state of the link under variable pressure scenarios in the related art.

[0005] The present application provides a link state detection method, comprising: determining a query instruction carrying address information of a link of a target device in a process of applying different load pressures to device hardware of the target device, wherein a link device for monitoring the running environment state of the device hardware is arranged on the link; accessing the link device on the link where the address information is located based on the query instruction, and obtaining a response signal fed back by the link device in response to the query instruction; and determining a link state of the link according to the response signal.

[0006] The present application also provides a link state detection device, comprising: a first determination module configured to determine a query instruction carrying address information of a link of a target device in a process of applying different load pressures to device hardware of the target device, wherein a link device for monitoring the running environment state of the device hardware is arranged on the link; an acquisition module configured to access the link device on the link where the address information is located based on the query instruction, and to obtain a response signal fed back by the link device in response to the query instruction; and a second determination module configured to determine a link state of the link according to the response signal.

[0007] The present application also provides electronic equipment, comprising: a memory configured to store a computer program; and a processor configured to implement the steps of any of the above-mentioned link state detection methods when executing the computer program.

[0008] The application further provides a computer readable storage medium, and the computer readable storage medium stores a computer program, wherein the computer program is executed by a processor to implement steps of the link state detection method.

[0009] The application further provides a computer program product, comprising a computer program, wherein the computer program is executed by a processor to implement steps of the link state detection method.

[0010] According to the application, in the process of applying different load pressures to the device hardware of the target device, a query instruction carrying address information of a link of the target device is acquired; the link is provided with a link device for monitoring a running environment state of the device hardware; that is, the determination of the link state is performed in the process of applying different load pressures, and further, based on the query instruction, the link device on the link is accessed, and a response signal fed back by the link device based on the link when the query instruction is received is acquired, and the link state of the link is determined through the response signal. Through the process of applying different load pressures to the device hardware of the target device, the link device on the link where the address information is located is accessed based on the query instruction, and the response signal is acquired, and then the link state of the target link can be efficiently and accurately detected based on the response signal in a variable pressure scenario. BRIEF DESCRIPTION OF DRAWINGS

[0011] In order to more clearly illustrate the embodiments of the application, the drawings needed in the embodiments will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the application, and other drawings can be obtained by those skilled in the art without creative labor.

[0012] Figure 1 A structural block diagram of a server of a link state detection method provided by an embodiment of the application;

[0013] Figure 2 A flowchart of a link state detection method provided by an embodiment of the application;

[0014] Figure 3 One of the structural block diagrams of the link state detection method provided by an embodiment of the application;

[0015] Figure 4 The second structural block diagram of the link state detection method provided by an embodiment of the application;

[0016] Figure 5 A flowchart of a link state detection method provided by another embodiment of the application;

[0017] Figure 6 This is a structural block diagram of a link status detection device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0018] The following will be combined with the accompanying drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0019] It should be noted that, in the description of this application, the terms "comprises," "includes," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. The terms "first," "second," etc., in this application are used to distinguish similar objects, and are not used to describe a particular order or sequence.

[0020] The link status detection method embodiment provided in the embodiments of the present application can be executed in a server or similar computing device. Specifically, the link status detection method embodiment provided in the embodiments of the present application can be executed in a BMC (Baseboard Management Controller) on a server. The BMC can be a hardware manager set up in the server. The BMC communicates with other hardware devices (such as temperature sensors, power modules, fan controllers, storage devices, etc.) through the I2C bus. In the process of applying different load pressures to the device hardware of the target device, the BMC can obtain and process the data of these hardware devices, thereby realizing the monitoring and management of the server.

[0021] refer to Figure 1 As shown in the figure, it is the hardware structure diagram of the server. Figure 1 As shown, the server may include one or more ( Figure 1 Only one is shown) a processor 102 (the processor 102 may include but is not limited to a microprocessor MCU or BMC or a programmable logic device FPGA and other processing devices) and a memory 104 for storing data. The server may also include a transmission device 106 and an input / output device 108 for communication functions. It will be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above server. Figure 1more or less components than those shown, or configured differently from those shown, as Figure 1

[0022] The memory 104 can be used to store computer programs, such as software programs of application software and modules, such as a computer program corresponding to the link state detection method in the embodiments of the present application. The processor 102 can execute various functional applications and data processing, i.e., implement the above method, by running the computer program stored in the memory 104. The memory 104 can include a high-speed random access memory, and can further include a non-volatile memory, such as one or more magnetic storage devices, flash memories, or other non-volatile solid-state memories. In some examples, the memory 104 can further include a memory remotely arranged with respect to the processor 102, which can be connected to a server through a network. Examples of the above network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.

[0023] The transmission device 106 is used to receive or send data via a network. The specific example of the above network can include a wireless network provided by a communication service provider of a server. In one example, the transmission device 106 includes a network adapter (NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet in a wireless manner.

[0024] The embodiments of the present application provide a link state detection method, which is applied to a baseboard management controller on the above server, such as Figure 2 as shown, the method comprises the following steps S202-S206:

[0025] S202, determining a query instruction carrying address information of a link of a target device in a process of applying different load pressures to device hardware of the target device, wherein the link is provided with a link device for monitoring a running environment state of the device hardware;

[0026] The target device refers to a computer device, such as a server or a terminal. In the case of the target device being a server, the device hardware can be a CPU, a memory, a hard disk, a network card, a fan, etc. Applying different load pressures to the device hardware of the target device means changing the work amount or work intensity of the device hardware in a test environment to construct a variable pressure environment.

[0027] ​It should be noted that the link of the target device can refer to an I2C (Inter- Integrated Circuit) bus (link), and the link device generally refers to various hardware components mounted on the I2C bus, such as sensors (temperature sensors, voltage sensors), controllers (fan controllers, power controllers), memories, and the like. These link devices communicate with the master controller (such as a BMC) on the I2C bus through SDA (serial data line) and SCL (serial clock line). In a server hardware monitoring system, the link device interacts with the BMC through the I2C bus and reports the operating environment state (such as temperature, voltage, fan speed, etc.) monitored by it. For the link of the target device, there is designated address information.

[0028] In some embodiments, in the process of applying different load pressures to the device hardware of the target device, the BMC can periodically send a query instruction to access the link device on the link where the address information is located, to ensure that the operating environment state of the device hardware is monitored under different load conditions. Further, the BMC analyzes the data fed back by the link device to evaluate the stability of the I2C link and the performance of the target device.

[0029] S204, accessing the link device on the link where the address information is located based on the query instruction, and obtaining a response signal fed back by the link device in response to the query instruction;

[0030] It can be understood that when the BMC queries the state of a certain link device, a query instruction can be constructed, which contains the address information of the target link device and possibly other information (such as register information, etc.). After the query instruction is constructed, the BMC sends the query instruction to the link device through the I2C bus. When the link device receives the query instruction of the BMC, the link device can read the corresponding data from the internal register and feed back these data to the BMC as the response signal through the I2C bus. The link device can also feed back the in-place identifier representing the in-place state of itself to the BMC as the response signal.

[0031] In some embodiments, when the BMC receives the response signal, the BMC can perform data checking or CRC (Cyclic Redundancy Check) processing on the response signal, to ensure that the data received by it is complete and that no error occurs in data transmission.

[0032] The step S204 has multiple implementation solutions. In an optional embodiment: the address information includes a link address and a device address; the query instruction further carries a register identifier; and the accessing a link device on a link where the address information is located and obtaining a response signal fed back by the link device in response to the query instruction include: accessing a target link device corresponding to the device address on the link where the link address is located, wherein the link device includes the target link device; and obtaining the response signal fed back by the target link device in response to the query instruction, wherein the response signal is generated by the target link device from a state value read from a register matching the register identifier.

[0033] The link address refers to an address used to identify a specific link or interface on a data transmission path, which indicates which physical bus the BMC will use to send the query instruction. There can be multiple I2C buses in a server, and each I2C bus corresponds to a unique link address.

[0034] The device address is the address of the link device on the I2C bus. Each link device has a fixed address, enabling the BMC to accurately address and communicate with a specific link device.

[0035] The query instruction not only contains the link address and the device address, but also carries the register identifier. The register identifier points to the register location inside the link device for storing and reading specific state information. For example, if the target link device is a temperature sensor, the register identifier can point to the location storing the current temperature value.

[0036] Specifically, the BMC first determines the I2C bus to be accessed according to the link address in the query instruction. Then, the device address is used to locate the target link device on this bus. This positioning process ensures that the BMC can accurately communicate with the correct link device. Next, the BMC sends the query instruction carrying the register identifier to the target link device. After receiving the instruction, the target link device accesses the corresponding register inside it according to the register identifier and reads the required state value from it. After reading the state value in the register, the target link device converts these state values into a response signal and sends it back to the BMC through the I2C bus. The response signal contains the state values pointed to by the register identifier, such as the current reading of a temperature sensor, the measurement of a voltage sensor, etc. The BMC can parse the response signal and extract the state values after receiving it.

[0037] In the above embodiment, by accessing the target link device, the response signal fed back by the target link device in response to the query instruction is obtained, and then the state value can be extracted in the subsequent process to efficiently and accurately detect the link state of the target link, which has significant significance for the maintenance, troubleshooting and performance optimization of the server.

[0038] For another optional implementation of step S204, the address information comprises a link address; and the accessing a link device on a link where the address information is located based on the query instruction and obtaining a response signal fed back by the link device in response to the query instruction comprises: accessing the link device on the link where the link address is located based on the query instruction to query the in-place status of the link device; and obtaining the response signal fed back by the link device in response to the query instruction, wherein the response signal is a signal fed back by the link device based on the in-place identifier indicated by the in-place status.

[0039] It can be understood that the BMC inquires the in-place status of the link device by constructing a query instruction. Such an instruction usually contains a link address, which is used to instruct the link device to report whether it is online or ready for communication. The BMC sends the query instruction to the link where the link address is located, and establishes communication with all link devices on the link. The in-place status inquiry of the device is used to confirm whether the device is successfully connected to the bus and can respond.

[0040] After receiving the query instruction, the link device checks the connection status of itself and the bus, and generates a response signal containing an in-place identifier. The in-place identifier can be a simple binary or numerical status indicating whether the link device is currently in place and working normally. If the link device is in place and can respond normally, a positive in-place identifier, such as a numerical value 1 or a high level of a flag bit, can be contained in the response signal; otherwise, if the device is not in place or cannot communicate normally, a negative in-place identifier, such as a numerical value 0 or a low level of a flag bit, can be contained in the response signal. After receiving the response signal, the BMC parses the in-place identifier in the response signal to determine the current status of the link device.

[0041] In the above embodiment, the in-place status of the link device is queried using the link address, and then the in-place identifier is extracted to efficiently and accurately detect the link status of the target link, which has a significant meaning for the maintenance, troubleshooting and performance optimization of the server.

[0042] S206, determining the link status of the link according to the response signal.

[0043] After the BMC sends the query instruction, it can receive the response signal from the link device. Then the BMC parses the response signal to determine the specific content in the response signal. The in-place identifier can be included in the response signal, and the register value can also be included in the response signal. Then the BMC can determine the link status based on the in-place identifier and the register value.

[0044] The steps S202-S206 described above, in the process of applying different load pressures to the device hardware of the target device, obtain a query instruction carrying address information of a link of the target device; wherein the link is provided with a link device for monitoring the running environment state of the device hardware; that is, the determination of the link state is carried out in the process of applying different load pressures, further, based on the query instruction, the link device on the link is accessed, and a response signal fed back by the link device based on the link when receiving the query instruction is obtained, and the link state of the link is determined through the response signal. By accessing the link device on the link where the address information is located based on the query instruction and obtaining the response signal in the process of applying different load pressures to the device hardware of the target device, that is, in a variable pressure environment, the link state of the target link can be efficiently and accurately detected based on the response signal.

[0045] The step S206 described above has various implementation schemes. In an optional embodiment, the response signal includes a state signal; determining the link state of the link according to the response signal includes: determining a response duration of the state signal, wherein the response duration of the state signal is determined by a first initial time and a first termination time, the first initial time is a time when the query instruction is sent, and the first termination time is a time when the state signal is received; determining the link state of the link based on the response duration of the state signal and a state value of the state signal.

[0046] It should be noted that the response duration of the state signal is realized by recording two key time points: the first initial time, that is, the time when the BMC sends the query instruction; and the first termination time, that is, the time when the BMC receives the state signal. The response duration is the time interval between the two time points. The state value of the state signal reflects the current state of the link device, such as the reading of the temperature sensor, the voltage value of the power module, etc.

[0047] Specifically, the link state of the link can be comprehensively evaluated by combining the response duration and the state value of the state signal. If the response duration exceeds the expectation, it may indicate that there is a communication delay or blockage; and the abnormality of the state value is directly related to the potential failure of the link device or the influence of environmental factors.

[0048] In some embodiments, in the high-voltage test scenario of the device, the BMC continuously sends query instructions to detect the state values of the temperature sensor, voltage sensor, and other link devices. By analyzing the response time and state value of the state signal feedback by the temperature sensor and voltage sensor, the BMC can determine whether the I2C link can still maintain good communication performance under pressure testing, and whether the link device can stably output correct state information. For example, if the response time of the temperature sensor suddenly increases significantly under high load, or the temperature reading frequently jumps, it may mean that the link or device is subject to electromagnetic interference, or signal integrity problems due to high temperature. At this time, the BMC can take measures such as adjusting communication parameters, increasing shielding measures, or reducing the workload of the server to ensure that the link state returns to normal.

[0049] In the above embodiments, by analyzing the length and state value of the response signal, the link state of the link can be more accurately evaluated, which is crucial for ensuring the stable operation of the server in complex environments.

[0050] In some example embodiments, based on the response time of the state signal and the state value of the state signal, the link state of the link is determined, including: in the case that the response time of the state signal meets a preset first time condition and the state value is in a preset state value interval, determining that the link state of the link is a stable state; in the case that the response time of the state signal does not meet the preset first time condition or the state value is not in the preset state value interval, determining that the link state of the link is a non-stable state.

[0051] To evaluate whether the response speed of the link is normal, a first time condition can be set. The first time condition is usually a reasonable time range defined by experience or link design specifications, which defines how long a link device should respond to a query instruction. The response time is obtained by calculating the time difference between sending a query instruction from the BMC and receiving a state signal. If this time difference is within the preset first time condition, it means that the response speed of the link device meets the requirements.

[0052] In addition to the response time, it is also necessary to check whether the state value in the state signal is within the preset state value interval. The state value interval can be defined according to the normal working range of the link device, to determine whether the current state of the link device is within the safe or expected range. If the state value exceeds the preset interval, it may indicate that the device has encountered problems, such as abnormal sensor readings, unstable power module voltage, etc., or problems with the link itself, such as data reading errors caused by electromagnetic interference.

[0053] Specifically, when the response time meets the preset first time condition and the state value is within the preset state value interval, the link state of the link is determined to be a stable state. This means that the link device can respond to the query in a timely manner, and the output state value is within the normal range, indicating that the link as a whole is in good condition. Conversely, if the response time exceeds the preset first time condition or the state value is not within the preset state value interval, the state of the link will be determined to be a non-stable state. This state may mean that the link device is slow to respond, or that the state value output by the link device is abnormal, indicating potential problems with the communication link or the link device itself.

[0054] In a specific application, the BMC can continuously send query instructions to collect response signals and analyze the response time and state value in real time. This process is dynamic and can adapt to changes in the link environment, such as an increase or decrease in server load, temperature fluctuations, etc. For example, if the query is for the state signal of a temperature sensor, the preset first time condition can be 10 milliseconds, and the preset state value interval can be 15°C to 45°C. If the temperature sensor responds within 8 milliseconds and reports a temperature value of 30°C, the link state will be marked as stable; but if the sensor response time is delayed to 20 milliseconds, or the temperature value is reported as 50°C, the link state will be marked as non-stable, which may trigger further fault detection and maintenance actions.

[0055] In the above embodiments, by analyzing the response time and state value of the state signal, the link state and health status of the I2C link can be evaluated in real time, which can timely discover and solve potential link problems in complex operating environments, thereby ensuring the stable operation of the server.

[0056] In some example embodiments, determining the link state of the link based on the response time of the state signal and the state value of the state signal includes: obtaining a link log from a cache of the target device, wherein the link log is used to record the link communication state of the target device during the process of applying different load pressures to the device hardware of the target device; and determining the link state of the link to be a stable state in the case that the link communication state determines that there is no link alarm, the response time meets the preset first time condition, and the state value is within the preset state value interval.

[0057] The link log is a log of the link communication state of the target device recorded during the process of applying different load pressures to the hardware of the target device. The link log can include detailed timestamps of device responses, contents of response signals, any abnormal events (such as link alarms) that occur during communication, etc. The link log can be obtained from the cache of the target device itself. Link alarms refer to errors or abnormalities that occur during communication, which can be caused by signal quality problems, device failures, damaged links, etc.

[0058] Specifically, it can be checked whether there is a link alarm in the link log. If there is a link alarm in the link log, the link may have been damaged and needs to be further investigated. Next, the response time and state value of the target device under different load pressures are evaluated. The response time meeting the preset first time condition means that the device can still respond to the query in time under load pressure, which reflects the response speed and pressure resistance of the link. The first time condition is usually a reasonable time threshold for distinguishing between normal and abnormal response speed. The state value being within the preset state value interval indicates that the output state value of the device remains within a safe and reasonable range when under pressure. The setting of the state value interval is based on the normal working range of the device, ensuring that the state of the device is at a controllable and acceptable level even in pressure testing.

[0059] It can be understood that only when there is no link alarm in the link log, the response time of the target device meets the first time condition, and the state value is within the preset interval, the link state of the link will be determined as a stable state. This means that under various hardware load pressures, the link can maintain good communication quality and device state, which is an important indicator of link health. If any condition is not met, for example, a link alarm appears in the link log, the response time exceeds the preset first time condition, or the state value deviates from the preset interval, the link will be determined as a non-stable state. This state may indicate that there is a short-term or long-term communication problem, and appropriate maintenance or troubleshooting measures need to be taken.

[0060] In the above embodiment, the link state evaluation based on the link log, response time and state value provides a more comprehensive and in-depth perspective for the hardware monitoring and maintenance of the server, which helps to discover and solve potential problems of the I2C link in a timely manner when facing a variable pressure environment, and ensures the continuous and efficient operation of the server system.

[0061] For another optional implementation of step S206, the response signal includes a present signal of the link device; determining the link state of the link according to the response signal includes: determining a response time of the present signal of the link device, wherein the response time of the present signal of the link device is determined by a second initial time and a second termination time, the second initial time is a time of sending the query instruction, and the second termination time is a time of receiving the present signal; determining the link state of the link based on the response time of the present signal of the link device and a present identification of the present signal of the link device.

[0062] The in-situ signal is a signal sent by the link device to the BMC, indicating that the link device is currently in an in-situ state and can communicate normally. When the BMC sends a query instruction carrying the link address to the link device, the time is recorded as the second initial time. Subsequently, when the in-situ signal of the link device is received, the time is recorded as the second termination time. The time difference between the two is the response duration of the in-situ signal of the link device. The response duration reflects the speed of the link device in responding to the query and is one of the key indicators of link stability. The preset second duration condition can be formulated according to the communication capability of the device, the length of the link, and environmental factors such as electromagnetic interference.

[0063] The in-situ signal contains an in-situ identifier, which can be a specific bit sequence or a preset status code, used to explicitly indicate whether the device is in-situ. If the in-situ identifier indicates that the device is in-situ, the device should be considered in-situ.

[0064] Specifically, if the response duration of the in-situ signal meets the preset second duration condition and the in-situ identifier of the in-situ signal indicates that the link device is in-situ, it can be determined that the link state of the link is a stable state. This means that the device can respond to queries in a timely manner and there is no obvious failure or delay in communication. If the response duration exceeds the preset second duration condition or the in-situ identifier indicates that the link device is not in-situ, the link state will be marked as a non-stable state. This state can mean that the device has encountered a hardware failure, link blockage, or external interference, resulting in a decline in communication performance.

[0065] In some embodiments, the BMC can continuously monitor the response duration of the in-situ signal and the in-situ identifier, especially in the case of a server under variable pressure, to ensure that potential problems can be discovered in a timely manner and appropriate measures can be taken.

[0066] In the above embodiments, by measuring the response duration of the in-situ signal of the link device and checking the in-situ identifier, the health status of the link can be effectively evaluated.

[0067] In one exemplary embodiment, based on the response duration of the in-situ signal of the link device and the in-situ identifier of the in-situ signal of the link device, the link state of the link is determined, including: in the case that the response duration of the in-situ signal of the link device meets the preset second duration condition and the in-situ identifier of the in-situ signal of the link device is the target identifier, determining that the link state of the link is a stable state; in the case that the response duration of the in-situ signal of the link device does not meet the preset second duration condition or the in-situ identifier of the in-situ signal of the link device is not the target identifier, determining that the link state of the link is a non-stable state.

[0068] The second duration condition is a preset threshold for determining whether the response duration of the link device is within an acceptable range. The condition is established based on the communication performance of the device, the length of the link, environmental factors, and the like, to ensure that the link device can respond within a reasonable time. The in-bit identifier included in the in-bit signal is used to confirm whether the link device is online. The target identifier is a specific value or pattern indicating that the link device is online and ready for communication. If the target identifier included in the in-bit signal matches the preset value, the device is considered online.

[0069] When the response duration of the in-bit signal of the link device meets the second duration condition, and the in-bit identifier of the in-bit signal is the target identifier, the link state is determined to be stable. This means that the link device is online, the response speed is fast, the link communication is good, and there is no obvious performance degradation or communication obstacle. If the response duration of the in-bit signal exceeds the second duration condition, or the in-bit identifier in the signal is not the target identifier, the link state will be determined to be unstable.

[0070] In the above embodiments, by monitoring the response duration of the in-bit signal and checking the in-bit identifier, the link state of the link can be quickly fed back, helping administrators to discover problems and take measures in a timely manner during server operation, and to avoid potential system failures.

[0071] In one example embodiment, based on the response duration of the in-bit signal of the link device and the in-bit identifier of the in-bit signal of the link device, the link state of the link is determined, including: obtaining a link log from a cache of a target device, wherein the link log is used to record the link communication state of the target device during the process of applying different load pressures to the device hardware of the target device; and determining the link state of the link to be stable when it is determined through the link log that there is no link alarm, the response duration of the in-bit signal of the link device meets the preset second duration condition, and the in-bit identifier of the in-bit signal of the link device is the target identifier.

[0072] Specifically, the BMC can confirm, by analyzing the link log, whether the link itself has recorded any alarm during the process of applying various load pressures. Link alarms can include communication abnormalities, device offline, packet errors, and the like, which are direct manifestations of poor link stability. Secondly, check whether the on-site signal response time of the link device meets the preset second time length condition. Thirdly, confirm whether the on-site identifier in the on-site signal of the link device is the target identifier. When the above three conditions are met, i.e., no link alarm is recorded in the link log, the response time of all on-site signals is within the preset second time length condition, and the on-site identifier each time is consistent with the target identifier, it can be determined that the link state of the link is stable. This means that although the server is subjected to various stress tests, the I2C link device can still maintain good communication ability and stable online state, and no abnormal situation affecting the stability of the link occurs.

[0073] In the above embodiment, through the acquisition and analysis of the link log, the evaluation of the response time, and the consistency check of the on-site identifier, the stability of the I2C link when the server is subjected to variable pressure can be judged in a more detailed and comprehensive manner, thereby ensuring the healthy operation and high performance of the server.

[0074] In one exemplary embodiment, before accessing the link device on the link where the address information is located based on the query instruction, the method further comprises: in the case where the device hardware comprises a processor, determining a first processor command for applying a first load pressure to the processor, wherein the first processor command is used to indicate a first core number of processor cores of the processor and a first test time length; in the case where the first load pressure of the first core number and the first test time length has been applied to the processor, determining a second processor command for applying a second load pressure to the processor, wherein the second processor command is used to indicate a second core number of processor cores of the processor and a second test time length.

[0075] Wherein, in the case where the device hardware comprises a processor (CPU), a first processor command needs to be determined, which is used to apply a first load pressure to the processor. The size of the first load pressure is determined by two parameters, i.e., the first core number (i.e., the number of processor cores participating in operation) and the first test time length (the time of continuously applying load). Generally, the selection of the first core number and the first test time length will be based on the benchmark performance of the device and the pre-test condition. For example, if the processor has 8 cores, the first core number can be set to half, i.e., 4 cores, and the first test time length can be set to 30 minutes. In this way, the influence of the processor running in a half-load state on the access to the link device can be tested first.

[0076] By executing the first processor command, a load is applied to a specified number of cores, which run intensive computing tasks, simulating the load pressure in an actual working scenario.

[0077] After the first load pressure test is completed and the processor has been subjected to the first load pressure of the first number of cores and the first test duration, a second processor command is further determined for applying a higher degree of load pressure to the processor. The second load pressure is also defined by a second number of cores and a second test duration.

[0078] Compared with the first load pressure, the second number of cores and the second test duration can be set higher. For example, the second number of cores can be set to the total number of cores of the processor, i.e., 8 cores are all involved, and the second test duration can last for 1 hour, to further test the stability of the processor under full load conditions. The second processor command is executed to put all the cores of the processor into a high load state and run tasks with high computing intensity, to evaluate the performance of the processor under maximum stress, while observing whether the access of the link device is affected.

[0079] While or after the load pressure is applied to the processor, the BMC issues a query instruction to access the link device on the I2C link or other link, to evaluate the communication state and performance of the link device under different pressures of the processor. By analyzing the access results of the link device, such as response duration, in-place identification, and link log, it can be determined whether the load pressure of the processor has a negative impact on the communication of the link device.

[0080] In the above embodiment, by determining and executing processor commands under different load pressures, combined with the access test of the link device, the overall performance of the server hardware and the communication stability of the link device under variable pressure environments can be evaluated and optimized.

[0081] In an exemplary embodiment, before the link state detection method accesses the link device on the link based on the address information of the query instruction, the link state detection method further comprises: in the case that the device hardware comprises a memory, determining a first memory command for applying a third load pressure to the memory, wherein the first memory command is used to indicate a first memory capacity of the memory and a first test number of turns; and in the case that the third load pressure of the first memory capacity and the first test number of turns has been applied to the memory, determining a second memory command for applying a fourth load pressure to the memory, wherein the second memory command is used to indicate a second memory capacity of the memory and a second test number of turns.

[0082] In the case that the device hardware comprises a memory, a first memory command for applying a third load pressure to the memory can be determined. The parameters of this command include a first memory capacity and a first test number of turns.

[0083] The first memory capacity refers to the occupied memory amount, which is used to simulate the large memory consumption scenario in actual applications. For example, if the server has a total of 32GB of memory, the first memory capacity can be set to occupy 50% of the total memory, i.e., 16GB, to test the stability and performance under large memory usage. The first test number of rounds indicates the number of repeated memory read-write operations under the specified memory capacity. The more the number of rounds, the greater the load pressure on the memory. For example, the first test number of rounds can be set to 10 rounds, meaning that 10 complete memory read-write cycles are performed while occupying 16GB of memory.

[0084] Specifically, after determining the first memory command, execution begins, i.e., continuous read-write requests are sent to the specified memory capacity until the first test number of rounds of requests is completed. This process simulates the memory usage state of the server under intensive applications or high-concurrency request scenarios. After the memory has completed the third load pressure test, a second memory command for applying a fourth load pressure to the memory is determined next. For example, the second memory capacity can be set to 24GB, and the second test number of rounds can be set to 5 rounds, meaning that 5 complete memory read-write cycles are performed while occupying 24GB of memory.

[0085] In the above embodiments, by determining and executing memory commands under different load pressures, combined with access testing of the link device, the overall performance of the server hardware and the communication stability of the link device under variable pressure environments can be evaluated and optimized.

[0086] In one example embodiment, the method of detecting the link state further comprises: in the case that the response signals generated by the state values are multiple, determining the state value difference of any two response signals in the multiple response signals; in the case that the state value differences of any two response signals are all less than the error threshold, determining that the link state of the link is a stable state; in the case that there are any two response signals in the multiple response signals whose state value difference is greater than the error threshold, determining that the link state of the link is an unstable state.

[0087] It can be understood that after continuously or periodically sending a state query instruction to the link device, the device will return a response signal. The state value of the response signal can be an actual value representing the temperature, voltage, operating state, etc. of the device. The error threshold is a preset value used to determine whether the state value difference is within an acceptable range. This threshold needs to be determined according to the actual application scenario and device specifications to reflect normal device state fluctuations.

[0088] Specifically, the BMC can obtain multiple response signals. This can be the result of sending a query instruction multiple times in succession in a short period of time, or the result of sending a query instruction to multiple link devices. Further, the state values in the collected multiple response signals are compared pairwise, and the state value difference of any two response signals is calculated. The state value difference reflects the amount of change in the running state of the link device at different time points or between different queries, and is a key indicator for evaluating link stability. If all calculated state value differences are less than the error threshold, it means that in the continuous query process, the link is stable when processing these queries, and the interference or noise level in the communication process is low. If there is a state value difference greater than the error threshold between any two response signals, it indicates that it may be caused by transient problems in link communication, device failure or external environmental factors. Therefore, the link is considered to be in a non-stable state, and there may be a high bit error rate, communication delay or communication error between devices.

[0089] In the above embodiments, by calculating the difference of the state values in the response signals and comparing them with the error threshold, the stability of the I2C link or other communication link can be effectively evaluated. This method is simple and effective, and provides strong technical support for automated monitoring and diagnosis of server hardware problems.

[0090] The above-described embodiments are only part of the embodiments of the present application, not all. In order to better understand the above method, the above process is described below in combination with the embodiments, but not used to limit the technical solutions of the embodiments of the present application, specifically:

[0091] The present application provides a link state detection method, creates a stress test environment, and continuously polls each link device whether it is in place and the value of the corresponding register under a single process or multiple processes of BMC during the stress test, judges whether there is an exception in the returned data, and whether there is an error in various logs, in order to prove whether the high-frequency electromagnetic interference that the CPU, memory, hard disk may produce under high load will cause the I2C communication bit error rate to rise, that is, the link is unstable, and whether the power voltage fluctuation or ripple noise will be triggered in the pressure test, thereby causing the I2C device (such as a temperature sensor) to occasionally fail to communicate, etc.

[0092] Among them, the reference Figure 3As shown, the present application consists of three modules, which are environment building, stress testing and link state detection. The environment building refers to the collocation of server components and tools used for testing, etc. The implementation of stress testing is mainly carried out under the Linux system of the server, which involves the stress testing of various components, including but not limited to CPU / Memory / network card / hard disk / fan, etc. The implementation of link state detection is based on BMC, which uses I2C tools to query the state value and in-place identification of link devices, and also queries the link log to further confirm whether there are abnormal reports in the test.

[0093] Specifically, the environment building considers two aspects, one is the selection of components, and the other is the selection of testing tools. The component selection includes CPU / full-configuration memory / network card / NVME SSD (hard disk), etc., which can cover all physical slots on the server. The Linux system can select CentOS (an open source operating system based on Linux) and Red Hat system, etc. For tools, stress-ng (stress testing tool) is used to form load for CPU, memtester (memory testing tool) is used to pressurize memory, fio (hard disk testing tool) is used to pressurize hard disk, iperf (network card testing tool) is used to pressurize network card, and temperature simulation is realized by controlling the speed of server fan.

[0094] When performing stress testing, the devices can be expanded respectively according to hardware, as shown in Figure 4 which is a schematic diagram of stress testing of CPU, memory, network card, hard disk and other components (such as fan, etc.) respectively. Specifically, the stress testing module is mainly for stress testing under the Linux system. The stress testing mainly includes CPU stress testing / memory stress testing / network card stress testing / hard disk stress testing / fan speed adjustment. If other components are included, they can also be added to the stress testing queue. The stress design idea is as follows:

[0095] For CPU stress test: the stress test command mainly indicates the following parameters: cpucore (processor core) number, timeout (test duration). Among them, the cpucore number and the test duration are variables, the cpucore number is any percentage between 0%-100% of the total core number, and the obtained core number should be an integer, so the value formula can be cpucore number=int(total core number*percentage), and the test duration is recommended to be between 1-2h to avoid the overall test duration. For memory stress test: the stress test command mainly indicates the following parameters: test memory capacity, test number of circles. Test memory capacity and test number of circles are variables. Test memory capacity is taken between 0%-100% of the total memory capacity, with a value span of 10%, for example, 10% / 20% / 50% / 100% can be taken, so the value formula can be test memory capacity=int(total memory capacity*percentage), and the test number of circles is between 5-10 for each test. For network card stress test, another server can be used for testing, and the network card of the machine needs to be directly connected through a network cable for testing. The test method is as follows: the execution machine runs iperf-s-b execution machine network port IP, the -b option is usually used to specify the sending data rate, and iperf-s indicates that this command starts the iperf server on the execution machine, waiting for a test connection from the test machine. The test machine runs the following command: iperf-c execution machine network port IP: This command starts the iperf client on the test machine, and further runs the following command: -P4-t3600, wherein -P4-t3600: These two parameters are used to control the number of concurrent connections and the test duration, respectively. Hard disk stress test is completed by using fio tool, and fio stress test is performed on each NVME SSD. Temperature simulation is achieved by controlling fan speed. During the server whole machine stress test, the server fan speed can be controlled to make the server component temperature rise or fall quickly. The fan speed value will be taken as a gradient of 10%, and will be randomly taken before 0-100%.

[0096] For link state detection, the I2C command running under the BMC, i.e. the query command, captures the link device in place and the register value. Regarding monitoring under the BMC, first, the I2C address (address information) needs to be understood. The I2C address on the server can be obtained in the following two ways: first, check the technical document or data manual of the component, which usually clearly indicates its default I2C address; if the document is not clear, refer to the I2C bus layout diagram of the server motherboard to confirm the specific bus mounted by the component.

[0097] Under the system of BMC, all buses can be listed by i2cdetect-l (a command line tool for listing all available I2C buses), the I2C address of the device to be tested is found by checking the manual or bus layout, and then i2cdetect-y<link address> is used to return the on-site situation of all link devices on the bus. The register value of a specified temperature sensing sensor can also be read by i2cget-y<bus address (i.e. link address)><device address><register identifier>.

[0098] Specifically, in one aspect, the on-site situation of the link device can be continuously queried in a time interval under the condition of performing stress testing, and conditions are set to judge whether the device will be lost and whether the command return time is within the specified time; on the other hand, referring to the figure, under the condition of performing stress testing, a query instruction can be sent to the link device, and the link state is determined based on the state signal fed back by the link device, and the specific steps include: Figure 5

[0099] S502: Determine the response time of the state signal, judge whether the response time exceeds the time threshold, if yes, go to S504; if no, go to S506; S504, abnormal analysis; S506: Determine the state value of the state signal, judge whether the state value is abnormal, i.e. whether it is consistent with the current stress scenario (whether the value is within the preset range), if not within the preset range, go to S504; if within the preset range, go to S508; S508, view the link log and analyze whether there is a link alarm, if yes, go to S504, if no, end the process.

[0100] The link state detection method provided in the application can verify the I2C link stability under the variable stress environment of the server, avoid abnormal problems from flowing out to affect the normal operation of the server, and further improve the reliability of the server.

[0101] Through the description of the above implementation, those skilled in the art can clearly understand that the method according to the above embodiment can be realized by means of software and necessary general hardware platform, of course, it can also be realized by hardware, but in many cases the former is a better implementation.

[0102] The embodiments of the application also provide a link state detection device for implementing the above embodiments and preferred embodiments, which have been described. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the modules described in the following embodiments are preferably implemented in software, hardware or a combination of software and hardware is also possible and is contemplated.

[0103] Figure 6 ​is a structural block diagram of link state detection according to an embodiment of the present application, and the device comprises:

[0104] The first determination module 602 is configured to determine a query instruction carrying address information of a link of a target device in a process of applying different load pressures to device hardware of the target device, wherein a link device for monitoring a running environment state of the device hardware is arranged on the link.

[0105] The acquisition module 604 is configured to access the link device on the link where the address information is located based on the query instruction, and acquire a response signal fed back by the link device in response to the query instruction.

[0106] The second determination module 606 is configured to determine a link state of the link according to the response signal.

[0107] Through the above device, the query instruction carrying the address information of the link of the target device is acquired in the process of applying different load pressures to the device hardware of the target device, wherein the link device for monitoring the running environment state of the device hardware is arranged on the link. That is, the determination of the link state is performed in the process of applying different load pressures, and further, based on the query instruction, the link device on the link is accessed, and the response signal fed back by the link device based on the link upon receiving the query instruction is acquired, and the link state of the link is determined through the response signal. Through the process of applying different load pressures to the device hardware of the target device, that is, in the variable pressure environment, the link device on the link where the address information is located is accessed based on the query instruction, and the response signal is acquired, and then based on the response signal, the link state of the target link can be efficiently and accurately detected.

[0108] In one exemplary embodiment, the address information comprises a link address and a device address, the query instruction further carries a register identifier, the acquisition module 604 is further configured to access a target link device corresponding to the device address on the link where the link address is located, wherein the link device comprises the target link device, and acquire a response signal fed back by the target link device in response to the query instruction, wherein the response signal is generated by the target link device from a state value of a register matched with the register identifier.

[0109] In an example embodiment, the response signal comprises a status signal; the second determining module 606 is further configured to determine a response duration of the status signal, wherein the response duration of the status signal is determined by a first initial time and a first termination time, the first initial time is a time when the query instruction is sent, and the first termination time is a time when the status signal is received; and determine the link state of the link based on the response duration of the status signal and a status value of the status signal.

[0110] In an example embodiment, the second determining module 606 is further configured to determine that the link state of the link is a stable state when the response duration of the status signal satisfies a preset first duration condition and the status value is in a preset status value interval; and determine that the link state of the link is a non-stable state when the response duration of the status signal does not satisfy the preset first duration condition or the status value is not in the preset status value interval.

[0111] In an example embodiment, the second determining module 606 is further configured to obtain a link log from a cache of the target device, wherein the link log is used to record a link communication state of the target device in a process of applying different load pressures to device hardware of the target device; and determine that the link state of the link is a stable state when it is determined through the link communication state that there is no link alarm of the link, the response duration satisfies the preset first duration condition, and the status value is in the preset status value interval.

[0112] In an example embodiment, the address information comprises a link address; and the obtaining module 604 is further configured to access a link device on a link where the link address is located based on the query instruction to query an in-place status of the link device; and obtain a response signal fed back by the link device in response to the query instruction, wherein the response signal is a signal fed back by the link device based on an in-place identifier indicated by the in-place status.

[0113] In an example embodiment, the response signal comprises an in-place signal of the link device; and the second determining module 606 is further configured to determine a response duration of the in-place signal of the link device, wherein the response duration of the in-place signal of the link device is determined by a second initial time and a second termination time, the second initial time is a time when the query instruction is sent, and the second termination time is a time when the in-place signal is received; and determine the link state of the link based on the response duration of the in-place signal of the link device and an in-place identifier of the in-place signal of the link device.

[0114] In an example embodiment, the second determining module 606 is further configured to determine that the link state of the link is a stable state when the response duration of the on-line signal of the link device satisfies a preset second duration condition and the on-line identification of the on-line signal of the link device is the target identification; and determine that the link state of the link is a non-stable state when the response duration of the on-line signal of the link device does not satisfy the preset second duration condition or the on-line identification of the on-line signal of the link device is not the target identification.

[0115] In an example embodiment, the second determining module 606 is further configured to acquire a link log from the cache of the target device, wherein the link log is used to record the link communication state of the target device in a process of applying different load pressures to the device hardware of the target device; and determine that the link state of the link is a stable state when it is determined from the link log that there is no link alarm in the link, the response duration of the on-line signal of the link device satisfies a preset second duration condition, and the on-line identification of the on-line signal of the link device is the target identification.

[0116] In an example embodiment, the apparatus further comprises a pressurizing module, wherein the pressurizing module is configured to determine a first processor command for applying a first load pressure to a processor when the device hardware comprises the processor, wherein the first processor command is used to indicate a first core number of processor cores of the processor and a first test duration; and determine a second processor command for applying a second load pressure to the processor when the first load pressure has been applied to the processor for the first core number and the first test duration, wherein the second processor command is used to indicate a second core number of processor cores of the processor and a second test duration.

[0117] In an example embodiment, the pressurizing module is further configured to determine a first memory command for applying a third load pressure to a memory when the device hardware comprises the memory, wherein the first memory command is used to indicate a first memory capacity of the memory and a first test number of circles; and determine a second memory command for applying a fourth load pressure to the memory when the third load pressure has been applied to the memory for the first memory capacity and the first test number of circles, wherein the second memory command is used to indicate a second memory capacity of the memory and a second test number of circles.

[0118] In an example embodiment, the second determining module 606 is further configured to, in a case where the response signals generated by the state values are multiple, determine a state value difference between any two of the multiple response signals; in a case where the state value difference between any two of the multiple response signals is less than the error threshold, determine that the link state of the link is a stable state; and in a case where the state value difference between any two of the multiple response signals is greater than the error threshold, determine that the link state of the link is an unstable state.

[0119] The features of the embodiments of the link state detection apparatus can be understood with reference to the related descriptions of the embodiments of the link state detection method, which will not be repeated here.

[0120] The embodiments of the present application further provide an electronic device, which comprises a memory and a processor, the memory stores a computer program, and the processor is configured to execute the computer program to perform the steps in any of the above-mentioned embodiments of the link state detection method.

[0121] The embodiments of the present application further provide a computer readable storage medium, which stores a computer program, wherein the computer program is configured to perform the steps in any of the above-mentioned embodiments of the link state detection method when executed.

[0122] In an example embodiment, the above-mentioned computer readable storage medium can include, but is not limited to, a U disk, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and various media that can store computer programs.

[0123] The embodiments of the present application further provide a computer program product, which comprises a computer program, and the computer program is executed by a processor to implement the steps in any of the above-mentioned embodiments of the link state detection method.

[0124] The embodiments of the present application further provide another computer program product, which comprises a non-volatile computer readable storage medium, and the non-volatile computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the steps in any of the above-mentioned embodiments of the link state detection method.

[0125] Those skilled in the art will further realize that the mere concepts, teachings, and embodiments described herein are merely meant to provide an enabling description of the applications and are not intended to limit the scope of the applications. Therefore, embodiments or examples described herein are not meant to be limiting, but merely to aid in the understanding of the overall more complete disclosure of the applications. Accordingly, those skilled in the art will recognize that modifications and variations of the described implementations can be made without departing from the spirit or scope of the applications. Therefore, it is intended that such modifications and variations be included within the scope of the applications.

[0126] The above has carried out detailed introduction to the link state detection method provided by the application. The principle and implementation mode of the application are described by applying specific examples in the text. The above example description is only for helping to understand the method and core idea of the application. It should be pointed out that, for the ordinary skilled in the art, some improvements and modifications can be made to the application without departing from the principle of the application, and these improvements and modifications also fall within the protection scope of the claims of the application.

Claims

1. A link status detection method, characterized in that: The method comprises: In a process of applying different load pressures to device hardware of a target device, determining a query instruction carrying address information of a link of the target device, wherein a link device for monitoring an operating environment status of the device hardware is provided on the link; the address information includes a link address and a device address; and the query instruction further carries a register identifier; Based on the query instruction, access the target link device corresponding to the device address on the link where the link address is located multiple times, and obtain response signals fed back by the target link device in response to the query instruction multiple times; wherein the link device includes the target link device; the response signal is generated by the state value read by the target link device from the register matching the register identifier; determining a link state of the link according to the response signal; The determining the link status of the link according to the response signal includes: In a case where there are multiple response signals generated by the state value, determining a state value difference between any two response signals among the multiple response signals, and in a case where the state value difference between any two response signals is less than an error threshold, determining that the link state of the link is a stable state; and in a case where the state value difference between any two response signals among the multiple response signals is greater than the error threshold, determining that the link state of the link is an unstable state; In the case where the response signal generated by the status value includes a status signal, the response duration of the status signal is determined, wherein the response duration of the status signal is determined by a first initial moment and a first termination moment, the first initial moment is the moment when the query instruction is sent, and the first termination moment is the moment when the status signal is received; based on the response duration of the status signal and the status value of the status signal, the link status of the link is determined.

2. The method according to claim 1, characterized in that The determining the link status of the link based on the response duration of the status signal and the status value of the status signal includes: When the response duration of the status signal satisfies a preset first duration condition and the status value is within a preset status value interval, determining that the link status of the link is a stable state; When the response duration of the status signal does not meet a preset first duration condition, or the status value is not within a preset status value interval, it is determined that the link status of the link is an unstable state.

3. The method according to claim 1, characterized in that The determining the link status of the link based on the response duration of the status signal and the status value of the status signal includes: Obtaining a link log from a cache of the target device, wherein the link log is used to record a link communication state of the target device during a process of applying different load pressures to the device hardware of the target device; When it is determined through the link communication status that there is no link alarm on the link, the response duration meets the preset first duration condition, and the status value is in a preset status value range, the link status of the link is determined to be a stable state.

4. The method according to claim 1, wherein The address information includes a link address; the method further includes: Accessing a link device on the link where the link address is located based on the query instruction to query the in-place status of the link device; Acquire a response signal fed back by the link device in response to the query instruction, wherein the response signal is a signal fed back by the link device based on an in-place identifier indicated by the in-place state.

5. The method according to claim 1, characterized in that The response signal includes a presence signal of the link device; and determining the link status of the link according to the response signal includes: Determining a response duration of a presence signal of the link device, wherein the response duration of the presence signal of the link device is determined by a second initial time and a second end time, the second initial time being a time when the query instruction is sent, and the second end time being a time when the presence signal is received; The link status of the link is determined based on the response duration of the presence signal of the link device and the presence flag of the presence signal of the link device.

6. The method according to claim 5, characterized in that The determining the link status of the link based on the response duration of the presence signal of the link device and the presence flag of the presence signal of the link device includes: When the response duration of the presence signal of the link device satisfies a preset second duration condition and the presence identifier of the presence signal of the link device is a target identifier, determining that the link state of the link is a stable state; When the response duration of the presence signal of the link device does not meet the preset second duration condition, or the presence identifier of the presence signal of the link device is not a target identifier, it is determined that the link state of the link is an unstable state.

7. The method according to claim 5, characterized in that The determining the link status of the link based on the response duration of the presence signal of the link device and the presence flag of the presence signal of the link device includes: Obtaining a link log from a cache of the target device, wherein the link log is used to record a link communication state of the target device during a process of applying different load pressures to the device hardware of the target device; When it is determined through the link log that there is no link alarm on the link, the response duration of the on-site signal of the link device meets the preset second duration condition, and the on-site identifier of the on-site signal of the link device is the target identifier, the link state of the link is determined to be a stable state.

8. The method according to claim 1, characterized in that Before accessing the target link device corresponding to the device address on the link where the link address is located multiple times based on the query instruction, the method further includes: In a case where the device hardware includes a processor, determining a first processor command for applying a first load pressure to the processor, wherein the first processor command is used to indicate a first core number and a first test duration of processor cores of the processor; When the first load pressure of the first core number and the first test duration has been applied to the processor, a second processor command for applying a second load pressure to the processor is determined, wherein the second processor command is used to indicate a second core number and a second test duration of the processor cores of the processor.

9. The method according to claim 1, characterized in that Before accessing the target link device corresponding to the device address on the link where the link address is located multiple times based on the query instruction, the method further includes: In a case where the device hardware includes a memory, determining a first memory command for applying a third load pressure to the memory, wherein the first memory command is used to indicate a first memory capacity and a first number of test cycles of the memory; When the third load pressure of the first memory capacity and the first test laps has been applied to the memory, a second memory command for applying a fourth load pressure to the memory is determined, wherein the second memory command is used to indicate a second memory capacity and a second test laps of the memory.

10. A link status detection device, characterized in that: include: A first determining module is configured to determine, during a process of applying different load pressures to device hardware of a target device, a query instruction carrying address information of a link of the target device, wherein the link is provided with a link device for monitoring an operating environment status of the device hardware; the address information includes a link address and a device address; and the query instruction further carries a register identifier; an acquisition module, configured to access a target link device corresponding to the device address on the link where the link address is located multiple times based on the query instruction, and acquire response signals fed back by the target link device multiple times in response to the query instruction; wherein the link device includes the target link device; and the response signal is generated by a status value read by the target link device from a register matching the register identifier; The second determination module is used to determine the difference in status values ​​of any two response signals among the multiple response signals when there are multiple response signals generated by the status value, and determine that the link status of the link is a stable state when the difference in status values ​​of any two response signals is less than an error threshold; determine that the link status of the link is an unstable state when the difference in status values ​​of any two response signals among the multiple response signals is greater than an error threshold, and determine the response duration of the status signal when the response signal generated by the status value includes a status signal, wherein the response duration of the status signal is determined by a first initial moment and a first termination moment, the first initial moment being the moment when the query instruction is sent, and the first termination moment being the moment when the status signal is received; and determine the link status of the link based on the response duration of the status signal and the status value of the status signal.

11. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the link status detection method according to any one of claims 1 to 9 when executing the computer program.

12. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps of the link status detection method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Hard disk test method and device, server and storage medium

    CN112416670A

  • Network card test method, device, equipment and medium

    CN119172278A

  • Link test method, electronic device, storage medium, product and computing device

    CN119473744A