Fast data transmission method and device based on video stream and two-dimensional code
By using video streams and QR codes to transmit data in the power system, the security limitations and high cost of forward isolation devices in the face of complex attacks are solved, and a safe and economical data transmission scheme is realized. The fault-tolerant mechanism and in-depth analysis ensure the integrity and accuracy of data.
Patent Information
- Application Number
- CN202410774214.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-17
- Publication Date
- 2024-09-10
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing forward isolation devices have security limitations in the face of complex attacks and are costly, making it difficult to effectively respond to network security threats in the power system.
Using a fast data transmission method based on video streaming and QR codes, the QR code data is generated on a high-security host and recorded as a video, and then sent to a low-security host using a mobile phone. The original data is restored through image recognition and in-depth analysis to achieve data security. Secure transmission.
It reduces the cost of data transmission while improving security. The fault-tolerance mechanism and in-depth analysis of the QR code ensure the integrity and accuracy of the data.
Smart Images

Figure CN118632074A
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of electric power information technology, and in particular relates to a fast data transmission method and device based on video stream and two-dimensional code. Background Art
[0002] The safe and stable operation of the power system is of great significance to the protection of social production and life, but it faces various network security threats such as hacker attacks and network viruses. In order to cope with these threats, isolation devices are needed in the power system to improve the safety of the system.
[0003] In the power system, data transmission from a host with a high security level to a host with a low security level (such as the management information area to the production control area of the power monitoring system) usually needs to go through a forward isolation device. This device allows TCP responses but prohibits TCP responses from the low security area to the high security area from carrying application data, thereby ensuring that the data flow transmission is unidirectional, thereby enhancing data security.
[0004] However, the current forward isolation device has the following problems:
[0005] 1. Security risks;
[0006] Although the isolation device itself needs to have a high level of security protection capabilities, including the use of a microprocessor with a non-INTEL instruction system, a secure and hardened operating system, and an effective security audit mechanism, it may have limitations in dealing with complex attacks. For example, some attackers may exploit vulnerabilities or deceptions in the forward isolation device to bypass the restrictions of the isolation device and enter the intranet to attack. In addition, if the isolation device is not configured correctly or used improperly, it may also increase security risks.
[0007] 2. High cost;
[0008] Currently, the price of forward isolation devices on the market ranges from thousands to tens of thousands of yuan due to different functions, performances, and manufacturers, which is very costly for users. Summary of the invention
[0009] The present invention proposes a fast data transmission method and device based on video stream and QR code, which adopts QR code as information carrier and transmits data from a host with a high security level to a host with a low security level by recording QR code pictures through video, so as to achieve the purpose of ensuring information security and reducing costs.
[0010] To achieve the above object, the specific scheme of the present invention is achieved as follows:
[0011] A fast data transmission method based on video stream and QR code, comprising:
[0012] S1. The high-security host of the power system encodes and compresses the transmission data file to be generated, cuts the compressed and encoded byte stream, and generates a QR code for the cut data respectively;
[0013] S2, record the playback video of the QR code through the mobile phone and send it safely to the low-security host of the power system;
[0014] S3, the low-security host cuts the playback video of the QR code into pictures according to the frame rate, and obtains the QR code through image recognition;
[0015] S4. The low-security host performs in-depth analysis on the identified QR code, splices the information data obtained from the analysis, performs corresponding decompression and decoding, restores it to the original data, and writes it into a file.
[0016] Furthermore, in step S1, the data header information is added to the head of the cut data, including the starting number of sheets, the total number of sheets and a timestamp.
[0017] Furthermore, the deep analysis in step S4 includes: during the decoding process of the two-dimensional code, according to the data header information, following the format of the start frame, total number of frames, timestamp, and information data, the integrity is checked.
[0018] Furthermore, when recording the QR code playback video in step S2, a playback time threshold of each QR code is set according to the recording frame rate to determine whether there are redundant images in each QR code after cutting.
[0019] On the other hand, the present invention also proposes a fast data transmission device based on video stream and QR code, comprising:
[0020] QR code generation module: The high-security host of the power system encodes and compresses the transmission data file to be generated, cuts the compressed and encoded byte stream, and generates QR codes for the cut data respectively;
[0021] Recording and sending module: record the playback video of the QR code through the mobile phone and send it safely to the low-security host of the power system;
[0022] QR code recognition module: The low-security host cuts the playback video of the QR code into pictures according to the frame rate, and obtains the QR code through image recognition;
[0023] Restoration module: The low-security host performs in-depth analysis on the identified QR code, splices the information data obtained from the analysis, performs corresponding decompression and decoding, restores it to the original data, and writes it into a file.
[0024] Furthermore, in the QR code generation module, the cutting data adds data header information at the head, including the starting number of sheets, the total number of sheets and a timestamp.
[0025] Furthermore, in the restoration module, the deep analysis includes: during the decoding process of the two-dimensional code, according to the data header information, following the format of the start frame, total number of frames, timestamp, and information data, the integrity is checked.
[0026] Furthermore, when recording a QR code playback video in the recording and sending module, a playback time threshold of each QR code is set according to the recording frame rate to determine whether there are redundant images for each QR code.
[0027] Compared with the prior art, the present invention has the following beneficial effects:
[0028] The fast data transmission method and device based on video stream and QR code proposed in the present invention uses QR code as information carrier, quickly plays QR code pictures and records videos, and cuts the videos into QR code pictures and restores them back to original data. The method has low cost and high security. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 It is a schematic diagram of a flow chart of an embodiment of the present invention. DETAILED DESCRIPTION
[0030] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments may be combined with each other.
[0031] The present invention will be further described below in conjunction with specific embodiments.
[0032] Take the user-side equipment (high-security host) with a high security level located in the production environment of the power system as an example.
[0033] 1. The user-side device is responsible for generating a QR code for the data to be exported in the production environment. The specific process includes:
[0034] 1. First, use the LZ77 compression algorithm and Huffman coding to encode, compress and package the export data files to be generated to reduce the file size and improve data transmission efficiency.
[0035] 2. Read the encoded, compressed and packaged data in the form of a byte stream and store it in a cache array for subsequent processing.
[0036] 3. Cut the data in the cache array according to the set size of each data segment (for example, 1784 bytes, this parameter can be adjusted according to the actual situation). Add 16 bytes of data header information before each segment after cutting, including the starting number of sheets, the total number of sheets and the timestamp information to ensure the integrity and correctness of the QR code data.
[0037] 4. According to the above steps, each segment of data is cut and processed to generate a QR code image for easy scanning and identification.
[0038] 2. Record the playback video of the QR code through a mobile phone and send it safely to a device with a low safety level (low-security host) in the power system.
[0039] You can use the automatic switching function to rotate the generated QR code, record the video with your mobile phone and upload it to the server on the service side or send it directly to other devices with low security levels. When recording the video, it is recommended to set the mobile phone video resolution and frame rate to 1080p and 30fps or above.
[0040] When the video frame rate is set to 30 frames per second, the video content per second can be cut into 30 independent pictures according to the frame rate; therefore, the playback time threshold of each QR code picture can be set to 200 milliseconds during recording, that is, 5 QR code pictures are played per second, so that after recording, when the video is cut according to the frame rate, each QR code can be cut into 6 redundant pictures (30÷5). This approach further strengthens the fault tolerance mechanism of the QR code itself.
[0041] 3. The server or a device with a low security level (low-security host) receives the video sent on-site, cuts the video into pictures according to the frame rate, and obtains the QR code through image recognition.
[0042] Based on the above fault-tolerance mechanism, each QR code can be cut into 6 redundant images, and the QR code can be obtained through image recognition; in most cases, each QR code can be accurately read and recognized. In extreme cases, if there are unrecognized QR code images, the system will prompt and provide a manual photo upload function.
[0043] 4. Perform in-depth analysis on the identified QR code, stitch together the information data obtained from the analysis, perform corresponding decompression and decoding, restore it to the original data, and write it into a file.
[0044] 1. Preprocess the QR code image, accurately identify and locate the QR code area, and use efficient decoding technology to extract the information stream from the QR code image.
[0045] 2. Perform in-depth analysis on the extracted byte stream data, strictly follow the format standard of "starting number of sheets, total number of sheets, timestamp, information data", and perform rigorous checks on its integrity to ensure the accuracy of the data.
[0046] 3. Splice the completely parsed information data together, and perform corresponding decompression and decoding operations corresponding to the previous encoding compression to restore it to the original data.
[0047] 4. Write the restored original data into a file, complete the restoration from the QR code to the original file, and send it to the designated user.
[0048] The above steps in this embodiment involve parameter descriptions:
[0049] QR code length: The number of bytes contained in a single generated QR code. The default value is 1800 bytes.
[0050] Slideshow interval: The playback duration of each QR code in video recording mode, the default value is 200 milliseconds.
[0051] The auxiliary operations involved in this embodiment include:
[0052] Click Upload: Select the file to be exported and automatically generate a QR code.
[0053] Hide details: Hide the QR code information and display the company profile.
[0054] Pause: Click to pause playback in playback mode.
[0055] Start: Click to start a 3-second countdown, and automatically play the QR code image according to the interval length of the carousel image.
[0056] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A fast data transmission method based on video stream and QR code, characterized in that: include: S1. The high-security host of the power system encodes and compresses the transmission data file to be generated, cuts the compressed and encoded byte stream, and generates a QR code for the cut data respectively; S2, record the playback video of the QR code through the mobile phone and send it safely to the low-security host of the power system; S3, the low-security host cuts the playback video of the QR code into pictures according to the frame rate, and obtains the QR code through image recognition; S4. The low-security host performs in-depth analysis on the identified QR code, splices the information data obtained from the analysis, performs corresponding decompression and decoding, restores it to the original data, and writes it into a file.
2. The fast data transmission method based on video stream and QR code according to claim 1, characterized in that: In step S1, the cutting data is added with data header information at the head, including the starting number of sheets, the total number of sheets and a timestamp.
3. The fast data transmission method based on video stream and QR code according to claim 2, characterized in that: The deep analysis in step S4 includes: during the decoding process of the two-dimensional code, according to the data header information, following the format of the start frame, total number of frames, timestamp, and information data, the integrity is checked.
4. The fast data transmission method based on video stream and QR code according to claim 2, characterized in that: When recording the QR code playback video in step S2, the playback time threshold of each QR code is set according to the recording frame rate to determine whether there are redundant images after each QR code is cut.
5. A fast data transmission device based on video stream and QR code, characterized in that: include: QR code generation module: The high-security host of the power system encodes and compresses the transmission data file to be generated, cuts the compressed and encoded byte stream, and generates QR codes for the cut data respectively; Recording and sending module: record the playback video of the QR code through the mobile phone and send it safely to the low-security host of the power system; QR code recognition module: The low-security host cuts the playback video of the QR code into pictures according to the frame rate, and obtains the QR code through image recognition; Restoration module: The low-security host performs in-depth analysis on the identified QR code, splices the information data obtained from the analysis, performs corresponding decompression and decoding, restores it to the original data, and writes it into a file.
6. The fast data transmission device based on video stream and QR code according to claim 5, characterized in that: In the QR code generation module, the cutting data adds data header information at the head, including the starting number of sheets, the total number of sheets and a timestamp.
7. The fast data transmission method based on video stream and QR code according to claim 6, characterized in that: In the restoration module, the deep analysis includes: during the decoding process of the two-dimensional code, according to the data header information, following the format of the start frame, total number of frames, timestamp, and information data, the integrity is checked.
8. The fast data transmission method based on video stream and QR code according to claim 5, characterized in that: When recording a QR code playback video in the recording and sending module, the playback time threshold of each QR code is set according to the recording frame rate to determine whether there are redundant images for each QR code.
Citation Information
Patent Citations
Industrial field data transmission method based on streaming media
CN110545449A
One-way graph gate system and device suitable for power monitoring system
CN112994233A
Efficient data transmission method based on two-dimensional code video
CN114330610A
File storage and transmission method based on continuous dynamic two-dimensional code
CN115426348A
Device, method, storage medium, and terminal for controlling video stream data playing
US20190228804A1
