CN116192948A - Data transmission method, system and storage medium based on two-dimension code - Google Patents
Data transmission method, system and storage medium based on two-dimension code Download PDFInfo
- Publication number
- CN116192948A CN116192948A CN202111425192.7A CN202111425192A CN116192948A CN 116192948 A CN116192948 A CN 116192948A CN 202111425192 A CN202111425192 A CN 202111425192A CN 116192948 A CN116192948 A CN 116192948A
- Authority
- CN
- China
- Prior art keywords
- data
- dimensional code
- sub
- received
- terminal
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 46
- 230000005540 biological transmission Effects 0.000 title claims abstract description 37
- 238000004590 computer program Methods 0.000 claims description 12
- 230000011218 segmentation Effects 0.000 claims description 4
- 238000012937 correction Methods 0.000 description 10
- 238000010586 diagram Methods 0.000 description 8
- 230000006870 function Effects 0.000 description 8
- 239000011159 matrix material Substances 0.000 description 5
- 230000004048 modification Effects 0.000 description 5
- 238000012986 modification Methods 0.000 description 5
- 238000012545 processing Methods 0.000 description 5
- 230000008569 process Effects 0.000 description 3
- 230000004075 alteration Effects 0.000 description 2
- 238000004891 communication Methods 0.000 description 2
- 230000007547 defect Effects 0.000 description 2
- 238000002955 isolation Methods 0.000 description 2
- 239000000463 material Substances 0.000 description 2
- 230000008859 change Effects 0.000 description 1
- 125000004122 cyclic group Chemical group 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000010365 information processing Effects 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000005693 optoelectronics Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/06—Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06K—GRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
- G06K17/00—Methods or arrangements for effecting co-operative working between equipments covered by two or more of main groups G06K1/00 - G06K15/00, e.g. automatic card files incorporating conveying and reading operations
- G06K17/0022—Methods or arrangements for effecting co-operative working between equipments covered by two or more of main groups G06K1/00 - G06K15/00, e.g. automatic card files incorporating conveying and reading operations arrangements or provisions for transferring data to distant stations, e.g. from a sensing device
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06K—GRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
- G06K19/00—Record carriers for use with machines and with at least a part designed to carry digital markings
- G06K19/06—Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code
- G06K19/06009—Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code with optically detectable marking
- G06K19/06037—Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code with optically detectable marking multi-dimensional coding
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06K—GRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
- G06K7/00—Methods or arrangements for sensing record carriers, e.g. for reading patterns
- G06K7/10—Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
- G06K7/14—Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation using light without selection of wavelength, e.g. sensing reflected white light
- G06K7/1404—Methods for optical code recognition
- G06K7/1408—Methods for optical code recognition the method being specifically adapted for the type of code
- G06K7/1417—2D bar codes
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Signal Processing (AREA)
- Computer Networks & Wireless Communication (AREA)
- Health & Medical Sciences (AREA)
- Electromagnetism (AREA)
- General Health & Medical Sciences (AREA)
- Toxicology (AREA)
- Artificial Intelligence (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention relates to a data transmission method, a system and a storage medium based on two-dimension codes, wherein the method comprises the following steps: acquiring data to be transmitted through a first terminal, and dividing the data to be transmitted into a plurality of sub-data to be transmitted; generating a corresponding two-dimensional code image according to the two-dimensional code coding rule by each sub-data to be transmitted; displaying all two-dimensional code images through a screen of the first terminal; acquiring and identifying all the two-dimensional code images through a camera connected to the second terminal, and analyzing to obtain sub-data to be received corresponding to each two-dimensional code image; and splicing all the sub-data to be received to obtain complete data to be received. According to the invention, the data file is divided, converted into the two-dimension code, the two-dimension code is identified and then the data is analyzed and combined into complete data through the characteristic that the two-dimension code can transmit information, so that the data transmission is realized without a physical link, without changing a hardware structure and the like.
Description
Technical Field
The invention relates to the field of data transmission, in particular to a data transmission method, a system and a storage medium based on two-dimension codes.
Background
Data is a generic term for all symbols that can be entered into a computer and processed by a computer program, and is a generic term for numbers, letters, symbols, analog quantities, etc. that are used to enter a computer for processing.
In some application scenarios where information confidentiality and information security are strictly required, such as government institutions, internal systems of banks, etc., computer devices or mobile devices are included, and devices are not connected in a wired or wireless transmission manner, including, but not limited to, physical layer connections such as ethernet, wireless network, bluetooth, can, serial communication line, etc., and modification of hardware devices and device groups added with physical layer connections are also prohibited for information security, etc. The devices in the device groups can not directly communicate data, and can not communicate with each other through the existing data link layer and application layer protocol stacks, so that the interactivity of the transferable data among the devices is greatly reduced.
The invention aims at solving the problems in the prior art and designs a two-dimensional code-based data transmission method, a two-dimensional code-based data transmission system and a two-dimensional code-based storage medium.
Disclosure of Invention
The invention aims to solve the problems in the prior art, and provides a data transmission method, a system and a storage medium based on two-dimension codes, which can effectively solve the problems in the prior art.
The technical scheme of the invention is as follows:
a data transmission method based on two-dimension codes comprises the following steps:
acquiring data to be transmitted through a first terminal, and dividing the data to be transmitted into a plurality of sub-data to be transmitted;
generating a corresponding two-dimensional code image according to the two-dimensional code coding rule by each sub-data to be transmitted;
displaying all two-dimensional code images through a screen of the first terminal;
acquiring and identifying all the two-dimensional code images through a camera connected to the second terminal, and analyzing to obtain sub-data to be received corresponding to each two-dimensional code image;
and splicing all the sub-data to be received to obtain complete data to be received.
Further, before dividing the data to be sent into a plurality of sub-data to be sent, the method includes the following steps:
and compressing the data to be sent.
Further, the dividing the data to be sent into a plurality of sub-data to be sent includes:
acquiring a preset data block capacity, wherein the size of the data block capacity is smaller than or equal to the size of information quantity which can be carried by a single two-dimensional code image;
and dividing the data to be transmitted into a plurality of sub-data to be transmitted according to the size of the database capacity.
Further, all the two-dimensional code images are displayed through the screen of the first terminal to include:
acquiring a refresh rate of a screen of the first terminal;
and displaying all the two-dimensional code images in a circulating way through the screen of the first terminal at a rate smaller than or equal to the refresh rate.
Further, all the two-dimensional code images are displayed through the screen of the first terminal to include:
acquiring the resolution of a screen of the first terminal;
and circularly displaying all the two-dimensional code images through the screen of the first terminal with the definition of the resolution ratio being greater than or equal to the resolution ratio.
Further, after the data to be sent is divided into a plurality of sub-data to be sent, the method comprises the following steps:
and adding a data head to each piece of sub-data to be sent, wherein the data head at least comprises one or more of the number, the total number and the magic word of the sub-data to be sent.
Further, the splicing all the sub-data to be received, and obtaining complete data to be received includes:
analyzing the sub-file to be received according to the data head of the sub-data to be received;
it is determined whether all subfiles to be received have been received,
if not, continuing to acquire and identify all the two-dimensional code images through a camera connected to the second terminal;
if yes, all the subfiles to be received are spliced according to the data head, and complete data to be received are obtained.
Further, after the data to be sent is obtained by the first terminal, the method includes:
encrypting the data to be sent;
after the complete data to be received is obtained, the method comprises the following steps:
decrypting the data to be received.
Further provides a data transmission system based on two-dimension codes, which comprises the following modules:
the segmentation module is used for acquiring data to be transmitted through the first terminal and segmenting the data to be transmitted into a plurality of sub-data to be transmitted;
the two-dimensional code generation module is used for generating a corresponding two-dimensional code image according to the two-dimensional code coding rule for each sub-data to be transmitted;
the display module is used for displaying all the two-dimensional code images through the screen of the first terminal;
the identification module is used for acquiring and identifying all the two-dimensional code images through a camera connected to the second terminal, and analyzing to obtain sub-data to be received corresponding to each two-dimensional code image;
and the splicing module is used for splicing all the sub-data to be received to obtain complete data to be received.
There is further provided a storage medium storing a computer program which, when executed by a processor, implements a two-dimensional code based data transmission method as described above.
Accordingly, the present invention provides the following effects and/or advantages:
according to the invention, the data file is divided, converted into the two-dimension code, the two-dimension code is identified and then the data is analyzed and combined into complete data through the characteristic that the two-dimension code can transmit information, so that the data transmission is realized without a physical link, without changing a hardware structure and the like. Reliable data transmission in physically isolated devices is achieved.
The invention overcomes the defects that the transmission data of the single two-dimensional code is limited and the data continuity cannot be ensured by the designed additional data head. And data transmission is performed in a two-dimensional code mode, so that safety is guaranteed. Under the condition that a physical machine is invaded, only a single-frame picture file can be obtained, and an illegal molecule cannot splice the file on the premise of not knowing a transmission protocol (data head).
The method and the device realize reliable data transmission in physically isolated equipment in a two-dimension code and two-dimension code identification mode, ensure the reliability of single frame data through a two-dimension code redundancy algorithm, and make up the defects that the single two-dimension code transmission data is limited and the data continuity cannot be ensured.
According to the invention, through reasonably setting the display speed of the two-dimensional code, the resolution of the two-dimensional code and the like, the situations of errors, omission and the like in the two-dimensional code transmission process are reduced as much as possible.
It is to be understood that both the foregoing general description and the following detailed description of the present invention are exemplary and explanatory and are intended to provide further explanation of the invention as claimed.
Drawings
FIG. 1 is a schematic diagram of a corresponding step of an embodiment.
Fig. 2-3 are schematic diagrams of two-dimensional codes respectively generated by any two sub-data to be transmitted.
Detailed Description
For the convenience of understanding by those skilled in the art, the structure of the present invention will now be described in further detail with reference to the accompanying drawings: it should be understood that, in this embodiment, the steps mentioned in this embodiment may be performed sequentially or sequentially, or may be performed simultaneously or partially, unless specifically stated otherwise.
In this embodiment, as used herein, the term "two-dimensional code" may be considered synonymous with and/or referred to as: the common two-dimensional Code is QR Code, which is a coding mode which is superpopular in recent years on mobile equipment, and can store more information and represent more data types than the traditional Bar Code Bar Code. The two-dimensional bar code/two-dimensional code (2-dimensiona l bar code) is a graph which is distributed on a plane (in a two-dimensional direction) according to a certain rule by using a certain specific geometric figure, is alternately black and white, and records data symbol information; the concept of 0 and 1 bit streams forming the internal logic foundation of a computer is skillfully utilized in code programming, a plurality of geometric shapes corresponding to binary are used for representing literal numerical information, and the literal numerical information is automatically read through an image input device or an optoelectronic scanning device to realize automatic information processing: it has some commonalities in barcode technology: each code has its specific character set; each character occupies a certain width; has a certain checking function and the like. Meanwhile, the system also has the function of automatically identifying information of different rows and processes the rotation change points of the graphics.
In this embodiment, the first terminal and the second terminal may be one or more of a computer, a handheld smart device, a smart phone, etc., which may implement the method described in this embodiment, and are not limited herein.
Referring to fig. 1, a two-dimensional code-based data transmission method includes the steps of:
s1, acquiring data to be transmitted through a first terminal, and dividing the data to be transmitted into a plurality of sub-data to be transmitted.
In this step, for example, the use scenario of the method is a government administration, which needs to acquire some information files of the user, such as photos, documents, etc., and after acquiring these information files of the user, the first terminal needs to send these information files to a background server for storage or further examination and approval. If the physical isolation and the communication link isolation are traditional, the user is required to upload the file to the second terminal after uploading the file to the first terminal.
The first terminal may be a computer, and then a document is used as data to be transmitted on the first terminal by the user, where the documents are generally very small, only about hundreds of k. The document is then split into several small pieces of data as subfiles to be sent. For example, a 100k file is divided into 1000 parts, resulting in 1000 data segments of 0.1 k.
S2, generating a corresponding two-dimensional code image according to the two-dimensional code coding rule by each sub-data to be transmitted.
The two-dimensional code coding rule belongs to the prior art, and for example, under the condition that the error correction level is H, the two-dimensional code coding rule codes: 01234567 then:
1. the numbers are divided into three groups: 012345 67.
2. Convert them into binary: 012 to 0000001100;345 to 0101011001; 67. turned into 1000011.
3. The three binary strings are concatenated: 0000001100 0101011001 1000011.
4. The number of digits is converted into binary (version 1-H is 10 bits): the 8-digit binary is 0000001000.
5. The digitally encoded flag 0001 and the encoding of step 4 are added to the foregoing: 0001 0000001000 0000001100 0101011001 1000011.
6. And (3) taking 0 as a white point and 1 as a black point in the code, and filling the corresponding black point or white point into the two-dimensional code image.
According to the two-dimensional code encoding rule, a plurality of small data segments can be converted into one-to-one corresponding two-dimensional code images. After the file is segmented in the step S1, the size of the data segment is small, so that the data quantity borne by the two-dimensional code can be met. For example, 177x177, the maximum data size that can be carried by the two-dimensional code corresponding to the matrix is 2953 bytes. Through the segmentation of the step S1, the size of the single data segment is adjusted to be within the bearing capacity of the single two-dimensional code, so that the subsequent two-dimensional code coding rule is met.
And S3, displaying all the two-dimensional code images through a screen of the first terminal.
In this embodiment, all the two-dimensional code images are provided for subsequent steps to be read in a manner of displaying all the two-dimensional code images. The two-dimensional code image display modes are numerous, such as cyclic display, sequential display, and also can display a plurality of two-dimensional code images at a time through a screen, so that subsequent steps can be sequentially read. The two-dimensional code image may be displayed in other manners, which is not limited herein.
And S4, acquiring and identifying all the two-dimensional code images through a camera connected to the second terminal, and analyzing to obtain sub-data to be received corresponding to each two-dimensional code image.
In the step, the two-dimensional code images are identified through the cameras connected with the second terminal, and information carried by all the two-dimensional code images is further identified.
And S5, splicing all the sub-data to be received to obtain complete data to be received.
In this step, after all the sub-data to be received are obtained, the sub-data are spliced, and there are many modes of splicing the sub-data, for example, the sub-data are spliced sequentially in sequence through the front-to-back sequence displayed by the two-dimensional code image, or the sub-data are sequenced and spliced in modes of numbering and the like, which are not limited herein. The aim of the step is to splice all the sub-data to be received and obtain complete data to be received, wherein the data to be received and the data to be sent are identical.
Some preferred methods by which the present invention may be implemented are described below.
Further, before dividing the data to be sent into a plurality of sub-data to be sent, the method includes the following steps:
s1.1, compressing the data to be sent. The purpose of this is to compress the data to be transmitted, reducing the useless data or compressing redundant data, thereby reducing the size of the data to be transmitted. The method is characterized in that the information quantity carried by the two-dimensional code is small, the number of required divisions can be correspondingly reduced after the data to be transmitted is compressed, the probability of omission and errors in the subsequent reading and splicing can be reduced, and the probability of obtaining complete data to be received is greatly improved.
Further, the dividing the data to be sent into a plurality of sub-data to be sent includes:
s1.2, acquiring a preset data block capacity, wherein the size of the data block capacity is smaller than or equal to the size of information quantity which can be carried by a single two-dimensional code image; the preset data block capacity, that is, the maximum data amount that each two-dimensional code can bear, the size of the matrix of the two-dimensional code is various, the minimum Version 1 (that is, the size 1) is a matrix of 21x21 (composed of 21 rows and 21 columns of black and white pixels), and the maximum Version 40 (that is, the size 40) is a matrix of 177x 177. (consisting of 127 rows and 127 columns of black and white pixels). Therefore, the size, the data capacity and the like of the two-dimensional code matrix provided by the step in the subsequent step are informed by presetting the data block capacity so as to be convenient for the subsequent step to carry out.
S1.3, dividing the data to be transmitted into a plurality of sub-data to be transmitted according to the size of the database capacity. The function of this step is to divide the sub-data to be transmitted according to the size of the database obtained in step S1.2, for example, the data to be transmitted having a size of 100k, and the data block size of 1k, and divide the data to be transmitted into 100 parts, each 1k.
Further, all the two-dimensional code images are displayed through the screen of the first terminal to include:
s3.1, acquiring a refresh rate of a screen of the first terminal; typical screen refresh rates are 60Hz, 120Hz, 144Hz, etc. This step obtains the refresh rate of the screen of the first terminal.
S3.2, displaying all the two-dimensional code images through the screen circulation of the first terminal at a rate smaller than or equal to the refresh rate. The aim of the step is that the two-dimensional code images are circularly displayed at the same position of the screen, the refresh rate of the two-dimensional code images needs to be set, and the refresh rate is smaller than that of the screen, so that the two-dimensional code images cannot be omitted. For example, the refresh rate of the screen is 60Hz, that is, 60 times per second of screen refresh, 60 pictures are displayed, and if the refresh rate of the two-dimensional code is set to be about 60Hz, 30Hz or the like, the full display in the screen can be realized. For example, if the refresh rate of the screen is 60Hz and the refresh rate of the two-dimensional code is 120Hz, the screen will not display 60 two-dimensional code images therein.
In this embodiment, all the two-dimensional code images can be displayed on the screen of the first terminal in a continuous circulation manner, for example, the 1 st two-dimensional code image, the 2 nd two-dimensional code image, the 3 rd two-dimensional code image … ith two-dimensional code image are sequentially displayed, and then the 1 st two-dimensional code image, the 2 nd two-dimensional code image, the 3 rd two-dimensional code image … ith two-dimensional code image are displayed again. And the method is continuously circulated so as to facilitate the subsequent reading, and simultaneously, all the two-dimensional code images are circularly displayed, namely all the two-dimensional codes are continuously displayed on the screen, so that in the step of subsequent reading, if the step is not read, is less read, is mispread and the like, the method can be returned to the step again for re-reading, and the data is prevented from being damaged and missing.
Further, all the two-dimensional code images are displayed through the screen of the first terminal to include:
s3.3, acquiring the resolution of a screen of the first terminal;
s3.4, displaying all the two-dimensional code images in a circulating way through the screen of the first terminal with definition which is larger than or equal to the resolution.
The principle of this step is similar to that of S3.1-S3.2, and the resolution of the screen is varied, for example 1080P, 2k, 4k, etc. If the definition of the two-dimensional code image is smaller than the resolution of the screen, the partial lattice of the two-dimensional code is possibly lost.
Further, after the data to be sent is divided into a plurality of sub-data to be sent, the method comprises the following steps:
and S1.4, adding a data head to each sub-data to be transmitted, wherein the data head at least comprises one or more of the number, the total number and the magic word of the sub-data to be transmitted. The header may be considered as a special reserved field of defined bit length appended to the front of the data packet for the carrying and transmission of control information. When a packet reaches its destination, this field will be separated and discarded because the packet is processed and unpacked in the corresponding reverse order of each protocol layer. In this step, a data header is added to each sub-data to be sent, so that the second terminal is informed of how many data the total amount of data is and what data the current data is when receiving and analyzing the data, and the file is convenient to check and splice subsequently.
Further, the splicing all the sub-data to be received, and obtaining complete data to be received includes:
analyzing the sub-file to be received according to the data head of the sub-data to be received;
it is determined whether all subfiles to be received have been received,
if not, continuing to acquire and identify all the two-dimensional code images through a camera connected to the second terminal;
if yes, all the subfiles to be received are spliced according to the data head, and complete data to be received are obtained.
The step is used for judging whether the information represented by all the two-dimensional code images is received or not. For example, the total number of data transmitted at this time is 100 and the numbers are 001, 002, 003 and … respectively in the header, but when only 99 data are collected after one reception and data with number 050 are omitted, the process returns to the previous step to receive data again.
Further, the error correction level of the two-dimensional code image is set to be M. The error correction level of the two-dimensional code comprises L, M, Q, H four stages, wherein 7% of the codes at the L level can be corrected, 15% of the codes at the M level can be corrected, 25% of the codes at the Q level can be corrected, and 30% of the codes at the H level can be corrected. In this embodiment, the error correction level is set to M. The two-dimensional code has an "error correction function". The data can be automatically restored even if the code becomes dirty or corrupted. This "error correction capability" has multiple levels, and the user can select the corresponding level according to the use environment. The error correction capability is also improved by increasing the level, but the encoding size is also increased due to the increased data size. The error correction level is set to M, which can well balance data transmission and error correction.
After the data to be sent is obtained through the first terminal, the method comprises the following steps:
encrypting the data to be sent; in the step, the data to be sent is converted into a text encoded by Base64 after being encrypted, and then the file corresponding to the text is subjected to subsequent operation.
After the complete data to be received is obtained, the method comprises the following steps:
decrypting the data to be received. In this step, the data to be received is the same as the data to be transmitted, that is, the text encoded by the Base64, and the text encoded by the Base64 is decrypted by this step, so that the required original data is restored.
Through the encryption-decryption steps, the data transmission is effectively protected, and other illegal molecules are prevented from acquiring the original data.
Now, actual operations are performed by the method described in this embodiment.
For example, a file with a size of 10kb needs to be transmitted, data to be transmitted is read, compressed data with a size of 8kb is obtained after the data to be transmitted is compressed by using a lzma mode, the data is decomposed into 158 pieces of sub data to be transmitted, each piece of data is about 51 bytes, and a file header added before the sub data to be transmitted comprises: 2 bytes of magic word 00,2 bytes of serial number data, 2 bytes of total length data 9e, thereby obtaining encoded sub data to be transmitted.
And then generating a two-dimensional code for each piece of sub-data to be transmitted. The two-dimensional code shown in fig. 2-3 is a two-dimensional code in which any two pieces of sub-data to be transmitted are respectively generated. The screen resolution of the first terminal is 1920 a 1080, the refresh rate of the device is 60hz, the resolution of the acquisition camera device used by the second terminal is 200w pixels, and the refresh rate of 30hz, so that the two-dimensional code version 1 is used, and the error correction level is set to 15%. The second terminal analyzes the data in the two-dimension code by identifying the set of the series of two-dimension code images, and splices a plurality of data packets according to the magic word defined by the first three bytes of the data, the sequence number and the total packet number information, so as to obtain complete 8kb compressed data, and decompresses the data, so as to obtain the data content to be transmitted of the original file.
Example two
A data transmission system based on two-dimension codes comprises the following modules:
the segmentation module is used for acquiring data to be transmitted through the first terminal and segmenting the data to be transmitted into a plurality of sub-data to be transmitted;
the two-dimensional code generation module is used for generating a corresponding two-dimensional code image according to the two-dimensional code coding rule for each sub-data to be transmitted;
the display module is used for displaying all the two-dimensional code images through the screen of the first terminal;
the identification module is used for acquiring and identifying all the two-dimensional code images through a camera connected to the second terminal, and analyzing to obtain sub-data to be received corresponding to each two-dimensional code image;
and the splicing module is used for splicing all the sub-data to be received to obtain complete data to be received.
The working principle of the present embodiment is the same as that of the first embodiment, and will not be described here again.
Example III
A storage medium storing a computer program which when executed by a processor implements a two-dimensional code based data transmission method according to the first embodiment.
The working principle of the present embodiment is the same as that of the first embodiment, and will not be described here again.
It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It should be noted that in the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The use of the words first, second, third, etc. do not denote any order. These words may be interpreted as names.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including the preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various modifications and variations can be made to the present invention without departing from the spirit or scope of the invention. Thus, it is intended that the present invention also include such modifications and alterations insofar as they come within the scope of the appended claims or the equivalents thereof.
In the description of the present invention, it should be understood that the terms "first," "second," and the like are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include one or more such feature. In the description of the present invention, the meaning of "a plurality" is two or more, unless explicitly defined otherwise.
In the present invention, unless explicitly specified and limited otherwise, the terms "mounted," "connected," "secured," and the like are to be construed broadly, and may be, for example, fixedly connected, detachably connected, or integrally formed; can be mechanically or electrically connected; can be directly connected or indirectly connected through an intermediate medium, and can be communicated with the inside of two elements or the interaction relationship of the two elements. The specific meaning of the above terms in the present invention can be understood by those of ordinary skill in the art according to the specific circumstances.
In the present invention, unless expressly stated or limited otherwise, a first feature "up" or "down" a second feature may be the first and second features in direct contact, or the first and second features in indirect contact via an intervening medium. Moreover, a first feature being "above," "over" and "on" a second feature may be a first feature being directly above or obliquely above the second feature, or simply indicating that the first feature is level higher than the second feature. The first feature being "under", "below" and "beneath" the second feature may be the first feature being directly under or obliquely below the second feature, or simply indicating that the first feature is less level than the second feature.
In the description of the present specification, a description referring to terms "one embodiment," "some embodiments," "examples," "specific examples," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present invention. In this specification, schematic representations of the above terms should not be understood as necessarily being directed to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, the different embodiments or examples described in this specification and the features of the different embodiments or examples may be combined and combined by those skilled in the art without contradiction.
Claims (10)
1. A data transmission method based on two-dimension codes is characterized in that: the method comprises the following steps:
acquiring data to be transmitted through a first terminal, and dividing the data to be transmitted into a plurality of sub-data to be transmitted;
generating a corresponding two-dimensional code image according to the two-dimensional code coding rule by each sub-data to be transmitted;
displaying all two-dimensional code images through a screen of the first terminal;
acquiring and identifying all the two-dimensional code images through a camera connected to the second terminal, and analyzing to obtain sub-data to be received corresponding to each two-dimensional code image;
and splicing all the sub-data to be received to obtain complete data to be received.
2. The two-dimensional code-based data transmission method as claimed in claim 1, wherein: before dividing the data to be sent into a plurality of sub-data to be sent, the method comprises the following steps:
and compressing the data to be sent.
3. The two-dimensional code-based data transmission method as claimed in claim 1, wherein: the dividing the data to be sent into a plurality of sub-data to be sent includes:
acquiring a preset data block capacity, wherein the size of the data block capacity is smaller than or equal to the size of information quantity which can be carried by a single two-dimensional code image;
and dividing the data to be transmitted into a plurality of sub-data to be transmitted according to the size of the database capacity.
4. The two-dimensional code-based data transmission method as claimed in claim 1, wherein: and displaying all the two-dimensional code images through a screen of the first terminal, wherein the two-dimensional code images comprise:
acquiring a refresh rate of a screen of the first terminal;
and displaying all the two-dimensional code images in a circulating way through the screen of the first terminal at a rate smaller than or equal to the refresh rate.
5. The two-dimensional code-based data transmission method as claimed in claim 1, wherein:
and displaying all the two-dimensional code images through a screen of the first terminal, wherein the two-dimensional code images comprise:
acquiring the resolution of a screen of the first terminal;
and circularly displaying all the two-dimensional code images through the screen of the first terminal with the definition of the resolution ratio being greater than or equal to the resolution ratio.
6. The two-dimensional code-based data transmission method as claimed in claim 1, wherein: after the data to be sent is divided into a plurality of sub-data to be sent, the method comprises the following steps:
and adding a data head to each piece of sub-data to be sent, wherein the data head at least comprises one or more of the number, the total number and the magic word of the sub-data to be sent.
7. The two-dimensional code-based data transmission method as set forth in claim 6, wherein: and the step of splicing all the sub-data to be received, wherein the step of obtaining complete data to be received comprises the following steps:
analyzing the sub-file to be received according to the data head of the sub-data to be received;
it is determined whether all subfiles to be received have been received,
if not, continuing to acquire and identify all the two-dimensional code images through a camera connected to the second terminal;
if yes, all the subfiles to be received are spliced according to the data head, and complete data to be received are obtained.
8. The two-dimensional code-based data transmission method as claimed in claim 1, wherein: after the data to be sent is obtained through the first terminal, the method comprises the following steps:
encrypting the data to be sent;
after the complete data to be received is obtained, the method comprises the following steps:
decrypting the data to be received.
9. A data transmission system based on two-dimensional code is characterized in that: comprises the following modules:
the segmentation module is used for acquiring data to be transmitted through the first terminal and segmenting the data to be transmitted into a plurality of sub-data to be transmitted;
the two-dimensional code generation module is used for generating a corresponding two-dimensional code image according to the two-dimensional code coding rule for each sub-data to be transmitted;
the display module is used for displaying all the two-dimensional code images through the screen of the first terminal;
the identification module is used for acquiring and identifying all the two-dimensional code images through a camera connected to the second terminal, and analyzing to obtain sub-data to be received corresponding to each two-dimensional code image;
and the splicing module is used for splicing all the sub-data to be received to obtain complete data to be received.
10. A storage medium storing a computer program, wherein the computer program when executed by a processor implements a two-dimensional code based data transmission method according to any one of claims 1 to 8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111425192.7A CN116192948A (en) | 2021-11-26 | 2021-11-26 | Data transmission method, system and storage medium based on two-dimension code |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111425192.7A CN116192948A (en) | 2021-11-26 | 2021-11-26 | Data transmission method, system and storage medium based on two-dimension code |
Publications (1)
Publication Number | Publication Date |
---|---|
CN116192948A true CN116192948A (en) | 2023-05-30 |
Family
ID=86438845
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111425192.7A Pending CN116192948A (en) | 2021-11-26 | 2021-11-26 | Data transmission method, system and storage medium based on two-dimension code |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116192948A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN118158280A (en) * | 2024-03-05 | 2024-06-07 | 南京景喜信息科技有限公司 | Internet of things cross-network data interaction method and system |
-
2021
- 2021-11-26 CN CN202111425192.7A patent/CN116192948A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN118158280A (en) * | 2024-03-05 | 2024-06-07 | 南京景喜信息科技有限公司 | Internet of things cross-network data interaction method and system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8746568B2 (en) | Data transfer using barcodes | |
CN203057193U (en) | Data processing apparatus | |
CN105447546A (en) | Two-dimensional code capable of being embedded with large-ratio graph as well as coding and decoding method and device therefor | |
US20070017996A1 (en) | Method and system for transmitting data based on two-dimensional symbol technologies | |
CN101763397B (en) | Device and method for processing expanding information in image file | |
US10546360B2 (en) | System and method for encoding and authenticating a digital image | |
CN103957340A (en) | Data transmission system based on color dynamic image | |
CN110011993A (en) | A kind of two dimensional code big data safe transmission device based on dynamic multi-level encryption and decryption | |
CN112134687A (en) | Information encryption and decryption method based on two-dimensional code | |
US9946965B2 (en) | Encoding method and decoding method for two-dimensional barcode and electronic device | |
CN116192948A (en) | Data transmission method, system and storage medium based on two-dimension code | |
US20220321141A1 (en) | File compression system | |
CN117240409B (en) | Data processing method for smart phone and smart wearable device | |
CN202694340U (en) | Data transmission system | |
CN111083119B (en) | Two-dimensional code-based large-capacity information transmission method | |
CN115248924A (en) | Two-dimensional code processing method and device, electronic equipment and storage medium | |
Yu et al. | A Novel Three‐Layer QR Code Based on Secret Sharing Scheme and Liner Code | |
CN104573781A (en) | Encoding and decoding method of two-dimensional code | |
CN116192983A (en) | Information transmission method, system and storage medium based on two-dimension code | |
CN116702172A (en) | Data processing method and device | |
CN116846600A (en) | File transmission method, apparatus, computer device, storage medium, and program product | |
Duda et al. | Image-like 2d barcodes using generalizations of the Kuznetsov–Tsybakov problem | |
WO2018011815A1 (en) | Wireless data communication | |
CN1321538C (en) | Short message network address communication system based on two-dimensional bar code identification technology | |
CN115378931A (en) | Large-capacity data transmission method and system based on two-dimension code |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |