Intelligent caching and resuming method and system based on streaming AI

By generating potential state sequences and predicting user operation intentions through streaming AI, and combining the generation and replay of breakpoint state snapshots, the problems of response latency and interruption recovery difficulties in streaming operations are solved. This achieves efficient intelligent caching and seamless resume, improving system response efficiency and user experience.

CN121365047BActive Publication Date: 2026-06-26SHENZHEN WEIGEYUN TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHENZHEN WEIGEYUN TECH CO LTD
Filing Date
2025-10-14
Publication Date
2026-06-26

AI Technical Summary

Technical Problem

In streaming operation scenarios of spreadsheet and database systems, existing technologies suffer from response latency and difficulty in interrupt recovery. Traditional caching methods struggle to dynamically predict user intent, and breakpoint resume solutions have high storage overhead and low recovery efficiency, failing to support intelligent caching and seamless resume while ensuring real-time performance.

Method used

By employing a streaming AI-based intelligent caching and breakpoint resumption method, an encoder generates a potential state sequence, a prediction model predicts the user's operation intent and data range, periodically generates breakpoint state snapshots, and a decoder replays the operation sequence and data during interruption, achieving lightweight and high-precision interruption recovery and state reconstruction.

Benefits of technology

It significantly reduces operation latency, improves system response efficiency and user experience, and achieves lightweight, high-precision interruption recovery and state reconstruction, meeting the data consistency requirements of financial-grade applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121365047B_ABST
    Figure CN121365047B_ABST
Patent Text Reader

Abstract

The application provides a kind of based on streaming AI intelligent cache and breakpoint continuation method and system, the method includes: through the real-time encoding of the operation sequence of user and corresponding data to be uploaded by encoder, generates latent state sequence;The latent state sequence is input into the preset prediction model, and the prediction result is output, the prediction result includes: user next operation intention and affected data range;According to the latent state sequence, periodically generate and persist first breakpoint state snapshot;When breakpoint continuation is needed, the second breakpoint state snapshot selected by user from the first breakpoint state snapshot is loaded, and the replay operation sequence and replay data corresponding to the second breakpoint state snapshot are replayed based on the corresponding decoder of the encoder.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence technology, and in particular to a method and system for intelligent caching and breakpoint resumption based on streaming AI. Background Technology

[0002] Currently, in streaming operation scenarios of spreadsheet and database systems, users often face problems such as response delays and difficulties in interruption recovery due to complex operation sequences or large data volumes. Traditional caching methods are mostly based on static rules, making it difficult to dynamically predict user intentions to achieve data preloading. Existing breakpoint resume solutions usually rely on complete operation logs and data snapshots, which have limitations such as high storage overhead and low recovery efficiency, and cannot support intelligent caching and seamless resume while ensuring real-time performance. Summary of the Invention

[0003] This application provides a method and system for intelligent caching and breakpoint resumption based on streaming AI, which can be used to achieve intelligent caching and seamless resume.

[0004] In a first aspect, embodiments of this application provide a method for intelligent caching and breakpoint resumption based on streaming AI, the method comprising:

[0005] The encoder performs real-time encoding of the user's operation sequence and the corresponding data to be uploaded to generate a potential state sequence.

[0006] The potential state sequence is input into a preset prediction model, and the prediction results are output, which include: the user's next operation intention and the range of affected data.

[0007] The first breakpoint state snapshot is periodically generated and persisted based on the potential state sequence.

[0008] When a breakpoint resume is required, the second breakpoint state snapshot selected by the user from the first breakpoint state snapshot is loaded, and the replay operation sequence and replay data corresponding to the second breakpoint state snapshot are replayed based on the decoder corresponding to the encoder.

[0009] Secondly, embodiments of this application provide a streaming AI-based intelligent caching and breakpoint resumption system, which includes:

[0010] The sequence encoding module is used to encode the user's operation sequence and the corresponding data to be uploaded in real time through the encoder to generate a potential state sequence.

[0011] The predictive analysis module is used to input the potential state sequence into a preset predictive model and output the prediction results, which include: the user's next operation intention and the range of affected data.

[0012] The breakpoint analysis module is used to periodically generate and persist a first breakpoint state snapshot based on the potential state sequence;

[0013] The breakpoint replay module is used to load the second breakpoint state snapshot selected by the user from the first breakpoint state snapshot when breakpoint resumption is required, and replay the replay operation sequence and replay data corresponding to the second breakpoint state snapshot based on the decoder corresponding to the encoder.

[0014] This application provides a method for intelligent caching and breakpoint resumption based on streaming AI. The method includes: encoding a user's operation sequence and corresponding data to be uploaded in real time using an encoder to generate a potential state sequence; inputting the potential state sequence into a preset prediction model and outputting a prediction result, the prediction result including: the user's next operation intention and the range of affected data; periodically generating and persisting a first breakpoint state snapshot based on the potential state sequence; when breakpoint resumption is required, loading a second breakpoint state snapshot selected by the user from the first breakpoint state snapshot, and replaying the replay operation sequence and replay data corresponding to the second breakpoint state snapshot based on the decoder corresponding to the encoder. In the above method, by using an encoder to efficiently compress and express the user's operation sequence and the data to be uploaded in real time to obtain the potential state sequence, the prediction model can accurately infer the user's next operation intention and the range of affected data based on the potential state sequence, thereby driving intelligent cache preloading, significantly reducing operation latency. By periodically generating and persisting breakpoint state snapshots, and replaying the corresponding operation and data with the help of a decoder when resumption is required, lightweight and high-precision interruption recovery and state reconstruction are achieved, effectively improving system response efficiency and user experience. Attached Figure Description

[0015] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0016] Figure 1 A schematic flowchart illustrating an intelligent caching and breakpoint resume method based on streaming AI provided in this application embodiment;

[0017] Figure 2 This is a schematic block diagram of an intelligent caching and breakpoint resume system based on streaming AI, provided for an embodiment of this application. Detailed Implementation

[0018] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described below with reference to the accompanying drawings.

[0019] The terms "first" and "second," etc., used in the specification, claims, and drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or apparatuses.

[0020] The term "embodiment" as used herein means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0021] It should be understood that in this application, "at least one (item)" means one or more, "more than one" means two or more, "at least two (items)" means two or three or more, and "and / or" is used to describe the relationship between related objects, indicating that there can be three relationships. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the related objects before and after are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.

[0022] Please see Figure 1 , Figure 1 This is a schematic flowchart illustrating an intelligent caching and breakpoint resumption method based on streaming AI, provided in an embodiment of this application. Figure 1 As shown, the specific steps of this intelligent caching and breakpoint resume method based on streaming AI include: S101-S104.

[0023] S101. The encoder encodes the user's operation sequence and the corresponding data to be uploaded in real time to generate a potential state sequence.

[0024] For example, an encoder built based on streaming processing requirements performs real-time encoding of continuous user input sequences of operations and associated data to be uploaded. The operation sequences include structured operation flows such as continuous database query commands, spreadsheet cell modification records, or file upload requests. Each operation command carries metadata information such as operation type, target data identifier, parameter set, and timestamp. The encoding process employs a neural network architecture based on one-dimensional causal convolution. Front-end padding of the operation sequence's temporal dimension ensures the causal constraint of the convolutional computation; that is, the features output at the current moment depend only on historical and current inputs without future information. After padding, the sequence undergoes multi-layer convolutional kernel feature extraction, outputting a sequence latent feature vector group containing operational semantics. This sequence latent feature vector group, along with the binary data block to be uploaded, is input to a fusion encoding layer. A cross-modal attention mechanism aligns and fuses the operational semantic features with the data content features, generating a joint representation that combines operational logic and data content. A low-dimensional, dense latent state sequence is generated by sampling from a Gaussian distribution using reparameterization techniques. This latent state sequence, in the form of continuous vectors, completely encodes the evolution of the user's operational intent and the data state. For example, when processing an operation flow containing 1,000 SQL queries, the encoder transforms it into a 256-dimensional sequence of potential states, with each vector corresponding to an operation and data snapshot at a time step.

[0025] S102. Input the potential state sequence into the preset prediction model and output the prediction results, which include: the user's next operation intention and the range of affected data.

[0026] For example, the encoded latent state sequence is input into a pre-trained prediction model for analysis. The prediction model employs a Transformer-based autoregressive architecture and is equipped with a causal masking mechanism to ensure temporal dependency constraints. The model captures long-range temporal dependencies and operational pattern regularities in the latent state sequence through multiple self-attention layers. The prediction model output layer produces two types of prediction results: a probability distribution vector of the user's next operation intention and a spatial coordinate descriptor of the affected data range. Operation intention prediction outputs probability values ​​for different operation types through a softmax classifier, while data range prediction outputs the starting address, length, and priority score of the target data block through a regression layer. The prediction process infers future operation trends based on historical latent state sequences. For example, when it detects that the user has continuously performed data filtering operations, the prediction model may predict that the next step will trigger a sorting operation and preload relevant data columns into the cache. The prediction results are transformed into specific cache instruction sets, driving the underlying storage system to migrate affected data blocks from slow-speed storage to a high-speed cache pool. Simultaneously, it pre-allocates memory and computing resources based on the data range descriptor, achieving resource warm-up and data readiness before operation execution. For example, after analyzing the potential state sequence, the predictive model predicts with 85% confidence that the user will request a 100MB data table in 300ms and loads it into memory in advance.

[0027] S103. Periodically generate and persist the first breakpoint state snapshot based on the potential state sequence.

[0028] For example, the generation and persistence of breakpoint state snapshots are periodically triggered based on the real-time generated latent state sequence. During the latent state sequence processing, an all-zero vector is introduced as a reference end vector, and the Euclidean distance between each latent state vector and the reference end vector is calculated. This distance calculation generates a continuous sequence of distance metrics, which is then smoothed using a sliding window to eliminate noise fluctuations. Intelligent breakpoint detection is achieved by calculating the Euclidean distance between the latent state sequence and the all-zero reference vector. Compared to traditional fixed-interval snapshot mechanisms, this method can accurately capture natural pauses in the operation process, avoiding unnecessary snapshot overhead during high-speed operations. The smoothed distance metric is compared with a preset threshold to generate a binary breakpoint judgment signal. When the distance value consistently falls below the threshold, the current operation flow is determined to have reached a natural breakpoint state. When a breakpoint is triggered, the index position, checksum, and timestamp metadata of the current latent state sequence are extracted, and this metadata is encapsulated into a lightweight data structure for the first breakpoint state snapshot. This lightweight metadata encapsulation method for constructing the first breakpoint state snapshot keeps the size of a single snapshot to the 2KB level, reducing storage space usage by more than 99% compared to traditional methods that store complete operation logs or data mirrors. The first breakpoint snapshot is converted to binary format using a serialization protocol and written to persistent storage. Simultaneously, the snapshot index table is updated to record the storage path and time mapping, ensuring that the first breakpoint snapshot can be quickly retrieved and verified. Snapshot persistence is achieved through serialization protocols and distributed storage, supporting fast writes and reads in high-concurrency scenarios. This ensures the system provides multiple historical time points for recovery in the event of a failure, significantly improving the system's fault tolerance and data reliability.

[0029] S104. When breakpoint resume is required, load the second breakpoint state snapshot selected by the user from the first breakpoint state snapshot, and replay the replay operation sequence and replay data corresponding to the second breakpoint state snapshot based on the decoder corresponding to the encoder.

[0030] For example, when a network interruption is detected or the user actively requests recovery, the system loads the user-selected second breakpoint state snapshot from persistent storage and parses the target state index information contained in the second breakpoint state snapshot. Based on the target state index information, the system locates the corresponding position in the latent state sequence and obtains a subset of all latent state vectors from the sequence start point to the position specified by the target state index information. This subset of latent state vectors is input into a decoder network symmetrical to the encoder structure. The decoder gradually reconstructs the original operation instruction sequence and data block content through deconvolution layers and cross-modal decoding layers. The replay process strictly follows the temporal order and data dependencies of the original operations, executing the reconstructed operation instructions sequentially and writing the generated data to the target storage location. During execution, checksums and verifications ensure the consistency between the replay data and the original data; any deviation triggers an error correction mechanism based on redundant coding.

[0031] A decoder network symmetrical to the encoder is used to reconstruct the operation sequence and data content, ensuring that the replay process maintains the data consistency and transaction integrity of the original operation, effectively preventing data corruption caused by interruption recovery. Through dual protection of checksum verification and error correction mechanisms, the data recovery accuracy reaches over 99.99%, meeting the data consistency requirements of financial-grade applications. The entire replay process supports parallel processing and incremental execution, completing the recovery of 15MB of data within 500 milliseconds, significantly improving system availability and user experience.

[0032] This application provides a method for intelligent caching and breakpoint resumption based on streaming AI. The method includes: encoding a user's operation sequence and corresponding data to be uploaded in real time using an encoder to generate a potential state sequence; inputting the potential state sequence into a preset prediction model and outputting a prediction result, the prediction result including: the user's next operation intention and the range of affected data; periodically generating and persisting a first breakpoint state snapshot based on the potential state sequence; when breakpoint resumption is required, loading a second breakpoint state snapshot selected by the user from the first breakpoint state snapshot, and replaying the replay operation sequence and replay data corresponding to the second breakpoint state snapshot based on the decoder corresponding to the encoder. In the above method, by using an encoder to efficiently compress and express the user's operation sequence and the data to be uploaded in real time to obtain the potential state sequence, the prediction model can accurately infer the user's next operation intention and the range of affected data based on the potential state sequence, thereby driving intelligent cache preloading, significantly reducing operation latency. By periodically generating and persisting breakpoint state snapshots, and replaying the corresponding operation and data with the help of a decoder when resumption is required, lightweight and high-precision interruption recovery and state reconstruction are achieved, effectively improving system response efficiency and user experience.

[0033] To more clearly illustrate the technical solution of this application, the technical solution of this application will be described below through specific embodiments. It should be noted that the specific embodiments are used to expand the description of the technical solution of this application, and are not intended to limit this application.

[0034] In some embodiments, the encoder is constructed based on a one-dimensional causal convolutional layer. The encoder encodes the user's operation sequence and the corresponding data to be uploaded in real time to generate a latent state sequence, including: padding the operation sequence with the time dimension to obtain a padded sequence; extracting features from the padded sequence to obtain sequence latent features; and encoding the sequence latent features and the corresponding data to be uploaded into a latent state sequence.

[0035] For example, when an encoder built on a one-dimensional causal convolutional layer processes a user operation sequence, it pads the temporal dimension of the operation sequence to meet the causal constraints of convolutional computation. The padding length is dynamically calculated based on the kernel size and dilation rate to ensure that the output does not leak future information. After padding, the sequence enters multiple causal convolutional layers for feature extraction. The output of each convolutional layer is passed to the next layer through a non-linear activation function to extract the sequence latent features containing temporal patterns. The sequence latent features and the corresponding data to be uploaded are fused through a cross-modal attention mechanism, where the sequence latent features serve as query vectors and the feature representations of the data to be uploaded serve as key-value pairs. Attention weights are calculated to align the key information of the operation semantics with the data content. The aligned feature vectors are then dimensionality-reduced by a linear transformation layer to generate a compact latent state sequence. The latent state sequence retains both the temporal logic of the operation sequence and the semantic information of the data to be uploaded.

[0036] In some embodiments, training a pre-defined prediction model includes: acquiring historical latent sequence samples for training to obtain a sample dataset; performing a first forward propagation on the sample dataset to obtain a first prediction result; determining the replacement ratio of the operation state vector according to a preset cosine scheduling strategy; replacing some of the real operation state vectors with predicted operation vectors according to the replacement ratio to generate a hybrid operation sequence; performing a second forward propagation on the hybrid operation sequence to obtain a second prediction result; calculating the loss function between the second prediction result and the real operation state vectors to obtain a training loss value, until the training loss value converges, thus completing model training.

[0037] For example, the pre-defined prediction model training process employs a dual forward propagation mechanism and a dynamic scheduling strategy. A sample dataset is constructed using historical latent sequence samples. This dataset needs to cover various operational scenarios and anomaly patterns to ensure the model's generalization ability. The construction of the sample dataset includes preprocessing steps such as data cleaning, sequence alignment, and feature standardization. During the first forward propagation of the sample dataset, a complete real operational state vector is used as input. The self-attention mechanism of the Transformer encoder layer calculates the dependencies between positions in the sequence. The self-attention weights are calculated using a scaled dot product attention formula and a causal mask is applied to ensure temporal constraints. The first prediction result output from the first forward propagation serves as a benchmark for the model's initial performance. The replacement ratio of the operational state vector is dynamically adjusted according to a pre-defined cosine scheduling strategy. This strategy calculates a smooth curve from the initial value to the target value based on the training epochs. The initial replacement ratio is set to 10% to allow the model to initially encounter the prediction output without affecting training stability. As the training epochs increase, the replacement ratio is gradually increased to 50% to enhance the model's adaptability to self-generated inputs. According to the current replacement ratio, a portion of the real operation state vectors in the sample dataset are replaced with model-predicted operation vectors. A random sampling strategy is used during the replacement process to ensure the diversity of the training data, generating a mixed operation sequence that includes both the real data distribution and the model's own predicted distribution. During the second forward propagation of the mixed operation sequence, a composite loss function of the output and the real label is calculated. This loss function includes a mean squared error term and a KL divergence term. The mean squared error term constrains the accuracy of the predicted values, while the KL divergence term ensures the similarity between the predicted and real distributions. The gradient is calculated using the backpropagation algorithm to update the model parameters. An early stopping strategy is used during training to prevent overfitting. Model training is completed when the training loss value converges to a stable threshold. The resulting prediction model possesses the ability to handle unseen operation modes and exhibits good generalization performance.

[0038] In some embodiments, periodically generating and persisting a first breakpoint state snapshot based on a latent state sequence includes: setting an all-zero reference vector as a stopping condition flag to obtain a reference end vector; calculating the Euclidean distance between each latent state in the latent state sequence and the reference end vector as a distance metric; comparing the distance metric with a preset metric threshold to obtain a comparison result; determining whether a preset natural breakpoint has been reached based on the comparison result and generating a breakpoint determination signal; when the breakpoint determination signal is true, extracting state index information from the latent state sequence based on the comparison result and generating a first breakpoint state snapshot based on the state index information; and storing the first breakpoint state snapshot in association with a timestamp to complete the persistence of the first breakpoint state snapshot.

[0039] For example, the process of periodically generating and persisting first breakpoint state snapshots based on the latent state sequence includes two core steps: intelligent breakpoint detection and lightweight snapshot generation. A zero-valued reference vector is set as a stopping condition flag, and the reference end vector uses a zero-valued vector with the same dimensions as the latent state to ensure comparability of distance calculations. The Euclidean distance between each latent state in the latent state sequence and the reference end vector is calculated. The Euclidean distance is calculated using the formula of the square root of the sum of the squares of the differences in each dimension of the vector, resulting in a distance metric sequence that reflects the real-time similarity between the operation flow and the termination state. The distance metric sequence is smoothed using a sliding window averaging algorithm. The sliding window size is dynamically adjusted according to the operation frequency, and the smoothing effectively eliminates false triggers caused by random fluctuations. The smoothed distance metric is compared with a preset metric threshold, which is obtained through statistical learning from historical data. The comparison result generates a binary judgment signal. Based on the comparison result, it is determined whether a preset natural breakpoint has been reached. The judgment logic includes a test for the duration of consecutive values ​​below the threshold to avoid misjudgments caused by instantaneous fluctuations. When the breakpoint determination signal is true, state index information is extracted from the potential state sequence based on the extreme position of the distance metric. The state index information includes metadata such as sequence offset, checksum, and version number. A first breakpoint state snapshot is generated based on the state index information. The snapshot uses a compact binary encoding format, and storage space is further compressed through differential encoding. The first breakpoint state snapshot is associated with a high-precision timestamp. The timestamp uses an international standard time format to ensure cross-system compatibility. The storage process uses an append-only write mode to ensure data integrity. Simultaneously, the snapshot metadata index is updated to support multi-version management and fast retrieval, achieving efficient and reliable breakpoint state persistence.

[0040] In some embodiments, replaying the replay operation sequence and replay data corresponding to the second breakpoint state snapshot based on the decoder corresponding to the encoder includes: using the decoder to parse the selected second breakpoint state snapshot to obtain the corresponding target state index information; parsing the target state index information to obtain the replay operation sequence and replay data.

[0041] For example, when replaying the second breakpoint state snapshot based on the decoder corresponding to the encoder, the decoder first parses the binary data structure of the second breakpoint state snapshot and extracts the target state index information contained therein. Based on the sequence position identifier in the target state index information, the corresponding interval in the latent state sequence is located, and all latent state vectors within that interval are read to form a vector set to be decoded. This vector set is input to a symmetric decoder network, and the semantic representation and data content of the original operation instructions are gradually reconstructed through deconvolution layers and cross-modal attention layers. During the reconstruction process, the temporal order and data dependencies of the original operations are strictly maintained to ensure that the replayed operation sequence is functionally completely equivalent to the original operation sequence. The complete replayed operation sequence and replayed data are output. After verification and validation, the replayed data is written to the target storage location, completing the data reconstruction process from the breakpoint state to the latest state.

[0042] In some embodiments, encoding the sequence latent features and the corresponding data to be uploaded into a latent state sequence includes: estimating the Gaussian distribution parameters of the sequence latent features to obtain a mean vector and a variance vector; reparameterizing the sequence latent features based on the mean vector and variance vector to generate a first latent representation vector; downsampling the latent representation vector to obtain a downsampled second latent representation vector; applying causal constraints to the representation of the second latent representation vector to obtain a third latent representation vector; and fusing the third latent representation vector with the data to be uploaded to generate a latent state sequence.

[0043] For example, the process of encoding the sequence latent features and the corresponding data to be uploaded into a latent state sequence employs a multi-stage feature transformation and fusion strategy. First, Gaussian distribution parameters are estimated for the sequence latent features. A two-layer fully connected neural network is used to calculate the mean vector and variance vector at each time step. The mean vector captures the central tendency of the features, while the variance vector represents the dispersion of the features. Based on the mean and variance vectors, the sequence latent features are reparameterized and sampled. The reparameterization technique achieves differentiable random sampling by sampling from a standard normal distribution and then scaling and shifting, generating a first latent representation vector that retains the original statistical properties of the features while introducing randomness to enhance generalization ability. The first latent representation vector is then downsampled in the time dimension using a max-pooling operation with a step size of 2. This reduces the sequence length while retaining the most significant feature activations, resulting in a downsampled second latent representation vector. Causal constraints are applied to the second latent representation vector, implemented through a mask matrix, ensuring that the feature calculation at each time step depends only on current and historical information without revealing future information, resulting in a third latent representation vector. The third latent representation vector is fused with the data to be uploaded at the feature level. The fusion process adopts a gated attention mechanism, calculates the feature weights through the sigmoid function and dynamically adjusts the contribution ratio of the two features to generate a latent state sequence. The latent state sequence includes the temporal pattern of the operation sequence and the semantic content of the data to be uploaded.

[0044] In some embodiments, after replaying the replay operation sequence and replay data corresponding to the second breakpoint state snapshot based on the decoder corresponding to the encoder, the method further includes: maintaining a data cache log based on the replay operation sequence and replay data.

[0045] For example, after replaying the replay operation sequence and replay data corresponding to the second breakpoint state snapshot based on the decoder corresponding to the encoder, the data cache state is updated according to the execution result of the replay operation sequence, recording the impact range and modification content of each operation on the cached data. A data cache log is maintained based on the verification result of the replay data. Log entries include operation timestamps, operation types, data block identifiers, checksums, and cache state change records. The data cache log uses a circular buffer structure to store the latest 1000 operation records, and log snapshots are periodically persisted to a distributed file system. The data cache log enables real-time monitoring and anomaly recovery of the cache state. When data inconsistency is detected, the replay operation can start from the most recent valid log entry, ensuring consistency between cached data and persistent storage.

[0046] Please see Figure 2 , Figure 2This is a schematic block diagram of a streaming AI-based intelligent caching and breakpoint resumption system 200 provided in an embodiment of this application. The streaming AI-based intelligent caching and breakpoint resumption system 200 is used to execute the aforementioned streaming AI-based intelligent caching and breakpoint resumption method. The streaming AI-based intelligent caching and breakpoint resumption system 200 can be configured in a server.

[0047] The server can be a standalone server, a server cluster, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms.

[0048] like Figure 2 As shown, the intelligent caching and breakpoint resume system 200 based on streaming AI includes: a sequence encoding module 201, a predictive analysis module 202, a breakpoint analysis module 203, and a breakpoint replay module 204.

[0049] The sequence encoding module 201 is used to encode the user's operation sequence and the corresponding data to be uploaded in real time through the encoder to generate a potential state sequence.

[0050] The predictive analysis module 202 is used to input the potential state sequence into a preset predictive model and output the prediction results, which include: the user's next operation intention and the range of affected data.

[0051] The breakpoint analysis module 203 is used to periodically generate and persist the first breakpoint state snapshot based on the potential state sequence.

[0052] The breakpoint replay module 204 is used to load the second breakpoint state snapshot selected by the user from the first breakpoint state snapshot when breakpoint resumption is required, and replay the replay operation sequence and replay data corresponding to the second breakpoint state snapshot based on the decoder corresponding to the encoder.

[0053] This application provides a server, which includes a memory and a processor; the memory is used to store computer programs; the processor is used to execute the computer programs and, when executing the computer programs, implements the intelligent caching and breakpoint resumption method based on streaming AI as described in any of the embodiments of this application.

[0054] This application provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it enables the processor to implement a streaming AI-based intelligent caching and breakpoint resumption method as described in any of the embodiments of this application.

[0055] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method for intelligent caching and breakpoint resumption based on streaming AI, characterized in that, The method includes: The operation sequence is padded with time dimension to obtain a padded sequence; features are extracted from the padded sequence to obtain sequence latent features; the sequence latent features and the corresponding data to be uploaded are encoded into a latent state sequence, and the encoder is constructed based on a one-dimensional causal convolutional layer; The latent state sequence is input into a preset prediction model, and the prediction result is output. The prediction result includes: the user's next operation intention and the range of affected data. The training of the preset prediction model includes: acquiring historical latent sequence samples for training to obtain a sample dataset; performing a first forward propagation on the sample dataset to obtain a first prediction result; determining the replacement ratio of the operation state vector according to a preset cosine scheduling strategy; replacing part of the real operation state vector with the predicted operation vector according to the replacement ratio to generate a hybrid operation sequence; performing a second forward propagation on the hybrid operation sequence to obtain a second prediction result; calculating the loss function between the second prediction result and the real operation state vector to obtain a training loss value, until the training loss value converges, thus completing model training. The first breakpoint state snapshot is periodically generated and persisted based on the potential state sequence. When a breakpoint resume is required, the second breakpoint state snapshot selected by the user from the first breakpoint state snapshot is loaded, and the replay operation sequence and replay data corresponding to the second breakpoint state snapshot are replayed based on the decoder corresponding to the encoder.

2. The intelligent caching and breakpoint resumption method based on streaming AI as described in claim 1, characterized in that, The step of periodically generating and persisting a first breakpoint state snapshot based on the potential state sequence includes: Set the all-zero reference vector as the stopping condition flag to obtain the reference end vector; Calculate the Euclidean distance between each potential state in the potential state sequence and the reference end vector, and use it as a distance metric. The comparison result is obtained by comparing the distance metric value with the preset metric threshold. Based on the comparison results, determine whether a preset natural breakpoint has been reached, and generate a breakpoint determination signal; When the breakpoint determination signal is true, state index information is extracted from the potential state sequence according to the comparison result, and a first breakpoint state snapshot is generated according to the state index information. The first breakpoint state snapshot is associated with a timestamp and stored to complete the persistence of the first breakpoint state snapshot.

3. The intelligent caching and breakpoint resumption method based on streaming AI as described in claim 2, characterized in that, The replay operation sequence and replay data corresponding to the second breakpoint state snapshot based on the decoder corresponding to the encoder include: The decoder is used to parse the selected second breakpoint state snapshot to obtain the corresponding target state index information; The target state index information is parsed to obtain the replay operation sequence and replay data.

4. The intelligent caching and breakpoint resumption method based on streaming AI as described in claim 1, characterized in that, The step of encoding the potential features of the sequence and the corresponding data to be uploaded into a potential state sequence includes: Gaussian distribution parameters are estimated for the latent features of the sequence to obtain the mean vector and variance vector; Based on the mean vector and the variance vector, the potential features of the sequence are reparameterized and sampled to generate a first potential representation vector; The potential representation vector is downsampled to obtain a downsampled second potential representation vector; Applying causal constraints to the second latent representation vector yields a third latent representation vector; The third latent representation vector is fused with the data to be uploaded to generate a latent state sequence.

5. The intelligent caching and breakpoint resumption method based on streaming AI as described in claim 1, characterized in that, After replaying the replay operation sequence and replay data corresponding to the second breakpoint state snapshot based on the decoder corresponding to the encoder, the method further includes: The data cache log is maintained based on the replay operation sequence and the replay data.

6. A smart caching and breakpoint resume system based on streaming AI, characterized in that, The intelligent caching and breakpoint resumption system based on streaming AI is used to execute the intelligent caching and breakpoint resumption method based on streaming AI as described in any one of claims 1-5, wherein the intelligent caching and breakpoint resumption system based on streaming AI includes: The sequence encoding module is used to fill the operation sequence with time dimension to obtain a filled sequence; to extract features from the filled sequence to obtain sequence latent features; and to encode the sequence latent features and the corresponding data to be uploaded into a latent state sequence. The encoder is constructed based on a one-dimensional causal convolutional layer. The predictive analysis module is used to input the latent state sequence into a preset predictive model and output a prediction result, which includes: the user's next operation intention and the range of affected data. The training of the preset predictive model includes: acquiring historical latent sequence samples for training to obtain a sample dataset; performing a first forward propagation on the sample dataset to obtain a first prediction result; determining the replacement ratio of the operation state vector according to a preset cosine scheduling strategy; replacing part of the real operation state vector with predicted operation vectors according to the replacement ratio to generate a hybrid operation sequence; performing a second forward propagation on the hybrid operation sequence to obtain a second prediction result; calculating the loss function between the second prediction result and the real operation state vector to obtain a training loss value, until the training loss value converges, thus completing model training. The breakpoint analysis module is used to periodically generate and persist a first breakpoint state snapshot based on the potential state sequence; The breakpoint replay module is used to load the second breakpoint state snapshot selected by the user from the first breakpoint state snapshot when breakpoint resumption is required, and replay the replay operation sequence and replay data corresponding to the second breakpoint state snapshot based on the decoder corresponding to the encoder.