A digital cinema network transmission system and method based on local compression

By performing partial compression and two-way authentication on small files in the DCP packet, the problems of low transmission efficiency and insufficient security in the existing technology are solved, and efficient and secure digital movie packet download is achieved.

CN122248071APending Publication Date: 2026-06-19CFGDC (BEIJING) TECHNOLOGY CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CFGDC (BEIJING) TECHNOLOGY CO LTD
Filing Date
2026-02-04
Publication Date
2026-06-19

AI Technical Summary

Technical Problem

The existing digital cinema package (DCP) network transmission method has shortcomings in terms of security and efficiency. In particular, the transmission of small files leads to waste of network resources and network congestion, making it difficult to meet the high-efficiency download needs of cinemas.

Method used

Local compression technology is used to filter and compress small files in the DCP package to generate a local compressed package. Encrypted communication is achieved through a two-way authentication module, and the terminal processing module performs hash verification and path restoration to ensure the security and efficiency of download and decompression.

Benefits of technology

It improves the efficiency of digital cinema network transmission, reduces the number of connection requests for small files, lowers network congestion and retransmission probability, ensures file integrity and security, and meets the high-efficiency download requirements of cinemas.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122248071A_ABST
    Figure CN122248071A_ABST
Patent Text Reader

Abstract

This application discloses a digital cinema network transmission system and method based on local compression, relating to the field of network transmission. The platform's film library server acquires the original DCP packets; a preprocessing module verifies and filters the original DCP packets, performs local compression on the filtered small files, and integrates the compressed packets with the original DCP packets into a single directory; a two-way authentication module implements two-way authenticated encrypted communication between the preprocessing module and the terminal processing module; the terminal processing module receives metadata and the processed DCP packets, performs hash verification, and uses the ZSTD decompression algorithm to restore the path and verify the files, thereby enabling the download and decompression of the DCP packets. This application can improve the transmission efficiency of digital cinema network transmission.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of network transmission, and in particular to a digital cinema network transmission system and method based on local compression. Background Technology

[0002] With the continuous improvement and optimization of network infrastructure, broadband download speeds have been significantly enhanced, and the network transmission of Digital Cinema Packages (DCPs) has gradually become popular. How to securely and efficiently distribute DCPs to cinemas has become a real pain point and a hot topic.

[0003] DCP packets adhere to the SMPTE (Society of Motion Picture and Television Engineers) standard. Even minor damage or loss can render the film unplayable, resulting in significant financial losses. Therefore, security requires ensuring that no files are lost or corrupted after the DCP packet transmission is complete.

[0004] After the DCP packet is successfully downloaded to the cinema, the cinema needs to perform a series of operations such as distributing the DCP to the equipment in each theater and scheduling screenings. Therefore, it is important to download the DCP packet to the cinema as early as possible. Efficiency means improving the DCP transmission speed and reducing transmission time.

[0005] Currently, common DCP network transmission methods include full compression and uncompressed transmission. Full compression creates a compressed DCP packet, which has the advantage of utilizing the bandwidth advantage of continuous transmission, resulting in fast overall transmission speed. However, it's difficult to repair problems encountered during download or after completion, and re-downloading wastes time and network resources. Uncompressed transmission directly sends the DCP packet's file structure and files sequentially or in batches to the cinema. Its advantage is that if problems occur during download, the problematic files can be deleted and re-downloaded, saving time and network resources compared to re-downloading the entire packet. However, if the DCP packet contains many small files such as subtitles and images, the download will frequently initiate TCP (Transmission Control Protocol, a connection-oriented, reliable byte stream protocol) / UDP (User Datagram Protocol, a connectionless, unreliable datagram protocol) connection establishment and release operations, consuming socket resources on both the terminal and server. The random I / O characteristics of small files make it difficult to utilize the bandwidth advantage of continuous transmission, and multiple concurrent short connection requests can easily cause network congestion, further increasing the probability of data retransmission. Summary of the Invention

[0006] The purpose of this application is to provide a digital cinema network transmission system and method based on local compression, which can improve the transmission efficiency of digital cinema network transmission.

[0007] To achieve the above objectives, this application provides the following solution: In a first aspect, this application provides a digital cinema network transmission system based on local compression, including: a platform film library server, a preprocessing module, a two-way authentication module, and a terminal processing module; The preprocessing module is connected to the platform's image library server; the two-way authentication module is connected to the preprocessing module; the terminal processing module is connected to the two-way authentication module. The platform's chip library server is used to obtain the original DCP packets; The preprocessing module is used to verify and filter the original DCP package, perform local compression on the filtered small files, and integrate the compressed package with the original DCP package to obtain the processed DCP package; the small files are files with a size smaller than a set threshold; wherein, the local compression process involves marking the status of the filtered small files in the metadata database to obtain marked files, and then using the ZSTD algorithm to package and compress the marked files; The two-way authentication module is used to implement two-way authentication encrypted communication between the preprocessing module and the terminal processing module based on WebSocket. The terminal processing module is used to receive metadata and the processed DCP packet, perform hash verification, and use the ZSTD decompression algorithm to restore the path and verify the files in order to download and decompress the DCP packet. The metadata includes ordinary metadata and partially compressed metadata. The ordinary metadata contains all file information in the original DCP packet. The partially compressed metadata includes file information that has not been marked with a status and compressed packet information corresponding to the processed DCP packet. The compressed packet information includes: name, path, file list, and SHA-1 value.

[0008] In one embodiment, the digital cinema network transmission system based on local compression further includes: a CDN preheating module; The CDN preheating module is connected to both the preprocessing module and the terminal processing module. The CDN preheating module is used to preheat the processed DCP packets and transmit them to the terminal processing module.

[0009] In one embodiment, the digital cinema network transmission system based on local compression further includes: a metadata management module; The metadata management module is connected to the preprocessing module and the two-way authentication module, respectively. The metadata management module is used to store the metadata.

[0010] In one embodiment, the two-way authentication module establishes a communication channel using a two-way authentication method involving device certificates and platform certificates.

[0011] In one embodiment, the terminal processing module includes: a download module, a restore module, and a verification module; The download module is connected to both the CDN preheating module and the two-way authentication module; the restore module and the verification module are both connected to the two-way authentication module. The download module is used to download the processed DCP package and perform hash verification based on the metadata; The restoration module is used to perform path restoration and file verification using the ZSTD decompression algorithm; The verification module is used to perform verification based on the SMPTE standard. If the verification is successful, the DCP package is considered to have been successfully downloaded and decompressed.

[0012] In one embodiment, the preprocessing module uses the inotify mechanism to monitor the upload directory of the original DCP package in real time and verifies the original DCP package according to the SMPTE standard.

[0013] Secondly, this application provides a digital cinema network transmission method based on local compression, wherein the digital cinema network transmission method based on local compression is implemented using the aforementioned digital cinema network transmission system based on local compression; the digital cinema network transmission method based on local compression includes: Obtain the original DCP packet; The original DCP package is verified and filtered, and the filtered small files are partially compressed. The compressed package is then integrated with the original DCP package to obtain the processed DCP package. The small files are those with a size less than a set threshold. The partial compression process involves marking the status of the filtered small files in the metadata database to obtain marked files, and then using the ZSTD algorithm to package and compress the marked files. The DCP package is downloaded and decompressed by performing hash verification based on the metadata and the processed DCP package, and by using the ZSTD decompression algorithm to restore the path and verify the files. The metadata includes ordinary metadata and partially compressed metadata. The ordinary metadata contains all file information in the original DCP package. The partially compressed metadata includes file information that has not been marked with a status and compressed package information corresponding to the processed DCP package. The compressed package information includes: name, path, file list and SHA-1 value.

[0014] In one embodiment, the ZSTD algorithm is used to package and compress the marker file, specifically including: Obtain the list of paths to the marked files and the DCP directory corresponding to the original DCP package; The compression tool is initialized; specifically, a custom dictionary is read from dcp_custom_dict, a ZstdCompression Dict object is created, and the compression level is adjusted according to the number of small files in the marked file. The file list in the DCP directory is traversed to generate file path index information and determine compression information; the compression information includes: version number, path index SHA-1 value, and path index length; Based on the compression tool after initialization, Zstd Compressor is used to package and compress the marked files in blocks.

[0015] In one embodiment, the ZSTD decompression algorithm is used for path restoration and file verification to achieve the download and decompression of the DCP package, specifically including: The decompression tool is initialized; specifically, a custom dictionary is read from dcp_custom_dict, and a Zstd Decompressor object is created. Read the compressed information, and read the path index according to the path index length to determine the corresponding path index SHA-1 value, and compare and verify it with the path and SHA-1 value read from the compressed package information; If the verification fails, an exception will be thrown and an error will be reported; If the verification passes, the CRC32 value at the end of the compressed information is read, the CRC32 value of all compressed information except the CRC32 value at the end is calculated, and the CRC32 value is compared with the CRC32 value read from the compressed package information. If the verification fails, an exception is thrown and an error is reported. If the verification passes, path index parsing is performed to extract file information and the relative path information between the file and the DCP directory. The directory structure is determined based on the file information and the relative path information; The starting position of the compressed data area is determined based on the directory structure to achieve the positioning of the compressed data area; The Zstd Decompressor object performs a one-time decompression based on the starting position and splits the DCP package based on the file path index information to achieve decompression and restoration.

[0016] In one embodiment, the method for determining the dedicated dictionary specifically includes: Obtain the training dataset; the training dataset includes: training samples and the paths corresponding to the training samples; the training samples are the small files; Using the train_dictionary method of the Python 3 ZSTD library, based on the training dataset, and with the target size of the target dictionary as the objective, a preset initial trainer is trained, and the trained ZSTD compressed dictionary is output. The trained ZSTD compressed dictionary is saved in binary form to the dcp_custom_dict file to obtain a custom dictionary.

[0017] According to the specific embodiments provided in this application, the following technical effects are disclosed: This application provides a digital cinema network transmission system and method based on partial compression. The platform's film library server obtains the original DCP packets; a preprocessing module verifies and filters the original DCP packets, performs partial compression on the filtered small files, and integrates the compressed package with the original DCP packets into a single directory; a two-way authentication module enables two-way authenticated encrypted communication between the preprocessing module and the terminal processing module; the terminal processing module receives metadata and the processed DCP packets, performs hash verification, and uses the ZSTD decompression algorithm for path restoration and file verification to achieve the download and decompression of the DCP packets. This application filters small files in the original DCP packets that meet a preset size threshold and performs partial compression on them—that is, it uniformly compresses and integrates them into a single compressed file. This simplifies what would have been hundreds or thousands of small file connection requests into a single or a few large file connection transmissions. Furthermore, based on the encrypted communication of the two-way authentication module and the hash verification, path restoration, and file verification of the terminal processing module, a balance is found between security and efficiency requirements to achieve network transmission of cinema digital cinema packets, thereby improving the transmission efficiency of digital cinema network transmission. Attached Figure Description

[0018] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0019] Figure 1 This is a structural diagram of a digital cinema network transmission system based on local compression; Figure 2 This is a schematic diagram of the system architecture of a digital cinema network transmission system based on local compression in a practical application. Figure 3A flowchart illustrating the process of generating a custom dictionary; Figure 4 This is a schematic diagram of the ZSTD compression process; Figure 5 This is a schematic diagram of the ZSTD decompression process; Figure 6 This is a flowchart of a digital cinema network transmission method based on local compression. Detailed Implementation

[0020] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0021] Based on this, this application filters small files in the DCP that meet a preset size threshold, compresses and integrates them into a single compressed file, simplifying what would have been hundreds or thousands of small file connection requests into a single or a few large file connection transmissions. This achieves a balance between security and efficiency, enabling network transmission of cinema digital cinema packages.

[0022] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0023] In one exemplary embodiment, such as Figure 1 As shown, a digital cinema network transmission system based on local compression is provided, including: a platform film library server, a preprocessing module, a two-way authentication module, and a terminal processing module.

[0024] The preprocessing module is connected to the platform's image library server; the two-way authentication module is connected to the preprocessing module; and the terminal processing module is connected to the two-way authentication module.

[0025] The platform's chip library server is used to obtain the original DCP packages; the preprocessing module is used to verify and filter the original DCP packages, and to perform local compression on the filtered small files. The compressed package is then integrated with the original DCP package to obtain the processed DCP package. The small files are those with a size smaller than a set threshold. The local compression process involves marking the status of the filtered small files in the metadata database to obtain marked files, and then using the ZSTD algorithm to package and compress the marked files.

[0026] The preprocessing module uses the inotify mechanism to monitor the upload directory of the original DCP package in real time and verifies the original DCP package according to the SMPTE standard.

[0027] The two-way authentication module is used to implement two-way authenticated encrypted communication between the preprocessing module and the terminal processing module based on WebSocket.

[0028] The two-way authentication module establishes a communication channel using a two-way authentication method involving device certificates and platform certificates.

[0029] The terminal processing module receives metadata and the processed DCP packet, performs hash verification, and uses the ZSTD decompression algorithm to restore the path and verify the files to achieve the download and decompression of the DCP packet. The metadata includes ordinary metadata and partially compressed metadata. Ordinary metadata contains all file information in the original DCP packet. Partially compressed metadata includes file information that has not been marked with a status and the compressed packet information corresponding to the processed DCP packet. The compressed packet information includes: name, path, file list, and SHA-1 (Secure Hash Algorithm 1) value.

[0030] The terminal processing module includes a download module, a restore module, and a verification module. The download module is connected to both the CDN preheating module and the two-way authentication module. The restore module and the verification module are both connected to the two-way authentication module. The download module downloads the processed DCP package and performs hash verification based on metadata. The restore module uses the ZSTD decompression algorithm to restore the path and verify the file. The verification module performs verification based on the SMPTE standard. If the verification is successful, the DCP package is considered to have been successfully downloaded and decompressed.

[0031] The digital cinema network transmission system based on local compression also includes: a CDN preheating module; the CDN preheating module is connected to the preprocessing module and the terminal processing module respectively; the CDN preheating module is used to preheat the processed DCP packets and transmit them to the terminal processing module.

[0032] The digital cinema network transmission system based on local compression also includes: a metadata management module; the metadata management module is connected to the preprocessing module and the two-way authentication module respectively; the metadata management module is used to store metadata.

[0033] This application first categorizes the files in the DCP package, identifies small files that meet compression criteria, and then compresses these small files into a single compressed package. After being distributed to cinemas, the original DCP package content structure is restored. The purpose is to design a reasonable local compression strategy to ensure accurate path restoration after decompression; to construct a DCP directory structure consisting of the original files and the compressed package, minimizing modifications to the original DCP package for easier verification and troubleshooting later; to establish a metadata management mechanism that tags before packaging, clearly defining the metadata specifications of the processed DCP; and to standardize the decompression and restoration verification process to ensure the integrity and usability of the DCP.

[0034] In practical applications, the system mentioned in this application includes a preprocessing module, a metadata management module, a CDN preheating module, a two-way authentication communication module (two-way authentication module), and a terminal processing module. The system architecture is as follows: Figure 2 As shown.

[0035] Preprocessing module: File write detection. The inotify mechanism is used to monitor the DCP upload directory in real time. When the target folder stops writing for more than 2 minutes (configurable), the file import is considered complete, and the subsequent process is automatically triggered to avoid the misprocessing of files that have not been uploaded.

[0036] DCP packet integrity verification. The integrity of DCP packets is verified according to the SMPTE standard to ensure that file size and content are normal. The size, SHA-1 value, and relative path of each file are also calculated as a basis for subsequent verification.

[0037] File filtering and compression. Count the total number of DCP files. If there are 20 or fewer (threshold is configurable), they are marked as ordinary DCPs and no compression is performed. If there are more than 20, small files with a size of <5MB (threshold is configurable) and that are not core files are directly filtered.

[0038] The core files are AssetMap, PKL (Package List), CPL (Composition Playlist), VOLINDEX, and MXF (Material Exchange Format).

[0039] Threshold selection criteria: The 5MB threshold is determined based on the common size range of DCP small files (subtitles, fonts, configuration files). This covers most small files that need to optimize transmission efficiency (these files are mostly a few KB to a few MB), while avoiding an excessive number of compressed files and increased decompression overhead due to an excessively large threshold. It also supports flexible configuration according to actual application scenarios (such as different cinema bandwidths and file type distribution).

[0040] Partial compressed file processing procedure: Metadata tagging. Selected small files are marked as compressed in the metadata database, recording their original relative path, size, and SHA-1 value.

[0041] Compressed archive creation. The Zstandard (ZSTD) algorithm is used to package and compress the marked files. The compression process fully preserves the relative paths and directory structure of each file (e.g., the path to uuid1 / xxx1.png is completely consistent within the compressed archive). The compressed archive is named according to a special convention. The `dcp_local_compress[DCP unique identifier][timestamp].zst` (e.g., "dcp_local_compress_0a7dfbb4-2f00-4703-ad45-00fcc47f8fe2_202512171000.zst") ensures uniqueness and identifiability.

[0042] Directory consolidation. The completed compressed package is placed into the original DCP directory, forming the final structure of all original DCP files plus the local compressed package. This involves incremental modifications to the DCP directory, without deleting or modifying any original files, in order to minimize changes.

[0043] Metadata Management Module: Metadata is stored independently in a database without modifying DCP intrinsic files, such as PKL. The metadata should completely match the processed DCP and is divided into two categories: ordinary metadata and locally compressed metadata. The core structure is shown in Table 1.

[0044] Table 1 Metadata Types and Core Fields

[0045] Two-way authentication module: This system implements two-way authenticated encrypted communication using WebSocket. During communication, a secure channel is established through two-way authentication using both device and platform certificates. The platform sends DCP information metadata to the cinema terminal, which then downloads it and reports the download progress and results in real time.

[0046] The cinema terminal module (terminal processing module) includes a download module, a restore module, and a verification module.

[0047] After the terminal processing module establishes a connection with the platform, the platform sends out metadata; the download module downloads the corresponding file from the CDN based on the metadata (normal DCP downloads the entire file, compressed DCP downloads the uncompressed file + compressed package). The download process only performs basic size and hash verification to ensure file integrity.

[0048] The restoration module calls a customized ZSTD decompression algorithm to complete path restoration and file verification. Algorithm pre-verification: Based on an improved CRC32-SHA1 joint verification algorithm, it quickly verifies the integrity of the compressed package. Then, according to the preset DCP file path index area within the compressed package, it locates the original relative paths of each file and adopts a "batch parsing-layered decompression" strategy. First, it parses all file paths and builds a directory tree, then batch decompresses the files to their corresponding directories. After decompression, it compares the file SHA-1 values ​​with metadata to ensure the files are not corrupted.

[0049] Finally, after the entire download and decompression are completed, the verification module performs an overall verification according to the SMPTE standard. Once the verification is successful, the download is considered complete.

[0050] In one exemplary embodiment, a digital cinema network transmission method based on local compression is provided, wherein the digital cinema network transmission method based on local compression is implemented using the aforementioned digital cinema network transmission system based on local compression.

[0051] like Figure 6 As shown, the digital cinema network transmission method based on local compression includes: Step 100: Obtain the original DCP packet.

[0052] Step 200: Verify and filter the original DCP package, perform partial compression on the filtered small files, and integrate the compressed package with the original DCP package to obtain the processed DCP package. Small files are files with a size smaller than a set threshold; the partial compression process involves marking the status of the filtered small files in the metadata database to obtain marked files, and then using the ZSTD algorithm to package and compress the marked files.

[0053] Step 300: Perform hash verification based on the metadata and the processed DCP packet, and use the ZSTD decompression algorithm to restore the path and verify the files to achieve the download and decompression of the DCP packet. Metadata includes ordinary metadata and partially compressed metadata; ordinary metadata contains all file information from the original DCP packet; partially compressed metadata includes file information that has not been status-marked and the compressed packet information corresponding to the processed DCP packet; the compressed packet information includes: name, path, file list, and SHA-1 value.

[0054] Specifically, the ZSTD algorithm is used to package and compress the marker files, including: The process involves obtaining a list of paths to the marker files and the corresponding DCP directory for the original DCP package; initializing the compression tool; specifically, reading a custom dictionary from `dcp_custom_dict`, creating a `Zstd Compression Dict` object, and adjusting the compression level based on the number of small files in the marker files. The `Zstd Compression Dict` object is the core class in the ZSTD algorithm used for pre-trained dictionary compression, and its core function is to improve the compression ratio and speed of small data through a predefined compression dictionary.

[0055] The DCP directory's file list is traversed, file path index information is generated, and compression information is determined. This compression information includes: version number, path index SHA-1 value, and path index length. Based on the initialized compression tool, ZstdCompressor is used to package and compress the marked files in chunks.

[0056] In one embodiment, the ZSTD decompression algorithm is used for path restoration and file verification to achieve the download and decompression of the DCP package, specifically including: The decompression tool is initialized; specifically, a custom dictionary is read from `dcp_custom_dict`, and a `Zstd Decompressor` object is created. The compressed information is read, and the path index is read according to its length. The corresponding SHA-1 value of the path index is determined and compared with the path and SHA-1 value read from the compressed package information. If the verification fails, an exception is thrown and an error is reported. If the verification succeeds, the CRC32 value at the end of the compressed information is read, and the CRC32 value of all compressed information excluding the end CRC32 value is calculated and compared with the CRC32 value read from the compressed package information. If the verification fails, an exception is thrown and an error is reported. If the verification succeeds, path index parsing is performed to extract file information and the relative path information between the file and the DCP directory.

[0057] The directory structure is determined based on file information and relative path information; the starting position of the compressed data area is determined based on the directory structure to locate the compressed data area; the Zstd Decompressor object performs one-time decompression based on the starting position and splits the data based on the file path index information to achieve decompression and restoration of the DCP package.

[0058] The methods for determining the dedicated dictionary specifically include: Obtain the training dataset; the training dataset includes training samples and their corresponding paths; the training samples are the small files mentioned above. Using the `train_dictionary` method of the Python 3 ZSTD library, based on the training dataset and with a target dictionary size as the objective, train a preset initial trainer to output a trained ZSTD compressed dictionary. Save the trained ZSTD compressed dictionary in binary form to the `dcp_custom_dict` file to obtain a custom dictionary.

[0059] The core algorithm of this application is a customized ZSTD compression and decompression algorithm.

[0060] To address the byte distribution characteristics of small DCP files (mostly subtitles, fonts, and configuration files), the ZSTD algorithm dictionary generation strategy is optimized, and a 32MB dedicated dictionary is generated by pre-training with small file clusters.

[0061] The process of generating a custom dictionary is as follows: Figure 3 As shown. Initialize the trainer and set parameters. This mainly includes: setting a small file threshold, such as 5MB, and collecting files smaller than this threshold as training samples.

[0062] Set the dictionary size, such as 32MB, to balance compression effectiveness and memory usage. Specify the directory path where the training samples are located.

[0063] Sample file collection. Scan all files in the directory where the specified samples are located, select files whose size is less than or equal to a threshold as training samples, and record the paths of these files.

[0064] Construct the training dataset. Traverse the training sample paths and merge the contents of all files into a single training dataset byte stream.

[0065] Custom dictionary training. The custom dictionary is trained using training tools from the ZSTD library, such as the `train_dictionary` method in the Python 3 ZSTD library. The input is the training dataset and the target dictionary size; the output is the trained ZSTD compressed dictionary. The trained dictionary is then saved in binary form to a specified file, such as `dcp_custom_dict`. This application designs a five-layer structure for the custom compressed package, as shown in Table 2.

[0066] Table 2 Compressed Package Structure Table

[0067] Example of a path index data structure: { "relative_path / file1Name": { / / Relative path / filename of the file relative to the DCP directory_ "size": 12345 / / File size, in bytes }, "relative_path / file2Name":{ / / Relative path / filename of the file relative to the DCP directory "size": 67890 / / File size, in bytes } } The ZSTD compression process is as follows: Figure 4 As shown. Input the DCP directory and the set of marked small file paths. Input the DCP directory and the list of marked small file paths to be compressed as parameters.

[0068] Compression tool initialization. A custom dictionary is read from dcp_custom_dict, and a Zstd CompressionDict object is created. The compression level is dynamically adjusted based on the number of small files; for example, compression level 5 is selected if the number of files is greater than 50, and compression level 3 is selected if the number of files is ≤50.

[0069] Path index generation. Traverse the file list and generate file path index information for the compressed package.

[0070] Compression information construction. The following information is written in sequence at the beginning of the compressed file: version number, path index SHA-1, path index length, and path index.

[0071] Block compression writing. File data is compressed in blocks (1MB / block) using Zstd Compressor and written in a streaming manner. This improves efficiency while avoiding memory overflow.

[0072] The integrity feature value of the compressed file is calculated and written. The CRC32 value of the entire compressed file is calculated and appended to the end of the file. In this way, the integrity can be ensured by utilizing the built-in double check mechanism (SHA-1+CRC32) of the compressed file.

[0073] The ZSTD decompression process is as follows: Figure 5 As shown. Enter the path to the compressed file. After the compressed file has finished downloading, enter the compressed file path as a parameter.

[0074] The decompression tool is initialized. A custom dictionary is read from dcp_custom_dict, and a Zstd Decompressor object is created.

[0075] The compressed package undergoes a two-layer verification process. It reads the version number, path index SHA-1, and path index length. Then, based on the path index length, it reads the path index, calculates the path index SHA-1, and compares it with the path index read from the compressed package. If the verification fails, an exception is thrown and an error is reported. If the verification succeeds, it reads the CRC32 value at the end of the compressed package, calculates the CRC32 value of all compressed package data excluding the end CRC32 value, and compares it with the CRC32 value read from the compressed package. If the verification fails, an exception is thrown and an error is reported. If the verification succeeds, it proceeds to the next step.

[0076] Path index parsing. Parses the JSON-formatted path index to extract file size information and the relative path information between the file and the DCP directory.

[0077] Directory structure pre-creation. The parent directory structure for all files is created in batches to avoid directory creation conflicts during parallel writes.

[0078] Location of compressed data area. Calculate the starting position and size of the compressed data area to accurately read the compressed data.

[0079] Decompress and restore the files. Use ZstdDecompressor to decompress all data at once, split the compressed data according to the file size in the path index, and use a thread pool to write the data to the files in parallel.

[0080] The benefits of this application are: Transmission efficiency is improved. By filtering non-core small files using a dual threshold of file number (≤20 files) and size (<5MB), they are integrated into a single compressed package. This simplifies hundreds or thousands of connection requests into a few large file transfers. Combined with DCP's dedicated ZSTD dictionary for small files, the compression ratio is improved, network congestion and retransmission probability are reduced, and transmission time is shortened compared to existing technologies.

[0081] Security and integrity guaranteed. Adhering to SMPTE standards, the compressed file employs SHA-1+CRC32 dual verification and WebSocket two-way authentication encryption to ensure no file loss, damage, or leakage throughout the process, meeting the stringent requirements for theatrical screenings.

[0082] Practical and adaptable. It adopts an incremental structure of original files + compressed packages, without modifying core files, which facilitates troubleshooting; the threshold and compression level can be flexibly configured to adapt to different cinema bandwidths and terminal devices without the need for large-scale modifications to existing systems.

[0083] Accurate and efficient decompression and restoration. Through compressed package path indexing and a batch parsing-layered decompression strategy, accurate file path restoration is ensured. Combined with parallel writing via a thread pool, decompression speed is improved, and I / O blocking is avoided.

[0084] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0085] This document uses specific examples to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. Furthermore, those skilled in the art will recognize that, based on the ideas of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A digital cinema network transmission system based on local compression, characterized in that, include: The platform includes a video library server, a preprocessing module, a two-way authentication module, and a terminal processing module. The preprocessing module is connected to the platform's image library server; the two-way authentication module is connected to the preprocessing module; the terminal processing module is connected to the two-way authentication module. The platform's chip library server is used to obtain the original DCP packets; The preprocessing module is used to verify and filter the original DCP package, perform local compression on the filtered small files, and integrate the compressed package with the original DCP package to obtain the processed DCP package; the small files are files with a size smaller than a set threshold; wherein, the local compression process involves marking the status of the filtered small files in the metadata database to obtain marked files, and then using the ZSTD algorithm to package and compress the marked files; The two-way authentication module is used to implement two-way authentication encrypted communication between the preprocessing module and the terminal processing module based on WebSocket. The terminal processing module is used to receive metadata and the processed DCP packet, perform hash verification, and use the ZSTD decompression algorithm to restore the path and verify the files in order to download and decompress the DCP packet. The metadata includes ordinary metadata and partially compressed metadata. The ordinary metadata contains all file information in the original DCP packet. The partially compressed metadata includes file information that has not been marked with a status and compressed packet information corresponding to the processed DCP packet. The compressed packet information includes: name, path, file list, and SHA-1 value.

2. The digital cinema network transmission system based on local compression according to claim 1, characterized in that, The digital cinema network transmission system based on local compression also includes: a CDN preheating module; The CDN preheating module is connected to both the preprocessing module and the terminal processing module. The CDN preheating module is used to preheat the processed DCP packets and transmit them to the terminal processing module.

3. The digital cinema network transmission system based on local compression according to claim 1, characterized in that, The digital cinema network transmission system based on local compression also includes: a metadata management module; The metadata management module is connected to the preprocessing module and the two-way authentication module, respectively. The metadata management module is used to store the metadata.

4. The digital cinema network transmission system based on local compression according to claim 1, characterized in that, The two-way authentication module establishes a communication channel using a two-way authentication method involving device certificates and platform certificates.

5. The digital cinema network transmission system based on local compression according to claim 2, characterized in that, The terminal processing module includes: a download module, a restore module, and a verification module; The download module is connected to both the CDN preheating module and the two-way authentication module; the restore module and the verification module are both connected to the two-way authentication module. The download module is used to download the processed DCP package and perform hash verification based on the metadata; The restoration module is used to perform path restoration and file verification using the ZSTD decompression algorithm; The verification module is used to perform verification based on the SMPTE standard. If the verification is successful, the DCP package is considered to have been successfully downloaded and decompressed.

6. The digital cinema network transmission system based on local compression according to claim 1, characterized in that, The preprocessing module uses the inotify mechanism to monitor the upload directory of the original DCP package in real time and verifies the original DCP package according to the SMPTE standard.

7. A digital cinema network transmission method based on local compression, characterized in that, The digital cinema network transmission method based on local compression is implemented using the digital cinema network transmission system based on local compression as described in any one of claims 1-6; the digital cinema network transmission method based on local compression includes: Obtain the original DCP packet; The original DCP package is verified and filtered, and the filtered small files are partially compressed. The compressed package is then integrated with the original DCP package to obtain the processed DCP package. The small files are those with a size less than a set threshold. The partial compression process involves marking the status of the filtered small files in the metadata database to obtain marked files, and then using the ZSTD algorithm to package and compress the marked files. The DCP package is downloaded and decompressed by performing hash verification based on the metadata and the processed DCP package, and by using the ZSTD decompression algorithm to restore the path and verify the files. The metadata includes ordinary metadata and partially compressed metadata. The ordinary metadata contains all file information in the original DCP package. The partially compressed metadata includes file information that has not been marked with a status and compressed package information corresponding to the processed DCP package. The compressed package information includes: name, path, file list and SHA-1 value.

8. The digital cinema network transmission method based on local compression according to claim 7, characterized in that, The ZSTD algorithm is used to package and compress the marked files, specifically including: Obtain the list of paths to the marked files and the DCP directory corresponding to the original DCP package; The compression tool is initialized; specifically, a custom dictionary is read from dcp_custom_dict, a ZstdCompression Dict object is created, and the compression level is adjusted according to the number of small files in the marked file. The file list in the DCP directory is traversed to generate file path index information and determine compression information; the compression information includes: version number, path index SHA-1 value, and path index length; Based on the compression tool after initialization, Zstd Compressor is used to package and compress the marked files in blocks.

9. The digital cinema network transmission method based on local compression according to claim 8, characterized in that, The ZSTD decompression algorithm is used for path restoration and file verification to achieve the download and decompression of DCP packages. Specifically, this includes: The decompression tool is initialized; specifically, a custom dictionary is read from dcp_custom_dict, and a ZstdDecompressor object is created. Read the compressed information, and read the path index according to the path index length to determine the corresponding path index SHA-1 value, and compare and verify it with the path and SHA-1 value read from the compressed package information; If the verification fails, an exception will be thrown and an error will be reported; If the verification passes, the CRC32 value at the end of the compressed information is read, the CRC32 value of all compressed information except the CRC32 value at the end is calculated, and the CRC32 value is compared with the CRC32 value read from the compressed package information. If the verification fails, an exception is thrown and an error is reported. If the verification passes, path index parsing is performed to extract file information and the relative path information between the file and the DCP directory. The directory structure is determined based on the file information and the relative path information; The starting position of the compressed data area is determined based on the directory structure to achieve the positioning of the compressed data area; The Zstd Decompressor object performs a one-time decompression based on the starting position and splits the DCP package based on the file path index information to achieve decompression and restoration.

10. The digital cinema network transmission method based on local compression according to claim 8, characterized in that, The method for determining the dedicated dictionary specifically includes: Obtain the training dataset; the training dataset includes: training samples and the paths corresponding to the training samples; the training samples are the small files; Using the train_dictionary method of the Python 3 ZSTD library, based on the training dataset, and with the target size of the target dictionary as the objective, a preset initial trainer is trained, and the trained ZSTD compressed dictionary is output. The trained ZSTD compressed dictionary is saved in binary form to the dcp_custom_dict file to obtain a custom dictionary.