Cross-terminal data transmission device and transmission method based on two-dimensional code technology

By using a cross-terminal data transmission device and method based on QR code technology, the problem of low efficiency in computer data transmission under conditions of no physical connection is solved, realizing automated and highly stable data transmission, and improving work efficiency and equipment adaptability.

CN121173802APending Publication Date: 2025-12-19SHANXI PINGYANG IND MACHINERY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511466923.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-14
Publication Date
2025-12-19

AI Technical Summary

Technical Problem

Traditional data transfer methods between computers in different network environments rely on manual CD burning, which is cumbersome and inflexible, resulting in low work efficiency.

Method used

A cross-terminal data transmission device and method based on QR code technology is adopted. Data is segmented and encoded into optically encoded image sequences, and automatic data transmission is achieved without physical connection by using an optical display module and an image acquisition module.

Benefits of technology

It enables automated data transmission between computers, improving transmission efficiency and accuracy, saving human and material resources, and providing plug-and-play functionality and environmental adaptability for the devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121173802A_ABST
    Figure CN121173802A_ABST
Patent Text Reader

Abstract

The invention discloses a cross-terminal data transmission device and transmission method based on a two-dimensional code technology. The device comprises a data sending module which is configured at a data sending end and is used for cutting and coding a to-be-transmitted file into an optical coding image sequence; and the data receiving module is configured at a data receiving end and is used for receiving and recombining the acquired optical coding image sequence data so as to recover the file to be transmitted. The optical display module is connected with the data transmitting end and is used for displaying the optical coding image sequence; and the image acquisition module is connected with the data receiving end and is used for acquiring the optical coding image sequence. According to the method, manual work is replaced by computer programs, data transmission between computers without physical connection is achieved, and manpower and material resources brought by optical disc burning are saved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of information technology, specifically to a cross-terminal data transmission device and method based on QR code technology. Background Technology

[0002] Currently, if two computers are in different network environments and the data sender and receiver cannot be physically connected, traditional data transmission relies on a dedicated person burning CDs. This process is not only cumbersome and requires specialized hardware and software, but also lacks flexibility. With the increasing frequency of data updates, this traditional method has severely hampered work efficiency. Summary of the Invention

[0003] This invention provides a cross-terminal data transmission device and method based on QR code technology, which replaces the outdated method of manually burning optical discs in the prior art. It realizes automatic data transmission between computers under the condition of no physical connection, so as to solve the technical problems of low work efficiency and waste of human and material resources in the prior art.

[0004] In a first aspect, the present invention provides a cross-terminal data transmission device based on QR code technology, comprising: a data transmission module configured at a data transmission end, used to cut and encode the file to be transmitted into an optically encoded image sequence; The data receiving module, configured at the data receiving end, is used to receive and reassemble the acquired optically encoded image sequence data to recover the file to be transmitted; An optical display module, connected to the data transmitter, is used to display optically encoded image sequences; The image acquisition module, connected to the data receiver, is used to acquire optically encoded image sequences; During operation, the data transmission module first responds to user instructions by calling its data segmentation and encoding functions to segment the file to be transmitted into multiple sequentially arranged data blocks according to a predetermined size; it records the number of all data blocks and sets them as sequence codes; then, it attaches a sequence code and a sequence number to each data block, assembles them into data packets, and independently encodes each data packet into a frame of optically encoded image, thereby generating a continuous sequence of optically encoded images.

[0005] Next, in response to the instructions from the data transmission module, the optical display module receives and displays the optically encoded image sequence in a loop according to its preset refresh rate.

[0006] Meanwhile, the image acquisition module is configured to continuously acquire the optically encoded images displayed by the optical display module and perform image decoding operations to restore each frame of the optically encoded image into the corresponding data packet, and then transmit the data packet to the data receiving end.

[0007] Finally, the data receiving module is configured to perform a data receiving and reassembly process: it receives data packets from the image acquisition module, parses each data packet to extract data block data, sequence code and its sequence number; based on the sequence code and sequence number, it reassembles all data blocks in the correct order, and finally restores and outputs a file consistent with the file to be transmitted.

[0008] Optionally, a cross-terminal data transmission device based on QR code technology further includes: a housing, an optical display module, and an image acquisition module integrated within the housing in a fixed relative position.

[0009] Optionally, the optical display module can be connected to the data transmitter via a video interface cable.

[0010] The image acquisition module is connected to the data receiver via a universal data bus cable.

[0011] Secondly, the present invention provides a cross-terminal data transmission method based on QR code technology, comprising the following steps: S1, Encode the file to be transmitted into a QR code image sequence and display the QR code image sequence; Encoding the file to be transmitted into a QR code image sequence includes: dividing the file to be transmitted into multiple parts, each part being a data block, recording the number of all data blocks and setting it as a sequence code, encoding one data block to obtain a QR code image, and setting one QR code image as a sequence number, so as to convert the file to be transmitted into a QR code image sequence; Each QR code image in the QR code image sequence carries a sequence code and a sequence number; S2, acquire the QR code image from the QR code image sequence, and transmit the QR code image to the data receiving end so that the data receiving end can recognize the QR code image sequence, decode the QR code image sequence and reassemble it into a file to be transmitted.

[0012] Optionally, in step S1, encoding the file to be transmitted into a QR code image sequence specifically involves: S11, Open the file to be transferred and obtain the attribute information of the file to be transferred; The attribute information includes the name, type, and size of the file to be transferred; Determine if the file to be transferred is empty; if it is empty, terminate this process. Otherwise, set the start and end addresses of each data block and start a thread to encode a data block into a QR code image.

[0013] Optionally, step S11 may also include: starting multiple threads.

[0014] Optionally, step S1 may further include: S12, set the starting address of each data block to the current address, and determine whether the current address points to the ending address; If the current address points to the end address, then re-evaluate; If the current address does not point to the end address, extract the data block corresponding to the current address, convert the data block into an input format acceptable to the encoder, encapsulate it with the sequence code and sequence number into a data packet, and encode it into a QR code image sequence; The QR code image sequence is displayed cyclically on the optical display module; When the current address points to the next data block, the current address equals the current address plus the data block length; Ask the user if they want to end the program. If they do, close the original data file to be transferred; otherwise, repeatedly check if the current address points to the end address.

[0015] Optionally, in step S12, when the QR code image sequence is displayed cyclically to the optical display module, the frequency of the cyclic display of the QR code image sequence is matched with the frequency of acquiring the QR code image sequence.

[0016] Optionally, step S2 includes: S21, the image acquisition module acquires the QR code image sequence displayed by the optical display module, decodes it into a data packet, and transmits it to the data receiving end; S22, the data receiving end parses and reassembles the data packets into a file to be transmitted; Optionally, step S22 specifically includes: S221 identifies all available image acquisition device serial ports; Enable all identified serial ports and create an independent data receiving thread for each successfully enabled serial port; S222, each data receiving thread performs the following loop operation: Read data packets from its bound serial port; The read data packets are parsed to obtain the sequence code, sequence number, and data block data. Check whether the sequence code and sequence number of the current data block, as well as the data block data, have been successfully received and stored; If already stored, continue reading subsequent data blocks from the image acquisition unit's serial port; If not stored, record the data of the current data block and mark its sequence number as received; Real-time statistics and display of sequence numbers of all data blocks not marked as received; Verify that all data blocks have been marked as received: If so, write all data blocks to a new file in sequence, save, and then terminate the program. If not, repeat step S222.

[0017] This invention is rationally designed, using computer programs to replace manual labor, solving the problem of data transmission between computers without physical connections, saving the human and material resources required for burning optical discs, and has great practical application value. Attached Figure Description

[0018] Figure 1 This is a structural block diagram of a cross-terminal data transmission device based on QR code technology in one embodiment of the present invention; Figure 2 This is a flowchart of a cross-terminal data transmission method based on QR code technology in one embodiment of the present invention; Figure 3 This is a flowchart of steps S11 and S12 in one embodiment of the present invention; Figure 4 This is a flowchart of steps S221 and S222 in one embodiment of the present invention.

[0019] In the diagram: 1-Data transmitter, 2-Data receiver, 3-Optical display module, 4-Image acquisition module, 5-Box, 6-Video interface cable, 7-Universal data bus cable. Detailed Implementation

[0020] The specific embodiments of the present invention will now be described in detail with reference to the accompanying drawings.

[0021] In a first aspect, one embodiment of the present invention provides a cross-terminal data transmission device based on QR code technology, referring to... Figure 1 include: The data transmission module, configured at the data transmission end 1, is used to cut and encode the file to be transmitted into an optically encoded image sequence. The data receiving module, configured at the data receiving end 2, is used to receive and reassemble the acquired optically encoded image sequence data to recover the file to be transmitted.

[0022] Optical display module 3, connected to data transmitter 1, is used to display optically encoded image sequences; Image acquisition module 4 is connected to data receiver 2 and is used to acquire optically encoded image sequences.

[0023] An embodiment of the present invention provides a cross-terminal data transmission device based on QR code technology, which uses computer programs to replace manual labor, solves the problem of data transmission between computers without physical connection, and saves manpower and material resources for burning optical discs.

[0024] In one specific embodiment, reference Figure 1A cross-terminal data transmission device based on QR code technology also includes: a housing 5, an optical display module 3 and an image acquisition module 4 integrated in a fixed relative position within the housing 5.

[0025] Specifically, the enclosure 5 rigidly integrates the optical display module 3 and the image acquisition module 4 with a preset, optimized relative positional relationship, constructing a relatively stable and reliable optical transmission environment. This structural design allows the image acquisition field of view to cover the optical display area relatively completely, clearly, and continuously, effectively eliminating recognition errors caused by relative component displacement. This integrated solution not only significantly improves the stability and reliability of data transmission but also ensures the normal operation of the equipment in complex environments by shielding against environmental interference and providing physical protection. Simultaneously, the integrated design enables plug-and-play functionality, greatly improving deployment efficiency and ultimately ensuring the overall performance and practicality of the optical transmission system.

[0026] In one specific embodiment, the optical display module 3 is connected to the data transmitting end 1 via the video interface cable 6; the image acquisition module 4 is connected to the data receiving end 2 via the universal data bus cable 7.

[0027] Secondly, one embodiment of the present invention provides a cross-terminal data transmission method based on QR code technology, as described above. Figure 2 ,include: S1, Encode the file to be transmitted into a QR code image sequence and display the QR code image sequence; Encoding the file to be transmitted into a QR code image sequence includes: dividing the file to be transmitted into multiple parts, each part being a data block, recording the number of all data blocks and setting it as a sequence code, encoding one data block to obtain a QR code image, and setting one QR code image as a sequence number, so as to convert the file to be transmitted into a QR code image sequence; Each QR code image in the QR code image sequence carries a sequence code and a sequence number; S2, acquire the QR code image from the QR code image sequence, and transmit the QR code image to the data receiving end so that the data receiving end can recognize the QR code image sequence, decode the QR code image sequence and reassemble it into a file to be transmitted.

[0028] This invention intelligently segments the file to be transmitted into data blocks and encodes them into a sequence of QR code images carrying verification codes and serial numbers for display. Then, through image acquisition and backend decoding and reassembly, it realizes automated data transmission across terminals, effectively solving the problem of data exchange between terminals in physically isolated environments. This method not only replaces the traditional manual CD burning method, greatly improving transmission efficiency and accuracy, but also ensures the integrity and order of data through a verification mechanism, while saving manpower and equipment resources.

[0029] In one specific embodiment, reference Figure 3 In step S1, encoding the file to be transmitted into a QR code image sequence specifically involves: S11, Open the file to be transferred and obtain the attribute information of the file to be transferred; The attribute information includes the name, type, and size of the file to be transferred; Determine if the file to be transferred is empty; if it is empty, terminate this process. Otherwise, set the start and end addresses of each data block and start a thread to encode a data block into a QR code; In one specific embodiment, reference Figure 3 In step S1, encoding the file to be transmitted into a QR code image sequence specifically involves: S11, Open the file to be transferred and obtain the attribute information of the file to be transferred; The attribute information includes the name, type, and size of the file to be transferred; Determine if the file to be transferred is empty; if it is empty, terminate this process. Otherwise, set the start and end addresses of each data block, and start a thread to encode a data block into a QR code image, while starting multiple threads simultaneously.

[0030] Specifically, firstly, at data sending end 1, the data sending module opens the file to be transmitted and obtains its basic attribute information. The attribute information includes at least the full name of the file, the format type, and the file size in bytes. This information provides basic parameters for subsequent data segmentation and processing.

[0031] Subsequently, the data sending module verifies the validity of the file status: it determines whether the file to be transmitted is empty (i.e., the file size is 0). If the file is determined to be empty, the transmission process is immediately terminated to avoid invalid operations; if the file is not empty, the data block processing stage begins.

[0032] During the data block processing phase, the data sending module sets explicit start and end addresses for each data block to be processed in the file based on the file size and the preset data block length, thereby defining the boundaries of each data block. Based on this, at least one data processing thread is started, and each thread is configured to perform the following tasks: read a complete data block from its corresponding address range and independently encode the data block into a corresponding QR code image frame.

[0033] In one specific embodiment, reference Figure 3 Step S1 also includes: S12, set the starting address of each data block to the current address, and determine whether the current address points to the ending address; If the current address points to the end address, then re-evaluate; If the current address does not point to the end address, extract the data block corresponding to the current address, convert the data block into an input format acceptable to the encoder, encapsulate it with the sequence code and sequence number into a data packet, and encode it into a QR code image sequence; The QR code image sequence is displayed cyclically to the optical display module 3; When the current address points to the next data block, the current address equals the current address plus the data block length; Ask the user if they want to end the program; if they do, close the file transfer window. Otherwise, repeatedly check whether the current address points to the end address.

[0034] Specifically, first, the starting address of the data block corresponding to the current processing thread is set to the current address, and then it is determined whether the current address has reached the preset end address.

[0035] If the current address has not reached the preset end address, perform the following operations: ① Locate and extract a data block of the corresponding length based on the current address; ② Encapsulate the data block data, sequence number, and verification information together into a data packet; ③ Generate the corresponding QR code image from the data packet according to the preset QR code encoding rules; After processing the current data block, the current address value is increased by the length of the corresponding truncated data block, so that the address pointer points to the starting address of the subsequent data block to be processed.

[0036] After completing a single data processing cycle, the data sending module will detect whether the user has issued a termination command: if a termination command is detected, the opened file to be transferred will be closed and the program will exit; if no termination command is detected, the process will return to the beginning of step S12 and start a new processing cycle.

[0037] It should be noted that when the data sending module detects that the current address has pointed to the end address (i.e., the data processing of the current allocation interval has been completed), the system will automatically reset the address pointer and return to the starting position of step S12. This step realizes the cyclic generation mechanism of the QR code image sequence, ensuring the integrity and reliability of data transmission.

[0038] In one specific embodiment, reference Figure 3 In step S12, when the QR code image sequence is displayed cyclically on the optical display module 3, the frequency of the cyclic display of the QR code image sequence matches the frequency of the QR code image sequence acquisition.

[0039] Specifically, the data transmission module periodically switches and repeats the display of each frame of the QR code image in the sequence at a specific frequency, forming a continuous loop of optical data. To ensure that the data is acquired completely and reliably, the frequency of this looping display should match the acquisition frequency of the image acquisition module 4: that is, the display frequency needs to be set according to the maximum decoding rate of the image acquisition module 4. This ensures that each QR code image has sufficient dwell time on the screen for the image acquisition module 4 to complete capture and decoding, avoiding image omissions due to excessively fast switching, while maintaining a sufficient display rate so that the image acquisition module 4 can continuously acquire data without being in a waiting state, effectively improving the transmission efficiency of the QR code image sequence.

[0040] In one specific embodiment, reference Figure 4 Step S2 includes: S21, the image acquisition module 4 acquires the QR code image sequence displayed by the optical display module 3, decodes it into a data packet, and transmits it to the data receiving end 2.

[0041] S22, the data receiving end parses and reassembles the data packets into a file to be transmitted; Specifically, the image acquisition module 4 acquires the sequence of QR code images displayed cyclically on the optical display module 3, and uses the built-in decoder to convert each frame of the QR code image into a corresponding data packet in real time. The data packet contains data block data and its corresponding sequence number and sequence code. Then, these data packets are transmitted to the data receiving end 2 through the data interface.

[0042] The data receiving module parses the received data packets, extracting the sequence code, sequence number, and data. It checks whether all data blocks have been marked as received based on the sequence code, then sorts all the stored data blocks according to the sequence number, and finally reassembles all the data blocks according to the correct file structure to restore a file that is completely consistent with the file to be transmitted.

[0043] In one specific embodiment, reference Figure 4 Step S22 is as follows: S221, identifies all available image acquisition devices with 4 serial ports; Enable all identified serial ports and create an independent data receiving thread for each successfully enabled serial port; S222, each data receiving thread performs the following loop operation: Read data packets from its bound serial port; The read data packets are parsed to obtain the data block sequence number and data block content; Check whether the current data block sequence number and data block content have been successfully received and stored; If the data has already been stored, continue reading subsequent data from the image acquisition device's serial port; If not stored, record the contents of the current data block and mark its sequence number as received; Real-time statistics and display of sequence numbers of all data blocks not marked as received; Verify that all data blocks have been marked as received: If so, write all data blocks to a new file in sequence, save, and then terminate the program. If not, repeat step S222.

[0044] Specifically, in the data reception and reassembly phase (S22), the data reception module first executes step S221: automatically identifying all available image acquisition device serial ports and creating an independent data reception thread for each successfully opened serial port. Each thread then enters step S222: continuously reading data packets from its bound serial port, parsing out data block data, sequence numbers, and sequence codes. The data reception module synchronously counts the sequence numbers of unreceived data blocks and displays the transmission progress in real time, and verifies whether all data blocks have been received using the sequence codes. If all data blocks have been received, the file is reassembled and saved in sequence number order; if any are missing, step S222 is continuously executed in a loop until all data blocks are fully received or a termination command is received. Step S222 effectively ensures the integrity and reliability of data transmission through multi-threaded parallel processing and dynamic verification mechanisms.

[0045] During operation, the data sending module first responds to user instructions by calling its data segmentation and encoding functions to segment the file to be transmitted into multiple data blocks arranged in a predetermined order. The number of all data blocks is recorded and set as a sequence code. Then, a sequence code and a sequence number are attached to each data block, which are assembled into a data packet. Each data packet is independently encoded into a frame of QR code image, thereby generating a continuous sequence of QR code images.

[0046] Next, in response to the instructions from the data transmission module, the optical display module receives and displays the optically encoded image sequence in a loop according to its preset refresh rate.

[0047] Meanwhile, the image acquisition module 4 is configured to continuously acquire the QR code image sequence displayed by the optical display module 3 and perform image decoding operations to restore each frame of the QR code image into the corresponding data packet, and then transmit the data packet to the data receiving end 2.

[0048] Finally, the data receiving module is configured to perform a data receiving and reassembly process: it receives data packets from the image acquisition module 4, parses each data packet to extract data block data, sequence code and its sequence number; based on the sequence code and sequence number, it reassembles all data blocks in the correct order, and finally restores and outputs a file consistent with the file to be transmitted.

[0049] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the embodiments of the present invention have been described in detail, those skilled in the art should understand that modifications or equivalent substitutions to the technical solutions of the present invention do not depart from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of protection of the claims of the present invention.

Claims

1. A cross-terminal data transmission device based on QR code technology, characterized in that, include: The data transmission module, configured at the data transmission end (1), is used to cut and encode the file to be transmitted into an optically encoded image sequence; A data receiving module, configured at the data receiving end (2), is used to receive and reassemble the acquired optically encoded image sequence data to recover the file to be transmitted; An optical display module (3) is connected to the data transmitting end (1) and is used to display the optically encoded image sequence; The image acquisition module (4) is connected to the data receiving end (2) and is used to acquire the optically encoded image sequence.

2. The cross-terminal data transmission device based on QR code technology according to claim 1, characterized in that, Also includes: The optical display module (3) and the image acquisition module (4) are integrated in the housing (5) with a fixed relative position.

3. The cross-terminal data transmission device based on QR code technology according to claim 2, characterized in that, The optical display module (3) is connected to the data transmission end (1) via a video interface cable (6); The image acquisition module (4) is connected to the data receiving end (2) via a universal data bus cable (7).

4. A data transmission method using the apparatus according to any one of claims 1-3, comprising the following steps, S1, Encode the file to be transmitted into a QR code image sequence, and display the QR code image sequence; Encoding the file to be transmitted into a QR code image sequence includes: The file to be transmitted is divided into multiple parts, each part being a data block. The number of all data blocks is recorded and set as a sequence code. Each data block is encoded to obtain a QR code image, and each QR code image is assigned a sequence number, so as to convert the file to be transmitted into a QR code image sequence. Each QR code image in the QR code image sequence carries a sequence code and a sequence number. S2, acquire the QR code image from the QR code image sequence, and transmit the QR code image to the data receiving end so that the data receiving end can recognize the QR code image sequence, decode the QR code image sequence and reassemble it into a file to be transmitted.

5. The data transmission method according to claim 4, characterized in that, In step S1, encoding the file to be transmitted into a QR code image sequence specifically involves: S11, Open the file to be transferred and obtain the attribute information of the file to be transferred; The attribute information includes the name, type, and size of the file to be transferred; Determine if the file to be transferred is empty; if it is empty, terminate this process. Otherwise, set the start and end addresses of each data block and start a thread to encode a data block into a QR code image.

6. The data transmission method according to claim 5, characterized in that, Step S11 also includes: starting multiple threads.

7. The data transmission method according to claim 5 or 6, characterized in that, Also includes S12: S12, set the starting address of each data block to the current address, and determine whether the current address points to the ending address; If the current address points to the end address, then re-evaluate; If the current address does not point to the end address, extract the data block corresponding to the current address, convert the data block into an input format acceptable to the encoder, encapsulate it with the sequence code and sequence number into a data packet, and encode it into a QR code image sequence; The QR code image sequence is displayed cyclically to the optical display module (3); When the current address points to the next data block, the current address equals the current address plus the data block length; Ask the user if they want to end the program. If they do, close the original data file to be transferred; otherwise, repeatedly check if the current address points to the end address.

8. The data transmission method according to claim 7, characterized in that, In step S12, when the QR code image sequence is displayed cyclically to the optical display module (3), the frequency of the cyclic display of the QR code image sequence matches the frequency of the QR code image sequence acquisition.

9. The data transmission method according to claim 4, characterized in that, Step S2 includes: S21, the image acquisition module (4) acquires the QR code image sequence displayed by the optical display module (3), decodes it into a data packet, and transmits it to the data receiving end (2). S22, The data receiving end (2) parses the data packets and reassembles them into a file to be transmitted.

10. The data transmission method according to claim 9, characterized in that, Step S22 is as follows: S221, identify all available image acquisition devices (4) serial ports; Enable all identified serial ports and create an independent data receiving thread for each successfully enabled serial port; S222, each data receiving thread performs the following loop operation: Read data packets from its bound serial port; The read data packets are parsed to obtain the sequence code, sequence number, and data block data. Check whether the sequence code and sequence number of the current data block, as well as the data block data, have been successfully received and stored; If already stored, continue reading subsequent data blocks from the serial port of the image acquisition unit (4); If not stored, record the data of the current data block and mark its sequence number as received; Real-time statistics and display of sequence numbers of all data blocks not marked as received; Verify that all data blocks have been marked as received: If so, write all data blocks to a new file in sequence, save, and then terminate the program. If not, repeat step S222.