A method and system for fast copying of files within a file system

By extracting program information, preprocessing data, encrypting with AES-128, and verifying bidirectional addresses from files in the file system, combined with file cloning and transmission technology, the speed bottleneck and security issues of traditional file copying methods are solved, achieving efficient and secure file copying.

CN120196596BActive Publication Date: 2026-02-03HUBEI WEIGUAN ZHIXIAN TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Traditional file copying methods suffer from severe speed bottlenecks when dealing with large files or high-frequency operations, and lack security and integrity verification for data transmission, resulting in low efficiency and vulnerability to attacks.

Method used

By extracting program information from the file to be copied, performing data preprocessing and format standardization, employing AES-128 encryption and two-way address verification, and combining file cloning and transfer technology, secure compression and fast transfer of files are achieved.

Benefits of technology

It improves the efficiency and security of file copying, ensures data integrity and transmission accuracy, prevents tampering and unauthorized access, and adapts to complex file system environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120196596B_ABST
    Figure CN120196596B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of file copying, in particular to a method and system for rapidly copying internal files of a file system. The method comprises the following steps: obtaining a file to be copied; extracting program information of the file to be copied to obtain file information data of the file to be copied; pre-processing data of the file to be copied based on the file information data of the file to be copied to generate standard file information data of the file to be copied; compressing data of the file to be copied according to the standard file information data of the file to be copied to generate compressed file to be copied; performing AES-128 encryption on the file to be copied to generate an encrypted file to be copied and a file to be copied key; and performing bidirectional address confirmation on the encrypted file to be copied key to obtain sending address information data and receiving address information data. Through data preprocessing, encryption verification, bidirectional address confirmation and file cloning transmission, the efficiency and safety of internal rapid copying of the file system are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of file copying technology, and in particular to a method and system for fast file copying within a file system. Background Technology

[0002] Traditional file copying methods typically employ a "read-write" approach, where data is read from the source file and written to the target path. However, this method often becomes a speed bottleneck due to disk I / O performance limitations when dealing with large files or high-frequency operations. Furthermore, traditional methods are prone to performance degradation and resource contention in high-concurrency environments, failing to meet the demands of modern high-efficiency data processing. In recent years, various improvement technologies have emerged to optimize file copying efficiency. For example, memory-mapped files (MMR) technology directly loads files into memory, reducing intermediate read / write steps and improving copying speed. Hard links within the file system avoid actual data movement, achieving a virtual "copy" by manipulating only file metadata. In addition, block-level copying and asynchronous I / O technologies have significantly improved data transfer efficiency, particularly in multi-core environments supporting parallel processing. However, current traditional copying technologies often lack two-way verification of the transmission address, leading to data transmission failures or errors. At the same time, during the transmission process, data is extremely vulnerable to theft or tampering, lacking effective protection mechanisms. Consequently, the efficiency and security of fast copying within the file system are relatively low. Summary of the Invention

[0003] Therefore, it is necessary to provide a method and system for fast file copying within a file system to solve at least one of the aforementioned technical problems.

[0004] To achieve the above objective, a method for fast file copying within a file system is provided, the method comprising the following steps:

[0005] Step S1: Obtain the file to be copied; extract program information from the file to be copied to obtain the file information data; preprocess the file to be copied based on the file information data to generate standard file information data to be copied;

[0006] Step S2: Compress the file to be copied according to the standard file information data to generate a compressed file to be copied; encrypt the file to be copied using AES-128 to generate an encrypted file to be copied and a copy file key;

[0007] Step S3: Perform bidirectional address verification on the encrypted key to be copied to obtain send address information data and receive address information data; use the copy file key to verify the receive address information data. When the key verification is successful, perform file cloning and transmission on the encrypted file to be copied through the send address information data to generate file cloning and transmission data.

[0008] Step S4: Use file cloning to transfer data to receive the encrypted file to be copied, and obtain the encrypted received file; recover and verify the data information of the encrypted received file to perform a fast file copy operation within the file system.

[0009] This invention effectively identifies file structure and content by extracting program information data from the file to be copied, ensuring targeted and accurate processing. Preprocessing the file removes redundant information and abnormal data, improving the efficiency of subsequent steps and generating standardized file information data. This unified format facilitates compression and transmission, reducing compatibility issues between different file types. File compression significantly reduces data size, decreasing transmission time and system storage resource consumption. AES-128 encryption provides data integrity verification, preventing malicious tampering or damage during transmission. An independent copy file key is generated, providing security for subsequent address verification and transmission, preventing unauthorized access. Bidirectional address verification ensures identity matching between the sender and receiver, preventing data transmission to the wrong destination and improving transmission security. Address verification using the copy file key further enhances the rigor of identity authentication, preventing unauthorized transmission requests. File cloning technology enables rapid data transmission, avoiding multiple read and write operations in traditional copying and significantly improving transmission efficiency. File cloning data transmission optimizes paths and transmission methods, reducing bandwidth consumption and achieving efficient data transmission. Cloned data transmission allows for rapid reception of encrypted files, reducing file recovery delays. Data recovery is combined with encryption verification to ensure the integrity and correctness of received files, effectively preventing data loss and corruption. The data verification step enhances the security of file copying, avoiding potential threats to the system from malicious tampering. The entire process is automated, achieving efficient, secure, and stable file copying operations, adaptable to complex file system environments. Therefore, this invention improves the efficiency and security of fast copying within the file system through data preprocessing, encryption verification, bidirectional address confirmation, and file cloning transmission.

[0010] Preferably, step S1 includes the following steps:

[0011] Step S11: Obtain the file to be copied;

[0012] Step S12: Extract file program information from the file to be copied to obtain file program information data. The file program information extraction includes file name extraction, size extraction, type extraction, path extraction, and program dependency extraction.

[0013] Step S13: Based on the file program information data, unify the data format of the file to be copied to generate a file to be copied in a unified format; remove redundant and duplicate data from the file to be copied in the unified format to obtain a valid file to be copied;

[0014] Step S14: Perform file dependency resolution and marking on the valid files to be copied, thereby generating file resource marking data; use the file resource marking data to organize the file content of the valid files to be copied, and generate standard file information data to be copied.

[0015] This invention ensures the consistency of files to be copied through data format standardization and redundant data cleanup, avoiding the impact of inconsistent formats or duplicate data on subsequent processing. Data standardization makes cross-platform and cross-system data migration smoother. Redundant and duplicate data removal reduces file size and data transfer volume, significantly improving copying efficiency. File content organization and standardization further ensure the accuracy of file content during the copying process. File dependency resolution and tagging help identify the relationships between files, avoiding functional abnormalities caused by missing dependent files. Resolving dependency issues in advance can effectively reduce troubleshooting time caused by missing dependencies after copying. By extracting file program information, the core attributes of files (name, size, type, path, etc.) can be accurately obtained, facilitating classification management and subsequent processing. File resource tagging provides a basis for subsequent file organization, making the data clearer and more organized. By generating standard file information data to be copied, it ensures that the files retain high availability and integrity after copying, providing a solid guarantee for subsequent use.

[0016] Preferably, file dependency resolution and marking for valid files to be copied includes:

[0017] Extract file metadata from valid files to be copied to obtain file metadata; use the file metadata to resolve file dependencies of valid files to be copied and generate file dependency data;

[0018] Based on file dependency data, file metadata is associated with resource tags to obtain associated resource tag data; based on the associated resource tag data, file resource paths of valid files to be copied are mapped to generate file resource path mapping data.

[0019] File resource tagging data is generated by tagging and integrating associated resource tagging data through file resource path mapping data.

[0020] This invention extracts file metadata to accurately obtain key file attributes (such as creation time, modification time, and access permissions), providing essential foundational data for dependency resolution. Based on file dependency resolution, the association between a file and its related resources (such as library files, configuration files, and external modules) can be clearly identified, thus avoiding functional or operational anomalies caused by missing dependent files. Resource tagging tightly integrates file metadata with dependencies, forming traceable tagging data, making file dependency resource management more intuitive and efficient. This precise tagging method provides a reliable basis for file distribution, backup, and migration, while reducing the complexity required for manual intervention. File resource path mapping can automatically generate logical paths between files and dependent resources, simplifying complex resource management operations. Path mapping makes file deployment and access faster in different environments, especially in cross-platform scenarios, significantly reducing configuration complexity. Through file resource tagging and integration, file dependencies, path information, and associated tags are managed uniformly, generating complete file resource tagging data. This integration method ensures the systematic nature and readability of file resources, facilitating subsequent operations (such as automated deployment and version management). The dependency resolution and tagging process can identify potential dependency issues and preprocess them before file copying, thereby improving the reliability of the file processing flow. By resolving dependency issues in advance, errors and rework caused by missing dependencies after copying are reduced, improving overall stability.

[0021] Preferably, step S2 includes the following steps:

[0022] Step S21: Divide the file to be copied into data blocks according to the standard file information data to generate file block data to be copied; perform lossless dictionary compression on the file to be copied based on the file block data to generate compressed file block data to be copied.

[0023] Step S22: Perform block verification on the compressed file to be copied to generate compressed file integrity verification data;

[0024] Step S23: Based on the integrity verification data of the compressed file, perform AES-128 data encryption on the compressed file block data to be copied to generate encrypted file block data to be copied;

[0025] Step S24: Integrate the encrypted block data of the file to be copied to generate an encrypted file to be copied, and perform a decryption simulation on the encrypted file to be copied to generate a copy file key.

[0026] This invention optimizes the file to be copied into smaller chunks through data segmentation and lossless dictionary compression, reducing file size and improving data transfer speed. Lossless compression technology ensures that the integrity and quality of file content are preserved while reducing data size. Chunk verification verifies each compressed file chunk, generating integrity verification data that effectively detects data corruption or loss during transmission. This verification mechanism provides a guarantee for data recovery, ensuring the reliability of the copied file. AES-128 data encryption is used to encrypt the compressed file chunks, ensuring that the file is not easily tampered with or leaked during copying. The encryption mechanism enhances the confidentiality of file transmission, providing multiple layers of protection for data security. Decryption simulation verifies the availability of the key after generating the encrypted file, ensuring that the file can be successfully decrypted and used in the target environment. Simulated decryption operations identify potential problems in advance, reducing the failure rate of subsequent operations. The modularization of the file copy process through step-by-step processing of data segmentation, compression, encryption, verification, and integration helps improve management efficiency. Chunk processing facilitates the segmented transmission and independent processing of large files, making it particularly suitable for distributed file systems and cloud storage scenarios.

[0027] Preferably, lossless dictionary compression of the file to be copied based on the block data of the file to be copied includes:

[0028] Based on the block data of the file to be copied, a unique identifier is used to mark the block of the file to be copied, resulting in a marked data block of the file to be copied.

[0029] An initialization dictionary is constructed using a preset memory space. The initialization dictionary is used to perform a sliding window scan on the data blocks marked in the file to be copied. When a duplicate data sequence is found in the data block, the duplicate pattern is identified on the corresponding data block marked in the file to be copied to obtain the duplicate pattern of the data sequence.

[0030] The dictionary reference pointer is extracted from the initial dictionary based on the repetition pattern of the data sequence. The dictionary reference pointer is then used to replace the repetitive data sequences in the data block, thereby generating the replaced data sequence. The replaced data sequence is then used to merge and compress the marked data blocks of the file to be copied, thereby generating the compressed block data of the file to be copied.

[0031] This invention utilizes unique identifiers for block marking, enabling efficient block management of files to be copied and laying the foundation for subsequent compression. Repeat pattern recognition scans and detects repeating sequences in data blocks, replacing redundant data with dictionary reference pointers, significantly reducing file storage size. This method maintains file data integrity while reducing required storage space, creating significant value for storage resource conservation. Data merging compression generates smaller compressed block data, drastically reducing the bandwidth required for file transmission. The reduced size of compressed data blocks makes it suitable for data transmission under various network conditions, especially in bandwidth-constrained environments. Adaptive compression of file content is achieved using sliding window scanning and dynamically constructed initialization dictionaries. Different file types (such as text, images, and videos) can be efficiently compressed by adjusting the sliding window size and dictionary structure, improving the algorithm's adaptability. Lossless compression is employed, ensuring that the compressed file can be completely restored without any loss of original data. The use of dictionary reference pointer replacement and data merging techniques during compression optimizes storage while ensuring the reliability and accuracy of compressed data.

[0032] Preferably, step S3 includes the following steps:

[0033] Step S31: Extract the key sending device address information from the encrypted key to be copied to obtain sending address information data, wherein the key sending device address information extraction includes IP address extraction, MAC address extraction and device identifier extraction;

[0034] Step S32: Based on the key sending device address information data, make a communication request to obtain the encrypted key to be copied to obtain the receiving address information data; perform address pairing verification on the sending address information data and the receiving address information data through a preset whitelist to generate a two-way address confirmation result;

[0035] Step S33: Using the bidirectional address confirmation result, the copy file key and the received address information data are used to perform key address matching and verification. When the key verification is successful, the encrypted file to be copied is transmitted in a multi-layer asynchronous file cloning manner by sending address information data to generate file cloning transmission data.

[0036] Step S34: If key verification fails, return an error message and terminate the subsequent transmission process.

[0037] This invention ensures the clarity of the source and target device identities for data transmission by extracting the device address information (including IP address, MAC address, and device identifier) ​​of the key sending device. Two-way address confirmation and key-address matching verification prevent unauthorized devices from participating in data transmission through a strict verification mechanism, greatly reducing the risk of data leakage. Address pairing verification and a whitelist mechanism ensure that only trusted devices can participate in communication, effectively avoiding transmission failures caused by incorrect addresses or malicious devices. The use of multi-layer asynchronous file cloning transmission technology improves the fault tolerance of the transmission process, allowing for rapid recovery even if transmission is interrupted. Multi-layer asynchronous transmission based on received address information data supports parallel file cloning transmission, shortening transmission time. The asynchronous transmission mode avoids the waiting problem in traditional synchronous transmission, improving file transmission efficiency, especially suitable for rapid copying of large-scale files. If key verification fails, the system immediately returns an error message and terminates the subsequent transmission process, avoiding resource waste. A dynamic error handling mechanism enhances the controllability and stability of the transmission process, facilitating rapid problem location and resolution. By extracting IP address, MAC address, and device identifier, it is compatible with various network environments and hardware devices, suitable for multi-scenario applications in LANs and WANs. The extracted device information can also be used for further analysis and optimization of device communication performance. Two-way address verification and key matching ensure the uniqueness and integrity of transmissions, preventing man-in-the-middle attacks and data tampering. Joint verification of the encryption key and address data constructs multiple layers of protection, further enhancing the system's resistance to attacks.

[0038] Preferably, step S33 includes the following steps:

[0039] Step S331: Using the bidirectional address confirmation result, the copy file key and the received address information data are used to perform key address matching and verification. When the key verification is successful, the encrypted file to be copied is confirmed by sending address information data to obtain the copy transmission method. The copy transmission method includes local area network transmission, USB transmission and Bluetooth transmission.

[0040] Step S332: If the copy transmission method is confirmed to be LAN transmission, then the encrypted file to be copied is transmitted in a multi-threaded dynamic window based on UDP+FEC to generate a LAN transmission protocol; the encrypted file to be copied is transmitted in file chunks in parallel based on the LAN transmission protocol to generate file chunk parallel transmission data.

[0041] Step S333: Perform network transmission rate sensing on the file block parallel transmission data to obtain network transmission rate data; compare the network transmission rate with the preset standard transmission rate threshold; when the network transmission rate data is less than the preset standard transmission rate threshold, resume the corresponding file block parallel transmission data from the breakpoint and generate local area network transmission file clone data.

[0042] Step S334: If the copy transfer method is confirmed to be USB transfer, then the encrypted file to be copied is split and merged to generate a USB transfer strategy; based on the USB transfer strategy, the encrypted file to be copied is optimized for batch transfer to generate USB transfer file clone data.

[0043] Step S335: If the copy transmission method is confirmed to be Bluetooth transmission, the encrypted file to be copied is distributed in a low-power, short-range, multi-point manner to generate Bluetooth transmission file clone data; the local area network transmission file clone data, USB transmission file clone data and Bluetooth transmission file clone data are integrated to generate file clone transmission data.

[0044] This invention utilizes LAN, USB, and Bluetooth transmission as different file transfer methods, dynamically selecting the appropriate method based on specific circumstances to ensure efficient file transfer in various environments. This flexibility allows the transfer process to be optimized based on factors such as transmission distance, network bandwidth, and device compatibility, meeting diverse needs. The UDP+FEC method combined with multi-threaded dynamic window transmission improves the efficiency and stability of file transfer within a LAN, reducing packet loss and latency, making it particularly suitable for the rapid transfer of large-scale files. File chunking and parallel transmission further optimizes the transfer process, supporting multiple transmission lines working in parallel and significantly accelerating file transfer speed. Network transmission rate awareness and breakpoint resumption technology ensure continuous transmission even in unstable network environments, avoiding file transfer interruptions due to network fluctuations and improving reliability. File fragmentation and merging technology supports the effective storage and transfer of large files on USB devices, preventing large files from exceeding storage capacity or transmission bandwidth limitations. Batch transfer optimization improves the transmission efficiency of USB devices, reducing time wasted due to frequent plugging and unplugging and data loading operations, thus improving overall transmission speed and stability. Low-power, short-range, multi-point distribution technology makes Bluetooth transmission suitable for energy-saving environments, such as file transfer between mobile devices. Through multi-point distribution, Bluetooth can efficiently communicate with multiple devices simultaneously, improving data sharing efficiency, especially suitable for scenarios with small files and many devices. Data integration unifies the management of file clone data generated by different transmission methods, ensuring data consistency and integrity during transmission. This integration method provides a clear management mechanism that can efficiently monitor file transmission status and facilitate tracking and scheduling data streams along different transmission paths.

[0045] Preferably, when the copy transmission method is confirmed to be Bluetooth transmission, the low-power, short-range, multi-point distribution of the encrypted file to be copied includes:

[0046] Once it is confirmed that the copy transmission method is Bluetooth transmission, the encrypted file to be copied is scanned for available devices in the Bluetooth network to obtain Bluetooth target device data; a multi-point device Bluetooth distribution connection is established for the Bluetooth target device data in low power mode, generating Bluetooth distribution connection data;

[0047] The encrypted file to be copied is divided into blocks based on the Bluetooth distribution connection data, and the blocks are then transmitted to the Bluetooth target device sequentially via Bluetooth connection to obtain Bluetooth block transmission data. The Bluetooth target device data is then subjected to block integrity verification based on the Bluetooth block transmission data to generate Bluetooth transmission file clone data.

[0048] This invention utilizes Bluetooth Low Energy (BLE) mode for transmission, enabling efficient data transfer while maintaining low energy consumption. Especially in mobile devices or battery-powered devices, Bluetooth's low-power characteristics effectively extend device life without adding extra battery burden. Short-range multi-point distribution further optimizes Bluetooth transmission, allowing files to be simultaneously transmitted to multiple target devices, improving transmission efficiency and response speed, making it suitable for rapid file sharing in multi-device scenarios. By scanning for available devices in the Bluetooth network, the system intelligently identifies and connects to multiple Bluetooth devices, avoiding the tedious process of manually selecting devices. This automated scanning and connection capability enhances the convenience and speed of the transmission process. Multi-point device connection establishment ensures simultaneous transmission between multiple target devices, fully utilizing Bluetooth's multi-connectivity features for more flexible file distribution, adapting to complex application scenarios. File chunking effectively avoids data loss and transmission delays during file transfer by splitting large files into smaller chunks. The chunked files can then be transmitted efficiently via Bluetooth, improving transmission reliability. Each file chunk is transmitted separately via Bluetooth connection, ensuring data transmission stability and speed, avoiding limitations imposed by excessively large files or insufficient bandwidth in a single transmission. Chunk integrity verification ensures that each file chunk is not corrupted during transmission, guaranteeing the accuracy of the file after transmission. Each chunk of data on the Bluetooth target device is verified, ensuring the integrity and accuracy of the entire file. This verification process enhances the reliability of file transmission, ensuring that any packet loss or data errors during transmission are detected and resolved promptly, thereby reducing the occurrence of data corruption or errors.

[0049] Preferably, step S4 includes the following steps:

[0050] Step S41: Use file cloning to transfer data to receive the encrypted file to be copied, and obtain the encrypted received file;

[0051] Step S42: Reassemble the encrypted received file into data blocks to generate reassembled received file data blocks; verify the data decryption key on the reassembled received file data blocks to generate data decryption key verification results;

[0052] Step S43: Decrypt the encrypted received file according to the data decryption key verification result to generate the original file to be copied, so as to complete the fast file copying operation within the file system.

[0053] This invention ensures that received files are not tampered with or lost during file transmission through file reception and encryption verification. The encrypted received file is verified, ensuring file security and preventing data leakage and unauthorized modification. After receiving the file, data blocks are reassembled, allowing the file to be restored in the correct order, providing a reliable foundation for file decryption and subsequent processing. Data decryption key verification ensures that only verified keys can be used for decryption, thereby enhancing security during file transmission. This verification mechanism effectively avoids decryption failures caused by using incorrect or mismatched keys, ensuring a smooth decryption process. The file decryption operation ensures that the original file to be copied can be successfully recovered within the file system, achieving complete and accurate data recovery. The transparency and reliability of the entire decryption process ensure that there is no loss or error during data transmission. After decrypting and verifying the file, the system can quickly complete the file copying operation. Through this process, the file is quickly restored to the file system after reception and decryption, improving the response speed and efficiency of the file management system. The combination of file decryption and reception optimizes the entire file copying process, ensuring high efficiency from encrypted transmission to decryption and restoration, and reducing time delays and complexity during file copying.

[0054] This specification provides a system for fast file copying within a file system, used to execute the aforementioned method for fast file copying within a file system. This system includes:

[0055] The data collection module is used to acquire the file to be copied; extract program information from the file to be copied to obtain the file information data; and perform data preprocessing on the file information data to be copied to generate standard file information data to be copied.

[0056] The data compression and encryption module is used to compress the file to be copied based on the standard file information data to generate a compressed file to be copied; and to encrypt the file to be copied using AES-128 to generate an encrypted file to be copied and a copy file key.

[0057] The data transmission module is used to perform bidirectional address confirmation on the encrypted key to be copied to obtain send address information data and receive address information data; it uses the copy file key to verify the receive address information data; when the key verification is successful, it performs file cloning and transmission on the encrypted file to be copied through the send address information data, generating file cloning and transmission data.

[0058] The data recovery module is used to receive encrypted files to be copied by using file cloning to transfer data, and obtain encrypted received files; it then recovers and verifies the data information of the encrypted received files in order to perform a fast file copy operation within the file system.

[0059] The beneficial effects of this invention lie in its ability to accurately acquire the file to be copied through the data collection module and extract program information, ensuring that all key information of the file to be copied can be extracted and converted into a processable standard format. Data preprocessing, by generating standard file information data to be copied, ensures data uniformity and consistency, enabling subsequent processing and operations to proceed smoothly and improving the reliability of the file copying process. In the data compression and encryption module, the file to be copied is compressed, effectively reducing file size and improving transmission efficiency. AES-128 encryption also ensures file security during transmission. Encryption guarantees the confidentiality and integrity of the file, avoiding the risk of data leakage or tampering. The generation and management of the encrypted file and key ensure that only authorized users can access the file, improving the security of data transmission and storage. The data transmission module ensures a valid connection between the communicating parties through bidirectional address confirmation and performs key verification on the receiving address information. This step ensures that only the verified receiver can receive data, thereby preventing unauthorized reception and data leakage. The file cloning transmission technology used during file transmission ensures efficient and secure file transmission in various transmission environments, improving overall transmission efficiency and reliability. The data recovery module receives and decrypts transmitted data, enabling rapid file recovery while verifying the data to ensure its integrity and consistency. In the fast copy operation, the file recovery process is optimized, shortening recovery time and improving accuracy. The fast file copy operation within the file system, through effective data recovery support, guarantees the usability and correctness of recovered files, improving overall system performance, especially significantly increasing efficiency in large-scale file processing and backup tasks. Therefore, this invention improves the efficiency and security of fast copying within the file system through data preprocessing, encryption verification, bidirectional address confirmation, and file cloning transmission. Attached Figure Description

[0060] Figure 1 This is a flowchart illustrating the steps of a method for fast file copying within a file system.

[0061] Figure 2 for Figure 1 A detailed flowchart illustrating the implementation steps of step S2.

[0062] Figure 3 for Figure 1 A detailed flowchart illustrating the implementation steps of step S3.

[0063] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0064] The technical method of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.

[0065] Furthermore, the accompanying drawings are merely illustrative of the invention and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and therefore repeated descriptions of them will be omitted. Some block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor methods and / or microcontroller methods.

[0066] It should be understood that although the terms "first," "second," etc., may be used herein to describe various units, these units should not be limited by these terms. These terms are used merely to distinguish one unit from another. For example, without departing from the scope of the exemplary embodiments, a first unit may be referred to as a second unit, and similarly, a second unit may be referred to as a first unit. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.

[0067] To achieve the above objectives, please refer to Figures 1 to 3 A method for fast file copying within a file system, the method comprising the following steps:

[0068] Step S1: Obtain the file to be copied; extract program information from the file to be copied to obtain the file information data; preprocess the file to be copied based on the file information data to generate standard file information data to be copied;

[0069] Step S2: Compress the file to be copied according to the standard file information data to generate a compressed file to be copied; encrypt the file to be copied using AES-128 to generate an encrypted file to be copied and a copy file key;

[0070] Step S3: Perform bidirectional address verification on the encrypted key to be copied to obtain send address information data and receive address information data; use the copy file key to verify the receive address information data. When the key verification is successful, perform file cloning and transmission on the encrypted file to be copied through the send address information data to generate file cloning and transmission data.

[0071] Step S4: Use file cloning to transfer data to receive the encrypted file to be copied, and obtain the encrypted received file; recover and verify the data information of the encrypted received file to perform a fast file copy operation within the file system.

[0072] This invention effectively identifies file structure and content by extracting program information data from the file to be copied, ensuring targeted and accurate processing. Preprocessing the file removes redundant information and abnormal data, improving the efficiency of subsequent steps and generating standardized file information data. This unified format facilitates compression and transmission, reducing compatibility issues between different file types. File compression significantly reduces data size, decreasing transmission time and system storage resource consumption. AES-128 encryption provides data integrity verification, preventing malicious tampering or damage during transmission. An independent copy file key is generated, providing security for subsequent address verification and transmission, preventing unauthorized access. Bidirectional address verification ensures identity matching between the sender and receiver, preventing data transmission to the wrong destination and improving transmission security. Address verification using the copy file key further enhances the rigor of identity authentication, preventing unauthorized transmission requests. File cloning technology enables rapid data transmission, avoiding multiple read and write operations in traditional copying and significantly improving transmission efficiency. File cloning data transmission optimizes paths and transmission methods, reducing bandwidth consumption and achieving efficient data transmission. Cloned data transmission allows for rapid reception of encrypted files, reducing file recovery delays. Data recovery is combined with encryption verification to ensure the integrity and correctness of received files, effectively preventing data loss and corruption. The data verification step enhances the security of file copying, avoiding potential threats to the system from malicious tampering. The entire process is automated, achieving efficient, secure, and stable file copying operations, adaptable to complex file system environments. Therefore, this invention improves the efficiency and security of fast copying within the file system through data preprocessing, encryption verification, bidirectional address confirmation, and file cloning transmission.

[0073] In this embodiment of the invention, reference is made to Figure 1 The diagram illustrates the steps of a method for fast file copying within a file system according to the present invention. In this example, the method includes the following steps:

[0074] Step S1: Obtain the file to be copied; extract program information from the file to be copied to obtain the file information data; preprocess the file to be copied based on the file information data to generate standard file information data to be copied;

[0075] In this embodiment of the invention, a file to be copied is selected or specified from a file system or network storage. The file can be a document, image, audio, video, or other type of file. File path, filename, and file type can be used as the basis for file selection. Metadata of the file is extracted using a file parsing tool or script, including filename, size, modification date, creation date, format type, and encoding method of the file content. For specific file types (such as image or audio / video files), further specific information, such as image resolution and audio / video encoding format, can be extracted. This process can be implemented using a corresponding programming language or file analysis library (such as Python's os module, exif module, etc.). The extracted program information is organized into structured data (such as JSON, XML, database tables, etc.) for convenient subsequent processing and storage. This data may include: basic file information (filename, type, path, size, etc.), metadata (creation date, modification date, etc.), and information on specific content (such as image resolution, audio sampling rate, etc.). If the content of the file to be copied contains noise (such as color artifacts in an image, electrostatic noise in audio, etc.), a suitable denoising algorithm can be used to preprocess the file content. Depending on the target system or requirements, files need to be converted to a standard format. For example, converting image files of different formats to PNG or JPEG, or converting audio files to a uniform sampling rate and encoding format. Depending on the file type, further optimization is required. This includes compressing file size, adjusting image clarity, compressing video files, and removing irrelevant data. Based on these preprocessing steps, a standardized file information dataset is generated, containing information on all standardized and optimized files, including file type, size, format, and modification time, providing a consistent data foundation for subsequent copy operations. This data can be stored in a local database or cloud storage for convenient file copying.

[0076] Step S2: Compress the file to be copied according to the standard file information data to generate a compressed file to be copied; encrypt the file to be copied using AES-128 to generate an encrypted file to be copied and a copy file key;

[0077] In this embodiment of the invention, a suitable compression algorithm is selected based on the type of the file to be copied and the requirements of the target system. Common compression algorithms include ZIP, RAR, and GZIP. Compression can be achieved using tools such as the zipfile module (for ZIP files) and gzip module (for GZIP files) in Python. The selected compression algorithm is used to compress the file according to its type and size. The compression process typically includes: opening the file to be copied and reading its contents; compressing the contents using the compression algorithm and saving it as a new compressed file. If there are multiple files or folders, they can be merged into an archive file before compression. After the compressed file is generated, it can be stored or transferred as needed. When generating the compressed file, a filename, timestamp, or other unique identifier can be added for identification in subsequent operations. AES-128 (Message Digest Algorithm 5) is a widely used hash encryption algorithm used to generate a unique "digest" or "key" for a file. While AES-128 is not suitable for encrypting sensitive data, it is well-suited for data integrity verification. Using the AES-128 algorithm to generate a file's hash value ensures file integrity and provides a "key" for file encryption. The compressed file (or original file) is hashed using the AES-128 algorithm to generate a 128-bit hash value (i.e., an AES-128 fingerprint). While AES-128 itself is not used to encrypt file content, the generated AES-128 hash value can be used as an encryption "key" to verify file integrity or generate an encrypted file. In this process, the generated AES-128 value can also serve as a "file key." If file content needs to be encrypted, other encryption algorithms (such as AES, RSA, etc.) can be combined with the AES-128 value as an encryption key. The hash value generated by AES-128 can be used for key generation during the encryption process. The file is then encrypted using the AES-128 value and other encryption algorithms (such as AES), generating an encrypted file to be copied. This encrypted file should possess the security characteristics of encryption, its content should not be directly readable, and a key is required for decryption. The generated AES-128 value is saved as the file's key. The key can be stored in a secure location (such as a key management system or encrypted storage device) and used for decryption when needed.

[0078] Step S3: Perform bidirectional address verification on the encrypted key to be copied to obtain send address information data and receive address information data; use the copy file key to verify the receive address information data. When the key verification is successful, perform file cloning and transmission on the encrypted file to be copied through the send address information data to generate file cloning and transmission data.

[0079] In this embodiment of the invention, the purpose of bidirectional address verification is to ensure the accuracy of address information during file copying and to avoid data transmission errors or leaks. Verifying the sender's address information typically involves identifying the IP address, port number, and other network identifiers of the computer or server hosting the file. This information can be obtained through configuration files, network interfaces, or manual input. The receiver's address information also needs verification to ensure the accuracy of the target device's or server's IP address, port number, etc. The receiver address is usually verified before the copying process to ensure data can be correctly transmitted to the target system. The sender and receiver address information are stored separately in structured data format, typically transmitted in JSON, XML, or similar formats. Address information data includes: sender IP, sender port, receiver IP, receiver port, etc. Address verification is performed using network protocols (such as TCP / IP, UDP, etc.). The validity of the sender and receiver addresses can be verified by sending test packets (ping, socket connection, etc.). After both the sender and receiver have confirmed the validity of each other's address information, bidirectional verification is successful, resulting in complete sender and receiver address information data. After bidirectional address confirmation, the previously generated AES-128 file key is used to verify the recipient's address information data. An encryption algorithm (such as AES or HMAC) combined with the AES-128 key can be used to encrypt and verify the received address information. For example, the sender uses an AES-128 key to encrypt the recipient's address information. The recipient also uses the same AES-128 key to decrypt or verify. If decryption or verification is successful, it indicates that the address information has not been tampered with, and the key verification is successful. If key verification is successful, the system confirms that the received address information is correct, and the subsequent file cloning and transmission can proceed. If key verification fails, the address information or key needs to be reconfirmed, or the transmission must be terminated according to the security policy. The sender establishes a connection using the confirmed sender address information data (IP, port) and the recipient address information data (receiver IP, port). A stable connection can be established using the TCP / IP protocol. A reliable transport protocol (such as TCP) ensures that there is no packet loss or delay during file data transmission. Once the connection is established, the sender begins transmitting the encrypted file to be copied. File cloning and transfer typically involves the following steps: reading the encrypted file to be copied, and transferring the file in chunks or segments of appropriate size. Using a file transfer protocol (such as FTP, SFTP, or HTTP), the encrypted file is transferred from the sender to the receiver. During the transfer, relevant data is recorded, such as file size, transfer speed, transfer status, and transfer time. After successful file transfer, a transfer log or report is generated, recording the cloning and transfer data, which may include: file name, file size, whether the transfer was successful, and timestamps. After the file transfer is complete, the receiver verifies the file integrity and checks whether the file has been correctly decrypted.The receiver can compare the file's integrity using the AES-128 hash value to ensure that the file has not been tampered with or corrupted during transmission. Finally, file clone transmission data is generated, including the transmission results and statistical information from the transmission process.

[0080] Step S4: Use file cloning to transfer data to receive the encrypted file to be copied, and obtain the encrypted received file; recover and verify the data information of the encrypted received file to perform a fast file copy operation within the file system.

[0081] In this embodiment of the invention, after successful file cloning and transmission, the receiver needs to receive the file via the confirmed receiving address information. The receiver will receive data from the sender using a suitable transmission protocol (such as TCP / IP) through the pre-confirmed address and port. The receiver establishes a connection with the sender's address information via a network protocol (such as TCP / IP). Depending on the design of file chunking or packet transmission, the receiver receives file packets one by one. Each packet should include file block information, size, data verification, etc. The receiver temporarily caches the received file data stream or packets in a temporary storage area. The receiver combines all received packets sequentially to obtain the complete encrypted received file. After file reception, the receiver needs to recover the data information from the encrypted file. This process mainly includes the following steps: decrypting the encrypted received file using a previously generated file key (e.g., AES-128 or a key generated through other encryption algorithms). After decryption, the receiver obtains the original content of the file. For example, using a symmetric encryption algorithm such as AES, the receiver uses the key to decrypt the file and recover the original data. If the file was compressed during transmission, the recipient needs to decompress it to restore it to a usable state. Tools like ZIP and RAR can be used for decompression. After decryption and recovery, the recipient needs to verify the file's integrity to ensure it wasn't damaged or lost during transmission. Common integrity verification methods include AES-128 or SHA hashing: A hash calculation is performed on the decrypted file to generate a new hash value. This new hash value is compared to the hash value before transmission. If they match, the file is intact and untampered. If they don't match, the system can request the file data again or mark the file as corrupted. After file recovery and verification, the recipient can perform a file copy operation within the file system, storing the received file at the target path. This operation is typically done through the file system interface. File copying can be performed using common system commands or file manipulation tools (such as the `cp` command in Linux, the `copy` command in Windows, or programming interfaces). If the target system supports this, file system optimization techniques can be used to accelerate file copying. For example, large files can be split into multiple blocks and copied in parallel, leveraging the computing power of multi-core processors to speed up the copy process. If the target location already contains part of the file, and only the incremental portion needs to be copied, an incremental copy algorithm (such as rsync) can be used to transfer only the differing parts. Memory caching techniques (such as memory-mapped files) can be used to accelerate the file copying process. After the file copy is complete, the file at the target location should be complete and usable. The receiver can further check the copy result, for example, by comparing file sizes and hash values, to ensure that no problems occurred during the file copying process.

[0082] Preferably, step S1 includes the following steps:

[0083] Step S11: Obtain the file to be copied;

[0084] Step S12: Extract file program information from the file to be copied to obtain file program information data. The file program information extraction includes file name extraction, size extraction, type extraction, path extraction, and program dependency extraction.

[0085] Step S13: Based on the file program information data, unify the data format of the file to be copied to generate a file to be copied in a unified format; remove redundant and duplicate data from the file to be copied in the unified format to obtain a valid file to be copied;

[0086] Step S14: Perform file dependency resolution and marking on the valid files to be copied, thereby generating file resource marking data; use the file resource marking data to organize the file content of the valid files to be copied, and generate standard file information data to be copied.

[0087] In this embodiment of the invention, the path of the file to be copied is obtained through a file browser, file path input, or an automated program. Users can specify the file path or scan files in a specified directory using a program. When acquiring files, the system can select the file type (e.g., text file, image file, audio / video file, etc.) and select multiple files or an entire folder to copy as needed. The system extracts the file name (e.g., "example.txt") from the file path, the name including the filename and extension. The system extracts the file size from the file's metadata, typically in bytes (e.g., "1024KB"). This step can use the file system API to obtain the file's "size" attribute. The file type can be inferred from the extension (e.g., ".txt" indicates a text file) or from the file header data (e.g., header information for PNG files). The system can call the operating system API or use file content analysis tools to determine the file type. The system extracts complete path information from the file path (e.g., " / home / user / Documents / example.txt"), which is crucial for subsequent file management. For programs or executable files (such as ".exe" and ".dll" files), the system needs to analyze and extract the program's dependencies, including external library files, configuration files, data files, etc. These dependencies can be extracted using static analysis tools or operating system APIs. After extracting the file program information, differences in format, encoding, and structure exist between different files. To ensure compatibility and efficiency during the copying process, file formats need to be standardized. For example, text files of different formats can be uniformly converted to UTF-8 encoding, image files can be standardized to a standard size or format (such as JPEG or PNG), or database files of different versions can be standardized to a common format. The system can call the appropriate conversion tool based on the file type, or use a standard file conversion library to perform format standardization. For files with redundant or duplicate data, data cleanup is performed. Duplicate parts can be removed through data comparison (such as hash value calculation) and deduplication algorithms (such as SHA-256 hash comparison, LZ4 compression). This step reduces redundancy during transmission and storage, improving system efficiency. The system can perform cleanup at the file content and file structure levels to ensure that the final file to be copied contains only valid data. After cleaning up redundant data, a single, uniformly formatted, and valid file to be copied is obtained. This file is suitable for efficient copying and subsequent processing. Dependency analysis is performed on the valid file to be copied, especially for program files and library files, to determine whether the file depends on other files or resources. For example, analyze the dependencies of dynamic link library (DLL) files, or analyze the relationship between configuration files and other modules. Static analysis tools, dependency analysis tools, or build tools (such as Makefiles and CMake) are used to identify dependencies between files.Based on file dependency analysis, tagged data is generated to indicate whether a file has external dependencies and whether other files or resources need to be copied first. These tags help the system determine the copy order or priority. Resource tags can include file dependency types (e.g., "dynamic library," "configuration file," etc.) and relationships between files (e.g., "this file depends on file A"). The system determines the file copy order or structure based on the generated resource tag data. For example, if file A depends on file B, the system will ensure that file B has been successfully copied to the target location before copying file A. For program files, environment configuration and resource file association are also required to ensure the integrity of the program's runtime environment. After the file content is organized, standardized information data of the files to be copied is generated.

[0088] Preferably, file dependency resolution and marking for valid files to be copied includes:

[0089] Extract file metadata from valid files to be copied to obtain file metadata; use the file metadata to resolve file dependencies of valid files to be copied and generate file dependency data;

[0090] Based on file dependency data, file metadata is associated with resource tags to obtain associated resource tag data; based on the associated resource tag data, file resource paths of valid files to be copied are mapped to generate file resource path mapping data.

[0091] File resource tagging data is generated by tagging and integrating associated resource tagging data through file resource path mapping data.

[0092] In this embodiment of the invention, metadata is extracted from valid files to be copied. File metadata includes attributes such as file name, size, type, modification time, creation time, permissions, and owner. File metadata can be obtained through file system APIs provided by the operating system (such as the stat() function in the POSIX standard and the GetFileAttributes() function in Windows). File metadata can also contain special file attributes, such as version information, extended information, or digital signatures, depending on the file type and system platform. Based on the file metadata, the system parses the dependencies between files. Especially for program files or library files (such as .exe, .dll, and .so files), the system needs to identify the dependencies between these files and other files (such as other programs, configuration files, and data files). Program files depend on certain library files (such as dynamic link libraries (DLLs) or shared object files (SOs). Programs depend on configuration files, resource files, or other documentation files. Some files depend on specific directory structures or paths. The system can use static analysis tools (such as dependency graph generation tools and compilation toolchains) to extract the dependencies of program files or scripts. For non-program files, dependencies can be inferred using file content or naming rules (e.g., the file path contains other filenames or specific configuration fields). Based on file dependency data, the system associates resources with file metadata. For example, if file A depends on file B, the system will mark the path and type of file B in file A's metadata, indicating that file B is a resource dependency of A. The marked content can be the file path, type, dependency order, related resource versions, etc. When marking each file, a metadata structure can be built, adding dependent resources as associated items. For example, a data structure (such as a dictionary or hash table) can be created where the key is the file name and the value is a list of its associated resources. Based on the associated resource marking data, the system needs to perform path mapping for valid files to be copied. The purpose of path mapping is to map the file's resource dependencies to paths in the actual file system. For example, if file A depends on file B, and B is stored at path / lib / b.dll, the mapping data needs to include the dependency path relationship between file A and file B. The system needs to scan the target storage location to ensure that the dependent resource files exist and record their paths. A path mapping table or database can be constructed, recording the dependent resources of each file and their actual paths. For dynamically loaded resources (such as dynamic link libraries), the system can also dynamically generate path mappings. Using the file resource path mapping data, associated resources are further marked and integrated. This step combines the associated resource marking data with the path mapping data to generate the final file resource marking data.The integrated data ensures that file dependencies are not only tagged but also pinpointed to their exact locations within the file system, guaranteeing the correct location and transfer of all dependent files during the copy process. File resource path mapping data and associated resource tagging data are integrated to form a complete resource tagging table. The path relationships between files and their dependencies can be stored in a graph structure or a list format. Combining path mapping and dependency tags, the system generates complete resource information for each file, such as all dependencies, resource paths, and copy order. The final integrated resource tagging data contains the tagging information and actual paths of each file and its dependent resources, ready for the file copy task.

[0093] As an example of the present invention, reference is made to... Figure 2 As shown, step S2 in this example includes:

[0094] Step S21: Divide the file to be copied into data blocks according to the standard file information data to generate file block data to be copied; perform lossless dictionary compression on the file to be copied based on the file block data to generate compressed file block data to be copied.

[0095] Step S22: Perform block verification on the compressed file to be copied to generate compressed file integrity verification data;

[0096] Step S23: Based on the integrity verification data of the compressed file, perform AES-128 data encryption on the compressed file block data to be copied to generate encrypted file block data to be copied;

[0097] Step S24: Integrate the encrypted block data of the file to be copied to generate an encrypted file to be copied, and perform a decryption simulation on the encrypted file to be copied to generate a copy file key.

[0098] In this embodiment of the invention, to improve transmission efficiency and reduce error rate during file copying, the file to be copied is first divided into blocks of a predetermined size. Typically, files are divided into blocks of fixed size (e.g., 64KB, 128KB, etc.) or dynamic size. The boundaries of each data block are calculated using standard file information data (e.g., file size and format), and the blocks are then divided. Algorithms (e.g., sliding window algorithm, block hashing, etc.) can be used to ensure the integrity of each data block's content. File reading operations are implemented through programming, and the file content is read according to the predetermined block size, dividing the file content into several data blocks. An appropriate buffer (e.g., memory buffer) is used to read the file step by step, storing each block in memory or on disk. To ensure the integrity and accuracy of each block during compression, the system verifies each data block, generating a checksum (e.g., checksum, hash value, etc.) for each block. Block verification uses common verification algorithms (e.g., CRC32, SHA256, AES-128, etc.) to calculate the checksum for each data block. A checksum algorithm is used to calculate a checksum for each compressed data block, generating a checksum for each block. The checksum can be a hash value, CRC value, or other similar form. Each data block is accompanied by its corresponding checksum during storage or transmission to ensure data integrity. Based on the checksum data generated in step S22, each block is encrypted using AES-128 in this step to ensure the confidentiality and integrity of the file data. AES-128 encryption typically involves hashing the file content to generate a fixed-length hash value (128 bits). Each block is individually AES-128 encrypted to ensure that even if the data is tampered with or lost, it can still be detected through the encrypted data. The AES-128 hash algorithm is used to encrypt each compressed data block, generating an encrypted data block. Each data block's AES-128 encryption generates a unique hash value. The AES-128 encryption process includes processing the data block using the AES-128 algorithm to generate an encrypted output, typically a 32-character hexadecimal string. The encrypted data blocks are then integrated into a complete file. In this step, all encrypted blocks are reassembled into a single, complete encrypted file. This can be achieved by merging the encrypted blocks in their original order. All encrypted blocks are read and assembled sequentially, ensuring the block order matches the original file. The resulting encrypted file is fully encrypted, and the data blocks are encrypted using AES-128 to guarantee integrity. To ensure proper decryption, the system simulates decryption of the merged encrypted file, generating a key for copying the file. This decryption simulation performs a series of reverse operations on the encrypted file, using a specific algorithm and key to recover the original file content. The key can be a specific symmetric key generated during the encryption process or another key algorithm.The file is decrypted using the inverse operation of the encryption algorithm (such as a symmetric encryption / decryption algorithm) to recover its contents. During the decryption process, a key generation mechanism is triggered to generate the actual key for copying the file. This key serves as a security verification key during file transmission or storage, ensuring the file's security and integrity.

[0099] Preferably, lossless dictionary compression of the file to be copied based on the block data of the file to be copied includes:

[0100] Based on the block data of the file to be copied, a unique identifier is used to mark the block of the file to be copied, resulting in a marked data block of the file to be copied.

[0101] An initialization dictionary is constructed using a preset memory space. The initialization dictionary is used to perform a sliding window scan on the data blocks marked in the file to be copied. When a duplicate data sequence is found in the data block, the duplicate pattern is identified on the corresponding data block marked in the file to be copied to obtain the duplicate pattern of the data sequence.

[0102] The dictionary reference pointer is extracted from the initial dictionary based on the repetition pattern of the data sequence. The dictionary reference pointer is then used to replace the repetitive data sequences in the data block, thereby generating the replaced data sequence. The replaced data sequence is then used to merge and compress the marked data blocks of the file to be copied, thereby generating the compressed block data of the file to be copied.

[0103] In this embodiment of the invention, based on the block data of the file to be copied, the system generates a unique identifier for each data block, typically marked by file characteristics (such as file size, block start address, etc.). This identifier helps distinguish different data blocks and avoids duplication or erroneous operations during the compression process. The system generates unique identifiers using a hash algorithm (such as SHA-256) according to the file's block structure. Each block is accompanied by an identifier marking its content and address. An initialization dictionary is constructed, containing common data patterns and sequences. The initialization dictionary typically pre-loads some common file data patterns, compression algorithm templates, or general file content structures. A dictionary can be constructed using a pre-set dictionary template in memory or based on historical compression experience. The dictionary can be generated by an algorithm or initialized from external standard data. The system scans each marked data block using a sliding window mechanism to find duplicate data sequences. The sliding window gradually advances towards each data block in the file, advancing a fixed-length window each time for content comparison. The size of the sliding window is typically determined by the characteristics of the dictionary and the structure of the data to be compressed. In each window, the data sequence within the window is scanned and compared with existing sequences in the initialization dictionary. If a data sequence in the window is found to be a duplicate of a pattern in the dictionary, it is marked as a duplicate pattern. When the sliding window scans a duplicate data sequence, a data tag for that sequence is generated for subsequent replacement operations. Once a data sequence is found to match a pattern in the dictionary during the sliding window scan, the system identifies the duplicate pattern and generates metadata for that pattern. This metadata includes information such as the start position and length of the data sequence. A dictionary lookup algorithm compares the scanned duplicate sequences with the dictionary. If a match is found, the metadata for that sequence is extracted. The duplicate pattern can be of fixed or variable length, depending on the sliding window settings and the dictionary contents. Based on the duplicate pattern of the data sequence, corresponding reference pointers are extracted from the initialization dictionary. These pointers point to the duplicate data patterns in the dictionary, allowing direct replacement of duplicate parts in the file, thus achieving compression. When extracting pointers to duplicate patterns, these pointers are associated with position indices in the dictionary. Each duplicate data sequence has a corresponding dictionary index position (i.e., a dictionary reference pointer). Reference pointers are typically short integer values ​​representing the position and length of duplicate data within a dictionary. Using dictionary reference pointers to replace duplicate data sequences significantly reduces storage space by replacing the original data sequence with dictionary references. Each matching duplicate sequence is replaced with a dictionary reference pointer, compressing the originally large amount of duplicate data into smaller pointer data. The replaced data sequence typically consists of reference pointers and a small amount of non-repeating data, resulting in significant compression.After all duplicate data sequences have been replaced, the replaced data sequences are merged to generate the final compressed file chunks. These chunks are stored using lossless compression to ensure that the file content is not lost or corrupted. The merging operation typically involves summarizing the individual compressed data chunks to generate a complete compressed data structure. The compressed data chunks can be stored in various formats (such as ZIP, GZIP, etc.).

[0104] As an example of the present invention, reference is made to... Figure 3 As shown, step S3 in this example includes:

[0105] Step S31: Extract the key sending device address information from the encrypted key to be copied to obtain sending address information data, wherein the key sending device address information extraction includes IP address extraction, MAC address extraction and device identifier extraction;

[0106] Step S32: Based on the key sending device address information data, make a communication request to obtain the encrypted key to be copied to obtain the receiving address information data; perform address pairing verification on the sending address information data and the receiving address information data through a preset whitelist to generate a two-way address confirmation result;

[0107] Step S33: Using the bidirectional address confirmation result, the copy file key and the received address information data are used to perform key address matching and verification. When the key verification is successful, the encrypted file to be copied is transmitted in a multi-layer asynchronous file cloning manner by sending address information data to generate file cloning transmission data.

[0108] Step S34: If key verification fails, return an error message and terminate the subsequent transmission process.

[0109] In this embodiment of the invention, the IP address is extracted from the network data packets of the key sending device via a network protocol (such as TCP / IP). This address is used to identify the location of the sending device in the network. The IP address of the sending device is obtained by parsing the source IP field in the packet header. The MAC address of the sending device is extracted from the data link layer. The MAC address is the device's hardware identifier and is unique within a local area network (LAN). The physical address of the device is read through the network interface or the MAC address is obtained from the ARP table. Unique identifiers related to the device (such as the device's serial number or hardware ID) are extracted to further enhance device identification and verification. The unique identifier of the device can be obtained by querying the device management interface or a preset configuration file. Based on the address information of the sending device, a key transmission request is sent to the receiving device. The legitimacy of the receiving device is confirmed by the IP, MAC address, and device identifier of the sending device. A key transmission request message carrying the address information of the sending device is sent to the receiving device via a network protocol (such as HTTP or TCP). The legitimacy of the address information of the sending device and the receiving device is verified according to preset whitelist rules. The address information of the sending device and the receiving device is compared with known address data in the whitelist. If the addresses of two devices match in the whitelist, they are considered trusted devices, and communication is allowed to continue; otherwise, communication will be rejected. A verification process is performed using the confirmed key and the receiving device's address information. This verification aims to ensure the security of the key and the correct association between the key and the receiving device. The verification steps include comparing the receiving device's address with relevant information in the key to ensure the key points to the correct receiving address. A multi-layer asynchronous transmission method is used to divide the encrypted file into multiple parts for parallel transmission. Each layer of transmission is processed independently, thereby improving the efficiency and stability of data transmission. The encrypted file is divided into multiple small blocks. Multiple data blocks are transmitted asynchronously simultaneously, allowing the receiving device to process each data block independently while receiving data, improving the data transmission rate. File cloning transmission is the process of copying and transferring the file content, ensuring file consistency across multiple devices. When key verification fails, the system automatically returns an error message, informing the user that key verification failed and data transmission is impossible. The system generates error messages indicating the reason for the verification failure, such as "key does not match receiving device address" or "invalid key." Once key verification fails, all subsequent file transmission operations immediately stop. At this point, file cloning and transfer or other related operations will not be performed to protect data security. The system automatically terminates the file transfer process through security mechanisms and clears all unfinished transfer tasks.

[0110] Preferably, step S33 includes the following steps:

[0111] Step S331: Using the bidirectional address confirmation result, the copy file key and the received address information data are used to perform key address matching and verification. When the key verification is successful, the encrypted file to be copied is confirmed by sending address information data to obtain the copy transmission method. The copy transmission method includes local area network transmission, USB transmission and Bluetooth transmission.

[0112] Step S332: If the copy transmission method is confirmed to be LAN transmission, then the encrypted file to be copied is transmitted in a multi-threaded dynamic window based on UDP+FEC to generate a LAN transmission protocol; the encrypted file to be copied is transmitted in file chunks in parallel based on the LAN transmission protocol to generate file chunk parallel transmission data.

[0113] Step S333: Perform network transmission rate sensing on the file block parallel transmission data to obtain network transmission rate data; compare the network transmission rate with the preset standard transmission rate threshold; when the network transmission rate data is less than the preset standard transmission rate threshold, resume the corresponding file block parallel transmission data from the breakpoint and generate local area network transmission file clone data.

[0114] Step S334: If the copy transfer method is confirmed to be USB transfer, then the encrypted file to be copied is split and merged to generate a USB transfer strategy; based on the USB transfer strategy, the encrypted file to be copied is optimized for batch transfer to generate USB transfer file clone data.

[0115] Step S335: If the copy transmission method is confirmed to be Bluetooth transmission, the encrypted file to be copied is distributed in a low-power, short-range, multi-point manner to generate Bluetooth transmission file clone data; the local area network transmission file clone data, USB transmission file clone data and Bluetooth transmission file clone data are integrated to generate file clone transmission data.

[0116] In this embodiment of the invention, the file copying key is matched and verified with the receiving address information data using a two-way address confirmation result. Upon successful verification, the receiving address of the file is confirmed. After successful key verification, the copy transmission method is confirmed based on the receiving address information data, selecting LAN transmission, USB transmission, or Bluetooth transmission. If the copy transmission method is LAN transmission, the UDP+FEC (Forward Error Correction) protocol is used to implement multi-threaded dynamic window transmission of the encrypted file. Based on the LAN transmission protocol, the encrypted file is divided into multiple data blocks for parallel transmission, generating file block parallel transmission data, which improves transmission speed and data integrity. During the file block parallel transmission process, the network transmission rate is monitored in real time to obtain network transmission rate data. The real-time network transmission rate is compared with a preset standard transmission rate threshold. If the network rate is lower than the standard threshold, a breakpoint resumption mechanism is initiated, and the corresponding file blocks are retransmitted, thereby generating LAN transmission file clone data. If USB transmission is confirmed, the encrypted file is fragmented into multiple smaller files, which are then merged at the receiving end. This process generates the USB transmission strategy. Based on the USB transfer strategy, batch transfer optimization is performed to improve USB transfer efficiency and generate USB file clone data. If Bluetooth transfer is confirmed, Bluetooth Low Energy (BLE) technology is used for short-range, multi-point distribution. This method can complete the transfer of encrypted files with low battery consumption, generating Bluetooth file clone data. File clone data from different transfer methods (LAN, USB, Bluetooth) are integrated to finally generate unified file clone transfer data. This data will ensure the complete transfer and copying of files according to different transfer methods.

[0117] Preferably, when the copy transmission method is confirmed to be Bluetooth transmission, the low-power, short-range, multi-point distribution of the encrypted file to be copied includes:

[0118] Once it is confirmed that the copy transmission method is Bluetooth transmission, the encrypted file to be copied is scanned for available devices in the Bluetooth network to obtain Bluetooth target device data; a multi-point device Bluetooth distribution connection is established for the Bluetooth target device data in low power mode, generating Bluetooth distribution connection data;

[0119] The encrypted file to be copied is divided into blocks based on the Bluetooth distribution connection data, and the blocks are then transmitted to the Bluetooth target device sequentially via Bluetooth connection to obtain Bluetooth block transmission data. The Bluetooth target device data is then subjected to block integrity verification based on the Bluetooth block transmission data to generate Bluetooth transmission file clone data.

[0120] In this embodiment of the invention, upon confirming that the copy transmission method is Bluetooth, a Bluetooth scanning program is first initiated to scan for available devices within the Bluetooth network range. The scan results generate a Bluetooth target device dataset containing all target devices capable of receiving files. Bluetooth Low Energy (BLE) mode is employed to ensure stable connections without excessive power consumption. This mode reduces power consumption between devices while improving connection range and stability. Using the scanned Bluetooth target device data, connections are established with multiple target devices via Bluetooth Low Energy technology. This step generates Bluetooth distribution connection data, ensuring that files can be transmitted to multiple target devices simultaneously. Based on the Bluetooth distribution connection data, the encrypted file to be copied is segmented. The file is cut into appropriately sized blocks to suit Bluetooth transmission characteristics. The segmented file is then transmitted sequentially to each Bluetooth target device via Bluetooth connection. Each file block is sent to the corresponding target device, generating Bluetooth segmented transmission data. During the file segmented transmission process, the receiving device performs integrity verification on each received file block, ensuring that each block is not lost or corrupted during transmission. Once all file chunks have been successfully transmitted and verified via Bluetooth, Bluetooth file clone data is generated. This data contains copies of the successfully transmitted files, available for use by the target device. Depending on network conditions or the target device's receiving capabilities, optimizations can be made during Bluetooth transmission, such as adjusting packet size or retransmitting lost file chunks. If transmission is interrupted, a resume mechanism can be used to continue transmitting unfinished file chunks, ensuring the file is ultimately transmitted completely.

[0121] Preferably, step S4 includes the following steps:

[0122] Step S41: Use file cloning to transfer data to receive the encrypted file to be copied, and obtain the encrypted received file;

[0123] Step S42: Reassemble the encrypted received file into data blocks to generate reassembled received file data blocks; verify the data decryption key on the reassembled received file data blocks to generate data decryption key verification results;

[0124] Step S43: Decrypt the encrypted received file according to the data decryption key verification result to generate the original file to be copied, so as to complete the fast file copying operation within the file system.

[0125] In this embodiment of the invention, after receiving file clone data transmitted via multiple transmission methods (such as Bluetooth, LAN, USB, etc.), the system first uses the file clone transmission data to receive the encrypted file to be copied. This file clone data contains all file blocks and transmission metadata, ensuring that the file can be transmitted completely to the receiving end. By cloning the transmission data, all file blocks are reassembled into a complete encrypted file, ultimately resulting in the encrypted received file. Based on the received file clone data, the system reassembles the data blocks of the encrypted received file. The reassembly process involves reassembling the file blocks in the correct order to restore a complete file structure. This ensures that all transmitted data blocks are combined in the correct order to reconstruct the complete encrypted file. The reassembled received file data blocks undergo data decryption key verification. This verification process ensures that the key used is consistent with the key used to encrypt the file and that the file transmission has not been tampered with or damaged. After successful verification, the system generates a data decryption key verification result. Based on the data decryption key verification result, if the verification is successful, the system uses the correct decryption key to decrypt the encrypted received file. The decryption algorithm ensures that the encrypted file is restored to its original state, removing all protective measures taken during the encryption process. After decryption, the system will recover the original file to be copied. This file can be used for further processing within the file system, such as storage and operation, to complete the file copying operation.

[0126] This specification provides a system for fast file copying within a file system, used to execute the aforementioned method for fast file copying within a file system. This system includes:

[0127] The data collection module is used to acquire the file to be copied; extract program information from the file to be copied to obtain the file information data; and perform data preprocessing on the file information data to be copied to generate standard file information data to be copied.

[0128] The data compression and encryption module is used to compress the file to be copied based on the standard file information data to generate a compressed file to be copied; and to encrypt the file to be copied using AES-128 to generate an encrypted file to be copied and a copy file key.

[0129] The data transmission module is used to perform bidirectional address confirmation on the encrypted key to be copied to obtain send address information data and receive address information data; it uses the copy file key to verify the receive address information data; when the key verification is successful, it performs file cloning and transmission on the encrypted file to be copied through the send address information data, generating file cloning and transmission data.

[0130] The data recovery module is used to receive encrypted files to be copied by using file cloning to transfer data, and obtain encrypted received files; it then recovers and verifies the data information of the encrypted received files in order to perform a fast file copy operation within the file system.

[0131] The beneficial effects of this invention lie in its ability to accurately acquire the file to be copied through the data collection module and extract program information, ensuring that all key information of the file to be copied can be extracted and converted into a processable standard format. Data preprocessing, by generating standard file information data to be copied, ensures data uniformity and consistency, enabling subsequent processing and operations to proceed smoothly and improving the reliability of the file copying process. In the data compression and encryption module, the file to be copied is compressed, effectively reducing file size and improving transmission efficiency. AES-128 encryption also ensures file security during transmission. Encryption guarantees the confidentiality and integrity of the file, avoiding the risk of data leakage or tampering. The generation and management of the encrypted file and key ensure that only authorized users can access the file, improving the security of data transmission and storage. The data transmission module ensures a valid connection between the communicating parties through bidirectional address confirmation and performs key verification on the receiving address information. This step ensures that only the verified receiver can receive data, thereby preventing unauthorized reception and data leakage. The file cloning transmission technology used during file transmission ensures efficient and secure file transmission in various transmission environments, improving overall transmission efficiency and reliability. The data recovery module receives and decrypts transmitted data, enabling rapid file recovery while verifying the data to ensure its integrity and consistency. In the fast copy operation, the file recovery process is optimized, shortening recovery time and improving accuracy. The fast file copy operation within the file system, through effective data recovery support, guarantees the usability and correctness of recovered files, improving overall system performance, especially significantly increasing efficiency in large-scale file processing and backup tasks. Therefore, this invention improves the efficiency and security of fast copying within the file system through data preprocessing, encryption verification, bidirectional address confirmation, and file cloning transmission.

[0132] Therefore, the embodiments should be considered as exemplary and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of the equivalents of the application are intended to be included within the invention.

[0133] The above description is merely a specific embodiment of the present invention, enabling those skilled in the art to understand or implement the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the present invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features of the invention herein.

Claims

1. A method for fast file copying within a file system, characterized in that, Includes the following steps: Step S1: Obtain the file to be copied; Extract program information from the file to be copied to obtain file information data; preprocess the file to be copied based on the file information data to generate standard file information data to be copied. Step S2: Compress the file to be copied according to the standard file information data to generate a compressed file to be copied; Encrypt the file to be copied using AES-128, and generate the encrypted file to be copied and the copy key; Step S3: Perform bidirectional address verification on the encrypted key to be copied to obtain send address information data and receive address information data; use the copy file key to verify the receive address information data. When the key verification is successful, perform file cloning and transmission on the encrypted file to be copied through the send address information data to generate file cloning and transmission data. Step S4: Use file cloning to transfer data to receive the encrypted file to be copied, and obtain the encrypted received file; The encrypted received file is recovered and verified to perform a fast file copy operation within the file system.

2. The method for fast file copying within a file system according to claim 1, characterized in that, Step S1 includes the following steps: Step S11: Obtain the file to be copied; Step S12: Extract file program information from the file to be copied to obtain file program information data. The file program information extraction includes file name extraction, size extraction, type extraction, path extraction, and program dependency extraction. Step S13: Based on the file program information data, unify the data format of the file to be copied to generate a file to be copied in a unified format; remove redundant and duplicate data from the file to be copied in the unified format to obtain a valid file to be copied; Step S14: Perform file dependency resolution and marking on the valid files to be copied, thereby generating file resource marking data; use the file resource marking data to organize the file content of the valid files to be copied, and generate standard file information data to be copied.

3. The method for fast file copying within a file system according to claim 2, characterized in that, File dependency resolution and marking for valid files to be copied includes: Extract file metadata from valid files to be copied to obtain file metadata; use the file metadata to resolve file dependencies of valid files to be copied and generate file dependency data; Based on file dependency data, file metadata is associated with resource tags to obtain associated resource tag data; based on the associated resource tag data, file resource paths of valid files to be copied are mapped to generate file resource path mapping data. File resource tagging data is generated by tagging and integrating associated resource tagging data through file resource path mapping data.

4. The method for fast file copying within a file system according to claim 1, characterized in that, Step S2 includes the following steps: Step S21: Divide the file to be copied into data blocks according to the standard file information data to generate file block data to be copied; perform lossless dictionary compression on the file to be copied based on the file block data to generate compressed file block data to be copied. Step S22: Perform block verification on the compressed file to be copied to generate compressed file integrity verification data; Step S23: Based on the integrity verification data of the compressed file, perform AES-128 data encryption on the compressed file block data to be copied to generate encrypted file block data to be copied; Step S24: Integrate the encrypted block data of the file to be copied to generate an encrypted file to be copied, and perform a decryption simulation on the encrypted file to be copied to generate a copy file key.

5. The method for fast file copying within a file system according to claim 4, characterized in that, Lossless dictionary compression of the file to be copied, based on its block-based data, includes: Based on the block data of the file to be copied, a unique identifier is used to mark the block of the file to be copied, resulting in a marked data block of the file to be copied. An initialization dictionary is constructed using a preset memory space. The initialization dictionary is used to perform a sliding window scan on the data blocks marked in the file to be copied. When a duplicate data sequence is found in the data block, the duplicate pattern is identified on the corresponding data block marked in the file to be copied to obtain the duplicate pattern of the data sequence. The dictionary reference pointer is extracted from the initial dictionary based on the repetition pattern of the data sequence. The dictionary reference pointer is then used to replace the repetitive data sequences in the data block, thereby generating the replaced data sequence. The replaced data sequence is then used to merge and compress the marked data blocks of the file to be copied, thereby generating the compressed block data of the file to be copied.

6. The method for fast file copying within a file system according to claim 1, characterized in that, Step S3 includes the following steps: Step S31: Extract the key sending device address information from the encrypted key to be copied to obtain sending address information data, wherein the key sending device address information extraction includes IP address extraction, MAC address extraction and device identifier extraction; Step S32: Based on the key sending device address information data, make a communication request to obtain the encrypted key to be copied to obtain the receiving address information data; perform address pairing verification on the sending address information data and the receiving address information data through a preset whitelist to generate a two-way address confirmation result; Step S33: Using the bidirectional address confirmation result, the copy file key and the received address information data are used to perform key address matching and verification. When the key verification is successful, the encrypted file to be copied is transmitted in a multi-layer asynchronous file cloning manner by sending address information data to generate file cloning transmission data. Step S34: If key verification fails, return an error message and terminate the subsequent transmission process.

7. The method for fast file copying within a file system according to claim 6, characterized in that, Step S33 includes the following steps: Step S331: Using the bidirectional address confirmation result, the copy file key and the received address information data are used to perform key address matching and verification. When the key verification is successful, the encrypted file to be copied is confirmed by sending address information data to obtain the copy transmission method. The copy transmission method includes local area network transmission, USB transmission and Bluetooth transmission. Step S332: If the copy transmission method is confirmed to be LAN transmission, then the encrypted file to be copied is transmitted in a multi-threaded dynamic window based on UDP+FEC to generate a LAN transmission protocol; the encrypted file to be copied is transmitted in file chunks in parallel based on the LAN transmission protocol to generate file chunk parallel transmission data. Step S333: Perform network transmission rate sensing on the file block parallel transmission data to obtain network transmission rate data; compare the network transmission rate with the preset standard transmission rate threshold; when the network transmission rate data is less than the preset standard transmission rate threshold, resume the corresponding file block parallel transmission data from the breakpoint and generate local area network transmission file clone data. Step S334: If the copy transfer method is confirmed to be USB transfer, then the encrypted file to be copied is split and merged to generate a USB transfer strategy; based on the USB transfer strategy, the encrypted file to be copied is optimized for batch transfer to generate USB transfer file clone data. Step S335: If the copy transmission method is confirmed to be Bluetooth transmission, the encrypted file to be copied is distributed in a low-power, short-range, multi-point manner to generate Bluetooth transmission file clone data; the local area network transmission file clone data, USB transmission file clone data and Bluetooth transmission file clone data are integrated to generate file clone transmission data.

8. The method for fast file copying within a file system according to claim 7, characterized in that, If the copy transmission method is confirmed to be Bluetooth, then the encrypted file to be copied will be distributed in a low-power, short-range, multi-point manner, including: Once it is confirmed that the copy transmission method is Bluetooth transmission, the encrypted file to be copied is scanned for available devices in the Bluetooth network to obtain Bluetooth target device data; a multi-point device Bluetooth distribution connection is established for the Bluetooth target device data in low power mode, generating Bluetooth distribution connection data; The encrypted file to be copied is divided into blocks based on the Bluetooth distribution connection data, and the blocks are then transmitted to the Bluetooth target device sequentially via Bluetooth connection to obtain Bluetooth block transmission data. The Bluetooth target device data is then subjected to block integrity verification based on the Bluetooth block transmission data to generate Bluetooth transmission file clone data.

9. The method for fast file copying within a file system according to claim 1, characterized in that, Step S4 includes the following steps: Step S41: Use file cloning to transfer data to receive the encrypted file to be copied, and obtain the encrypted received file; Step S42: Reassemble the encrypted received file into data blocks to generate reassembled received file data blocks; verify the data decryption key on the reassembled received file data blocks to generate data decryption key verification results; Step S43: Decrypt the encrypted received file according to the data decryption key verification result to generate the original file to be copied, so as to complete the fast file copying operation within the file system.

10. A system for fast file copying within a file system, characterized in that, For performing the fast file copying method applied to the internal file system as described in claim 1, the fast file copying system applied to the internal file system includes: The data collection module is used to acquire the file to be copied; extract program information from the file to be copied to obtain the file information data; and perform data preprocessing on the file information data to be copied to generate standard file information data to be copied. The data compression and encryption module is used to compress the file to be copied based on the standard file information data to generate a compressed file to be copied; and to encrypt the file to be copied using AES-128 to generate an encrypted file to be copied and a copy file key. The data transmission module is used to perform bidirectional address confirmation on the encrypted key to be copied to obtain send address information data and receive address information data; it uses the copy file key to verify the receive address information data; when the key verification is successful, it performs file cloning and transmission on the encrypted file to be copied through the send address information data, generating file cloning and transmission data. The data recovery module is used to receive encrypted files to be copied by using file cloning to transfer data, and obtain encrypted received files; it then recovers and verifies the data information of the encrypted received files in order to perform a fast file copy operation within the file system.

Citation Information

Patent Citations

  • Method for adaptively processing downloaded file by cloud server and corresponding server

    CN114884938A

  • Digital rights management engine systems and methods

    US20070185814A1