Two-dimensional code-based large-capacity information transmission method
Technical Field
The invention belongs to the technical field of information transmission, and relates to a high-capacity information transmission method, in particular to a high-capacity information transmission method based on two-dimensional codes.
Background
The two-dimensional code is characterized by applying a pattern of black and white which is distributed in two-dimensional directions according to a certain rule and a specific geometric figure, wherein binary '0' and '1' bits are represented by black and white. The information is converted into the two-dimensional code, and then the two-dimensional code is identified and read by image input equipment or optical scanning equipment, so that the offline transmission of data is realized.
However, with the continuous development of application fields and business requirements, when a two-dimensional code is used as a large amount of data transmission mode, the existing two-dimensional code technology is limited by the area of a single two-dimensional code, and the problem that a large amount of data is difficult to transmit occurs. For the problem of mass data transmission, a technical scheme for arranging and displaying a plurality of two-dimensional codes is provided at present. However, this scheme is only to segment and convert data, and there is a limit to improvement of information security.
Disclosure of Invention
The invention aims to overcome the defects of the prior art and provides a method for encoding information into a plurality of information two-dimensional codes, encoding two-dimensional code decoding information into decoding two-dimensional codes, and combining the decoding two-dimensional codes and the information two-dimensional codes to form a two-dimensional code unit capable of decoding; the coding, transmission and decoding of the information all take a two-dimensional code unit as a unit, and the information capacity and the information safety degree of the two-dimensional code are greatly improved.
The purpose of the invention is realized by the following technical scheme: a large-capacity information transmission method based on two-dimension codes comprises two processing processes of information sending and information receiving, wherein in the information sending process, information to be transmitted is coded into a plurality of information two-dimension codes, and two-dimension code decoding information is coded into decoding two-dimension codes; then, combining the decoded two-dimensional code and the information two-dimensional code to form a two-dimensional code unit; encrypting and coding each two-dimension code unit;
in the information receiving process, an information receiver firstly acquires coding information, searches a coding code number comparison table and determines a decryption method; and then, decrypting, sequencing and splicing each two-dimension code information in the two-dimension code units according to the decoding information, and splicing the information of each two-dimension code unit in sequence.
Further, the data transmission process comprises the following sub-steps:
s1, determining the information capacity of a single information two-dimensional code according to the scanning, identifying and transmitting capabilities of both the information sending party and the information receiving party, determining the information capacity of a decoding two-dimensional code according to the information capacity of the single information two-dimensional code, and ensuring that one decoding two-dimensional code can contain more than 8 decoding information of the information two-dimensional code;
s2, segmenting information to be transmitted according to the information capacity of the decoded two-dimensional code, wherein the capacity of each segment of information does not exceed the information capacity of the decoded two-dimensional code;
s3, dividing the information in each information segment into multiple sections of information, wherein the capacity of each section of information does not exceed the information capacity of a single information two-dimensional code;
s4, encrypting and coding each information section respectively, randomly sequencing each information section in each information section, and storing the encryption algorithm and the sequencing information in an encoding information array variable EncodeInfo, wherein the encryption algorithm is represented by a code in an encoding code comparison table;
s5, symmetrically encrypting the decoding information stored in the encoding information array variable EncodeInfo, and encoding the information into a QR code arranged at the 2 nd of the information of the section; then, generating a two-dimensional code for each section of information, and storing the whole section of information as a two-dimensional code unit;
and S6, repeating the steps S3-S5, and dividing the information to be transmitted into a plurality of two-dimensional code information units.
Further, the data receiving process comprises the sub-steps of:
s7, identifying the 2 nd two-dimensional code of each two-dimensional code unit, acquiring coding information, searching a code number comparison table and determining a decryption method;
s8, decrypting, sequencing and splicing each two-dimensional code information in the two-dimensional code units according to the decoding information;
and S9, splicing the information of the two-dimensional code units in sequence.
Furthermore, the content of the decoded two-dimensional code is a cycle of 'A B CC DD' field, and the cycle number is the number of the information two-dimensional codes in the two-dimensional code unit; a in the field represents the arrangement sequence number of the information two-dimensional code in the two-dimensional code unit, B represents the decoding sequence number of the information two-dimensional code, CC represents the encryption mode of the information two-dimensional code, and DD represents the type of the information two-dimensional code.
The sorting sequence of the information two-dimensional code is randomly generated by adopting a sorting, roulette or/and shuffling algorithm; the information two-dimensional code and the decoding two-dimensional code are encrypted by adopting a Hash algorithm, a symmetric encryption algorithm, an asymmetric encryption algorithm, md5, RSA, AES, 3DES, RC2 or/and IDEA algorithm.
The invention has the beneficial effects that:
1. the information is encoded into a plurality of information two-dimensional codes, a certain amount of two-dimensional code decoding information is encoded into decoding two-dimensional codes, and the decoding two-dimensional codes and the information two-dimensional codes are combined to form a two-dimensional code unit capable of decoding. The coding, transmission and decoding of the information all use one two-dimensional code unit as a unit, and the information capacity and the information safety degree of the two-dimensional code are greatly improved.
2. The information two-dimensional code can adopt different coding encryption modes and random sequence arrangement, and the decoding information two-dimensional code comprises the coding type and the correct decoding sequence of each information two-dimensional code. In particular, the encoding type can be referred to by a code number, so that only the information transmission decoding party of the code number comparison table can carry out encoding and decoding. The security of the information transmission can be further increased.
Drawings
Fig. 1 is a flowchart of an information transmission process of an information transmission method of the present invention;
FIG. 2 is a schematic diagram of a two-dimensional code unit according to the present invention;
fig. 3 is a flow chart of an information receiving process of the information transmission method of the present invention.
Detailed Description
The technical scheme of the invention is further explained by combining the attached drawings.
The invention relates to a two-dimension code-based high-capacity information transmission method, which comprises two processing processes of information sending and information receiving, wherein in the information sending process, information to be transmitted is coded into a plurality of information two-dimension codes, and two-dimension code decoding information is coded into decoding two-dimension codes; then, combining the decoded two-dimensional code and the information two-dimensional code to form a two-dimensional code unit; encrypting and coding each two-dimension code unit;
in the information receiving process, an information receiver firstly acquires coding information, searches a coding code number comparison table and determines a decryption method; and then, decrypting, sequencing and splicing each two-dimension code information in the two-dimension code units according to the decoding information, and splicing the information of each two-dimension code unit in sequence.
And determining that the 2 nd two-dimensional code of a two-dimensional code unit is used as a two-dimensional code of the decoding information between the information sender and the information receiver, and encrypting the two-dimensional code into a QR code by adopting a symmetric encryption algorithm. And the same code number comparison table is established for both information transmission parties. After determining that the above-mentioned information of both parties are identical, the transmitting party performs encryption coding on the transmitted information, as shown in fig. 1, and the method comprises the following substeps:
s1, determining the information capacity of a single information two-dimensional code to be 1Kb according to the scanning, identifying and transmitting capabilities of both the information sending party and the information receiving party, determining the information capacity of a decoding two-dimensional code according to the information capacity of the single information two-dimensional code, and ensuring that one decoding two-dimensional code can contain more than 8 decoding information of the information two-dimensional code;
s2, segmenting information to be transmitted according to the information capacity of the decoded two-dimensional code, wherein the capacity of each segment of information does not exceed the information capacity of the decoded two-dimensional code; in the embodiment, the information to be transmitted is divided into segments not exceeding 8 Kb;
s3, dividing the information in each information segment into multiple sections of information, wherein the capacity of each section of information does not exceed the information capacity of a single information two-dimensional code, namely, does not exceed 1 Kb;
s4, encrypting and coding each section of information respectively, randomly sequencing each section of information in each section of information (the content of the section is placed at the nth of the two-dimensional code of the unit, n is more than or equal to 1 and less than or equal to 9, and n is not equal to 2), and then storing the encryption algorithm and the sequencing information in an encoding information array variable EncodeInfo, wherein the encryption algorithm is represented by a code number in an encoding code number comparison table;
s5, symmetrically encrypting the decoding information stored in the encoding information array variable EncodeInfo, and encoding the information into a QR code arranged at the 2 nd of the information of the section; then, generating a two-dimensional code for each section of information, and storing the whole section of information as a two-dimensional code unit;
s6, repeating the steps S3-S5, and dividing the information to be transmitted into a plurality of two-dimensional code information units, as shown in FIG. 2.
As shown in fig. 3, the data receiving process of the present invention includes the following sub-steps:
s7, identifying the 2 nd two-dimensional code of each two-dimensional code unit, acquiring coding information, searching a code number comparison table and determining a decryption method;
s8, decrypting, sequencing and splicing each two-dimensional code information in the two-dimensional code units according to the decoding information;
and S9, splicing the information of the two-dimensional code units in sequence.
The content of the decoding two-dimensional code is circulation of 'A + B + CC + DD + field', and the circulation times are the number of the information two-dimensional codes in the two-dimensional code unit; a in the field represents the arrangement sequence number of the information two-dimensional code in the two-dimensional code unit, B represents the decoding sequence number of the information two-dimensional code, CC represents the encryption mode of the information two-dimensional code, and DD represents the type of the information two-dimensional code. For example, 3 × 4 × M5 × QR represents that the decoding order of the 3 rd information two-dimensional code in the unit two-dimensional code is the 4 th one, the encryption method is MD5, and the encoding method is a QR code.
The information is coded into a plurality of information two-dimensional codes, a certain amount of two-dimensional code decoding information is coded into the two-dimensional codes, and the two-dimensional codes containing the decoding information and the information two-dimensional codes are combined to form a two-dimensional code unit capable of decoding. The coding, transmission and decoding of information all take a two-dimensional code unit as a unit. The information capacity and the information safety degree of the two-dimensional code are greatly improved. In the transmission process, the two-dimension code units are sequentially transmitted to a receiving party through screen display, printout and the like.
The information two-dimensional code can adopt different coding encryption modes and random sequence arrangement, and the decoding information two-dimensional code comprises the coding type and the correct decoding sequence of each information two-dimensional code. In particular, the encoding type can be referred to by a code number, so that only the information transmission decoding party of the code number comparison table can carry out encoding and decoding.
The sorting sequence of the information two-dimensional code is randomly generated by adopting a sorting, roulette or/and shuffling algorithm; the information two-dimensional code and the decoding two-dimensional code are encrypted by adopting a Hash algorithm, a symmetric encryption algorithm, an asymmetric encryption algorithm, md5, RSA, AES, 3DES, RC2 or/and IDEA algorithm.
It will be appreciated by those of ordinary skill in the art that the embodiments described herein are intended to assist the reader in understanding the principles of the invention and are to be construed as being without limitation to such specifically recited embodiments and examples. Those skilled in the art can make various other specific changes and combinations based on the teachings of the present invention without departing from the spirit of the invention, and these changes and combinations are within the scope of the invention.