Mirror image file transmission method and device, electronic equipment and storage medium

Through the difference comparison algorithm and hybrid timing prediction technology, the transmission parameters are dynamically adjusted to solve the problems of fragment dependence, low bandwidth utilization and insufficient fault tolerance in image transmission, and realize efficient and reliable image file transmission.

CN120602472APending Publication Date: 2025-09-05JINAN INSPUR DATA TECH CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202510714989.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-30
Publication Date
2025-09-05

AI Technical Summary

Technical Problem

Existing mirror transmission technology has problems such as increased system complexity due to sharding dependency, low bandwidth utilization, sensitivity to session interruptions, and limited fault tolerance, and is particularly inefficient in unstable network environments.

Method used

A difference comparison algorithm is used to generate difference data blocks, combined with hybrid time series prediction and decision tree optimization to allocate actions, dynamically adjust the transmission window and data packet sending rate, monitor the network status in real time and automatically reconnect after disconnection, achieving low bandwidth occupancy, high transmission rate and high fault tolerance.

Benefits of technology

It reduces the amount of data transmission, improves the transmission rate and fault tolerance, reduces bandwidth usage, improves user experience and system reliability, and realizes efficient image file transmission under network fluctuations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120602472A_ABST
    Figure CN120602472A_ABST
Patent Text Reader

Abstract

The invention discloses a mirror image file transmission method and device, electronic equipment and a storage medium, and relates to the technical field of computers. According to the method, the difference comparison algorithm is preferably utilized to acquire the difference data blocks for uploading or downloading of the mirror image file, so that the data transmission quantity is reduced, the bandwidth occupation is reduced, the network state parameters are monitored in real time during data transmission, and the bandwidth requirement is predicted by adopting a mixed time sequence prediction mode according to the network state parameters, so that the data transmission efficiency is improved. And through the decision tree, the distribution action is optimized, the size of a transmission window and the sending rate of a data packet are dynamically adjusted, the transmission rate is improved, the transmission state of each data block is recorded during data transmission, a heartbeat packet is periodically sent to detect the connection state, reconnection is started after disconnection is detected, and transmission is continued from an interruption point after successful reconnection. And the integrity of the data is verified after the data block transmission is completed, so that the fault tolerance is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method, device, electronic device, and storage medium for transmitting an image file. Background Art

[0002] Existing image transmission and download technologies usually rely on multi-segment upload (such as HTTP block transmission) to improve fault tolerance, but the segmentation mechanism requires additional maintenance of segment indexes and verification information, which increases the complexity of the system. In addition, in weak or unstable network environments, frequent segment retransmissions can lead to bandwidth waste and possible disconnection problems. In addition, when the user refreshes the page or the network is disconnected, the traditional solution will directly interrupt the transmission due to the short connection feature of HTTP, requiring the user to manually retry, which seriously affects efficiency. Multi-segment upload will also lead to high bandwidth usage, affecting the normal operation of other network applications. The shortcomings of existing technologies include: segment dependency: segment upload requires pre-segmentation of files and maintenance of segment status, which increases computing and storage overhead; low bandwidth utilization: fixed segment size is difficult to adapt to dynamic network environments, which can easily lead to idle or congested bandwidth; sensitive to session interruption: page refresh or short-term network disconnection will cause the session to be reset, and all data needs to be retransmitted; limited fault tolerance: traditional checksums are only used for integrity verification and cannot support accurate recovery from breakpoints. Summary of the Invention

[0003] The present application provides a method, apparatus, electronic device, and storage medium for transmitting an image file, to at least address the problems of fragment dependency, low bandwidth utilization, sensitivity to session interruption, and limited fault tolerance in existing image file transmission. This method achieves low bandwidth usage, high transmission rate, and high fault tolerance when uploading and downloading image files without adopting fragmented uploading.

[0004] This application provides a method for transferring an image file, including:

[0005] In response to receiving the uploaded image file, determining whether the image file has been uploaded or downloaded;

[0006] In response to the image file being uploaded or downloaded, obtaining a historical version file of the image file, generating a difference data block between the image file and the historical version file through a difference comparison algorithm, and uploading or downloading the difference data block;

[0007] In response to the image file not having been uploaded or downloaded, uploading or downloading the image file;

[0008] When uploading or downloading the difference data block or the image file, the network status parameters are monitored in real time, bandwidth requirements are predicted using a hybrid time series prediction method based on the network status parameters, and allocation actions are optimized through a decision tree to dynamically adjust the transmission window size and data packet sending rate;

[0009] During the process of uploading or downloading the difference data block or the mirror file, the transmission status of each data block is recorded, heartbeat packets are sent regularly to detect the connection status, and reconnection is initiated after a disconnection is detected, and transmission is continued from the interruption point after successful reconnection;

[0010] In response to the completion of the transmission of the difference data block or the data block of the mirror file, the integrity of the data is verified.

[0011] The present application also provides a mirror file transmission device, comprising:

[0012] a file checking module, configured to, in response to receiving an uploaded image file, determine whether the image file has been uploaded or downloaded;

[0013] an incremental differential encoding and transmission module, configured to obtain a historical version file of the image file in response to the image file being uploaded or downloaded, generate a difference data block between the image file and the historical version file using a difference comparison algorithm, and upload or download the difference data block;

[0014] an image file transmission module, configured to upload or download the image file in response to the image file not having been uploaded or downloaded;

[0015] a dynamic bandwidth adaptation and congestion control module, configured to monitor network status parameters in real time when uploading or downloading the difference data block or the image file, predict bandwidth requirements using a hybrid time series prediction method based on the network status parameters, and dynamically adjust the transmission window size and data packet sending rate by optimizing allocation actions through a decision tree;

[0016] A heartbeat detection and automatic reconnection module, configured to record the transmission status of each data block during the upload or download process of the difference data block or the mirror file, periodically send heartbeat packets to detect the connection status, initiate reconnection upon detecting a disconnection, and resume transmission from the interruption point upon successful reconnection;

[0017] The distributed fault-tolerant verification module is configured to verify the integrity of the data in response to the completion of the transmission of the difference data block or the data block of the mirror file.

[0018] The present application also provides an electronic device, comprising: a memory for storing a computer program; and a processor for implementing the steps of any of the above-mentioned image file transmission methods when executing the computer program.

[0019] The present application also provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned image file transmission methods are implemented.

[0020] Through the present application, the difference comparison algorithm is preferably used to obtain the difference data blocks for uploading or downloading the mirror file, which reduces the data transmission volume and reduces the bandwidth occupancy. In addition, the network status parameters are monitored in real time during data transmission, and the bandwidth demand is predicted by a hybrid timing prediction method based on the network status parameters. The allocation action is optimized through the decision tree, and the transmission window size and data packet sending rate are dynamically adjusted to improve the transmission rate. The transmission status of each data block is recorded when transmitting data, and heartbeat packets are sent regularly to detect the connection status. After the disconnection is detected, reconnection is initiated, and the transmission is continued from the interruption point after the reconnection is successful. In addition, the integrity of the data is verified after the data block transmission is completed, which improves the fault tolerance. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0022] Figure 1 This is an application environment diagram of the image file transmission method in one embodiment of the present application;

[0023] Figure 2 This is a flowchart of a method for transmitting an image file in one embodiment of the present application;

[0024] Figure 3 This is a logic diagram of a method for transmitting an image file in one embodiment of the present application;

[0025] Figure 4 A logic diagram of the steps of obtaining a historical version file of the image file and generating difference data blocks between the image file and the historical version file through a difference comparison algorithm in one embodiment of the present application;

[0026] Figure 5 This is a logic diagram of the adaptive adjustment process in one embodiment of the present application;

[0027] Figure 6 This is a flowchart for implementing image file uploading in one embodiment of the present application;

[0028] Figure 7 This is a flow chart of implementing image file transmission and downloading in one embodiment of the present application;

[0029] Figure 8 This is a structural block diagram of a mirror file transmission device in one embodiment of the present application;

[0030] Figure 9This is a diagram of the internal structure of a computer device in one embodiment of the present application. DETAILED DESCRIPTION

[0031] The following will be combined with the accompanying drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0032] It should be noted that, in the description of this application, the terms "comprises," "includes," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. The terms "first," "second," etc., in this application are used to distinguish similar objects, and are not used to describe a particular order or sequence.

[0033] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.

[0034] The image file transmission method provided in this application can be applied to Figure 1 In the application environment shown, the client 102 and the server 104 communicate via a network. The client 102 is provided with a UI interface, and interacts with the user to select an image file for uploading or downloading. The server 104 controls the image file transmission according to the instructions for uploading or downloading the image file. The client 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablet computers, and portable wearable devices, and the server 104 can be implemented as an independent server or a server cluster consisting of multiple servers.

[0035] like Figure 2 、 Figure 3 As shown, an embodiment of the present application provides a method for transmitting an image file, comprising the following steps:

[0036] Step S1, in response to receiving an uploaded image file, determining whether the image file has been uploaded or downloaded;

[0037] Step S2: in response to the image file being uploaded or downloaded, obtaining a historical version file of the image file, generating a difference data block between the image file and the historical version file through a difference comparison algorithm, and uploading or downloading the difference data block;

[0038] Step S3: in response to the image file not being uploaded or downloaded, uploading or downloading the image file;

[0039] Step S4, when uploading or downloading the difference data block or the image file, monitoring network status parameters in real time, predicting bandwidth requirements using a hybrid time series prediction method based on the network status parameters, and optimizing allocation actions through a decision tree to dynamically adjust the transmission window size and data packet sending rate;

[0040] Step S5, during the process of uploading or downloading the difference data block or the image file, recording the transmission status of each data block, regularly sending heartbeat packets to detect the connection status, and initiating reconnection after detecting a disconnection, and continuing the transmission from the interruption point after successful reconnection;

[0041] Step S6: After the transmission of the difference data block or the data block of the mirror file is completed, verify the integrity of the data.

[0042] The present application preferably uses a difference comparison algorithm to obtain difference data blocks for uploading or downloading of mirror files, which reduces the amount of data transmission and reduces bandwidth occupancy. In addition, the network status parameters are monitored in real time during data transmission, and a hybrid timing prediction method is used to predict bandwidth requirements based on the network status parameters. The decision tree is used to optimize the allocation action, dynamically adjust the transmission window size and the data packet sending rate, and improve the transmission rate. When transmitting data, the transmission status of each data block is recorded, and heartbeat packets are sent regularly to detect the connection status. After detecting a disconnection, reconnection is initiated, and transmission is continued from the interruption point after successful reconnection. After the data block transmission is completed, the integrity of the data is verified, thereby improving fault tolerance.

[0043] like Figure 3 As shown, in this embodiment, when determining whether the image file has been uploaded or downloaded, the format and size information of the image file are checked, and a file unique identifier of the image file is generated. The file unique identifier of the image file is compared with the file unique identifier in the historical version file to determine whether the image file has been uploaded or downloaded. The file unique identifier can also locate the file location.

[0044] When continuing the transmission from the interruption point, the file is located according to the unique file identifier of the mirror file, and the data block to be continued is obtained according to the transmission status and the address of the data block of the mirror file to achieve automatic connection.

[0045] The server maintains a version library for image files. When a client uploads a new image, it uses a diff algorithm (such as an Rsync variant) to generate diff data blocks with the previous version and transmit only the differences. During downloads, if the client already has an older version of the image locally, the server returns only the diff blocks, which the client then reconstructs locally by merging them, reducing transmission volume. Before uploading and downloading, the system compresses the image data to reduce data transfer volume and bandwidth usage. Data is encrypted using a highly efficient encryption algorithm to ensure data security. Intelligent data feature recognition, dynamic compression, and diff transmission minimize data transfer volume while balancing computational overhead and transmission speed. This approach parses file formats within images (such as ELF executables and YAML configuration files) and transmits only modified fields or function blocks. Metadata-driven comparison utilizes image layer hashes to quickly locate modified layers and skip unmodified layers. Since cloud platforms are currently designed with both public and private image repositories, sharing common data blocks (such as common dependencies and base image layers) across users and images is essential. Before uploading, the client first checks whether there are identical blocks. Even if the data blocks are not completely consistent (such as version differences), it is necessary to identify similar blocks and reuse some data.

[0046] like Figure 4 As shown, in this embodiment, obtaining the historical version file of the image file and generating the difference data block between the image file and the historical version file by using a difference comparison algorithm includes:

[0047] constructing an incremental differential coding architecture using a three-dimensional Hilbert curve mapping, wherein the incremental differential coding architecture is used to distribute a data block into a plurality of spatial units through incremental differential coding;

[0048] Inputting the image file and its historical version files into the incremental differential coding architecture, compressing and simplifying the three-dimensional data structures in the image file and its historical version files into a linear sequence through three-dimensional Hilbert curve mapping, and forming a plurality of spatial unit comparison data blocks;

[0049] Performing entropy calculation on the comparison data block in each of the spatial units to obtain an entropy calculation result;

[0050] A differential coding matrix is ​​generated according to the entropy value calculation result, and the differential coding matrix is ​​used as a difference data block between the mirror file and the historical version file.

[0051] In this embodiment, the incremental differential coding architecture is constructed by using three-dimensional Hilbert curve mapping, and the incremental differential coding architecture is used to distribute data blocks into multiple spatial units through incremental differential coding, and further includes:

[0052] The objective function formula of the incremental differential coding architecture is set as where αΔE IDC is the coding gain, ΔE IDC is the gain value during the encoding process, is the bandwidth error, is the bandwidth error, B real is the actual bandwidth value, To predict the bandwidth value, is the square error between the actual bandwidth value and the predicted bandwidth value, α and β are weight coefficients, ∥∥2 represents the Euclidean norm, and θ is the parameter that minimizes the weighted sum of coding gain and bandwidth error. is the sum of all time steps s from 1 to T;

[0053] By adjusting the parameter θ, with the goal of minimizing the weighted sum of coding gain and bandwidth error, the optimal parameter θ is solved by finding a balance point between coding gain and bandwidth error, and the parameter θ that minimizes the weighted sum of coding gain and bandwidth error is found.

[0054] The main goal of this objective function formula is to find a balance point that outputs the simplest error encoding, that is, to achieve the goal of transmitting only the image of the smallest unit difference. The goal is to minimize the objective function, that is, to find the parameter θ that minimizes the weighted sum of coding gain and bandwidth error. By adjusting θ, a balance can be found between coding gain and bandwidth error, achieving the best combined effect. A dynamic feature-aware mechanism is employed, utilizing a dual-channel encoding architecture for hierarchical feature extraction. The base channel uses a fixed ResNet34 (a 34-layer deep convolutional neural network architecture of a residual network, designed to directly add input data blocks to the convolution output) to extract common features (with frozen underlying parameters). A frozen parameter + fine-tuning mode is used, with a learning rate set to 1 / 30 of that of the incremental module. The incremental channel uses a trainable lightweight CNN (a simplified training model designed to find the optimal balance in the training formula above, with the goal of reducing model complexity while maintaining performance, specifically for a specific scenario) to capture differential features (with only 18% of the parameters of the base model). Dynamic gradient clipping is used, with the threshold linearly decaying from 0.1 to 0.01 over training rounds. A feature memory library is built to store historical coding patterns, and millisecond-level similar feature retrieval is achieved through FAISS indexing (an application of efficient similarity retrieval, designed for fast search of large-scale vector data), reducing the amount of repeated coding calculations.

[0055] like Figure 5As shown, in this embodiment, when uploading or downloading the difference data block or the image file, real-time monitoring of network status parameters, predicting bandwidth requirements using a hybrid time series prediction method based on the network status parameters, and optimizing allocation actions through a decision tree to dynamically adjust the transmission window size and data packet sending rate include:

[0056] Real-time monitoring of network status parameters when the network uploads or downloads the difference data block or the image file, wherein the network status parameters include network round-trip time (RTT), bandwidth utilization, packet loss rate, and queue length;

[0057] Predicting an optimal transmission parameter combination based on historical network status using reinforcement learning, wherein the optimal transmission parameter combination includes packet size and number of concurrent threads;

[0058] The bandwidth utilization, packet loss rate and queue length form a three-dimensional state space;

[0059] Dynamically matching service requirements with resource status based on the three-dimensional state space, with the goal of minimizing the deviation between actual bandwidth and target bandwidth and minimizing comprehensive latency, jitter, and throughput indicators;

[0060] Setting a hybrid time series prediction method including linear time series features and nonlinear residuals, and outputting predicted bandwidth requirements through the hybrid time series prediction method;

[0061] A broadband allocation plan is formed by optimizing allocation actions through a decision tree according to the predicted bandwidth demand, and the size of the transmitted data packet and the data packet sending rate are adjusted according to the broadband allocation plan.

[0062] Based on an improved model of the TCP-BBR algorithm, it monitors network round-trip time (RTT) and packet loss rate in real time, dynamically adjusting the transmission window size and packet sending rate. A Q-Learning reinforcement learning model is introduced to predict the optimal transmission parameter combination (such as packet size and number of concurrent threads) based on historical network status. The system monitors network bandwidth usage in real time and dynamically adjusts upload and download rates to ensure high transmission rates even with low bandwidth usage. An adaptive algorithm automatically adjusts packet size and transmission interval based on network conditions to avoid network congestion. Traffic is dispersed across multiple paths to avoid congestion on a single path. Coding technology allows for recovery even after partial packet loss, reducing the need for retransmissions. Global congestion awareness based on SDN allows the SDN controller to collect network-wide status and dynamically allocate bandwidth for image upload paths. This globally avoids local data congestion, making it particularly suitable for uploads within cloud platforms. Bandwidth reservation is implemented using the cloud platform's Neutron module, combined with dynamic multi-path transmission adjustments. Coding strategies are first validated within the local area network (LAN) and then expanded to the wide area network (WAN), leveraging the cloud platform for implementation.

[0063] In this embodiment, dynamically matching service requirements with resource status based on the three-dimensional state space with the goal of minimizing the deviation between the actual bandwidth and the target bandwidth and minimizing the comprehensive delay, jitter, and throughput indicators includes:

[0064] Set the performance objective function to min(α'· / / B real -B / / 2+β'·QoE loss ), where B real is the actual bandwidth value, B is the target bandwidth value, ∥∥2 represents the Euclidean norm, α' and β' are weight coefficients, QoE loss A comprehensive latency, jitter, and throughput metric used to measure system or model performance;

[0065] The hybrid time series prediction method is set to include linear time series features and nonlinear residuals, and outputting the predicted bandwidth requirement through the hybrid time series prediction method includes:

[0066] Set the formula for hybrid time series prediction to y t =ARIMA(y t-1 ,…,y t-p )+LSTM(∈ t-1 ,…,∈ t-q ), where ARIMA(y t-1 ,…,y t-p ) is to use the ARIMA model to predict time series data, (y t-1 ,…,y t-p ) is the historical data predicted within the set time period, t-1 to tp are the serial numbers of the predicted historical data, LSTM(∈ t-1 ,…,∈ t-q ) is the nonlinear residual component of the prediction residual of the ARIMA model using the LSTM model, (∈ t-1 ,…,∈ t-q ) represents the historical residual data of the LSTM model prediction residual within the set time period, t-1 to tq are the historical residual data serial numbers, and the final prediction value y t It is the sum of the ARIMA model prediction value and the LSTM model residual prediction value;

[0067] If we introduce a learnable parameter λ to balance the prediction results of the LSTM model and the ARIMA model, then: t =λ·y ARIMA +(1-λ)·ε LSTM ; The learnable parameter λ is dynamically adjusted by gradient descent, y ARIMA is ARIMA(y t-1 ,…,y t-p ), ε LSTM For LSTM(∈t-1 ,…,∈ t-q ).

[0068] like Figure 5 As shown, the dynamic adjustment mechanism primarily uses a hybrid time series forecasting (LSTM+ARIMA) to predict bandwidth demand and optimizes allocation actions through a decision tree. This mechanism introduces real-time network status parameters: bandwidth utilization B, packet loss rate L, and queue length Q, forming a three-dimensional state space S. This dynamically matches service demand with resource status, supports hybrid model optimization for cross-domain resource scheduling (GPU computing power and bandwidth linkage), reduces computational overhead through operator merging, and improves the real-time performance of the bandwidth prediction model. It can also be combined with the deployment of the TensorFlow.js framework for lightweight browser-side inference, supporting rapid dynamic policy adjustments.

[0069] Setting the performance objective function is primarily about calculating how to minimize the loss of quality indicators while keeping the bandwidth close to the target value, thereby optimizing system performance. In simple terms, it involves figuring out how to use the optimal bandwidth for the highest efficiency, achieving dynamic bandwidth adaptation and congestion control without loss.

[0070] The introduction of a learnable parameter λ to balance the prediction results of the LSTM and ARIMA models is primarily intended to adjust the proportions of linear and nonlinear model prediction results in the hybrid time series forecasting formula. By adjusting the parameter balance, the optimal solution is calculated. Ultimately, the optimal bandwidth allocation method is output after the balance is achieved while minimizing error.

[0071] In this embodiment, the method further includes:

[0072] During the process of uploading or downloading the difference data block or the image file, a persistent session management reinforcement learning model is constructed, and the persistent session management reinforcement learning model is set to include a memory buffer pool, an episodic memory is set in the memory buffer pool to store complete interaction trajectories and be used for short-term strategy optimization, and a semantic memory is set in the memory buffer pool to encode long-term session patterns through a graph neural network (GNN);

[0073] Adopt double branch structure, set Represents a conversational model combining multi-layer perceptron and graph neural network for processing conversation-related tasks, where π θ (a|s) is the policy π under a given session state s θ' The probability distribution of selecting action a, θ' is the policy network parameter, a is the action, s is the session state, MLP task (s) is the current session state s processed by the multi-layer perceptron MLP, GNN semantic (Mt ) is the processing of historical session features M by graph neural network GNN t ;

[0074] Processing the current state session features through the multi-layer perceptron to obtain a current feature representation, processing the historical session features through the graph neural network to obtain a historical feature representation, and concatenating the current feature representation with the historical feature representation to form a final strategy;

[0075] The conversation model is used to update the policy network parameters θ in real time through online learning and offline reinforcement learning, and the prioritized experience replay (PER) in the memory buffer pool is used to perform session persistence. The equation for setting the session persistence is: The attention mechanism is used to capture the contextual information in the session and the output of the attention mechanism is combined with the historical session features M t After splicing, it is input into the GNN model training to achieve modeling and prediction of the session; t+1 Represents the historical conversation features of the next moment, GNN is a graph neural network, Attention is an attention mechanism, Attention(s t ,s t-1 ) is the attention mechanism for the current session state s t and the session state s at the previous moment t-1 The attention mechanism is used to capture the relationship between the two.

[0076] The client and server establish a persistent WebSocket connection, and the transmission status (such as the index of the difference block sent and the checksum) is synchronized to the server cache in real time. After the client page is refreshed or the connection is disconnected and reconnected, the context is quickly restored through the session ID, and the unfinished data block is automatically resumed. During the upload and download process, the system records the transmission status of each data block and can resume transmission from the interruption point after a disconnection, ensuring data integrity and consistency. The integrity of each data block is verified through a verification mechanism to ensure that no data is lost or damaged during the transmission process. Based on the cloud platform monitoring design, the cloud platform currently has two methods for image upload: local and file storage space, and both methods need to be adapted. The innovation of the combined monitoring is to use active probes + passive collection to monitor network quality, dynamically adjust the session retention time, monitor CPU / memory / IO load, predict coding difference calculation, and dynamically allocate computing resources for persistent sessions. This method can achieve cross-node cache synchronization and ensure cache consistency between multiple nodes.

[0077] The memory buffer pool is also connected to the Agent. The Agent can be understood as a functional module whose purpose is to reinforce the intelligent agent in learning. It is responsible for executing actions and interacting with the cloud platform. Currently, cloud platform components also interact using various agents. The Agent includes an actor_network and a critic_network. The actor_network is used to generate a policy network for actions, while the critic_network is used to evaluate the performance of the network for evaluating sample values. Combined with the train() method, it is used to train the agent, learning and optimizing using samples provided by the memory buffer. This model aims to store contextual and semantic information, provide samples through update methods, and then train and evaluate networks and policies based on these samples. It is primarily used to generate information such as graph representations and features.

[0078] In this embodiment, the method further includes:

[0079] In response to uploading the difference data block or the mirror file, compressing and encrypting the uploaded data block, and starting multi-threading to transmit multiple data blocks simultaneously;

[0080] In response to downloading the image file, retrieving a difference block list and metadata, dynamically adjusting the download rate and number of threads according to the difference block list and metadata, and starting multiple threads to download multiple data blocks simultaneously;

[0081] The verifying the integrity of the data in response to the completion of the transmission of the difference data block or the data block of the mirror file includes:

[0082] In response to the completion of uploading or downloading the difference data block, pulling the difference data block, merging it with the historical version file of the image file to generate a new image file, and performing a distributed cyclic redundancy check on the integrity of the new image file;

[0083] In response to the completion of uploading or downloading the image file, it is determined whether a difference block list exists; if not, the downloaded data blocks are merged and their integrity is checked through a distributed cyclic redundancy check; if so, the downloaded data blocks are merged with a historical version file of the image file to generate a new image file, and the integrity of the new image file is checked through a distributed cyclic redundancy check.

[0084] A dynamic CRC32 checksum is generated for each data block, which is immediately checked upon receipt by the client. In the event of a failure, only the block itself is retransmitted, not the entire file. The server uses distributed storage to back up the transmission status, ensuring that the session can be restored from other nodes in the event of a single point of failure. The system uses multi-threading technology to simultaneously transmit multiple data blocks, increasing the transmission rate. Transmission threads are managed through a thread pool, avoiding the overhead of thread creation and destruction, thereby improving system efficiency. The system periodically sends heartbeat packets to detect the connection status. Once a disconnection is detected, an automatic reconnection mechanism is immediately activated to ensure the continuity of the transmission process. Upon successful reconnection, the system automatically resumes transmission from the point of interruption without user intervention.

[0085] Rolling hashing is used to quickly identify identical data blocks, reducing computational overhead. Intelligent congestion control is implemented at the transport layer to avoid network jitter caused by aggressive packet transmission while maximizing bandwidth utilization. A lightweight front-end state cache preserves transmission progress even when the page is closed, enabling seamless reconnection. Combined with erasure coding, this allows clients to recover lost blocks from multiple nodes in parallel, improving fault tolerance.

[0086] In the above-mentioned image file transmission method, the present application preferably uses a difference comparison algorithm to obtain difference data blocks for uploading or downloading the image file, which reduces the amount of data transmission and reduces bandwidth occupancy. In addition, the network status parameters are monitored in real time during data transmission, and the bandwidth demand is predicted by a hybrid timing prediction method based on the network status parameters. The decision tree is used to optimize the allocation action, dynamically adjust the transmission window size and the data packet sending rate, and improve the transmission rate. When transmitting data, the transmission status of each data block is recorded, and heartbeat packets are sent regularly to detect the connection status. After detecting a disconnection, reconnection is initiated, and transmission is continued from the interruption point after successful reconnection. After the data block transmission is completed, the integrity of the data is verified, thereby improving fault tolerance.

[0087] like Figure 6 、 Figure 7 As shown, the specific implementation methods of the image file upload process and download process are listed.

[0088] 1. Upload process:

[0089] (1) After the user selects the image file, the system starts the intelligent bandwidth management model and dynamically adjusts the upload rate.

[0090] (2) The system compresses and encrypts the image file, then starts the multi-threaded transmission module to upload multiple data blocks simultaneously. After the user selects the image file, the client calls the CDC algorithm to generate dynamic difference blocks, compares them with the server-side version library, and calls the invented incremental difference data module to upload only the difference block set.

[0091] (3) During the upload process, the system records the transmission status of each data block and regularly sends heartbeat packets to detect the connection status. The DBA module adjusts the number of concurrent threads and packet size according to the current network quality, giving priority to transmitting key blocks (such as file headers).

[0092] (4) If a disconnection is detected, the system starts an automatic reconnection mechanism (such as page refresh), enables the persistent session management reinforcement learning model, and resumes uploading from the interruption point after successful reconnection.

[0093] like Figure 6 Figure 2 shows the image file upload process. After the user selects an image file, the system activates the intelligent bandwidth management module to dynamically adjust the upload rate. The system compresses and encrypts the image file, then activates the multi-threaded transfer module to simultaneously upload multiple data blocks. During the upload process, the system records the transfer status of each data block and periodically sends heartbeat packets to check the connection status. If a disconnection is detected, the system automatically reconnects and resumes the upload from the interruption point upon successful reconnection.

[0094] 2. Download process:

[0095] (1) After the user chooses to download the image file, the system starts the intelligent bandwidth management module, dynamically adjusts the download rate, and the server returns a list of difference blocks and metadata.

[0096] (2) The system starts a multi-threaded transmission module, downloads multiple data blocks simultaneously, pulls the difference blocks, merges them locally to generate a complete image, and verifies the integrity through a distributed CRC.

[0097] (3) During the download process, the system records the transmission status of each data block and periodically sends heartbeat packets to detect the connection status.

[0098] (4) If a disconnection is detected, the system starts the automatic reconnection mechanism and continues downloading from the interruption point after successful reconnection. If a block fails to be verified, the intelligent retry mechanism is triggered and the block is pulled again from the optimal node.

[0099] like Figure 7 The figure below shows the image file download process. After the user selects to download an image file, the system activates the intelligent bandwidth management module to dynamically adjust the download rate. The system also activates the multi-threaded transmission module to simultaneously download multiple data blocks. During the download process, the system records the transmission status of each data block and periodically sends heartbeat packets to check the connection status. If a disconnection is detected, the system automatically reconnects and resumes the download from the interruption point upon successful reconnection.

[0100] This application uses intelligent bandwidth management models, incremental differential encoding models, breakpoint resume mechanisms, data compression and encryption, multi-threaded persistent transmission, heartbeat detection and automatic reconnection and other algorithmic means to achieve low bandwidth usage, high transmission rate and high fault tolerance for image upload and download without using fragmented upload. This method effectively solves the problems of slow image upload and download, and disconnection caused by refreshing the page, and improves user experience and system reliability. Reduce bandwidth usage by more than 60%: Only transmit differential content through incremental encoding, reducing redundant data transmission; Increase transmission rate by 30%-50%: Dynamic bandwidth adaptation maximizes the use of available network resources; Significantly enhance fault tolerance: Distributed verification and intelligent retry persistence mechanism ensure a transmission success rate of more than 99%; Optimize user experience: Automatically resume transmission after page refresh or network interruption without user intervention.

[0101] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method.

[0102] In one embodiment, Figure 8 As shown, a mirror file transmission device 10 is provided, including: a file inspection module 1, an incremental differential encoding transmission module 2, a mirror file transmission module 3, a dynamic bandwidth adaptation and congestion control module 4, a heartbeat detection and automatic reconnection module 5 and a distributed fault tolerance verification module 6.

[0103] The file checking module 1 is configured to determine whether the image file has been uploaded or downloaded in response to receiving the uploaded image file.

[0104] The incremental differential encoding and transmission module 2 is used to obtain the historical version file of the image file in response to the image file being uploaded or downloaded, generate the difference data block between the image file and the historical version file through the difference comparison algorithm, and upload or download the difference data block.

[0105] The image file transmission module 3 is configured to upload or download the image file in response to the image file not having been uploaded or downloaded.

[0106] The dynamic bandwidth adaptation and congestion control module 4 is used to monitor network status parameters in real time when uploading or downloading the difference data block or the mirror file, predict bandwidth requirements using a hybrid time series prediction method based on the network status parameters, and optimize allocation actions through a decision tree to dynamically adjust the transmission window size and data packet sending rate.

[0107] The heartbeat detection and automatic reconnection module 5 is used to record the transmission status of each data block during the upload or download process of the difference data block or the mirror file, and regularly send heartbeat packets to detect the connection status, and start reconnection after detecting a disconnection, and continue transmission from the interruption point after successful reconnection.

[0108] The distributed fault-tolerant verification module 6 is configured to verify data integrity in response to the completion of the transmission of the difference data block or the data block of the mirror file.

[0109] In this embodiment, obtaining the historical version file of the image file and generating a difference data block between the image file and the historical version file by using a difference comparison algorithm includes:

[0110] constructing an incremental differential coding architecture using a three-dimensional Hilbert curve mapping, wherein the incremental differential coding architecture is used to distribute a data block into a plurality of spatial units through incremental differential coding;

[0111] Inputting the image file and its historical version files into the incremental differential coding architecture, compressing and simplifying the three-dimensional data structures in the image file and its historical version files into a linear sequence through three-dimensional Hilbert curve mapping, and forming a plurality of spatial unit comparison data blocks;

[0112] Performing entropy calculation on the comparison data block in each of the spatial units to obtain an entropy calculation result;

[0113] A differential coding matrix is ​​generated according to the entropy value calculation result, and the differential coding matrix is ​​used as a difference data block between the mirror file and the historical version file.

[0114] In this embodiment, the incremental differential coding architecture is constructed by using three-dimensional Hilbert curve mapping, and the incremental differential coding architecture is used to distribute data blocks into multiple spatial units through incremental differential coding, and further includes:

[0115] The objective function formula of the incremental differential coding architecture is set as where αΔE IDC is the coding gain, ΔE IDC is the gain value during the encoding process, is the bandwidth error, is the bandwidth error, B real is the actual bandwidth value, To predict the bandwidth value, is the square error between the actual bandwidth value and the predicted bandwidth value, α and β are weight coefficients, ∥∥2 represents the Euclidean norm, and θ is the parameter that minimizes the weighted sum of coding gain and bandwidth error. is the sum of all time steps s from 1 to T;

[0116] By adjusting the parameter θ, with the goal of minimizing the weighted sum of coding gain and bandwidth error, the optimal parameter θ is solved by finding a balance point between coding gain and bandwidth error, and the parameter θ that minimizes the weighted sum of coding gain and bandwidth error is found.

[0117] In this embodiment, when uploading or downloading the difference data block or the image file, real-time monitoring of network status parameters, predicting bandwidth requirements using a hybrid time series prediction method based on the network status parameters, and dynamically adjusting the transmission window size and data packet sending rate through decision tree optimization allocation actions include:

[0118] Real-time monitoring of network status parameters when the network uploads or downloads the difference data block or the mirror file, wherein the network status parameters include network round-trip time, bandwidth utilization, packet loss rate, and queue length;

[0119] Predicting an optimal transmission parameter combination based on historical network status using reinforcement learning, wherein the optimal transmission parameter combination includes packet size and number of concurrent threads;

[0120] The bandwidth utilization, packet loss rate and queue length form a three-dimensional state space;

[0121] Dynamically matching service requirements with resource status based on the three-dimensional state space, with the goal of minimizing the deviation between actual bandwidth and target bandwidth and minimizing comprehensive latency, jitter, and throughput indicators;

[0122] Setting a hybrid time series prediction method including linear time series features and nonlinear residuals, and outputting predicted bandwidth requirements through the hybrid time series prediction method;

[0123] A broadband allocation plan is formed by optimizing allocation actions through a decision tree according to the predicted bandwidth demand, and the size of the transmitted data packet and the data packet sending rate are adjusted according to the broadband allocation plan.

[0124] In this embodiment, dynamically matching service requirements with resource status based on the three-dimensional state space with the goal of minimizing the deviation between the actual bandwidth and the target bandwidth and minimizing the comprehensive delay, jitter, and throughput indicators includes:

[0125] Set the performance objective function to min(α'· / / B real -B / / 2+β'·QoE loss ), where B real is the actual bandwidth value, B is the target bandwidth value, ∥∥2 represents the Euclidean norm, α' and β' are weight coefficients, QoE lossA comprehensive latency, jitter, and throughput metric used to measure system or model performance;

[0126] The hybrid time series prediction method is set to include linear time series features and nonlinear residuals, and outputting the predicted bandwidth requirement through the hybrid time series prediction method includes:

[0127] Set the formula for hybrid time series prediction to y t =ARIMA(y t-1 ,…,y t-p )+LSTM(∈ t-1 ,…,∈ t-q ), where ARIMA(y t-1 ,…,y t-p ) is to use the ARIMA model to predict time series data, (y t-1 ,…,y t-p ) is the historical data predicted within the set time period, t-1 to tp are the serial numbers of the predicted historical data, LSTM(∈ t-1 ,…,∈ t-q ) is the nonlinear residual component of the prediction residual of the ARIMA model using the LSTM model, (∈ t-1 ,…,∈ t-q ) represents the historical residual data of the LSTM model prediction residual within the set time period, t-1 to tq are the historical residual data serial numbers, and the final prediction value y t It is the sum of the ARIMA model prediction value and the LSTM model residual prediction value;

[0128] If we introduce a learnable parameter λ to balance the prediction results of the LSTM model and the ARIMA model, then: t =λ·y ARIMA +(1-λ)·ε LSTM ; The learnable parameter λ is dynamically adjusted by gradient descent, y ARIMA is ARIMA(y t-1 ,…,y t-p ), ε LSTM For LSTM(∈ t-1 ,…,∈ t-q ).

[0129] In this embodiment, the image file transmission device further includes:

[0130] During the process of uploading or downloading the difference data block or the image file, a persistent session management reinforcement learning model is constructed, and the persistent session management reinforcement learning model is set to include a memory buffer pool, a contextual memory is set in the memory buffer pool to store complete interaction trajectories and be used for short-term strategy optimization, and a semantic memory is set in the memory buffer pool to encode long-term session patterns through a graph neural network;

[0131] Adopt double branch structure, set Represents a conversational model combining multi-layer perceptron and graph neural network for processing conversation-related tasks, where π θ (a|s) is the policy π under a given session state s θ' The probability distribution of selecting action a, θ' is the policy network parameter, a is the action, s is the session state, MLP task (s) is the current session state s processed by the multi-layer perceptron MLP, GNN semantic (M t ) is the processing of historical session features M by graph neural network GNN t ;

[0132] Processing the current state session features through the multi-layer perceptron to obtain a current feature representation, processing the historical session features through the graph neural network to obtain a historical feature representation, and concatenating the current feature representation with the historical feature representation to form a final strategy;

[0133] The conversation model is used to update the policy network parameters θ in real time through online learning and offline reinforcement learning, and the priority experience replay in the memory buffer pool is used to perform session persistence; wherein the equation for setting the session persistence is: The attention mechanism is used to capture the contextual information in the session and the output of the attention mechanism is combined with the historical session features M t After splicing, it is input into the GNN model training to achieve modeling and prediction of the session; t+1 Represents the historical conversation features of the next moment, GNN is a graph neural network, Attention is an attention mechanism, Attention(s t ,s t-1 ) is the attention mechanism for the current session state s t and the session state s at the previous moment t-1 The attention mechanism is used to capture the relationship between the two.

[0134] In this embodiment, the image file transmission device further includes:

[0135] In response to uploading the difference data block or the mirror file, compressing and encrypting the uploaded data block, and starting multi-threading to transmit multiple data blocks simultaneously;

[0136] In response to downloading the image file, retrieving a difference block list and metadata, dynamically adjusting the download rate and number of threads according to the difference block list and metadata, and starting multiple threads to download multiple data blocks simultaneously;

[0137] The verifying the integrity of the data in response to the completion of the transmission of the difference data block or the data block of the mirror file includes:

[0138] In response to the completion of uploading or downloading the difference data block, pulling the difference data block, merging it with the historical version file of the image file to generate a new image file, and performing a distributed cyclic redundancy check on the integrity of the new image file;

[0139] In response to the completion of uploading or downloading the image file, it is determined whether a difference block list exists; if not, the downloaded data blocks are merged and their integrity is checked through a distributed cyclic redundancy check; if so, the downloaded data blocks are merged with a historical version file of the image file to generate a new image file, and the integrity of the new image file is checked through a distributed cyclic redundancy check.

[0140] In the above-mentioned image file transmission device, the present application preferably uses a difference comparison algorithm to obtain difference data blocks for uploading or downloading the image file, which reduces the amount of data transmission and reduces bandwidth occupancy. In addition, the network status parameters are monitored in real time during data transmission, and the bandwidth demand is predicted by a hybrid timing prediction method based on the network status parameters. The decision tree is used to optimize the allocation action, dynamically adjust the transmission window size and the data packet sending rate, and improve the transmission rate. When transmitting data, the transmission status of each data block is recorded, and heartbeat packets are sent regularly to detect the connection status. After detecting a disconnection, reconnection is initiated, and transmission is continued from the interruption point after successful reconnection. After the data block transmission is completed, the integrity of the data is verified, thereby improving fault tolerance.

[0141] For the description of the features in the embodiment corresponding to the image file transmission device, please refer to the relevant description of the embodiment corresponding to the image file transmission method, and will not be repeated here.

[0142] An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any of the above-mentioned embodiments of the image file transmission method.

[0143] In one embodiment, the electronic device may be a server, and its internal structure diagram may be as follows: Figure 9As shown. The electronic device includes a processor, a memory, a network interface and a database connected via a system bus. The processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The database of the electronic device is used to store image file transmission data. The network interface of the electronic device is used to communicate with an external client via a network connection. When the computer program is executed by the processor, a method for transmitting an image file is implemented.

[0144] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored. The computer program is configured to execute the steps of any of the above-mentioned image file transmission method embodiments when running.

[0145] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.

[0146] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps in any of the above-mentioned image file transmission method embodiments are implemented.

[0147] An embodiment of the present application further provides another computer program product, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of any of the above-mentioned image file transmission method embodiments are implemented.

[0148] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0149] The above is a detailed introduction to the image file transmission method, device, electronic device and storage medium provided by the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only intended to help understand the method and core ideas of the present application. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of the present application.

Claims

1. A method for transmitting an image file, characterized in that: include: In response to receiving the uploaded image file, determining whether the image file has been uploaded or downloaded; In response to the image file being uploaded or downloaded, obtaining a historical version file of the image file, generating a difference data block between the image file and the historical version file through a difference comparison algorithm, and uploading or downloading the difference data block; In response to the image file not having been uploaded or downloaded, uploading or downloading the image file; When uploading or downloading the difference data block or the image file, the network status parameters are monitored in real time, bandwidth requirements are predicted using a hybrid time series prediction method based on the network status parameters, and allocation actions are optimized through a decision tree to dynamically adjust the transmission window size and data packet sending rate; During the process of uploading or downloading the difference data block or the mirror file, the transmission status of each data block is recorded, heartbeat packets are sent regularly to detect the connection status, and reconnection is initiated after a disconnection is detected, and transmission is continued from the interruption point after successful reconnection; In response to the completion of the transmission of the difference data block or the data block of the mirror file, the integrity of the data is verified.

2. The image file transmission method according to claim 1, wherein: The obtaining of the historical version file of the image file and generating a difference data block between the image file and the historical version file by using a difference comparison algorithm comprises: constructing an incremental differential coding architecture using a three-dimensional Hilbert curve mapping, wherein the incremental differential coding architecture is used to distribute a data block into a plurality of spatial units through incremental differential coding; Inputting the image file and its historical version files into the incremental differential coding architecture, compressing and simplifying the three-dimensional data structures in the image file and its historical version files into a linear sequence through three-dimensional Hilbert curve mapping, and forming a plurality of spatial unit comparison data blocks; Performing entropy calculation on the comparison data block in each of the spatial units to obtain an entropy calculation result; A differential coding matrix is ​​generated according to the entropy value calculation result, and the differential coding matrix is ​​used as a difference data block between the mirror file and the historical version file.

3. The image file transmission method according to claim 2, wherein: The incremental differential coding architecture constructed by using three-dimensional Hilbert curve mapping, wherein the incremental differential coding architecture is used to distribute data blocks into multiple spatial units through incremental differential coding, further includes: The objective function formula of the incremental differential coding architecture is set as where αΔE IDC is the coding gain, ΔE IDC is the gain value during the encoding process, is the bandwidth error, is the bandwidth error, B real is the actual bandwidth value, To predict the bandwidth value, is the square error between the actual bandwidth value and the predicted bandwidth value, α and β are weight coefficients, ∥∥2 represents the Euclidean norm, and θ is the parameter that minimizes the weighted sum of coding gain and bandwidth error. is the sum of all time steps s from 1 to T; By adjusting the parameter θ, with the goal of minimizing the weighted sum of coding gain and bandwidth error, the optimal parameter θ is solved by finding a balance point between coding gain and bandwidth error, and the parameter θ that minimizes the weighted sum of coding gain and bandwidth error is found.

4. The image file transmission method according to claim 1, wherein: When uploading or downloading the difference data block or the image file, real-time monitoring of network status parameters, predicting bandwidth requirements using a hybrid time series prediction method based on the network status parameters, and dynamically adjusting the transmission window size and data packet sending rate through decision tree optimization allocation actions include: Real-time monitoring of network status parameters when the network uploads or downloads the difference data block or the mirror file, wherein the network status parameters include network round-trip time, bandwidth utilization, packet loss rate, and queue length; Predicting an optimal transmission parameter combination based on historical network status using reinforcement learning, wherein the optimal transmission parameter combination includes packet size and number of concurrent threads; The bandwidth utilization, packet loss rate and queue length form a three-dimensional state space; Dynamically matching service requirements with resource status based on the three-dimensional state space, with the goal of minimizing the deviation between actual bandwidth and target bandwidth and minimizing comprehensive latency, jitter, and throughput indicators; Setting a hybrid time series prediction method including linear time series features and nonlinear residuals, and outputting predicted bandwidth requirements through the hybrid time series prediction method; A broadband allocation plan is formed by optimizing allocation actions through a decision tree according to the predicted bandwidth demand, and the size of the transmitted data packet and the data packet sending rate are adjusted according to the broadband allocation plan.

5. The image file transmission method according to claim 4, characterized in that: Dynamically matching service requirements with resource status based on the three-dimensional state space with the goal of minimizing the deviation between the actual bandwidth and the target bandwidth and minimizing the comprehensive delay, jitter, and throughput indicators includes: Set the performance objective function to min(α'· / / B real -B / / 2+β'·QoE loss ), where B real is the actual bandwidth value, B is the target bandwidth value, ∥∥2 represents the Euclidean norm, α' and β' are weight coefficients, QoE loss A comprehensive latency, jitter, and throughput metric used to measure system or model performance; The hybrid time series prediction method is set to include linear time series features and nonlinear residuals, and outputting the predicted bandwidth requirement through the hybrid time series prediction method includes: Set the formula for hybrid time series prediction to y t =ARIMA(y t-1 ,…,y t-p )+LSTM(∈ t-1 ,…,∈ t-q ), where ARIMA(y t-1 ,…,y t-q ) is to use the ARIMA model to predict time series data, is the historical data predicted within the set time period, t-1 to tp are the serial numbers of the predicted historical data, LSTM(∈ t-1 ,…,∈ t-q ) is the nonlinear residual component of the prediction residual of the ARIMA model using the LSTM model, (∈ t-1 ,…,∈ t-q ) represents the historical residual data of the LSTM model prediction residual within the set time period, t-1 to tq are the historical residual data serial numbers, and the final prediction value y t It is the sum of the ARIMA model prediction value and the LSTM model residual prediction value; If we introduce a learnable parameter λ to balance the prediction results of the LSTM model and the ARIMA model, then: t =λ·y ARIMA +(1-λ)·ε LSTM ; The learnable parameter λ is dynamically adjusted by gradient descent, y ARIMA is ARIMA(y t-1 ,…,y t-p ), ε LSTM For LSTM(∈ t-1 ,…,∈ t-q ).

6. The image file transmission method according to claim 1, wherein: The method further comprises: During the process of uploading or downloading the difference data block or the image file, a persistent session management reinforcement learning model is constructed, and the persistent session management reinforcement learning model is set to include a memory buffer pool, a contextual memory is set in the memory buffer pool to store complete interaction trajectories and be used for short-term strategy optimization, and a semantic memory is set in the memory buffer pool to encode long-term session patterns through a graph neural network; Adopt double branch structure, set Represents a conversational model combining multi-layer perceptron and graph neural network for processing conversation-related tasks, where π θ (a|s) is the policy π under a given session state s θ' The probability distribution of selecting action a, θ' is the policy network parameter, a is the action, s is the session state, MLP task (s) is the current session state s processed by the multi-layer perceptron MLP, GNN semantic (M t ) is the processing of historical session features M by graph neural network GNN t ; Processing the current state session features through the multi-layer perceptron to obtain a current feature representation, processing the historical session features through the graph neural network to obtain a historical feature representation, and concatenating the current feature representation with the historical feature representation to form a final strategy; The conversation model is used to update the policy network parameters θ in real time through online learning and offline reinforcement learning, and the priority experience replay in the memory buffer pool is used to perform session persistence; wherein the equation for setting the session persistence is: The attention mechanism is used to capture the contextual information in the session and the output of the attention mechanism is combined with the historical session features M t After splicing, it is input into the GNN model training to achieve modeling and prediction of the session; t+1 Represents the historical conversation features of the next moment, GNN is a graph neural network, Attention is an attention mechanism, Attention(s t ,s t-1 ) is the attention mechanism for the current session state s t and the session state s at the previous moment t-1 The attention mechanism is used to capture the relationship between the two.

7. The image file transmission method according to claim 1, wherein: The method further comprises: In response to uploading the difference data block or the mirror file, compressing and encrypting the uploaded data block, and starting multi-threading to transmit multiple data blocks simultaneously; In response to downloading the image file, retrieving a difference block list and metadata, dynamically adjusting the download rate and number of threads according to the difference block list and metadata, and starting multiple threads to download multiple data blocks simultaneously; The verifying the integrity of the data in response to the completion of the transmission of the difference data block or the data block of the mirror file includes: In response to the completion of uploading or downloading the difference data block, pulling the difference data block, merging it with the historical version file of the image file to generate a new image file, and performing a distributed cyclic redundancy check on the integrity of the new image file; In response to the completion of uploading or downloading the image file, it is determined whether a difference block list exists; if not, the downloaded data blocks are merged and their integrity is checked through a distributed cyclic redundancy check; if so, the downloaded data blocks are merged with a historical version file of the image file to generate a new image file, and the integrity of the new image file is checked through a distributed cyclic redundancy check.

8. A mirror file transmission device, characterized in that: include: a file checking module, configured to, in response to receiving an uploaded image file, determine whether the image file has been uploaded or downloaded; an incremental differential encoding and transmission module, configured to obtain a historical version file of the image file in response to the image file being uploaded or downloaded, generate a difference data block between the image file and the historical version file using a difference comparison algorithm, and upload or download the difference data block; an image file transmission module, configured to upload or download the image file in response to the image file not having been uploaded or downloaded; a dynamic bandwidth adaptation and congestion control module, configured to monitor network status parameters in real time when uploading or downloading the difference data block or the image file, predict bandwidth requirements using a hybrid time series prediction method based on the network status parameters, and dynamically adjust the transmission window size and data packet sending rate by optimizing allocation actions through a decision tree; A heartbeat detection and automatic reconnection module, configured to record the transmission status of each data block during the upload or download process of the difference data block or the mirror file, periodically send heartbeat packets to detect the connection status, initiate reconnection upon detecting a disconnection, and resume transmission from the interruption point upon successful reconnection; The distributed fault-tolerant verification module is configured to verify the integrity of the data in response to the completion of the transmission of the difference data block or the data block of the mirror file.

9. An electronic device, characterized in that: include: memory for storing computer programs; A processor, configured to implement the steps of the image file transmission method according to any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the steps of the image file transmission method according to any one of claims 1 to 7 are implemented.

Citation Information

Cited By

  • Scientific research data sharing method and system and storage medium

    CN121098632A

  • A scientific research data sharing method, system and storage medium

    CN121098632B