CN114239779A - Data transmission method, transmission system, acquisition equipment and receiving equipment - Google Patents

Data transmission method, transmission system, acquisition equipment and receiving equipment Download PDF

Info

Publication number
CN114239779A
CN114239779A CN202111402774.3A CN202111402774A CN114239779A CN 114239779 A CN114239779 A CN 114239779A CN 202111402774 A CN202111402774 A CN 202111402774A CN 114239779 A CN114239779 A CN 114239779A
Authority
CN
China
Prior art keywords
data
target
dimensional code
type
encoding
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
Application number
CN202111402774.3A
Other languages
Chinese (zh)
Inventor
刘均
熊昌晨
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Launch Technology Co Ltd
Original Assignee
Shenzhen Launch Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Shenzhen Launch Technology Co Ltd filed Critical Shenzhen Launch Technology Co Ltd
Priority to CN202111402774.3A priority Critical patent/CN114239779A/en
Publication of CN114239779A publication Critical patent/CN114239779A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K7/00Methods or arrangements for sensing record carriers, e.g. for reading patterns
    • G06K7/10Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
    • G06K7/14Methods 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/1404Methods for optical code recognition
    • G06K7/1408Methods for optical code recognition the method being specifically adapted for the type of code
    • G06K7/14172D bar codes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4204Bus transfer protocol, e.g. handshake; Synchronisation on a parallel bus
    • G06F13/4221Bus transfer protocol, e.g. handshake; Synchronisation on a parallel bus being an input/output bus, e.g. ISA bus, EISA bus, PCI bus, SCSI bus
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K19/00Record carriers for use with machines and with at least a part designed to carry digital markings
    • G06K19/06Record 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/06009Record 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/06037Record 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Electromagnetism (AREA)
  • General Health & Medical Sciences (AREA)
  • Toxicology (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

The application discloses a data transmission method, a transmission system, acquisition equipment and receiving equipment, which are used for improving the equipment compatibility of data transmission and avoiding the problem that data cannot be transmitted when the data receiving equipment does not support the communication protocol of the data acquisition equipment. The method is applied to a data transmission system, the data transmission system comprises a data acquisition device and a data receiving device, and the method comprises the following steps: the data acquisition equipment acquires target original data; determining the data type of the target original data; encoding the target original data according to the data type to obtain target encoded data; generating a target two-dimensional code according to the target encoding data; and the data receiving equipment acquires the target two-dimensional code and analyzes the target two-dimensional code to obtain the target original data.

Description

Data transmission method, transmission system, acquisition equipment and receiving equipment
Technical Field
The present application relates to the field of data processing technologies, and in particular, to a data transmission method, a data transmission system, a data acquisition device, and a data reception device.
Background
At present, data are transmitted between devices, and the data acquisition device and the data receiving device are generally required to use the same communication protocol. For some receiving devices with specific uses, such as regulatory agency devices, it is necessary to use a specific communication protocol. At this time, if the communication protocol of the data acquisition device is not supported by the receiving device, the data cannot be transmitted. Therefore, the problems of poor compatibility of data transmission equipment and low data transmission efficiency exist.
Disclosure of Invention
The application provides a data transmission method, a transmission system, acquisition equipment and receiving equipment, which are used for improving the equipment compatibility of data transmission and avoiding the problem that data cannot be transmitted when the data receiving equipment does not support the communication protocol of the data acquisition equipment.
The application provides in a first aspect a data transmission method applied to a data transmission system, the data transmission system comprising a data acquisition device and a data reception device, the method comprising:
the data acquisition equipment acquires target original data; determining the data type of the target original data; encoding the target original data according to the data type to obtain target encoded data; generating a target two-dimensional code according to the target encoding data;
and the data receiving equipment acquires the target two-dimensional code and analyzes the target two-dimensional code to obtain the target original data.
Applied to a data acquisition device, the present application provides, in a second aspect, a data transmission method, the method comprising:
acquiring target original data;
determining the data type of the target original data;
encoding the target original data according to the data type to obtain target encoded data;
and generating a target two-dimensional code according to the target encoding data so that the target two-dimensional code is acquired by data receiving equipment and then analyzed to obtain the target original data.
In a first case of a first possible implementation of the second aspect, the data type comprises a numeric type;
when the data type of the target original data is determined to be a digital type, the encoding the target original data according to the data type to obtain target encoded data specifically includes:
grouping the target original data to obtain at least 2 grouped data;
determining a first target bit number according to the grouped data;
encoding the at least 2 packet data into binary data codes of the first target bit number respectively;
and combining the binary data codes of the at least 2 grouped data to obtain target coded data.
In a second case of the first possible implementation of the second aspect, the data type comprises a character type or a mixed character type;
when the data type of the target original data is determined to be a character type or a mixed character type, the encoding the target original data according to the data type to obtain target encoded data specifically includes:
grouping the target original data to obtain at least 2 grouped data;
converting the at least 2 grouped data into at least 2 10-system grouped values according to a 45-system;
determining a second target bit number according to the grouped data;
encoding the at least 2 10-system grouping values into binary data codes of the second target bit number respectively;
and combining the binary data codes corresponding to the at least 2 10-system grouping values to obtain target coded data.
In a second possible implementation manner of the second aspect, the generating a target two-dimensional code according to the target encoding data specifically includes:
encrypting the target encoding data to obtain an encrypted code;
and generating a target two-dimensional code according to the encrypted code.
Applied to a data receiving device, the present application provides a data transmission method from a third aspect, the method including:
acquiring a target two-dimensional code, wherein the target two-dimensional code is generated by data acquisition equipment according to target encoding data, and the target encoding data is obtained by encoding the target original data by the data acquisition equipment according to the data type of the target original data;
and analyzing the target two-dimensional code to obtain the target original data.
In a first possible implementation manner of the third aspect, the analyzing the target two-dimensional code to obtain the target original data specifically includes:
analyzing the target two-dimensional code to obtain an encrypted code;
determining a decryption key corresponding to the encrypted code;
decrypting the encrypted code by using the decryption key to obtain the decrypted code;
and analyzing the decryption code to obtain the target original data.
The present application provides, from a fourth aspect, a data transmission system comprising:
the data acquisition equipment is used for acquiring target original data; determining the data type of the target original data; encoding the target original data according to the data type to obtain target encoded data; generating a target two-dimensional code according to the target encoding data;
and the data receiving equipment is used for acquiring the target two-dimensional code and analyzing the target two-dimensional code to obtain the target original data.
The present application provides, from a fifth aspect, a data acquisition apparatus comprising:
the device comprises a processor, a memory, an input and output unit and a bus;
the processor is connected with the memory, the input and output unit and the bus;
the memory holds a program that the processor calls to perform the second aspect and any optional data transfer method of the second aspect.
The present application provides, from a sixth aspect, a data receiving apparatus comprising:
the device comprises a processor, a memory, an input and output unit and a bus;
the processor is connected with the memory, the input and output unit and the bus;
the memory holds a program that the processor calls to perform any of the optional data transfer methods as described in the third aspect and the third aspect.
A seventh aspect of the present application provides a computer readable storage medium having a program stored thereon, the program, when executed on a computer, performing any of the optional data transmission methods of the second aspect and the second aspect, or performing any of the optional data transmission methods of the third aspect and the third aspect.
According to the technical scheme, the method has the following advantages:
the data transmission system comprises data acquisition equipment and data receiving equipment, wherein the data acquisition equipment needs to acquire target original data, determines the data type of the target original data, and then encodes the target original data according to the data type of the target original data to obtain target encoded data so as to generate a target two-dimensional code according to the target encoded data; and finally, the data receiving equipment acquires and analyzes the target two-dimensional code to obtain target original data. The technical means of encoding the target original data to obtain the target encoding data and generating the target two-dimensional code from the target encoding data is adopted to convert the target original data supporting a certain communication protocol into the target two-dimensional code which can be universally analyzed by equipment, so that the equipment compatibility of data transmission is improved, and the problem that the data cannot be transmitted when the data receiving equipment does not support the communication protocol of the data acquisition equipment is solved.
Drawings
In order to more clearly illustrate the technical solutions in the present application, the drawings needed for the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without inventive exercise.
FIG. 1 is a block diagram of a data transmission system according to the present application;
fig. 2 is a schematic flowchart of an embodiment of a data transmission method applied to a data transmission system according to the present application;
fig. 3 is a schematic flow chart of an embodiment of the data transmission method applied to the data acquisition device in the present application;
fig. 4 is a schematic flow chart of another embodiment of the data transmission method applied to the data acquisition device in the present application;
fig. 5 is a schematic flowchart of an embodiment of a data transmission method applied to a data receiving device according to the present application;
fig. 6 is a schematic flowchart of another embodiment of the data transmission method applied to a data receiving device in the present application;
FIG. 7 is a schematic structural diagram of an embodiment of a data acquisition device according to the present application;
fig. 8 is a schematic structural diagram of an embodiment of a data receiving device in the present application.
Detailed Description
Since data transmission from device to device is usually required to adopt the same communication protocol in the case of current devices, a specific communication protocol is required for a receiving device with a specific use. For example, because OBD diagnostic devices manufactured by different manufacturers have different encryption algorithms, during data transmission, supported communication protocols are different, police PDAs cannot be compatible with OBD diagnostic devices of all manufacturers on the market, and data transmission can only be performed with devices consistent with the communication protocols supported by the police PDAs, so that data transmission failure or transmission failure is easily caused when the OBD devices and the police PDA devices perform data transmission. Therefore, the equipment has the problems of poor data transmission compatibility and low data transmission efficiency.
Based on this, the embodiment of the application provides a data transmission method, a transmission system, a collection device and a receiving device, which are used for avoiding the problem that data cannot be transmitted when the data receiving device does not support a communication protocol of the data collection device, so as to achieve the purpose of improving the device compatibility of data transmission.
The technical solutions in the present application will be described clearly and completely with reference to the accompanying drawings, and it is to be understood that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art without making any creative effort based on the present application, shall fall within the protection scope of the present application.
Referring to fig. 1, an architecture diagram of a data transmission system to which the data transmission method of the embodiment of the present application is applied is provided in the embodiment of the present application, and the data transmission system includes a data acquisition device 1 and a data receiving device 2. The data acquisition device 1 and the data receiving device 2 may be connected in a certain communication manner or may be in a non-connection state as long as the data acquired by the data acquisition device 1 is transmitted to the data receiving device 2 in a certain manner. For example, the data acquisition device 1 displays the acquired data on an interface, and the data receiving device 2 acquires the acquired data in a scanning and photographing manner; alternatively, the data acquisition device 1 transmits the acquired data to a third-party device, and then the third-party device transmits the acquired data to the data receiving device 2.
In some specific embodiments, the data acquisition device 1 may include a personal computer, a mobile terminal, a handheld dedicated device, and other devices with data acquisition functions. The data receiving device 2 may include a personal computer, a mobile terminal, a handheld dedicated device, and the like having data acquisition and parsing functions. And is not particularly limited herein.
In some specific embodiments, the data acquisition device 1 is configured to obtain target raw data based on a user instruction, and then determine a data type of the target raw data, where the data type includes a number type, a character type, a mixed character type, and the like; after the data type is determined, the data acquisition equipment 1 encodes the target original data according to the data type to obtain target encoding data, and then generates a target two-dimensional code according to the target encoding data. The data receiving device 2 is configured to obtain the target two-dimensional code, for example, the target two-dimensional code may be obtained through communication interaction through a communication connection established with the data acquisition device 1, or may be obtained through scanning the target two-dimensional code presented on an interface of the data acquisition device. After the data receiving device 2 obtains the target two-dimensional code, the target two-dimensional code is analyzed to obtain target original data. In this way, the transmission of the target raw data between the data collecting apparatus 1 and the data receiving apparatus 2 is completed. By converting the target original data into the two-dimensional code and then transmitting the two-dimensional code, the high requirement of data transmission on a communication protocol is effectively reduced, and the equipment compatibility and the data transmission efficiency of the data transmission are improved.
Referring to fig. 2, an embodiment of a data transmission method provided in the present application is applied to a data transmission system, where the data transmission system includes a data acquisition device and a data receiving device, and the method specifically includes:
201. the data acquisition equipment acquires target original data.
Specifically, the target raw data refers to raw data generated by a target device generating data during operation. Taking the target device as a vehicle as an example, data generated in the running process of the vehicle, such as mileage, speed, acceleration, engine state and the like, are the original data of the vehicle. The data acquisition device may be a device that communicates with the target device and acquires raw data, for example, when the target device is a vehicle, the data acquisition device may be an in-vehicle device, or may be a diagnostic device that acquires raw data of the vehicle by communicating with the vehicle ECU. When the target device is an industrial device, the data acquisition device may be a device that communicates with an electronic control system of the industrial device, so that various pieces of raw data generated during the operation of the industrial device may be acquired.
202. The data acquisition device determines the data type of the target raw data.
Specifically, after the data acquisition device acquires the target original data, the data type is determined according to the expression form of the target original data. The data types comprise a number type, a character type and a mixed character type. In some specific implementation scenarios, when the target original data is all in the expression form of numbers 0-9, determining that the data type of the target original data is a number type; when all the target original data are in the expression form of 26 English characters a-z, determining that the data type of the target original data is the character type; when the expression form of the target original data has both numbers of 0-9 and characters of a-z and other symbols, the data type of the target original data is determined to be a mixed character type.
203. And the data acquisition equipment encodes the target original data according to the data type to obtain target encoded data.
Specifically, after the data acquisition equipment determines the data type of the target original data protector, encoding is performed according to the encoding rule corresponding to the data type to obtain target encoding data. In some specific implementation scenarios, the target encoding data includes encoding data encoded in a binary format.
In some embodiments, in order to enable the finally generated target two-dimensional Code to store more data, a Quick Response matrix Code (QR Code) encoding technique may be used.
A Quick Response matrix Code (QR Code) is a two-dimensional barcode defined by the national standard, and the size of the QR Code is defined as a version with version numbers ranging from 1 to 40. Version 1 is a 21 x 21 matrix, and the size of the matrix is increased by 4 modules for every version number increase, so version 40 is a 177 x 177 matrix. The higher the version of the QR code, the more contents stored, the stronger the error correction capability. According to the standard document description of the QR code, the error correction of the QR code is divided into 4 levels, which are respectively as follows: level L, maximum 7% of errors can be corrected; level M, maximum 15% of errors can be corrected; level Q, maximum 25% of errors can be corrected; level H, maximum 30% of errors can be corrected; in the QR code encoding process, when the version number and the error correction level of the QR code are determined (i.e., the data type is determined), the amount of data that can be stored in the QR code is determined, which is common knowledge to people having general knowledge in the art and will not be described herein.
In some specific embodiments, the acquisition device encodes target original data to obtain target encoded data, determines a corresponding mode identifier according to a data type, determines a count identifier according to a character string length of the target original data, encodes the target original data into binary data codes according to the data type and a corresponding rule, selects a two-dimensional code version and an error correction level according to the character string length, and determines whether to complement an encoding terminator after the binary data codes according to a capacity stored by the selected two-dimensional code version and the error correction level. And finally, combining the mode identifier, the counting identifier, the binary data code and the code terminator together in sequence to compile 8-bit code words to obtain target coded data.
In some specific implementation scenarios, the schema identifiers corresponding to the data types are shown in table 1 below. Since there are corresponding pattern identifiers for different QR code patterns to help match the decoding program, the pattern identifier is a binary number with 4-bit digits, and represents the "number" of each encoding format, for example, the pattern identifier of the number type is 0001, and the pattern identifier of the mixed character type is 0010.
TABLE 1
Data type Pattern identifier
ECI 0111
Number of 0001
Mixed characters 0010
8 byte code 0100
Multi-byte code 1000
Terminator 0000
In some specific embodiments, the count identifier is used to store the length of the source code string, and is determined according to the version and data type of the QR code, as described in table 2 below. Specifically, for example, in the target original data of versions 1 to 9, it can be known from table 2 that the length of the count identifier itself of the mixed character type is defined as 9-bit digits, when the target original data is ABCDE123, the target original data is of the mixed character type, accordingly, the length of the text string of the target original data is 8 characters, the length of the mixed character is 9-bit digits, and therefore the number of characters 8 is encoded as a 9-bit binary number 000001000; a pattern identification code 0010 of a mixed character type is added, and thus an identifier including a pattern identifier and a count identifier is encoded as 0010000001000.
TABLE 2
Version number Number of Mixed characters 8 byte code Multi-byte code
1-9 10 9 8 8
10-26 12 11 16 10
27-40 14 13 16 12
After the identifier is determined, the target original data is encoded into binary data according to the encoding rule corresponding to the data type. In the encoding process, the characters of the target original data are grouped, then each group of characters is converted according to the numerical system of the character index table shown in table 3, and each group of characters is converted into corresponding binary encoding data.
TABLE 3
Figure BDA0003371633670000091
After the second-level system data codes are obtained, the data acquisition equipment further selects a two-dimensional code version and an error correction level according to the length of the character string of the target original data, and then fills a terminator in the tail of the data of the target coded data according to the selected two-dimensional code version and the storage capacity corresponding to the error correction level: at the subsequent complement of "0000", no terminator needs to be added if the capacity is full. Finally, combining the mode identifier, the counting identifier, the binary data code and the code terminator in sequence, and grouping the combined coded data into 8-bit groups to form a code word, if the tail data of the code word is less than 8 bits, filling '0' in the tail part, if the coded data is less than the maximum capacity of the version and the error correction level, filling '11101100' and '00010001' in the tail part until the target coded data is completely filled.
Specifically, for example, the data encoded by "ABCDE 123" in version 1 and Level H is "001000000100000111001101010001010010100111011100001011101", the length of the data is less than the capacity of the current version and the error correction Level, and then "0000" is complemented in the following, so that the encoded data obtained at this time is "0010000001000001110011010100010100101001110111000010111010000"; then, the above encoded data is divided into groups of 8 bits to form codewords: "0010000001000001110011010100010100101001110111000010111010000", because the tail data is less than 8 bits, the tail needs to be filled with "0" to 8 bits, and the encoded data after being filled with "0" is: "0010000001000001110011010100010100101001110111000010111010000000"; since the encoded data after the "0" filling process is less than the maximum capacity of version 1 and Level H, "11101100" and "00010001" need to be supplemented to the end, and finally, the target encoded data generated by "ABCDE 123" at version 1 and Level H is "001000000100000111001101010001010010100111011100001011101000000011101100".
204. And the data acquisition equipment generates a target two-dimensional code according to the target encoding data.
two-Dimensional Code (2-Dimensional Bar Code) records data symbol information by using black and white patterns which are distributed on a plane (two-Dimensional direction) according to a certain rule by using a certain specific geometric figure. The method is characterized in that a bar code with readability of another dimension is expanded on the basis of a one-dimensional bar code, binary data are represented by a black-and-white rectangular pattern, and information contained in the binary data can be acquired after the binary data are scanned by equipment.
In the application, a possible implementation manner of generating the target two-dimensional code is that the data acquisition device generates the target two-dimensional code from a character string in target encoding data by Java development, that is, by adopting a method of importing a zxing.
Another possible implementation is to block the sequence of code words formed by step 203 and generate error correction code words based on the error correction level and the blocked code words, add the error correction code words to the data code word sequence and form a new sequence. And then, the detection graph, the separator, the positioning graph, the correction graph and the code word sequence are placed in a matrix according to a preset position, so that the target two-dimensional code is obtained. Optionally, a mask pattern may be further used for the code area of the symbol, so that the dark and light areas in the two-dimensional code pattern can be distributed in an optimal ratio.
205. And the data receiving equipment acquires the target two-dimensional code and analyzes the target two-dimensional code to obtain target original data.
In some specific embodiments, the data receiving device may obtain the target two-dimensional code through communication interaction with the data acquisition device, for example, obtain the target two-dimensional code transmitted by the data acquisition device through wired communication or wireless communication, or scan and identify the target two-dimensional code presented by the data acquisition device, so as to obtain the target two-dimensional code. And then, the data receiving equipment analyzes the target two-dimensional code to obtain target original data.
In the embodiment of the application, firstly, the data acquisition equipment is required to acquire target original data, then the data acquisition equipment encodes the target original data according to the data type of the determined target original data so as to obtain target encoded data, and then the data acquisition equipment generates the target two-dimensional code according to the target encoded data. When the data receiving equipment needs to acquire the target original data, the two-dimensional code generated by the data acquisition equipment is acquired, and the target original data can be acquired by analyzing the target two-dimensional code. According to the data transmission method and device, any device can use the universal mode to code the acquired data and then convert the encoded data into the two-dimensional code, the device compatibility of data transmission is improved, and the problem that the data cannot be transmitted when the data receiving device does not support a communication protocol of the data acquisition device is avoided.
Referring to fig. 3, an embodiment of a data transmission method provided in the present application is applied to a data acquisition device in a data transmission system, where the data transmission system includes the data acquisition device and a data receiving device, and the method specifically includes:
301. the data acquisition equipment acquires target original data.
302. The data acquisition device determines the data type of the target raw data.
Steps 301 to 302 in this embodiment are similar to steps 201 to 202 in the previous embodiment, and are not described again here.
303. And the data acquisition equipment encodes the target original data according to the data type to obtain target encoded data.
Specifically, the data types of the target raw data include a number type, a character type, and a mixed character type.
The coding schemes for these three data types are described in detail below:
firstly, target original data are coded according to the digital type to obtain target coded data.
Specifically, after the data acquisition equipment determines that the data type of the target original data is the digital type, a corresponding mode identifier is determined according to the digital type, a counting identifier is determined according to the character string length of the target original data, the target original data is encoded into a binary data code according to the digital type and a corresponding rule, a two-dimensional code version and an error correction level are selected according to the character string length, and whether a coding terminator is filled after the binary data code is encoded is determined according to the capacity stored by the selected two-dimensional code version and the error correction level. And finally, combining the mode identifier, the counting identifier, the binary data code and the code terminator together in sequence to compile 8-bit code words to obtain target coded data. In some specific embodiments, the target original data is grouped to obtain at least 2 grouped data, and then a first target bit number is determined according to the grouped data; then, the at least 2 grouped data are coded into second-level coded data with a first target bit number, then the binary coded data of the at least 2 grouped data are combined to obtain second-level coded data codes corresponding to the target original data, and then the mode identifier, the counting identifier, the binary coded data and the coding terminator are combined together in sequence to be coded into 8-bit code words to obtain the target coded data. Wherein the first target number of bits is determined based on a possible maximum value of the packet data.
In some specific embodiments, for example, when the original data is "123456", the corresponding pattern identifier is first determined to be 0001 in table 1 above according to the number type of the original data, and in versions 1 to 9, the length identifier is 10 bits as known from table 2 above, the character string length of the original data is 6, and thus the length identifier is 0000000110. Next, the original data "123456" is grouped. In some specific embodiments, the original data packets of the digital type are then divided into groups of 3 digits. In a 3-digit packet, since the maximum possible value of the packet in this case is 999, and 999 is between 10 of 2 and 9 of 2, it can be determined that the first target number of bits is a 10-bit number. Further, the original data "123456" is divided into two groups of packet data "123" and "456", and the binary representation of 10-bit digits of "123" is: 0001111011, the binary representation of the 10-bit digit of "456" is: 0111001000, "00011110110111001000" is the binary data code. And because the length after coding is less than the storage capacity of the current version and the error correction level, a coding terminator '0000' is added in the subsequent process, the mode identifier, the length identifier, the two-level system data coding and the coding terminator are combined together to obtain a coding string '00010000000110000111101101110010000000', the coding string is formed into a code word according to a group of 8 bits, and the supplementary coding is filled according to the version and the error correction level to obtain the final target coding data. When the length of the grouped data is less than 3 digits, if the length of the grouped data is only 1 digit, determining that the first target bit digit is 4 digits; if the number of the bits is only 2, the first target bit number is determined to be 7 bits, and if the acquired data "9876" is divided into two sections of "987" and "6", the binary representation of the 10 bit number of "987" is as follows: 1111011011, the binary representation of the 4-bit digit number of "6" is: 0110, therefore, "9876" is denoted as "11110110110110". Then, the '11110110110110' is subject to terminator padding and codeword formation to obtain the final target coded data.
And secondly, encoding the target original data according to the type of the mixed characters to obtain target encoded data.
The mixed character type includes combinations of characters, numbers, symbols, etc., such as 0-9, capital a through Z, and symbols $% + -/, and also includes spaces.
Specifically, after the data acquisition equipment determines that the data type of the target original data is a mixed character type, a corresponding mode identifier is determined according to the mixed character type, a counting identifier is determined according to the character string length of the target original data, the target original data is encoded into a binary data code according to the mixed character type and a corresponding rule, a two-dimensional code version and an error correction level are selected according to the character creation length, and whether a code terminator is filled after the two-level system data is encoded is determined according to the capacity stored by the selected two-dimensional code version and the error correction level. And finally, combining the mode identifier, the counting identifier, the binary data code and the code terminator together in sequence to form an 8-bit code word and obtain target coded data.
In some specific embodiments, the target original data is grouped to obtain at least 2 grouped data, the at least 2 grouped data are respectively converted into at least 2 10-ary grouped values according to a 45-ary system, meanwhile, a second target bit number is determined according to the grouped data, then, the at least 2 10-ary grouped values are respectively encoded into a binary data code with a second target bit number, and the binary data codes are combined with the pattern identifier, the counting identifier and the code terminator to obtain the target encoded data. More specifically, for example, in versions 1 to 9, when the data type of "ABCDE 123" is determined to be a mixed character type, and the "ABCDE 123" is grouped two by two to obtain "AB", "CD", "E1", and "23", when the grouped data has 2 characters, the possible maximum value is: 44 × 45+44 ═ 2024, between the power of 10 of 2 and the power of 11 of 2, so the second target number of bits is 11 bits. The first character of each group of characters "AB", "CD", "E1" and "23" multiplied by 45 and then added by the second number is converted to 461, 553, 631 and 93, respectively. Therefore, each segment becomes a 2-ary code of 11-bit digits, i.e., 2-ary representations of 11-bit digits of 461, 553, 631 and 93 are: 00111001101, 01000101001, 01001110111, and 00001011101. The length of the target original data is 8 characters, the length of the mixed character is 9 bit digits, and therefore the character number of 8 is encoded into 9 bit binary representation: 000001000, respectively; plus the identification code of the mixed character type, the overall code is 0010000001000. Thus, the resulting unprocessed target encoded data is represented as: "001000000100000111001101010001010010100111011100001011101". Then, the '001000000100000111001101010001010010100111011100001011101' is subject to terminator padding and codeword formation to obtain the final target coded data.
It should be noted that if the number of characters is only 1, the number is represented by 6-bit digits.
It should be noted that the scheme is also applicable to the case where the data type of the target raw data is a character type.
And thirdly, encoding the target original data according to the character type to obtain target encoded data.
Specifically, after the data acquisition device determines that the data type of the target original data is a character type, the target original data may be grouped to obtain at least 2 grouped data, the at least 2 grouped data are respectively converted into at least 2 10-ary grouped values according to a 26-ary system, meanwhile, a third target bit number is determined according to the grouped data, then, the at least 2 10-ary grouped values are respectively encoded into a third target bit binary data code, and the binary data codes are combined to obtain the target encoded data. The step implementation manner of the scheme is similar to that of the second scheme, and is not described herein in detail.
304. And the data acquisition equipment generates a target two-dimensional code according to the target encoding data, so that the target two-dimensional code is analyzed to obtain target original data after being acquired by the data receiving equipment.
Step 304 in this embodiment is similar to step 204 in the previous embodiment, and is not described herein again.
In the embodiment of the application, the data acquisition equipment can perform corresponding coding operation according to different data types of the target original data, so that target coded data are obtained, and the diversity of data processing modes of the data acquisition equipment is embodied.
Referring to fig. 4, an embodiment of the present application provides another embodiment of a data transmission method, which is applied to a data acquisition device in a data transmission system, where the data transmission system includes the data acquisition device and a data receiving device, and the method specifically includes:
401. the data acquisition equipment acquires target original data.
402. The data acquisition device determines the data type of the target raw data.
403. And the data acquisition equipment encodes the target original data according to the data type to obtain target encoded data.
Steps 401 to 403 in this embodiment are similar to steps 301 to 303 in the previous embodiment, and are not described again here.
404. And the data acquisition equipment encrypts the target encoding data to obtain an encrypted code.
405. And the data acquisition equipment generates a target two-dimensional code according to the encrypted code.
In order to improve the security between data transmission, the data acquisition device may encrypt the target encoded data by using a certain encryption algorithm, and then generate the encrypted target encoded data into the two-dimensional code. In this application, the data acquisition device may encrypt the target encoded data by using a symmetric encryption algorithm of AES, and the encryption key is the same as the decryption key for the data encrypted by the algorithm.
Specifically, the AES algorithm logic may encrypt the target encoded data in multiple modes, such as ECB mode, CBC mode, and CFB mode.
In the embodiment of the application, the data acquisition equipment can also preset a secret key to encrypt the two-dimensional code converted from the encoded target original data, and the confidentiality of the data is improved by the technical means of encrypting the two-dimensional code.
Referring to fig. 5, an embodiment of a data transmission method provided in the present application is applied to a data receiving device in a data transmission system, where the data transmission system includes a data acquisition device and a data receiving device, and the method specifically includes:
501. and the data receiving equipment acquires the target two-dimensional code.
Specifically, the target two-dimensional code is generated by data acquisition equipment according to target encoding data, and the target encoding data is obtained by encoding target original data by the data acquisition equipment according to the data type of the target original data. For a specific generation process and manner of the target two-dimensional code, reference may be made to relevant contents in the above embodiments, and details are not described here again.
The target two-dimensional code acquired by the data receiving device can be obtained by the data acquisition device through transmission in a wired communication or wireless communication mode, and can also be obtained by scanning and identifying the two-dimensional code presented by the data acquisition device. And is not particularly limited herein.
502. And the data receiving equipment analyzes the target two-dimensional code to obtain target original data.
Specifically, after the data receiving device obtains the target two-dimensional code, the data receiving device analyzes the target two-dimensional code to obtain the target original data.
In the embodiment of the application, after the data receiving device acquires the target two-dimensional code, the target two-dimensional code is further analyzed to obtain the target original data, and the consistency of a communication protocol with the data acquisition device is not required to be maintained, so that the compatibility of data transmission equipment is improved, and the data transmission efficiency is improved.
Referring to fig. 6, an embodiment of the present application provides another embodiment of a data transmission method, which is applied to a data receiving device in a data transmission system, where the data transmission system includes a data acquisition device and a data receiving device, and the method specifically includes:
601. and the data receiving equipment acquires the target two-dimensional code.
Step 601 in this embodiment is similar to step 501 in the previous embodiments, and is not described here again.
602. And the data receiving equipment analyzes the target two-dimensional code to obtain an encrypted code.
603. The data receiving apparatus determines a decryption key corresponding to the encryption code.
604. And the data receiving equipment decrypts the encrypted code by using the decryption key to obtain the decrypted code.
605. And the data receiving equipment analyzes the decryption codes to obtain target original data.
In some specific embodiments, in order to improve the security of data transmission, the data acquisition device may encrypt the target encoded data by using a symmetric encryption algorithm of AES, where the encryption key is the same as the decryption key for the data encrypted by the algorithm, and therefore, the data reception device needs to know the encryption key in advance to decrypt the data by using the key in the process of decrypting the data.
Specifically, the AES algorithm logic may encrypt the target encoded data in multiple modes, such as ECB mode, CBC mode, and CFB mode.
For example, in the ECB mode, the data receiving device determines a decryption key according to an encryption key corresponding to the encryption code, and then sequentially performs character decryption on the character strings of the encrypted target encoded data according to a preset sequence using the decryption key, so as to obtain target original data of a plaintext.
For another example, in the CBC mode, after determining the decryption key according to the encryption key corresponding to the encryption code, the data receiving device performs character decryption on the character string of the encrypted target encoded data using the decryption key to obtain first plaintext data; and then, carrying out XOR on the first plaintext data and the previous encrypted data character to obtain second plaintext data, wherein the second plaintext data is the target original data.
In this application, data acquisition equipment can preset the secret key, encrypts the two-dimensional code that turns into after encoding target raw data, and data receiving equipment needs to have preset secret key after obtaining target two-dimensional code, just can carry out the analysis to this two-dimensional code to obtain target raw data. The confidentiality and the safety of data transmission are improved through the technical means of encrypting the two-dimensional codes and the technical means of analyzing the two-dimensional codes according to the corresponding secret keys.
Referring to fig. 7, the present application provides a data acquisition apparatus, including:
a processor 701, a memory 702, an input-output unit 703, and a bus 704.
The processor 701 is connected to a memory 702, an input-output unit 703 and a bus 704.
The memory 702 holds a program that the processor 701 calls to perform the following methods:
acquiring target original data;
determining the data type of the target original data;
encoding target original data according to the data type to obtain target encoded data;
and generating a target two-dimensional code according to the target encoding data so that the target two-dimensional code is analyzed to obtain target original data after being acquired by the data receiving equipment.
Optionally, the data type includes a digital type;
when the data type of the target original data is determined to be a digital type, encoding the target original data according to the data type to obtain target encoded data, specifically comprising:
grouping target original data to obtain at least 2 grouped data;
determining a first target bit number according to the grouped data;
coding at least 2 packet data into binary data codes of a first target bit number respectively;
and combining at least 2 binary data codes of the grouped data to obtain target coded data.
Optionally, the data type includes a character type or a mixed character type;
when the data type of the target original data is determined to be a character type or a mixed character type, encoding the target original data according to the data type to obtain target encoded data, specifically comprising:
grouping target original data to obtain at least 2 grouped data;
converting at least 2 grouped data into at least 2 grouped values with 10 system according to 45 system;
determining a second target bit number according to the grouped data;
respectively encoding at least 2 10-system grouping values into binary data codes of a second target bit number;
and combining binary data codes corresponding to at least 2 10-system grouping values to obtain target coded data.
Optionally, generating the target two-dimensional code according to the target encoding data specifically includes:
encrypting the target encoding data to obtain an encrypted code;
and generating a target two-dimensional code according to the encrypted code.
Referring to fig. 8, the present application provides a data receiving apparatus, including:
a processor 801, a memory 802, an input-output unit 803, and a bus 804.
The processor 801 is connected to a memory 802, an input-output unit 803, and a bus 804.
The memory 802 holds a program that the processor 801 calls to perform the following methods:
acquiring a target two-dimensional code, wherein the target two-dimensional code is generated by data acquisition equipment according to target encoding data, and the target encoding data is obtained by the data acquisition equipment by encoding target original data according to the data type of the target original data;
and analyzing the target two-dimensional code to obtain target original data.
Optionally, analyzing the target two-dimensional code to obtain target original data specifically includes:
analyzing the target two-dimensional code to obtain an encrypted code;
determining a decryption key corresponding to the encrypted code;
decrypting the encrypted code by using the decryption key to obtain a decrypted code;
and analyzing the decrypted codes to obtain target original data.
The present application provides in a fourth aspect a computer readable storage medium having a program stored thereon, which when executed on a computer performs the method of any of fig. 2.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a read-only memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and the like.

Claims (10)

1. A data transmission method is applied to a data transmission system, the data transmission system comprises a data acquisition device and a data receiving device, and the method comprises the following steps:
the data acquisition equipment acquires target original data; determining the data type of the target original data; encoding the target original data according to the data type to obtain target encoded data; generating a target two-dimensional code according to the target encoding data;
and the data receiving equipment acquires the target two-dimensional code and analyzes the target two-dimensional code to obtain the target original data.
2. A data transmission method is applied to data acquisition equipment, and the method comprises the following steps:
acquiring target original data;
determining the data type of the target original data;
encoding the target original data according to the data type to obtain target encoded data;
and generating a target two-dimensional code according to the target encoding data so that the target two-dimensional code is acquired by data receiving equipment and then analyzed to obtain the target original data.
3. The data transmission method of claim 2, wherein the data type comprises a numeric type;
when the data type of the target original data is determined to be a digital type, the encoding the target original data according to the data type to obtain target encoded data specifically includes:
grouping the target original data to obtain at least 2 grouped data;
determining a first target bit number according to the grouped data;
encoding the at least 2 packet data into binary data codes of the first target bit number respectively;
and combining the binary data codes of the at least 2 grouped data to obtain target coded data.
4. The data transmission method according to claim 2, wherein the data type includes a character type or a mixed character type;
when the data type of the target original data is determined to be a character type or a mixed character type, the encoding the target original data according to the data type to obtain target encoded data specifically includes:
grouping the target original data to obtain at least 2 grouped data;
converting the at least 2 grouped data into at least 2 10-system grouped values according to a 45-system;
determining a second target bit number according to the grouped data;
encoding the at least 2 10-system grouping values into binary data codes of the second target bit number respectively;
and combining the binary data codes corresponding to the at least 2 10-system grouping values to obtain target coded data.
5. The data transmission method according to any one of claims 2 to 4, wherein the generating a target two-dimensional code according to the target encoding data specifically includes:
encrypting the target encoding data to obtain an encrypted code;
and generating a target two-dimensional code according to the encrypted code.
6. A data transmission method applied to a data receiving device, the method comprising:
acquiring a target two-dimensional code, wherein the target two-dimensional code is generated by data acquisition equipment according to target encoding data, and the target encoding data is obtained by encoding the target original data by the data acquisition equipment according to the data type of the target original data;
and analyzing the target two-dimensional code to obtain the target original data.
7. The data transmission method according to claim 6, wherein the analyzing the target two-dimensional code to obtain the target original data specifically includes:
analyzing the target two-dimensional code to obtain an encrypted code;
determining a decryption key corresponding to the encrypted code;
decrypting the encrypted code by using the decryption key to obtain the decrypted code;
and analyzing the decryption code to obtain the target original data.
8. A data transmission system, comprising:
the data acquisition equipment is used for acquiring target original data; determining the data type of the target original data; encoding the target original data according to the data type to obtain target encoded data; generating a target two-dimensional code according to the target encoding data;
and the data receiving equipment is used for acquiring the target two-dimensional code and analyzing the target two-dimensional code to obtain the target original data.
9. A data acquisition device, comprising:
the device comprises a processor, a memory, an input and output unit and a bus;
the processor is connected with the memory, the input and output unit and the bus;
the memory holds a program that the processor calls to execute the data transfer method according to any one of claims 2 to 5.
10. A data receiving apparatus, comprising:
the device comprises a processor, a memory, an input and output unit and a bus;
the processor is connected with the memory, the input and output unit and the bus;
the memory holds a program that the processor calls to execute the data transfer method according to any one of claims 6 or 7.
CN202111402774.3A 2021-11-24 2021-11-24 Data transmission method, transmission system, acquisition equipment and receiving equipment Pending CN114239779A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111402774.3A CN114239779A (en) 2021-11-24 2021-11-24 Data transmission method, transmission system, acquisition equipment and receiving equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111402774.3A CN114239779A (en) 2021-11-24 2021-11-24 Data transmission method, transmission system, acquisition equipment and receiving equipment

Publications (1)

Publication Number Publication Date
CN114239779A true CN114239779A (en) 2022-03-25

Family

ID=80750908

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111402774.3A Pending CN114239779A (en) 2021-11-24 2021-11-24 Data transmission method, transmission system, acquisition equipment and receiving equipment

Country Status (1)

Country Link
CN (1) CN114239779A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115001676A (en) * 2022-06-02 2022-09-02 深圳市爱克信智能股份有限公司 Two-dimensional code encryption method, decryption method, system, terminal and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1710929A (en) * 2005-07-11 2005-12-21 北京中星微电子有限公司 Data communication system and method of hand-held apparatus
CN103347097A (en) * 2013-07-26 2013-10-09 国家电网公司 Method and system for file transmission
CN104123364A (en) * 2014-07-21 2014-10-29 上海迈循信息科技有限公司 Method and device for transmitting and receiving data through mobile terminal
CN111130958A (en) * 2019-12-18 2020-05-08 广东美的厨房电器制造有限公司 Data transmission method and device, electronic equipment and storage medium
CN111585960A (en) * 2020-04-02 2020-08-25 金航数码科技有限责任公司 Two-dimensional code data transmission system and method based on internal and external network isolation

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1710929A (en) * 2005-07-11 2005-12-21 北京中星微电子有限公司 Data communication system and method of hand-held apparatus
CN103347097A (en) * 2013-07-26 2013-10-09 国家电网公司 Method and system for file transmission
CN104123364A (en) * 2014-07-21 2014-10-29 上海迈循信息科技有限公司 Method and device for transmitting and receiving data through mobile terminal
CN111130958A (en) * 2019-12-18 2020-05-08 广东美的厨房电器制造有限公司 Data transmission method and device, electronic equipment and storage medium
CN111585960A (en) * 2020-04-02 2020-08-25 金航数码科技有限责任公司 Two-dimensional code data transmission system and method based on internal and external network isolation

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115001676A (en) * 2022-06-02 2022-09-02 深圳市爱克信智能股份有限公司 Two-dimensional code encryption method, decryption method, system, terminal and storage medium
CN115001676B (en) * 2022-06-02 2022-12-02 深圳市爱克信智能股份有限公司 Two-dimensional code encryption method, decryption method, system, terminal and storage medium

Similar Documents

Publication Publication Date Title
CN100576227C (en) A kind of software encrypting registration piracy-preventing method
CN112202984B (en) Ciphertext domain reversible information hiding method based on error correction redundancy
CN110768785B (en) Encoding and decoding methods, related devices and computer equipment
CN115150818B (en) Communication transmission encryption method based on artificial intelligence
CN107911354B (en) Composite parallel data encryption method
CN114051006A (en) Data transmission method, data transmission device, computer equipment and storage medium
CN114239779A (en) Data transmission method, transmission system, acquisition equipment and receiving equipment
CN117640256B (en) Data encryption method, recommendation device and storage medium of wireless network card
CN105718978B (en) QR code generation method and device, and decoding method and device
CN112235101B (en) Coding method and device based on hybrid coding mechanism, decoding method and device
CN117708847A (en) 3C product leasing platform data processing method based on data compression and encryption
CN109214488B (en) Method and system for information transmission based on graphic coded data
CN114943205A (en) Method, system, storage medium and electronic equipment for generating identity recognition code UUID
CN111064560B (en) Data encryption transmission method and device, terminal and data encryption transmission system
CN108959949B (en) Method and system for carrying out safe information transmission through graphic coding data
CN110705997A (en) Anti-counterfeiting coding method compatible with heterogeneous system
CN115580840B (en) SMS short message system based on security policy
CN113489698B (en) Internet of things data secret reading method and system based on block chain
CN117057804B (en) Financial transaction data secure storage method and system based on hash sequence
CN113283215B (en) Data confusion method and device based on UTF-32 coding
CN109391616B (en) Information management method and terminal
CN116455892B (en) File transmission method, file transmission device and terminal equipment
CN115374462B (en) Storage management system based on financial service data
CN117240409B (en) Data processing method for smart phone and smart wearable device
CN110266488B (en) Key generation method based on position combination and data encryption transmission method and system

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