A method and system for large file transfer based on cross-window communication

By employing technologies such as intelligent chunked transmission, zero-copy communication, and multi-level progress monitoring, the efficiency and stability issues of large file transmission in cross-window communication have been resolved, achieving efficient and stable large file transmission and real-time progress feedback, thus improving the user experience.

CN122372548APending Publication Date: 2026-07-10
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Filing Date
2026-03-26
Publication Date
2026-07-10

AI Technical Summary

Technical Problem

Existing technologies cannot efficiently transfer large files in cross-window communication, and suffer from problems such as memory overflow, lack of progress monitoring, weak error handling and inefficient resource management. In particular, they cannot resume interrupted downloads when the network is unstable, resulting in a poor user experience.

Method used

It employs an intelligent block-based transmission mechanism, zero-copy cross-window communication, multi-level progress monitoring, an intelligent recovery mechanism based on the exponential backoff algorithm, a unified management framework for multi-level timeout detection and automatic reconnection, and memory usage optimization strategies to achieve efficient and stable transmission of large files and real-time progress feedback.

Benefits of technology

It significantly improves the efficiency and stability of large file transfers, provides real-time progress monitoring and intelligent error recovery, enhances user experience, and reduces memory usage and transfer time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122372548A_ABST
    Figure CN122372548A_ABST
Patent Text Reader

Abstract

This invention discloses a method and system for large file transfer based on cross-window communication, belonging to the field of cross-window communication technology. The method includes: an intelligent chunked transfer mechanism and zero-copy cross-window communication; a multi-level progress system for real-time monitoring and progress feedback during the transfer process; an intelligent recovery mechanism based on an exponential backoff algorithm; a unified management framework for multi-level timeout detection and automatic reconnection; and memory usage optimization and overflow prevention management strategies. This invention performs excellently in practical business scenarios, providing a complete technical solution for handling large file transfers in web applications.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of cross-window communication technology, and more specifically to a method and system for transferring large files based on cross-window communication. Background Technology

[0002] Currently, with the rapid development of enterprise-level web applications, the demand for online previewing of large files such as electronic receipts and large documents is increasing. Existing technologies face significant challenges in handling such scenarios: In traditional electronic receipt printing systems, when users need to preview PDF receipt files, the system typically either downloads them directly or opens them in a new window. This approach has significant technical limitations: First, large files require a complete download before displaying, incurring long waiting times, especially when the file size exceeds 10MB, where the wait can reach tens of seconds or even minutes, severely impacting the user experience. Second, the traditional `window.open()` method limits communication between the main window and the preview window, hindering precise progress control and error handling.

[0003] More seriously, existing cross-window communication solutions based on postMessage have inherent flaws when handling large files. Due to browser limitations on the size of a single message transmission (typically tens of MB), memory overflow errors are easily triggered when transferring large PDF files. Furthermore, in unstable network conditions, interrupted transmissions can only be restarted, lacking the ability to resume interrupted transmissions, resulting in a double waste of bandwidth and time. In real-world applications, users frequently encounter error messages such as "transmission timeout" and "insufficient memory," yet lack effective automatic recovery mechanisms.

[0004] Analysis of specific defects in existing technologies: Through in-depth analysis of existing technologies, the following specific technical deficiencies were identified: 1) Communication mechanism defects: Traditional cross-window communication uses a simple message passing mode, which cannot meet the needs of large file transfer. When the file size exceeds the browser limit, the system either cannot transfer at all, or uses the primitive method of sending in multiple parts. However, this method lacks a unified management mechanism, which can easily lead to data corruption or loss.

[0005] 2) Lack of progress monitoring: The existing solution cannot provide real-time feedback on the transmission progress. When previewing large files, users cannot know the current transmission status and can only wait passively. This "black box" approach seriously affects the user experience, especially in commercial application scenarios where users need to know the processing progress in order to arrange subsequent work.

[0006] 3) Weak error handling: There is a lack of effective automatic recovery mechanisms for abnormal situations such as network fluctuations and browser crashes. Most existing technologies adopt simple retry strategies, lacking intelligent retry interval control and failure fallback mechanisms, which can easily cause an avalanche effect of repeated requests.

[0007] 4) Inefficient resource management: Excessive memory consumption during large file transfers, lacking effective memory management and release mechanisms. Especially after a transfer failure, the loaded data cannot be effectively reclaimed, leading to memory leaks. Summary of the Invention

[0008] The main objective of this invention is to provide a method and system for large file transfer based on cross-window communication, which solves the problem of how to achieve efficient and stable cross-window transfer and preview of large files in a Web environment, and provides real-time progress monitoring, intelligent error recovery and a good user experience.

[0009] According to one aspect of the present invention, a method for transferring large files based on cross-window communication is provided, comprising: Intelligent chunked transmission mechanism and zero-copy cross-window communication; A multi-level progress system is implemented to achieve real-time monitoring and progress feedback during the transmission process; Intelligent recovery mechanism based on exponential backoff algorithm; A unified management framework for multi-level timeout detection and automatic reconnection; Memory usage optimization and overflow prevention management strategies.

[0010] Furthermore, the intelligent block transmission mechanism and zero-copy cross-window communication include: Core working mechanism: When the system needs to transfer a large file, it performs intelligent block processing on the file. The block size is not fixed, but is based on dynamic evaluation: the system detects the available memory of the current browser, network conditions, and the characteristics of the file itself, and calculates the optimal block size; the block size is controlled within the range of 4MB-8MB. The specific process of chunked transmission is as follows: Before transmission, the system divides the file into multiple chunks using ArrayBuffer based on the file size and preset security threshold. Each chunk is assigned a unique sequence number and transmitted along with the file metadata. The system then sends each chunk sequentially to the target window via postMessage. By leveraging the Transferable Objects interface supported by modern browsers, ownership of the ArrayBuffer is transferred from the sender's context to the receiver by specifying a third parameter in the postMessage method, instead of creating a copy.

[0011] Furthermore, the multi-level progress system for real-time monitoring and progress feedback during the transmission process includes: Monitoring architecture design: The system breaks down the transmission process into four monitoring layers: network layer, transport layer, file layer, and user interface layer. Each layer has its own specific monitoring metrics and feedback mechanisms. At the network layer, monitor the basic network status, including bandwidth, latency, and packet loss rate; through the XMLHttpRequest progress event, you can obtain precise byte-level transmission progress; An intelligent progress prediction algorithm was developed. This algorithm dynamically predicts the remaining time based on the current transmission speed, historical transmission data, and network conditions. The algorithm takes into account network fluctuation factors and uses techniques such as sliding window averaging and exponential smoothing to make the prediction results more accurate. At the user interface layer, a progressive feedback system was designed. When the transmission starts, a basic progress bar is displayed; when the transmission reaches a certain stage, the estimated remaining time is displayed; when the transmission is halfway complete, detailed information such as transmission speed and amount of data transmitted is added. A transmission quality scoring mechanism has been introduced. The system generates a quality score for each transmission based on indicators such as transmission stability, speed consistency, and error rate. This score is not only used to provide feedback on transmission quality to users, but also to optimize subsequent transmission strategies. Specifically, larger chunks are used for transmission in high-quality network environments, while a more conservative strategy is adopted in low-quality environments.

[0012] Furthermore, the intelligent recovery mechanism based on the exponential backoff algorithm includes: State persistence mechanism: After transmitting each critical segment, the system saves the transmission status to persistent storage. The saved status information includes: a list of successfully transmitted segments, the current file offset, the transmission start time, and the elapsed time. This status data is stored in encrypted form to ensure security. When a transmission interruption is detected, the system triggers an automatic recovery process. The recovery process first reads the last transmission status from persistent storage, and then sends a resume request to the server. The server needs to support breakpoint resume and be able to return subsequent data based on the file offset provided by the client. The intelligent retry strategy is a dynamic retry mechanism based on the exponential backoff algorithm; specifically, the first retry waits for 1 second, the second for 2 seconds, the third for 4 seconds, and so on. A fault type identification mechanism has been introduced, enabling the system to distinguish between different types of transmission faults: network timeout, server error, and permission issues; and to adopt different recovery strategies for different types of faults.

[0013] Furthermore, the unified management framework for multi-layer timeout detection and automatic reconnection includes: Multi-layer timeout detection system: The system divides timeout detection into four levels, each focusing on different timeout types: Network layer timeout: Detects the basic network connection status and uses a short time threshold to quickly identify network unavailability. Transport layer timeout: Monitors timeouts during data transmission. The timeout threshold at this level is dynamically adjusted based on network conditions—a stricter threshold is used when the network is good, and a more lenient threshold is used when the network is poor. Application layer timeout: Detects timeouts related to application logic. Timeout handling at this level usually requires specific business logic. Heartbeat timeout: During long-term transmission, heartbeat packets are periodically sent to the server to check whether the connection is alive. The heartbeat interval is dynamically adjusted according to network stability. The core of the automatic reconnection mechanism is the intelligent reconnection strategy engine, which determines the best reconnection strategy based on factors such as transmission stage, network conditions, and historical reconnection records. A network quality assessment algorithm is introduced to continuously evaluate the quality of the current network connection. The evaluation is based on multiple indicators: transmission speed stability, packet loss rate, and latency variation. Based on the network quality score, the system dynamically adjusts the timeout threshold and reconnection strategy. In a high-quality network environment, an aggressive reconnection strategy is adopted; in a low-quality network environment, a more conservative strategy is adopted to avoid exacerbating the problem due to frequent reconnections.

[0014] Furthermore, the memory usage optimization and overflow prevention management strategies include: Memory monitoring and early warning system: The system has a built-in real-time memory monitoring module that periodically checks the browser's memory usage, paying attention not only to JavaScript heap memory but also to the memory usage of the entire browser process. When memory usage is detected to exceed the safe threshold, the system will trigger a memory protection mechanism. The first line of defense for memory protection is proactive memory release. The system will identify and release non-critical memory resources; an intelligent memory release priority algorithm is designed to ensure that the release operation does not affect the user experience. The second line of defense is dynamic block size adjustment. When memory is tight, the system automatically reduces the size of the transmission blocks, thereby reducing the memory usage of a single block. At the same time, streaming processing technology is used to ensure that memory is released immediately after each block is processed, rather than waiting for all blocks to be processed. A memory pressure prediction model has been developed. This model predicts memory pressure over a period of time based on factors such as current memory usage trends, file transfer size, and system load. When a potential memory overflow risk is predicted, the system will take preventative measures in advance. For particularly large files, disk caching technology is used to temporarily store some data in the browser's persistent storage instead of storing it entirely in memory.

[0015] According to another aspect of the present invention, a large file transfer system based on cross-window communication is provided, comprising: Intelligent block transmission mechanism and zero-copy cross-window communication module, used for intelligent block transmission mechanism and zero-copy cross-window communication; A multi-level progress system module for real-time monitoring and progress feedback of the transmission process is used to implement a multi-level progress system for real-time monitoring and progress feedback of the transmission process. The intelligent recovery mechanism module based on the exponential backoff algorithm is used for the intelligent recovery mechanism based on the exponential backoff algorithm. A unified management framework module for multi-level timeout detection and automatic reconnection; The memory usage optimization and overflow prevention management strategy module is used to implement memory usage optimization and overflow prevention management strategies.

[0016] Advantages of this invention: This invention completely solves the technical challenge of transmitting large files across windows through innovative chunked transmission mechanisms, zero-copy communication technology, and intelligent error recovery systems. Compared with existing technologies, this invention significantly improves transmission efficiency, system stability, and user experience, demonstrating significant technical value and broad application prospects.

[0017] This invention performs exceptionally well in real-world business scenarios, providing a complete technical solution for web applications to handle large file transfers.

[0018] In addition to the objectives, features, and advantages described above, the present invention has other objectives, features, and advantages. The invention will now be described in further detail with reference to the figures. Attached Figure Description

[0019] The accompanying drawings, which form part of this application, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an improper limitation of the invention.

[0020] Figure 1 This is a block diagram of the large file transfer method based on cross-window communication according to the present invention. Detailed Implementation

[0021] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0022] refer to Figure 1 A method for transferring large files based on cross-window communication includes: 1. Intelligent block transmission mechanism and zero-copy cross-window communication technology Detailed explanation of technical principles and implementation process: The browser's limit on the size of a single postMessage message is a major technical bottleneck restricting the transfer of large files. To overcome this limitation (typically 32MB-64MB), this invention designs a dynamic chunking strategy and an ownership transfer mechanism.

[0023] Core working mechanism: When the system needs to transfer a large file (such as a 100MB PDF), it first performs intelligent chunking. The chunk size is not fixed but based on dynamic evaluation: the system detects the browser's available memory, network conditions, and the characteristics of the file itself to calculate the optimal chunk size. Typically, the chunk size is controlled within the range of 4MB-8MB. This ensures that each chunk is much smaller than the browser's limit while avoiding a decrease in transmission efficiency due to excessively small chunks.

[0024] The specific process of chunked transmission is as follows: Before transmission, the system divides the file into multiple chunks using an ArrayBuffer based on the file size and a preset security threshold (e.g., 4MB). Each chunk is assigned a unique sequence number and transmitted along with file metadata (e.g., total file size, total number of chunks). Then, the system sends each chunk sequentially to the target window via postMessage.

[0025] The key technological breakthrough lies in utilizing the Transferable Objects interface supported by modern browsers. By specifying a third parameter (an array containing ArrayBuffers) in the postMessage method, ownership of the ArrayBuffer can be transferred from the sender's context to the receiver, rather than creating a copy. This achieves zero-copy data transfer across windows, significantly reducing memory usage and transmission overhead.

[0026] Real-world application scenario: In a financial institution's electronic receipt system, report files larger than 50MB, which were previously impossible to transmit via a browser, can now be transmitted stably. Tests show that the success rate of transmitting 100MB files has increased from less than 60% to 99.9%, and transmission time has been reduced by more than 40%.

[0027] Technical advantages: 1) Dynamic chunking strategy: By using a chunking mechanism, it is possible to transfer files larger than 100MB, thus circumventing the browser's single message limit; 2) Optimized transmission mechanism: Zero-copy transmission significantly reduces the memory copying overhead of large data volumes, resulting in a significant improvement in transmission efficiency; 3) Memory usage optimization: Release memory promptly after each block is transferred to avoid cumulative occupancy.

[0028] Zero-copy cross-window communication technology uses Transferable Objects technology to achieve true zero-copy transmission, significantly improving transmission efficiency.

[0029] Implementation principle: When using Transferable Objects, ownership of the ArrayBuffer is transferred directly from the sender to the receiver without actual data copying. This process is similar to "moving" rather than "copying," so the time complexity of the transfer is O(1) regardless of the file size.

[0030] 2. A multi-level progress system for real-time monitoring and progress feedback during the transmission process. Detailed explanation of technical principles and implementation process: To address the "black box" problem in the transmission process, this invention constructs an event-driven real-time progress monitoring system. This system triggers progress update events at key nodes in the chunked transmission process (such as metadata reception, chunk reception, and chunk reassembly).

[0031] Monitoring architecture design: The system breaks down the transmission process into four monitoring layers: network layer, transport layer, file layer, and user interface layer. Each layer has specific monitoring metrics and feedback mechanisms.

[0032] At the network layer, the underlying network status is monitored, including bandwidth, latency, and packet loss rate. The XMLHttpRequest's progress event can provide precise byte-level transmission progress. However, byte-level progress alone is insufficient—users are more concerned with "how much longer" rather than "how many bytes have been transmitted."

[0033] Therefore, an intelligent progress prediction algorithm was developed. This algorithm dynamically predicts the remaining time based on the current transmission speed, historical transmission data, and network conditions. The algorithm considers network fluctuations and employs techniques such as sliding window averaging and exponential smoothing to make the predictions more accurate. For example, when a decrease in network speed is detected, the system automatically adjusts the estimated time to avoid giving users unreasonable expectations.

[0034] At the user interface layer, a progressive feedback system was designed. A basic progress bar is displayed at the start of the transmission; when the transmission reaches a certain stage (e.g., 10%), the estimated remaining time is displayed; and after the transmission is halfway complete, detailed information such as transmission speed and amount transmitted is added. This progressive information display avoids an overly complex interface while meeting the user's information needs at different stages.

[0035] The technological innovation lies in the introduction of a transmission quality scoring mechanism. The system generates a quality score for each transmission based on indicators such as transmission stability, speed consistency, and error rate. This score is not only used to provide feedback on transmission quality to users but also to optimize subsequent transmission strategies—larger chunks can be used in high-quality network environments, while a more conservative strategy is adopted in low-quality environments.

[0036] Actual Results: User research shows that with real-time progress feedback, users' anxiety about waiting for transmission decreased by 76%, and even with the same transmission time, the perceived waiting time was significantly shortened. In commercial applications, this transparent progress display greatly improves user experience satisfaction.

[0037] Technical features: 1) Transparency: Provides users with multi-dimensional progress information from the block level to the byte level; 2) Real-time performance: Event-driven, with extremely low latency in progress feedback; 3) Improved user experience: User research shows that clear progress prompts can effectively reduce anxiety while waiting.

[0038] 3. Intelligent recovery mechanism based on exponential backoff algorithm This invention aims to solve the problem of transmission interruption when the network is abnormal. Traditional retry mechanisms are simple and crude, which can easily lead to avalanche effect. An intelligent retry mechanism based on the exponential backoff algorithm is designed to ensure the reliability of transmission under network abnormal conditions.

[0039] Detailed explanation of technical principles and implementation process: This mechanism persists the transfer state on the browser side (such as using localStorage or IndexedDB) and, upon detecting a transfer interruption, resumes from the last successfully transferred chunk index instead of starting over.

[0040] This invention designs an intelligent breakpoint resume transmission system. Its core idea is to periodically save the transmission state during the transmission process, so that when an interruption occurs, the transmission can continue from the breakpoint instead of starting over.

[0041] State persistence mechanism: After transmitting each critical chunk, the system saves the transmission status to persistent storage (such as IndexedDB). The saved status information includes: a list of successfully transmitted chunks, the current file offset, the transmission start time, and the elapsed time. This status data is stored encrypted to ensure security.

[0042] When a transmission interruption is detected (such as a network disconnection or unexpected page closure), the system triggers an automatic recovery process. The recovery process first reads the last transmission state from persistent storage and then sends a resume request to the server. The server needs to support resuming interrupted downloads and be able to return subsequent data based on the file offset provided by the client.

[0043] Intelligent retry strategies are another key technology. Instead of simple fixed-interval retries, they employ a dynamic retry mechanism based on an exponential backoff algorithm. Specifically: the first retry waits 1 second, the second 2 seconds, the third 4 seconds, and so on. This strategy avoids generating excessive retry requests during temporary network failures while ensuring timely resumption of transmission after the fault is recovered.

[0044] More importantly, a fault type identification mechanism has been introduced. The system can distinguish between different types of transmission faults: network timeouts, server errors, permission issues, etc. Different recovery strategies are adopted for different types of faults. For example, for network timeouts, an aggressive retry strategy is used; for server errors, a longer waiting period is used before retrying, and system maintenance information may be displayed to the user.

[0045] Practical Application: In a large enterprise's document management system, the transmission failure rate, which was originally as high as 30% due to network instability, was reduced to below 1% after adopting the breakpoint resume technology of this invention. Even if a user closes the browser during transmission, the transmission can resume from the breakpoint upon reopening, greatly improving the system's usability.

[0046] Technical features: 1) Adaptive retry interval: The waiting time is dynamically adjusted based on the number of retries to avoid network congestion; 2) Failure status persistence: Record detailed information for each failure to facilitate problem analysis; 3) Intelligent recovery point identification: After transmission is interrupted, it can accurately identify the parts that have been successfully transmitted, avoiding repeated transmission.

[0047] 4. A unified management framework for multi-level timeout detection and automatic reconnection Detailed explanation of technical principles and implementation process: The complexity of network environments makes timeouts and disconnections common problems in large file transfers. Traditional single timeout detection mechanisms cannot adapt to changing network conditions, often leading to false positives or false negatives. This invention constructs a unified multi-layered timeout detection and automatic reconnection framework.

[0048] Multi-layer timeout detection system: The system divides timeout detection into four levels, each focusing on different timeout types: Network layer timeout: Detects the status of basic network connectivity, such as DNS resolution timeout, TCP connection timeout, etc. It uses a short time threshold (e.g., 5-10 seconds) to quickly identify network unavailability.

[0049] Transport layer timeout: Monitors timeouts during data transmission, such as timeouts for individual chunk transmissions or data stream interruptions. The timeout threshold at this layer is dynamically adjusted based on network conditions—a stricter threshold is used when the network is good, and a more lenient threshold is used when the network is poor.

[0050] Application layer timeouts: Detect timeouts related to application logic, such as server response timeouts and authentication timeouts. Timeout handling at this layer typically requires specific business logic.

[0051] Heartbeat timeout: During long-term transmission, a heartbeat packet is periodically sent to the server to check if the connection is still alive. The heartbeat interval is dynamically adjusted according to network stability.

[0052] The core of the automatic reconnection mechanism is the intelligent reconnection strategy engine. This engine determines the optimal reconnection strategy based on factors such as the transmission stage, network conditions, and historical reconnection records. For example, if a timeout occurs in the early stages of transmission, it may choose to restart the transmission; while if a timeout occurs in the later stages of transmission, it will prioritize attempting to resume the interrupted transmission.

[0053] A network quality assessment algorithm is introduced to continuously evaluate the quality of the current network connection. The assessment is based on multiple indicators: transmission speed stability, packet loss rate, latency variation, etc. Based on the network quality score, the system dynamically adjusts the timeout threshold and reconnection strategy. In a high-quality network environment, an aggressive reconnection strategy is adopted; in a low-quality network environment, a more conservative strategy is adopted to avoid exacerbating problems due to frequent reconnections.

[0054] Practical Application: In mobile network environments, traditional file transfers suffer from extremely high failure rates. By employing the timeout detection and reconnection mechanism of this invention, the system can maintain the continuity of transfer tasks even in scenarios with unstable signals, such as subways and elevators, greatly improving the user experience on mobile devices.

[0055] 5. Memory usage optimization and overflow prevention management strategies Detailed explanation of technical principles and implementation process: One of the most dangerous problems during large file transfers is memory overflow. Traditional transfer methods can easily cause browser crashes when transferring multiple large files simultaneously or when system memory resources are strained. This invention uses a multi-layered memory management strategy to ensure memory safety during the transfer process.

[0056] Memory monitoring and early warning system: The system has a built-in real-time memory monitoring module that periodically checks the browser's memory usage. It monitors not only JavaScript heap memory but also the overall memory usage of the browser process. When memory usage exceeds a safe threshold (typically set to 70% of available memory), the system triggers a memory protection mechanism.

[0057] The first line of defense for memory protection is proactive memory release. The system identifies and releases non-critical memory resources, such as completed data chunks, UI cache, and history. An intelligent memory release priority algorithm is designed to ensure that release operations do not impact the user experience.

[0058] The second line of defense is dynamic block size adjustment. When memory is scarce, the system automatically reduces the size of the transmission blocks, thereby reducing the memory usage of individual blocks. Simultaneously, streaming processing technology ensures that memory is released immediately after each block is processed, rather than waiting for all blocks to complete.

[0059] The technological innovation lies in the development of a memory pressure prediction model. This model predicts memory pressure over a future period based on current memory usage trends, file size being transferred, system load, and other factors. When a potential memory overflow risk is predicted, the system will take preventative measures in advance, such as pausing some transfer tasks and reminding the user to close other tabs.

[0060] For particularly large files (e.g., exceeding 500MB), disk caching is employed. Some data is temporarily stored in the browser's persistent storage instead of being entirely kept in memory. While this slightly reduces transfer speed, it completely eliminates the risk of memory overflow.

[0061] Actual results: In stress tests, the traditional transmission method had a browser crash probability of over 50% when transmitting three 100MB files simultaneously. However, with the memory management technology of this invention, the system can run stably even when transmitting ten 100MB files simultaneously, and memory usage is kept within a safe range.

[0062] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for transferring large files based on cross-window communication, characterized in that, include: Intelligent block transmission mechanism and zero-copy cross-window communication; A multi-level progress system is implemented to achieve real-time monitoring and progress feedback during the transmission process; Intelligent recovery mechanism based on exponential backoff algorithm; A unified management framework for multi-level timeout detection and automatic reconnection; Memory usage optimization and overflow prevention management strategies.

2. The large file transfer method based on cross-window communication according to claim 1, characterized in that, The intelligent block transmission mechanism and zero-copy cross-window communication include: Core working mechanism: When the system needs to transfer a large file, it performs intelligent block processing on the file. The block size is not fixed, but is based on dynamic evaluation: the system detects the available memory of the current browser, network conditions, and the characteristics of the file itself, and calculates the optimal block size; the block size is controlled within the range of 4MB-8MB. The specific process of chunked transmission is as follows: Before transmission, the system divides the file into multiple chunks using ArrayBuffer based on the file size and preset security threshold. Each chunk is assigned a unique sequence number and transmitted along with the file metadata. The system then sends each chunk sequentially to the target window via postMessage. By leveraging the Transferable Objects interface supported by modern browsers, ownership of the ArrayBuffer is transferred from the sender's context to the receiver by specifying a third parameter in the postMessage method, instead of creating a copy.

3. The large file transfer method based on cross-window communication according to claim 1, characterized in that, The multi-level progress system for real-time monitoring and progress feedback during the transmission process includes: Monitoring architecture design: The system breaks down the transmission process into four monitoring layers: network layer, transport layer, file layer, and user interface layer. Each layer has its own specific monitoring metrics and feedback mechanisms. At the network layer, monitor the basic network status, including bandwidth, latency, and packet loss rate; through the XMLHttpRequest progress event, you can obtain precise byte-level transmission progress; An intelligent progress prediction algorithm was developed. This algorithm dynamically predicts the remaining time based on the current transmission speed, historical transmission data, and network conditions. The algorithm takes into account network fluctuation factors and uses techniques such as sliding window averaging and exponential smoothing to make the prediction results more accurate. At the user interface layer, a progressive feedback system was designed. When the transmission starts, a basic progress bar is displayed; when the transmission reaches a certain stage, the estimated remaining time is displayed; when the transmission is halfway complete, detailed information such as transmission speed and amount of data transmitted is added. A transmission quality scoring mechanism has been introduced. The system generates a quality score for each transmission based on indicators such as transmission stability, speed consistency, and error rate. This score is not only used to provide feedback on transmission quality to users, but also to optimize subsequent transmission strategies. Specifically, larger chunks are used for transmission in high-quality network environments, while a more conservative strategy is adopted in low-quality environments.

4. The large file transfer method based on cross-window communication according to claim 1, characterized in that, The intelligent recovery mechanism based on the exponential backoff algorithm includes: State persistence mechanism: After transmitting each critical segment, the system saves the transmission status to persistent storage. The saved status information includes: a list of successfully transmitted segments, the current file offset, the transmission start time, and the elapsed time. This status data is stored in encrypted form to ensure security. When a transmission interruption is detected, the system triggers an automatic recovery process. The recovery process first reads the last transmission status from persistent storage, and then sends a resume request to the server. The server needs to support breakpoint resume and be able to return subsequent data based on the file offset provided by the client. The intelligent retry strategy is a dynamic retry mechanism based on the exponential backoff algorithm; specifically, the first retry waits for 1 second, the second for 2 seconds, the third for 4 seconds, and so on. A fault type identification mechanism has been introduced, enabling the system to distinguish between different types of transmission faults: network timeout, server error, and permission issues; different recovery strategies are adopted for different types of faults.

5. The large file transfer method based on cross-window communication according to claim 1, characterized in that, The unified management framework for multi-layer timeout detection and automatic reconnection includes: Multi-layer timeout detection system: The system divides timeout detection into four levels, each focusing on different timeout types: Network layer timeout: Detects the basic network connection status and uses a short time threshold to quickly identify network unavailability. Transport layer timeout: Monitors timeouts during data transmission. The timeout threshold at this level is dynamically adjusted based on network conditions—a stricter threshold is used when the network is good, and a more lenient threshold is used when the network is poor. Application layer timeout: Detects timeouts related to application logic. Timeout handling at this level usually requires specific business logic. Heartbeat timeout: During long-term transmission, heartbeat packets are periodically sent to the server to check whether the connection is alive. The heartbeat interval is dynamically adjusted according to network stability. The core of the automatic reconnection mechanism is the intelligent reconnection strategy engine, which determines the best reconnection strategy based on factors such as transmission stage, network conditions, and historical reconnection records. A network quality assessment algorithm is introduced to continuously evaluate the quality of the current network connection. The evaluation is based on multiple indicators: transmission speed stability, packet loss rate, and latency variation. Based on the network quality score, the system dynamically adjusts the timeout threshold and reconnection strategy. In a high-quality network environment, an aggressive reconnection strategy is adopted; in a low-quality network environment, a more conservative strategy is adopted to avoid exacerbating the problem due to frequent reconnections.

6. The large file transfer method based on cross-window communication according to claim 1, characterized in that, The memory usage optimization and overflow prevention management strategies include: Memory monitoring and early warning system: The system has a built-in real-time memory monitoring module that periodically checks the browser's memory usage, paying attention not only to JavaScript heap memory but also to the memory usage of the entire browser process. When memory usage is detected to exceed the safe threshold, the system will trigger a memory protection mechanism. The first line of defense for memory protection is proactive memory release. The system will identify and release non-critical memory resources; an intelligent memory release priority algorithm is designed to ensure that the release operation does not affect the user experience. The second line of defense is dynamic block size adjustment. When memory is tight, the system automatically reduces the size of the transmission blocks, thereby reducing the memory usage of a single block. At the same time, streaming processing technology is used to ensure that memory is released immediately after each block is processed, rather than waiting for all blocks to be processed. A memory pressure prediction model has been developed. This model predicts memory pressure over a period of time based on factors such as current memory usage trends, file transfer size, and system load. When a potential memory overflow risk is predicted, the system will take preventative measures in advance. For particularly large files, disk caching technology is used to temporarily store some data in the browser's persistent storage instead of storing it entirely in memory.

7. A large file transfer system based on cross-window communication, characterized in that, include: Intelligent block transmission mechanism and zero-copy cross-window communication module, used for intelligent block transmission mechanism and zero-copy cross-window communication; A multi-level progress system module for real-time monitoring and progress feedback of the transmission process is used to implement a multi-level progress system for real-time monitoring and progress feedback of the transmission process. The intelligent recovery mechanism module based on the exponential backoff algorithm is used for the intelligent recovery mechanism based on the exponential backoff algorithm. A unified management framework module for multi-level timeout detection and automatic reconnection; The memory usage optimization and overflow prevention management strategy module is used to implement memory usage optimization and overflow prevention management strategies.