Data transmission system, data transmission method, equipment and storage medium
By encoded the data to be transmitted into an image form and using physically isolated one-way optical signal transmission, the security and reliability problems of data transmission in optical fiber communication are solved, and high security and high reliability data transmission is achieved.
Patent Information
- Application Number
- CN202510218444.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-25
- Publication Date
- 2025-06-27
AI Technical Summary
In the prior art, the one-way gate of optical fiber communication has fiber reflection problems during data transmission, resulting in an increase in data security risks and the reliability of transmitted data cannot be guaranteed, which increases the risk of data loss or error.
By encoded the data to be transmitted in an image form, the physical isolation between the transmitter and the receiver is used to ensure the security and reliability of the data transmission through only one-way optical signal transmission.
Effectively hide the original format and content of the data, avoid malicious tampering, and improve the security of data transmission; through the data checksum retransmission mechanism at the receiving end, the data integrity and accuracy are ensured, reducing the risk of data loss or error.
Smart Images

Figure CN120223355A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of computer data transmission, and particularly to a data transmission system, a data transmission method, a device, and a storage medium. Background Art
[0002] With the development of technology, the security of data transmission between networks with different security levels has become increasingly important. In the prior art, in order to ensure the secure transmission of data between these networks, it is generally achieved through a one-way network gateway based on optical fiber communication. However, the problem of optical fiber reflection leads to a security risk that data refracts out from the optical fiber entrance, which seriously affects the security of data transmission. Moreover, this method cannot guarantee the reliability of the transmitted data, further increasing the risk of data loss or error. Summary of the Invention
[0003] In view of the above problems, embodiments of the present invention are proposed to provide a data transmission system, a data transmission method, a device, and a storage medium that overcome the above problems or at least partially solve the above problems.
[0004] To solve the above problems, embodiments of the present invention disclose a data transmission system, which includes a first classified network terminal, a sending end, a receiving end, and a second classified network terminal; the first classified network terminal is connected to the sending end; the receiving end is connected to the second classified network terminal;
[0005] The first classified network terminal is configured to send data to be transmitted to the sending end;
[0006] The sending end is configured to encode the data to be transmitted to obtain an encoded image and display the encoded image;
[0007] The receiving end is configured to scan the encoded image and parse the encoded image. When the parsed data is abnormal, it controls the sending end to re-send the abnormal data until the parsed data is normal and then sends the parsed data to the second classified network terminal.
[0008] Optionally, the sending end includes a first processor and a display screen; the first processor is connected to the display screen;
[0009] The first processor is configured to encode the data to be transmitted to obtain the encoded image and send the encoded image to the display screen;
[0010] The display screen is configured to display the encoded image.
[0011] Optionally, the receiving end includes a scanning module, a second processor, and a first diode, and the sending end further includes a second diode;
[0012] The scanning module is configured to scan the encoded image displayed on the display screen and send the encoded image to the second processor;
[0013] The second processor is configured to parse the encoded image to obtain the parsed data, determine whether the parsed data is abnormal, and if the parsed data is abnormal, control the first diode to output an optical signal;
[0014] The second diode is configured to identify the optical signal and transmit the optical signal to the first processor;
[0015] The first processor is further configured to re - send the abnormal data according to the optical signal.
[0016] Optionally, the optical signal includes a low - level signal and a high - level signal; the first processor is further configured to, when the duration of the low - level signal is greater than the duration of the high - level signal, re - transmit the data to be transmitted from the initial moment of the data to be transmitted.
[0017] Optionally, the first processor is further configured to, when the duration of the low - level signal is the same as the duration of the high - level signal, determine the breakpoint position of the data to be transmitted and re - transmit the data to be transmitted from the breakpoint position.
[0018] Optionally, the first processor is further configured to obtain the data transmission rate, transmission start timestamp, and interruption timestamp of the data to be transmitted, determine the transmission duration according to the transmission start timestamp and the interruption timestamp; determine the amount of data already transmitted according to the transmission duration and the data transmission rate; and determine the breakpoint position according to the amount of data already transmitted and the total amount of data to be transmitted.
[0019] Optionally, the sending end further includes a pressure sensing module, and the receiving end includes a mechanical sensing module, a second processor, and an identification module;
[0020] The identification module is configured to identify the encoded image and send the encoded image to the second processor;
[0021] The second processor is configured to parse the encoded image, determine whether the parsed data is abnormal, and if the parsed data is abnormal, control the mechanical sensing module to move in a direction close to the pressure sensing module;
[0022] The pressure sensing module is configured to, when detecting the pressure of the mechanical sensing module, control the first processor to re - send the abnormal data.
[0023] Optionally, the pressure sensing module is further configured to determine the location information of the abnormal transmission data according to the pressure, and control the first processor to retransmit the data to be transmitted according to the location information.
[0024] The present invention also discloses a data transmission method, which is applied to the data transmission system as described above. The data transmission system includes a first-level network terminal, a sending end, a receiving end, and a second-level network terminal. The method includes:
[0025] Sending the data to be transmitted to the sending end through the first-level network terminal;
[0026] Encoding the data to be transmitted by the sending end to obtain an encoded image, and displaying the encoded image;
[0027] Scanning the encoded image by the receiving end, and parsing the encoded image. When the parsed data is abnormal, controlling the sending end to retransmit the abnormal data until the parsed data is normal, and sending the parsed data to the second-level network terminal.
[0028] Optionally, the sending end includes a first processor and a display screen. The encoding the data to be transmitted by the sending end to obtain an encoded image, and displaying the encoded image includes:
[0029] Encoding the data to be transmitted by the first processor to obtain the encoded image, and sending the encoded image to the display screen;
[0030] Displaying the encoded image through the display screen.
[0031] Optionally, the receiving end includes a scanning module, a second processor, and a first diode, and the sending end further includes a second diode;
[0032] The scanning the encoded image by the receiving end, and parsing the encoded image. When the parsed data is abnormal, controlling the sending end to retransmit the abnormal data includes:
[0033] Scanning the encoded image displayed on the display screen by the scanning module, and sending the encoded image to the second processor;
[0034] Parsing the encoded image by the second processor to obtain the parsed data, and determining whether the parsed data is abnormal. If the parsed data is abnormal, controlling the first diode to output an optical signal;
[0035] Identifying the optical signal by the second diode, and transmitting the optical signal to the first processor;
[0036] The first processor re - transmits the abnormal data according to the optical signal.
[0037] The present invention also discloses an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. The processor is used to execute the steps of the industrial video data transmission method as described above.
[0038] The present invention also discloses a computer - readable storage medium. A computer program is stored on the computer - readable storage medium, and when the computer program is executed by a processor, the steps of the industrial video data transmission method as described above are implemented.
[0039] The embodiments of the present invention include the following advantages:
[0040] The present invention discloses a data transmission system, a data transmission method, a device, and a storage medium. By encoding the data to be transmitted in the form of an image for transmission, the present invention effectively hides the original format and content of the data, avoids malicious tampering during data transmission, and improves the security of data transmission. After the receiving end parses the encoded image, it will verify the obtained data. When an abnormality is judged, the sending end is immediately notified to re - transmit the abnormal data, ensuring the integrity and accuracy of the data and reducing the risk of data loss or error. There is no direct electrical connection between the sending end and the receiving end of the present invention, achieving physical isolation, that is, only unidirectional optical signal transmission, ensuring the reliability and security of data transmission, and avoiding interference or fault propagation that may be caused by electrical connection. Description of the Drawings
[0041] Figure 1 is a structural block diagram of a data transmission system provided by an embodiment of the present invention;
[0042] Figure 2 is a structural block diagram of another data transmission system provided by an embodiment of the present invention;
[0043] Figure 3 is a structural block diagram of another data transmission system provided by an embodiment of the present invention;
[0044] Figure 4 is a flowchart of the steps of a data transmission method provided by an embodiment of the present invention. Detailed Embodiments
[0045] To make the above - mentioned objects, features, and advantages of the present invention more obvious and understandable, the present invention will be further described in detail below with reference to the drawings and specific embodiments.
[0046] One of the core concepts of the embodiments of the present invention is that the present invention can transmit the data to be transmitted in the form of an image, effectively hiding the original format and content of the data, avoiding malicious tampering during data transmission, and improving the security of data transmission; after the receiving end parses the encoded image, the data obtained will be verified. When an abnormality is judged, the sending end will be immediately notified to retransmit the abnormal data, ensuring the integrity and accuracy of the data and reducing the risk of data loss or error; the present invention is not only applicable to data transmission within a classified network, but also can be applied to data transmission between a classified network and an unclassified network. This adaptability enables the system to be flexibly deployed in a variety of network environments and can meet the data transmission requirements in different scenarios; there is no direct electrical connection between the sending end and the receiving end of the present invention, achieving physical isolation, that is, only unidirectional optical signal transmission, ensuring the reliability and security of data transmission and avoiding interference or fault propagation that may be caused by electrical connection.
[0047] Referring to Figure 1 , a structural block diagram of a data transmission system 10 provided by an embodiment of the present invention is shown. The data transmission system 10 includes a first classified network terminal 101, a sending end 102, a receiving end 103, and a second classified network terminal 104; the first classified network terminal is connected to the sending end; the receiving end is connected to the second classified network terminal;
[0048] In the embodiments of the present invention, the data transmission system 10 can be composed of four main parts, namely a first classified network terminal, a sending end, a receiving end, and a second classified network terminal. The first classified network terminal is connected to the sending end, and the receiving end is connected to the second classified network terminal. A data transmission path is formed between them. There is no connection of any electrical devices and no physical device connection path between the sending end and the receiving end, ensuring that the receiving end and the sending end are completely independent.
[0049] The first classified network terminal 101 is used to send the data to be transmitted to the sending end.
[0050] In the embodiments of the present invention, the role of the first classified network terminal 10 is to serve as the starting point of the data. When there is data that needs to be transmitted from the first classified network terminal to the second classified network terminal, the first classified network terminal 101 will send the data to be transmitted to the connected sending end. The data to be transmitted here can be various types of data, such as text, images, videos, etc.; it should be noted that the first classified network terminal can be a high-classified network terminal, that is, a network terminal with a higher security level.
[0051] The sending end 102 is used to encode the data to be transmitted to obtain an encoded image and display the encoded image.
[0052] In an embodiment of the present invention, after the sending end 101 receives the data to be transmitted from the first classified network terminal, it can perform encoding processing on these data. The purpose of encoding is to convert the data into a format suitable for transmission in the form of an image, and finally obtain an encoded image. After that, the sending end will display this encoded image, and this display can be on the screen of the sending end itself or through other display devices.
[0053] It should be noted that the encoded image can be a QR code image or a barcode image, and which specific type it is is not limited here.
[0054] In one example, taking the encoded image as a QR code as an example for explanation, the sending end 102 first calculates the total number of bytes of the data to be transmitted; the sending end 102 uses the 40th version of the QR code and the "L" error correction rate as the standard image encoding format. Each QR code can accommodate 2953 bytes. Among them, the first byte is used as the status identification bit, the second and third bytes are jointly used as the sequence number identification bit, and the remaining 2950 bytes are used to store data; the sending end divides the total number of bytes of the data to be transmitted by the number of bytes stored in each QR code (2950), and the result of the calculation after rounding down is the number of QR code images that need to be sent. The original data is split in units of the number of bytes stored in the QR code. The data from 1 to 2950 bytes is the first QR code data image, the data from 2951 to 2950*2 bytes is the second QR code data image, the data from 2950*2 + 1 to 2950*3 bytes is the third QR code data image, and so on. By analogy, the last data image is filled with 0 if it is not full; the status identification bit, the sequence number identification bit, and a QR code data image jointly form a QR code image in sequence; the sending end arranges the QR code images into a QR code sequence according to the sequence number identification bit, sets the status identification bit of the first image to 10 as the starting point of the data, sets the status identification bit of the last image to 01 as the end of the data, and sets the status identification bits of the remaining images to 11 as the intermediate nodes of the data. If there is only one QR code image, and this image is both the first image and the last image, then the status identification bit is set to 00, so as to obtain the final QR code image.
[0055] The receiving end 103 is used to scan the encoded image and parse the encoded image. When the parsed data is abnormal, it controls the sending end to re-send the abnormal data until the parsed data is normal and then sends the parsed data to the second classified network terminal 104.
[0056] In an embodiment of the present invention, the main task of the receiving end 103 is to scan the encoded image displayed by the sending end, obtain the information in the encoded image through scanning, parse this information, and restore the encoded image to a data form. During the parsing process, the receiving end will check the parsed data to determine whether the data is normal. Here, "data anomaly" can include various situations such as incomplete data, incorrect data format, and failed data verification.
[0057] It should be noted that the methods for verifying the parsed data can include various types such as parity check and CRC check. Which specific one to choose is not limited here.
[0058] If the receiving end finds data anomaly during the parsing process, it will control the sending end to re - send the abnormal data. That is to say, the receiving end will send an instruction to the sending end, requesting the sending end to re - send the data part that caused the parsing anomaly again. After receiving this instruction, the sending end will re - send the corresponding abnormal data, and the receiving end will scan and parse the re - sent data again until the parsed data is normal.
[0059] When the receiving end successfully parses and obtains normal data, it will send the parsed data to the second - level security network terminal connected to it. In this way, the data completes the transmission process from the first - level security network terminal through the sending end and the receiving end, and finally reaches the second - level security network terminal.
[0060] It should be noted that the second - level security network terminal can be a network terminal with a lower security level, that is, the security level of the second - level security network terminal is lower than that of the first - level security network terminal, so as to realize that the data transmission link is unidirectional, and data can only be transmitted from a high - level security network to a low - level security network. Conversely, only a small amount of optical signals are fed back from the low - level security network to the high - level security network, and the security risk is controllable.
[0061] The present invention discloses a data transmission system. The present invention can transmit the data to be transmitted in the form of an encoded image, effectively hiding the original format and content of the data, avoiding malicious tampering during data transmission, and improving the security of data transmission. After the receiving end parses the encoded image, it will verify the obtained data. When an abnormality is judged, the sending end will be immediately notified to re-transmit the abnormal data, ensuring the integrity and accuracy of the data and reducing the risk of data loss or error. The present invention is not only applicable to data transmission within a classified network, but also can be applied to data transmission between a classified network and an unclassified network. This adaptability enables the system to be flexibly deployed in various network environments and can meet the data transmission requirements in different scenarios. There is no direct electrical connection between the sending end and the receiving end of the present invention, achieving physical isolation, that is, only unidirectional optical signal transmission, ensuring the reliability and security of data transmission and avoiding interference or fault propagation that may be caused by electrical connection.
[0062] In an embodiment of the present invention, as Figure 2 , a structural block diagram of another data transmission system 10 provided by an embodiment of the present invention is shown; the sending end 102 may include a first processor 1021 and a display screen 1022; the first processor 1021 is connected to the display screen 1022;
[0063] The first processor 1021 is used to encode the data to be transmitted to obtain an encoded image and send the encoded image to the display screen; the display screen 1022 is used to display the encoded image.
[0064] In an embodiment of the present invention, the first processor 1021 is the core processing unit of the sending end 102. It is responsible for encoding the data to be transmitted. In practical applications, various types of processors can be used for the first processor, such as a central processing unit (CPU), a digital signal processor (DSP), or a field programmable gate array (FPGA), etc. These processors have different characteristics and advantages and can be selected according to specific application scenarios and performance requirements. For example, for scenarios with high requirements for data processing speed and complex algorithms, a powerful CPU can be selected; while for situations that require real-time processing of a large amount of data, a DSP or FPGA may be more suitable.
[0065] There are various types of display screens 1022, such as a liquid crystal display (LCD), an organic light emitting diode display (OLED), etc. When selecting a display screen, parameters such as its resolution, brightness, and contrast need to be considered to ensure that the encoded image can be clearly and accurately displayed for the receiving end to scan.
[0066] The first processor 1021 can receive data to be transmitted through the connection channel with the first-level security network terminal. This connection channel can be a wired connection, such as Ethernet, USB, etc., or a wireless connection, such as Wi-Fi, Bluetooth, etc. During the data reception process, the first processor can perform preliminary checks and verifications on the received data to ensure the integrity and accuracy of the data. For example, check whether the length of the data meets the expectations and whether the format of the data is correct, etc.
[0067] When the first processor 1021 encodes the data, it will select a suitable encoding algorithm according to the type and characteristics of the data to be transmitted. Common encoding algorithms include two-dimensional code encoding algorithms (such as QR codes), bar code encoding algorithms, etc. Taking the QR code as an example, it has advantages such as large encoding capacity and strong error correction ability, and is suitable for transmitting various types of data, such as text, website addresses, images, etc. If the data to be transmitted is a text message, the first processor will call the QR code encoding algorithm to convert the text data into the corresponding QR code image data.
[0068] After selecting the encoding algorithm, the first processor 1021 will perform encoding processing on the data to be transmitted according to the rules of the algorithm. Specifically, the encoding process includes the following steps: (1) Data preprocessing: Perform necessary processing on the received data to be transmitted, such as data format conversion, character encoding conversion, etc., to ensure that the data meets the requirements of the encoding algorithm; (2) Encoding calculation: According to the rules of the encoding algorithm, calculate the preprocessed data to generate the pixel information of the encoded image; for example, for QR code encoding, the color value (black or white) of each pixel point will be calculated according to the content and error correction level of the data; (3) Image generation: Combine the pixel information obtained from the encoding calculation into complete encoded image data, and this encoded image data is usually stored in the memory of the first processor in a specific image format (such as PNG, JPEG, etc.).
[0069] After the first processor 1021 completes the generation of the encoded image, it will send the encoded image data to the display screen 1022 through the connection channel with the display screen. During the sending process, in order to ensure the stability and reliability of data transmission, some data transmission protocols may be adopted, such as SPI (Serial Peripheral Interface), IC (Integrated Circuit Bus), etc. These protocols stipulate the data transmission format, timing, and error handling mechanism, and can effectively avoid errors and losses during data transmission.
[0070] After receiving the encoded image data sent by the first processor, the display screen 1022 will decode and display it. Specifically, the display screen 1022 will convert the encoded image data into corresponding pixel signals according to its own display driver, and then control each pixel point on the display screen to emit light, so as to display the encoded image. During the display process, the display screen will optimize the image according to its own display parameters (such as resolution, refresh rate, etc.) to ensure the clarity and stability of the display effect.
[0071] The present invention can ensure that the sending end efficiently and stably encodes the data to be transmitted into an image and displays it by adopting a reliable data transmission protocol and an exception handling mechanism, providing a strong guarantee for the normal operation of the entire data transmission system.
[0072] In an embodiment of the present invention, as Figure 2 , the receiving end 103 may include a scanning module 1031, a second processor 1032, and a first diode 1033, and the sending end further includes a second diode 1023; the scanning module is used to scan the encoded image displayed on the display screen and send the encoded image to the second processor; the second processor is used to parse the encoded image to obtain the parsed data and determine whether the parsed data is abnormal. If the parsed data is abnormal, it controls the first diode to output an optical signal; the second diode is used to identify the optical signal and transmit the optical signal to the first processor; the first processor is used to resend the abnormal data according to the optical signal.
[0073] In the embodiment of the present invention, the scanning module 1031 may be a component with a scanning function. In one example, the scanning module 1031 is a high-speed camera. The scanning module 1031 may adopt a high-resolution and high-frame-rate camera to ensure that the encoded image on the display screen can be clearly and quickly captured. After the sending-end display screen displays the encoded image, the scanning module starts to work. The specific steps are as follows: (1) Image capture: The camera focuses on the display screen and captures the optical information of the encoded image. During this process, in order to improve the image quality, the scanning module will automatically adjust parameters such as exposure time and contrast; (2) Image conversion: Convert the captured optical image information into digital image data, and the format is usually a common image file format, such as JPEG or PNG; (3) Data transmission: Send the digital image data to the second processor through a high-speed data transmission interface (such as USB3.0 or Ethernet interface).
[0074] After receiving the encoded image data, the second processor 1032 will perform the following operations:
[0075] (1) Image preprocessing: Perform preprocessing operations on the image, such as noise reduction, contrast enhancement, and edge detection, to improve the clarity and resolvability of the image. For example, use the Gaussian filtering algorithm to remove noise from the image and use the histogram equalization algorithm to enhance the contrast of the image.
[0076] (2) Encoding and parsing: Parse the preprocessed image according to the encoding algorithm used by the sending end (such as the QR code encoding algorithm). During the parsing process, the second processor extracts the encoding information in the image and converts it into the original data format.
[0077] (3) Data anomaly judgment: The second processor 1032 checks the parsed data according to the preset rules and conditions to determine whether it is abnormal. These rules include but are not limited to:
[0078] Data integrity check: Check whether the length of the data meets the expectation. For example, if the expected data length is 1024 bytes, but the length of the parsed data is only 512 bytes, it is determined that the data is abnormal.
[0079] Data format check: Check whether the data meets the specific format requirements. For example, the data should be a certain specific file format (such as JSON, XML). If the format of the parsed data does not meet the requirements, it is determined to be abnormal.
[0080] The data can be verified using a checksum (such as CRC check) or a hash algorithm (such as MD5, SHA-1). If the calculated check value is inconsistent with the check value provided by the sending end, it is determined that the data is abnormal. The specific method used to check the data can be selected according to the requirements and is not limited here.
[0081] If the second processor 1032 determines that the parsed data is abnormal, it will trigger an abnormal data processing process: (1) The first diode outputs an optical signal: The second processor sends a control signal to the first diode through a GPIO (General-Purpose Input / Output) interface. The first diode uses a high-brightness and narrow-beam light-emitting diode to ensure that the optical signal can be accurately transmitted to the second diode at the sending end. The encoding method of the optical signal can adopt Pulse Code Modulation (PCM), and different abnormal information, such as data loss, format error, etc., can be represented by different pulse sequences; (2) The second diode 1023 receives the optical signal: The second diode at the sending end uses a high-sensitivity photodetector to accurately receive the optical signal emitted by the first diode. After the second diode receives the optical signal, it converts it into an electrical signal; (3) Control the first processor to retransmit the data: The second diode 1023 can transmit the converted electrical signal to the first processor 1021. After receiving this signal, the first processor determines the abnormal data part that needs to be resent according to the abnormal information carried in the signal. Then, the first processor re-encodes the abnormal data and displays the encoded image on the display screen again, entering the next round of data transmission and processing process until the data parsed at the receiving end is normal.
[0082] It should be noted that the first diode can be a light-emitting diode, and the second diode can be a light-emitting diode.
[0083] In another example, if the second processor 1032 verifies that the data is normal, it controls the indicator light of the first diode 1033 to remain off at this time. The second diode 1023 does not receive the optical signal. The timer of the first processor 1021 at the sending end identifies that no abnormal information has been received within a certain period of time, and then continues to transmit the next piece of data.
[0084] To avoid infinite loop retransmission operations, the second processor 1032 can set an upper limit on the number of retry times. When the number of retransmissions reaches the upper limit and normal data still cannot be successfully parsed, the second processor will send an error report to the relevant management system to prompt manual intervention.
[0085] Through the collaborative work of components such as the scanning module, the second processor, the first diode, and the second diode at the sending end, and by combining multiple abnormal judgment and processing mechanisms, the present invention can effectively improve the accuracy and reliability of data transmission and ensure the stable operation of the system.
[0086] In an embodiment of the present invention, the optical signal includes a low-level signal and a high-level signal; the first processor is further configured to retransmit the data to be transmitted from the initial moment of the data to be transmitted when the duration of the low-level signal is greater than the duration of the high-level signal.
[0087] In an embodiment of the present invention, the second diode 1023 can monitor the surrounding environment in real time, identify the optical signal emitted by the first diode 1033 at the receiving end, convert the received optical signal into an electrical signal, and transmit it to the first processor 1021 through a dedicated data transmission line.
[0088] After receiving the electrical signal, the first processor 1021 decodes it to restore the low-level signal and high-level signal in the optical signal.
[0089] The first processor can have a built-in timer to accurately measure the duration of the low-level signal and high-level signal. If the duration of the low-level signal is not greater than the duration of the high-level signal, the first processor determines the abnormal data part that needs to be retransmitted according to the abnormal information carried by the optical signal.
[0090] In an example, if the first processor 1021 detects that a 500ms low-level signal and a 100ms high-level signal alternate, it can determine that there is a serious problem with data transmission and the current task needs to be retransmitted. When the first processor 1021 detects that the duration of the low-level signal is greater than the duration of the high-level signal, it can determine that there is a serious problem with the current data transmission and all the data to be transmitted needs to be retransmitted from the initial moment of the data to be transmitted. At this time, the first processor 1021 re-encodes the entire data to be transmitted to generate a complete encoded image and sends it to the display screen for display.
[0091] To avoid wasting system resources due to infinite retransmission, the first processor can set an upper limit on the number of retransmissions. When the number of retransmissions reaches the upper limit and the data still fails to be transmitted successfully, the first processor sends an error report to the system management module to prompt manual intervention.
[0092] Through the process of the receiving end detecting data anomalies and sending optical signals, and the sending end retransmitting abnormal data or all the data to be transmitted according to the optical signals, the present invention ensures the accuracy and reliability of data transmission and improves the stability and performance of the system through reasonable component design, signal processing, and anomaly handling mechanisms.
[0093] In an embodiment of the present invention, the first processor is further configured to determine the breakpoint position of the data to be transmitted and retransmit the data to be transmitted from the breakpoint position when the duration of the low-level signal is the same as the duration of the high-level signal.
[0094] In an embodiment of the present invention, after receiving an electrical signal, the first processor 1021 can use the built-in signal decoding circuit and timer to decode the electrical signal, restore the low-level signal and high-level signal in the optical signal, and accurately measure their durations. In one example, if the first processor 1021 monitors the alternating switching of a 100 ms low-level signal and a 100 ms high-level signal, it determines that the current data transmission is not very serious and breakpoint resumption can be performed.
[0095] During the data transmission process, the first processor 1021 assigns a unique identifier and sequence number to each data block and records the transmission status of each data block. When it detects that the durations of the low-level signal and the high-level signal are the same, the first processor determines the breakpoint position of the data to be transmitted based on the previously recorded transmission status information and in combination with the abnormal data position feedback by the receiving end. For example, by analyzing the sequence number of the data block and the transmission success flag, it finds the last successfully transmitted data block, and the starting position of its next data block is the breakpoint position.
[0096] Starting from the breakpoint position, the first processor re-encodes the subsequent data to be transmitted to generate a new encoded image, and then sends the new encoded image to the display screen for display, restarting the data transmission process for this part.
[0097] In an embodiment of the present invention, when the first processor determines that the duration of the low-level signal is less than the duration of the high-level signal, the first processor can determine the specific abnormal data part according to the abnormal information carried by the optical signal, and re-encode and transmit this part of the abnormal data.
[0098] Through the specific process of the receiving end detecting data anomalies and sending optical signals, and the sending end performing data retransmission with different strategies according to the optical signal characteristics, the present invention effectively guarantees the accuracy and reliability of data transmission and improves the overall performance and stability of the system through the collaborative work of each component and a perfect anomaly handling mechanism.
[0099] In an embodiment of the present invention, the first processor 1021 is further configured to obtain the data transmission rate, transmission start timestamp, and interruption timestamp of the data to be transmitted, determine the transmission duration according to the transmission start timestamp and the interruption timestamp; determine the amount of data already transmitted according to the transmission duration and the data transmission rate; and determine the breakpoint position according to the amount of data already transmitted and the total amount of data to be transmitted.
[0100] In the embodiment of the present invention, when the data transmission starts, the first processor 1021 monitors the data sending situation in real time. It calculates the data transmission rate by counting the amount of data sent within a certain time interval. For example, within a short time window t, the first processor records the number of data bytes D sent, then the data transmission rate v can be calculated by the formula D / t.
[0101] To ensure the accuracy of the data transmission rate, the first processor continuously monitors and updates it. Because during the actual transmission process, the data transmission rate may change due to various factors such as network conditions and device performance. Therefore, the first processor recalculates the data transmission rate regularly (such as every 100 ms) and uses the latest value for subsequent calculations.
[0102] When the first processor starts to send the data to be transmitted to the display screen for encoding and display, it immediately records the current system time as the transmission start timestamp t1. The system time can be obtained through the real-time clock (RTC) module inside the first processor, and this module can provide accurate time information.
[0103] When the first processor receives the optical signal indicating data abnormality from the second diode, it immediately records the system time at this time as the interruption timestamp t2. Similarly, this time information is also obtained from the real-time clock module.
[0104] The first processor determines the transmission duration T through a simple subtraction operation based on the obtained transmission start timestamp t1 and interruption timestamp t2, that is, T = t2 - t1. Since the timestamps are usually in milliseconds (ms), the calculated transmission duration is also in milliseconds.
[0105] After obtaining the transmission duration T and the data transmission rate v, the first processor can calculate the amount of transmitted data according to the formula d = v * T. Here, it should be noted that since the unit of the data transmission rate v may be bytes per second (B / s), and the unit of the transmission duration T is milliseconds, unit conversion is required during the calculation. For example, if the unit of v is B / s and the unit of T is ms, then T needs to be converted to seconds, that is, T1 = T / 1000, and then calculate d = T1 * v.
[0106] Before starting to transmit data, the first processor knows in advance the total amount D of the data to be transmitted 总 . This total amount information can be provided to the first processor by the system configuration or other modules during the data preparation stage.
[0107] According to the amount of transmitted data d and the total amount D of the data to be transmitted 总, the first processor can determine the breakpoint position, which can be represented by the offset of the data, i.e., the number of bytes from the start position of the data to the breakpoint. This offset is equal to the amount of data d that has been transmitted. When the first processor re-transmits the data subsequently, it will start encoding the remaining data from this breakpoint position and re-display the encoded image through the display screen to continue completing the data transmission.
[0108] The present invention can determine the breakpoint position based on the data transmission rate, the transmission start timestamp, and the interruption timestamp, thereby realizing re-transmission of data from the breakpoint position and improving the efficiency and reliability of data transmission.
[0109] In an embodiment of the present invention, the sending end further includes a pressure sensing module, and the receiving end includes a mechanical sensing module, a second processor, and an identification module; the identification module is used to identify the encoded image and send the encoded image to the second processor; the second processor is used to parse the encoded image and determine whether the parsed data is abnormal. If the parsed data is abnormal, it controls the mechanical sensing module to move in the direction close to the pressure sensing module; the pressure sensing module is used to control the first processor to re-send the abnormal data when detecting the pressure of the mechanical sensing module.
[0110] As Figure 3 , the structural block diagram of another data transmission system 10 provided by the embodiment of the present invention is shown. The sending end may include a first processor 1021, a display module 1022, and a pressure sensing module 1024, and the receiving end may include a mechanical sensing module 1034, a second processor 1032, and an identification module 1031;
[0111] When the second processor 1032 determines that the parsed data is abnormal, it will generate a control signal. This control signal is an electrical signal, and its parameters (such as voltage, current, etc.) can be set according to the driving requirements of the mechanical sensing module. The second processor 1032 sends the control signal to the mechanical sensing module 1034 through a dedicated control line.
[0112] The mechanical sensing module 1034 internally includes a driving motor and a transmission device. When receiving the control signal sent by the second processor, the driving motor starts to work, and converts the rotational motion of the motor into a linear motion through the transmission device, so that the mechanical sensing module moves in the direction close to the pressure sensing module at the sending end.
[0113] In one example, the mechanical sensing module 1034 may include a spring and an electromagnetic relay. When receiving the control signal, after the electromagnetic relay switch is closed, the electromagnetic relay is energized, generates a magnetic field, attracts the armature, and then pushes the spring to elongate.
[0114] To ensure that the mechanical sensing module can accurately contact the pressure sensing module, the mechanical sensing module can also be equipped with a position sensor and a feedback control system. The position sensor monitors the position of the mechanical sensing module in real time and feeds back the position information to the control system of the driving motor. The control system adjusts the operating parameters of the driving motor according to the feedback information, thereby precisely controlling the moving distance and speed of the mechanical sensing module.
[0115] The pressure sensing module usually adopts a piezoresistive pressure sensor. When the mechanical sensing module approaches and contacts the pressure sensing module, it will generate a certain pressure on the pressure sensing module. The pressure sensor converts the pressure signal into an electrical signal, and the magnitude of the output electrical signal is proportional to the pressure received. The signal processing circuit inside the pressure sensing module amplifies, filters, and processes the electrical signal output by the sensor, and then transmits the processed electrical signal to the first processor. After receiving the electrical signal from the pressure sensing module, the first processor identifies and judges it. If the intensity and variation law of the electrical signal meet the preset pressure trigger conditions, the first processor considers that the pressure of the mechanical sensing module has been detected; according to the previously recorded abnormal data information, the first processor recodes the abnormal data part, and then sends the recoded image data to the display screen, and the display screen displays the coded image again, thereby realizing the retransmission of the abnormal data.
[0116] In an embodiment of the present invention, the pressure sensing module is further configured to determine the position information of the abnormal occurrence of the data to be transmitted according to the pressure, and control the first processor to retransmit the data to be transmitted according to the position information.
[0117] The pressure sensing module is generally designed to have a certain spatial resolution, that is, it can distinguish the pressure changes at different positions. If the data transmission is abnormal at a certain moment, the pressure sensing module can detect the pressure abnormality at this moment, and then determine the specific position where the data transmission is abnormal according to the pressure change.
[0118] After determining the position information of the data abnormality, the pressure sensing module can control the first processor to retransmit the data to be transmitted according to the position information.
[0119] In one example, if the starting point of the position information is: close to the starting position of the data to be transmitted, and the end point is close to the end position of the data to be transmitted, in order to ensure the security of data transmission, the first processor can be controlled to retransmit from the starting position of the data to be transmitted.
[0120] In one example, if the starting point of the position information is: close to the end position of the data to be transmitted, and the end point is the end position of the data to be transmitted, the first processor can be controlled to retransmit the abnormal data from this position.
[0121] In another example, if the pressure sensing module 1024 does not receive any sensing signal at this time, it indicates that the system is operating normally, and the next data can be sent continuously at this time.
[0122] To avoid mis-triggering of the pressure sensing module due to external interference, a reasonable pressure threshold will be set. Only when the pressure detected by the pressure sensing module exceeds this threshold will the first processor trigger the data retransmission operation.
[0123] After receiving the pressure sensing signal, the first processor will not immediately perform data retransmission. Instead, it will detect whether the pressure signal persists within a short period of time multiple times. Only if the pressure signal stably exists in multiple detections will the data retransmission operation be executed.
[0124] It should be noted that buffer materials such as rubber pads can be used at the contact part between the mechanical sensing module and the pressure sensing module to reduce the impact force during contact, avoid damage to the module, and improve the accuracy of pressure detection at the same time.
[0125] When the receiving end detects data anomalies in the present invention, the sending end can be accurately triggered to re-send the abnormal data through mechanical sensing and pressure sensing, thereby improving the accuracy and reliability of data transmission.
[0126] The present invention discloses a data transmission system. The present invention can transmit the data to be transmitted in the form of an encoded image, effectively hiding the original format and content of the data, avoiding malicious tampering during data transmission, and improving the security of data transmission; after the receiving end parses the encoded image in the present invention, it will check the obtained data. When an anomaly is judged, the sending end will be immediately notified to re-send the abnormal data, ensuring the integrity and accuracy of the data and reducing the risk of data loss or error; the present invention is not only applicable to data transmission within a classified network, but also can be applied to data transmission between a classified network and a non-classified network. This adaptability enables the system to be flexibly deployed in various network environments and can meet the data transmission requirements in different scenarios; there is no direct electrical connection between the sending end and the receiving end of the present invention, achieving physical isolation, that is, only unidirectional optical signal transmission, ensuring the reliability and security of data transmission, and avoiding interference or fault propagation that may be caused by electrical connection.
[0127] For the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple. For the relevant parts, refer to the partial description of the method embodiment.
[0128] Refer to Figure 4, which shows the step flowchart of a data transmission method provided by an embodiment of the present invention. The method is applied to the data transmission system as described above. The data transmission system includes a first-classified network terminal, a sending end, a receiving end, and a second-classified network terminal. The method may include the following steps:
[0129] Step 201, send the data to be transmitted to the sending end through the first-classified network terminal;
[0130] Step 202, encode the data to be transmitted through the sending end to obtain an encoded image, and display the encoded image;
[0131] Step 203, scan the encoded image through the receiving end and parse the encoded image. When the parsed data is abnormal, control the sending end to re-send the abnormal data until the parsed data is normal and send the parsed data to the second-classified network terminal.
[0132] In an embodiment of the present invention, the sending end includes a first processor and a display screen; the first processor is connected to the display screen. Encoding the data to be transmitted through the sending end to obtain an encoded image and displaying the encoded image includes:
[0133] Encode the data to be transmitted through the first processor to obtain an encoded image, and send the encoded image to the display screen; display the encoded image through the display screen.
[0134] In an embodiment of the present invention, the receiving end includes a scanning module, a second processor, and a first diode, and the sending end further includes a second diode. Scanning the encoded image through the receiving end and parsing the encoded image. When the parsed data is abnormal, controlling the sending end to re-send the abnormal data includes: scanning the encoded image displayed on the display screen through the scanning module and sending the encoded image to the second processor; parsing the encoded image through the second processor to obtain the parsed data, and determining whether the parsed data is abnormal. If the parsed data is abnormal, control the first diode to output an optical signal; identify the optical signal through the second diode, transmit the optical signal to the first processor, and re-send the abnormal data according to the optical signal through the first processor.
[0135] In an embodiment of the present invention, the optical signal includes a low-level signal and a high-level signal. Re-sending the abnormal data according to the optical signal through the first processor includes: when the duration of the low-level signal is greater than the duration of the high-level signal through the first processor, re-transmit the data to be transmitted from the initial moment of the data to be transmitted.
[0136] In an embodiment of the present invention, the first processor re - transmits abnormal data according to the optical signal, and further includes: when the duration of the low - level signal is the same as the duration of the high - level signal, the first processor determines the breakpoint position of the data to be transmitted, and re - transmits the data to be transmitted from the breakpoint position.
[0137] In an embodiment of the present invention, when the duration of the low - level signal is the same as the duration of the high - level signal, the first processor determines the breakpoint position of the data to be transmitted, including: obtaining the data transmission rate, transmission start timestamp, and interruption timestamp of the data to be transmitted, determining the transmission duration according to the transmission start timestamp and the interruption timestamp; determining the amount of data already transmitted according to the transmission duration and the data transmission rate; and determining the breakpoint position according to the amount of data already transmitted and the total amount of data to be transmitted.
[0138] In an embodiment of the present invention, the sending end further includes a pressure sensing module, and the receiving end includes a mechanical sensing module, a second processor, and an identification module; when the receiving end scans the encoded image and parses the encoded image, and controls the sending end to re - transmit abnormal data when the parsed data is abnormal, it includes:
[0139] The identification module identifies the encoded image and sends the encoded image to the second processor; the second processor parses the encoded image and determines whether the parsed data is abnormal. If the parsed data is abnormal, it controls the mechanical sensing module to move in the direction close to the pressure sensing module; when the pressure sensing module detects the pressure of the mechanical sensing module, it controls the first processor to re - transmit the abnormal data.
[0140] In an embodiment of the present invention, when the pressure sensing module detects the pressure of the mechanical sensing module, it controls the first processor to re - transmit the abnormal data, including: the pressure sensing module determines the position information where the data to be transmitted is abnormal according to the pressure, and controls the first processor to re - transmit the data to be transmitted according to the position information.
[0141] The present invention discloses a data transmission method. The present invention can transmit the data to be transmitted by encoding it into an image form, effectively hiding the original format and content of the data, avoiding malicious tampering during the data transmission process, and improving the security of data transmission. After the receiving end parses the encoded image, it will verify the obtained data. When an abnormality is judged, the sending end will be immediately notified to retransmit the abnormal data, ensuring the integrity and accuracy of the data and reducing the risk of data loss or error. The present invention is not only applicable to data transmission within a classified network, but also can be applied to data transmission between a classified network and an unclassified network. This adaptability enables the system to be flexibly deployed in various network environments and can meet the data transmission requirements in different scenarios. There is no direct electrical connection between the sending end and the receiving end of the present invention, achieving physical isolation, that is, only unidirectional optical signal transmission, ensuring the reliability and security of data transmission and avoiding the interference or fault propagation that may be caused by electrical connection.
[0142] The present invention also discloses an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor is used to execute the steps of the data transmission method as described above.
[0143] The present invention also discloses a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the data transmission method as described above are implemented.
[0144] Each embodiment in this specification is described in a progressive manner. The key point of each embodiment is to illustrate the differences from other embodiments. The same or similar parts among the embodiments can be referred to each other.
[0145] Those skilled in the art should understand that the embodiments of the present invention can be provided as a method, a device, or a computer program product. Therefore, the embodiments of the present invention can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the embodiments of the present invention can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memories, CD-ROMs, optical memories, etc.) containing computer-usable program codes.
[0146] Embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, and the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate means for implementing the functions specified in one process Figure 1 one process or multiple processes and / or blocks Figure 1 or multiple blocks.
[0147] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal device to work in a specific manner, so that the instructions stored in the computer-readable memory generate a manufactured article including instruction means, and the instruction means implements the functions specified in one process Figure 1 one process or multiple processes and / or blocks Figure 1 or multiple blocks.
[0148] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device, so that a series of operation steps are executed on the computer or other programmable terminal device to generate a computer-implemented process, and thus the instructions executed on the computer or other programmable terminal device provide steps for implementing the functions specified in one process Figure 1 one process or multiple processes and / or blocks Figure 1 or multiple blocks.
[0149] Although the preferred embodiments of the embodiments of the present invention have been described, those skilled in the art can make additional changes and modifications to these embodiments once they learn the basic creative concepts. Therefore, the appended claims are intended to be construed as including the preferred embodiments and all changes and modifications falling within the scope of the embodiments of the present invention.
[0150] Finally, it should also be noted that in this text, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or terminal device comprising a series of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or terminal device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, article or terminal device comprising said element.
[0151] The above has introduced in detail a data transmission system, a data transmission method, a device and a storage medium provided by the present invention. Specific examples are used in this text to elaborate on the principle and implementation manner of the present invention. The description of the above embodiments is only used to help understand the method and its core idea of the present invention; at the same time, for those of ordinary skill in the art, according to the idea of the present invention, there will be changes in the specific implementation manner and application scope. In summary, the content of this specification should not be construed as a limitation to the present invention.
Claims
1. A data transmission system, characterized in that: The data transmission system comprises a first classified network terminal, a sending end, a receiving end, and a second classified network terminal; the first classified network terminal is connected to the sending end; the receiving end is connected to the second classified network terminal; The first confidentiality level network terminal is used to send the data to be transmitted to the sending end; The transmitting end is used to encode the data to be transmitted to obtain an encoded image, and display the encoded image; The receiving end is used to scan the coded image and parse the coded image. When the parsed data is abnormal, the sending end is controlled to resend the abnormal data until the parsed data is normal and the parsed data is sent to the second confidentiality level network terminal.
2. The system according to claim 1, characterized in that The transmitting end includes a first processor and a display screen; the first processor is connected to the display screen; The first processor is used to encode the data to be transmitted to obtain the encoded image, and send the encoded image to the display screen; The display screen is used to display the encoded image.
3. The system according to claim 2, characterized in that The receiving end includes a scanning module, a second processor and a first diode, and the transmitting end also includes a second diode; The scanning module is used to scan the coded image displayed on the display screen and send the coded image to the second processor; The second processor is used to parse the coded image to obtain parsed data, determine whether the parsed data is abnormal, and if the parsed data is abnormal, control the first diode to output an optical signal; The second diode is used to identify the optical signal and transmit the optical signal to the first processor; The first processor is used to resend the abnormal data according to the optical signal.
4. The system according to claim 3, characterized in that The optical signal includes a low-level signal and a high-level signal; the first processor is further used to retransmit the data to be transmitted from the initial moment of the data to be transmitted when the duration of the low-level signal is greater than the duration of the high-level signal.
5. The system according to claim 4, characterized in that The first processor is further configured to determine a breakpoint position of the data to be transmitted, and retransmit the data to be transmitted from the breakpoint position when the duration of the low-level signal is the same as the duration of the high-level signal.
6. The system according to claim 5, characterized in that The first processor is further configured to obtain a data transmission rate, a transmission start timestamp, and an interruption timestamp of the data to be transmitted, and determine a transmission duration according to the transmission start timestamp and the interruption timestamp; The amount of data transmitted is determined according to the transmission duration and the data transmission rate; and the breakpoint position is determined according to the amount of data transmitted and the total amount of data to be transmitted.
7. The system according to claim 2, characterized in that The transmitting end further includes a pressure sensing module, and the receiving end includes a mechanical sensing module, a second processor and an identification module; The recognition module is used to recognize the coded image and send the coded image to the second processor; The second processor is used to analyze the coded image and determine whether the analyzed data is abnormal. If the analyzed data is abnormal, the mechanical sensing module is controlled to move toward the pressure sensing module. The pressure sensing module is used to control the first processor to resend the abnormal data when the pressure of the mechanical sensing module is detected.
8. The system according to claim 7, characterized in that The pressure sensing module is further used to determine, based on the pressure, location information of the data to be transmitted where an abnormality occurs, and control the first processor to resend the data to be transmitted based on the location information.
9. A data transmission method, characterized in that: The method is applied to the data transmission system according to any one of claims 1 to 7, wherein the data transmission system comprises a first confidentiality level network terminal, a sending end, a receiving end, and a second confidentiality level network terminal; the method comprises: Sending the data to be transmitted to the transmitting end through the first confidentiality level network terminal; Encoding the data to be transmitted by the transmitting end to obtain an encoded image, and displaying the encoded image; The receiving end scans the coded image and parses the coded image. When the parsed data is abnormal, the sending end is controlled to resend the abnormal data until the parsed data is normal, and the parsed data is sent to the second confidentiality level network terminal.
10. The method according to claim 9, characterized in that The transmitting end includes a first processor and a display screen; the encoding of the data to be transmitted by the transmitting end to obtain an encoded image and displaying the encoded image includes: Encoding the data to be transmitted by the first processor to obtain the encoded image, and sending the encoded image to the display screen; The encoded image is displayed via the display screen.
11. The method according to claim 10, characterized in that The receiving end includes a scanning module, a second processor and a first diode, and the transmitting end also includes a second diode; The receiving end scans the coded image and parses the coded image, and when the parsed data is abnormal, controls the sending end to resend the abnormal data, including: Scanning the coded image displayed on the display screen by the scanning module, and sending the coded image to the second processor; parsing the coded image by the second processor to obtain parsed data, determining whether the parsed data is abnormal, and if the parsed data is abnormal, controlling the first diode to output an optical signal; identifying the optical signal by the second diode, and transmitting the optical signal to the first processor; The abnormal data is resent according to the optical signal by the first processor.
12. An electronic device, characterized in that: include: A processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein when the computer program is executed by the processor, the steps of the data transmission method according to any one of claims 9 to 11 are implemented.
13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the data transmission method according to any one of claims 9 to 11 are implemented.