Streaming AI-based intelligent caching and breakpoint resuming method and system
By generating potential state sequences and predicting user operation intentions through streaming AI, and combining breakpoint state snapshots, the low efficiency of caching and resuming in streaming operations is solved, achieving efficient intelligent caching and seamless resuming, thus improving system response efficiency and user experience.
Patent Information
- Application Number
- CN202511467360.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-14
- Publication Date
- 2026-01-20
- Estimated Expiration
- 2045-10-14
AI Technical Summary
In streaming operation scenarios of spreadsheet and database systems, existing technologies struggle to achieve intelligent caching and seamless resume, resulting in response delays and difficulties in interruption recovery. Traditional caching methods rely on static rules and have high storage overhead, while breakpoint resume solutions are inefficient.
By using a streaming AI-based intelligent caching and breakpoint resume method, the encoder generates a potential state sequence, and the prediction model predicts the user's operation intention and data range. Breakpoint state snapshots are generated periodically, and the operation sequence and data are replayed with the help of the decoder when interrupted, so as to achieve lightweight and high-precision interruption recovery and state reconstruction.
Significantly reduces operation latency, improves system response efficiency and user experience, enables lightweight and high-precision interrupt recovery and state reconstruction, and meets the data consistency requirements of financial-grade applications.
Smart Images

Figure CN121365047A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of artificial intelligence, and in particular to an intelligent caching and breakpoint resume method and system based on streaming AI. BACKGROUND
[0002] At present, in the streaming operation scenario of electronic spreadsheets and database systems, users often face problems such as response delay and difficulty in resuming due to complex operation sequences or large data scales. Traditional caching methods are mostly based on static rules and are difficult to dynamically predict user intentions to achieve data preloading, while existing breakpoint resume schemes usually rely on complete operation logs and data snapshots, which have limitations such as large storage overhead and low recovery efficiency, and cannot support intelligent caching and seamless resume while ensuring real-time performance. SUMMARY
[0003] The present application provides an intelligent caching and breakpoint resume method and system based on streaming AI, which is used to realize intelligent caching and seamless resume.
[0004] In a first aspect, the present application provides an intelligent caching and breakpoint resume method based on streaming AI, which comprises: encoding, by an encoder, an operation sequence of a user and corresponding to-be-uploaded data in real time to generate a latent state sequence; inputting the latent state sequence into a preset prediction model to output a prediction result, the prediction result comprising: a next operation intention of the user and an affected data range; generating and persisting a first breakpoint state snapshot according to the latent state sequence; when breakpoint resume is needed, loading a second breakpoint state snapshot selected by the user from the first breakpoint state snapshot, and replaying, based on a corresponding decoder of the encoder, a replay operation sequence and replay data corresponding to the second breakpoint state snapshot.
[0005] In a second aspect, the present application provides an intelligent caching and breakpoint resume system based on streaming AI, which comprises: a sequence encoding module, configured to encode, by an encoder, an operation sequence of a user and corresponding to-be-uploaded data in real time to generate a latent state sequence; a prediction analysis module, configured to input the latent state sequence into a preset prediction model to output a prediction result, the prediction result comprising: a next operation intention of the user and an affected data range; a breakpoint analysis module, configured to generate and persist a first breakpoint state snapshot according to the latent state sequence; a breakpoint replay module configured to load a second breakpoint state snapshot selected by the user from the first breakpoint state snapshot and replay a replay operation sequence and replay data corresponding to the second breakpoint state snapshot based on a decoder corresponding to the encoder when breakpoint resume is needed.
[0006] The embodiment of the present application provides a smart caching and breakpoint resume method based on streaming AI, which comprises the following steps: encoding an operation sequence of a user and corresponding to-be-uploaded data in real time by using an encoder to generate a latent state sequence; inputting the latent state sequence into a preset prediction model to output a prediction result, wherein the prediction result comprises a next operation intention of the user and an affected data range; generating and persisting a first breakpoint state snapshot according to the latent state sequence periodically; and loading a second breakpoint state snapshot selected by the user from the first breakpoint state snapshot and replaying a replay operation sequence and replay data corresponding to the second breakpoint state snapshot based on a decoder corresponding to the encoder when breakpoint resume is needed. In the above method, the operation sequence of the user and the to-be-uploaded data are efficiently compressed and expressed in real time by using the encoder to obtain the latent state sequence, and based on the latent state sequence, the prediction model can accurately infer the next operation intention of the user and the affected data range, so as to drive the smart caching preloading, significantly reduce the operation delay, and realize lightweight and high-precision interruption recovery and state reconstruction by periodically generating and persisting the breakpoint state snapshot and replaying the corresponding operation and data by using the decoder when the resume is needed, thereby effectively improving the system response efficiency and user experience. BRIEF DESCRIPTION OF DRAWINGS
[0007] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiment description. Obviously, the drawings in the following description are some embodiments of the present application, and other drawings can also be obtained by those skilled in the art without any creative effort on the basis of these drawings.
[0008] Figure 1 A schematic flow chart of a smart caching and breakpoint resume method based on streaming AI provided by the embodiment of the present application is shown in the figure. Figure 2 A schematic block diagram of a smart caching and breakpoint resume system based on streaming AI provided by the embodiment of the present application is shown in the figure. DETAILED DESCRIPTION
[0009] In order to make the purpose, technical solutions and advantages of the present application more clear, the following will describe the embodiments of the present application with reference to the drawings in the embodiments of the present application.
[0010] The terms "first" and "second" and the like in the description, claims and drawings of the application are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. Furthermore, the terms "comprises", "comprising", "includes", "including" and the like are to be construed open-ended, allowing for instances where there are equivalents to the elements listed thereafter that are not expressly listed, and that the additional elements are present in the process, method, system, product or apparatus, etc. described by the claim.
[0011] Reference herein to an "embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase that in various places in the specification are not necessarily all referring to the same embodiment, nor are the various embodiments mutually exclusive or alternative embodiments.
[0012] It should be understood that, in the present application, "at least one" means one or more, "multiple" means two or more, "at least two" means two or three and three or more, and "and / or" is used to describe the relationship between associated objects, indicating that there can be three relationships, for example, "A and / or B" can mean: only A, only B, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally represents an "or" relationship between the associated objects. "At least one of the following" or the like means any combination of these items, including any combination of single or multiple items. For example, at least one 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.
[0013] Please refer to Figure 1 , Figure 1 is a schematic flow chart of an intelligent caching and breakpoint resuming method based on streaming AI provided by an embodiment of the application. As shown in Figure 1 , the specific steps of the intelligent caching and breakpoint resuming method based on streaming AI include S101-S104.
[0014] S101, real-time encoding the operation sequence of the user and the corresponding data to be uploaded by the encoder to generate a latent state sequence.
[0015] Exemplarily, the encoder constructed based on the streaming processing requirements encodes the operation sequence and the associated to-be-uploaded data input by the user in real time, the operation sequence includes continuous database query instructions, electronic table cell modification records, or file upload requests, and the like structured operation stream, each operation instruction carries metadata information such as operation type, target data identifier, parameter set, and timestamp. The encoding process adopts a neural network architecture based on one-dimensional causal convolution, the causal constraint of convolution calculation is ensured by front-end padding of the time dimension of the operation sequence, that is, the feature output at the current time only depends on the historical and current input without future information, and after multi-layer convolution kernel feature extraction, a sequence of latent feature vector groups containing operation semantics is output. The sequence of latent feature vector groups and the to-be-uploaded binary data block are jointly input into a fusion encoding layer, the operation semantic features and the data content features are aligned and fused through a cross-modal attention mechanism to generate a joint representation with operation logic and data content. A low-dimensional dense latent state sequence is generated by sampling from a Gaussian distribution through a reparameterization technique, and the latent state sequence completely encodes the evolution process of the user operation intention and the data state in the form of a continuous vector. For example, when processing an operation stream containing 1000 SQL queries, the encoder converts it into a 256-dimensional latent state sequence, and each vector corresponds to an operation and data snapshot at a time step.
[0016] S102, input the latent state sequence into a preset prediction model, and output a prediction result, the prediction result including: a next-step operation intention of the user and an affected data range.
[0017] For example, the generated latent state sequence is input into a pre-trained prediction model for analysis. The prediction model is based on a Transformer-based autoregressive architecture and equipped with a causal masking mechanism to ensure temporal dependency constraints. The prediction model captures long-range temporal dependencies and operational patterns in the latent state sequence through multiple layers of self-attention. The output layer of the prediction model produces two types of prediction results: a probability distribution vector for the user's next operation intention and a spatial coordinate descriptor for the affected data range. The operation intention prediction is output by a softmax classifier with probability values for different operation types, while the data range prediction is output by a regression layer with the starting address, length, and priority score of the target data block. The prediction process is based on historical latent state sequences to infer future operation trends. For example, when consecutive data filtering operations are detected, the prediction model may predict that the next step will trigger a sorting operation and preload the relevant data columns to the cache area. The prediction results are converted into specific cache instructions to drive the underlying storage system to migrate the affected data blocks from low-speed storage to high-speed cache pools, while allocating memory and computing resources in advance according to the data range descriptor, achieving resource preheating and data readiness before operation execution. For example, after analyzing the latent state sequence, the prediction model predicts with 85% confidence that the user will request a certain 100MB data table in 300ms and preload it to memory in advance.
[0018] S103, generating and persisting the first breakpoint state snapshot according to the latent state sequence.
[0019] For example, according to the real-time generated potential state sequence, the generation and persistence process of the breakpoint state snapshot is triggered periodically, a full zero vector is introduced as a reference end vector in the potential state sequence processing process, and the Euclidean distance value of each potential state vector in the sequence and the reference end vector is calculated. The distance calculation generates a continuous distance measurement value sequence and eliminates noise fluctuations through sliding window smoothing processing. Intelligent breakpoint detection is realized by calculating the Euclidean distance between the potential state sequence and the full zero reference vector. Compared with the traditional fixed time interval snapshot mechanism, the natural pause point in the operation process can be accurately captured, and unnecessary snapshot overhead can be avoided in the high-speed operation process. The smoothed distance measurement value is compared with the preset threshold to generate a binary breakpoint judgment signal. When the distance value is continuously lower than the threshold, it is determined that the current operation flow reaches a natural breakpoint state. When the breakpoint is triggered, the index position, checksum and timestamp metadata of the current potential state sequence are extracted, and these metadata are encapsulated as the first breakpoint state snapshot in a lightweight data structure. The first breakpoint state snapshot is constructed by using a lightweight metadata encapsulation method, so that the size of a single snapshot is controlled at the level of 2KB, which reduces the storage space occupation by more than 99% compared with the traditional scheme of saving complete operation logs or data images. The first breakpoint state snapshot is converted into a binary format through a serialization protocol and written into a persistent storage device, and the snapshot index table is updated to record the storage path and time mapping relationship, so that the first breakpoint state snapshot can be quickly retrieved and verified. The serialization protocol and distributed storage are used to realize the persistence of the snapshot, support fast writing and reading in a high-concurrency scenario, ensure that multiple historical time points can be recovered when a fault occurs, and greatly improve the fault tolerance and data reliability of the system.
[0020] S104, when breakpoint resume is needed, loading the second breakpoint state snapshot selected by the user from the first breakpoint state snapshot, replaying the replay operation sequence and replay data corresponding to the second breakpoint state snapshot based on the corresponding decoder of the encoder.
[0021] For example, when a network interruption is detected or a user actively requests recovery, the second breakpoint state snapshot selected by the user is loaded from the persistent storage and the target state index information contained in the second breakpoint state snapshot is parsed. According to the target state index information, the corresponding position in the potential state sequence is located, and the entire potential state vector subset from the starting point of the sequence to the position specified by the target state index information is obtained. The potential state vector subset is input into the decoder network symmetrical to the encoder structure, and the decoder gradually reconstructs the original operation instruction sequence and data block content through the deconvolution layer and the cross-modal decoding layer. The replay process strictly follows the time sequence and data dependency of the original operation, and the reconstructed operation instructions are executed in sequence and the generated data is written into the target storage location. The consistency of the replay data and the original data is ensured through checksum verification during the execution process, and any deviation will trigger the error correction mechanism based on redundant encoding.
[0022] The decoder network symmetrical to the encoder reconstructs 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 disorder caused by interruption recovery. Through the double protection of checksum verification and error correction mechanism, the data recovery accuracy reaches more than 99.99%, meeting the data consistency requirements of financial-level applications. The entire replay process supports parallel processing and incremental execution, and can be completed within 500 milliseconds in the recovery of 15MB data scenarios, significantly improving the availability and user experience of the system.
[0023] The embodiment of the application provides a kind of based on streaming AI intelligent cache and breakpoint continuation method, which comprises: the operation sequence of user and corresponding data to be uploaded are encoded in real time by encoder, and potential state sequence is generated;The potential 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 potential state sequence, first breakpoint state snapshot is generated and persisted periodically;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 decoder corresponding to the encoder.In the above method, by using encoder to efficiently compress and express the operation sequence of user and the real-time encoding of data to be uploaded, potential state sequence is obtained, based on potential state sequence, prediction model can accurately infer user next operation intention and affected data range, to drive intelligent cache preloading, significantly reduce operation delay, by periodically generating and persisting breakpoint state snapshot, and corresponding operation and data are replayed by decoder when continuation is needed, light weight, high precision interruption recovery and state reconstruction are realized, system response efficiency and user experience are effectively improved.
[0024] In order to more clearly introduce the technical scheme of the present application, the technical scheme of the present application will be introduced through specific embodiments below. It should be noted that the specific embodiments are used to expand the description of the technical scheme of the present application, and not to limit the present application.
[0025] In some embodiments, the encoder is constructed based on one-dimensional causal convolution layer, and the operation sequence of user and corresponding data to be uploaded are encoded in real time by encoder to generate potential state sequence, comprising: time dimension padding is performed on operation sequence to obtain padded sequence;Sequence potential features are obtained by feature extraction on padded sequence;Sequence potential features and corresponding data to be uploaded are encoded into potential state sequence.
[0026] For example, when the encoder constructed based on the one-dimensional causal convolution layer processes the user operation sequence, the causal constraint requirement of convolution calculation is met by front-end padding of the time dimension of the operation sequence, and the padding length is dynamically calculated according to the convolution kernel size and the inflation rate to ensure that the output time does not leak future information. After padding, the sequence enters the multi-layer causal convolution layer for feature extraction. The convolution output of each layer is transmitted to the next layer through a nonlinear activation function, and the sequence potential features containing the timing pattern are extracted. The sequence potential features and the corresponding data to be uploaded are fused through the cross-modal attention mechanism, in which the sequence potential features are used as the query vector, and the feature representation of the data to be uploaded is used as the key-value pair. The operation semantics and the key information of the data content are aligned by calculating the attention weight. After dimension reduction by the linear transformation layer, the aligned feature vector generates a compact latent state sequence, which retains the timing logic of the operation sequence and fuses the semantic information of the data to be uploaded.
[0027] In some embodiments, the training of the preset prediction model comprises: obtaining historical latent sequence samples for training to obtain a sample data set; performing first forward propagation on the sample data set to obtain a first prediction result; determining a 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 mixed operation sequence; performing second forward propagation on the mixed operation sequence to obtain a second prediction result; calculating a loss function of the second prediction result and the real operation state vector to obtain a training loss value, until the training loss value converges, and the model training is completed.
[0028] For example, the preset prediction model training process adopts a double forward propagation mechanism and a dynamic scheduling strategy. A sample data set is constructed by using historical potential sequence samples, which needs to cover various operation scenarios and abnormal patterns to ensure the generalization ability of the model. The construction process of the sample data set includes preprocessing steps such as data cleaning, sequence alignment, and feature standardization. When performing the first forward propagation on the sample data set, the complete real operation state vector is used as the input. The dependence between each position in the sequence is calculated by the self-attention mechanism of the Transformer encoder layer. The calculation of the self-attention weight uses the scaled dot-product attention formula and applies the causal mask to ensure the time constraint. The first prediction result output by the first forward propagation is used as the benchmark reference for the initial performance of the model. The replacement ratio of the operation state vector is dynamically adjusted according to the preset cosine scheduling strategy. The cosine scheduling strategy calculates a smooth change curve from the initial value to the target value based on the training round. The initial replacement ratio is set to 10% to make the model initially contact the prediction output without affecting the training stability. As the training round increases, the replacement ratio is gradually increased to 50% to enhance the model's adaptability to self-generated inputs. According to the current replacement ratio, part of the real operation state vector in the sample data set is replaced by the model prediction operation vector. The replacement process uses a random sampling strategy to ensure the diversity of the training data. The generated mixed operation sequence contains both real data distribution and model prediction distribution. When performing the second forward propagation on the mixed operation sequence, the compound loss function is calculated between the output and the real label. The loss function includes the mean square error term and the KL divergence term. The mean square error term constrains the accuracy of the prediction value, and the KL divergence term ensures the similarity between the prediction distribution and the real distribution. The gradient is calculated by the back propagation algorithm and the model parameters are updated. The training process uses an early stopping strategy to prevent overfitting. When the training loss value converges to a stable threshold, the model training is completed, and the obtained prediction model has the ability to handle unseen operation patterns and good generalization performance.
[0029] In some embodiments, a first breakpoint state snapshot is periodically generated and persisted according to the potential state sequence, including: setting a full-zero reference vector as a stop condition flag to obtain a reference end vector; calculating the Euclidean distance between each potential state in the potential state sequence and the reference end vector as a distance metric value; comparing the distance metric value with a preset metric threshold to obtain a comparison result; determining whether a preset natural breakpoint is reached according to the comparison result to generate a breakpoint determination signal; when the breakpoint determination signal is true, extracting state index information from the potential state sequence according to the comparison result, and generating the first breakpoint state snapshot according to 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.
[0030] For example, the process of periodically generating and persisting the first breakpoint state snapshot according to the potential state sequence includes two core links of intelligent breakpoint detection and lightweight snapshot generation, a full zero reference vector is set as a stop condition flag, and a reference end vector uses a zero value vector with the same dimension as the potential state to ensure the comparability of distance calculation. The Euclidean distance between each potential state in the potential state sequence and the reference end vector is calculated, and the Euclidean distance is calculated by using the square sum of the difference of each dimension of the vector and the square root formula, so as to obtain a distance measurement value sequence reflecting the real-time similarity between the operation flow and the termination state. The distance measurement value sequence is smoothed by a sliding window average algorithm, the sliding window size is dynamically adjusted according to the operation frequency, and the smoothing effectively eliminates the false triggering caused by random fluctuations. The smoothed distance measurement value is compared with a preset measurement threshold, the measurement threshold is obtained by statistical learning of historical data, and a binary judgment signal is generated by comparing the results. Whether the preset natural breakpoint is reached is determined according to the comparison result, and the determination logic includes a continuous duration test below the threshold to avoid false judgment caused by instantaneous fluctuations. When the breakpoint judgment signal is true, the state index information is extracted from the potential state sequence according to the extreme value position of the distance measurement value, and the state index information includes sequence offset, checksum, version number and other metadata. The first breakpoint state snapshot is generated according to the state index information, the snapshot uses a compact binary encoding format, and the storage space is further compressed by differential encoding. The first breakpoint state snapshot is stored in association with a high-precision timestamp, the timestamp uses an international standard time format to ensure cross-system compatibility, the storage process uses an append write mode to ensure data integrity, and the snapshot metadata index is updated to support multi-version management and fast retrieval, realizing efficient and reliable breakpoint state persistence.
[0031] In some embodiments, replaying the operation sequence and the 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 corresponding target state index information; and parsing the target state index information to obtain the operation sequence and the replay data.
[0032] For example, when the corresponding decoder of the encoder plays back the second breakpoint state snapshot, first, the binary data structure of the second breakpoint state snapshot is parsed using the decoder to extract the target state index information contained therein. According to the sequence position identifier in the target state index information, the corresponding interval in the potential state sequence is located, and all potential state vectors in the interval are read to form a set of vectors to be decoded. The set of vectors to be decoded is input into the decoder network of the symmetric structure, and the semantic representation and data content of the original operation instruction are gradually reconstructed through the deconvolution layer and the cross-modal attention layer. The time sequence and data dependency of the original operation are strictly maintained during the reconstruction process, ensuring that the replay operation sequence and the original operation sequence are completely equivalent in function, and outputting a complete replay operation sequence and replay data. After the replay data is checked and verified, it is written to the target storage location, and the data reconstruction process from the breakpoint state to the latest state is completed.
[0033] In some embodiments, encoding the sequence latent feature and the corresponding data to be uploaded into a latent state sequence includes: performing Gaussian distribution parameter estimation on the sequence latent feature to obtain a mean vector and a variance vector; performing re-parameterization sampling on the sequence latent feature based on the mean vector and the variance vector to generate a first latent representation vector; downsampling the latent representation vector to obtain a second latent representation vector after downsampling; applying a causal constraint to the second latent representation vector in representation to obtain a third latent representation vector; and fusing the third latent representation vector with the data to be uploaded to generate the latent state sequence.
[0034] Exemplarily, the process of encoding the sequence latent features and the corresponding to-be-uploaded data into a latent state sequence adopts a multi-stage feature transformation and fusion strategy. Firstly, Gaussian distribution parameter estimation is performed on the sequence latent features. A two-layer fully connected neural network is used to calculate the mean vector and the variance vector of each time step. The mean vector captures the central tendency of the features, and the variance vector represents the dispersion degree of the features. The sequence latent features are re-parameterized based on the mean vector and the variance vector. The re-parameterization technique realizes derivable random sampling by rescaling and shifting from the standard normal distribution. The generated first latent representation vector not only preserves the statistical characteristics of the original features but also introduces randomness to enhance the generalization ability. The first latent representation vector is down-sampled in the time dimension. The down-sampling adopts a max-pooling operation with a step size of 2, which reduces the sequence length while preserving the most significant feature activations, obtaining a second latent representation vector after down-sampling. The causal constraint processing is applied to the second latent representation vector. The causal constraint is realized by a mask matrix, which ensures that the feature calculation at each time step only depends on the current and historical information and does not leak future information, obtaining a third latent representation vector. The third latent representation vector is fused with the to-be-uploaded data at the feature level. The fusion process adopts a gated attention mechanism. The feature weight is calculated by a sigmoid function, and the contribution ratio of the two features is dynamically adjusted. A latent state sequence is generated, which encodes the timing pattern of the operation sequence and the semantic content of the to-be-uploaded data.
[0035] In some embodiments, after the replay operation sequence and the replay data corresponding to the second breakpoint state snapshot are replayed based on the decoder corresponding to the encoder, the method further comprises: maintaining a data cache log according to the replay operation sequence and the replay data.
[0036] Exemplarily, after the replay operation sequence and the replay data corresponding to the second breakpoint state snapshot are replayed 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 influence range and modification content of each operation on the cache data. The data cache log is maintained according to the verification result of the replay data. The log entry includes operation timestamp, operation type, data block identifier, checksum, and cache state change record. The data cache log adopts a circular buffer structure to store the latest 1000 operation records, and at the same time, the log snapshot is periodically persisted to the distributed file system. Through the data cache log, real-time monitoring and abnormal recovery of the cache state can be realized. When data inconsistency is detected, the operation can be replayed from the nearest valid log entry, ensuring the consistency of the cache data and the persistent storage.
[0037] Please refer to Figure 2 , Figure 2is a schematic block diagram of an intelligent caching and breakpoint resume system based on streaming AI provided by an embodiment of the present application. The intelligent caching and breakpoint resume system based on streaming AI 200 is used to perform the intelligent caching and breakpoint resume method based on streaming AI described above. Wherein the intelligent caching and breakpoint resume system based on streaming AI 200 can be configured in a server.
[0038] Wherein the server can be a standalone server, or a server cluster, or a cloud server providing 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 basic cloud computing services such as big data and artificial intelligence platforms.
[0039] As shown in Figure 2 The intelligent caching and breakpoint resume system based on streaming AI 200 includes a sequence encoding module 201, a prediction analysis module 202, a breakpoint analysis module 203, and a breakpoint replay module 204.
[0040] The sequence encoding module 201 is configured to encode the operation sequence of the user and the corresponding data to be uploaded in real time through an encoder to generate a latent state sequence.
[0041] The prediction analysis module 202 is configured to input the latent state sequence into a preset prediction model to output a prediction result. The prediction result includes a user next operation intention and an affected data range.
[0042] The breakpoint analysis module 203 is configured to periodically generate and persist a first breakpoint state snapshot according to the latent state sequence.
[0043] The breakpoint replay module 204 is configured to load a second breakpoint state snapshot selected by the user from the first breakpoint state snapshot when breakpoint resume is needed, and replay a replay operation sequence and replay data corresponding to the second breakpoint state snapshot based on a corresponding decoder of the encoder.
[0044] An embodiment of the present application provides a server. The server includes a memory and a processor. The memory is configured to store a computer program. The processor is configured to execute the computer program and implement the intelligent caching and breakpoint resume method based on streaming AI of any one of the embodiments of the present application when executing the computer program.
[0045] An embodiment of the present application provides a computer readable storage medium. The computer readable storage medium stores a computer program. The computer program is executed by a processor to make the processor implement the intelligent caching and breakpoint resume method based on streaming AI of any one of the embodiments of the present application.
[0046] The above merely provides the specific implementation of the present application, but the protection scope of the present application is not limited to this. Any person skilled in the art can easily think of various equivalent modifications or replacements within the technical range disclosed by the present application, and these modifications or replacements should be covered in the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection 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 encoder performs real-time encoding of the user's operation sequence and the corresponding data to be uploaded to generate a potential state sequence. 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. 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 encoder is built based on a one-dimensional causal convolutional layer. The process of encoding the user's operation sequence and the corresponding data to be uploaded in real time to generate a latent state sequence includes: The operation sequence is padded with time dimension to obtain the padded sequence; Feature extraction is performed on the padded sequence to obtain the sequence's latent features; The potential features of the sequence and the corresponding data to be uploaded are encoded into a potential state sequence.
3. The intelligent caching and breakpoint resumption method based on streaming AI as described in claim 2, characterized in that, The training of the pre-set prediction model includes: Obtain historical latent sequence samples for training to obtain the sample dataset; The first forward propagation is performed on the sample dataset to obtain the first prediction result; The replacement ratio of the operation state vector is determined according to the preset cosine scheduling strategy; According to the replacement ratio, a portion of the actual operation state vectors are replaced with predicted operation vectors to generate a hybrid operation sequence; A second forward propagation is performed on the mixed operation sequence to obtain a second prediction result; Calculate the loss function between the second prediction result and the actual operation state vector to obtain the training loss value, and continue until the training loss value converges to complete the model training.
4. The intelligent caching and breakpoint resumption method based on streaming AI as described in claim 2, characterized in that, The step of periodically generating and persisting the 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.
5. The intelligent caching and breakpoint resumption method based on streaming AI as described in claim 4, 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.
6. The intelligent caching and breakpoint resumption method based on streaming AI as described in claim 2, characterized in that, 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.
7. 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.
8. 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-7, wherein the intelligent caching and breakpoint resumption system based on streaming AI includes: 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. 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. 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.
Citation Information
Patent Citations
OTA upgrading method and device, equipment and storage medium
CN116679960A
Database streaming backup breakpoint resuming method, device and equipment and medium
CN118555287A