Adaptive time window slicing web page monitoring method

By adopting an adaptive time window slicing method, the problems of blind sampling strategies and causal-temporal inconsistency in web front-end monitoring are solved. It realizes intelligent matching and causal consistency between sampling density and interaction value in web applications, thereby improving the fidelity of monitoring and bandwidth utilization efficiency.

CN121144145BActive Publication Date: 2026-02-03NANJING ARTIFICIAL INTELLIGENCE CHIPS RES INST OF AUTOMATION CHINESE ACAD OF SCI
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202511698304.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-11-19
Publication Date
2026-02-03
Estimated Expiration
2045-11-19

AI Technical Summary

Technical Problem

Existing web front-end monitoring technologies suffer from blind sampling strategies, causal-temporal inconsistencies caused by asynchronous execution, and a lack of rate-distortion trade-off mechanisms when dealing with highly dynamic and asynchronous web applications, making it difficult to achieve a balance between monitoring fidelity and bandwidth overhead.

Method used

An adaptive time window slicing method is adopted. By collecting multi-source Web monitoring data, preprocessing and constructing a unified timeline, the information value metric is estimated. Based on this, sampling instructions are generated, and data is aggregated to generate reporting collection packages. This achieves intelligent matching between sampling density and interaction value, ensures causal consistency of asynchronous events, and achieves a balance between monitoring fidelity and bandwidth overhead.

Benefits of technology

It achieves intelligent matching of sampling density and interaction value in web applications, ensures causal consistency of asynchronous events, and achieves an effective balance between monitoring fidelity and bandwidth overhead, thereby improving the accuracy and efficiency of problem diagnosis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121144145B_ABST
    Figure CN121144145B_ABST
Patent Text Reader

Abstract

The application discloses a self-adaptive time window slicing Web page monitoring method, comprising the following steps: collecting multi-source Web monitoring data, and processing the multi-source Web monitoring data into pretreatment data; constructing a unified timeline based on the pretreatment data; estimating information value metrics based on the pretreatment data and the unified timeline; deciding to generate a sampling instruction containing a time window length based on the information value metrics; and aggregating data from the pretreatment data according to the sampling instruction to generate a reporting collection package. The application can realize intelligent matching of sampling density and interaction value, guarantee the causal consistency of asynchronous events, and effectively balance the monitoring fidelity and bandwidth cost.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of page monitoring, and in particular, it is an adaptive time window slicing web page monitoring method. Background Technology

[0002] As modern web applications evolve towards higher complexity, higher interactivity, and higher concurrency, ensuring user experience and system stability has become a core measure of application quality. Efficient and accurate monitoring of web application front-ends, especially high-fidelity real-time capture of user interaction patterns and application status, is of crucial research significance and commercial value for quickly diagnosing online issues, optimizing performance bottlenecks, and improving user satisfaction.

[0003] Currently, various technical solutions have emerged in the field of web front-end monitoring. These solutions typically rely on deploying probes (SDKs) on the client side to capture user interaction events (such as clicks and scrolling), network requests, JavaScript exceptions, and browser performance metrics. Regarding data collection strategies, some solutions employ fixed-frequency sampling, such as packaging interaction events and page states at fixed intervals (e.g., every 5 seconds); others use full recording to attempt to capture all user operation sequences; and during data reporting, some solutions trigger reporting upon detecting specific errors (such as JS exceptions).

[0004] However, existing monitoring technologies still face challenges when dealing with highly dynamic and asynchronous web applications, such as the blindness of sampling strategies, causal-temporal inconsistencies caused by asynchronous execution, and the lack of rate-distortion trade-off mechanisms. Summary of the Invention

[0005] The purpose of this invention is to provide an adaptive time window slicing web page monitoring method, which aims to solve at least one technical problem existing in the prior art.

[0006] Technical solution: An adaptive time window slicing web page monitoring method, comprising:

[0007] Collect multi-source web monitoring data and process it into pre-processed data;

[0008] A unified timeline is built based on preprocessed data;

[0009] Based on preprocessed data and a unified timeline, estimate the measure of information value;

[0010] Based on information value measurement, the decision generation includes sampling instructions with time window length;

[0011] Based on the sampling instructions, data is aggregated from the preprocessed data to generate a reporting collection package.

[0012] Beneficial effects: This invention enables intelligent matching of sampling density and interaction value, ensures causal consistency of asynchronous events, and achieves an effective balance between monitoring fidelity and bandwidth overhead. Attached Figure Description

[0013] Figure 1 A flowchart illustrating the steps of an adaptive time window slicing web page monitoring method provided in this application embodiment.

[0014] Figure 2 A flowchart illustrating the steps involved in constructing a unified timeline, as provided in this application embodiment.

[0015] Figure 3 A flowchart illustrating the steps for generating a causal alignment stream provided in an embodiment of this application.

[0016] Figure 4 A flowchart illustrating the steps for generating a sampling instruction that includes the length of a time window, as provided in the embodiments of this application. Detailed Implementation

[0017] It should be noted that the terms in the specification and the above-described drawings of this invention include and have, as well as any variations thereof, and are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not necessarily limited to those steps or units that are explicitly listed, but may include other steps or units that are not explicitly listed or that are inherent to such processes, methods, products, or devices.

[0018] The research revealed that blind sampling leads to both data redundancy and the loss of critical information. Strategies based on fixed time windows or simple event counting fail to perceive the urgency or informational value of user interactions. This results in the system collecting a large amount of low-value data when users are silent, while during complex or critical business operations (such as rapid clicks or precise drags), the high-fidelity instantaneous interaction sequences are lost due to coarse sampling granularity, making the problem difficult to reproduce. Furthermore, asynchronous communication between the main thread, worker threads, and network proxies in modern web applications introduces causal-temporal inconsistencies. Traditional timestamp-based sorting methods cannot guarantee the logical causal relationship of events, causing the timeline of the reconstructed monitoring system to contradict the actual execution sequence, misleading developers in locating the root cause of anomalies. Additionally, existing solutions generally lack dynamic rate-distortion trade-off mechanisms, failing to dynamically adjust sampling density and data reporting granularity based on the informational value of interaction events (i.e., their marginal contribution to diagnostic errors), making it difficult to achieve an optimal balance between bandwidth cost and diagnostic fidelity.

[0019] like Figure 1 As shown, an adaptive time window slicing web page monitoring method is proposed, which mainly includes the following steps:

[0020] Collect multi-source web monitoring data and process it into pre-processed data.

[0021] In other words, the system collects multi-source web monitoring data, performs preprocessing including data cleaning and time alignment, to obtain preprocessed data. The system continuously monitors client resource status (CPU, memory, network, battery power) and dynamically adjusts monitoring intensity accordingly. When resources are scarce, the sampling frequency and data processing complexity are automatically reduced; when resources are plentiful, more granular monitoring strategies are implemented.

[0022] In this embodiment, multi-source web monitoring data may include, but is not limited to: raw user interaction events, such as pointer trajectories, clicks, keyboard input, page scrolling, etc.; page context information, such as document object model (DOM) structure, visibility status of page elements, auxiliary semantic tags, etc.; network telemetry data, such as network request queuing, retry count, round-trip time (RTT), etc.; and browser performance metrics, such as key rendering metrics (e.g., LCP, FID, CLS), etc. Collecting this data is to comprehensively capture user behavior and application runtime status. For example, the multi-source web monitoring data is processed into preprocessed data. This process mainly includes: cleaning the raw data, such as denoising and smoothing the pointer trajectories; aligning the event times from different sources; calculating trajectory dynamics features and event intensity features to form dynamic features, such as trajectory curvature complexity and interaction density change rate; generating business weight mappings from page structure and event tracking configurations; and extracting anomaly precursor features and performance features from network and performance signals. This transforms the heterogeneous raw data into a standardized feature stream that can be used for subsequent analysis. Preferably, the above-described data collection and preprocessing steps are executed in a Web Worker thread. By placing these computationally intensive tasks in a worker thread, the main page thread can be avoided, thereby reducing the impact on web application rendering performance and user interaction response, and achieving a balance between monitoring overhead and application performance.

[0023] A unified timeline is built based on preprocessed data.

[0024] Specifically, after obtaining preprocessed data, since this data originates from multiple different executors (e.g., the main page thread, worker threads, network proxies) and may arrive asynchronously, its original order cannot guarantee causal consistency. Therefore, a unified timeline needs to be constructed. Preferably, by attaching logical timestamps (e.g., vector clocks) to different executors and propagating these timestamps during cross-executor communication, combined with finite-length out-of-order buffers and rearrangement rules, the true causal dependencies between events can be reconstructed. Optionally, to improve robustness, the system adopts a hierarchical causal guarantee strategy: first, it attempts precise alignment based on vector clocks; when anomalies are detected (e.g., missing or contradictory timestamps), it automatically degrades to heuristic sorting based on executor priority and timestamps; when resources are extremely limited, it further degrades to simple timestamp sorting. A causally consistent timeline is output, and consistency sections are drawn on this timeline. The unified timeline and section index will serve as a unified reference boundary for subsequent steps of information value estimation and data collection, ensuring that decisions and collection occur on consistent data snapshots.

[0025] Based on preprocessed data and a unified timeline, we estimate the measure of information value.

[0026] In this embodiment, the marginal value of collecting more data at the current time point (i.e., the segment) is evaluated, that is, the contribution of additional sampling to reducing subsequent problem reconstruction or diagnostic errors. Specifically, at each segment, the system uses dynamic features, business weight mapping, anomaly precursor features, performance features, and causal timelines to jointly estimate a quantified information value metric. The information value metric can be implemented in various ways; for example, it can be a reduction in posterior uncertainty characterized by the trace of the Fisher information matrix, or an interaction urgency index that integrates interaction complexity and business importance. To improve real-time performance, the system prioritizes the lightweight interaction urgency index, triggering complex Fisher information matrix calculations only in high-value scenarios and when system resources are sufficient. The interaction urgency index is quickly calculated through predefined business rules and key element matching, reducing decision latency.

[0027] Based on information value measurement, the decision generation includes sampling instructions with time window length.

[0028] Specifically, after obtaining the information value metric, the system needs to decide on a sampling strategy. For example, a rate-distortion optimization objective is established, which aims to minimize the distortion of reconstruction or diagnosis within the constraint of the total bandwidth budget (bitrate). To address the difficulty of quantifying distortion in real time, the system introduces measurable surrogate metrics, including context integrity score, operation sequence coherence index, and critical path coverage. Based on this optimization objective, and combined with the information value metric and the number of bytes of data accumulated in the current segment, the system jointly determines the length of the time window used for event and trajectory acquisition. For example, when the information value metric is high (indicating that the user is performing a complex or critical operation), the system tends to shorten the time window length to increase sampling density; conversely, it widens the time window length to save bandwidth. The decision parameters are automatically calibrated through an online feedback mechanism, and the system continuously evaluates the degree to which the sampled data helps in diagnosing actual problems and adjusts the trade-off coefficients accordingly. Optionally, the system also includes allocating the budget among multiple acquisition channels (such as trajectory, DOM, network, etc.) based on the information value. Finally, a sampling instruction containing the time window length and budget vector is generated.

[0029] Based on the sampling instructions, data is aggregated from the preprocessed data to generate a reporting collection package.

[0030] In this embodiment, the system collects multimodal data at each aspect boundary according to sampling instructions (including time windows and budget vectors). To improve system robustness, the monitoring process adopts a modular design, with components communicating through standard interfaces and a built-in circuit breaker mechanism. When the causal alignment or value assessment component malfunctions, the system automatically degrades to a sampling strategy based on fixed rules to ensure uninterrupted monitoring. For example, when document structure changes exceed a threshold, structural differences are generated; interaction events and trajectories are sliced ​​according to the time window length; and network details and performance segments are collected based on the budget configuration. At the aspect granularity, the collected structural differences, interaction slices, network details, and performance segments are aggregated and accompanied by causal metadata to form a reporting collection package. The system also generates detailed decision logs, recording the inputs and outputs of each step and the reasons for degradation, providing a basis for subsequent optimization. Furthermore, the reporting collection package is serialized, compressed, and encrypted before being submitted to the server. Simultaneously, it will generate a playback index for playback and diagnosis, and receive reported status as feedback signals for subsequent online calibration of adaptive parameters (such as information value model and rate-distortion parameter).

[0031] In one possible implementation, multi-source web monitoring data is processed into preprocessed data, specifically as follows:

[0032] The system reads the original interaction events and resamples the continuous pointer trajectories according to a uniform time granularity (e.g., 16 milliseconds), while removing obvious outliers to form a trajectory sequence and an event sequence. Preferably, the system uses a statistical outlier detection method, considering trajectory points that deviate from the moving average by more than three standard deviations as outliers and removing them. The system reads the trajectory sequence, event sequence, and page context information, performs interpolation alignment based on the same time reference (e.g., the browser's `performance.now()`), and smooths high-frequency jitter data to obtain a standardized interaction stream and context stream. Based on this, business semantic extraction and weight mapping are performed. The system reads the context stream and page context, calculates the business importance of page elements based on their roles (e.g., whether they are buttons, links, or input boxes), visibility status (whether they are within the viewport), and the business-preset tracking configuration (e.g., marked as a key payment button), and generates a business weight mapping. The business weight mapping adopts a hierarchical scoring mechanism: the base score is determined by the element's role (e.g., button = 0.6, link = 0.3), then weighted according to visibility status (in-viewport × 1.5, out-of-viewport × 0.5), and finally superimposed with the priority coefficient configured by the business (key payment buttons × 3.0). The system reads the standardized interaction flow and calculates two key dynamic features: trajectory curvature complexity and interaction density change rate. To balance computational accuracy and performance overhead, the system dynamically selects the feature calculation strategy based on the current device performance: high-performance devices use accurate algorithms, and low-performance devices use simplified approximations. Trajectory curvature complexity is used to quantify the fineness and turning strength of the pointer trajectory, and can be calculated using the following discrete approximation formula: k t =||(p t -p t-1 )x(p t-1 -p t-2 )|| / (||p t -p t-1 || 3 +ε); where p t p t-1 p t-2 , respectively, represent the two-dimensional position vectors of the pointer at the current time, the previous time, and the time two moments ago; x represents the magnitude of the three-dimensional outer product of the two-dimensional vectors, used to measure the steering intensity; ||•|| represents the vector norm; ε is a small positive number (e.g., 1e). -6 ), used to avoid the denominator being zero and ensure numerical stability; k t This is an approximation of the curvature at time t. In simplified mode, the system uses the cosine of the angle between adjacent line segments as an approximate estimate of the curvature complexity, reducing computational complexity. As an example, if p t =(10, 10), p t-1 =(5, 8), p t-2=(1,1), then k can be calculated by substituting it into the above formula. t higher k t The value indicates that the trajectory is undergoing a sharp turn. The rate of change of interaction density is used to quantify the suddenness of discrete interaction events (such as clicks) and can be calculated using the discrete derivative of the event density: a t =(n t -n t-1 ) / Δt; where n t n represents the number of interactive events observed within the current time interval t; t-1 Δt represents the number of interactive events observed in the previous time interval; Δt represents the time span between adjacent time intervals; a t This represents the rate of change in the number of interaction events. The system uses a sliding time window to count events, with the window size adaptively adjusted based on the current interaction rhythm: automatically shrinking the window to improve sensitivity when dense interactions are detected, and expanding the window to enhance stability when interactions are sparse. As an example, if Δt is 100 milliseconds, the previous interval n... t-1 For one event, the current interval n t If there are 5 events, then a t =(5-1) / 0.1=40 (pieces / second) 2 This indicates a sharp increase in interaction density. The system reads network telemetry and performance metrics, and statistically analyzes network retries, abrupt changes in queuing latency, and quantiles of key rendering metrics to obtain anomaly precursor features and performance characteristics. The standardized interaction flow, context flow, and dynamic features (k...) generated above are then... t a t The system aggregates business weight mapping, anomaly precursor features, and performance features to form a unified feature vector, which is then standardized to ensure consistency in the dimensions of each feature. A quality flag is set for each feature component; when a feature calculation fails or data is incomplete, the corresponding flag is set for reference by subsequent processing modules. This serves as a unified input for subsequent causal reconstruction and adaptive control.

[0033] like Figure 2 As shown, in one exemplary embodiment, constructing a unified timeline includes:

[0034] Identify events in preprocessed data that originate from a predetermined number of executors, wherein the executors include at least the main page thread, worker threads, and network proxies.

[0035] In this embodiment, executor registration and logical time stamp initialization are performed. Specifically, upon system startup, events originating from multiple executors are identified in the preprocessed data. An executor includes at least the main page thread, worker threads, and network proxies (e.g., Service Workers or other network interception layers). The system maintains an execution registry, recording the identifier, type, and status information of each executor. The system establishes message channels between these executors and initializes a local logical time stamp for each executor, such as a vector clock with a dimension equal to the number of executors, typically with an initial value of all zeros. Simultaneously, the system initializes an executor health status monitor to detect the activity level and communication quality of each executor.

[0036] The system applies out-of-order buffering and rearrangement rules to events originating from a predetermined number of executors to establish causal consistency among events and generate a causal alignment flow. Optionally, the system employs a hierarchical causal guarantee strategy, dynamically selecting the most suitable alignment algorithm based on the current system state and environmental conditions.

[0037] like Figure 3 As shown, in a preferred embodiment, generating a causal alignment stream includes:

[0038] Initialize and propagate time-stamp vectors for a predetermined number of executors;

[0039] When an event is passed across execution entities, the sending execution entity increments the timestamp vector, and the receiving execution entity performs a bitwise merge operation on the received timestamp vector and the pre-stored local timestamp vector.

[0040] The order of events is determined based on the partial order relationship between the merged time-scaled vectors after taking the largest bit, and a causal alignment stream is generated.

[0041] Specifically, the system executes vector-based timestamp propagation and comparison rules to initialize and propagate timestamp vectors for multiple executors. When an event (or message) is transmitted across executors, the following rules apply: Before sending a message, the sending executor (e.g., the main thread) increments the dimension component corresponding to itself in its local timestamp vector. After receiving a message, the receiving executor (e.g., a worker thread) performs a bitwise merge between the received timestamp vector and its local timestamp vector, i.e., each component of the local vector is updated to the larger of the local value and the received value. The system also records an operation log for each timestamp merge, including the vector state before and after the merge, the timestamp, and the executor identifier, for subsequent troubleshooting and consistency verification. As an example, suppose there are three executors A, B, and C, with timestamp vectors [A, B, C]. The initial state is: A = [0, 0, 0], B = [0, 0, 0], C = [0, 0, 0]. An event occurs in A and is sent to B: A increments its own component to [1, 0, 0] and sends [1, 0, 0] to B. B receives [1, 0, 0]: B's local value is [0, 0, 0]. After rounding and merging by the largest bit, B updates to [1, 0, 0]. B experiences an event and sends it to C: B increments its own component to [1, 1, 0] and sends [1, 1, 0] to C. C receives [1, 1, 0]: C's local value is [0, 0, 0]. After rounding and merging by the largest bit, C updates to [1, 1, 0]. The system detects that C's timestamp vector transitions from [0, 0, 0] to [1, 1, 0] and records the causal path of this transition as A→B→C. In this way, the timestamp vector carries the causal history of the event. In a preferred implementation, to reduce memory usage, the timestamp vector can be compressed. For example, inactive execution dimensions can be truncated, or repeated prefixes can be compressed using run-length compression. The system maintains the activity score of the execution entity, dynamically adjusts the vector dimension based on communication frequency and recent active time, freezes the dimension of the execution entity that has been inactive for a long time, and unfreezes the corresponding dimension only when it is detected that the entity has become active again.

[0042] Based on this, consistency aspect marking and out-of-order rearrangement are performed. The system applies out-of-order buffering and rearrangement rules to establish causal consistency between events and generate causal aligned flows. Specifically, the rearrangement rules determine the order of events based on the partial order relationship between time-stamped vectors. The partial order relationship is defined as follows: for two event time-stamped vectors v and w, time-stamped vector v is causally prior to or parallel to time-stamped vector w (denoted as v ≦ w) if and only if all dimension components of time-stamped vector v are less than or equal to the corresponding dimension components of time-stamped vector w (i.e., for all i, v ≦ w). i ≤w iIf neither v≦w nor w≦v, then the two events are parallel. For parallel events, the system employs a multi-factor decision-making mechanism: first, it considers the priority of the execution body type (main thread > user interaction thread > network thread > worker thread); second, it references the event arrival timestamp; and finally, it fine-tunes based on the semantic relevance of the events. Within a finite-length buffer, the system performs topological sorting based on this partial order relationship, prioritizing the output of all minimum elements (events without predecessors), and sorts parallel events according to preset rules (such as execution body priority and arrival time), thereby generating a causal aligned flow. The system monitors the buffer status in real time. When the buffer usage exceeds a threshold, it automatically triggers an aggressive rearrangement strategy, prioritizing the output of high-value events and discarding low-value stale events when necessary to maintain system real-time performance.

[0043] Optionally, the triggering strategy for aspect marking can employ a hybrid strategy that combines information value and timer operation. That is, the aspect is triggered when any of the following conditions are met: I(VoI) t ≥τ) or I(tt*≥Δ); where I is an indicator function (1 if the condition is true, 0 otherwise); VoI t τ is the information value; t is the information value threshold; t is the current time reference; t* is the time reference of the previous slice; Δ is the timer interval. The system dynamically adjusts the τ and Δ parameters based on the historical slice quality: when multiple consecutive slices contain high-value information, τ is appropriately reduced to improve sensitivity; when the system load is heavy, Δ is appropriately increased to reduce the slice frequency. The triggering strategy for slice marking makes the information value (VoI)... t This can guide the partitioning of aspects in reverse. When the system detects a high information value event (VoI), t Even if the timer interval Δ is not reached (≥τ), the aspect will be triggered immediately, achieving an instant response to critical moments. This is the closed-loop feedback for adaptive control. In a preferred implementation, the system can set a lateness threshold. For events that arrive late due to network latency or other reasons (i.e., late events), a placeholder insertion or auxiliary queuing strategy is used for compensation to avoid the aspect failing to close due to individual lateness. The system maintains a late event statistics table. When the frequency of late events for a certain execution entity exceeds the threshold, the buffer size of that execution entity is automatically adjusted or a predictive buffering strategy is adopted. Preferably, after generating the causal alignment flow and aspect index, the system performs a consistency check to ensure that there are no spurious causal events within the aspect. The check rule can be expressed as: no spurious causality exists (e i e j ) st e j → e I ∧ e i ⊕ e j ; where e i and e jFor two events within the aspect; → indicates a true causal precedence relationship (determined by the time-stamped vector); ⊕ indicates the order in the final causal aligned stream; ∧ represents logical AND. The validation rule means that a result (e) is not allowed. i The reason (e) was ranked in the output sequence. j The previous situation. For sections that fail to be validated, the system takes different measures depending on the severity of the failure: minor contradictions are automatically repaired, while serious contradictions are marked as low-quality sections and detailed diagnostic information is recorded.

[0044] A unified timeline is constructed based on causal alignment flow.

[0045] In this embodiment, causal timeline generation is performed. Based on causal alignment flow and aspect index, the system completes the necessary page state context at the boundary by identifying related events before and after the closure of each aspect boundary, constructs a causal timeline, and publishes it as a unified reference frame handle to subsequent information value estimation and data aggregation modules. The system generates a quality score for each aspect, including causal consistency score, event completeness, and time accuracy, for reference by subsequent modules.

[0046] According to one aspect of this application, after compressing and storing the time-stamped vector (e.g., run-length compression), constructing a unified timeline further includes: performing integrity verification on the compressed time-stamped event sequence.

[0047] Specifically, the system preferably calculates a verification digest for each batch of compressed time-stamped event sequences. This verification digest is used to check whether any anomalies occur during the propagation or compression of the time-stamped data. For example, if the system detects through verification that a component of the time-stamped vector has regressed (violating the monotonically increasing property of the logical clock), or that dimension information of a critical execution entity is missing, the system can trigger an internal alarm and generate a time-stamped verification report. This report can be used by subsequent out-of-order reordering steps to determine whether to discard the abnormal batch or initiate compensation logic, thereby improving the robustness of the causal alignment stream.

[0048] The system establishes a time-stamped anomaly classification system, dividing anomalies into recoverable anomalies (such as timing reversals caused by temporary network jitter) and unrecoverable anomalies (such as causal chain breaks caused by execution unit crashes), and adopts corresponding recovery strategies for different types.

[0049] In one embodiment of this application, estimating the information value metric includes:

[0050] Based on preprocessed data and a unified timeline, joint features are constructed at the aspect granularity.

[0051] In a preferred embodiment, constructing joint features at the section granularity includes:

[0052] Dynamic features, business weight mapping, anomaly precursor features, and performance features are extracted from the preprocessed data; at the sectional boundary of the unified timeline, the dynamic features, business weight mapping, anomaly precursor features, and performance features are aggregated to form joint features.

[0053] In this embodiment, the system aggregates preprocessed data at the sectional boundary of a unified timeline to form joint features. Specifically, it aggregates trajectory turning intensity (k) at the sectional granularity. t ) and event density (a t The system obtains dynamic aggregation features by fusing business weight mapping with the visibility state of elements in the current context flow. It then generates business semantic features by extracting mutation and fluctuation indicators from anomaly precursor features and performance features, concatenating them into precursor and performance features. The system employs a feature importance evaluation mechanism, dynamically adjusting feature weights based on the contribution of each feature to the final diagnostic result in historical data, eliminating redundant features, and highlighting key indicators. The system performs unified normalization and cross-page consistency calibration on the aforementioned dynamic aggregation features, business semantic features, precursor and performance features to obtain the information value input set. The normalization process uses adaptive quantile scaling technology, which effectively handles non-normal distributions of feature values ​​and outlier interference. This information value input set is the joint feature constructed at the aspect granularity (denoted as x). t ).

[0054] Based on joint features, a posterior probability model is established to characterize diagnostic uncertainty.

[0055] Specifically, the posterior probability model (p θ (y|x t )) is used to describe the joint feature x of a given current section. t The posterior probability of the target event y (e.g., an anomaly or critical state transition) is calculated. The posterior probability model is characterized by the parameter θ. To balance model complexity and real-time requirements, the system employs a lightweight ensemble learning framework, combining the prediction results of multiple simple base models (such as logistic regression and decision trees) and generating the final posterior probability estimate through weighted voting. During system initialization, the posterior probability model can be initially calibrated using historical labeled samples (e.g., historical anomaly hit records) provided by the playback side. The system uses an incremental learning strategy, retaining only the most representative historical samples to prevent the model from becoming bloated and inefficient over time.

[0056] Calculate the expectation of the log-likelihood gradient of the posterior probability model with respect to the parameters of the posterior probability model to obtain the Fisher information matrix.

[0057] For example, the calculation process can be expressed as: F t =E[(▽ θ logp θ (y|xt ))*( ▽ θ logp θ (y|x t )) T ]; where F t The Fisher information approximation matrix is ​​on section t; E[•] is the mathematical expectation operator; ▽ θ It is the gradient operator with respect to the parameter θ; p θ (y|x t ) is a posterior probability model; x t y represents the joint feature of the current aspect; y represents the target event label (e.g., whether an anomaly has occurred). T F represents the transpose of a matrix. t The physical meaning of a matrix is ​​that it measures the current data x. t The sensitivity to model parameters θ refers to the extent to which current data provides information about parameters θ. In actual computation, the system uses the empirical distribution of samples within a sliding window to approximate the mathematical expectation and employs regularization techniques to prevent matrix singularity issues.

[0058] The information value measure is obtained by calculating the trace of Fisher's information matrix.

[0059] For example, the calculation process of information value measurement can be represented as: VoI t =tr(F t ); where tr represents the trace operation of a matrix (i.e., the sum of the elements on the main diagonal of the matrix), VoI t As a scalar, it quantifies the information value at the current cross-section t. The system simultaneously considers the condition number and other spectral properties of the matrix; when ill-conditioned matrices are detected, it automatically switches to an eigenvalue-weighted information value calculation method, improving the stability of the metric. High VoI t The value represents the data x of the current aspect. t Sampling should be increased to significantly reduce the model's uncertainty regarding the target y. Preferably, the information value model has online adaptive capabilities. The system continuously receives feedback from the playback side (e.g., hit or miss records confirmed by the playback system) and uses this feedback to adjust the posterior probability model p. θ (y|x t The parameters θ are updated in small steps. The update process can employ stochastic gradient descent with momentum to maintain model stability while rapidly adapting to new patterns. Simultaneously, the system monitors the joint features x. t The system detects distribution drift and automatically triggers a model recalibration process when a significant distribution change is detected. This process includes feature reselection, model structure optimization, and hyperparameter tuning. This enables the information value estimation model to adapt to changes in business logic or shifts in user behavior patterns, ultimately outputting a robust information value sequence (VoI). tThis sequence will be used for subsequent rate-distortion decisions and fed back as a feedback signal to guide the triggering of the consistency aspect. The system provides this for each VoI. t The value is accompanied by a confidence interval. When the confidence interval is too wide, it indicates that the uncertainty of the value estimate is high, which is provided for the decision-making module to refer to.

[0060] like Figure 4 As shown, in a preferred embodiment, the decision generation includes a sampling instruction containing the time window length, comprising:

[0061] A rate-distortion optimization objective is established, which characterizes the trade-off of minimizing reconstruction or diagnostic distortion metrics under a given bandwidth consumption bit rate metric constraint.

[0062] In this embodiment, when establishing the rate-distortion optimization objective, the system needs to define a section-level reconstruction or diagnostic distortion metric (D). t ) and bitrate or bandwidth consumption metrics (R t ). Reconstruction or diagnostic distortion measure D t The smaller the value, the more accurate the playback and positioning; the bitrate or bandwidth consumption metric R... t The smaller the value, the less bandwidth is used. To address the difficulty in real-time quantification of distortion, the system introduces measurable proxy quality metrics, including context integrity score, operation sequence coherence index, and critical path coverage, to indirectly assess the degree of distortion. The rate-distortion optimization objective is used to characterize the bit rate metric (Rb) consumed within a given bandwidth. t Under the constraint of ) the measurement of reconstruction or diagnostic distortion (D t The minimization tradeoff of ). The objective can be expressed as: min Wt,a*t E[D t |W t , a* t ]+λ*E[R t |W t , a* t ]; where W t The length of the time window used for event and trajectory acquisition on the section t; a* t E[•] is the budget vector for each acquisition channel on the cross section t; E[•] is the mathematical expectation operator; λ is the Lagrange multiplier, used as a tradeoff coefficient, to adjust for distortion (D). t ) and bandwidth (R t The system employs a multi-objective optimization framework, balancing monitoring quality, bandwidth consumption, computational load, and user experience.

[0063] Based on the rate-distortion optimization objective and combined with information value measurement, the sampling instructions are generated.

[0064] Preferably, generating the sampling instruction includes:

[0065] Information value is defined as Information Value (VoI). t ; Get the number of bytes of data collected in the current time segment. t Based on information value (VoI) t With the number of bytes of collected data t The original solution W of the time window for calculating the functional relationship. raw_t The original solution W of the time window raw_t With (VoI) t / (bytes t+1 The time window calculation is inversely proportional to the square root of the sum of its components. The system simultaneously considers current network conditions, device performance, and user interaction patterns, performing multi-factor corrections on the time window calculation. When network conditions are good and device performance is sufficient, the sampling density is appropriately increased; when resources are scarce, sampling is conservative. The original solution W for the time window is then used. raw_t The time window length in the sampling instruction is generated within the preset upper and lower boundaries of the window.

[0066] Alternatively, the process of finding the original solution within the time window can be expressed as: W raw_t =clip(W min W max c / sqrt(VoI) t / (bytes t+1 )+ε)); where W raw_t It is the original solution within the time window of the section t; clip(•) is the truncation operator, used to constrain the calculation results to the upper and lower boundaries W of the preset window. min and W max Inside; c is the scaling factor that maps information value to a time scale, used to control sensitivity; ε is a small positive number that avoids a denominator of zero (e.g., 1e). -6 It can be seen that the original solution W of the time window raw_t With (VoI) t / (bytes t+1 The value of information (VoI) is inversely proportional to the square root of the information value. t High (high information value) or number of bytes of collected data t When the value is very small (low budget), the VoI in the denominator t / (bytes t+1 The larger the value, the larger its square root, resulting in a larger W when c is divided by that value. raw_t When the information value (VoI) is relatively small, the system decision-making time window is shortened, and the sampling density is increased. Conversely, when the VoI is relatively large... t Very low (low information value) or number of bytes collected t When the time window is very large (more budget already used), the original solution Wraw_t The system's decision-making time window is extended to save bandwidth due to the larger bandwidth. The system employs a dynamic boundary adjustment mechanism, adaptively adjusting W based on application type and monitoring requirements. min and W max For critical business scenarios requiring high-fidelity monitoring, the window boundaries are automatically tightened; for ordinary browsing scenarios, the boundaries are appropriately widened to save resources.

[0067] In one possible example, suppose W min =200 milliseconds, W max =5000 milliseconds, c=1000, ε=1e -6 Scenario 1 (Low Value): VoI t =10, bytes t =100. sqrt(10 / 101+ε) is approximately equal to 0.315. The calculated result W of the original solution for the untruncation time window is obtained. raw_t_calc =1000 / 0.315 is approximately 3174 milliseconds. (After truncation, W...) raw_t =3174 milliseconds. Scenario 2 (High Value): VoI t =500, bytes t =100. sqrt(500 / 101+ε) is approximately equal to 2.225. Calculation yields W. raw_t_calc =1000 / 2.225 is approximately 449 milliseconds. (After truncation, W...) raw_t =449 milliseconds. Scenario 3 (High Value but Tight Budget): VoI t =500, bytes t =5000. sqrt(500 / 5001+ε) is approximately equal to 0.316. Calculation yields W. raw_t_calc =1000 / 0.316 is approximately 3164 milliseconds. (After truncation, W...) raw_t =3164 milliseconds. The example above shows that the decision-making process takes into account both information value and budget consumption.

[0068] It should be noted that the tradeoff coefficients λ and c in the above formula are not fixed. The system can fine-tune and calibrate λ and c online based on historical performance data (e.g., historical anomaly hit rates and actual bandwidth usage) to achieve closed-loop adaptive decision-making. The system establishes a parameter tuning feedback loop, periodically evaluates the effectiveness of the sampling strategy, including anomaly capture rate, problem localization accuracy, and resource utilization efficiency, and automatically adjusts the parameters λ and c based on the evaluation results using a Bayesian optimization method.

[0069] In a further embodiment, to prevent the original solution of the time window from being... raw_t Frequent and drastic fluctuations cause jitter in the system's sampling density, and also include hysteresis suppression, specifically:

[0070] Obtain the stable time window W of all the above surfaces t-1 , as well as the hysteresis threshold and adjustment step size;

[0071] The original solution W of the time window raw_t With stable time window W t-1 Compare with the hysteresis threshold;

[0072] If the original solution of the time window is W raw_t If the contraction or relaxation condition is triggered, the stabilization time window W is adjusted within the adjustment step size limit. t-1 A new stable time window W is obtained. t ;

[0073] If the condition is not triggered, then the stable time window W t Maintain a stable time window W t-1 ;

[0074] The stable time window W t The time window length is used to achieve hysteresis suppression and generate sampling commands.

[0075] In this embodiment, the system obtains the stable time window W of the upper cross surface. t-1 and a preset hysteresis threshold (e.g., h) down h up ) and adjustment step size (e.g., Δ) down Δ up The hysteresis threshold and adjustment step size are dynamically adjusted based on the current system stability requirements: when the user interaction pattern is detected to be stable, a larger hysteresis threshold and a smaller adjustment step size are used to ensure smoothness; when the interaction pattern changes rapidly, the hysteresis threshold is appropriately reduced and the adjustment step size is increased to improve response speed. The original solution W for the time window is... raw_t With stable time window W t-1 And compare with the hysteresis threshold. If the original solution W of the time window raw_t Triggering contraction conditions (e.g., W) raw_t <W t-1 -h down If W is within the adjustment step size limit, then adjust the stable time window W. t-1 A new stable time window W is obtained. t =W t-1 -Δ down If the original solution W of the time window raw_t Triggering relaxed conditions (e.g., W) raw_t >W t-1 +h up If W is within the adjustment step size limit, then adjust the stable time window W. t-1 A new stable time window W is obtained. t =W t-1 +Δup If the condition (i.e., W) is not triggered. raw_t Located in [W t-1 -h down W t-1 +h up Within the hysteresis band, the steady-state time window W t Keep as W t-1 The system records the detailed reasons and effects of each hysteresis adjustment, forming an adjustment history, which is used to optimize hysteresis parameters. As an example, assume W... t-1 =1000 milliseconds, h down =100, h up =100, Δ down =50, Δ up =50. The hysteresis band is [900, 1100] milliseconds. Case 1 (within the hysteresis band): W raw_t =1050 milliseconds, condition not triggered, W t Maintain for 1000 milliseconds. Scenario 2 (Triggered contraction): W raw_t =800 milliseconds, below 900, triggers contraction, W t =1000-50=950 milliseconds. Scenario 3 (Trigger Relaxation): W raw_t =1200 milliseconds, higher than 1100, trigger relaxation, W t =1000 + 50 = 1050 milliseconds. The system incorporates a trend prediction mechanism based on hysteresis damping. When a continuous unidirectional trend is detected, adjustments are made in advance to improve response delay. This hysteresis damping mechanism ensures a smooth transition of the time window length. The system will stabilize the time window W. t As the time window length, and its (along with the budget vector a*) t Together with the above, a sampling instruction is generated. The sampling instruction contains complete decision metadata, including time window length, budget allocation, decision confidence level, and recommendation validity period, for subsequent data collection modules to refer to and execute.

[0076] According to one aspect of this application, based on the information value VoI t With the number of bytes of collected data t The original solution W of the time window for calculating the functional relationship. raw_t The subsequent steps for generating sampling instructions include:

[0077] The original solution W for the time window raw_t Perform a consistency check between feasible region projection and constraints.

[0078] It should be noted that the original solution W is calculated within the time window. raw_tWhile the clip(•) operator constrains the upper and lower boundaries of the window, the system may have other constraints, such as the maximum allowable rate of change (i.e., W) set by the global bandwidth policy. t With W t-1 (The difference cannot be too large) or there is a dynamic rate limit. Therefore, in this embodiment, the system will check the calculated original solution W of the time window. raw_t Does it satisfy all these constraints? The system maintains a constraint knowledge base, containing various constraints such as bandwidth policies, performance limits, and business rules, and supports dynamic updates and priority settings for constraints. If the original solution W within the time window... raw_t If the constraint is not met (e.g., its slope is too large), the system projects it into the feasible region, adjusting it to the value closest to the allowable value of the current constraint, thus obtaining a feasible solution for the time window. The projection process employs a multi-objective optimization method, aiming to maintain the intent of the original solution while satisfying hard constraints. For conflicting constraints, the system weighs them according to constraint priority and records the resolution log of constraint conflicts. This feasible solution for the time window is then passed to subsequent hysteresis damping steps for processing, ensuring that the final output stable time window W... t The system consistently satisfies global constraint consistency. After each constraint check, the system generates a constraint consistency report, including the triggered constraint conditions, projection adjustment magnitude, and consistency score, which is used to monitor decision quality and support subsequent optimization.

[0079] In another embodiment of this application, the estimation of information value measurement may also be:

[0080] Based on preprocessed data and a unified timeline, an interaction urgency index is calculated; this index is then used as a measure of information value.

[0081] In this embodiment, the Interaction Urgency Index (IUI) is used as a measure of information value. This index comprehensively quantifies the intensity, complexity, and intent of user interactions through multi-dimensional mathematical indicators. Specifically, calculating the Interaction Urgency Index includes: calculating the trajectory curvature complexity for continuous pointer trajectories in the preprocessed data. The Trajectory Curvature Complexity (TCC) quantifies the fineness and exploratory nature of user operations. For discrete interaction events in the preprocessed data, the Interaction Density Change Rate (IDC) is calculated. For example, discrete interaction events can be clicks or keystrokes; the IDC quantifies the suddenness and density of discrete events. The page context is fused from the preprocessed data to obtain business value weights. The Context-aware Business Weight (CBW) is derived from a business weight mapping; for example, when an interaction occurs on a high-weight user interface (UI) element such as a payment button or form submission, this weight value is higher. The system establishes a business element weight library, continuously optimizes the weight assignment of each UI element through machine learning, and supports differentiated weight configuration based on page type and user group. Based on a unified timeline, it normalizes and weights the trajectory curvature complexity, interaction density change rate, and business value weights to generate an interaction urgency index. The system employs a dynamic weight adjustment mechanism, automatically optimizing the values ​​of α, β, and γ according to monitoring objectives and environmental conditions. For example, it increases the β weight in performance monitoring scenarios and increases the α weight in user experience optimization scenarios. Exemplarily, this calculation process can be expressed as: IUI = α * norm(TCC) + β * norm(IDC) + γ * w b ; where α, β, and γ are configurable weight coefficients used to adjust the algorithm's emphasis on operational granularity, operational burstiness, and business value; typically α + β + γ = 1. norm(•) is a normalization function, such as min-max normalization, which scales the values ​​of TCC and IDC to the [0, 1] interval. b This refers to the business value weight. Preferably, the normalization process uses the adaptive quantile method, which can effectively handle the differences in the distribution of indicator values ​​under different interaction modes and avoid the distortion of the normalization results by extreme values.

[0082] In one possible example, assume α = 0.4, β = 0.4, γ = 0.2. Case 1 (Silent Browsing): The user slowly moves the mouse in a straight line on the page, resulting in a low TCC, and after normalization, norm(TCC) = 0.1; no clicks, IDC = 0; the mouse is in a non-critical area, w b=0.1. Therefore, IUI = 0.40.1 + 0.40 + 0.20.1 = 0.06. Scenario 2 (Complex Operation): The user quickly and complexly drags the slider within a small area (high TCC), accompanied by multiple clicks (high IDC), and the slider is a critical business element (high w). b At this point, norm(TCC) = 0.9, norm(IDC) = 0.8, w b =1.0. Therefore, IUI = 0.4 + 0.9 + 0.4 + 0.8 + 0.2 + 1.0 = 0.36 + 0.32 + 0.2 = 0.88. The system calculates a confidence score for each IUI value, considering the completeness and reliability of each input indicator. When the confidence score is below the threshold, it is marked as a low-quality assessment. A high IUI value (e.g., 0.88) indicates a high urgency of the current interaction, and the system should perform granular monitoring. The system establishes a mapping relationship between IUI values ​​and monitoring strategies, presets corresponding sampling densities and data granularities for different IUI ranges, and achieves hierarchical monitoring intensity control.

[0083] In one possible implementation, calculating the trajectory curvature complexity includes: obtaining the position vector sequence (pi) from the current and historical time points in a continuous pointer trajectory. t p t-1 p t-2 By calculating the discrete approximation of the position vector sequence, the discrete curvature approximation value k is obtained. t The system characterizes the curvature complexity of the trajectory. It employs multiple curvature estimation algorithms in parallel computation, including an approximation method based on triangle area and a method based on corner accumulation, and selects the most suitable algorithm result based on the trajectory characteristics.

[0084] Calculating the rate of change of interaction density includes: statistically analyzing discrete interaction events over the current time interval (n... t ) and the previous time interval (n) t-1 The number of events is calculated; the rate of change of the number of events over a time span (Δt) is obtained, yielding the rate of change a. t The system characterizes the rate of change in interaction density. It employs multi-timescale analysis, simultaneously calculating interaction density changes at the second, 100-millisecond, and 10-millisecond levels to comprehensively capture event burst patterns at different granularities.

[0085] In another possible implementation, the computation of trajectory curvature complexity includes: real-time analysis of the coordinate sequence of continuous pointer trajectories to obtain the velocity vector (v... t ) and acceleration vector (a') t The instantaneous curvature κ is estimated by calculating the ratio of the magnitude of the cross product of the velocity vector and the acceleration vector to the cube of the magnitude of the velocity vector. For example, the instantaneous curvature κ can be expressed as: κ≈|v t ×a' t | / |vt | 3 The system performs statistical processing on recent (e.g., within the past 100 milliseconds) instantaneous curvature κ sequences, such as calculating their standard deviation or mean, to obtain the trajectory curvature complexity. A quality assessment mechanism for curvature features is established; when trajectory points are too sparse or the velocity is too low, the system automatically marks the curvature calculation results as unreliable and employs a backup trajectory complexity assessment method.

[0086] The calculation of the interaction density change rate includes: defining the reciprocal of the time interval (Δt) of continuous discrete interaction events as the instantaneous interaction speed (v=1 / Δt); calculating the first derivative of the instantaneous interaction speed to obtain the first derivative a (a=dv / dt), which characterizes the interaction density change rate. The system uses a sliding window fitting technique to calculate the derivative, reducing noise interference, and simultaneously detecting pattern changes in interaction rhythm, such as periodic clicks or random operations. The system introduces an interaction pattern recognition module to classify the current interaction behavior into known patterns (such as form filling, content browsing, game operation, etc.), and adjusts the IUI calculation strategy based on pattern characteristics to improve the context relevance of the evaluation.

[0087] In one embodiment of this application, the decision generation sampling instruction including the time window length can also be:

[0088] Get the preset upper and lower boundaries W of the window min and W max And the gain coefficient K. For example, W min =200 milliseconds, W max =5000 milliseconds, K=10.

[0089] The time window length W is calculated using the inverse proportional function based on the Interaction Urgency Index (IUI), where the time window length W is determined by the following relationship: W = W min +(W max -W min The system dynamically adjusts W based on device performance, network conditions, and service requirements. min W max And the K parameter. Employ more granular monitoring strategies on high-end devices and more conservative settings in resource-constrained environments.

[0090] Specifically, the decision logic for the time window length W formula is as follows: when the interaction urgency index IUI is very high (e.g., 0.88), the value of (1+K*IUI) is very large (1+10*0.88=9.8), causing the fractional term (W) to... max -W min The value of (5000-200) / (1+K*IUI) is very small ((5000-200) / 9.8≈490 milliseconds). Therefore, W = 200 + 490 = 690 milliseconds. The system automatically shrinks the time window to be close to W.min The system captures operation sequences at a high temporal resolution. When IUI is low (e.g., 0.06), the value of (1+K*IUI) is small (1+10*0.06=1.6), resulting in a large value for the fractional term ((5000-200) / 1.6=3000 milliseconds). Ultimately, W=200+3000=3200 milliseconds. The system automatically expands the time window to close to W. max The system optimizes its performance by merging sparse events and reducing system overhead. A quality feedback mechanism for time-window decisions is established, evaluating the rationality of the time window settings through subsequent problem diagnosis and optimizing the parameters of the inverse proportional function accordingly. Simultaneously, the system records the effectiveness of time-window decisions across different IUI intervals, forming a decision-making experience base.

[0091] In this embodiment, the time window W can be directly calculated based on the interaction urgency index IUI and used to generate sampling instructions without going through the hysteresis damping step. The system provides configurability of the decision path, allowing users to choose whether to enable hysteresis damping based on application characteristics. For applications with stable interaction modes, hysteresis can be disabled to improve response speed, while for scenarios with variable interaction modes, it is recommended to enable hysteresis to ensure stability. However, in some optional implementations, the time window W can also be regarded as the original time window solution W. raw_t The system also applies hysteresis damping logic to achieve smoother window adjustments. When hysteresis damping is enabled, the system configures hysteresis parameters separately for IUI-based decisions, taking into account the variation characteristics of the IUI value itself, such as the fact that IUI is typically higher than VoI. t It exhibits higher volatility, thus requiring a larger hysteresis threshold. The system also provides transparent output of the decision-making process, including contribution analysis of each component of IUI, explanation of the basis for time window decisions, and comparative evaluation of alternative solutions, supporting continuous optimization of monitoring strategies and troubleshooting.

[0092] In another embodiment of this application, the decision generation of sampling instructions including the time window length further includes:

[0093] Based on information value measurement, acquisition budgets are allocated among multiple acquisition channels to generate a budget vector; among which, acquisition channels include: trajectory and event channel, document structure difference channel, network detail channel, and performance granularity channel.

[0094] In this embodiment, the information value measure can be the information value (VoI). tIt can also be the Interaction Urgency Index (IUI). Acquisition channels are logical paths used to collect data from different modalities. The trajectory and event channel is used to collect pointer movement, clicks, etc.; the document structure difference channel is used to collect changes in the DOM tree; the network detail channel is used to collect detailed headers and bodies of network requests; and the performance granularity channel is used to collect more refined performance metrics. The system establishes a channel health monitoring mechanism to evaluate the data quality, acquisition success rate, and resource consumption efficiency of each channel in real time, providing additional basis for budget allocation.

[0095] The sampling instructions also include a budget vector to drive the aggregation of data.

[0096] Specifically, the budget vector a* t It is a multidimensional vector, such as a* t =[a* trace , a* dom , a* net , a* perf ], where a* trace For trajectory and event channel components, a* dom For document structure differential channel components, a* net For network detail channel components, a* perf This is a performance-granular channel component. Each component represents the resource allocation (e.g., bytes or CPU time) for the corresponding channel. Budget allocation considers both data importance and processing cost, allocating more budget to high-value, low-cost channels. This enables finer-grained adaptive acquisition. For example, when the information value is high, the system not only shortens the time window W... t It may also be in the budget vector a* t The system allocates a high budget to the trajectory and event channel and the document structure differential channel, while allocating a low budget to the network detail channel, thereby enabling targeted data capture.

[0097] In a further embodiment, the specific process of allocating the acquisition budget among multiple acquisition channels includes:

[0098] Evaluate the individual channel marginal revenue g of multiple acquisition channels. t_j .

[0099] Specifically, g t_j It is an estimate used to characterize the distortion (D) that results from increasing the budget by one unit in channel j at the current cross-section t. t The reduction in information uncertainty is the marginal contribution of the channel to reducing information uncertainty. The system uses multiple indicators to comprehensively evaluate the marginal benefit, including the utilization rate of the channel data in historical problem diagnosis, the criticality of the channel data in the current business scenario, and the scarcity of the channel data.

[0100] Get the total budget B for the current time segment.t and the minimum guaranteed budget for each channel a* min_j .

[0101] In this embodiment, the total budget B of the current time segment t It may be indirectly determined by a global bandwidth strategy or rate-distortion objective. Total budget B t The budget is dynamically adjusted based on network conditions, remaining device battery power, and user plan type, automatically reducing the total budget when resources are strained. A minimum guaranteed budget ensures that critical channels (such as performance channels) maintain a minimum level of data collection even when information value is low, preventing information starvation. The minimum guaranteed budget is tiered according to channel importance, with core channels (such as performance monitoring) receiving a higher guaranteed budget.

[0102] Combined with a minimum budget a* min_j And based on the marginal revenue g of the channel t_j In total budget B t The proportion in the budget vector a* is allocated proportionally to generate the budget vector. t_j .

[0103] Specifically, this allocation logic can be represented as: a* t_j =max(a* min_j , (g t_j / ∑ k (g t_k ))*B t ); where a* t_j It is the final budget allocated to channel j by the section t; max(•) is the maximum value function; g t_j It is the marginal benefit of channel j; ∑ k (g t_k B is the sum of the marginal revenues of all channels; t This is the total budget for the current cross-section. Preferably, the system introduces a budget allocation smoothing mechanism to prevent drastic fluctuations in budget between adjacent cross-sections and ensure the continuity of data acquisition across channels. In a possible example, assume the total budget B... t =1000 bytes. Channel 1 (track): g t_1 =60 (high marginal return), a* min_1 =100. Channel 2 (DOM): g t_2 =10 (low marginal revenue), a* min_2 =50. Channel 3 (Network): g t_3 =30 (medium marginal revenue), a* min_3 =50. Total marginal revenue ∑ k (g t_k = 60 + 10 + 30 = 100. Calculate the budget for each channel: a* t_1=max(100, (60 / 100)*1000)=max(100, 600)=600 bytes; a* t_2 =max(50, (10 / 100)*1000)=max(50, 100)=100 bytes; a* t_3 =max(50, (30 / 100)*1000)=max(50, 300)=300 bytes. The final generated budget vector a* t =[600, 100, 300]. The system records the complete basis for budget allocation decisions, including the marginal revenue calculation process for each channel, the reasons for setting the minimum budget, and the final allocation results, supporting subsequent auditing and optimization.

[0104] In a preferred implementation, the budget allocation mechanism also includes conflict resolution and priority-based starvation strategies. When the total budget B... t When there is a shortage, the system will prioritize the needs of high-priority channels and will also refer to historical under-allocation records. The system establishes a channel priority matrix, comprehensively considering the business criticality, data timeliness, and substitutability of channels to determine the absolute priority of each channel. If a high-priority channel (e.g., the DOM channel) experiences a shortage due to lack of recent changes, the system will prioritize fulfilling the needs of high-priority channels and will also consider historical under-allocation records. t_j If the budget allocation remains consistently low, but multiple segments have not received budget (with a high historical record of under-allocation), the system will forcibly increase its budget allocation to prevent information starvation in that channel and ensure that key structural baselines can be captured. The forced increase mechanism adopts a gradual strategy, first attempting a small increase in budget, observing the return on data value, and then deciding whether to further increase investment.

[0105] According to one aspect of this application, data is aggregated from preprocessed data based on sampling instructions to generate a reporting acquisition package. Specifically, this involves reading the causal alignment stream and aspect index, and obtaining the sampling instructions. At each aspect boundary, the system performs sampling according to the sampling instructions (W... t , a* t Expand the channel-level acquisition orchestration to generate an acquisition list. This list clarifies the document structure (DOM) regions that need to be evaluated in this aspect, and the time window length (W) to be used. t The data collection list includes the on / off status and budget of each channel (e.g., network, performance). Priority tags are used to identify essential data that must be collected and optional auxiliary data, ensuring the integrity of essential data when the budget is insufficient. Based on the data collection list and budget vector a* t Multimodal acquisition is performed. This process corresponds to multiple acquisition channels, including: document structure differential detection and encoding (corresponding to the document structure differential channel). Specifically, the system reads the acquisition list and context stream, and determines the acquisition method based on the active regions in the list and the budget of the channel (e.g., the document structure differential channel component a* at time t). t_domThe system determines the range of page subtrees to be evaluated. It calculates structural hashes and key attribute summaries for candidate subtrees. To determine the degree of difference, a structural similarity calculation method is preferred, such as d(u, v) = 1 - (|u∩v| / |u∪v|), where u and v are the sets of attribute summaries of the same subtree in two cross-sections, |•| represents the cardinality of the sets, ∩ represents the intersection, and ∪ represents the union. It should be noted that the threshold for triggering the difference is adaptive. The system will determine the range of page subtrees to be evaluated based on the calculated structural difference d(u, v) and the summaries from the budget vector a*. t The available budget for this channel is used to jointly determine whether to trigger differential sampling. The system establishes a differential sampling value assessment model to predict the value of capturing specific structural changes for problem diagnosis, prioritizing the capture of high-value changes. When the budget is tight, the system automatically increases the trigger threshold, capturing only more significant structural changes. If differential sampling is triggered, the system will extract the minimum set of changes and perform de-identification coding. As a robustness guarantee, if differential generation fails or integrity verification fails, the system will fall back to collecting a coarser-grained structural summary. The fallback strategy includes collecting a simplified DOM snapshot, a key attribute summary, or only recording the change type, ensuring that valuable structural information can still be obtained in abnormal situations. It also includes time window slicing and interaction aggregation (corresponding to trajectory and event channels). Specifically, the system reads the collection list and standardized interaction flow, based on the stable time window length (W) in the sampling instruction. t The system slices and aggregates the interaction events and pointer trajectories within this time period to generate interaction slices. It also includes the acquisition of network details and performance segments (corresponding to network detail channels and performance granularity channels). Specifically, the system uses the budget vector a* t The budget allocated to these two channels (e.g., the network detail channel component a* at time t) t_net The performance granularity of the channel component a* at time t t_perf It captures associated network request headers, response summaries, and key performance time periods to generate network details and performance segments. Network detail collection employs an intelligent filtering strategy, selectively capturing detailed information based on request type, response status, and business importance, avoiding redundant data that consumes budget.

[0106] The system reads structural differences, interaction slices, network details, and performance fragments, along with aspect indexes and causal metadata. At the aspect granularity, this multimodal data is aggregated to obtain the final reporting packet. The aggregation process employs data deduplication and cross-compression techniques to eliminate redundant information between multiple channels and improve data storage efficiency. Before being submitted to the server, the reporting packet preferably undergoes serialization, compression, and encryption. The system selects the optimal serialization and compression algorithms based on data characteristics, using columnar storage for structured data and run-length encoding for trajectory data to maximize the compression ratio. The reporting process supports flexible strategies, such as delaying reporting when the network is idle, or reliably sending data when the page is unloaded using the browser's background reporting function (such as Navigator.sendBeacon) to optimize user experience and reduce the impact on core application functions. The system establishes a reporting quality monitoring mechanism to track reporting success rate, latency, and integrity, dynamically adjusting reporting strategies to ensure reliable data transmission.

[0107] In one embodiment of this application, the adaptive time window slicing web page monitoring method includes: employing a Trajectory-Adaptive Slicing (TAS) algorithm based on an interaction trajectory dynamics model to perform high-fidelity, low-overhead intelligent slicing and state capture of user interface event streams in computer applications. This algorithm abandons the traditional coarse-grained sampling strategy based on fixed frequency or simple event counting. By constructing a multi-dimensional user interaction dynamics model, it achieves precise quantification of interaction intensity, complexity, and intent, thereby intelligently and dynamically adjusting the size of the monitoring time window. Furthermore, multimodal mathematical indicators are introduced to comprehensively evaluate the urgency of the interaction, specifically including: Trajectory Curvature Complexity (TCC): for continuous pointer trajectories (such as mouse movement, touch swipe), the algorithm analyzes the coordinate sequence in real time. The fineness and exploratory nature of the operation are quantified by calculating the rate of change of normal acceleration of continuous trajectory points. Let the trajectory point sequence be P. t P t-1 P t-2 Its instantaneous curvature κ can be calculated using the two-dimensional plane curvature formula: κ=∣x' y''- y' x''∣ / ( x' 2 + y' 2 ) 3 / 2Where x' and y' are the first derivatives (velocity components), and x'' and y'' are the second derivatives (acceleration components). Trajectory curvature complexity is defined as the standard deviation of the recent curvature sequence, used to identify whether the user is browsing in a straight line (low TCC) or repeatedly exploring and searching within a complex area (high TCC). The system establishes an adaptive baseline for curvature complexity, dynamically adjusting the normal curvature range based on the user's historical behavior patterns to improve the accuracy of anomaly detection. Interaction density change rate (IDC): This metric quantifies the suddenness and density of discrete events (such as clicks and keystrokes). The frequency of events occurring per unit time is defined as f = 1 / Δt, where Δt is the time interval between two consecutive events of the same type. The interaction density change rate a is the first derivative of the frequency: a = df / dt ≈ (f current -f previous ) / Δt avg ;where f current f is the frequency of events within the current time interval. previous Let Δt be the frequency of events within the previous time interval. avg This represents the average time span between the current and previous moments. The algorithm introduces event type weights to distinguish the different values ​​of ordinary clicks and key business operations, avoiding misjudgments caused by simple counting. Context-aware business value weights (CBW): In addition to physical interaction behavior, the algorithm also integrates intelligence at the business logic level. The system predefines or dynamically learns business criticality weights (w) for different UI elements (such as payment buttons, form submissions, and search boxes). b When an interaction occurs on a high-weight element, this factor increases the overall interaction urgency assessment. The system continuously optimizes the weight assignment of each element by analyzing the correlation between historical issue data and UI elements, and supports differentiated weight configurations based on user roles and business scenarios. Based on the above indicators, the comprehensive interaction urgency index IUI is calculated in real time: IUI = α*norm(TCC) + β*norm(IDC) + γ*w b Where α, β, and γ are configurable weighting coefficients, and typically α + β + γ = 1, and norm is the normalization function. The normalization function uses a dynamic quantile method based on historical data to adapt to the differences in indicator distribution among different users and in different scenarios. The size W of the monitoring time window is dynamically determined by IUI, and its relationship is defined by the following inverse proportional function: W = W min +(W max -W min ) / (1+K*IUI); where W max and W min These are the preset upper and lower boundaries of the window (e.g., 5 seconds and 200 milliseconds), and K is the system gain coefficient used to adjust the algorithm's sensitivity to changes in IUI. The system dynamically adjusts the value of K based on device performance and network conditions, increasing sensitivity when resources are plentiful and decreasing sensitivity to maintain stability when resources are scarce.

[0108] When users perform high-frequency, high-complexity interactions in core business areas (e.g., rapidly drawing complex curves in a drawing application, generating high TCC and high IDC; or quickly selecting multiple discounts and clicking pay on a checkout page, generating high IDC and high CBW), the IUI index will rise rapidly. At this time, the algorithm automatically narrows the time window to close to W. min The system achieves a high latency (e.g., 200-500 milliseconds) to capture complete operation sequences with extremely high temporal resolution, providing near-frame-by-frame fine-grained data for problem localization. In high-speed sampling mode, the system enables a data pre-filtering mechanism, retaining only the most diagnostically valuable data dimensions to balance data granularity and system overhead. Conversely, when the user is in a quiet period such as linear browsing or reading, the IUI index remains low, and the algorithm expands the window to nearly W. max(e.g., 3-5 seconds) Multiple sparse events are merged into a single slice, reducing the system overhead of data acquisition, processing, and transmission. In low-speed sampling mode, the system employs data augmentation strategies, using intelligent interpolation and feature extraction to compensate for insufficient sampling, ensuring no loss of critical information. For these event sequence fragments, based on predefined error triggering conditions (e.g., JavaScript exceptions, network request failures, performance metric exceedances), the system intelligently and selectively executes monitoring data reporting operations, avoiding the full transmission of invalid data. Triggering conditions support complex logical combinations; for example, reporting is only triggered when performance metric exceedances occur on critical business paths, increasing the value density of reported data. Network requests initiated by computer applications are collected and judged. Through unified aspect interception technology (e.g., overriding network request-related APIs), key data features are extracted from four dimensions: network structure, packet protocol characteristics, request / response content, and runtime context. The system adopts a fusion decision-making mechanism combining a rule engine and machine learning models. Through multi-level rule matching, contextual association analysis, and intelligent classification prediction, network requests are accurately identified and classified. Network request classification employs an online learning mechanism, capable of adapting to new API interfaces and business models while maintaining classification accuracy. The system collects core WebVitals performance metrics from the computer application runtime environment, and corrects and integrates metric data from different collection points or time periods. It also performs compatibility degradation processing for older browsers or environments that do not support new metrics, ensuring the reliability and comparability of the metric data. Performance metric collection employs multi-point sampling and time alignment techniques to eliminate random errors from single-point sampling and improve data representativeness. A comprehensive breadcrumb timeline integrating user interaction behavior, key network request trajectories, and core performance metric data is constructed. This timeline is built upon high-quality data obtained through time window slicing, and undergoes strict order-preserving aggregation before data reporting. This operation ensures that all events are sorted and correlated according to their actual timestamps and logical causal relationships, providing a reliable temporal foundation for subsequent problem replay and analysis. The timeline construction incorporates a gap detection and compensation mechanism; when data loss is detected, placeholder markers are generated through context inference to maintain the continuity of the timeline. The aggregated monitoring data is then reported to the backend observation platform through batch compression, encoding optimization, and encryption channels. This process supports delayed reporting and reporting in the browser background, aiming to minimize bandwidth consumption and enhance privacy protection for sensitive data. The system establishes an intelligent scheduling mechanism for the reporting queue, dynamically adjusting the reporting order and timing based on data priority, network conditions, and battery power, ensuring timely reporting of critical data while optimizing resource utilization efficiency.

[0109] According to another aspect of this application, an embodiment is also provided, the execution flow of which is as follows:

[0110] The event acquisition module is responsible for proactively capturing all user interface (UI) event streams generated within the computer web application, such as clicks, inputs, scrolling, and mouse movements. This module employs a layered acquisition strategy, categorizing events into critical events (e.g., clicks, submissions) and auxiliary events (e.g., movements, scrolling), and setting different acquisition priorities. The core of this module is an adaptive time window slicing algorithm based on an interaction trajectory dynamics model. Its specific implementation logic includes: real-time calculation of multimodal interaction dynamics parameters, providing accurate and quantified data input for dynamic window adjustments. The system calculates two core metrics in parallel: Trajectory Curvature Complexity (TCC): For continuous pointer movement events, the system maintains a short-term queue of trajectory point coordinates. By calculating the coordinate derivatives of continuous trajectory points, the instantaneous curvature κ is estimated using a two-dimensional curvature formula, and the standard deviation of the curvature sequence within the recent window is calculated to obtain the final TCC value. This value effectively quantifies the fineness and uncertainty of user operations; a high TCC value typically corresponds to repeated exploration within a small range or complex gesture drawing. The system establishes an adaptive baseline for curvature complexity, dynamically adjusting the normal curvature range based on the user's historical behavior patterns to improve the accuracy of anomaly detection. Interaction Density Change Rate (IDC): This metric quantifies the burstiness and density of discrete events (such as clicks and keystrokes). The frequency of events occurring per unit time is defined as f = 1 / Δt, where Δt is the time interval between two consecutive events of the same type. The interaction density change rate 'a' is the first derivative of the frequency. The algorithm incorporates event type weights to distinguish the different values ​​of ordinary clicks and critical business operations, avoiding misjudgments caused by simple counting.

[0111] The system integrates underlying dynamic parameters with business context, transforming them into a unified decision signal. The Interaction Urgency Index (IUI) is calculated using the following formula: IUI = α*norm(TCC) + β*norm(IDC) + γ*w b Where norm is the normalization function, w b It is a business weight predefined or dynamically learned based on the UI elements involved in the current interaction (such as the "Buy Now" button). The normalization function uses a dynamic quantile method based on historical data to adapt to the differences in indicator distribution among different users and in different scenarios. The coefficients α, β, and γ are configurable weights that determine the algorithm's emphasis on operational granularity, operational suddenness, and business value. This index comprehensively reflects the urgency of needing to perform fine-grained monitoring at the current moment. The IUI is mapped to a specific window size. The size of the time window W is dynamically determined by the following formula: W = W min +(W max -W min The system dynamically adjusts the K value based on device performance and network conditions, increasing sensitivity when resources are plentiful and decreasing sensitivity to maintain stability when resources are scarce.

[0112] The IUI value increases when users perform complex exploration (high TCC) or bursty operations (high IDC). The algorithm automatically and dynamically shrinks the time window from a baseline value (e.g., 1 second) to close to W. min The lower limit (e.g., 200 milliseconds). In high-speed sampling mode, the system enables a data pre-filtering mechanism, retaining only the data dimensions with the highest diagnostic value, balancing data granularity and system overhead. This allows the system to capture operation sequences with extremely high temporal resolution, providing a near-frame-by-frame data foundation for reproducing state anomalies caused by rapid, continuous clicks or interface malfunctions triggered by complex gestures. When the user is in a silent state such as reading or linear browsing, both TCC and IDC remain low, and the IUI value is very low. At this time, the algorithm expands the time window to nearly W... max The upper limit (e.g., 5 seconds) is used to merge multiple sparse events into a single time slice for processing. In low-speed sampling mode, the system employs data augmentation strategies, using intelligent interpolation and feature extraction to compensate for insufficient sampling, ensuring no loss of critical information and reducing the system overhead of data acquisition, slice calculation, and subsequent processing. This achieves an intelligent balance between performance and monitoring granularity. Through the iterative execution of the above steps, a deep understanding of user interaction intentions is achieved, enabling the monitoring system to capture critical moments like a high-speed camera while conserving resources during stable periods like time-lapse photography, thus intelligently balancing monitoring accuracy and system performance overhead.

[0113] The anomaly detection module continuously scans these event sequence fragments and makes judgments based on preset error triggering conditions. These conditions typically include: captured system execution anomalies, network requests returning failure statuses (such as 4xx, 5xx), key Web Vitals performance metrics (such as LCP, FID, CLS) exceeding set thresholds, or user-triggered error feedback. Triggering conditions support complex logical combinations; for example, reporting is only triggered when performance metrics exceed limits and occur on a critical business path, increasing the value density of reported data. The system will only initiate the data reporting process related to that fragment when any triggering condition is met; otherwise, the data will be discarded or processed with lower priority, thereby reducing unnecessary data transmission.

[0114] Meanwhile, the network monitoring module collects all outbound network requests by overriding or intercepting browser-provided network APIs. This module not only records basic request information (URL, method, headers, parameters), but also deeply analyzes the request body content, parses the response status and structure, and, combined with the application's current context (such as the current page and user status), determines the business logic of the request (e.g., login, payment, data query) and accurately categorizes its success or failure status. The network request classification employs an online learning mechanism, adapting to new API interfaces and business models while maintaining classification accuracy. This enables the system to accurately identify anomalies at the business logic level, rather than just network connection errors.

[0115] In parallel, the performance metrics module is responsible for collecting Web Vitals metrics provided by browsers. Considering the differences in support across different browser versions and the volatility of single sampling, this module collects metric data from multiple time points or multiple sources (such as compatibility polyfills) and uses a weighted fusion algorithm for data integration and correction. Performance metric collection employs multi-point sampling and time alignment techniques to eliminate random errors from single-point sampling and improve data representativeness. For environments that do not support certain new metrics, the module automatically downgrades to using available alternative metrics or calculation methods, ensuring the robustness of the monitoring solution and data consistency across different environments.

[0116] The timeline aggregation module receives data from the event acquisition, network monitoring, and performance metrics modules and integrates them into a unified breadcrumb timeline. To ensure that subsequent analysis accurately reflects the true order and causal relationships of events, this module sorts all events according to high-precision timestamps and normalizes any timing deviations that may be caused by asynchronous execution. The timeline construction incorporates a gap detection and compensation mechanism; when missing data is detected, placeholders are generated through context inference to maintain the continuity of the timeline. Finally, an ordered, context-rich sequence of behaviors is generated, which can be used for precise problem replay and root cause analysis.

[0117] The data reporting module is responsible for batch packaging the aggregated, ordered breadcrumb timeline data, compressing it using efficient compression algorithms (such as GZIP), and encrypting it. The data is then sent to the backend observation platform via a reliable transmission channel. The system selects the optimal serialization and compression algorithms based on data characteristics, using columnar storage for structured data and run-length encoding for trajectory data to maximize the compression ratio. The system is designed to support flexible reporting strategies: it can delay reporting when the network is idle, or reliably send data when the page is unloaded using browser background reporting functions such as (Navigator.sendBeacon), thereby further optimizing the user experience and reducing the impact on core application functions. The system establishes a reporting quality monitoring mechanism to track reporting success rate, latency, and integrity, dynamically adjusting the reporting strategy to ensure reliable data transmission.

[0118] This embodiment achieves an intelligent balance between monitoring accuracy and system overhead through an adaptive time window algorithm. It provides fine-grained monitoring during periods of high-frequency user interaction and reduces resource consumption during quiet periods. Through time window slicing and conditional reporting mechanisms, it reduces data transmission volume while still faithfully reconstructing the application state and user operation path at the time of the problem. The system module runs on Web Workers, avoiding blocking the main thread; data reporting employs compression encryption and flexible reporting strategies, effectively balancing application performance optimization and user privacy protection.

[0119] According to one aspect of this application, constructing a unified timeline can also involve: reading standardized interaction streams and context streams; establishing message channels and initializing logical time stamps among three types of executors: the main page thread, worker threads, and network proxies; and outputting a causal alignment ready state. Reading the causal alignment ready state, enumerating the three types of executors (main page thread, worker threads, and network proxies), establishing a one-to-one mapping relationship, initializing the time stamp component for each type of executor, and forming an executor-time stamp mapping table. Reading the messages to be sent from the executor-time stamp mapping table and the causal alignment ready state, incrementing the corresponding components before the message leaves the site, and appending the complete time stamp vector to the message to generate an outbound time-stamped message. Reading the outbound time-stamped message, comparing each component with the local time stamp in the receiving executor and taking the larger value, merging the components, and outputting inbound time-stamped events. Reading inbound time-stamped events, marking incomparable events as parallel, and obtaining an event sequence marked with parallelism according to preset conflict resolution rules (executor priority, arrival time, aspect number). The process reads the event sequence marked with parallelism, truncates inactive execution dimensions, performs run-length compression on repeated prefixes, and saves it as a compressed time-stamped event sequence to reduce memory usage for subsequent reordering. It then reads the compressed time-stamped event sequence to calculate a checksum for each batch. If component regression or dimension missing is detected, an alarm is triggered and a time-stamped checksum report is generated for use in out-of-order reordering. The process reads the event sequence marked with parallelism and the aspect strategy configuration, and listens for information value hints from subsequent modules (if subsequent modules have already been calculated, they can be backfeeded; only timers are used during cold start). It synthesizes the two signals to generate an aspect trigger signal. It reads the time-stamped checksum report and the aspect trigger signal, sets an upper bound for the buffer based on the quantile estimation of the delay distribution, and enters the out-of-order buffer. When the buffer reaches the upper bound or an aspect trigger occurs, the reordering process is initiated, expired events are reclaimed, and a block of events to be reordered is output. Finally, it reads the block of events to be reordered, prioritizes outputting all minimum elements (events without predecessors) according to partial order, sorts the parallelism markers according to conflict resolution rules, and generates the reordered event sequence. The system reads the rearranged event sequence and out-of-order buffer, sets a late arrival threshold, and uses a placeholder or queuing strategy for overdue events to form a compensated event sequence, preventing the aspect from failing to close due to individual late arrivals. It reads the compensated event sequence and aspect trigger signals, closes the aspect at the trigger point, and outputs the causal alignment stream and aspect index. It reads the causal alignment stream and aspect index, merges the upstream and downstream events of each aspect boundary, confirms the coverage range, and outputs the aspect boundary alignment fragment. It reads the aspect boundary alignment fragment and context stream, fills in the necessary page states at the boundary, forms an aspect context snapshot, and ensures that subsequent decisions and data collection are on the same reference frame. It reads the aspect context snapshot, writes it to persistent media on a aspect-by-aspect basis, establishes a cross-aspect retrieval index, and outputs the causal timeline. It reads the causal timeline and aspect index, publishes the aspect number and timeline cursor to downstream modules, and forms a reference frame handle.

[0120] According to one aspect of this application, the decision generation sampling instruction, which includes the time window length, can also be as follows: Reading dynamic features and standardized interaction flows, aggregating trajectory turning intensity and event density at the cross-sectional granularity to obtain dynamic aggregated features. Reading business weight mapping and context flow, fusing element semantics and visibility state to generate business semantic features. Reading anomaly precursor features and performance features, extracting mutation and fluctuation indicators, and concatenating them into precursor and performance features. Reading dynamic aggregated features, business semantic features, precursor and performance features, and reference frame handles, performing unified normalization and cross-page calibration to obtain an information value input set. Reading the information value input set and labeled samples from the playback side (such as anomaly hit records), selecting an information value estimation model and completing initial calibration to generate an initial information value model. Reading the information value input set and the initial information value model, calculating the information value using the following formula: VoI t =tr(F t );F t =E[(▽ θ logp θ (y|x t ))*(▽ θ logp θ (y|x t )) T Output the information value sequence. Read the information value sequence and playback-side feedback (such as hits and misses), perform small-step updates to the model and monitor distribution drift, generating an online information value model and drift alarms. Read the online information value model and information value sequence, give confidence intervals for each aspect, and form a robust information value sequence. Read the reference frame handle and playback-side evaluation configuration, define aspect-level reconstruction or diagnostic distortion and bandwidth usage metrics, and output the rate-distortion metric configuration. Read the rate-distortion metric configuration and historical bandwidth usage, set the total budget and aspect quota, and output the budget configuration. Read the robust information value sequence and budget configuration, and calculate the original solution for the time window using the following formula: min Wt,a*t E[D t |W t , a* t ]+λ*E[R t |W t , a* t ];W raw_t =clip(W min W max c / sqrt(VoI) t / (bytes t+1)+ε)); Output the original solution for the time window. Read the original solution for the time window and the budget configuration, check whether the upper and lower bounds and rate limits are met, and project the unmet parts to the feasible region to obtain the feasible solution for the time window. Read the feasible solution for the time window and historical performance data (such as hit rate and bandwidth usage), fine-tune the tradeoff coefficients and proportional coefficients, and output the revised version of the original solution for the time window. Read the original solution for the time window and the time window of the upper section, apply double threshold hysteresis and slope constraints to obtain the stable time window. Read the robust information value sequence and rate-distortion metric configuration, estimate the marginal revenue of each channel (trajectory and event, document structure difference, network details, performance granularity), and output the channel marginal revenue table. Read the channel marginal revenue table, the stable time window, and the budget configuration, determine the budget for each channel using a minimum quota + allocation according to the marginal revenue ratio, and form a budget vector. Read the budget vector and the channel marginal revenue table. When the budget is insufficient to meet the needs of high-priority channels that are triggered simultaneously, reallocate according to priority and historical under-allocation records, and output the corrected budget vector. Read the corrected budget vector, stable time window, and aspect index, perform consistency checks (budget conservation, boundary validity, aspect alignment), generate sampling instructions, and issue them to the acquisition orchestration.

[0121] In summary, the main process of this invention is as follows: Collecting multi-source Web monitoring data and processing it into preprocessed data; based on events from multiple executors (such as the main thread and worker threads) in the preprocessed data, applying vector clocks and out-of-order reordering rules to construct a causally consistent unified timeline; estimating information value metrics based on the preprocessed data (such as trajectory curvature, interaction density change rate, and business weight) and the unified timeline, such as an interaction urgency index or a trace based on the Fisher information matrix; establishing a rate-distortion optimization objective, and based on the information value metrics and the cumulative number of collected bytes, generating sampling instructions containing adaptive time window lengths, and allocating multi-channel budget vectors; aggregating multimodal data according to the sampling instructions to generate a reporting collection package.

[0122] This invention no longer relies on a fixed time window. Instead, it calculates the dynamic characteristics of user interactions in real time, such as the curvature complexity of continuous pointer trajectories and the rate of change of interaction density for discrete events, and integrates context-aware business value weights to accurately quantify the urgency or information value of the current interaction. When the system detects a high-value complex operation, it automatically shortens the sampling time window to achieve high-fidelity capture; while during user inactivity, it intelligently widens the time window, thus solving the problem of mismatch between sampling granularity and interaction value. By establishing and propagating vector clocks between the main page thread, worker threads, and network proxies, and executing a strict bitwise maximum merging rule during message reception, the system establishes a true causal partial order relationship between events. Based on this, using out-of-order buffering and a rearrangement algorithm based on this partial order relationship, a unified timeline that strictly guarantees causality is ultimately generated, ensuring the accuracy of problem replay and avoiding logical fallacies that may arise from traditional timestamp sorting. By establishing clear optimization objectives, dynamic control is achieved at two levels. Specifically, in time window decisions, information value and consumed bandwidth budget (cumulative bytes) are taken into consideration to dynamically adjust the sampling density. By introducing a multi-channel budget allocation mechanism, the system evaluates the marginal benefits of each data channel (e.g., trajectory, document structure, network details) and dynamically allocates the total budget proportionally to different channels, while setting a minimum allowance to prevent starvation of critical information. This allows the system to control not only the frequency of data collection (time window) but also the type of data collected (granularity), achieving a fine balance between monitoring costs and diagnostic fidelity.

Claims

1. An adaptive time window slicing web page monitoring method, characterized in that, include: Collect multi-source web monitoring data and process it into pre-processed data; A unified timeline is built based on preprocessed data; Based on preprocessed data and a unified timeline, estimate the measure of information value; Based on information value measurement, the decision generation includes sampling instructions with time window length; Based on the sampling instructions, data is aggregated from the preprocessed data to generate a reporting collection package; Building a unified timeline includes: Identify events in preprocessed data that originate from a predetermined number of executors, wherein the executors include at least the main page thread, worker threads, and network proxies; Apply out-of-order buffering and rearrangement rules to events originating from a predetermined number of executors to establish causal consistency between events and generate causal alignment streams; Constructing a unified timeline based on causal alignment flow; Generate a causal aligned stream, including: Initialize and propagate time-stamp vectors for a predetermined number of executors; When an event is passed across execution entities, the sending execution entity increments the timestamp vector, and the receiving execution entity performs a bitwise merge operation on the received timestamp vector and the pre-stored local timestamp vector. The order of events is determined based on the partial order relationship between the merged time-scaled vectors after taking the largest bit, and a causal alignment stream is generated.

2. The method according to claim 1, characterized in that, The decision generation includes sampling instructions with a time window length, including: A rate-distortion optimization objective is established, which is used to characterize the trade-off of minimizing the reconstruction or diagnostic distortion metric under a given bandwidth consumption bit rate metric constraint. Based on the rate-distortion optimization objective and combined with information value measurement, the sampling instructions are generated.

3. The method according to claim 2, characterized in that, The process of generating the sampling instructions includes: Information value is defined as Information Value (VoI). t ; Get the number of bytes of data collected in the current time segment. t ; Based on information value (VoI) t With the number of bytes of collected data t The original solution W of the time window for calculating the functional relationship. raw_t The original solution W of the time window raw_t With (VoI) t / (bytes t+1 It is inversely proportional to the square root of ). The original solution W of the time window raw_t The time window length in the sampling instruction is generated within the preset upper and lower boundaries of the window.

4. The method according to claim 1, characterized in that, Estimating information value metrics includes: Based on preprocessed data and a unified timeline, joint features are constructed at the aspect granularity. Based on joint features, a posterior probability model is established to characterize diagnostic uncertainty; Calculate the expectation of the log-likelihood gradient of the posterior probability model with respect to its parameters to obtain the Fisher information matrix; The information value measure is obtained by calculating the trace of Fisher's information matrix.

5. The method according to claim 4, characterized in that, Constructing joint features at the section granularity includes: Extract dynamic features, business weight mapping, anomaly precursor features, and performance features from preprocessed data; At the sectional boundary of the unified timeline, aggregate dynamic characteristics, business weight mapping, anomaly precursor characteristics, and performance characteristics form a joint feature.

6. The method according to claim 1, characterized in that, Another way to estimate the value of information is as follows: Based on preprocessed data and a unified timeline, calculate the interaction urgency index; The interaction urgency index is used as a measure of information value.

7. The method according to claim 6, characterized in that, The interaction urgency index is calculated, including: Calculate the trajectory curvature complexity for continuous pointer trajectories in the preprocessed data; For discrete interaction events in the preprocessed data, calculate the rate of change of interaction density; By integrating page context from preprocessed data, business value weights can be obtained; Based on a unified timeline, the trajectory curvature complexity, interaction density change rate, and business value weight are normalized and weighted summed to generate an interaction urgency index.

8. The method according to claim 7, characterized in that: The computational complexity of trajectory curvature includes: Obtain the position vector sequence of the current time and the historical time from the continuous pointer trajectory; By calculating the discrete approximation of the position vector sequence, the discrete curvature approximation value is obtained, which characterizes the trajectory curvature complexity; Calculating the rate of change of interaction density includes: Count the number of discrete interactive events in the current time interval and the previous time interval; Calculate the rate of change of the number of events over time to obtain the rate of change of the number of events, which characterizes the rate of change of the interaction density.

Citation Information

Patent Citations

  • Python monitoring task resource use method and system

    CN119512883A