Method and system for customs rapid safe intelligent clearance inspection based on pre-shipment station
By decomposing the monitoring images into basic spectrum and control spectrum, and dynamically adjusting the amount of control spectrum deletion based on the verification results, the security and storage problems of massive monitoring data in the pre-positioned cargo terminal mode are solved, achieving efficient data management and reasonable allocation of storage resources, thereby improving customs clearance efficiency and security.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- 中国电子口岸数据中心上海分中心
- Filing Date
- 2026-02-10
- Publication Date
- 2026-06-02
AI Technical Summary
The existing forward cargo terminal model has efficiency and cost issues in terms of the security and storage of massive amounts of monitoring data. In particular, there is a risk of interception and tampering in the transmission and storage of monitoring images. Furthermore, high-definition images put enormous pressure on storage space, and existing compression and encryption methods cannot balance data security and computing resources.
The monitoring image is decomposed into a basic spectrum and a control spectrum by using spectrum decomposition technology. The basic spectrum is encrypted and the amount of control spectrum is dynamically adjusted before and after transmission and storage based on the verification results. The management of storage resources is optimized through encryption and compression strategies.
It achieves secure transmission and efficient storage of surveillance images, dynamically adjusts the allocation of storage resources, ensures the integrity of important data and the compression of non-important data, resolves the contradiction between the cost of massive data storage and the integrity of evidence collection in emergencies, and improves customs clearance efficiency and cost advantages.
Smart Images

Figure CN121691565B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, and specifically to a fast, secure, and intelligent customs clearance and inspection method and system based on forward cargo terminals. Background Technology
[0002] The forward cargo terminal model moves the functions of airport cargo terminals (such as security checks and customs inspections) to the source of goods where industries are clustered, realizing "pre-security checks, pre-customs inspections, and pre-standardized services." After the goods are inspected at the source, they can be directly loaded onto trucks and transported to the airport for loading onto aircraft, which significantly shortens customs clearance time, reduces logistics costs, and significantly improves overall efficiency.
[0003] However, while this efficient and rapid customs clearance model brings convenience, it also raises new challenges, especially in terms of data management. The core of the forward cargo terminal model is to transform the offline inspection of physical goods into the online automated verification and sharing of monitoring data during transportation. This means that a large amount of monitoring data (especially the continuously generated massive amounts of monitoring images) needs to be securely and in real-time transmitted from the forward cargo terminal to the airport cargo terminal and archived long-term for traceability. This essentially shifts some of the cost and efficiency savings from the offline process at the forward cargo terminal to the security and storage pressures of online data management.
[0004] Specifically, the challenges are mainly reflected in two aspects: the transmission of surveillance images in public networks (such as 5G) poses a risk of interception and tampering; the massive amount of high-definition surveillance images puts enormous pressure on storage space; and existing video stream compression (such as H.263) and asymmetric encryption methods cannot achieve efficient data compression while ensuring data security and computing resources when faced with large amounts of data.
[0005] Therefore, the existing forward cargo terminal model cannot offset the advantages of forward cargo terminals in improving customs clearance efficiency due to the efficiency and cost issues of security and storage of massive amounts of monitoring data, and the data management bottlenecks cannot overcome these problems. Summary of the Invention
[0006] To address the aforementioned issues, this invention provides a method and system for rapid, secure, and intelligent customs clearance and inspection based on forward cargo terminals.
[0007] The present invention adopts the following technical solution for the customs fast, secure and intelligent customs clearance and inspection method and system based on a forward cargo station:
[0008] One embodiment of the present invention provides a fast, secure, and intelligent customs clearance and inspection method based on a forward cargo terminal, the method comprising the following steps:
[0009] During the shipment and transportation process at the forward cargo terminal, monitoring images are collected. The spectrogram of the monitoring images is decomposed into a basic spectrum and a control spectrum. The basic spectrum is encrypted to obtain an encrypted spectrum. The control spectrum is then added to the encrypted spectrum to obtain an encrypted image. The encrypted image is transmitted to the airport cargo terminal, compressed and stored, and awaits data verification. After the data verification is completed, the control spectrum is reduced based on the verification results. The reduced control spectrum is then added to the encrypted spectrum to obtain a first encrypted image, which is then compressed and stored.
[0010] Among them, the modulation spectrum has the largest bandwidth, and when the modulation spectrum is completely deleted, the texture change of the monitoring image is minimized and the compression force is maximized when the first encrypted image is compressed and stored.
[0011] When the verification result is greater than the first preset threshold, the customs inspection is passed; when the verification result is less than or equal to the first preset threshold, the customs inspection is not passed. Furthermore, the amount of reduction when the spectrum is reduced is positively correlated with the verification result.
[0012] Preferably, the spectrogram of the monitored image is decomposed into a basic spectrum and a modulated spectrum, including the following specific steps:
[0013] In the spectrum diagram, all pixels whose Euclidean distance from the center pixel is greater than a first preset distance R are obtained and recorded as candidate pixels; a preset cutoff threshold h is set, and all pixels whose gray value is less than or equal to h among all candidate pixels constitute a pixel set S; the first spectrum diagram is obtained by setting the gray value of all pixels in S to 0, and the second spectrum diagram is obtained by setting the gray value of all pixels outside S to 0.
[0014] The texture difference between the first image obtained by the inverse transformation of the first spectrogram and the monitoring image is denoted as F1. Pixels with gray values equal to 0 after encryption of the first spectrogram and having the same position as those in S are denoted as redundant pixels. The compression strength F2 is evaluated based on the redundant pixels in S.
[0015] For the first preset distance Rm and the cutoff threshold hm that maximize F2 and F3 and minimize F1, the first spectrum and the second spectrum obtained based on Rm and hm are used as the base spectrum and the control spectrum; where F3 represents the bandwidth, F3 is positively correlated with the number of pixels in S and negatively correlated with R.
[0016] Preferably, the encryption includes the following specific steps:
[0017] For any grayscale image in the first spectrogram or the basic spectrum, generate an integer sequence key using the Logistic mapping algorithm. The key contains several sets of parameters for the Arnold transform algorithm. The pixels in the grayscale image are permuted sequentially using each set of parameters in the key to obtain the encryption result corresponding to the grayscale image.
[0018] Preferably, the specific steps for obtaining the encrypted image by adding a modulated spectrum to the encrypted spectrum are as follows:
[0019] The grayscale value of each pixel in the encrypted spectrum is added to the grayscale value of each pixel in the control spectrum to obtain the comprehensive spectrum. The comprehensive spectrum is then transformed using the inverse Fourier transform algorithm to obtain the encrypted image.
[0020] Preferably, the data verification includes the following specific steps:
[0021] After decompressing the encrypted images stored at the airport cargo terminal, a comprehensive spectrum is obtained by using the Fourier transform algorithm. The gray value of each pixel in the comprehensive spectrum is subtracted from the gray value of each pixel in the control spectrum to obtain the encrypted spectrum. The encrypted spectrum is then decrypted to obtain the basic spectrum. The gray values of the same pixels in the basic spectrum and the control spectrum are summed to obtain the spectrum map. Then, the spectrum map is transformed into a monitoring image using the inverse Fourier transform algorithm. The monitoring image is then verified to obtain the verification result.
[0022] Preferably, the specific steps for reducing the modulation spectrum using the verification results are as follows:
[0023] Obtain the maximum gray value max and the minimum gray value min among all non-zero gray values in the control spectrum, obtain the segmentation threshold th, th=w×max+(1-w)×min, w represents the verification result, and th is used to describe the amount of deletion when performing deletion; in the control spectrum, set the gray value of pixels with gray values less than or equal to th to 0, and obtain the control spectrum after deletion.
[0024] Preferably, the specific steps for obtaining the first preset distance Rm and the cutoff threshold hm are as follows:
[0025] F(R, h) represents the evaluation index of the first preset distance R and the cutoff threshold h. The evaluation index is positively correlated with F2 and F3 and negatively correlated with F1. The range of gray values of all candidate pixels is taken as the range of h. The first preset distance and the cutoff threshold when the evaluation index is at its maximum are denoted as Rm and hm, respectively.
[0026] Preferably, the specific steps for evaluating the compression strength F2 based on redundant pixels in S are as follows:
[0027] The ratio of the mean gray value of all redundant pixels in S to the maximum gray value in S is f0. F2 is negatively correlated with f0.
[0028] Preferably, the texture difference between the first image and the monitoring image includes the following specific steps:
[0029] The gradient of each pixel in the first image and the monitoring image is obtained using the Sobel operator; the cosine similarity of the gradients of the same pixels in the first image and the monitoring image is calculated, and the mean of the cosine similarity of all pixels is denoted as x. The texture difference is negatively correlated with x.
[0030] Another embodiment of the present invention provides a customs fast, secure and intelligent clearance inspection system based on a forward cargo terminal. The system includes a memory, a processor and a computer program stored in the memory and executable on the processor. When the processor runs the computer program, it implements all the steps of the above-described customs fast, secure and intelligent clearance inspection method based on a forward cargo terminal.
[0031] The beneficial effects of the technical solution of the present invention are:
[0032] This invention decomposes the spectrogram of a surveillance image into a basic spectrum and a modulated spectrum, and encrypts only the basic spectrum containing key information, thus ensuring the security of important information in the surveillance image during transmission and storage.
[0033] This invention optimizes the management and allocation of storage resources. Specifically, it dynamically adjusts the amount of spectrum reduction based on data verification results, and generates a first encrypted image for compressed storage based on the reduced spectrum. The higher the verification result (indicating safer and more normal cargo transportation), the greater the amount of spectrum reduction, resulting in a higher compression ratio and smaller storage footprint for the final archived data. This post-processing dynamic compression strategy based on verification results resolves the contradiction between the cost of massive data storage and the integrity of evidence collection in customs scenarios. It allows valuable storage resources to be prioritized for important monitoring data with low verification results (i.e., potential anomalies). By dynamically adjusting the accuracy of evidence collection, it achieves intelligent and rational allocation of storage resources.
[0034] This invention transforms the security monitoring of cargo transportation into secure data transmission and intelligent archiving. Through "one-time encryption, two-use" (encryption once during transmission, and reuse of the encrypted result for archiving after verification) and intelligent compression based on the verification result, it effectively reduces the consumption of computing and storage resources in the data management process. This avoids the problem of transferring offline cost savings to online data management due to the massive amount of monitoring data generated by the pre-positioned cargo terminal model, thus comprehensively ensuring and further improving the efficiency and cost advantages of the pre-positioned cargo terminal customs clearance model. Attached Figure Description
[0035] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0036] Figure 1 A flowchart illustrating the steps of a fast, secure, and intelligent customs clearance and inspection method based on a forward cargo terminal, as provided in an embodiment of the present invention.
[0037] Figure 2 Flowchart of steps for secure transmission and storage;
[0038] Figure 3 This is a structural diagram of the encryption and storage processes. Detailed Implementation
[0039] To further illustrate the technical means and effects adopted by the present invention to achieve its intended purpose, the following, in conjunction with the accompanying drawings and preferred embodiments, details the specific implementation, structure, features, and effects of the customs fast, secure, and intelligent customs clearance inspection method and system based on a pre-positioned cargo station proposed by the present invention. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. Furthermore, specific features, structures, or characteristics in one or more embodiments can be combined in any suitable form.
[0040] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.
[0041] The following description, in conjunction with the accompanying drawings, details the specific solution of the customs fast, secure, and intelligent customs clearance and inspection method and system based on a forward cargo station provided by this invention.
[0042] Please see Figure 1 The diagram illustrates a flowchart of a customs fast, secure, and intelligent clearance and inspection method based on a forward cargo terminal, according to an embodiment of the present invention. The method includes the following steps:
[0043] Step S1: Collect monitoring data during the shipping and transportation process of the forward cargo station. The monitoring data includes monitoring images.
[0044] For exported goods, security checks and customs inspections are completed at the forward cargo terminal at the origin. The service standards of the forward cargo terminal are consistent with those of the airport. After security checks at the forward cargo terminal, for goods that meet air transport requirements, the cargo terminal operator is responsible for palletizing, loading, and transporting them to the airport's international cargo terminal (hereinafter referred to as the airport cargo terminal). During transportation, the transport vehicles are monitored in real time, and the monitoring data is transmitted to the airport cargo terminal in real time. After the goods arrive at the airport cargo terminal, relevant data is verified, such as automated verification of monitoring data during transportation, to ensure that the goods are free of abnormalities from leaving the forward cargo terminal to arriving at the airport cargo terminal, such as not being opened, replaced, or damaged en route. Once the airport cargo terminal verifies that there are no problems, unloading and loading onto the aircraft proceeds.
[0045] The above describes the general process of customs clearance and inspection based on forward cargo terminals. This process achieves three major breakthroughs by bringing airport cargo terminal functions forward to the source of goods: "pre-security checks, pre-customs inspections, and pre-standardized services." It replaces the customs clearance and inspection process with data sharing and automated data verification between the forward cargo terminal and the airport cargo terminal, transforming offline manual management of customs clearance and inspection into online automated data management. Compared to traditional air freight models, it has significant advantages in efficiency and cost, achieving the goal of rapid customs clearance and inspection.
[0046] Since the security checks and customs inspections at the forward cargo terminal are existing technologies, their specific details will not be elaborated in this embodiment. This embodiment describes the specific real-time monitoring method as follows:
[0047] Electronic locks are used to seal containers or cargo boxes, and the opening and closing status of the electronic locks is collected in real time (in this embodiment, 1 represents the open state and 0 represents the closed state); a GPS positioning device is installed on the vehicle to obtain the vehicle's location data in real time; cameras are installed inside the container or on the shelf (four cameras are installed in this embodiment) for real-time monitoring of the goods. In some embodiments (e.g., when transporting special items such as medicines or chemicals), temperature sensors, humidity sensors, or vibration sensors are installed inside the container or on the shelf for real-time monitoring of the environment or status of the goods.
[0048] The monitoring data, including the opening and closing status of the electronic lock, vehicle location data, camera surveillance images, and various sensor data, is transmitted to the airport cargo terminal. In this embodiment, a 5G network is used to transmit the aforementioned monitoring data.
[0049] Because surveillance images have the characteristics of large data volume and high information security priority, this embodiment only describes the secure transmission of surveillance images.
[0050] Step S2: After encrypting and transmitting the monitoring image, compress and store it, and wait for data verification. After the data verification is completed, use the verification result to encrypt and compress it again before storage. The two encryption processes share the same encryption process, and the amount of data is reduced during the second compression.
[0051] In order to ensure the security of the transmission of surveillance images during cargo transportation, the surveillance images need to be encrypted. In this embodiment, after the surveillance images are encrypted, they are not stored in the memory of the transport vehicle, but are transmitted to the airport cargo terminal for storage in a timely manner to prevent the data from being stored for a long time and to ensure the security of the surveillance images. In addition, when the surveillance images are encrypted during cargo transportation, the key is stored in a USB flash drive. The USB flash drive storing the key is transported to the airport cargo terminal with the cargo to avoid the risk of leakage when the key is shared on the network.
[0052] After receiving the encrypted surveillance images, the airport cargo terminal compresses them and stores them in a database, awaiting decryption and data verification. When the goods and the USB flash drive arrive at the airport cargo terminal, the key on the USB flash drive is used to decrypt and verify the surveillance images stored in the database.
[0053] After verification, the surveillance images are encrypted, compressed, and stored in a database for long-term or permanent archiving (e.g., deleted after one year). The purpose is that, while pre-positioned cargo terminal technology offers significant advantages in efficiency, cost, and convenience, it also poses a major challenge to the management of customs clearance and inspection. In this embodiment, the surveillance images are encrypted, compressed, and stored after verification, achieving secure archiving and record-keeping. This facilitates tracing and evidence collection when problems arise with the goods, providing data feedback for customs clearance and inspection management.
[0054] The above-described process transforms the safe transportation of goods into the secure transmission and storage of surveillance images, ensuring the safety of both the goods and the surveillance images. This facilitates the management and monitoring of the entire process from the forward cargo terminal to the boarding and transportation of goods, improving both efficiency and security.
[0055] The process described above, from transmitting the surveillance images to archiving, involves two encryption and compression operations, both aimed at ensuring the security of the surveillance images. In this embodiment, the same encryption process is used for both encryption operations, and the data volume is reduced during compression. This is intended to save computing and storage resources and facilitate data management.
[0056] Step S3: Conduct customs clearance inspection using the verification results.
[0057] This embodiment uses artificial intelligence technology to verify the decrypted surveillance images.
[0058] In special cases, if the USB drive containing the key is not delivered to the airport cargo terminal, or if the key in the USB drive cannot decrypt the surveillance image (i.e., the decrypted surveillance image is garbled), then the verification will fail directly, and the goods cannot be boarded.
[0059] In summary, steps S1-S3 above achieve rapid and secure customs clearance and inspection through pre-positioned cargo terminal technology, and the design of appropriate encryption and compression methods ensures secure data archiving, greatly improving data management efficiency. This avoids the data management difficulties caused by the surge in data throughput after introducing pre-positioned cargo terminal technology, and prevents the transfer of cost and efficiency savings from pre-positioned cargo terminals to data management, thus improving the overall efficiency of the customs clearance and inspection process based on pre-positioned cargo terminals.
[0060] As an example, such as Figure 2 As shown, step S2 includes the following steps:
[0061] Step S201: During the shipment and transportation process at the forward cargo station, monitoring images are collected, and the spectrum of the monitoring images is decomposed into the basic spectrum and the control spectrum.
[0062] In this embodiment, considering that the goods will not undergo significant dynamic changes during transportation, the camera acquires monitoring images at a lower sampling frequency to reduce the amount of data. In this embodiment, the camera acquires monitoring images at a frequency of 10Hz, and each monitoring image is a grayscale image. In this embodiment, the size of each monitoring image is 1024×1024.
[0063] The Fourier transform algorithm is used to transform each monitoring image to obtain a spectrum. Each pixel in the spectrum represents a frequency component, and the gray value of each pixel represents the intensity of each frequency component in the monitoring image.
[0064] It should be noted that the Fourier Transform (DFT) algorithm yields the amplitude spectrum and phase spectrum of the monitoring image, where the amplitude spectrum is the aforementioned spectrogram. In this embodiment, the phase spectrum is not processed subsequently (i.e., it is treated as a global constant); only the spectrogram is processed. Furthermore, the maximum range of grayscale values for pixels in the spectrogram output by the Fourier Transform algorithm is [0, +∞). Generally, when visualizing the spectrogram, the grayscale values in [0, +∞) need to be logarithmically transformed and linearly normalized to [0, 255]. However, in this embodiment, there is no need to visualize the spectrogram; therefore, the grayscale values of the spectrogram described later are in the range [0, +∞).
[0065] The spectrogram is decomposed into a base spectrum and a modulated spectrum. Both the base spectrum and the modulated spectrum are grayscale images of the same size as the spectrogram, and the sum of the grayscale values of the same pixels in the base spectrum and the modulated spectrum equals the grayscale value of the same pixel in the spectrogram. The base spectrum contains important information in the surveillance image that plays a crucial role in identifying the image content; the modulated spectrum represents information in the high-frequency texture layer of the surveillance image that has a weaker response and does not play a crucial role in identifying the image content (e.g., weak edge information).
[0066] Step S202: Encrypt the basic spectrum to obtain the encrypted spectrum, and then add the modulated spectrum to the encrypted spectrum to obtain the encrypted image.
[0067] The encrypted spectrum is obtained by encrypting the basic spectrum. This process protects the security of important information within the surveillance image by encrypting the basic spectrum containing crucial information. In this embodiment, a chaotic sequence is used as the key, and the key is used to permutate pixels in the basic spectrum, thereby achieving encryption.
[0068] In this embodiment, the encrypted spectrum is a grayscale image of the same size as the basic spectrum (or the control spectrum). The grayscale value of each pixel in the encrypted spectrum is added to the grayscale value of each pixel in the control spectrum to obtain a comprehensive spectrum. The inverse Fourier transform algorithm is used to transform the comprehensive spectrum and the phase spectrum described in step S201 to obtain the encrypted image.
[0069] It should be noted that the encrypted image is the result of encrypting the surveillance image. In this encryption process, chaotic sequences are used for permutation encryption. In addition, the surveillance image is split into two parts (i.e., the basic spectrum and the control spectrum) before encryption. In this process, the two operations of decomposition and permutation increase the difficulty of cracking the encryption process, thus achieving the goal of efficient and secure encryption.
[0070] It should be noted that in this embodiment, the control spectrum is also stored on the USB flash drive. Since the control spectrum data is small and does not contain important information, storing it on the USB flash drive will not directly leak important information in the monitoring image.
[0071] As an example, the method for obtaining an encrypted spectrum by encrypting the basic spectrum includes:
[0072] This embodiment uses the Logistic mapping algorithm to generate a chaotic sequence (or a random sequence) of length 3×k. The value range of each element in the chaotic sequence is [0, 1]. In this embodiment, each element is multiplied by 4, the result is rounded to the nearest integer and then incremented by 1 to obtain an integer sequence, where the value range of each element is [1, 5]. This integer sequence is stored as a key on a USB flash drive. k is a preset positive integer; this embodiment uses k=10 as an example.
[0073] Each set of three adjacent values in the key forms a tuple, resulting in a total of k tuples. The three values in each element serve as parameters for the Arnold transform algorithm (the first two values are the parameters of the transformation matrix in the algorithm, and the last value is the number of iterations). The first tuple is used to perform the Arnold transform algorithm to permutate the pixels in the basic spectrum, resulting in a permuted spectrum. Then, the second tuple is used to perform the Arnold transform algorithm to perform the permutation algorithm on the pixels in the permuted spectrum, resulting in another permuted spectrum. Next, the third tuple is used to perform the Arnold transform algorithm on the pixels in the permuted spectrum, resulting in another permuted spectrum. This process continues until the last tuple is used to perform the Arnold transform algorithm on the pixels in the permuted spectrum, resulting in the encrypted spectrum.
[0074] Step S203: After transmitting the encrypted image to the airport cargo terminal, compress and store it, and wait for data verification.
[0075] After receiving each encrypted image, the airport cargo terminal needs to store the encrypted image in the database for data verification since the key has not yet been delivered. Due to the large data throughput of the airport cargo terminal, such as when the airport cargo terminal connects to multiple forward cargo terminals at the same time, or when the transportation distance between the forward cargo terminal and the airport cargo terminal is long, the data throughput is large. In this case, the encrypted image needs to be compressed before storage.
[0076] In this embodiment, the LZW algorithm is used for compression as described above and subsequently. Other compression algorithms, such as Huffman coding, may also be used in other embodiments.
[0077] Step S204: After the data verification is completed, the control spectrum is reduced using the verification results. The reduced control spectrum is added to the encrypted spectrum to obtain the first encrypted image. The first encrypted image is then compressed and stored.
[0078] Once the goods and the USB drive containing the storage key are delivered to the airport cargo terminal, the key on the USB drive is used to decrypt each encrypted image stored in the airport cargo terminal database. For each decrypted surveillance image, artificial intelligence technology is used to verify the image and obtain a verification result. In this embodiment, the verification result is represented by a value in the range [0, 1]. The larger the verification result, the less abnormal the surveillance image is, indicating that the surveillance image is unimportant data. In this embodiment, abnormalities refer to all situations that affect the safe and complete delivery of goods. The smaller the verification result, the more serious the abnormal situation in the surveillance image, indicating that the surveillance image is important data. Subsequently, during compression and archiving, when the verification result is smaller (indicating an abnormal risk), more evidence-gathering details are retained, and the deletion of high-frequency detail data is reduced (i.e., more data is retained); when the verification result is larger (indicating normality), more high-frequency detail data is deleted to save storage space, thereby dynamically adjusting the evidence-gathering accuracy.
[0079] As an example, the method for decrypting each encrypted image stored in the airport cargo terminal database using the key on the USB flash drive includes:
[0080] The LZW algorithm is used to decompress each encrypted image stored in the database. A Fourier transform is performed on each encrypted image to obtain the comprehensive spectrum and phase spectrum described in step S202. The gray value of each pixel in the comprehensive spectrum is subtracted from the gray value of each pixel in the corresponding control spectrum (stored on the USB drive) to obtain the encrypted spectrum described in step S202. The encrypted spectrum is decrypted using the inverse Arnold transform algorithm based on the key stored on the USB drive. That is, the tuples in the key are sequentially used to inversely permutate the pixels of the encrypted spectrum from back to front to obtain the basic spectrum. The gray values of the same pixels in the basic spectrum and the control spectrum are summed to obtain the spectrum diagram. Then, the inverse Fourier transform algorithm is used to transform the spectrum diagram and the phase spectrum obtained in this step into a monitoring image, thus completing the decryption.
[0081] Furthermore, the control spectrum is reduced using the verification results to obtain the reduced control spectrum. The amount of reduction in the control spectrum is positively correlated with the verification results. The purpose is to reduce data storage and dynamically adjust the evidence collection accuracy when archiving surveillance images with larger verification results (i.e., the larger the reduction in control spectrum). Conversely, for surveillance images with smaller verification results, more details need to be retained when archiving (i.e., the smaller the reduction in control spectrum) to ensure data integrity.
[0082] Furthermore, the gray value of each pixel in the encrypted spectrum is added to the gray value of each pixel in the reduced control spectrum to obtain the first comprehensive spectrum. The first comprehensive spectrum and the phase spectrum obtained in this step are then transformed using the inverse Fourier transform algorithm to obtain the first encrypted image.
[0083] The first encrypted image is compressed and then stored in the database.
[0084] For data other than surveillance images, such as the opening and closing status of electronic locks, vehicle location data, and various sensor data, no encryption is performed during transmission; when the airport receives this data, it directly compresses and archives it, although archiving may not be performed in some embodiments. In addition, the key and control spectrum (specifically, the reduced control spectrum) stored in the USB flash drive are also compressed and stored.
[0085] In the above process, such as Figure 3 As shown, the spectrogram of the monitoring image is first decomposed into two parts: a base spectrum and a modulated spectrum. In this embodiment, the modulated spectrum has the largest bandwidth, and when the modulated spectrum is completely removed from the monitoring image, the texture change of the monitoring image is minimized, and the compression effect is maximized when the first encrypted image is compressed and stored. Then, encrypted transmission and compressed storage are performed based on the base spectrum and the modulated spectrum.
[0086] Its effect is as follows:
[0087] By increasing the difficulty of cracking the encryption result and ensuring its security, when the encryption result is re-encrypted and compressed for archiving after verification in the above process, it is not necessary to encrypt again. In other words, the encryption result during transmission can be reused or shared, reducing the amount of computation during encryption and saving computing resources. From another perspective, this embodiment allows more computing resources to be devoted to the encryption process (e.g., increasing the key length) without causing a surge in computing power, thereby providing expanded space for data security.
[0088] Furthermore, this embodiment also allows for the reduction of the control spectrum based on the verification results without decrypting the encrypted spectrum. On the one hand, the control spectrum has the largest bandwidth, which ensures that when the control spectrum is reduced based on the verification results, a large amount of frequency band information can be deleted. This not only reduces the information in the monitoring image, which helps with compression, but also allows for the most significant data compression possible, thereby reducing the storage resource occupation when archiving the monitoring image. On the other hand, when the control spectrum is completely removed from the monitoring image, the texture change of the monitoring image is minimized, resulting in the maximum compression strength when compressing and storing the first encrypted image. This allows for the reduction of the amount of data when storing the encrypted image as quickly as possible without changing the image information. While ensuring the integrity of important data (monitoring images when there is an abnormal risk), it can compress unimportant data (monitoring images when normal) as much as possible. By dynamically adjusting the evidence collection accuracy, the occupation of storage resources is reasonably allocated.
[0089] As an example, the control spectrum is reduced using the verification results to obtain the reduced control spectrum. The methods include:
[0090] Obtain the maximum grayscale value (max) and the minimum grayscale value (min) among all non-zero grayscale values in the control spectrum. Obtain the segmentation threshold th, where th = w × max + (1 - w) × min, and w represents the verification result. Set the grayscale value of pixels in the control spectrum that are less than or equal to th to 0.
[0091] The larger the value of `w`, the closer `th` is to `max`. For pixels with grayscale values less than or equal to `th`, reducing their grayscale values to 0 is equivalent to removing a large number of low-frequency components. Conversely, the smaller the value of `w`, the closer `th` is to `min`. For pixels with grayscale values less than or equal to `th`, reducing their grayscale values to 0 is equivalent to removing a small number of frequency components. In summary, `th` describes the amount of removal during the removal process, and the amount of removal is positively correlated with the verification result.
[0092] This concludes the example.
[0093] In summary, this embodiment separates the encryption and compression processes, ensuring data security and enabling efficient allocation of data archiving and storage resources while reusing computational resources during encryption. The post-processing dynamic compression strategy based on verification results resolves the conflict between the cost of massive data storage and the integrity of evidence collection in customs scenarios, significantly improving data management efficiency. Furthermore, this embodiment avoids the data management difficulties caused by the surge in data throughput after introducing pre-positioned cargo terminal technology, and prevents the transfer of cost and efficiency savings from pre-positioned cargo terminals to data management, thereby improving the overall efficiency of customs clearance and inspection processes based on pre-positioned cargo terminals.
[0094] Example 2:
[0095] Step S201 of Embodiment 1 includes: decomposing the spectrogram into a base spectrum and a modulated spectrum. The modulated spectrum needs to meet certain conditions, as described in step S204: the modulated spectrum has the maximum bandwidth, and when the modulated spectrum is completely removed from the monitoring image, it minimizes the texture change of the monitoring image and achieves the maximum compression strength when the first encrypted image is compressed and stored.
[0096] Based on this, as an example, the spectrogram is decomposed into a basic spectrum and a modulation spectrum, including the following methods:
[0097] In the spectrogram, all pixels whose Euclidean distance from the center pixel is greater than a first preset distance R are identified and recorded as candidate pixels. Candidate pixels represent high-frequency pixels. In this embodiment, the initial value of R is equal to 80% of the width of the spectrogram. It should be noted that in this embodiment, the width and height of the monitoring image and the spectrogram are the same.
[0098] Define (or initialize) a cutoff threshold h, and extract all pixels with gray values less than or equal to h from all candidate pixels, denoted as the pixel set S. S represents information with high frequencies but low frequency component intensity. In this embodiment, the initial value of h is the mean of the gray values of all candidate pixels.
[0099] Make a copy of the spectrum and denote it as the first spectrum. Set the gray value of all pixels in S to 0 in the first spectrum. Use the inverse Fourier transform algorithm to transform the first spectrum and the phase spectrum described in step S201 to obtain the first image. Denote the texture difference between the first image and the monitoring image as F1.
[0100] Make another copy of the spectrogram, which is called the second spectrogram. In the second spectrogram, set the grayscale value of all pixels except S to 0.
[0101] The generated key is used to encrypt the first spectrogram (using the pixel position permutation method described in step S202) to obtain the first encrypted spectrum. For any pixel in the second spectrogram with a non-zero gray value, i.e., any pixel in S, if the gray value of a pixel at the same position as that pixel in the first encrypted spectrum is equal to 0, then that pixel is recorded as a redundant pixel. The ratio of the average gray value of all redundant pixels in the second spectrogram (or S) to the maximum gray value in the second spectrogram (or S) is recorded as f0. In this embodiment, f0 is used to describe the compression strength. The compression strength is negatively correlated with f0, meaning that when the compression strength is greater (i.e., f0 is smaller), when the spectrum reduction described in step S204 is performed later, there is a chance to delete a large number of redundant pixels, resulting in fewer frequency components in the first encrypted image obtained in step S204 (i.e., more pixels with a gray value of 0 in the first encrypted image), thereby ensuring that the first encrypted image can be compressed significantly.
[0102] As an example, exp(-f0) is taken as the compressibility force, denoted as F2, and exp() represents an exponential function with the natural constant as the base.
[0103] As another example, among the pixels outside the redundant pixels in S, pixels with a grayscale value greater than the maximum grayscale value of all redundant pixels are denoted as non-redundant pixels. The ratio of the number of non-redundant pixels in S to the total number of pixels in S is denoted as fw. The average of the compression strength obtained in the above example and fw is used as the compression strength in this example, indicating that: a larger compression strength means that the redundant pixels in S have smaller grayscale values compared to other pixels, or in other words, S contains a large number of low-grayscale redundant pixels. In this case, when the spectrum reduction is performed in the subsequent step S204, it is further ensured that the first encrypted image can be significantly compressed.
[0104] In the spectrogram, each pixel represents a frequency component. Therefore, the ratio of the number of pixels in S to the number of candidate pixels is denoted as f1, and the ratio of R to the width of the spectrogram is denoted as f2. This embodiment uses f1 and f2 to describe the bandwidth, which is positively correlated with f1 and negatively correlated with f2. This means that the more pixels in S and the smaller R, the larger the bandwidth, ensuring that a larger amount of frequency band information can be deleted when reducing the controlled spectrum based on the verification results. The purpose of using the ratio to the number of candidate pixels is to remove dimensions and orders of magnitude.
[0105] As an example, the mean of f1 and exp(-f2) is taken as the bandwidth, denoted as F3.
[0106] In this embodiment, let F(R, h) represent the evaluation index of the first preset distance R and the cutoff threshold h. The evaluation index is positively correlated with F2 and F3, and negatively correlated with F1. As an example, let F(h) = F2 + F3 - F1, where F2, F3, and F1 are all dimensionless scalars.
[0107] In this embodiment, the first preset distance R and the cutoff threshold, denoted as Rm and hm, are obtained when the evaluation value index is maximized. Maximizing the evaluation value index indicates that the bandwidth and compression strength obtained based on Rm and hm are maximized while the texture difference is minimized.
[0108] In this embodiment, when obtaining the first preset distance R at which the evaluation value index is maximized and the cutoff threshold, the range of the cutoff threshold is the range of grayscale values of all candidate pixels, and the range of R is {90%, 80%, 70%} of the spectrum width. This embodiment uses a particle swarm optimization algorithm to obtain the first preset distance and cutoff threshold at which the evaluation value index is maximized. In other embodiments, the range of the cutoff threshold is set to 90%, 70%, 50%, 30%, and 10% of the maximum grayscale values of all candidate pixels. Then, the evaluation value index corresponding to each first preset distance and cutoff threshold within the range is traversed, and the first preset distance and cutoff threshold traversed when the evaluation value index is maximized are taken as Rm and hm.
[0109] Furthermore, the first and second spectrograms obtained based on the first preset distance Rm and the cutoff threshold hm serve as the base spectrum and the modulated spectrum, respectively. The base spectrum contains important information in the surveillance image that plays a key role in recognizing the image content; the modulated spectrum represents information in the high-frequency texture layer of the surveillance image that has a weaker response and does not play a key role in recognizing the image content (such as weak edge information).
[0110] In summary, the above process is as follows: given a monitoring image, the generated key is used to obtain the cutoff threshold hm through optimization processing, and then the basic spectrum and the control spectrum are obtained based on the cutoff threshold hm.
[0111] The optimization process requires significant computation time, leading to increased computation time for each acquired monitoring image during transportation and resulting in transmission delays. In some embodiments, after the image is loaded onto the transport vehicle but before it leaves the forward freight station, any image captured by the camera (e.g., the first captured image) is used to perform the steps described above. The vehicle then leaves the forward freight station only after a cutoff threshold hm is obtained (i.e., hm is obtained before the transportation process begins). During transportation, after each acquired monitoring image, the basic spectrum and modulated spectrum of each monitoring image are obtained using the cutoff threshold hm according to the above method, thus skipping the computationally time-consuming optimization process.
[0112] In other embodiments, every 10 minutes, the first preset distance Rm and the cutoff threshold hm are reacquired using the acquired monitoring images and the key, following the optimization process described above in this embodiment. After reacquiring the first preset distance Rm and the cutoff threshold hm, the subsequent acquired monitoring images use the first preset distance Rm and the cutoff threshold hm to obtain the basic spectrum and the modulated spectrum. This process achieves timed updates of Rm and hm.
[0113] As an example, in this embodiment, the step of denoting the texture difference between the first image and the monitoring image as F1 includes:
[0114] The Sobel operator is used to obtain the gradient of each pixel in the first image and the monitoring image (the gradient is a two-dimensional vector with gradient magnitude and gradient direction). The cosine similarity of the gradients of identical pixels in the first image and the monitoring image is calculated. The mean of the cosine similarity of all pixels is denoted as x. exp(-x) is denoted as the texture difference, represented by F1, where exp() represents an exponential function with the natural constant as the base. The larger x is, the smaller the texture difference between the first image and the monitoring image. Specifically, when x is less than 0.45, F1 is set to 2. This is to avoid the texture difference between the first image and the monitoring image being too small, or in other words, when the texture difference between the first image and the monitoring image is too small, the value of the evaluation index is greatly reduced, thus suppressing the maximization of the evaluation index. Specifically, when x is greater than 0.9, F1 is also set to 2. This is to avoid the first image and the monitoring image having only subtle, invisible differences, and to avoid the situation where only some insignificant textures are removed during deletion.
[0115] It should be noted that this embodiment includes adding the grayscale value of each pixel in the first encrypted spectrum to the grayscale value of each pixel in the second spectrum; steps S202 and S204 in embodiment one also include the operation of adding grayscale values. When it is necessary to visualize the first encrypted spectrum, the comprehensive spectrum, and the first comprehensive spectrum, since the grayscale value of the pixel is limited to the range of [0, 255], the result of adding grayscale values is greater than 255, which leads to information loss; however, in this embodiment, it is not necessary to visualize the first encrypted spectrum, the comprehensive spectrum, and the first comprehensive spectrum (what can be visualized are the encrypted image and the first encrypted image), and the maximum range of grayscale value of the pixel is [0, +∞), so adding grayscale values will not cause information loss.
[0116] Example 3:
[0117] This embodiment optimizes Embodiment 1, specifically including:
[0118] After the camera captures each monitoring image, the monitoring image is divided into several sub-images. In this embodiment, the monitoring image is equally divided into 16 sub-images. Each sub-image is treated as (or replaced by) the monitoring image described in Embodiments 1 and 2 and processed, including: splitting the spectrogram of each sub-image into a basic spectrum and a control spectrum; encrypting the basic spectrum to obtain an encrypted spectrum, and adding the control spectrum to the encrypted spectrum to obtain an encrypted image corresponding to each sub-image; transmitting all the encrypted images corresponding to the sub-images of each monitoring image to the airport cargo terminal for compression and storage, and waiting for data verification; after the data verification is completed, using the verification results, the control spectrum is reduced, and the reduced control spectrum is added to the encrypted spectrum to obtain a first encrypted image corresponding to each sub-image, and the first encrypted image is compressed and stored.
[0119] Data verification refers to: decrypting the encrypted image corresponding to each sub-image into a sub-image (similar to step S204), then stitching the sub-images together into a monitoring image, and then using the monitoring image for verification.
[0120] Its advantage lies in the fact that each sub-image has a smaller data volume, and it can use multi-core processors to perform split-core encryption of the basic spectrum and the modulation spectrum of each sub-image in parallel, which greatly saves the computation time.
[0121] Furthermore, in step S204, when performing the process of reducing the control spectrum using the verification results to obtain the reduced control spectrum, as an example, this process includes:
[0122] This embodiment divides the monitoring image into several sub-images, so each sub-image corresponds to a control spectrum and a verification result w. For all control spectra corresponding to all sub-images of the monitoring image, according to the method in step S204 of embodiment one, each control spectrum corresponds to a segmentation threshold th. The n0 control spectra with the largest segmentation threshold th are removed (the removal method is described in step S204 of embodiment one), and the remaining control spectra are not removed (that is, the segmentation threshold of the remaining control spectra is directly set to 0). This embodiment describes the case where n0 is equal to half the number of sub-images of each monitoring image (n0 is rounded up).
[0123] The purpose is to reduce only a portion of the control spectrum, and to remove high-frequency information to the greatest extent possible to reduce data volume and save storage space. The remaining portion is not reduced but directly archived, which reduces the amount of computation during compression. This ensures secure encrypted transmission and archiving of monitoring images and saves storage resources while reducing the consumption of computing resources or time, thus providing an efficient, fast and secure data management method for customs' rapid, secure and intelligent clearance inspection.
[0124] Example 4:
[0125] As an example, the methods for verifying surveillance images and obtaining verification results include:
[0126] This embodiment verifies or identifies important macroscopic situations in the surveillance images. The anomalies refer to important macroscopic situations such as the presence of personnel, personnel handling goods, personnel disassembling goods, and cameras being obstructed.
[0127] The specific method involves inputting each monitoring image into an anomaly detection network, which then outputs a scalar as the verification result. In this embodiment, the anomaly detection network uses the ResNet50 network structure; other convolutional neural networks may be used in other embodiments, and this embodiment does not impose specific limitations.
[0128] The training method for the anomaly detection network is as follows:
[0129] In a vehicle loaded with goods, scenarios such as personnel, personnel and goods handling, personnel and goods unloading, and camera obstruction are simulated. Surveillance images are captured using the camera, and each captured image is used as a sample. A label is manually assigned to each sample. In this embodiment, the label value ranges from [0, 1], specifically {0.05, 0.35, 0.65, 0.95}. The more severe the anomaly in the surveillance image, the smaller the label value. For example, if the camera's field of view is obstructed by more than 80%, or if goods are severely unloaded, the sample label is manually set to 0.05. Conversely, the less severe the anomaly, the larger the label value. For example, if there are no anomalies in the surveillance image, the sample label is manually set to 0.95. The purpose of setting the sample label to be greater than 0 (minimum value 0.05) is to further remove some textures with low response (e.g., irrelevant textures) even in the presence of severe anomalies.
[0130] All samples and their labels are used as the dataset. An anomaly detection network is trained using this dataset, with the MSE loss function, Adam optimizer, learning rate set to 0.1, and training iterations set to 10. 5 Since the specific training method of the anomaly detection network (resnet50) is a well-known technique, it will not be described in detail in this embodiment.
[0131] Furthermore, for the entire transportation process, when all the verification results obtained are greater than the first preset threshold th1, the customs inspection is passed; when there is a case where the verification result is less than or equal to the first preset threshold th1, the customs inspection is not passed. This embodiment takes th1=0.5 as an example for description.
[0132] In other embodiments, when an electronic lock is detected to be open, the verification result corresponding to the most recently acquired monitoring image is directly set to 0.05; otherwise, it is set to 0.95.
[0133] This embodiment is described using th1=0.5 as an example.
[0134] In some embodiments, a rated value and a range are set for each sensor. For example, the rated humidity for transporting pharmaceuticals is 45%, which represents the optimal transport humidity, and the range is 35% to 75%, which represents the allowable transport humidity range.
[0135] After each monitoring image is acquired, the value output by the sensor at that time (e.g., the humidity value output by the humidity sensor) is obtained. The absolute value of the difference between this value and the rated value is divided by the rated value and denoted as y. exp(-y) is used as the evaluation value of each sensor, indicating that the greater the difference between the sensor output value and the rated value, the smaller the evaluation value, and the smaller the verification result is required. Specifically, when the value is outside the range, the evaluation value is set to 0.05, and when the evaluation value is greater than 0.95, the evaluation value is set to 0.95.
[0136] The minimum value of all sensor evaluations is used as the verification result of the monitoring image.
[0137] This embodiment is described using th1=0.6 as an example.
[0138] In other embodiments, a number of surveillance images can be randomly selected for manual verification, and verification results can be manually assigned to the selected surveillance images. This embodiment is described using th1=0.5 as an example.
[0139] In some embodiments, when the verification is performed according to all of the above, if any one embodiment fails the verification, then the verification in that embodiment fails; if all of the above embodiments pass the verification, then the verification in that embodiment passes.
[0140] Example 5:
[0141] This embodiment provides a customs fast and secure intelligent clearance and inspection system based on a forward cargo terminal. The system includes a vehicle-mounted module and an airport cargo terminal module.
[0142] The vehicle-mounted module includes a camera, a 5G network module, a memory, a processor, and a computer program stored in the memory and executable on the processor. The processor reads the surveillance images captured by the camera and, when running the computer program, performs the following steps: decomposing the spectrogram of the surveillance image into a basic spectrum and a modulated spectrum; encrypting the basic spectrum to obtain an encrypted spectrum; and adding the modulated spectrum to the encrypted spectrum to obtain an encrypted image. Finally, the encrypted image is transmitted to the airport cargo terminal using the 5G network module.
[0143] The airport cargo terminal module also includes a memory, a processor, and a computer program stored in the memory and executable on the processor. After receiving an encrypted image, the processor compresses and stores the encrypted image in a database while running the computer program. When the cargo arrives, the computer program performs the following steps: decrypts the encrypted image in the database and performs data verification. After the data verification is completed, the control spectrum is reduced using the verification result. The reduced control spectrum is added to the encrypted spectrum to obtain a first encrypted image. The first encrypted image is then compressed and stored in the database.
[0144] In summary, the processors of the vehicle-mounted module and the airport cargo terminal module in this embodiment jointly implement all the steps of all the above embodiments when running the computer program.
[0145] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A customs fast, secure, and intelligent clearance and inspection method based on forward cargo terminals, characterized in that: The method includes the following steps: During the shipment and transportation process at the forward cargo terminal, monitoring images are collected. The spectrogram of the monitoring images is decomposed into a basic spectrum and a control spectrum. The basic spectrum is encrypted to obtain an encrypted spectrum. The control spectrum is then added to the encrypted spectrum to obtain an encrypted image. The encrypted image is transmitted to the airport cargo terminal, compressed and stored, and awaits data verification. After the data verification is completed, the control spectrum is reduced based on the verification results. The reduced control spectrum is then added to the encrypted spectrum to obtain a first encrypted image, which is then compressed and stored. Among them, the modulation spectrum has the largest bandwidth, and when the modulation spectrum is completely deleted, the texture change of the monitoring image is minimized and the compression force is maximized when the first encrypted image is compressed and stored. When the verification result is greater than the first preset threshold, the customs inspection is passed; when the verification result is less than or equal to the first preset threshold, the customs inspection is failed. Furthermore, the amount of reduction when the spectrum is reduced is positively correlated with the verification result. The spectrogram of the monitored image is decomposed into a basic spectrum and a modulated spectrum, including the following specific steps: In the spectrum diagram, all pixels whose Euclidean distance from the center pixel is greater than a first preset distance R are obtained and recorded as candidate pixels; a preset cutoff threshold h is set, and all pixels whose gray value is less than or equal to h among all candidate pixels constitute a pixel set S; the first spectrum diagram is obtained by setting the gray value of all pixels in S to 0, and the second spectrum diagram is obtained by setting the gray value of all pixels outside S to 0. The texture difference between the first image obtained by the inverse transformation of the first spectrogram and the monitoring image is denoted as F1. Pixels with gray values equal to 0 after encryption of the first spectrogram and having the same position as those in S are denoted as redundant pixels. The compression strength F2 is evaluated based on the redundant pixels in S. For the first preset distance Rm and the cutoff threshold hm that maximize F2 and F3 and minimize F1, the first spectrum and the second spectrum obtained based on Rm and hm are used as the base spectrum and the control spectrum; where F3 represents the bandwidth, F3 is positively correlated with the number of pixels in S and negatively correlated with R.
2. The customs fast, secure, and intelligent clearance and inspection method based on a forward cargo terminal as described in claim 1, characterized in that, The encryption process includes the following specific steps: For any grayscale image in the first spectrogram or the basic spectrum, generate an integer sequence key using the Logistic mapping algorithm. The key contains several sets of parameters for the Arnold transform algorithm. The pixels in the grayscale image are permuted sequentially using each set of parameters in the key to obtain the encryption result corresponding to the grayscale image.
3. The customs fast, secure, and intelligent clearance and inspection method based on a forward cargo terminal as described in claim 1, characterized in that, The specific steps involved in obtaining the encrypted image by adding a modulated spectrum to the encrypted spectrum are as follows: The grayscale value of each pixel in the encrypted spectrum is added to the grayscale value of each pixel in the control spectrum to obtain the comprehensive spectrum. The comprehensive spectrum is then transformed using the inverse Fourier transform algorithm to obtain the encrypted image.
4. The customs fast, secure, and intelligent clearance and inspection method based on a forward cargo terminal as described in claim 1, characterized in that, The data verification includes the following specific steps: After decompressing the encrypted images stored at the airport cargo terminal, a comprehensive spectrum is obtained by using the Fourier transform algorithm. The gray value of each pixel in the comprehensive spectrum is subtracted from the gray value of each pixel in the control spectrum to obtain the encrypted spectrum. The encrypted spectrum is then decrypted to obtain the basic spectrum. The gray values of the same pixels in the basic spectrum and the control spectrum are summed to obtain the spectrum map. Then, the spectrum map is transformed into a monitoring image using the inverse Fourier transform algorithm. The monitoring image is then verified to obtain the verification result.
5. The customs fast, secure, and intelligent clearance and inspection method based on a forward cargo terminal as described in claim 4, characterized in that, The specific steps involved in reducing the control spectrum using the verification results are as follows: Obtain the maximum gray value max in the control spectrum and the minimum gray value min among all non-zero gray values, and obtain the segmentation threshold th, th=w×max+(1-w)×min, where w represents the verification result and th is used to describe the amount of deletion when performing deletion. In the modulation spectrum, the gray values of pixels with gray values less than or equal to th are set to 0, resulting in the reduced modulation spectrum.
6. The customs fast, secure, and intelligent clearance and inspection method based on a forward cargo terminal as described in claim 1, characterized in that, The specific steps for obtaining the first preset distance Rm and the cutoff threshold hm are as follows: F(R, h) represents the evaluation index of the first preset distance R and the cutoff threshold h. The evaluation index is positively correlated with F2 and F3 and negatively correlated with F1. The range of gray values of all candidate pixels is taken as the range of h. The first preset distance and the cutoff threshold when the evaluation index is at its maximum are denoted as Rm and hm, respectively.
7. The customs fast, secure, and intelligent clearance and inspection method based on a forward cargo terminal as described in claim 1, characterized in that, The specific steps involved in evaluating the compression intensity F2 based on redundant pixels in S are as follows: The ratio of the mean gray value of all redundant pixels in S to the maximum gray value in S is f0. F2 is negatively correlated with f0.
8. The customs fast, secure, and intelligent clearance and inspection method based on a forward cargo terminal as described in claim 1, characterized in that, The specific steps involved in determining the texture differences between the first image and the monitoring image are as follows: The gradient of each pixel in the first image and the monitoring image is obtained using the Sobel operator; the cosine similarity of the gradients of the same pixels in the first image and the monitoring image is calculated, and the mean of the cosine similarity of all pixels is denoted as x. The texture difference is negatively correlated with x.
9. A customs fast, secure, and intelligent clearance and inspection system based on a forward cargo terminal, the system comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor runs the computer program, it implements all the steps of the customs fast, secure and intelligent customs clearance and inspection method based on any one of claims 1 to 8.