A Physically Isolated Data Transfer Method and System Based on High-Density Color Data Matrix Images

By using a high-density color data matrix image encoding method, combined with multi-process matrix operations and dynamic positioning algorithms, the problem of low encoding and decoding efficiency in existing technologies is solved, and fast and reliable data transmission under physical isolation conditions is achieved.

CN117579755BActive Publication Date: 2026-04-03LHASA JIAHUI TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-23
Publication Date
2026-04-03

AI Technical Summary

Technical Problem

Existing image-based data transmission methods suffer from low encoding/decoding efficiency and slow transmission speed under physically isolated conditions, failing to meet the requirements for stable and reliable data transmission.

Method used

A high-density color data matrix image encoding method is adopted, which performs color value conversion through bit stream and RGB permutation combination, combines multi-process matrix operation to improve encoding speed, and uses dynamic positioning algorithm and color value threshold matrix calculation to quickly decode data in the decoding stage.

Benefits of technology

It improves the information capacity and encoding speed of a single image storage, and realizes stable, reliable and fast data transmission under physical isolation conditions, with an encoding speed of 10MB/s, thus improving transmission efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117579755B_ABST
    Figure CN117579755B_ABST
Patent Text Reader

Abstract

This invention relates to the field of information security technology and discloses a physically isolated data transfer method and system based on a high-density color data matrix image. In the encoding stage, color value conversion is performed using a bitstream and RGB permutation combination. The amount of information that can be embedded in a single image far exceeds the amount of information contained in a recognizable color QR code per pixel. Then, a multi-process matrix operation method is used to improve the speed of bitstream-to-color value image conversion, thereby increasing the overall file encoding speed. In the decoding stage, asynchronous processing of shooting and decoding is performed using multiple processes. A dynamic positioning algorithm and a color value threshold matrix calculation method are used to obtain the center coordinates of each color block in the color data matrix image and the RGB three-channel color value threshold data, enabling fast and accurate decoding of the image containing informational data. This invention makes it possible to achieve stable, reliable, and fast data transmission under physically isolated conditions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of information security technology, specifically to a method and system for physically isolated data transfer based on high-density color data matrix images. Background Technology

[0002] The rapid development of information and communication technologies (ICT) and internet technologies has changed our lives and work styles, and improved our work efficiency, but it has also brought many security problems, such as network information leaks and viruses. These problems seriously threaten the information security of various enterprises and institutions. Traditional information security protection technologies only detect and control data transmission at the software level, and cannot meet the requirements for physical isolation between classified networks and insecure external networks.

[0003] Physically isolated data transfer technology, as a network security technology that enables information transmission between networks of different security levels in a purely physically isolated environment, is widely used in military, government, and enterprise units handling classified information. Existing physically isolated information exchange and transmission methods based on data matrix images offer advantages over traditional methods such as optical disc burning and infrared transmission, including ease of management, simple operation, and low resource consumption. However, due to the limited information capacity and low data density of traditional QR codes (OR codes), existing image-based data transmission methods suffer from low encoding / decoding efficiency and low transmission speed.

[0004] For example, the invention patent with publication number CN114268454A discloses a data transfer method for physically isolated environments. According to a preset program, the acquired target data is divided into multiple data packets, each data packet including multiple data frames; each data frame is encoded one by one, and a corresponding color QR code is generated; the generated color QR codes are played one by one on the intranet; the color QR codes played on the intranet are photographed one by one on the external network, and the photographed color QR codes are decoded one by one, finally restoring the target data.

[0005] Analysis of the existing technology revealed that the patented image has a small storage capacity per image and a slow processing speed for the entire image encoding and decoding process, which greatly reduces the data transmission speed under physical isolation conditions. Summary of the Invention

[0006] To address the problems and shortcomings of existing technologies, this invention proposes a physically isolated data transfer method and system based on high-density color data matrix images. On one hand, during the encoding stage, color value conversion is performed using bitstream and RGB permutation combinations. The amount of information embedded in a single image far exceeds the information contained in a recognizable color QR code per pixel. Then, a multi-process matrix operation method is used to improve the speed of bitstream-to-color value image conversion, thereby increasing the overall file encoding speed. On the other hand, during the decoding stage, asynchronous processing of shooting and decoding is performed using multiple processes. A dynamic positioning algorithm and a color value threshold matrix calculation method are employed to obtain the center coordinates of each color block in the color data matrix image and the RGB three-channel color value threshold data, enabling rapid and accurate decoding of the image containing informational data. This invention makes it possible to achieve stable, reliable, and rapid data transmission under physically isolated conditions.

[0007] To achieve the above-mentioned objectives, the technical solution of the present invention is as follows:

[0008] A method for physically isolated data transfer based on a high-density color data matrix image, the method including external network and internal network initialization, external network data encoding, and internal network data decoding, as detailed below:

[0009] A. Initialization of external and internal network terminals

[0010] A.1. External network initialization

[0011] Step S101. The display device displays three initialization images—a point matrix diagram, a pure black image, and a pure white image—at set time intervals.

[0012] A.2. Intranet Initialization

[0013] Step S201. The image acquisition device captures the point matrix diagram, pure black image and pure white image played by the external network display device one by one. First, the dynamic positioning algorithm is used to dynamically locate the points in the data matrix image based on the pure black image and the point matrix diagram to obtain the point matrix PM.

[0014] Step S202. Extract the black value matrix BM of the pure black image and the white value matrix WM of the pure white image based on the point matrix PM, and then calculate the color value threshold matrix CM of the corresponding point matrix of the image;

[0015] B. External network data encoding

[0016] Step S102. The encoding device reads the length of the binary stream data of the target data, and calculates the number of images that can be generated from the current target data based on the length of the binary stream data and the length value row and width value col of the color data matrix image to be generated.

[0017] Step S103. Divide the binary stream data of the read target data into n bit streams of length row*col*3, and then perform matrix operations on the n bit streams of length row*col*3 respectively to convert them into the corresponding three-dimensional matrix M1. i (row, col, 3);

[0018] Step S104. Convert the description information of the target data as packet header information into bit stream data, and then perform matrix operations to convert it into a three-dimensional matrix M2. i (2,col,3);

[0019] Step S105. For data matrix M1 i Perform row XOR and column XOR operations, concatenate the resulting row and column XOR values, and convert them into a three-dimensional matrix M3. i (2, col, 3), concatenate matrix M2 in order. i M3 i and M1 i The concatenated data matrix is ​​M4. i (row+4,col,3) represents the data matrix M4. i The data is stored as a vector image and finally formed into a color data matrix image.

[0020] Step S106. The display device plays the generated color data matrix images one by one;

[0021] C. Intranet Data Decoding

[0022] Step S203. The image acquisition device captures the color data matrix image played by the display device. The decoding device extracts the points of the captured image according to the point matrix PM, thereby obtaining the data matrix DM of each frame captured by the image acquisition device. Then, the data matrix DM is converted into a (0,1) data matrix DM' to complete the numerical extraction of each frame of data, and the converted matrix DM' is stored in binary data.

[0023] Step S204. The decoding device first obtains the bit stream data involving the data storage identifier in matrix DM', performs bit stream to string conversion on the bit stream data, and checks whether the data storage identifier exists. If it does not exist, the matrix is ​​discarded directly. If it exists, the data in matrix DM' is XORed with rows and columns. The resulting values ​​are compared with the original XOR values ​​in matrix DM'. If they are the same, matrix DM' is saved, and the packet header information in the matrix is ​​stored as basic information in a Redis list for later processing.

[0024] Step S205. The file restoration device reads the basic information existing in the Redis list, finds the corresponding DM' matrix according to the information, reads the bit stream of the DM' matrix and performs data concatenation processing in sequence. After all the DM' matrix data of the target data has been concatenated, the file restoration operation is performed on the concatenated bit stream data.

[0025] Preferably, in this invention, when the number of images that can be generated from the target data is a decimal, the binary stream data of the target data is padded with bit (0).

[0026] Preferably, in this invention, the calculation expression for the number of images that can be generated from the target data is n = L / (row*col*3), where n is the number of images and L is the length of the binary data stream.

[0027] Preferably, in this invention, when filling data, the number of bits (0) filled is a, a = (row*col*3) - mod(L, (row*col*3)), where L is the length of the binary data stream.

[0028] Preferably, in this invention, the description information of the target data includes the file name and size, the i-th bit stream data currently encoded, the number of file padding bits (0), the file creation time, and the data storage identifier.

[0029] Preferably, in this invention, the dynamic positioning algorithm includes: (1) reading the matrix data MPP of the point matrix image and the matrix data BPP of the pure black image, and obtaining a new matrix MPP' by MPP' = MPP - BPP; (2) performing binarization processing on MPP' to obtain the first center point of the image, obtaining the second center point of the same row based on the first center point through a fixed distance, and so on to obtain all the corresponding center points of the row; (3) obtaining the second center point of the column based on the first center point through a fixed distance, and so on to obtain all the corresponding center points of the column; (4) combining the information of all the center points of the row and column into a point matrix PM.

[0030] Preferably, in this invention, the method for converting the data matrix DM into a (0,1) data matrix DM' is as follows:

[0031] The data matrix DM is first converted into an intermediate matrix Q by calculating Q = DM - CM. Then, the values ​​less than 0 in the intermediate matrix Q are set to 0, and the values ​​greater than 0 are set to 1, finally generating a new data matrix DM'.

[0032] Preferably, in this invention, the display device can be a display screen, monitor, or other device capable of outputting images; the image acquisition device can be a CMOS industrial camera or other device with image acquisition function, typically with 5 million pixels.

[0033] A physically isolated data transfer system based on a high-density color data matrix image is disclosed. The system implements the aforementioned data transfer method and includes a sending host system connected to network A and a receiving host system connected to network B. The sending host system is an external network encoding end, used to receive data transmitted from network A, encode it, generate a corresponding image, and then play and display the image. The receiving host system is an internal network decoding end, used to acquire the image played and displayed by the sending host system, decode the acquired image to release the data, thereby completing a one-way data transfer between physically isolated networks.

[0034] Preferably, in this invention, the system includes:

[0035] An encoding initialization unit, located in the sending host system, is used to generate an initialization image at a set time interval and send it to the display unit.

[0036] A data encoding unit, located in the sending host system, is used to receive target data transmitted from network A, encode the target data, generate a corresponding color data matrix image, and transmit it to the display unit.

[0037] The display unit is located in the sending host system and is used to receive and display images transmitted by the encoding initialization unit and the data encoding unit.

[0038] An image acquisition unit, located in the receiving host system, is used to acquire images displayed by the display unit.

[0039] A decoding initialization unit is set in the receiving host system and is used to acquire an initialization image based on the image acquisition unit and generate initialization data.

[0040] A data decoding unit, located in the receiving host system, is used to decode the color data matrix image based on the color data matrix image acquired by the image acquisition unit and the generated initialization data to release the data;

[0041] The file restoration unit is located in the receiving host system and is used to perform file restoration operations on the data decoded by the data decoding unit.

[0042] The beneficial effects of this invention are:

[0043] 1. In the data transmission process of the present invention, the information storage capacity of a single color data matrix image generated in the data encoding stage is significantly improved compared to the traditional QR code image that can be recognized by a camera on the same screen. Furthermore, the image generation speed is nearly 10 times faster than that of traditional QR codes, and the data encoding speed can reach 10MB / s, creating the possibility for the rapid transmission of large amounts of data under physically isolated conditions.

[0044] 2. This invention uses a multi-volume compression mechanism to process large files, which can be used to improve the accuracy of correctly decoding files after retransmission when large file transmission fails. Attached Figure Description

[0045] The foregoing and hereinafter detailed description of the invention becomes clearer when read in conjunction with the following drawings, in which:

[0046] Figure 1 This is a system architecture diagram of the present invention;

[0047] Figure 2 This is a schematic diagram of the color data matrix image generated by the present invention;

[0048] Figure 3 This is a schematic diagram of the bit color value conversion of the present invention;

[0049] Figure 4 This is the point matrix diagram generated by the present invention. Detailed Implementation

[0050] To enable those skilled in the art to better understand the technical solutions of this invention, specific embodiments will be used to further illustrate the technical solutions for achieving the objectives of this invention. It should be noted that the technical solutions claimed by this invention include, but are not limited to, the following embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without inventive effort should fall within the scope of protection of this invention.

[0051] Physically isolated data transfer technology, as a network security technology that enables information transmission between networks of different security levels in a purely physically isolated environment, is widely used in military, government, and enterprise units handling classified information. Existing physically isolated information exchange and transmission methods based on data matrix images offer advantages over traditional methods such as optical disc burning and infrared transmission, including ease of management, simple operation, and low resource consumption. However, due to the limited information capacity and low data density of traditional QR codes (OR codes), existing image-based data transmission methods suffer from low encoding / decoding efficiency and low transmission speed.

[0052] Based on this, embodiments of the present invention propose a physically isolated data transfer method and system based on high-density color data matrix images. In the encoding stage, color value conversion is performed using bitstream and RGB permutation combinations. The amount of information embedded in a single image far exceeds the amount of information contained in a recognizable color QR code per pixel. Then, a multi-process matrix operation method is used to improve the speed of bitstream-to-color value image conversion, thereby increasing the overall file encoding speed. In the decoding stage, asynchronous processing of shooting and decoding is performed using multiple processes. A dynamic positioning algorithm and a color value threshold matrix calculation method are employed to obtain the center coordinates of each color block in the color data matrix image and the RGB three-channel color value threshold data, enabling fast and accurate decoding of the image containing informational data. This invention makes it possible to achieve stable, reliable, and fast data transmission under physically isolated conditions.

[0053] First, it should be noted that when transmitting data under a physically isolated network, two networks, A and B, are typically set up with different security levels and are physically isolated through a unidirectional isolation channel. An encoding device and a display device are installed in the sending host system connected to network A, while a decoding device and an image acquisition device are installed in the receiving host system connected to network B. During data transmission, the encoding device encodes the data transmitted from network A received by the encoding host system, generating corresponding image data. This image is then sent to the display device for display. The image acquisition device in the receiving host system identifies and receives the image data from the display device and transmits it to the decoding device. Finally, the decoding device decodes the image to obtain the relevant data contained within it, thus achieving data transmission under a physically isolated network. The physically isolated data transfer method and system proposed in this invention, based on a high-density color data matrix image, involves an external network file encoding process in the sending host system and an internal network decoding process in the receiving host system. The sending host system encodes the target data to be transmitted, generating a color image recognizable by the receiving host system. The receiving host system then performs a specified decoding operation on this color image to obtain the information data contained within it.

[0054] The embodiments of the present invention first disclose a physical isolation data transfer method based on a high-density color data matrix image. The method mainly includes an external network data encoding process executed by the sending host system and an internal network data decoding process executed by the receiving host system. The specific encoding and decoding processes are as follows:

[0055] A. Initialization of external and internal network terminals

[0056] Before the formal data encoding and decoding, the external network encoding end of the sending host system and the internal network decoding end of the receiving host system will initialize separately. During encoding initialization, the corresponding numbers are initially displayed on the screen. The decoding end continuously takes pictures and performs digit recognition on each image until it recognizes a number in the captured image, indicating that the encoding end has begun its initialization operation. The decoding end then prepares to initialize as well. Next, the encoding end's display screen sequentially displays three images at set time intervals: a point matrix diagram (PP), a pure black image (BP), and a pure white image (WP). The decoding end restarts its camera function, capturing images of the point matrix diagram (PP), pure black image (BP), and pure white image (WP) displayed on the encoding end's screen at a set speed. The decoding device then performs point matrix operations and threshold matrix operations based on these three images to complete the initialization.

[0057] The initialization process is complete once the decoder plays the point matrix image (PP), the pure black image (BP), and the pure white image (WP). Although the decoder has already captured the point matrix image (PP) and the black and white images, it still needs to perform point matrix and threshold matrix calculations based on these images. Therefore, after playing these three images, the decoder will pause at a set time before performing data encoding. The digital image, point matrix image (PP), pure black image (BP), and pure white image (WP) played by the decoder are all initialization images.

[0058] In this invention, during the initialization process at the encoding end, the order of the three types of images (dot matrix, black image, and white image) displayed on the screen can be interchanged; only annotation is needed during decoding. To improve data transmission efficiency, this invention uses multiple display screens at the encoding end to display the images generated by the encoding system. At the decoding end, a corresponding number of cameras will capture the image data played on the display screens. Each display screen and camera has a one-to-one correspondence; that is, each camera will only capture the image from its corresponding display screen. For ease of calculation and management, the display screens and cameras can be numbered; for example, camera number one corresponds to display screen number one. Each display screen and its corresponding camera will execute the above initialization process.

[0059] In this invention, the image digit recognition at the decoding end can be performed using existing technologies, which will not be elaborated on here.

[0060] In this invention, it should also be noted that the dot matrix image PP is calculated based on the screen size of the display device. For example, assuming the created color data matrix image is displayed full-screen on a 2560*1440 screen, and is correctly captured and decoded by the decoding device on the intranet, this invention defines the size of a single color block as 7*7 pixels. The color value information within the 7*7 pixel range is the same. The center point of the 7*7 is white, and the remaining points are black, thus forming the dot matrix image PP. Each dot can occupy 3 bits of data. Therefore, it can be calculated that this image contains a total of 2560 / 7 = 365 columns, 1440 / 7 = 205 rows, and a total of 365 * 205 = 74825 color blocks. Since a single color block represents 3 bits of data, the maximum information capacity of a single color data matrix image generated by this invention is 74825 * 3 / 8 / 1024 = 27.4KB, where 8 represents bit to byte and 1024 represents byte to KB. Therefore, the color data matrix image generated by this invention far exceeds the information capacity of a recognizable color QR code (less than 1KB) per pixel, creating the possibility of stable, reliable, and fast data transmission under physically isolated conditions. In this invention, the rows and columns of the image are related to the resolution of the display screen, and the rows and columns directly affect the maximum information capacity of a single generated color data matrix image. Therefore, the information capacity of a single image generated by this invention is directly related to the resolution of the display screen at the encoding end.

[0061] A pure black image is one in which the RGB channel values ​​of all pixels are zero; a pure white image is one in which the RGB channel values ​​of all pixels are 255.

[0062] The point matrix operations and threshold matrix operations involved in the initialization of the decoding device on the intranet are as follows:

[0063] a. Point matrix operations:

[0064] The camera on the intranet captures the point matrix image PP, the pure black image BP, and the pure white image WP displayed on the external network screen. First, based on the pure black image BP and the point matrix image PP, a dynamic positioning algorithm is used to dynamically locate the points in the data matrix image, resulting in the point matrix PM. The specific process of the dynamic positioning algorithm is as follows:

[0065] (1.1) Read the matrix data MPP of the point matrix image PP and the matrix data BPP of the pure black image BP, and use the method of MPP' = MPP-BPP to eliminate the interference of light leakage part of the edge screen and obtain a new matrix MPP'.

[0066] (1.2) Binarize the matrix MPP' to obtain the first center point (x, y) of the image. Based on the first center point, obtain the second center point of the same row through a fixed distance, and so on to obtain all the corresponding center points of the row.

[0067] (1.3) Then, based on the first center point, the second center point of the column is obtained through a fixed distance, and so on, all corresponding center points of the column are obtained;

[0068] (1.4) Combine the information of all points in the row and column to form the point matrix PM.

[0069] In this invention, the first center point of the image can be determined by calculating the distance between each point in the image and the image origin. The point in the image with the shortest distance to the origin is the first center point. The origin of the image is the top left corner vertex.

[0070] In this invention, the fixed distance value is set according to actual needs.

[0071] b. Color value threshold matrix calculation

[0072] (2) The decoding device extracts the black color value matrix BM of the pure black image BP and the white color value matrix WM of the pure white image WP based on the point matrix PM, and calculates the color value threshold matrix CM of the corresponding point matrix of the image. The calculation formula is CM=(WM-BM)*0.5.

[0073] In this invention, the black color value matrix BM extracted from the point matrix PM to the pure black image BP refers to extracting the RGB channel values ​​of the pure black image in all coordinates based on each coordinate point in the point matrix PM, and then combining them to obtain the black color value matrix BM. Similarly, the white color value matrix WM can be obtained.

[0074] After the external network encoding end is initialized, the sending host system will then perform the following data encoding operations, the specific process of which is as follows:

[0075] B. External network data encoding

[0076] Step S102. The encoding device at the external network encoding end receives the target data transmitted from network A, reads the length L of the binary stream data of the target data, and then, based on the length L of the binary stream data and the pre-set length value row and width value col of the color data matrix image to be generated, calculates the number n of color images that can be generated from the current target data using the following formula:

[0077] n = L / (row*col*3).

[0078] In some embodiments, before reading the binary information of the target data, it is usually necessary to verify the integrity of the data to prevent incomplete data when transcoding to generate a color data matrix image later. The specific verification method is as follows:

[0079] Data integrity is determined by continuously calculating whether the size of the incoming data is increasing: if the data keeps increasing, the process repeatedly waits and compares the current data size with the previous data size until they match, at which point the integrity check is exited. In other words, when performing repeatability checks on data, if the data size remains unchanged within a specified time range (a very small range, between 0.1s and 1s), it is considered that the detected data is complete and without any issues.

[0080] After data integrity verification, for extremely large datasets such as several gigabytes, loading them into memory all at once and performing transcoding calculations may cause memory overflow. Therefore, it is necessary to divide large datasets into smaller ones before encoding. In other words, after data integrity verification, the binary information of the data is read and stored in chunks in computer memory. The chunk size can be customized; this invention uses a 1GB chunking method by default, which can accurately control the amount of data loaded into computer memory each time.

[0081] The above compression and splitting mechanism is reflected in both the encoding and decoding ends of this invention. Its main function is to split large files, such as files exceeding 2G, into smaller files according to the bit stream splitting method, then encode the smaller files sequentially and transmit them. The decoding end needs to decode the smaller files sequentially, and finally restore them to smaller files and read the bit streams of each smaller file separately, and finally concatenate them into a large file. The main reasons for adopting this mechanism in this invention are as follows: (1) If the data transmitted by network A is greater than the memory size of the sending host system itself, such as the memory size of the sending host system is 8G, while the data size transmitted by network A is 9G, then it will definitely cause the dangerous behavior of memory overflow. Therefore, it is necessary to compress the file (reduce the size of the transmitted data, thereby improving the overall transmission speed) and then split the file (reduce the size of the individual transmitted file and remove the danger of memory overflow). The main encoding and decoding process is as follows: First, the file transmitted over network A needs to undergo file integrity verification. Then, the file size is determined. If it exceeds 2GB (this size is not fixed, but 1GB or 2GB is optimal; this parameter should not be set too high, as it should be at least one-quarter or less of the memory size to ensure that memory does not overflow and the system does not lag), the file is compressed. Then, bitstream splitting is performed, mainly dividing the file (e.g., the compressed file is 4GB) into eight smaller files of 512MB each. These smaller files are then encoded and transmitted sequentially. At the decoding end, after restoring these eight 512MB smaller files, the bitstream data of each smaller file is read sequentially, and the bitstream data is concatenated sequentially to restore a large compressed file. Finally, this large compressed file is decompressed, thus completing the entire encoding, decoding, and restoration process of the large file. (2) During data transmission using this system, some uncontrollable factors such as system lag and data loss are inevitable. This may cause the data of a certain image to be not restored when transmitting a large file, resulting in the failure to restore the entire file. Even if the file is retransmitted, the same problem will occur. However, after using the compression and splitting mechanism, if the 5th small file fails during the first transmission, we choose to retransmit. If the 4th small file fails to restore during the second transmission, we take the union of the first and second successful transmissions and can restore the file successfully. Therefore, the probability of the file being successfully decoded after retransmission when the large file transmission fails can be increased.

[0082] In some embodiments, the length L of the binary data of the target data to be transmitted is generally not a multiple of row*col*3. That is, the number of images n calculated at the end is not a positive integer, but a decimal. Therefore, when the calculation result n is a decimal, it means that the last image generated is an incomplete image. So we need to pad the target data so that the length of the binary data of the target data is a multiple of row*col*3 after padding. The padding data is bit(0). Then the number of bits(0) to be padded a is (row*col*3)-mod(L, (row*col*3)). After padding the bit(0) data, the binary length of the current target data becomes L'=L+a. At this time, the number of color data matrix images that can be generated by the target data is n=L' / (row*col*3).

[0083] In this invention, a color data matrix image has row * col columns, so it can have row * col color patches, and each color patch can contain 2 3 There are 8 possible colors, so the number of binary numbers (i.e., the length) that a single code can hold is row*col*3.

[0084] Step S103. After step S101, the encoding device begins matrix operations to generate a three-dimensional data matrix M1. i Since matrix operations are CPU-intensive, this invention employs multi-processing for acceleration. Compared to single-processing, the efficiency of multi-processing is related to the number of processes used. Specifically, the matrix operation method involves dividing the read target data bitstream into n bitstreams of length row*col*3, and then performing matrix operations on each of the n bitstreams of length row*col*3 to convert them into a corresponding three-dimensional matrix M1. i (row, col, 3), where i represents the i-th bit stream data segment, and the value of i ranges from 1 to n.

[0085] It should be noted here that the length of the binary stream data of the target data is the original L if no padding is performed, and the length of the data stream becomes L' if data padding is performed. Furthermore, if no data padding is performed, the number of bit streams n divided is the same as the number of color data matrix images that can be generated calculated in step S101. If data padding is performed, the number of segments n is the same as the number of images that can be generated after data padding.

[0086] In this invention, it should also be noted that `row` simultaneously represents the number of rows in the generated color data matrix image, and `col` simultaneously represents the number of columns in the generated color data matrix image. Therefore, the matrix operation method is to convert the bit stream information of length `row*col*3` into a three-dimensional matrix, where x, y, and z of the three-dimensional matrix are `row`, `col`, and 3, respectively.

[0087] Step S104. The encoding device converts the target data's file name and size, the current encoded i-th row*col*3 bitstream data, the number of bit(0) bits (a) used for file padding, the file reception time, and the data storage identifier, etc., into bitstream data as packet header information, and then performs matrix operations to convert it into a three-dimensional matrix M2. i (2,col,3).

[0088] In this invention, file reception time can be understood as the time it takes for the sending host system to receive the target data transmitted by network A.

[0089] Step S105. The encoding device encodes the three-dimensional data matrix M1. i Perform row XOR and column XOR operations, concatenate the resulting row and column XOR values, and convert them into a three-dimensional matrix M3. i (2,col,3), then according to M2 i M3 i M1 i The matrices are sequentially concatenated to form a three-dimensional data matrix M4. i (row+4,col,3), matrix M4 i The matrix data is used to generate the final image. This matrix is ​​then stored as a vector image using OpenCV, completing the overall data encoding operation. Finally, a color data matrix image is generated on the encoding device.

[0090] It should be noted that, in order to improve data transmission efficiency, this invention uses multiple display screens, and each display screen only displays the image from its corresponding storage path. There is a one-to-one correspondence between the storage path and the display screen. Therefore, the encoding device processes the generated three-dimensional matrix M4... iDuring storage, the storage path is determined to store the matrix in the correct path and display it on the corresponding screen. When calculating the storage path, the formula 'i mod k' is used for remainder calculation. The remainder is the storage path corresponding to the generated three-dimensional matrix. 'i' represents the i-th bitstream data currently being processed (i.e., the i-th bitstream data formed by segmenting the binary data stream of the target data mentioned earlier), and 'k' is the number of display devices. For example, this invention has four display screens (k = 4), which corresponds to four storage paths. These storage paths can be defined as 0, 1, 2, and 3, corresponding to the four display screens. If the currently encoded bitstream data is the 3rd bitstream data, 3 mod 4 = 3, then the corresponding three-dimensional data matrix M4 is generated from this data. i Stored in path number 3, if the current encoded bitstream data is the 4th bit, then 4mod4 = 0, and the corresponding 3D data matrix M4 is generated. i The data is stored in the path numbered 0, and so on. Correspondingly, to facilitate faster data storage, the camera and display screen numbers can be synchronized with the storage path numbers. That is, storage path 0 corresponds to display screen 0, and display screen 0 corresponds to camera 0. In this way, display screen 0 will display the image appearing in storage path 0, and camera 0 will take pictures of the image displayed on display screen 0.

[0091] Step S106. After an image appears in the storage path corresponding to the display screen located at the external network encoding end (the controller of the display screen scans its corresponding storage path in real time), the image is displayed in full screen. The display speed of the display screen is controlled to be 150ms (6.7 frames).

[0092] At the same time, the receiving host system located on the internal network will also perform decoding operations based on the color data matrix image encoded by the sending host system on the external network. The specific process is as follows:

[0093] C. Intranet Data Decoding

[0094] Step S203. The camera at the intranet decoding end captures the color data matrix image played on the display screen at the encoding end. Then, the decoding device at the intranet decoding end extracts the points of the color data matrix image captured by the camera according to the point matrix PM, thereby obtaining the data matrix DM captured by the camera for each frame. The data in matrix DM is distributed in the (0, 255) interval. In order to map matrix DM to a (0, 1) data matrix, matrix DM is first converted into an intermediate matrix Q by calculating Q = DM - CM. The data in the intermediate matrix Q is distributed in the (-255, 255) interval. Then, the values ​​less than 0 in the intermediate matrix Q are set to 0, and the values ​​greater than 0 are set to 1. Finally, a new matrix DM' is generated. DM' is the (0, 1) data matrix formed by DM mapping. Finally, the data extraction work of each frame is completed, and the binary data storage of the mapped DM' matrix is ​​performed.

[0095] In this invention, to ensure that every frame of image presented at the encoding end is captured by the camera at the decoding end, all cameras at the decoding end capture images displayed on the encoding end screen at a frame rate of 3x. The 3x frame rate refers to the camera's shooting frame rate being three times the display screen's frame rate.

[0096] Step S204. The decoding device decodes the obtained DM' matrix. First, it obtains the bit stream data of the first two rows of the DM' matrix, performs bit stream to string conversion on the bit stream data, and checks whether the data storage identifier exists. If it does not exist, the matrix is ​​discarded directly. If it exists, the data below the fourth row of the DM' matrix is ​​XORed with the rows and columns. The resulting XOR value is compared with the data in the third and fourth rows of the DM' matrix. If the values ​​are the same, it means that the data matrix data has useful file information. The DM' is saved, and the basic information of the matrix saved in the first two rows is stored in the Redis list for later processing.

[0097] In this invention, to facilitate decoding, the header information of the target data is usually stored in the first few rows of the data matrix. For example, the first two rows can store the data storage identifier, file name, and other information of the target data, while the third and fourth rows can store the original XOR value, etc.

[0098] Step S205. The file restoration device on the intranet reads the basic information existing in the Redis list, finds the corresponding DM' according to the information, reads the bit stream of DM' and performs data concatenation processing in sequence. After all the DM' data of the file has been concatenated, the file restoration operation is performed on the concatenated bit stream data.

[0099] In this invention, the generation of the color data matrix image involves color value conversion using a bitstream and RGB permutation combination (see Table 1 below), as detailed in the appendix to the specification. Figure 3 As shown, the bitstream 000001010100110101011 is converted to the corresponding image of black + blue + green + red + yellow + purple + cyan + white. The complete color data matrix image is shown below. Figure 2 As shown. Furthermore, this invention improves the speed of bitstreaming color value images through matrix operations, thereby increasing the overall encoding speed to 10MB / s. Under the premise of being identifiable, the number of rows and columns of color blocks in the image is 365 and 205, respectively. The amount of information that can be embedded in a single image under identifiable conditions is: row*col*3 / 1024 / 8 = 27.4KB, far exceeding the amount of information that a identifiable color QR code can hold (less than 1KB) under the same pixel conditions. This creates the possibility of achieving stable, reliable, and fast data transmission under physically isolated conditions.

[0100] Based on the same inventive concept, embodiments of the present invention also propose a physically isolated data transfer system based on a high-density color data matrix image. This system is used to implement the data transfer method under physically isolated conditions described in this embodiment. Specifically, refer to the appendix to the specification. Figure 1 The system includes: two networks, A and B, physically isolated by a unidirectional isolation channel with different security levels; a sending host system connected to network A; and a receiving host system connected to network B. The sending host system is an external network encoding end, primarily used to receive data transmitted from network A, encode it to generate a corresponding color data matrix image, and then play and display the generated image. The receiving host system is an internal network decoding end, primarily used to acquire the image played and displayed by the sending host system, decode the acquired image to release the data, thereby completing the unidirectional data transfer between the physically isolated networks. The specific architecture of the system is as follows:

[0101] The sending host system includes the following functional units:

[0102] The encoding initialization unit is used to generate an initialization image according to a set time interval and send it to the display unit;

[0103] The data encoding unit is used to receive data transmitted from network A, encode the data, generate a color data matrix image, and transmit it to the display unit.

[0104] The display unit is used to receive and display image data transmitted by the encoding initialization unit and the data encoding unit.

[0105] The receiving host system includes the following functional units:

[0106] The image acquisition unit is used to acquire images played and displayed by the display unit, including the initial image and color data matrix image.

[0107] The decoding initialization unit is used to generate initialization data based on the initialization image acquired by the image acquisition unit at the encoding end. The initialization data includes a point matrix and a color value threshold matrix.

[0108] The data decoding unit is used to decode the color data matrix image generated by the encoding end and the initialization data acquired by the image acquisition unit to release the data.

[0109] The file restoration unit is used to perform file restoration operations on the bit stream data decoded by the data decoding unit.

[0110] In this invention, the display unit is a display screen, and the encoding initialization unit and data encoding unit are integrated in the encoding device of the transmitting host system; the image acquisition unit is a camera, and the decoding initialization unit, data decoding unit and file restoration unit are integrated in the decoding device of the receiving host system.

[0111] The above description is merely a preferred embodiment of the present invention and is not intended to hinder the present invention in any way. Any simple modifications or equivalent changes made to the above embodiments based on the technical essence of the present invention shall fall within the protection scope of the present invention.

Claims

1. A method for physically isolated data transfer based on high-density color data matrix images, characterized in that, This includes initialization of both the external and internal network ends, data encoding on the external network end, and data decoding on the internal network end, as detailed below: A. Initialization of external and internal network terminals A.

1. External network initialization Step S101. The display device displays three initialization images—a point matrix diagram, a pure black image, and a pure white image—at set time intervals. A.

2. Intranet Initialization Step S201. The image acquisition device captures the point matrix diagram, pure black image and pure white image played by the external network display device one by one. First, the dynamic positioning algorithm is used to dynamically locate the points in the data matrix image based on the pure black image and the point matrix diagram to obtain the point matrix PM. Step S202. Extract the black value matrix BM of the pure black image and the white value matrix WM of the pure white image based on the point matrix PM, and then calculate the color value threshold matrix CM of the corresponding point matrix of the image; B. External network data encoding Step S102. The encoding device reads the length of the binary data stream of the target data, and calculates the number of images that can be generated from the current target data based on the length of the binary data stream and the length value row and width value col of the color data matrix image to be generated. Step S103. Divide the binary data stream of the read target data into n bit streams of length row × col × 3, and then perform matrix operations on the n bit streams of length row × col × 3 respectively to convert them into corresponding three-dimensional matrices. (row, col, 3); Step S104. Convert the description information of the target data as packet header information into bit stream data, and then perform matrix operations to convert it into a three-dimensional matrix. (2,col,3); Step S105. For the data matrix Perform row XOR and column XOR operations, concatenate the resulting row and column XOR values, and convert them into a three-dimensional matrix. (2, col, 3), concatenate the matrix in order. , as well as The concatenated data matrix is (row+4,col,3) represents the data matrix. The data is stored as a vector image and finally formed into a color data matrix image. Step S106. The display device plays the generated color data matrix image; C. Intranet Data Decoding Step S203. The image acquisition device captures the color data matrix image played by the display device. The decoding device extracts the points of the captured image according to the point matrix PM to obtain the data matrix DM of each frame captured by the image acquisition device. Then, the data matrix DM is converted into a (0,1) data matrix DM' to complete the numerical extraction of each frame of data, and the converted matrix DM' is stored in binary data. Step S204. The decoding device first obtains the bit stream data involving the data storage identifier in matrix DM', performs bit stream to string conversion on the bit stream data, and checks whether the data storage identifier exists. If it does not exist, the matrix is ​​discarded directly. If it exists, the data in matrix DM' is XORed with rows and columns. The resulting values ​​are compared with the original XOR values ​​in matrix DM'. If they are the same, matrix DM' is saved, and the packet header information in the matrix is ​​stored as basic information in a Redis list for later processing. Step S205. The file restoration device reads the basic information existing in the Redis list, finds the corresponding DM' matrix based on the basic information, reads the bit stream of the DM' matrix, and performs data concatenation processing in sequence. After all the DM' matrix data of the target data has been concatenated, the file restoration operation is performed on the concatenated bit stream data.

2. The method for physically isolated data transfer based on a high-density color data matrix image according to claim 1, characterized in that, When the number of images that can be generated from the target data is a decimal, the binary data stream of the target data is padded with bits (0).

3. The method for physically isolated data transfer based on a high-density color data matrix image according to claim 1, characterized in that, The calculation expression for the number of images that can be generated from the target data is n=L / (row×col×3), where n is the number of images and L is the length of the binary data stream.

4. The method for physically isolated data transfer based on a high-density color data matrix image according to claim 2, characterized in that, When filling data, the number of bits (0) to be filled is a, a = (row × col × 3) - mod (L, (row × col × 3)), where L is the length of the binary data stream.

5. The method for physically isolated data transfer based on a high-density color data matrix image according to claim 1, characterized in that, The descriptive information of the target data includes the file name and size, and the current encoding. The block bit stream data, the number of file padding bits (0), the file creation time, and the data storage identifier.

6. The method for physically isolated data transfer based on a high-density color data matrix image according to claim 1, characterized in that, The dynamic positioning algorithm includes: (1) reading the matrix data MPP of the point matrix map and the matrix data BPP of the pure black image, and obtaining a new matrix MPP' by MPP'=MPP-BPP; (2) performing binarization on MPP' to obtain the first center point of the image, and obtaining the second center point of the same row by a fixed distance based on the first center point, and so on to obtain all the center points corresponding to the row; (3) obtaining the second center point of the column by a fixed distance based on the first center point, and so on to obtain all the center points corresponding to the column; (4) combining the information of all the center points of the row and column into a point matrix PM.

7. The method for physically isolated data transfer based on a high-density color data matrix image according to claim 6, wherein the method for converting the data matrix DM into a (0,1) data matrix DM' is specifically as follows: The data matrix DM is first converted into an intermediate matrix Q by calculating Q = DM-CM. Then, the values ​​less than 0 in the intermediate matrix Q are set to 0, and the values ​​greater than 0 are set to 1, finally generating a new data matrix DM'.

8. A physically isolated data transfer system based on a high-density color data matrix image, characterized in that, The system is used to implement the data transfer method according to any one of claims 1-7, including a sending host system connected to network A and a receiving host system connected to network B; the sending host system is an external network encoding end, used to receive data transmitted from network A and encode it, generate a corresponding image, and then play and display the image; the receiving host system is an internal network decoding end, used to collect the image played and displayed by the sending host system, decode the collected image to release the data, thereby completing the one-way data transfer between physically isolated networks.

9. The physically isolated data transfer system based on a high-density color data matrix image according to claim 8, characterized in that, The system includes: An encoding initialization unit, located in the sending host system, is used to generate an initialization image at a set time interval and send it to the display unit. A data encoding unit, located in the sending host system, is used to receive target data transmitted from network A, encode the target data, generate a corresponding color data matrix image, and transmit it to the display unit. The display unit is located in the transmitting host system and is used to receive and display images transmitted by the encoding initialization unit and the data encoding unit. An image acquisition unit, located in the receiving host system, is used to acquire images displayed by the display unit. A decoding initialization unit is set in the receiving host system and is used to generate initialization data based on the initialization image acquired by the image acquisition unit. A data decoding unit, located in the receiving host system, is used to decode the color data matrix image based on the color data matrix image acquired by the image acquisition unit and the generated initialization data to release the data; The file restoration unit is located in the receiving host system and is used to perform file restoration operations on the data decoded by the data decoding unit.

Citation Information

Patent Citations

  • Data ferrying method for physical isolation environment

    CN114268454A

  • Quick internal and external network physical isolation data exchange device and method

    CN105975875A

  • Intranet-extranet physical isolation high-safety data exchange method based on two-dimensional code

    CN108270792A