Network diagnostic methods, devices, equipment, and media based on predictive session preloading
By acquiring and loading contextual information of network anomaly trend signals before requesting network diagnostics, the problem of long startup time in network diagnostic systems is solved, enabling rapid fault response.
Patent Information
- Application Number
- CN202611331942.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-31
- Publication Date
- 2026-11-17
AI Technical Summary
In large-scale network environments, existing network diagnostic systems take a long time to start diagnostic sessions, resulting in delayed output of fault analysis results and affecting the efficiency of network fault response.
By acquiring abnormal trend signals from network operation data, the confidence level of abnormal trends is determined, and context preloading is performed asynchronously before the network diagnostic request arrives to generate a preloaded session draft, including topology subgraph information and historical diagnostic reference information. The preloaded context information is used to skip the cold start operation and directly enter the diagnostic reasoning process.
It reduces the processing time after the diagnostic session is started, improves the efficiency of network fault response, and enables the diagnostic session to enter the inference process more quickly.
Smart Images

Figure CN123123192A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and in particular to a network diagnostic method, apparatus, device, and medium based on predictive session preloading. Background Technology
[0002] As network scale and business complexity continue to increase, agent-based network diagnostic systems are increasingly being applied to alarm analysis, root cause localization, and operational support decision-making. Existing network diagnostic systems typically initiate a diagnostic session upon receiving alarm information or a user's diagnostic request, further acquiring network topology information, historical diagnostic reference information, and other diagnostic context before conducting subsequent reasoning and analysis based on this context. The diagnostic session initiation phase usually requires processing such as network topology query, historical diagnostic information retrieval, and diagnostic context construction; this process can be called the cold start process of the diagnostic session. In a real-world scenario, during this cold start process, when extracting the k-hop topology subgraph centered on the triggering entity, the extraction time for the k=2 topology subgraph is approximately 3–8 seconds, and for the k=3 topology subgraph, it is approximately 8–20 seconds; Top-10 vector retrieval takes approximately 2–5 seconds; context assembly takes approximately 0.5–2 seconds, and the overall cold start time is typically approximately 8–25 seconds.
[0003] However, in large-scale network environments, the sheer number of network devices and the complexity of network relationships mean that the acquisition and construction of diagnostic contexts typically consume significant processing time. This is especially true when alarms are generated in concentrated bursts, faults spread rapidly, or multiple diagnostic tasks are executed concurrently. The initial inference round after a diagnostic session begins often requires a considerable wait, leading to delayed fault analysis results and impacting network fault response efficiency. Therefore, how to prepare fault-related diagnostic contexts in advance before network diagnostic requests arrive and how to quickly enter the diagnostic inference process after the request arrives have become pressing technical challenges in the field of intelligent network diagnostics. Summary of the Invention
[0004] In view of this, the purpose of this invention is to provide a network diagnostic method, apparatus, device, and medium based on predictive session preloading, which enables the network diagnostic request to enter the diagnostic reasoning process more quickly after it arrives, thereby improving the efficiency of network fault response. The specific solution is as follows: In a first aspect, this application discloses a network diagnostic method based on predictive session preloading, including: Obtain abnormal trend signals corresponding to network operation data; wherein, the network operation data includes time-series data of the operation indicators of the monitored network devices; The confidence level of the abnormal trend is determined based on the abnormal trend signal; When the confidence level of the abnormal trend meets the preloading trigger condition, before the network diagnostic request arrives, context preloading processing is asynchronously performed based on the triggering entity corresponding to the abnormal trend signal to obtain preloaded context information; wherein, the triggering entity is the entity associated with the abnormal trend signal; the preloaded context information includes at least topological subgraph information extracted from the topological knowledge graph centered on the triggering entity and historical diagnostic reference information pre-retrieved from the historical root cause analysis retrieval library based on the triggering entity; A preloaded session draft with time constraints is generated based on the preloaded context information; When a network diagnostic request arrives, a target preloaded session draft that matches the network diagnostic request is determined based on the entity matching relationship and timeliness matching relationship between the network diagnostic request and the preloaded session draft. The preloaded context information in the target preloaded session draft is injected into the diagnostic session object corresponding to the network diagnostic request, so that the diagnostic session object skips the corresponding context cold start operation based on the injected preloaded context information and enters the diagnostic inference process.
[0005] Optionally, determining the confidence level of the abnormal trend based on the abnormal trend signal includes: The trend slope score is determined based on the slope of the change in the time series data of the operating indicators corresponding to the abnormal trend signal within the sliding window. A duration score is determined based on the duration of the abnormal trend signal. A historical frequency score is determined based on the historical anomaly frequency of the triggering entity. The trend slope score, duration score, and historical frequency score are weighted according to preset weights to obtain the confidence level of the abnormal trend.
[0006] Optionally, the process of generating a preloaded session draft with time constraints based on the preloaded context information further includes: Record the session draft state of the preloaded session draft; The session draft status includes a preloaded state and an expired state; the preloaded state indicates that the preloaded session draft has been generated and is in the waiting matching stage, and the expired state indicates that the preloaded session draft has exceeded the time limit constraint and will not participate in the matching.
[0007] Optionally, the asynchronous execution of context preloading processing based on the triggering entity corresponding to the abnormal trend signal to obtain preloaded context information includes: Based on the triggering entity corresponding to the abnormal trend signal, a preset asynchronous thread pool is invoked to execute the context preloading task in parallel; wherein, the context preloading task includes a topology context preloading subtask, a historical diagnostic reference information preloading subtask, and a change event preloading subtask; The preloaded context information is obtained based on the execution results of the topology context preloading subtask, the historical diagnostic reference information preloading subtask, and the change event preloading subtask. The context preloading task is executed in an asynchronous execution environment independent of the network diagnostic process, so as to complete the context preloading process without blocking the already started network diagnostic process.
[0008] Optionally, determining the target preloaded session draft that matches the network diagnostic request based on the entity matching relationship and timeliness matching relationship between the network diagnostic request and the preloaded session draft includes: Extract the set of request entities corresponding to the network diagnostic request; Obtain the set of preloaded entities corresponding to the preloaded session drafts that are in the waiting matching stage; The entity matching relationship is determined based on the degree of overlap between the requested entity set and the preloaded entity set; The timeliness matching relationship is determined based on the timeliness constraint and the time difference between the arrival time of the network diagnostic request and the generation time of the preloaded session draft. Based on the entity matching relationship and timeliness matching relationship corresponding to each of the preloaded session drafts, the preloaded session drafts whose entity matching relationship represents entity matching and whose timeliness matching relationship represents timeliness matching are determined as the target preloaded session drafts that match the network diagnostic request.
[0009] Optionally, the degree of overlap is the Jaccard similarity between the requested entity set and the preloaded entity set. When the Jaccard similarity is greater than a preset similarity threshold, the entity matching relationship is determined to represent entity matching.
[0010] Optionally, the network diagnostic method based on predictive session preloading further includes: When no preloaded session draft is matched based on the degree of overlap between the request entity set and the preloaded entity set, a coarse-grained match is performed based on the entity type and network domain of the request entity in the request entity set and the entity type and network domain of the preloaded entity in the preloaded entity set corresponding to each preloaded session draft, in order to determine the target preloaded session draft that matches the network diagnostic request.
[0011] Optionally, the network diagnostic method based on predictive session preloading further includes: The hit rate of the preloaded session draft being matched with the target preloaded session draft within a preset statistical period is calculated. When the hit rate is lower than the first hit rate threshold, the abnormal trend confidence threshold corresponding to the preload trigger condition is increased. When the hit rate is higher than the second hit rate threshold, the abnormal trend confidence threshold corresponding to the preload trigger condition is reduced.
[0012] Optionally, the network diagnostic method based on predictive session preloading further includes: Scan the preloaded session draft in the preloaded state according to a preset scanning cycle, so as to determine whether the preloaded session draft meets the failure condition based on the time constraint corresponding to the preloaded session draft. When the preloaded session draft meets the failure condition, the cache resources occupied by the preloaded context information corresponding to the preloaded session draft are released, and the session draft status of the preloaded session draft is updated to the failure status.
[0013] Optionally, injecting the preloading context information from the target preloading session draft into the diagnostic session object corresponding to the network diagnostic request includes: Write the preloaded context information into the diagnostic process state of the diagnostic session object; Based on the diagnostic process state after writing, a reasoning context is constructed for the current diagnostic round; the reasoning context is used to provide diagnostic basis for the current diagnostic round of the diagnostic session object; The diagnostic session object, after being written with the preloaded context information, is persisted.
[0014] Optionally, before injecting the preloading context information from the target preloading session draft into the diagnostic session object corresponding to the network diagnostic request, the method further includes: The timeliness of the preloaded context information is verified. When the timeliness check indicates that at least one of the topological relationships corresponding to the topological subgraph information or the change events related to the triggering entity has been updated after the preloaded session draft is generated, the preloaded context information is incrementally updated based on the updated topological relationships or change events.
[0015] Optionally, the network diagnostic method based on predictive session preloading further includes: Maintain the maximum number of concurrent preloads; When multiple abnormal trend signals meet the preloading triggering condition, and the sum of the number of context preloading processes corresponding to the multiple abnormal trend signals and the number of context preloading processes currently being executed exceeds the upper limit of the concurrent preloading number, some abnormal trend signals are selected to perform the context preloading process according to the abnormal trend confidence level of the multiple abnormal trend signals from high to low, so that the number of context preloading processes executed at the same time does not exceed the upper limit of the concurrent preloading number. For abnormal trend signals that are not selected, real-time context loading is performed upon arrival of the corresponding network diagnostic request.
[0016] Secondly, this application discloses a network diagnostic device based on predictive session preloading, comprising: An abnormal signal determination module is used to acquire abnormal trend signals corresponding to network operation data; wherein, the network operation data includes time-series data of the operation indicators of the monitored network devices; The confidence level determination module is used to determine the confidence level of the abnormal trend based on the abnormal trend signal. The context preloading module is used to asynchronously perform context preloading processing based on the triggering entity corresponding to the abnormal trend signal before the network diagnostic request arrives when the confidence level of the abnormal trend meets the preloading triggering condition, so as to obtain preloaded context information; wherein, the triggering entity is the entity associated with the abnormal trend signal; the preloaded context information includes at least topological subgraph information extracted from the topological knowledge graph centered on the triggering entity and historical diagnostic reference information pre-retrieved from the historical root cause analysis retrieval library based on the triggering entity; The session draft generation module is used to generate a preloaded session draft with time constraints based on the preloaded context information. The session draft matching module is used to determine the target preloaded session draft that matches the network diagnostic request based on the entity matching relationship and timeliness matching relationship between the network diagnostic request and the preloaded session draft when the network diagnostic request arrives. The context injection module is used to inject the preloaded context information in the target preloaded session draft into the diagnostic session object corresponding to the network diagnostic request, so that the diagnostic session object skips the corresponding context cold start operation based on the injected preloaded context information and enters the diagnostic inference process.
[0017] Thirdly, this application discloses an electronic device, including: Memory, used to store computer programs; A processor is configured to execute the computer program to implement the aforementioned network diagnostic method based on predictive session preloading.
[0018] Fourthly, this application discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the aforementioned network diagnostic method based on predictive session preloading.
[0019] Therefore, this application proposes a network diagnostic method based on predictive session preloading, comprising: acquiring an abnormal trend signal corresponding to network operation data; the network operation data includes time-series data of the operation indicators of the monitored network devices; determining the confidence level of the abnormal trend based on the abnormal trend signal; when the confidence level of the abnormal trend meets the preloading trigger condition, before the network diagnostic request arrives, asynchronously performing context preloading processing based on the trigger entity corresponding to the abnormal trend signal to obtain preloading context information; the trigger entity is the entity associated with the abnormal trend signal; the preloading context information includes at least the topology extracted from the topology knowledge graph centered on the trigger entity. The application utilizes subgraph information and historical diagnostic reference information pre-retrieved from a historical root cause analysis retrieval database based on triggering entities. It generates a time-constrained preloaded session draft based on preloaded context information. When a network diagnostic request arrives, it determines a target preloaded session draft that matches the network diagnostic request based on entity matching and time-constraint matching relationships between the network diagnostic request and the preloaded session draft. The preloaded context information from the target preloaded session draft is injected into the diagnostic session object corresponding to the network diagnostic request, enabling the diagnostic session object to skip the corresponding context cold start operation and enter the diagnostic inference process based on the injected preloaded context information. Therefore, this application enables the diagnostic session to skip the corresponding context cold start operation by obtaining preloaded context information related to the triggering entity before the network diagnostic request arrives and using the matching preloaded context information after the network diagnostic request arrives. This allows the diagnostic context acquisition and construction process, which would normally be performed after the network diagnostic request arrives, to be completed in advance, thereby reducing the processing time after the diagnostic session starts, lowering the processing latency of the diagnostic session cold start process, and enabling the diagnostic inference process to begin faster after the network diagnostic request arrives, thus improving network fault response efficiency. Attached Figure Description
[0020] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0021] Figure 1 This is a flowchart of a network diagnostic method based on predictive session preloading disclosed in this application; Figure 2 This is a schematic diagram of a network diagnostic device based on predictive session preloading disclosed in this application; Figure 3 This is a structural diagram of an electronic device disclosed in this application. Detailed Implementation
[0022] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0023] In large-scale network environments, the sheer number of network devices and the complexity of network relationships mean that the acquisition and construction of diagnostic contexts typically consume significant processing time. To address the issue of long cold starts in diagnostic sessions, existing technologies can reduce processing latency by pre-compiling and caching network topology information, increasing computing resources to accelerate real-time queries, or reducing the topology query depth to decrease the query scope. However, pre-compiling and caching large amounts of network topology information incurs significant storage resource overhead and increases the complexity of cache invalidation management; increasing computing resources to accelerate real-time queries increases system deployment and operating costs, and multi-hop topology queries in large-scale networks are still limited by query complexity; while reducing the topology query depth can reduce the topology query scope and processing time, it reduces the completeness of the diagnostic context, potentially missing topology relationships related to the root cause of the fault. Therefore, how to prepare fault-related diagnostic contexts in advance before a network diagnostic request arrives and quickly enter the diagnostic inference process after the request arrives has become a pressing technical problem to be solved in this field.
[0024] To address this, this application proposes a network diagnostic scheme based on predictive session preloading, which enables the network diagnostic request to enter the diagnostic reasoning process more quickly, thereby improving network fault response efficiency.
[0025] This application discloses a network diagnostic method based on predictive session preloading. See [link to relevant documentation]. Figure 1 As shown, the method includes: Step S11: Obtain the abnormal trend signal corresponding to the network operation data; wherein, the network operation data includes the time series data of the operation indicators of the monitored network devices.
[0026] In this embodiment, time-series data of operational metrics corresponding to the monitored network device are acquired. This time-series data characterizes the changes in the operational metrics of the corresponding network device over time. The operational metrics may include, for example, at least one of interface drop count, interface utilization, bit error count, packet loss rate, latency, and device CPU or memory resource utilization. Further, based on the time-series data of the operational metrics, an abnormal trend signal corresponding to the abnormal change trend of the operational metrics is acquired. This abnormal trend signal characterizes the existence of an abnormal change trend in the corresponding time-series data of the operational metrics and is associated with the network entity that generated the abnormal change trend.
[0027] Step S12: Determine the confidence level of the abnormal trend based on the abnormal trend signal.
[0028] Firstly, a trend slope score is determined based on the slope of change of the time-series data of the operational indicators corresponding to the abnormal trend signal within a sliding window. Specifically, for the time-series data of the operational indicators corresponding to the abnormal trend signal, the slope of change of the time-series data of the operational indicators within a sliding window is determined, and a trend slope score is determined based on the slope of change. The sliding window is used to limit the time range of the time-series data of the operational indicators participating in the calculation of the slope of change, and can be determined based on actual needs; this embodiment does not impose such a limitation.
[0029] Specifically, for the trend slope score: First-order difference or least-squares linear regression is performed on the sampling points of the time-series data of the operational indicator within a sliding window of length W to obtain the slope k of the operational indicator within the sliding window; the ratio of the slope to a preset upper limit of slope k_max is controlled within the interval [0,1] to obtain the trend slope score, i.e., slope_score=min(|k| / k_max,1); k_max can be determined based on the historical statistical distribution of the corresponding operational indicator (e.g., taking the 95th quantile of the slope within the historical window). Taking interface drop count as an example, W can be 5 minutes, and the sampling period can be 30 seconds.
[0030] Secondly, based on the duration of the continuous deviation of the time series data of the operating indicator corresponding to the abnormal trend signal from the baseline, a duration score is determined. Specifically, the duration of the continuous deviation of the operating indicator from its baseline is determined, and the corresponding duration score is determined based on the duration.
[0031] For the duration score: determine the duration T_dur during which the operating indicator deviates from its baseline, where the baseline is the average value of the operating indicator within a preset historical statistical period, and the deviation judgment condition is exceeding the baseline ±nσ; control the ratio of T_dur to the preset duration upper limit T_max to the range [0,1] to obtain the duration score, i.e., duration_score=min(T_dur / T_max,1); where T_max can be, for example, 10 minutes.
[0032] Thirdly, a historical frequency score is determined based on the historical anomaly frequency of the triggering entity. Specifically, the triggering entity associated with the anomaly trend signal is identified, the historical anomaly frequency of the triggering entity is obtained, and the corresponding historical frequency score is determined based on the historical anomaly frequency, so as to characterize the historical anomaly situation of the triggering entity through the historical frequency score. Here, the triggering entity is the entity associated with the anomaly trend signal; the historical anomaly frequency characterizes the frequency with which the triggering entity experiences anomalies during its historical operation.
[0033] For the historical frequency score: the number of times N_e, the triggering entity has an anomaly in a preset historical statistical period (e.g., the most recent 30 days), and the network average number of times N_avg, the number of times the monitored network device has an anomaly in the same statistical period, are counted. The ratio of the two is truncated to the [0,1] interval to obtain the historical frequency score, i.e., hist_frequency_score=min(N_e / (c×N_avg),1), where c is a configurable amplification coefficient.
[0034] In one approach, for the trend slope score, the higher the rate of abnormal change, the higher the corresponding trend slope score; for the duration score, the longer the duration, the higher the corresponding duration score; and for the historical frequency score, the higher the historical abnormal frequency, the higher the corresponding historical frequency score.
[0035] After obtaining the trend slope score, the duration score, and the historical frequency score, the scores are weighted according to preset weights to obtain the abnormal trend confidence level. The abnormal trend confidence level is used to comprehensively characterize the credibility of the abnormal trend corresponding to the abnormal trend signal. In one specific implementation, the abnormal trend confidence level can be determined according to the following formula: conf_trend=w1×slope_score+w2×duration_score+w3×hist_frequency_score; Wherein, `conf_trend` represents the confidence level of the abnormal trend, `slope_score` represents the trend slope score, `duration_score` represents the duration score, `hist_frequency_score` represents the historical frequency score, and `w1`, `w2`, and `w3` represent the weights corresponding to the trend slope score, the duration score, and the historical frequency score, respectively. `w1`, `w2`, and `w3` can be configured according to the actual application scenario; for example, `w1`, `w2`, and `w3` can be set to 0.4, 0.35, and 0.25, respectively. The value range of the trend slope score, the duration score, and the historical frequency score is all [0,1], and the sum of `w1`, `w2`, and `w3` is 1. Therefore, the value range of the confidence level of the abnormal trend is [0,1]. The confidence level of the abnormal trend is used to comprehensively characterize the credibility of the abnormal trend corresponding to the abnormal trend signal.
[0036] Step S13: When the confidence level of the abnormal trend meets the preloading trigger condition, before the network diagnostic request arrives, the context preloading process is asynchronously executed based on the trigger entity corresponding to the abnormal trend signal to obtain the preloading context information; the trigger entity is the entity associated with the abnormal trend signal; the preloading context information includes at least the topological subgraph information extracted from the topological knowledge graph centered on the trigger entity and the historical diagnostic reference information pre-retrieved from the historical root cause analysis retrieval library based on the trigger entity.
[0037] It should be noted that after determining the abnormal trend confidence level corresponding to the abnormal trend signal, the abnormal trend signal is judged to meet the preloading trigger condition based on the abnormal trend confidence level. When the abnormal trend confidence level meets the preloading trigger condition, the entity associated with the abnormal trend signal is identified as the trigger entity, and context preloading processing is initiated for the trigger entity before the corresponding network diagnostic request arrives. Specifically, based on the trigger entity, a preset asynchronous thread pool is invoked to execute the topology context preloading subtask, the historical diagnostic reference information preloading subtask, and the change event preloading subtask in parallel. The preset asynchronous thread pool is a pre-configured set of thread resources used to asynchronously execute the context preloading task; the topology context preloading subtask is used to extract topology subgraph information related to the trigger entity from the topology knowledge graph, centered on the trigger entity; the historical diagnostic reference information preloading subtask is used to pre-retrieve historical diagnostic reference information related to the trigger entity from the historical root cause analysis retrieval library based on the trigger entity; and the change event preloading subtask is used to obtain change events related to the trigger entity.
[0038] In this embodiment, preloaded context information is obtained based on the execution results of the above-mentioned context preloading subtasks; the context preloading task is executed in an asynchronous execution environment independent of the network diagnostic process, so as to complete the context preloading process without blocking the already started network diagnostic process.
[0039] Furthermore, to control the number of concurrent context preloading processes, an upper limit for the number of concurrent preloading processes is maintained. Specifically, when multiple abnormal trend signals meet the preloading trigger condition, it is determined whether the sum of the number of context preloading processes corresponding to the multiple abnormal trend signals and the number of context preloading processes currently being executed exceeds the upper limit for the number of concurrent preloading processes. If it does not exceed the upper limit, the corresponding context preloading processes are executed for the abnormal trend signals that meet the preloading trigger condition. If it exceeds the upper limit, the abnormal trend signals are sorted from high to low according to their abnormal trend confidence, and some abnormal trend signals are selected to perform the context preloading processes, so that the number of concurrent context preloading processes does not exceed the upper limit for the number of concurrent preloading processes. For abnormal trend signals that are not selected, real-time context loading is performed after their corresponding network diagnostic requests arrive. The upper limit for the number of concurrent preloading processes can be determined based on the available computing resources of the system or the concurrent load of the network diagnostic service, etc., and this embodiment does not specifically limit it.
[0040] In scenarios where alarms occur in clusters, the number of abnormal trend signals that simultaneously meet the preloading trigger conditions may increase. If context preloading is performed on all abnormal trend signals, it may consume significant graph database query, vector retrieval, and storage resources. By setting an upper limit on the number of concurrent preloading signals and selecting a subset of abnormal trend signals for context preloading based on their abnormal trend confidence from high to low, the system resources consumed by preloading can be limited, and abnormal trend signals with higher confidence levels can be preloaded first.
[0041] Furthermore, the confidence threshold for the abnormal trend corresponding to the preloading trigger condition is adjusted. Specifically, the hit rate of the preloaded session draft being matched with the target preloaded session draft within a preset statistical period is calculated. When the hit rate is lower than a first hit rate threshold, the confidence threshold for the abnormal trend corresponding to the preloading trigger condition is increased to reduce abnormal trend signals that trigger context preloading processing. When the hit rate is higher than a second hit rate threshold, the confidence threshold for the abnormal trend is decreased to increase abnormal trend signals that can trigger context preloading processing. The preloading trigger condition is adjusted according to the actual hit situation of the preloaded session draft. In this embodiment, the values of the preset statistical period, the first hit rate threshold, and the second hit rate threshold are not limited. Through this adjustment, a balance can be maintained between the preloading resource overhead and the benefits gained from reducing context cold start latency.
[0042] Step S14: Generate a preloaded session draft with time constraints based on the preloaded context information.
[0043] In this embodiment, after completing the context preloading process for the triggering entity and obtaining the preloaded context information, a corresponding preloaded session draft is generated based on the preloaded context information, and corresponding time constraints are set for the preloaded session draft. The preloaded session draft is used to temporarily store the acquired preloaded context information before the corresponding network diagnostic request arrives, ensuring that the preloaded context information is in a ready-to-use state within a certain time frame. The time constraints limit the effective time range for the preloaded session draft to participate in subsequent matching, preventing preloaded context information exceeding the corresponding time frame from continuing to participate in the matching of network diagnostic requests.
[0044] The preloaded session draft is a logical data carrier used to associate and store the preloaded entity set corresponding to the triggering entity, the preloaded context information, the session draft state, and the timeliness constraint. Its specific storage format is not limited. In one specific implementation, the preloaded session draft can be stored as a cache entry or a database record.
[0045] Furthermore, during the generation of the preloaded session draft, the session draft status of the preloaded session draft is recorded. The session draft status includes at least a preloaded state and an invalid state. Specifically, after the preloaded session draft is generated and before the corresponding time constraint is exceeded, the preloaded session draft is placed in the preloaded state to indicate that the preloaded session draft has been generated and is in the stage of waiting for subsequent network diagnostic request matching; when the preloaded session draft exceeds the time constraint, it is placed in the invalid state, and the preloaded session draft in the invalid state will no longer participate in subsequent matching.
[0046] Based on the aforementioned time constraints and session draft status, invalidation management is implemented for preloaded session drafts in the preloaded state. Specifically, preloaded session drafts in the preloaded state are scanned according to a preset scanning cycle, and based on the generation time of the corresponding preloaded session draft and the time constraints, it is determined whether they exceed the valid time range. When a preloaded session draft does not meet the invalidation condition, its preloaded state is maintained and it continues to wait for a matching network diagnostic request; when a preloaded session draft meets the invalidation condition, the cache resources occupied by the preloaded context information corresponding to the preloaded session draft are released, and its session draft status is updated to an invalidated state, so that preloaded session drafts that have exceeded the time constraints exit the subsequent matching process. This embodiment does not limit the value of the preset scanning cycle.
[0047] In one specific implementation, the time constraint can be set to 5 minutes and can be configured according to the network entity type. In the specific test scenario of this embodiment, the context preloading process is triggered and completed before the network diagnostic request arrives. Using a 5-minute time constraint ensures that the preloaded session draft is still within the valid time range when the subsequent network diagnostic request arrives. It should be noted that the 5-minute time constraint is an exemplary value and is not limited to it in this embodiment.
[0048] Step S15: When a network diagnostic request arrives, based on the entity matching relationship and timeliness matching relationship between the network diagnostic request and the preloaded session draft, determine the target preloaded session draft that matches the network diagnostic request.
[0049] Specifically, when a network diagnostic request arrives, the request entity set corresponding to the network diagnostic request is extracted, and the preloaded entity set corresponding to each preloaded session draft that is in the waiting matching stage is obtained. Based on the degree of overlap between the request entity set and each preloaded entity set, the entity matching relationship between the network diagnostic request and each preloaded session draft is determined. The degree of overlap is represented by Jaccard similarity, which is determined based on the intersection and union of the request entity set and the preloaded entity set. When the Jaccard similarity is greater than a preset similarity threshold, the corresponding entity matching relationship is determined to represent entity matching. The preset similarity threshold can be set according to the actual network diagnostic scenario; this embodiment does not limit its specific value.
[0050] Furthermore, based on the timeliness constraints corresponding to the preloaded session draft and the time difference between the arrival time of the network diagnostic request and the generation time of the preloaded session draft, a corresponding timeliness matching relationship is determined. When the time difference satisfies the timeliness constraints, the timeliness matching relationship is determined to represent timeliness matching. Based on the entity matching relationship and timeliness matching relationship corresponding to each preloaded session draft, the preloaded session drafts whose entity matching relationship represents entity matching and whose timeliness matching relationship represents timeliness matching are determined as the target preloaded session drafts that match the network diagnostic request. In this way, it is possible to avoid using preloaded session drafts that have exceeded the timeliness constraints for the current network diagnostic request.
[0051] Furthermore, when no preloaded session draft is matched based on the overlap between the request entity set and the preloaded entity set, a coarse-grained matching is performed based on the entity type and network domain of the request entity in the request entity set, and the entity type and network domain of the preloaded entity in the corresponding preloaded session draft, to determine the target preloaded session draft that matches the network diagnostic request. This coarse-grained matching is used to further determine the corresponding preloaded session draft based on the entity type and network domain when a matching draft cannot be determined based on the overlap between entity sets. Here, the entity type represents the entity category to which the network entity belongs; the network domain represents the network range where the network entity is located; and the coarse-grained matching refers to matching based on the entity type and network domain of both to determine whether a correspondence exists between them.
[0052] When the entity type of the request entity is the same as the entity type of the preloaded entity, and the network domains to which they belong are the same, the coarse-grained matching is determined to be successful. When there are multiple preloaded session drafts that have been successfully matched with coarse-grained matching, the preloaded session draft whose generation time is closest to the arrival time of the network diagnostic request is selected, or the preloaded session draft with the highest confidence of abnormal trend when preloading is triggered is selected as the preloaded session draft determined by coarse-grained matching.
[0053] Through the above coarse-grained matching, even when the entity information carried in the network diagnostic request is incomplete, resulting in the failure to match the preloaded session draft based on the degree of overlap of entity sets, the matching preloaded session draft can still be determined according to the entity type and network domain of the request entity and the preloaded entity, thereby reducing matching failures caused by incomplete entity information.
[0054] It should be noted that when a matching preloaded session draft is determined through the above matching method, it is identified as the target preloaded session draft; when no available preloaded session draft is matched through the above matching method, real-time context loading is performed after the network diagnostic request arrives.
[0055] Step S16: Inject the preloaded context information in the target preloaded session draft into the diagnostic session object corresponding to the network diagnostic request, so that the diagnostic session object skips the corresponding context cold start operation based on the injected preloaded context information and enters the diagnostic inference process.
[0056] In this embodiment, after determining the target preloaded session draft that matches the network diagnostic request, the preloaded context information in the target preloaded session draft is obtained, and the timeliness of the preloaded context information is verified before context injection. Specifically, the timeliness verification can be performed using at least one of the following methods: recording the version identifier or last update timestamp of relevant nodes and links in the topology knowledge graph when generating the topology subgraph information; rereading and comparing the current version identifier or last update timestamp of the nodes and links during timeliness verification, and determining that the corresponding topology relationship has been updated if they are inconsistent; or subscribing to the change event stream output by the change management system or configuration management database, filtering out the change records of the triggering entity and its neighbors after the generation time of the preloaded session draft, and determining that an update has occurred if they exist. When it is determined that the topology relationship or change event has been updated, only the nodes, links, or change records determined to have been updated are re-executed with a local query and the corresponding part in the topology subgraph information is replaced, or the new change event is appended to the preloaded context information, while the remaining unchanged preloaded context information is retained. Therefore, the processing time for the incremental update is significantly lower than that for re-performing the complete topology subgraph extraction.
[0057] After completing the timeliness verification and incremental update, the preloaded context information is injected into the diagnostic session object. Specifically, the preloaded context information is written into the diagnostic process state of the diagnostic session object, and a reasoning context for the current diagnostic round is constructed based on the written diagnostic process state. The diagnostic process state carries the context information used in the current diagnostic process, and the reasoning context provides diagnostic basis for the current diagnostic round of the diagnostic session object. Since the diagnostic session object can directly construct the reasoning context using the pre-acquired and timeliness-verified preloaded context information, this embodiment does not require re-executing the context acquisition and construction operations corresponding to the preloaded context information, thereby skipping the corresponding context cold start operation and entering the diagnostic reasoning process.
[0058] The following example, using a network fault diagnosis process in an enterprise network, further illustrates the aforementioned network diagnosis method based on predictive session preloading. In this example, the network diagnosis system may include a data ingestion layer, a data enrichment layer, a preloading trigger layer, a session management layer, an agent inference layer, and a knowledge layer. Specifically, the data ingestion layer provides network operation data for subsequent processing; the data enrichment layer generates abnormal trend signals based on the network operation data; the preloading trigger layer determines whether to perform context preloading processing in advance based on the abnormal trend signals, and may include a trend confidence evaluator, a preloading executor, a preloading session draft pool, and a session matching activator; the session management layer manages the diagnostic sessions corresponding to network diagnosis requests and receives context information from the preloading session drafts upon successful matching; the agent inference layer performs subsequent diagnostic inference based on the context information in the diagnostic session; and the knowledge layer provides network topology knowledge and historical diagnostic reference information used for context preloading and diagnostic inference. Therefore, before a network diagnosis request arrives, the preloading trigger layer performs predictive context preloading based on the abnormal trend signals output by the data enrichment layer, and after the network diagnosis request arrives, the formal diagnosis process begins through the session management layer and the agent inference layer.
[0059] Specifically, the trend confidence estimator calculates the abnormal trend confidence level based on the abnormal trend signal. In this example, the abnormal trend confidence level can be determined according to the abnormal trend confidence level formula described above.
[0060] Furthermore, an abnormal trend confidence threshold θ_pw can be set. In a specific implementation, θ_pw can be set to 0.65. When θ_pw is between 0.50 and 0.60, it corresponds to a higher trigger sensitivity, suitable for scenarios with low tolerance for response latency, such as finance and telecommunications. When θ_pw is between 0.61 and 0.70, it corresponds to a medium trigger sensitivity, suitable for enterprise-level data centers. When θ_pw is between 0.71 and 0.85, it corresponds to a lower trigger sensitivity, suitable for resource-constrained environments or scenarios with low alarm frequency.
[0061] When the confidence level of an anomaly trend exceeds the anomaly trend confidence threshold, the preloading executor performs context preloading processing in an independent asynchronous thread pool. Specifically, three subtasks can be executed in parallel: First, perform topology subgraph extraction, performing a reverse breadth-first traversal (k=2) in the knowledge graph centered on the triggering entity, which can be configured to k=3, to extract device nodes, link relationships, and neighbor attributes related to the triggering entity, forming corresponding topology snapshot information; Second, perform historical diagnostic reference information pre-retrieval, constructing pre-retrieval conditions based on the triggering entity type, its network domain, and observed anomaly patterns, and performing a Top-N search in the historical root cause analysis retrieval library, where the combination of entity type and anomaly type information can be used preferentially to construct pre-retrieval conditions; Third, perform relevant change event scanning, querying the change management system or configuration management database, and scanning change records involving the triggering entity and its neighbors within a preset time window. In this example, the time window can be 2 hours. Furthermore, the above three subtasks are executed in parallel, and the overall preloading time depends on the subtask with the longest execution time.
[0062] During context preloading, a corresponding preload session draft is generated and its status is recorded. When a preload session draft has been created but preloading processing is not yet complete, its internal state can be PENDING. When each preload subtask is completed and the preload context information is ready, its internal state can be updated to READY, awaiting subsequent network diagnostic requests for matching. The PENDING and READY states correspond to different stages of the preload session draft's preloading state. When a preload session draft exceeds its corresponding expiration constraint, its state can be updated to EXPIRED, corresponding to an invalidation state. In a specific implementation, the validity period of a preload session draft can be set to 5 minutes. If it is not matched by a network diagnostic request within this validity period, the corresponding draft is invalidated and the resources it occupies are released.
[0063] To support the above processing, information related to preloading is set in the data structure of the diagnostic session, including a preloading draft identifier, preloading status, topology snapshot cache, historical diagnostic reference information cache, draft expiration time, cold start skip identifier, abnormal trend confidence level when triggering preloading, and cold start time saving. Specifically, the preloading draft identifier is used to associate the corresponding preloading session draft; the preloading status is used to record the corresponding preloading processing stage; the topology snapshot cache is used to store pre-acquired topology information; the historical diagnostic reference information cache is used to store pre-retrieved historical diagnostic reference information; the draft expiration time is used to record the corresponding validity period; the cold start skip identifier is used to record whether the context cold start was successfully skipped; the abnormal trend confidence level is used to record the confidence level when triggering the corresponding preloading process; and the cold start time saving is used to record the cold start processing time saved through preloading.
[0064] When an alarm or user query arrives, the session matching activator extracts the request entity set corresponding to the network diagnostic request and obtains the preloaded entity set corresponding to the preloaded session draft in the READY state. Then, it calculates the Jaccard similarity between the two. Jaccard similarity can be expressed as: sim=|E_alert∩E_pw| / |E_alert∪E_pw|; Where ∩ represents intersection, ∪ represents union, E_alert represents the set of affected entities corresponding to the network diagnostic request, and E_pw represents the set of preloaded entities corresponding to the preloaded session draft. In this example, a successful match can be determined when sim is greater than 0.5 and the time difference between the network diagnostic request and the preloaded session draft is less than the corresponding validity period. When a successful match is achieved, the topology snapshot information and historical diagnostic reference information in the preloaded session draft are injected into the newly established diagnostic session, causing the diagnostic session to enter the ACTIVE state and skip the context cold start phase corresponding to the CREATED state. The CREATED state is used to characterize the stage where the diagnostic session has been created and needs to perform context acquisition and construction operations, while the ACTIVE state is used to characterize the stage where the diagnostic session has the context information required for diagnostic inference and can enter the diagnostic inference stage. It should be noted that the CREATED and ACTIVE states are the running states of the diagnostic session, which are different from the PENDING, READY, and EXPIRED states used to characterize the preloaded session draft processing stage. If no available preloaded session draft is matched, a diagnostic session is created using the real-time context loading method, and a normal context cold start is performed in the CREATED state. In one operating scenario, the above matching process takes approximately 50–200 milliseconds.
[0065] To control resource consumption from predictive preloading, a maximum value is maintained for the number of concurrent preloading operations. For example, the maximum number of session drafts simultaneously in the preloading state is set to 50. When this limit is exceeded, some abnormal trend signals are selected for preloading based on their abnormal trend confidence level from high to low. The remaining abnormal trend signals are either not preloaded or are loaded in real-time context after a network diagnostic request arrives. Simultaneously, preloaded session drafts undergo expiration checks according to a preset scanning cycle. For example, the draft validity period is set to 5 minutes, and drafts are scanned at a 30-second cycle. When a draft expires, the resources occupied by the topology snapshot cache and historical diagnostic reference information cache are released, and the draft status is updated to EXPIRED. In addition, the preloading hit rate can be calculated, for example, by calculating the ratio between the number of preloaded session drafts that were successfully matched in the last 7 days and the total number of session drafts that have undergone preloading processing; when the hit rate is below 30%, the abnormal trend confidence threshold is increased by 0.05 to reduce invalid preloading; when the hit rate is above 80%, the abnormal trend confidence threshold is decreased by 0.03 to improve the preloading coverage.
[0066] The above method is illustrated below with a specific test process. In this test scenario, a network failure was simulated, preventing users in the finance department from accessing the Enterprise Resource Planning (ERP) system. The interface drop rate of the access switch sw-acc-3 was used as the target for anomaly trend monitoring. At T-8 minutes, the interface drop rate of sw-acc-3 began to show an abnormal trend. At this time, the confidence level of the abnormal trend was 0.41, which was lower than the threshold of 0.65, so preloading was not triggered. At T-5 minutes, as the trend slope increased and the duration score improved, the confidence level of the abnormal trend rose to 0.58, but still did not meet the triggering condition. At T-3 minutes, under the influence of the historical anomaly frequency score, the confidence level of the abnormal trend further increased to 0.68, thus exceeding the threshold of 0.65 and triggering context preloading, while creating... The corresponding preloaded session draft is set to the PENDING state. At T-2 min 20s, the topology subgraph centered on sw-acc-3 is extracted, including sw-acc-3 and its two-hop neighbors. At T-2 min 15s, the pre-retrieval of historical root cause analysis reference information is completed, and the Top-8 historical root cause analysis records are obtained, including historical cases related to access control. At this time, the corresponding preloaded context information is ready, and the preloaded session draft is updated from the PENDING state to the READY state, with a 5-minute validity period set. It should be noted that the above time points are end-to-end times including task scheduling, queuing, and data transmission processes. In this test scenario, the actual processing time for topology subgraph extraction and historical diagnostic reference information pre-retrieval is approximately 8 seconds and 5 seconds, respectively.
[0067] After the preloaded session draft enters the READY state and awaits matching, at T+0 seconds, user Alice reports that the Enterprise Resource Planning system is inaccessible and triggers a corresponding alarm. At T+0.15 seconds, the Jaccard similarity between the request entity set and the preloaded entity set is 0.85, and the corresponding timeliness condition is met. Therefore, the match is determined to be successful, and the diagnostic session enters the ACTIVE state to skip the context cold start. Subsequently, diagnostic inference is entered using the prepared preloaded context information. Root cause analysis and remediation suggestions are completed in approximately T+5 minutes, saving about 22 seconds of cold start time compared to traditional processing methods.
[0068] In the above test scenario, the traditional processing path triggers an alarm at T+0s, completes context loading at T+22s, and begins the first round of inference at T+23s. Using the predictive session preloading processing path, preloaded session draft matching is completed at T+0.15s, and the first round of inference begins at T+0.5s. The traditional processing path outputs root cause analysis conclusions at approximately T+130s, completes manual approval and repair execution at T+6 minutes and 30s, and confirms fault recovery at T+7 minutes. The predictive session preloading processing path outputs root cause analysis conclusions at approximately T+70s, completes manual approval and repair execution at T+5 minutes and 10s, and confirms fault recovery at T+5 minutes and 30s. The corresponding total average repair time is reduced from approximately 7 minutes to approximately 5 minutes and 30 seconds, a reduction of approximately 21%.
[0069] Furthermore, in the corresponding performance tests, the initial inference response latency of the traditional method was approximately 22 seconds, while with predictive session preloading, it was approximately 1 second, a reduction of about 95%. The context cold start time of the traditional method was approximately 8–25 seconds, while with predictive session preloading, the corresponding matching process was approximately 50–200 milliseconds, a reduction of about 97%. The average total diagnostic time was reduced from approximately 130 seconds to approximately 70 seconds, a reduction of about 46%. The concurrent processing method changed from being limited by the sequential execution of cold starts to preloading in parallel, allowing inference to begin immediately after matching activation. Each preloaded session draft can generate approximately 50–200 MB of additional memory overhead, which can be controlled through expiration. The above data are the results obtained in the test environment corresponding to this example.
[0070] Furthermore, in one specific deployment method, the trend confidence evaluator can subscribe to the abnormal event stream output by the data enrichment layer and calculate the abnormal trend confidence at a period of, for example, 30 seconds; the preloading executor can use a Python asynchronous thread pool to perform topology queries and retrieve historical diagnostic reference information; the preloading session draft pool can use Redis or PostgreSQL for storage and support automatic expiration; the session matching activator can be integrated into the session management component to perform matching processing when a network diagnostic request is received; the topology knowledge graph can be implemented using Neo4j, and the historical diagnostic reference information retrieval library can be implemented using Chroma or Milvus. The above is a specific deployment method in this example.
[0071] It should be noted that in other implementations, two preloaded session drafts with different topology depths can be generated for the same entity at k=2 and k=3 respectively, and the appropriate draft can be selected according to the severity of the alarm. When the abnormal trend signals of multiple entities rise simultaneously, preloading can be performed with the corresponding common upstream node as the center. For high-frequency continuous alarms of the same entity, the cached information in the previous preloaded session draft can be reused and incrementally updated. In multi-tenant scenarios, preloaded strategy configurations such as abnormal trend confidence threshold, validity period, and topology query depth can be maintained separately for different tenants.
[0072] Therefore, this application proposes a network diagnostic method based on predictive session preloading, comprising: acquiring an abnormal trend signal corresponding to network operation data; the network operation data includes time-series data of the operation indicators of the monitored network devices; determining the confidence level of the abnormal trend based on the abnormal trend signal; when the confidence level of the abnormal trend meets the preloading trigger condition, before the network diagnostic request arrives, asynchronously performing context preloading processing based on the trigger entity corresponding to the abnormal trend signal to obtain preloading context information; the trigger entity is the entity associated with the abnormal trend signal; the preloading context information includes at least the topology extracted from the topology knowledge graph centered on the trigger entity. The application utilizes subgraph information and historical diagnostic reference information pre-retrieved from a historical root cause analysis retrieval database based on triggering entities. It generates a time-constrained preloaded session draft based on preloaded context information. When a network diagnostic request arrives, it determines a target preloaded session draft that matches the network diagnostic request based on entity matching and time-constraint matching relationships between the network diagnostic request and the preloaded session draft. The preloaded context information from the target preloaded session draft is injected into the diagnostic session object corresponding to the network diagnostic request, enabling the diagnostic session object to skip the corresponding context cold start operation and enter the diagnostic inference process based on the injected preloaded context information. Therefore, this application enables the diagnostic session to skip the corresponding context cold start operation by obtaining preloaded context information related to the triggering entity before the network diagnostic request arrives and using the matching preloaded context information after the network diagnostic request arrives. This allows the diagnostic context acquisition and construction process, which would normally be performed after the network diagnostic request arrives, to be completed in advance, thereby reducing the processing time after the diagnostic session starts, lowering the processing latency of the diagnostic session cold start process, and enabling the diagnostic inference process to begin faster after the network diagnostic request arrives, thus improving network fault response efficiency.
[0073] Building upon the above embodiments, this embodiment further provides an implementation method that combines predictive session preloading with persistent diagnostic sessions. The aforementioned embodiments primarily described the context preloading process before the arrival of a network diagnostic request, the generation of a preloaded session draft, and the context injection process after the arrival of the network diagnostic request. This embodiment further describes the diagnostic process state recording, updating, persistence, and recovery process of the diagnostic session object after the preloaded context information is injected into the diagnostic session object.
[0074] Specifically, the diagnostic session object is used to record the diagnostic process status of the corresponding network diagnostic task. The diagnostic process status includes at least a set of hypotheses characterizing candidate fault causes and diagnostic confidence information corresponding to the set of hypotheses. The set of hypotheses records one or more candidate fault causes formed during the network diagnostic process, and the diagnostic confidence information characterizes the degree of support that the currently obtained diagnostic information provides for the corresponding candidate fault cause. The diagnostic session object may also record at least one of the following: inference trajectory, tool call history, fault device set, current session status, collaboration information, checkpoint information, and diagnostic process record information. The inference trajectory records inference information formed during the network diagnostic process, the tool call history records the calling status of diagnostic tools and the corresponding tool execution results, and the checkpoint information records a state snapshot formed by the network diagnostic task at the corresponding diagnostic stage. The topology subgraph information, historical diagnostic reference information, and preloaded context information such as related change events injected into the diagnostic session object in the aforementioned embodiments can be recorded as part of the diagnostic process status along with the diagnostic session object.
[0075] It should be noted that the diagnostic confidence level in this embodiment is a different technical quantity from the abnormal trend confidence level in the previous embodiments. The abnormal trend confidence level characterizes the credibility of abnormal trends in network operation indicators and is used to determine whether to trigger context preloading processing before a network diagnostic request arrives. The diagnostic confidence level characterizes the degree of support that the diagnostic information already obtained during network diagnostics provides for candidate fault causes and is used for subsequent diagnostic decisions. Therefore, the abnormal trend confidence level corresponds to the preloading triggering stage before the network diagnostic request arrives, while the diagnostic confidence level corresponds to the diagnostic inference stage after the network diagnostic request arrives. Their determination basis, operational stages, and uses differ.
[0076] Based on the diagnostic process status recorded in the diagnostic session object, an inference context is constructed for the current diagnostic round. This inference context provides diagnostic information related to the current network diagnostic task to the current diagnostic round and may include a hypothesis set, diagnostic confidence information, and the pre-loaded context information injected into the diagnostic session object. In some embodiments, the inference context includes at least one of topological subgraph information extracted from a knowledge graph and historical diagnostic reference information obtained from a historical root cause analysis retrieval library. The historical root cause analysis retrieval library can be a vector retrieval library for storing and retrieving vectorized historical diagnostic information. It vectorizes the query information corresponding to the current network diagnostic task and obtains matching historical diagnostic reference information based on vector similarity.
[0077] Diagnostic decision information is generated based on the inference context of the current diagnostic round. This diagnostic decision information characterizes the subsequent diagnostic processing method corresponding to the current diagnostic round. For example, when the existing diagnostic information is insufficient to confirm the cause of the current candidate fault, diagnostic decision information can be generated to instruct the invocation of diagnostic tools to further obtain network operating status information or active probing results; when the existing diagnostic information can support a judgment on the cause of the current candidate fault, diagnostic decision information can be generated to characterize the current diagnostic conclusion; and when the network diagnostic task cannot be further advanced based on the current inference context, diagnostic decision information can also be generated to instruct manual processing.
[0078] After obtaining the tool execution result, the hypothesis set and diagnostic confidence information are updated based on the result to obtain the updated diagnostic process state. The tool call record, tool execution result, and the updated hypothesis set and diagnostic confidence information are then written into the diagnostic session object. The updated diagnostic session object is persisted, ensuring that the diagnostic process state, inference trajectory, tool call history, and diagnostic information generated in each diagnostic round, including the aforementioned pre-loaded context information, are saved along with the diagnostic session object. Therefore, when the network diagnostic task continues to execute, the inference context for subsequent diagnostic rounds can be constructed based on the persisted diagnostic process state without needing to regenerate the already saved diagnostic information.
[0079] Furthermore, the persistence process can also support pausing, resuming, or transferring network diagnostic tasks. When a pause request is received for a diagnostic session object, the current session state of the diagnostic session object is switched to a paused state, the generation of subsequent diagnostic decision information corresponding to the current diagnostic round is stopped, and the hypothesis set, diagnostic confidence information, inference trajectory, tool call history, and tool execution results already formed in the current diagnostic round are written into the checkpoint information to form a state snapshot corresponding to the current diagnostic process and retain the diagnostic process state formed before the pause.
[0080] Upon receiving a recovery request, the system reads the hypothesis set, diagnostic confidence information, inference trajectory, and tool execution results stored in the checkpoint information. Based on the read information, it reconstructs the inference context for the current diagnostic round to continue the network diagnostic task from the paused position. Upon receiving a transfer request, the system updates the collaboration information in the diagnostic session object, updates the current handler to the target handler, and records the handler before transfer, the target handler, and the corresponding diagnostic process status at the time of transfer in the transfer history. This allows the target handler to read the persistent inference trajectory, tool call history, tool execution results, hypothesis set, and diagnostic confidence information in the diagnostic session object and continue the network diagnostic task based on the diagnostic process information.
[0081] Therefore, based on the aforementioned predictive session preloading, this embodiment continuously records the diagnostic process state during network diagnostics through a diagnostic session object. In each diagnostic round, the hypothesis set and diagnostic confidence information are updated based on the tool execution results. Simultaneously, the updated diagnostic session object is persisted, enabling the network diagnostic task to reconstruct the inference context and continue execution after a pause or interruption using the saved diagnostic process state. The preloading context information obtained in the aforementioned preloading phase is saved along with the diagnostic process state after being written to the diagnostic session object, thus connecting the context preloading process before the arrival of the network diagnostic request with the multi-round diagnostic and state recovery process after the arrival of the network diagnostic request.
[0082] Accordingly, embodiments of this application also disclose a network diagnostic device based on predictive session preloading, see [link to relevant documentation]. Figure 2 As shown, the device includes: The abnormal signal determination module 11 is used to acquire abnormal trend signals corresponding to network operation data; wherein, the network operation data includes time-series data of the operation indicators of the monitored network devices; Confidence determination module 12 is used to determine the confidence level of the abnormal trend based on the abnormal trend signal; The context preloading module 13 is used to asynchronously perform context preloading processing based on the triggering entity corresponding to the abnormal trend signal before the network diagnostic request arrives when the confidence level of the abnormal trend meets the preloading triggering condition, so as to obtain preloaded context information; wherein, the triggering entity is the entity associated with the abnormal trend signal; the preloaded context information includes at least topological subgraph information extracted from the topological knowledge graph centered on the triggering entity and historical diagnostic reference information pre-retrieved from the historical root cause analysis retrieval library based on the triggering entity; The conversation draft generation module 14 is used to generate a preloaded conversation draft with time constraints based on the preloaded context information. The session draft matching module 15 is used to determine the target preloaded session draft that matches the network diagnostic request based on the entity matching relationship and timeliness matching relationship between the network diagnostic request and the preloaded session draft when the network diagnostic request arrives. The context injection module 16 is used to inject the preloaded context information in the target preloaded session draft into the diagnostic session object corresponding to the network diagnostic request, so that the diagnostic session object skips the corresponding context cold start operation based on the injected preloaded context information and enters the diagnostic inference process.
[0083] For more detailed information on the working process of each of the above modules, please refer to the relevant content disclosed in the foregoing embodiments, which will not be repeated here.
[0084] Furthermore, embodiments of this application also provide an electronic device. Figure 3 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content of the diagram should not be construed as limiting the scope of this application.
[0085] Figure 3 This is a schematic diagram of the structure of an electronic device 20 provided in an embodiment of this application. Specifically, the electronic device 20 may include: at least one processor 21, at least one memory 22, a display screen 23, an input / output interface 24, a communication interface 25, a power supply 26, and a communication bus 27. The memory 22 stores a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the network diagnostic method based on predictive session preloading disclosed in any of the foregoing embodiments. Alternatively, the electronic device 20 in this embodiment may specifically be a computer.
[0086] In this embodiment, the power supply 26 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 25 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and is not specifically limited here; the input / output interface 24 is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.
[0087] Furthermore, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk, or optical disk, etc. The resources stored thereon may include computer programs 221, and the storage method may be temporary storage or permanent storage. The computer programs 221 may include, in addition to computer programs capable of performing the network diagnostic method based on predictive session preloading executed by the electronic device 20 as disclosed in any of the foregoing embodiments, computer programs capable of performing other specific tasks.
[0088] Furthermore, embodiments of this application also disclose a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the aforementioned network diagnostic method based on predictive session preloading.
[0089] For the specific steps of this method, please refer to the relevant content disclosed in the foregoing embodiments, which will not be repeated here.
[0090] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.
[0091] 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.
[0092] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0093] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, 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. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0094] The foregoing has provided a detailed description of a network diagnostic method, apparatus, device, and storage medium based on predictive session preloading provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A network diagnostic method based on predictive session preloading, characterized in that, include: Obtain abnormal trend signals corresponding to network operation data; wherein, the network operation data includes time-series data of the operation indicators of the monitored network devices; The confidence level of the abnormal trend is determined based on the abnormal trend signal; When the confidence level of the abnormal trend meets the preloading trigger condition, before the network diagnostic request arrives, context preloading processing is asynchronously performed based on the triggering entity corresponding to the abnormal trend signal to obtain preloaded context information; wherein, the triggering entity is the entity associated with the abnormal trend signal; the preloaded context information includes at least topological subgraph information extracted from the topological knowledge graph centered on the triggering entity and historical diagnostic reference information pre-retrieved from the historical root cause analysis retrieval library based on the triggering entity; A preloaded session draft with time constraints is generated based on the preloaded context information; When a network diagnostic request arrives, a target preloaded session draft that matches the network diagnostic request is determined based on the entity matching relationship and timeliness matching relationship between the network diagnostic request and the preloaded session draft. The preloaded context information in the target preloaded session draft is injected into the diagnostic session object corresponding to the network diagnostic request, so that the diagnostic session object skips the corresponding context cold start operation based on the injected preloaded context information and enters the diagnostic inference process.
2. The network diagnostic method based on predictive session preloading according to claim 1, characterized in that, Determining the confidence level of the abnormal trend based on the abnormal trend signal includes: The trend slope score is determined based on the slope of the change in the time series data of the operating indicators corresponding to the abnormal trend signal within the sliding window. A duration score is determined based on the duration of the abnormal trend signal. A historical frequency score is determined based on the historical anomaly frequency of the triggering entity. The trend slope score, duration score, and historical frequency score are weighted according to preset weights to obtain the confidence level of the abnormal trend.
3. The network diagnostic method based on predictive session preloading according to claim 1, characterized in that, The process of generating a preloaded session draft with time constraints based on the preloaded context information also includes: Record the session draft state of the preloaded session draft; The session draft status includes a preloaded state and an expired state; the preloaded state indicates that the preloaded session draft has been generated and is in the waiting matching stage, and the expired state indicates that the preloaded session draft has exceeded the time limit constraint and will not participate in the matching.
4. The network diagnostic method based on predictive session preloading according to claim 1, characterized in that, The asynchronous execution of context preloading processing by the triggering entity corresponding to the abnormal trend signal to obtain preloaded context information includes: Based on the triggering entity corresponding to the abnormal trend signal, a preset asynchronous thread pool is invoked to execute the context preloading task in parallel; wherein, the context preloading task includes a topology context preloading subtask, a historical diagnostic reference information preloading subtask, and a change event preloading subtask; The preloaded context information is obtained based on the execution results of the topology context preloading subtask, the historical diagnostic reference information preloading subtask, and the change event preloading subtask. The context preloading task is executed in an asynchronous execution environment independent of the network diagnostic process, so as to complete the context preloading process without blocking the already started network diagnostic process.
5. The network diagnostic method based on predictive session preloading according to claim 3, characterized in that, The step of determining the target preloaded session draft that matches the network diagnostic request based on the entity matching relationship and timeliness matching relationship between the network diagnostic request and the preloaded session draft includes: Extract the set of request entities corresponding to the network diagnostic request; Obtain the set of preloaded entities corresponding to the preloaded session drafts that are in the waiting matching stage; The entity matching relationship is determined based on the degree of overlap between the requested entity set and the preloaded entity set; The timeliness matching relationship is determined based on the timeliness constraint and the time difference between the arrival time of the network diagnostic request and the generation time of the preloaded session draft. Based on the entity matching relationship and timeliness matching relationship corresponding to each of the preloaded session drafts, the preloaded session drafts whose entity matching relationship represents entity matching and whose timeliness matching relationship represents timeliness matching are determined as the target preloaded session drafts that match the network diagnostic request.
6. The network diagnostic method based on predictive session preloading according to claim 5, characterized in that, The degree of overlap is the Jaccard similarity between the requested entity set and the preloaded entity set. When the Jaccard similarity is greater than a preset similarity threshold, the entity matching relationship is determined to represent entity matching.
7. The network diagnostic method based on predictive session preloading according to claim 5, characterized in that, Also includes: When no preloaded session draft is matched based on the degree of overlap between the request entity set and the preloaded entity set, a coarse-grained match is performed based on the entity type and network domain of the request entity in the request entity set and the entity type and network domain of the preloaded entity in the preloaded entity set corresponding to each preloaded session draft, in order to determine the target preloaded session draft that matches the network diagnostic request.
8. The network diagnostic method based on predictive session preloading according to claim 1, characterized in that, Also includes: The hit rate of the preloaded session draft being matched with the target preloaded session draft within a preset statistical period is calculated. When the hit rate is lower than the first hit rate threshold, the abnormal trend confidence threshold corresponding to the preload trigger condition is increased. When the hit rate is higher than the second hit rate threshold, the abnormal trend confidence threshold corresponding to the preload trigger condition is reduced.
9. The network diagnostic method based on predictive session preloading according to claim 3, characterized in that, Also includes: Scan the preloaded session draft in the preloaded state according to a preset scanning cycle, so as to determine whether the preloaded session draft meets the failure condition based on the time constraint corresponding to the preloaded session draft. When the preloaded session draft meets the failure condition, the cache resources occupied by the preloaded context information corresponding to the preloaded session draft are released, and the session draft status of the preloaded session draft is updated to the failure status.
10. The network diagnostic method based on predictive session preloading according to any one of claims 1 to 9, characterized in that, The step of injecting the preloaded context information from the target preloaded session draft into the diagnostic session object corresponding to the network diagnostic request includes: Write the preloaded context information into the diagnostic process state of the diagnostic session object; Based on the diagnostic process state after writing, a reasoning context is constructed for the current diagnostic round; the reasoning context is used to provide diagnostic basis for the current diagnostic round of the diagnostic session object; The diagnostic session object, after being written with the preloaded context information, is persisted.
11. The network diagnostic method based on predictive session preloading according to claim 1, characterized in that, Before injecting the preloaded context information from the target preloaded session draft into the diagnostic session object corresponding to the network diagnostic request, the method further includes: The timeliness of the preloaded context information is verified. When the timeliness check indicates that at least one of the topological relationships corresponding to the topological subgraph information or the change events related to the triggering entity has been updated after the preloaded session draft is generated, the preloaded context information is incrementally updated based on the updated topological relationships or change events.
12. The network diagnostic method based on predictive session preloading according to claim 1, characterized in that, Also includes: Maintain the maximum number of concurrent preloads; When multiple abnormal trend signals meet the preloading triggering condition, and the sum of the number of context preloading processes corresponding to the multiple abnormal trend signals and the number of context preloading processes currently being executed exceeds the upper limit of the concurrent preloading number, some abnormal trend signals are selected to perform the context preloading process according to the abnormal trend confidence level of the multiple abnormal trend signals from high to low, so that the number of context preloading processes executed at the same time does not exceed the upper limit of the concurrent preloading number. For abnormal trend signals that are not selected, real-time context loading is performed upon arrival of the corresponding network diagnostic request.
13. A network diagnostic device based on predictive session preloading, characterized in that, include: An abnormal signal determination module is used to acquire abnormal trend signals corresponding to network operation data; wherein, the network operation data includes time-series data of the operation indicators of the monitored network devices; The confidence level determination module is used to determine the confidence level of the abnormal trend based on the abnormal trend signal. The context preloading module is used to asynchronously perform context preloading processing based on the triggering entity corresponding to the abnormal trend signal before the network diagnostic request arrives when the confidence level of the abnormal trend meets the preloading triggering condition, so as to obtain preloaded context information; wherein, the triggering entity is the entity associated with the abnormal trend signal; the preloaded context information includes at least topological subgraph information extracted from the topological knowledge graph centered on the triggering entity and historical diagnostic reference information pre-retrieved from the historical root cause analysis retrieval library based on the triggering entity; The session draft generation module is used to generate a preloaded session draft with time constraints based on the preloaded context information. The session draft matching module is used to determine the target preloaded session draft that matches the network diagnostic request based on the entity matching relationship and timeliness matching relationship between the network diagnostic request and the preloaded session draft when the network diagnostic request arrives. The context injection module is used to inject the preloaded context information in the target preloaded session draft into the diagnostic session object corresponding to the network diagnostic request, so that the diagnostic session object skips the corresponding context cold start operation based on the injected preloaded context information and enters the diagnostic inference process.
14. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the network diagnostic method based on predictive session preloading as described in any one of claims 1 to 12.
15. A computer-readable storage medium, characterized in that, Used to store computer programs; wherein, when the computer programs are executed by a processor, they implement the network diagnostic method based on predictive session preloading as described in any one of claims 1 to 12.
