Link state out-of-band monitoring method and product of peripheral component interconnection high-speed link
By using natural language processing technology to perform structured processing and encoding transformation on the LTSSM logs of PCIe links, a time-series observation set is generated, which solves the problem of PCIe link status monitoring failure and achieves efficient link status monitoring.
Patent Information
- Application Number
- CN202610125279.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-29
- Publication Date
- 2026-03-06
AI Technical Summary
Due to the heterogeneity of LTSSM log formats in PCIe devices from different manufacturers, PCIe link status monitoring fails, and existing technologies cannot effectively monitor PCIe link status.
Unstructured LTSSM logs are processed using natural language processing techniques to generate structured link training state transition information. This information is then transformed according to preset encoding rules to generate a time-series observation set, which is input into a pre-trained link state monitoring model to output link state monitoring data.
The problem of LTSSM log format heterogeneity was solved, enabling effective monitoring of PCIe link status, improving monitoring accuracy and compatibility, and reducing false alarm rate.
Smart Images

Figure CN121614348A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data transmission technology, and in particular to a method and product for out-of-band monitoring of link status of a high-speed link for interconnecting peripheral components. Background Technology
[0002] As the scale of artificial intelligence models expands, multi-node computing architectures require Peripheral Component Interconnect Express (PCIe) links with high bandwidth and low latency. However, in actual operation, PCIe links are susceptible to physical layer signal quality degradation, connection instability, or device aging, leading to frequent link retraining during Link Training and Status State Machine (LTSSM). While this implicit degradation does not trigger protocol-level speed reduction or bandwidth warnings, it continuously reduces the actual communication rate.
[0003] In related technologies, the status of a PCIe link is typically monitored by parsing the LTSSM logs of the PCIe link. However, due to the heterogeneous format of LTSSM logs from different vendors' PCIe devices, the monitoring of the PCIe link status has failed. Summary of the Invention
[0004] This application provides a method and product for out-of-band monitoring of the link status of a high-speed interconnection link for peripheral components, so as to at least solve the problem of failure in monitoring the PCIe link status in related technologies.
[0005] This application provides an out-of-band monitoring method for the link status of a high-speed interconnection link of peripheral components, comprising: acquiring the link training and state machine logs of the high-speed interconnection link of peripheral components; calling a pre-trained natural language processing model to parse the link training and state machine logs and generate link training state transition information; converting the link training state transition information according to a preset encoding rule to generate a preset state transition code; generating a time-series observation set based on the link training state transition information and the preset state transition code; wherein the time-series observation set is a set of preset state transition codes sorted in chronological order; inputting the time-series observation set into a pre-trained link status monitoring model and outputting link status monitoring data.
[0006] This application also provides an out-of-band monitoring device for the link status of a high-speed interconnection link of peripheral components, comprising: an acquisition module for acquiring link training and state machine logs of the high-speed interconnection link of peripheral components; a processing module for calling a pre-trained natural language processing model to parse the link training and state machine logs and generate link training state transition information; converting the link training state transition information according to a preset encoding rule to generate a preset state transition code; generating a time-series observation set based on the link training state transition information and the preset state transition code; wherein the time-series observation set is a set of preset state transition codes sorted in chronological order; and an output module for inputting the time-series observation set into a pre-trained link status monitoring model and outputting link status monitoring data.
[0007] This application also provides an electronic device, including: a memory for storing a computer program; and a processor for executing the computer program to implement the steps of the out-of-band monitoring method for the link status of any of the above-described peripheral component interconnection high-speed links.
[0008] This application also provides a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, it implements the steps of the out-of-band monitoring method for the link status of any of the above-described peripheral component interconnection high-speed links.
[0009] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the out-of-band monitoring method for the link status of any of the above-described peripheral component interconnection high-speed links.
[0010] The out-of-band monitoring method and product for high-speed peripheral component interconnection links provided in this application, based on the acquisition of link training and state machine logs of the high-speed peripheral component interconnection links, processes the unstructured link training and state machine logs using natural language processing technology to generate structured link training state transition information; then, according to preset encoding rules, the link training state transition information is converted to generate preset state transition codes; then, the preset state transition codes are sorted according to the link training state transition information in chronological order to generate a time-series observation set, thus solving the problem of heterogeneity in the format of link training and state machine logs, providing a unified input format for subsequent steps; finally, the time-series observation set is input into a pre-trained link status monitoring model to output link status monitoring data, thus solving the problem of link status monitoring failure of high-speed peripheral component interconnection links. Attached Figure Description
[0011] To more clearly illustrate the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0012] Figure 1 This is a schematic diagram illustrating an application scenario of an out-of-band monitoring method for the link status of a high-speed interconnection link of peripheral components provided in an embodiment of this application.
[0013] Figure 2 A flowchart illustrating the out-of-band monitoring method for the high-speed interconnection link of peripheral components provided in this application embodiment. Figure 1 ;
[0014] Figure 3 A flowchart illustrating the out-of-band monitoring method for the high-speed interconnection link of peripheral components provided in this application embodiment. Figure 2 ;
[0015] Figure 4 This is a schematic diagram of the out-of-band monitoring device for the link status of a high-speed interconnection link of peripheral components provided in an embodiment of this application;
[0016] Figure 5 A schematic diagram of the structure of the electronic device provided in this application. Detailed Implementation
[0017] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of this application.
[0018] It should be noted that, in the description of this application, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. The terms "first," "second," etc., in this application are used to distinguish similar objects and are not used to describe a specific order or sequence.
[0019] As the scale of artificial intelligence models expands, multi-node computing architectures require Peripheral Component Interconnect Express (PCIe) links with high bandwidth and low latency. However, PCIe links are susceptible to physical layer signal quality degradation, connection instability, or device aging in actual operation, leading to frequent link retraining triggered by the Link Training and Status State Machine (LTSSM). While this implicit degradation does not trigger protocol-level speed reduction or bandwidth alarms, it continuously reduces the actual communication rate. Related technologies typically monitor PCIe link status by parsing the LTSSM logs. However, the heterogeneous format of LTSSM logs from different vendors' PCIe devices causes monitoring of PCIe link status to fail.
[0020] To address the aforementioned technical problems, this application proposes the following technical concept: Based on the acquired LTSSM logs of the PCIe link, the unstructured LTSSM logs are processed using natural language processing technology to generate structured link training state transition information; then, the link training state transition information is transformed according to preset encoding rules to generate preset state transition codes; then, the preset state transition codes are sorted according to the link training state transition information in chronological order to generate a time-series observation set, thus solving the problem of heterogeneity in LTSSM log formats and providing a unified input format for subsequent steps; finally, the time-series observation set is input into a pre-trained link state monitoring model to output link state monitoring data, thus solving the problem of PCIe link state monitoring failure.
[0021] To enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0022] The specific application environment architecture or specific hardware architecture on which the execution of the out-of-band monitoring method for the link status of high-speed interconnection links of peripheral components depends is described here.
[0023] refer to Figure 1 , Figure 1 This is a schematic diagram illustrating an application scenario of an out-of-band monitoring method for the link status of a high-speed interconnection link of peripheral components provided in this application embodiment.
[0024] like Figure 1As shown, the scenario includes: computer device 101, terminal device 102 and server 103. The terminal device 102 includes a baseboard management controller 1021 and a PCIe device 1022.
[0025] Specifically, PCIe device 1022 establishes a communication connection between terminal device 102 and server 103 via the PCIe bus (PCIe link). The baseboard management controller 1021 of terminal device 102 collects the LTSSM logs of the PCIe link and forwards them to computer device 101. Then, computer device 101 processes the LTSSM logs based on the out-of-band monitoring method for high-speed peripheral component interconnection links provided in this application embodiment to obtain link status monitoring data, thus solving the problem of PCIe link status monitoring failure.
[0026] Figure 2 A flowchart illustrating the out-of-band monitoring method for the high-speed interconnection link of peripheral components provided in this application embodiment. Figure 1 ,like Figure 2 As shown, embodiments of this application provide an out-of-band monitoring method for the link status of a high-speed interconnection link for peripheral components. The method is described in detail below:
[0027] Step S201: Obtain the link training and state machine logs of the high-speed interconnection link of peripheral components.
[0028] For example, the Peripheral Component Interconnect Express (PCIe) link (hereinafter referred to as PCIe link) and the Link Training and Status State Machine (LTSSM) log (hereinafter referred to as LTSSM log) are examples of different formats. The LTSSM logs of PCIe links output by PCIe devices are generally text data without a unified format specification, containing free text, non-standardized terminology, or heterogeneous formats. That is, the LTSSM log formats output by PCIe devices from different vendors differ. For example, the LTSSM logs output by vendor Factory_1's PCIe device, which contain the phrase "Link re-training triggered due to signal degradation," and the LTSSM logs output by vendor Factory_2's PCIe device, both describe the same state transition, but the text content is different.
[0029] Specifically, Switch logs and / or Retimer logs are collected based on the out-of-band interface of the baseboard management controller, and then the collected Switch logs and / or Retimer logs are parsed to obtain the LTSSM logs of the PCIe link.
[0030] The method of collecting Switch / Retimer logs based on the out-of-band interface of the baseboard management controller achieves non-intrusive monitoring without relying on the internal monitoring module of the chip. It is compatible with existing server hardware architecture and has strong scalability.
[0031] Step S202: Call the pre-trained natural language processing model to parse the link training and state machine logs and generate link training state transition information.
[0032] For example, link training state transition information is used to indicate the sequence of state changes recorded by the PCIe Link Training and State Machine (LTSSM) during operation, such as "L0→Recovery→L0". For instance, when a PCIe link triggers retraining due to signal quality degradation, the log may record a state transition of "L0→Recovery→L0". Furthermore, by inputting the LTSSM logs into a pre-trained natural language processing model for parsing, link training state transition information can be generated.
[0033] In one possible implementation, the pre-trained natural language processing model is trained on at least one of the following models: Bidirectional Encoder Representations from Transformers (BERT) and a word vector model. BERT is a pre-trained language model based on a Transformer encoder architecture that captures deep semantic relationships between words in text through bidirectional context learning and can be fine-tuned to adapt to various natural language processing tasks. For example, if the pre-trained natural language processing model is trained on both BERT and a word vector model, then the specific implementation steps of step S202 include:
[0034] Step S2021: Call the pre-trained BERT model, parse the link training and state machine logs, and generate initial link training state transition information.
[0035] For example, the pre-trained BERT model generates "L0→Recovery→L0" by identifying and parsing "Signal degradation in L0 state" in the LTSSM log.
[0036] Step S2022: Call the pre-trained word vector model to parse the link training and state machine logs and generate contextual semantic features.
[0037] For example, a pre-trained word vector model converts text into numerical vectors using word embedding techniques for semantic analysis. For instance, the Word2Vec model can be used to map "Signal degradation" and "Link re-training" into similar vectors to aid in contextual semantic analysis, thereby parsing LTSSM logs and generating contextual semantic features.
[0038] Step S2023: Correct the initial link training state transition information according to the context semantic features to generate link training state transition information.
[0039] In this embodiment, the applicability of log parsing is expanded by using BERT model fine-tuning and multimodal parsing techniques based on word vector models, thus solving the problem of insufficient compatibility of traditional log parsing methods with differences in vendor terminology. For example, the BERT model can identify undeclared state transition descriptions in logs (such as "Signal degradation in L0"), and the word vector model can map terms from different vendors to similar vectors (such as "Link re-training" and "LTSSM state transition"), thereby improving the accuracy of log parsing and cross-vendor compatibility.
[0040] In another possible implementation, the specific steps of step S202 include:
[0041] Step S202a: Match the preset regular expression with the link training and state machine logs to obtain the first link training state identifier.
[0042] For example, specific information in the LTSSM log is extracted based on predefined regular expressions, such as extracting the "L0→Recovery→L0" state transition description from the LTSSM log. Examplely, regular expressions... The log can be matched with "LTSSM state transition to Recovery". Therefore, by extracting and parsing the LTSSM log, the training state identifier of the first link can be obtained.
[0043] Step S202b: Based on the preset keyword set, extract data from the link training and state machine logs to obtain the second link training state identifier.
[0044] For example, state identifiers or transition descriptions in LTSSM logs can be identified using a predefined set of keywords, such as "L0", "Recovery", and "Signal degradation". Specifically, by detecting "Signal degradation in L0 state" in the LTSSM logs using the predefined set of keywords, the "L0→Recovery" state transition can be extracted; by extracting and parsing the LTSSM logs, the second-link training state identifier can be obtained.
[0045] Step S202c: Based on the second link training status identifier, verify and / or supplement the first link training status identifier to generate the target link training status identifier.
[0046] For example, for LTSSM log segments that are not matched by the preset regular expression, the second link training status identifier includes an incremental identifier relative to the first link training status identifier. For example, it is associated with the "Recovery" status through keywords such as "signal attenuation" and "retraining trigger"; and associated with the "L0" status through "return to active mode". The incremental identifier is then added to the first link training status identifier.
[0047] Furthermore, by comparing the first link training status identifier and the second link training status identifier, if there is a conflict (such as the preset regular expression extracting "L0" but the predefined keyword set identifying "low power state"), the first link training status identifier is corrected in conjunction with the manufacturer's terminology mapping table to ensure the accuracy of the status identifier.
[0048] Then, the first link training status identifier that has been verified and / or supplemented is determined as the target link training status identifier.
[0049] Step S202d: Based on the target link training state identifier, perform contextual semantic parsing on the link training and state machine logs to generate link training state transition information.
[0050] For example, based on the target link training state identifier, the LTSSM logs are subjected to contextual semantic parsing to perform time series coherence verification, implicit path completion, and multi-log fragment association, thereby generating link training state transition information.
[0051] Specifically, for time series coherence verification, the state transitions in the LTSSM logs are determined in chronological order based on the target link training state identifier; the logical rationality is verified based on the PCIe protocol specification, for example, exiting the L1 state must pass through the Recovery state (i.e., L1→Recovery→L0 is a reasonable path, and L1→L0 is an unreasonable path). If an unreasonable path exists, the LTSSM logs are analyzed for contextual semantics to find missing states and complete the target link training state identifier.
[0052] For implicit path completion: Based on the target link training state identifier, for LTSSM logs that only mark the start and end states (e.g., only record "entering L1" and "returning to L0", missing the Recovery state description), combined with the PCIe protocol specification verification logic, the intermediate states are completed to form a complete path (L0→L1→Recovery→L0).
[0053] For multi-log fragment association: Based on the target link training state identifier, multiple associated LTSSM log records within the same time period (such as "retraining started", "training successful", "data transmission resumed") are integrated through context semantic parsing to obtain a complete state transition link (L0→Recovery→L0).
[0054] In this embodiment, a layered parsing technique combining regular expression matching, keyword detection, and contextual semantic analysis addresses the implicit nature of state identifiers and transition descriptions in multi-vendor logs. For example, traditional methods relying solely on keyword detection may miss the implicit "L0→Recovery→L0" state transition in "Signal degradation in L0 state," while contextual semantic analysis can infer the complete path by combining the surrounding context. Furthermore, the combined use of regular expression matching and keyword detection enhances the automation of log parsing, reduces the need for manual intervention, and thus significantly improves the efficiency of standardized processing.
[0055] Step S203: According to the preset encoding rules, the link training state transition information is transformed to generate the preset state transition code.
[0056] For example, the observable states specified in the PCIe specification include L0, L0s, L1, L2, Recovery, Detect, Polling, Configuration, Disabled, Hot Reset, and Loopback. L0 indicates the working state, L0s indicates the lightweight low-power state, L1 indicates the deep low-power state, L2 indicates the standby low-power state, Recovery indicates the recovery state, Detect indicates the detection state, Polling indicates the polling state, Configuration indicates the configuration state, Disabled indicates the disabled state, Hot Reset indicates the hot reset state, and Loopback indicates the loopback state. For example, if the link training state transition information is "L0→Recovery→L0", then "L0→Recovery→L0" is converted according to preset encoding rules, that is, "L0→Recovery" and "Recovery→L0" are converted according to preset encoding rules respectively, to generate the corresponding preset state transition codes "01, 05". Some of the preset encoding rules are shown in Table 1.
[0057] Table 1
[0058]
[0059] Furthermore, in one possible implementation, step S203 includes the following specific steps:
[0060] Step S2031: The link training state transition information is split to generate multiple sub-link training state transition information.
[0061] Step S2032: Invoke the distributed stream processing engine to transform the training state transition information of each sub-link according to the preset encoding rules, and generate the sub-preset state transition code corresponding to the training state transition information of each sub-link.
[0062] For example, a distributed stream processing engine is a distributed computing framework for real-time processing of large-scale data streams. For instance, by using a distributed stream processing engine to transform the training state transition information of each sub-link according to preset encoding rules, sub-preset state transition codes corresponding to the training state transition information of each sub-link can be generated.
[0063] Step S2033: Summarize the sub-preset state transition codes corresponding to the training state transition information of each sub-link to obtain the preset state transition codes.
[0064] In this embodiment, the distributed stream processing engine parses the training state transition information of each sub-link in parallel, solving the throughput bottleneck problem of traditional single-machine processing. For example, in a thousand-node AI server cluster, the distributed architecture can ensure that the logs of each node are parsed within milliseconds, thereby achieving real-time dynamic evaluation of the entire link status.
[0065] Step S204: Generate a time-series observation set based on the link training state transition information and the preset state transition code; wherein, the time-series observation set is a set of preset state transition codes sorted in chronological order.
[0066] For example, a time series observation set is generated by sorting the preset state transition codes in chronological order according to the link training state transition information. For instance, if the preset state transition codes are "01, 05", then the time series observation set generated by sorting the preset state transition codes in chronological order according to the link training state transition information is {01, 05}.
[0067] Step S205: Input the time series observation set into the pre-trained link status monitoring model and output link status monitoring data.
[0068] For example, by calling a pre-trained link state monitoring model to parse the time series observation set, the corresponding link state monitoring data can be output. Specifically, the pre-trained link state monitoring model includes link state monitoring models trained based on long short-term memory network models, one-dimensional convolutional neural network models, Transformer models, or hidden Markov models.
[0069] In this embodiment, based on the acquired LTSSM logs of the PCIe link, the unstructured LTSSM logs are processed using natural language processing technology to generate structured link training state transition information. Then, according to preset encoding rules, the link training state transition information is transformed to generate preset state transition codes. Next, the preset state transition codes are sorted chronologically according to the link training state transition information to generate a time-series observation set, thus solving the problem of heterogeneity in LTSSM log formats and providing a unified input format for subsequent steps. Finally, the time-series observation set is input into a pre-trained link state monitoring model to output link state monitoring data, solving the problem of PCIe link state monitoring failure.
[0070] Furthermore, after generating a time-series observation set based on the link training state transition information and the preset state transition code, the method provided in this application embodiment further includes:
[0071] Step A1: Based on the time series observation set, determine the number of times the high-speed link of peripheral component interconnection switches from the first target state to the second target state.
[0072] For example, the first target state is L0, and the second target state includes Detect, Polling, and Recovery; then, based on the preset state transition code in the time series observation set, the number of transitions from L0 state to Detect, Polling, and Recovery state is determined.
[0073] Step A2: Determine the relationship between the number of handovers and the handover threshold.
[0074] For example, the switching frequency threshold can be adjusted according to the actual operating conditions.
[0075] Step A3: If the number of handovers is less than or equal to the handover threshold, then link stability information is generated.
[0076] Step A4: Send link stability information to the client to notify the user that the high-speed link connecting peripheral components is in a stable state.
[0077] Step A5: If the number of switching times exceeds the switching time threshold, check for hot-plug signals or software configuration register write records.
[0078] Step A6: If a hot-plug signal or software configuration register write record information exists, a benign trigger message is generated.
[0079] Step A7: Send benign trigger information to the client to notify the user that the state corresponding to the number of switching exceeds the switching threshold is caused by benign trigger.
[0080] In step A8, if there are no hot-plug signals and no software configuration register write records, then link instability information is generated.
[0081] Step A9: Send link instability information to the client to alert the user that the high-speed link connecting peripheral components is unstable.
[0082] In this embodiment, by combining anomaly quantification judgment and benign scenario filtering, the false alarm rate is reduced and the accuracy of link instability judgment is improved without omitting real instability issues in the PCIe link.
[0083] Furthermore, after generating a time-series observation set based on the link training state transition information and the preset state transition code, the method provided in this application embodiment further includes:
[0084] Step B1: Based on the time series observation set, determine the maximum duration for which the high-speed link of peripheral component interconnection is continuously in the third target state.
[0085] For example, the third target state is Recovery; then, based on the preset state transition code in the time series observation set, the maximum duration for which the PCIe link is continuously in the Recovery state is determined, that is, the maximum duration for which the PCIe link stays in the Recovery state once is determined.
[0086] Step B2: Determine the relationship between the maximum duration and the first duration threshold.
[0087] For example, the first duration threshold can be adjusted according to the actual working conditions.
[0088] Step B3: If the maximum duration is less than or equal to the first duration threshold, then generate normal physical layer information for the link.
[0089] Step B4: Send the link physical layer normal information to the client to notify the user that the physical layer of the high-speed link for interconnecting peripheral components is normal.
[0090] Step B5: If the maximum duration exceeds the first duration threshold, then generate link physical layer anomaly information.
[0091] Step B6: Send the link physical layer anomaly information to the client to alert the user that there is a physical layer anomaly in the high-speed link connecting peripheral components.
[0092] Furthermore, after generating a time-series observation set based on the link training state transition information and the preset state transition code, the method provided in this application embodiment further includes:
[0093] Step C1: Based on the time series observation set, determine the total number of times the high-speed link of peripheral component interconnection is in the fourth target state.
[0094] For example, the fourth target state is Detect; then, based on the preset state transition code in the time series observation set, the total number of times the PCIe link is in the Detect state under the duration corresponding to the time series observation set is determined.
[0095] Step C2: Determine the relationship between the total number of states and the total number of times threshold.
[0096] For example, the total number of times threshold can be adjusted according to the actual working conditions.
[0097] Step C3: If the total number of states is less than or equal to the total number of times threshold, then generate normal information for the physical layer of the link.
[0098] Step C4: Send the link physical layer normal information to the client to notify the user that the physical layer of the high-speed link connecting peripheral components is normal.
[0099] Step C5: If the total number of states exceeds the total number threshold, then check for hot-plug signals or software configuration register write records.
[0100] In step C6, if a hot-plug signal or software configuration register write record information exists, a benign trigger message is generated.
[0101] Step C7: Send benign trigger information to the client to indicate to the user that the state corresponding to the total number of states exceeding the total number threshold is caused by benign trigger.
[0102] In step C8, if there are no hot-plug signals and no software configuration register write records, then a link physical layer anomaly information is generated.
[0103] Step C9: Send the physical layer error information of the link to the client to notify the user of the physical layer error of the high-speed link for interconnecting peripheral components.
[0104] In this embodiment, by combining anomaly quantification and benign scenario filtering, the false alarm rate is reduced and the accuracy of link instability determination is improved without overlooking real physical layer anomalies in the PCIe link.
[0105] Figure 3 A flowchart illustrating the out-of-band monitoring method for the high-speed interconnection link of peripheral components provided in this application embodiment. Figure 2 In the embodiments of this application, in Figure 2 Based on the provided embodiments, a method for out-of-band monitoring of link status in high-speed interconnection links of peripheral components is described in detail.
[0106] like Figure 3 As shown, the pre-trained link status monitoring model is a pre-trained Hidden Markov Model (HMM). The model data of the pre-trained HMM includes a hidden state set and model parameters. The hidden state set includes multiple link states and is used to classify the link health level of high-speed links interconnecting peripheral components. For example, the hidden state set... Used for continuous subdivision of the health level of PCIe links. The numbers represent the link states of the PCIe link as healthy, slightly degraded, moderately degraded, and severely degraded, respectively. Model parameters include an initial probability distribution, a transition probability matrix between hidden states, and an observation probability matrix. The initial probability distribution indicates the probability of the high-speed peripheral component interconnect link being in its current link state upon startup. The transition probability matrix between hidden states indicates the probability of the high-speed peripheral component interconnect link transitioning from one link state to another. The observation probability matrix indicates the probability of the link training and state machine transitioning from one observable state to another within the current link state. The method includes:
[0107] Step S301: Obtain the link training and state machine logs of the high-speed interconnection link of peripheral components.
[0108] Step S302: Call the pre-trained natural language processing model to parse the link training and state machine logs and generate link training state transition information.
[0109] Step S303: According to the preset encoding rules, the link training state transition information is transformed to generate the preset state transition code.
[0110] Step S304: Generate a time-series observation set based on the link training state transition information and the preset state transition code; wherein, the time-series observation set is a set of preset state transition codes sorted in chronological order.
[0111] Step S305: Determine the observable transition states at each time point from the time series observation set.
[0112] For example, based on time sequence, each preset state transition code in the time-series observation set is determined as an observable transition state at each time point. For example, the time-series observation set... ,in, Observation symbol Indicates the first The observable transition state of a PCIe link at any given time. For example, a time-series observation set. According to Table 1, the observable transition state of the PCIe link corresponding to 01 at time 1 is L0→Recovery, the observable transition state of the PCIe link corresponding to 05 at time 2 is Recovery→L0, the observable transition state of the PCIe link corresponding to 03 at time 3 is L0→L1, the observable transition state of the PCIe link corresponding to 06 at time 4 is L1→Recovery, and the observable transition state of the PCIe link corresponding to 05 at time 5 is Recovery→L0.
[0113] Step S306: Based on each observable transition state, initial probability distribution, transition probability matrix, and observation probability matrix, perform forward calculation to obtain the maximum hidden state probability corresponding to each hidden state at each time step, and the path position corresponding to the maximum hidden state probability when in each hidden state at each time step, which is the path position of the previous time step.
[0114] For example, the initial probability distribution is defined as follows: The transition probability matrix is shown in equation (1), and the observation probability matrix is shown in equation (2).
[0115] (1)
[0116] (2)
[0117] Among them, the observation probability matrix The meanings of the rows and columns are shown in Table 2.
[0118] Table 2
[0119]
[0120] Before performing the forward computation, two symbols are first defined. Used to indicate the Always in a hidden state The probability, Used to indicate the Always in a hidden state At that moment, the previous moment The optimal state, i.e., the maximum hidden state probability corresponding to each hidden state at each time step, corresponds to the path position at the previous time step; where, based on the aforementioned set of hidden states... Definitions and examples, .
[0121] For the observable transition state "01" (L0→Recovery) at time 1, based on Calculate the hidden states at time 1. The probability is shown in equation (3).
[0122] (3)
[0123] Since there is no previous state at the initial moment, it is recorded as 0.
[0124] Regarding the first The observable transition state at time t, based on Calculate the hidden states at the corresponding time points.
[0125] To calculate the second time step For example, the hidden states at time 2 transition to The calculation process of the probability is shown in equation (4).
[0126] (4)
[0127] Take the maximum value of 0.0144 from the result of equation (4), and... Multiplying them together gives the hidden state at time step 2. The probability, i.e. The maximum value of 0.0144 comes from... Therefore .
[0128] The subsequent data processing is the same as the calculation of the second time step. The same applies, so we will not repeat it here; the maximum hidden state probability corresponding to each hidden state at each time point is shown in Table 3.
[0129] Table 3
[0130]
[0131] Table 4 shows the maximum hidden state probability corresponding to each hidden state at each time step and the corresponding path position at the previous time step.
[0132] Table 4
[0133]
[0134] Step S307: Based on the maximum hidden state probability corresponding to each hidden state at each time point and the path position of the previous time point, backtracking is performed to obtain the link state in the hidden state set corresponding to each path position.
[0135] For example, using the data shown in Tables 3 and 4, a backward backtracking is performed; for time point 5, ,Right now It is the maximum value, therefore based on Therefore, based on the index Determine the corresponding hidden state as ,Right now ,in Used to indicate the The link state in the hidden state set corresponding to the path position at a given time.
[0136] Regarding the fourth moment, Therefore, the corresponding hidden state is determined as follows. ,Right now .
[0137] Regarding the third moment, Therefore, the corresponding hidden state is determined as follows. ,Right now .
[0138] Regarding the second moment, Therefore, the corresponding hidden state is determined as follows. ,Right now .
[0139] Regarding the first moment, Therefore, the corresponding hidden state is determined as follows. ,Right now .
[0140] Step S308: Sort the link status corresponding to each path location according to the order of each time to obtain link status monitoring data.
[0141] For example, based on the link states corresponding to each path position obtained in the embodiment of step S307, the first time step is... The second moment is The third time is The fourth moment is The 5th moment is ; obtain link status monitoring data That is, the link status trend is slight degradation → maintain slight degradation → maintain slight degradation → moderate degradation → maintain moderate degradation.
[0142] In this embodiment, the hidden state sequence is obtained by backtracking based on the time-series observation set, which is the link status monitoring data. The health of the link can then be determined based on this data. For example, when the hidden state sequence contains... At that time, it is determined that the link has serious degradation. This step uses a dynamic programming algorithm to realize real-time reasoning on the health status of the PCIe link, achieving accurate identification and trend prediction of implicit degradation of the PCIe link health status.
[0143] In one possible implementation, the training process of the pre-trained Hidden Markov Model includes:
[0144] Step D1: Obtain the historical time series observation set, as well as the historical bit error rate and historical correctable error count corresponding to the observable transition states at each time point in the historical time series observation set.
[0145] Step D2: The link health levels of the high-speed interconnection links of peripheral components are classified to obtain a hidden state set; the hidden state set includes multiple link states.
[0146] For example, a hidden state set This is used to continuously subdivide the health level of PCIe links, classify the link health level of high-speed links interconnecting peripheral components, and obtain the hidden state set. The numbers represent the link status of the PCIe link as healthy, slightly degraded, moderately degraded, and severely degraded, respectively.
[0147] Step D3: Determine the original probability distribution, the transition probability matrix between the original hidden states, and the original observation probability matrix of the original Hidden Markov Model.
[0148] Step D4: For the observable transition states at each time point: Based on the historical bit error rate and historical correctable error count, match the corresponding observable transition state with multiple link states in the hidden state set to obtain the matching link state.
[0149] For example, bit error rate (abbreviated as...) Indicators) and correctable error count (abbreviated as) The correspondence between the count value and multiple link states in the hidden state set is shown in Table 5.
[0150] Table 5
[0151]
[0152] in, This represents a given threshold, which can be obtained by clustering using the K-means clustering algorithm or set based on actual working conditions; details will not be elaborated here.
[0153] Furthermore, based on the bit error rate (BER) shown in Table 5 (abbreviated as BER), Indicators) and correctable error count (abbreviated as) By matching the corresponding observable transition state with multiple link states in the hidden state set based on the historical bit error rate and historical correctable error count, the matching link state can be obtained.
[0154] Step D5: Based on the matching link states and original probability distributions corresponding to the observable transition states at each time step, train the original hidden Markov model, update the original probability distribution, the transition probability matrix between the original hidden states, and the original observation probability matrix to obtain the initial probability distribution, the transition probability matrix between the hidden states, and the observation probability matrix.
[0155] Step D6: Determine the pre-trained Hidden Markov Model based on the initial probability distribution, the transition probability matrix between hidden states, the observation probability matrix, and the set of hidden states.
[0156] Furthermore, in another possible implementation, before inputting the time-series observation set into the pre-trained Hidden Markov Model and outputting link state monitoring data, the method provided in this application embodiment further includes:
[0157] Step E1: Obtain a sliding window time series observation set with a preset duration.
[0158] For example, a sliding window time series observation set This set is for illustrative purposes only, and the data in the set is unrelated to the preset state transition codes shown in Table 1.
[0159] Step E2: Input the sliding window time series observation set into the pre-trained Hidden Markov Model and output the sliding window link state monitoring data.
[0160] Furthermore, the sliding window time series observation set Input a pre-trained Hidden Markov Model and output sliding window link state monitoring data. .
[0161] Step E3: Based on the sliding window link status monitoring data, update the transition probability matrix between hidden states to obtain the updated transition probability matrix between hidden states.
[0162] For example, the frequency of occurrence of each hidden state in the sliding window link status monitoring data: It appeared twice. It appeared twice. It appeared 6 times. Occurred 0 times; count the number of transitions between hidden states: : 1 time; : 1 time; 4 times; : 2 times; : 1 time.
[0163] Calculate the state based on equation (5) Transferred to The probability of;
[0164] (5)
[0165] Therefore, we obtain , , , , The probability of a transition that does not occur can be set to a minimum value, for example... .
[0166] The transition probability matrix between hidden states is shown in Equation (1) above.
[0167] Furthermore, based on the obtained The transition probability matrix between hidden states is updated to obtain the updated transition probability matrix between hidden states, as shown in equation (6).
[0168] (6)
[0169] Step E4: Update the pre-trained Hidden Markov Model based on the updated transition probability matrix between hidden states to obtain the updated Hidden Markov Model.
[0170] Step E5: Re-identify the updated Hidden Markov Model as a pre-trained Hidden Markov Model.
[0171] In this embodiment, the transition probability matrix of the pre-trained Hidden Markov Model is dynamically adjusted using a sliding window algorithm. For example, based on the sliding window time series observation set within the most recent time window, the state is calculated. Transferred to The probability is used to update the transition probability matrix. This step enhances the adaptability of the pre-trained Hidden Markov Model to the gradual degradation of link states through a dynamic update mechanism.
[0172] Furthermore, in another possible implementation, before inputting the time-series observation set into the pre-trained Hidden Markov Model and outputting link state monitoring data, the method provided in this application embodiment further includes:
[0173] Step F1: Obtain the bit error rate and correctable error count corresponding to the observable transition state at the first time step in the time series observation set.
[0174] Step F2: Based on the bit error rate and the correctable error count, match the observable transition state at the first moment with multiple link states in the hidden state set to obtain the link state at the first moment of the high-speed link interconnecting peripheral components.
[0175] For example, the relationship between the bit error rate and correctable error count obtained by clustering based on the K-means clustering algorithm and multiple link states in the hidden state set is shown in Table 6; Table 6 is an exemplary data example of Table 5.
[0176] Table 6
[0177]
[0178] Furthermore, the bit error rate corresponding to the observable transition state at the first moment. and The count value is 150 times / hour; therefore, based on Table 6, the downlink state at the first moment can be determined to be moderately degraded. .
[0179] Step F3: Update the observation probability matrix based on the downlink state at the first moment to obtain the updated observation probability matrix.
[0180] For example, the observation probability matrix is as shown in the aforementioned equation (2), and the meaning of the rows and columns of the observation probability matrix is shown in Table 2.
[0181] Furthermore, the adjustment logic is as follows: the closer the bit error rate and correctable error count are to the upper limit of the interval, the higher the probability that the degraded state corresponds to a "Recovery-type observation symbol"; therefore, based on the bit error rate... ,near Upper limit of the interval , The count is 150 times per hour, which is close to Upper limit of the interval Therefore, improve The probabilities corresponding to "Recovery-type observation symbols" (01, 06) are reduced from 0.7 to 0.85 and from 0.8 to 0.92. The probabilities corresponding to "non-Recovery observation symbols" (03, 05) are 0.1→0.03 and 0.1→0.02; other states , and The probability remains unchanged.
[0182] The updated observation probability matrix is then obtained as shown in equation (7).
[0183] (7)
[0184] Step F4: Update the pre-trained Hidden Markov Model based on the updated observation probability matrix to obtain the updated Hidden Markov Model.
[0185] Step F5 re-identifies the updated Hidden Markov Model as a pre-trained Hidden Markov Model.
[0186] In this embodiment, the link state of the high-speed link interconnecting peripheral components is updated at the first moment by using physical indicators (bit error rate and correctable error count). That is, the current real-time link state is updated, thereby updating the observation probability matrix of the pre-trained Hidden Markov Model, which in turn updates the pre-trained Hidden Markov Model and improves the ability of the pre-trained Hidden Markov Model to distinguish the link state.
[0187] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method.
[0188] Figure 4 This is a schematic diagram of the out-of-band monitoring device for the link status of a high-speed interconnection link of peripheral components provided in an embodiment of this application. Figure 4 As shown, embodiments of this application also provide an out-of-band monitoring device 40 for the link status of a high-speed interconnection link of peripheral components, including an acquisition module 401, a processing module 402, and an output module 403.
[0189] The acquisition module 401 is used to acquire the link training and state machine logs of the high-speed interconnection link of peripheral components.
[0190] The processing module 402 is used to call the pre-trained natural language processing model, parse the link training and state machine logs, and generate link training state transition information; convert the link training state transition information according to the preset encoding rules to generate preset state transition codes; and generate a time series observation set based on the link training state transition information and the preset state transition codes; wherein, the time series observation set is a set of preset state transition codes sorted in chronological order.
[0191] The output module 403 is used to input the time series observation set into the pre-trained link status monitoring model and output link status monitoring data.
[0192] In one possible implementation, the pre-trained link state monitoring model is a pre-trained Hidden Markov Model (HMM). The model data of the pre-trained HMM includes a hidden state set and model parameters. The hidden state set includes multiple link states, and the hidden state set is used to classify the link health level of the high-speed link interconnecting peripheral components. The model parameters include an initial probability distribution, a transition probability matrix between hidden states, and an observation probability matrix. The initial probability distribution indicates the probability of the high-speed link interconnecting peripheral components being in a link state when it is started. The transition probability matrix between hidden states indicates the probability of the high-speed link interconnecting peripheral components transitioning from one link state to another. The observation probability matrix indicates the probability of the link training and state machine transitioning from one observable state to another observable state in the link state of the high-speed link interconnecting peripheral components.
[0193] In one possible implementation, when the output module 403 inputs the time-series observation set into the pre-trained Hidden Markov Model and outputs link state monitoring data, it specifically performs the following: determining the observable transition states at each time step from the time-series observation set; performing forward calculations based on each observable transition state, initial probability distribution, transition probability matrix, and observation probability matrix to obtain the maximum hidden state probability corresponding to each hidden state at each time step, and the path position at the previous time step corresponding to the maximum hidden state probability at each time step; performing backward backtracking based on the path position at the previous time step corresponding to the maximum hidden state probability at each time step to obtain the link state in the hidden state set corresponding to each path position; and sorting the link states corresponding to each path position according to the chronological order of each time step to obtain the link state monitoring data.
[0194] In one possible implementation, before inputting the time-series observation set into the pre-trained Hidden Markov Model and outputting link state monitoring data, the output module 403 is further configured to: obtain a sliding window time-series observation set of a preset duration; input the sliding window time-series observation set into the pre-trained Hidden Markov Model and output sliding window link state monitoring data; update the transition probability matrix between hidden states based on the sliding window link state monitoring data to obtain an updated transition probability matrix between hidden states; update the pre-trained Hidden Markov Model based on the updated transition probability matrix between hidden states to obtain an updated Hidden Markov Model; and re-determine the updated Hidden Markov Model as the pre-trained Hidden Markov Model.
[0195] In one possible implementation, before inputting the time-series observation set into the pre-trained Hidden Markov Model and outputting link state monitoring data, the output module 403 is further configured to: obtain the bit error rate and correctable error count corresponding to the observable transition states at the first time step in the time-series observation set; match the observable transition states at the first time step with multiple link states in the hidden state set according to the bit error rate and correctable error count to obtain the link state of the high-speed link interconnecting peripheral components at the first time step; update the observation probability matrix according to the link state at the first time step to obtain the updated observation probability matrix; update the pre-trained Hidden Markov Model according to the updated observation probability matrix to obtain the updated Hidden Markov Model; and re-determine the updated Hidden Markov Model as the pre-trained Hidden Markov Model.
[0196] In one possible implementation, for the training process of the pre-trained Hidden Markov Model, the output module 403 is specifically used for: acquiring a historical time-series observation set, and the historical bit error rate and historical correctable error count corresponding to the observable transition states at each time step in the historical time-series observation set; classifying the link health levels of the high-speed links interconnecting peripheral components to obtain a hidden state set; wherein the hidden state set includes multiple link states; determining the original probability distribution of the original Hidden Markov Model, the transition probability matrix between the original hidden states, and the original observation probability matrix; for the observable transition states at each time step: based on the historical bit error rate and Historical correctable error counts are used to match the corresponding observable transition states with multiple link states in the hidden state set to obtain matching link states. Based on the matching link states corresponding to the observable transition states at each time step and the original probability distribution, the original Hidden Markov Model is trained. The original probability distribution, the transition probability matrix between the original hidden states, and the original observation probability matrix are updated to obtain the initial probability distribution, the transition probability matrix between the hidden states, and the observation probability matrix. Based on the initial probability distribution, the transition probability matrix between the hidden states, the observation probability matrix, and the hidden state set, the pre-trained Hidden Markov Model is determined.
[0197] In one possible implementation, when the processing module 402 calls the pre-trained natural language processing model to parse the link training and state machine logs and generate link training state transition information, it specifically performs the following steps: matching a preset regular expression with the link training and state machine logs to obtain a first link training state identifier; extracting data from the link training and state machine logs according to a preset keyword set to obtain a second link training state identifier; verifying and / or supplementing the first link training state identifier based on the second link training state identifier to generate a target link training state identifier; and performing contextual semantic parsing on the link training and state machine logs based on the target link training state identifier to generate link training state transition information.
[0198] In one possible implementation, when the processing module 402 maps the link training state transition information to generate a preset state transition code, it specifically performs the following steps: splits the link training state transition information to generate multiple sub-link training state transition information; calls the distributed stream processing engine to convert each sub-link training state transition information according to a preset encoding rule to generate a sub-preset state transition code corresponding to each sub-link training state transition information; and summarizes the sub-preset state transition codes corresponding to each sub-link training state transition information to obtain the preset state transition code.
[0199] In one possible implementation, after generating a time-series observation set based on the link training state transition information and a preset state transition code, the out-of-band monitoring device 40 for the high-speed peripheral component interconnection link is further configured to: determine the number of times the high-speed peripheral component interconnection link switches from a first target state to a second target state based on the time-series observation set; determine the relationship between the number of switches and a switch number threshold; if the number of switches is less than or equal to the switch number threshold, generate link stability information; and send the link stability information to the client to notify the user that the high-speed peripheral component interconnection link is in a stable state.
[0200] In one possible implementation, the out-of-band monitoring device 40 for the link status of the high-speed peripheral component interconnection link, which determines the relationship between the number of handovers and the handover threshold, is further configured to: if the number of handovers exceeds the handover threshold, detect whether there is a hot-plug signal or software configuration register write record information; if there is a hot-plug signal or software configuration register write record information, generate benign trigger information; send the benign trigger information to the client to indicate to the user that the state corresponding to the number of handovers exceeding the handover threshold is caused by benign triggering; if there is no hot-plug signal or software configuration register write record information, generate link instability information; send the link instability information to the client to indicate to the user that the high-speed peripheral component interconnection link is in an unstable state.
[0201] In one possible implementation, after generating a time-series observation set based on the link training state transition information and a preset state transition code, the out-of-band monitoring device 40 for the high-speed peripheral component interconnection link is further configured to: determine the maximum duration for which the high-speed peripheral component interconnection link is continuously in the third target state based on the time-series observation set; determine the relationship between the maximum duration and a first duration threshold; if the maximum duration is less than or equal to the first duration threshold, generate normal physical layer information for the link; send the normal physical layer information to the client to indicate to the user that the physical layer of the high-speed peripheral component interconnection link is normal; if the maximum duration is greater than the first duration threshold, generate abnormal physical layer information for the link; send the abnormal physical layer information to the client to indicate to the user that the physical layer of the high-speed peripheral component interconnection link is abnormal.
[0202] In one possible implementation, after generating a time-series observation set based on the link training state transition information and a preset state transition code, the out-of-band monitoring device 40 for the high-speed peripheral component interconnection link is further configured to: determine the total number of times the high-speed peripheral component interconnection link is in the fourth target state based on the time-series observation set; determine the relationship between the total number of states and the total number threshold; if the total number of states is less than or equal to the total number threshold, generate normal physical layer information for the link; send the normal physical layer information to the client to indicate to the user that the physical layer of the high-speed peripheral component interconnection link is normal; if the total number of states is greater than the total number threshold, detect whether there is a hot-plug signal or software configuration register write record information; if there is a hot-plug signal or software configuration register write record information, generate benign trigger information; send the benign trigger information to the client to indicate to the user that the state corresponding to the total number of states being greater than the total number threshold is caused by a benign trigger; if there is no hot-plug signal or software configuration register write record information, generate abnormal physical layer information for the link; send the abnormal physical layer information to the client to indicate to the user that the physical layer of the high-speed peripheral component interconnection link is abnormal.
[0203] For a description of the features of the link status out-of-band monitoring device 40 for high-speed peripheral component interconnection links, please refer to the relevant description of the corresponding embodiment of the link status out-of-band monitoring method for high-speed peripheral component interconnection links, which will not be repeated here.
[0204] Figure 5 A schematic diagram of the structure of the electronic device provided in this application. Figure 5 As shown, the electronic device 50 provided in this embodiment includes at least one processor 501 and a memory 502. Optionally, the electronic device 50 further includes a communication component 503. The processor 501, memory 502, and communication component 503 are connected via a bus.
[0205] In the specific implementation process, at least one processor 501 executes computer execution instructions stored in memory 502, causing at least one processor 501 to execute the above-described embodiment of the out-of-band monitoring method for the link status of the high-speed interconnection link of peripheral components.
[0206] The specific implementation process of processor 501 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.
[0207] In the above embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the application can be directly manifested as being executed by a hardware processor, or executed by a combination of hardware and software modules within the processor.
[0208] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device.
[0209] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.
[0210] Embodiments of this application also provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the steps in any of the above embodiments of the link status out-of-band monitoring method for high-speed interconnection of peripheral components.
[0211] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.
[0212] The embodiments of this application also provide a computer program product, which includes a computer program that, when executed by a processor, implements the steps in the embodiments of the link status out-of-band monitoring method for any of the above-described peripheral component interconnection high-speed links.
[0213] Embodiments of this application also provide another computer program product, including a non-volatile computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the steps in the embodiments of the link status out-of-band monitoring method for any of the above-described peripheral component interconnection high-speed links.
[0214] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0215] The foregoing has provided a detailed description of the out-of-band monitoring method and product for high-speed interconnection of peripheral components provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are only intended to help understand the method and core ideas of this application. It should be noted that those skilled in the art can make various improvements and modifications to this application without departing from its principles, and these improvements and modifications also fall within the protection scope of the claims of this application.
Claims
1. A method of link state out-of-band monitoring of a Peripheral Component Interconnect Express link, the method comprising: The method comprises: acquiring a link training and state machine log of a peripheral component interconnect express link; calling a pre-trained natural language processing model to parse the link training and state machine log to generate link training state transition information; converting the link training state transition information according to a preset encoding rule to generate a preset state transition encoding; generating a time sequence observation set according to the link training state transition information and the preset state transition encoding; wherein the time sequence observation set is a set of the preset state transition encoding sorted in time sequence; inputting the time sequence observation set into a pre-trained link state monitoring model to output link state monitoring data.
2. The method of link state out-of-band monitoring of a peripheral component interconnect express link of claim 1, wherein, The pre-trained link state monitoring model is a pre-trained hidden Markov model; model data of the pre-trained hidden Markov model comprises a hidden state set and model parameters; the hidden state set comprises a plurality of link states and is used for dividing a link health level of the peripheral component interconnect express link; the model parameters comprise an initial probability distribution, a transition probability matrix between hidden states and an observation probability matrix; the initial probability distribution is used for indicating a probability of a link state of the peripheral component interconnect express link when the peripheral component interconnect express link is started; and the transition probability matrix between hidden states is used for indicating a probability of transition of one link state of the peripheral component interconnect express link to another link state. The observation probability matrix is used for indicating a probability of transition of one observable state of a link training and state machine to another observable state when the peripheral component interconnect express link is in a link state.
3. The method of link state out-of-band monitoring of a peripheral component interconnect express link of claim 2, wherein, The inputting of the time sequence observation set into the pre-trained hidden Markov model to output link state monitoring data comprises: determining observable transition states at each time from the time sequence observation set; performing forward calculation according to the observable transition states, the initial probability distribution, the transition probability matrix between hidden states and the observation probability matrix to obtain a maximum hidden state probability corresponding to each hidden state at each time, a path position of a previous time corresponding to the maximum hidden state probability corresponding to each hidden state at each time; performing backward tracing according to the path position of the previous time corresponding to the maximum hidden state probability corresponding to each hidden state at each time to obtain a link state in the hidden state set corresponding to each path position; sorting the link states corresponding to each path position according to a time sequence of each time to obtain the link state monitoring data.
4. The method of link state out-of-band monitoring of a peripheral component interconnect express link of claim 2, wherein, Before the inputting of the time sequence observation set into the pre-trained hidden Markov model to output link state monitoring data, the method further comprises: acquiring a sliding window time sequence observation set of a preset time length; inputting the sliding window time sequence observation set into the pre-trained hidden Markov model to output sliding window link state monitoring data; updating the transition probability matrix between hidden states according to the sliding window link state monitoring data to obtain an updated transition probability matrix between hidden states; and According to the transition probability matrix between the updated hidden states, the pre-trained hidden Markov model is updated to obtain an updated hidden Markov model; The updated hidden Markov model is re-determined as the pre-trained hidden Markov model.
5. The method of link state out-of-band monitoring of a peripheral component interconnect express link of claim 2, wherein, Before the step of inputting the set of time series observations into the pre-trained hidden Markov model and outputting link state monitoring data, the method further comprises: Obtaining the bit error rate and the correctable error count value corresponding to the observable transition state at the first time in the set of time series observations; According to the bit error rate and the correctable error count value, the observable transition state at the first time is matched with a plurality of link states in the hidden state set to obtain the link state of the peripheral component interconnect express link at the first time; According to the link state at the first time, the observation probability matrix is updated to obtain an updated observation probability matrix; According to the updated observation probability matrix, the pre-trained hidden Markov model is updated to obtain an updated hidden Markov model; The updated hidden Markov model is re-determined as the pre-trained hidden Markov model.
6. The method of link state out-of-band monitoring of a peripheral component interconnect express link of claim 2, wherein, The training process of the pre-trained hidden Markov model comprises: Obtaining a set of historical time series observations and historical bit error rates and historical correctable error count values corresponding to observable transition states at each time in the set of historical time series observations; Dividing the link health level of the peripheral component interconnect express link to obtain a hidden state set; wherein the hidden state set comprises a plurality of link states; Determining an original probability distribution, a transition probability matrix between original hidden states, and an original observation probability matrix of an original hidden Markov model; For the observable transition state at each time: according to the historical bit error rate and the historical correctable error count value, the corresponding observable transition state is matched with a plurality of link states in the hidden state set to obtain a matched link state; According to the matched link state corresponding to the observable transition state at each time and the original probability distribution, the original hidden Markov model is trained, and the original probability distribution, the transition probability matrix between the original hidden states, and the original observation probability matrix are updated to obtain an initial probability distribution, a transition probability matrix between hidden states, and an observation probability matrix; According to the initial probability distribution, the transition probability matrix between the hidden states, the observation probability matrix, and the hidden state set, the pre-trained hidden Markov model is determined.
7. The method of link state out-of-band monitoring of a peripheral component interconnect express link of claim 1, wherein, The pre-trained natural language processing model is called to parse the link training and state machine log to generate link training state transition information, comprising: Matching a preset regular expression with the link training and state machine log to obtain a first link training state identifier; According to a preset keyword set, data is extracted from the link training and state machine log to obtain a second link training state identifier; According to the second link training state identifier, the first link training state identifier is verified and / or supplemented to generate a target link training state identifier; According to the target link training state identifier, the link training and state machine log is contextually and semantically parsed to generate the link training state transition information.
8. The method of link state out-of-band monitoring of a peripheral component interconnect express link of claim 1, wherein, The mapping of the link training state transition information to generate a preset state transition code includes: The link training state transition information is split to generate a plurality of sub-link training state transition information; A distributed stream processing engine is called to convert each sub-link training state transition information according to a preset coding rule to generate a sub-preset state transition code corresponding to each sub-link training state transition information; The sub-preset state transition codes corresponding to each sub-link training state transition information are summarized to obtain the preset state transition code.
9. The method of link state out-of-band monitoring of a peripheral component interconnect express link of any of claims 1-8, wherein, After the time series observation set is generated according to the link training state transition information and the preset state transition code, the method further includes: According to the time series observation set, the number of switches of the peripheral component interconnect express link from a first target state to a second target state is determined; The size relationship between the number of switches and a switch number threshold is determined; If the number of switches is less than or equal to the switch number threshold, link stability information is generated; The link stability information is sent to the client to prompt the user that the peripheral component interconnect express link is in a stable state.
10. The method of link state out-of-band monitoring of a peripheral component interconnect express link of claim 9, wherein, The size relationship between the number of switches and a switch number threshold is determined, and includes: If the number of switches is greater than the switch number threshold, it is detected whether there is a hot plug signal or software configuration register write record information; If there is the hot plug signal or the software configuration register write record information, benign trigger information is generated; The benign trigger information is sent to the client to prompt the user that the state corresponding to the number of switches greater than the switch number threshold is caused by a benign trigger; If there is no hot plug signal and software configuration register write record information, link instability information is generated; The link instability information is sent to the client to prompt the user that the peripheral component interconnect express link is in an unstable state.
11. The method of link state out-of-band monitoring of a peripheral component interconnect express link of any of claims 1-8, wherein, After the time series observation set is generated according to the link training state transition information and the preset state transition code, the method further includes: According to the time series observation set, the maximum duration of the peripheral component interconnect express link continuously in a third target state is determined; The size relationship between the maximum duration and a first duration threshold is determined; If the maximum duration is less than or equal to the first duration threshold, link physical layer normal information is generated; The link physical layer normal information is sent to the client to prompt the user that the physical layer of the peripheral component interconnect express link is normal; If the maximum duration is greater than the first duration threshold, link physical layer abnormal information is generated; The link physical layer abnormal information is sent to the client to prompt the user that the physical layer of the peripheral component interconnect express link is abnormal.
12. The method of link state out-of-band monitoring of a peripheral component interconnect express link of any of claims 1-8, wherein, After the time series observation set is generated according to the link training state transition information and the preset state transition code, the method further includes: determining a total number of times that the peripheral component interconnect express link is in the fourth target state according to the timing observation set; judging a size relation between the total number of times and a total number threshold value; generating link physical layer normal information if the total number of times is less than or equal to the total number threshold value; sending the link physical layer normal information to a client to prompt a user that the peripheral component interconnect express link is normal in physical layer; detecting whether there is a hot plug signal or software configuration register write record information if the total number of times is greater than the total number threshold value; generating benign trigger information if the hot plug signal or the software configuration register write record information exists; sending the benign trigger information to the client to prompt the user that the state corresponding to the total number of times greater than the total number threshold value is caused by benign trigger; generating link physical layer abnormal information if the hot plug signal and the software configuration register write record information do not exist; sending the link physical layer abnormal information to the client to prompt the user that the peripheral component interconnect express link is abnormal in physical layer.
13. An electronic device, comprising: comprising: a memory for storing a computer program; a processor for executing the computer program to implement the steps of the link state out-of-band monitoring method of the peripheral component interconnect express link according to any one of claims 1 to 12.