Data encryption and decryption transmission method and device based on two-dimensional code and storage medium

By adopting the QR code-based data encryption and decryption transmission method in the SCADA system, data loss and leakage that are prone to occur during data transmission are solved, and the security and integrity of data transmission are achieved.

CN119814471AInactive Publication Date: 2025-04-11STATE POWER RIXIN TECH CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202510274166.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-10
Publication Date
2025-04-11
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

SCADA systems are prone to data loss and data leakage during data transmission, especially in power plants, large amounts of power plants and the SCADA system is in an isolated network segment.

Method used

The data encryption and decryption transmission method based on QR code is adopted, and the preprocessed data is compressed, encrypted and segmented, multiple QR code images are generated for transmission, and the original data is decrypted and spliced ​​through the image acquisition device.

Benefits of technology

Improve the security of data transmission, reduce the risk of data loss and leakage, and ensure the integrity and security of data in SCADA systems during transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119814471A_ABST
    Figure CN119814471A_ABST
Patent Text Reader

Abstract

The invention provides a data encryption and decryption transmission method and device based on a two-dimensional code and a storage medium, and relates to the technical field of data transmission. The data encryption transmission method based on the two-dimensional code comprises the steps of performing compression processing on determined preprocessed data to obtain character string data, and determining digital data and alphabet data contained in the character string data; based on preset encryption rules corresponding to the digital data and the alphabet data, performing encryption processing on the digital data and the alphabet data to obtain encrypted character string data; segmenting the encrypted character string data to obtain a plurality of pieces of sub encrypted character string data; and generating a plurality of two-dimensional code images by using the plurality of sub-encrypted character string data and the preset character data of the preset character number corresponding to the plurality of sub-encrypted character string data, and transmitting the plurality of two-dimensional code images to a display device for display. According to the invention, the security of data transmission can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of data transmission, and in particular to a data encryption and decryption transmission method, device and storage medium based on a two-dimensional code. Background Art

[0002] The SCADA system database stores historical actual data and forecast data generated during the inspection process of the inspection equipment in the power plant; in order to meet the inspection needs of technicians, it is necessary to regularly transmit historical actual data and forecast data back to the background. With the continuous development of data transmission technology, there are now many data transmission methods, such as direct data transmission, data transmission with the help of auxiliary equipment, and data transmission with the help of auxiliary carriers.

[0003] However, the inventors of this application found that due to the large number of power plants, the amount of data that needs to be uploaded is large and the types of data are many. In addition, the SCADA system is in an isolated network segment, and directly transmitting data back to the background through a USB flash drive or through the network can easily cause data loss or even data leakage. Summary of the invention

[0004] In order to improve the security of data transmission; the present application provides a two-dimensional code data encryption and decryption transmission method, device, electronic device and medium.

[0005] The present application provides a data encryption transmission method based on a two-dimensional code, which adopts the following technical solution: A data encryption transmission method based on a two-dimensional code comprises: compressing determined pre-processed data to obtain character string data, and determining digital data and letter data contained in the character string data; Based on the preset encryption rules corresponding to the digital data and the letter data, the digital data and the letter data are encrypted to obtain encrypted string data; The encrypted string data is segmented to obtain a plurality of sub-encrypted string data; A plurality of two-dimensional code images are generated using the plurality of sub-encrypted character string data and the preset character data of the preset number of characters corresponding thereto, and the plurality of two-dimensional code images are transmitted to a display device for display.

[0006] According to some embodiments, the above-mentioned preprocessed data is determined by the following steps: obtaining the first original data and the initial data accuracy of the first original data; based on the initial data accuracy and preset accuracy adjustment rules, performing accuracy processing on the first original data to obtain the second original data; increasing the multiplication of the data contained in the second original data to obtain the preprocessed data.

[0007] According to some embodiments, the above-mentioned encryption processing of digital data and letter data based on the preset encryption rules corresponding to each other to obtain encrypted string data includes: calling the preset encryption rules corresponding to each other to perform offset processing on the digital data and letter data to obtain string offset data corresponding to the string data; splitting the string offset data to obtain at least two substring offset data; swapping the positions of at least two string offset data to obtain encrypted string data.

[0008] According to some embodiments, the above-mentioned encryption processing of digital data and letter data based on the preset encryption rules corresponding to each other to obtain encrypted string data includes: calling the offset rule contained in the preset encryption rule corresponding to the letter data, performing offset processing on the letter data, and obtaining the offset of the letter data; summing the offset with the position subscript of the letter data to obtain a first summed offset; when the first summed offset does not exceed a first preset number, defining the pre-letter data corresponding to the first summed offset as the offset result of the letter data; and encrypting the letter data based on the offset result.

[0009] According to some embodiments, after the offset is summed with the position subscript of the letter data to obtain the first summed offset, the digital data and the letter data are encrypted based on the preset encryption rules corresponding to each of the digital data and the letter data to obtain encrypted string data, and the method also includes: when the first summed offset exceeds the first preset number, the first summed offset is subtracted from the first preset number to obtain a first subtraction offset; the pre-letter data corresponding to the first subtraction offset is defined as the offset result of the letter data; and the letter data is encrypted based on the offset result.

[0010] According to some embodiments, the above-mentioned calling of the offset rule included in the preset encryption rule corresponding to the letter data performs offset processing on the letter data to obtain the offset of the letter data, including: determining the position subscript of the letter data in the string data, and summing the position subscript with a second preset number to obtain a second summed offset; performing remainder calculation on the second summed offset and the second preset number, and using the calculated remainder as the offset of the letter data.

[0011] According to some embodiments, the above-mentioned encryption processing of digital data and letter data based on the preset encryption rules corresponding to each other to obtain encrypted string data includes: when the digital data is within a first quantity range, summing the digital data and the preset value to obtain a sum result, and defining the sum result as an offset result of the digital data; encrypting the digital data based on the offset result; when the digital data is within a second quantity range, subtracting the digital data from the preset value to obtain a difference result, and defining the difference result as an offset result of the digital data; encrypting the digital data based on the offset result.

[0012] The present application provides a data encryption transmission device based on a two-dimensional code, which adopts the following technical solution: A data encryption transmission device based on a two-dimensional code comprises: a string data determination module, an encrypted string determination module, a data segmentation module and an image transmission module, wherein: A character string data determination module is used to compress the determined pre-processed data to obtain character string data, and determine the digital data and letter data contained in the character string data; The encryption string determination module is used to encrypt the digital data and the letter data based on the preset encryption rules corresponding to the digital data and the letter data, and obtain the encrypted string data; A data segmentation module is used to segment the encrypted string data to obtain multiple sub-encrypted string data; The image transmission module is used to generate a plurality of two-dimensional code images using a plurality of sub-encrypted character string data and preset character data of a preset number of characters corresponding thereto, and transmit the plurality of two-dimensional code images to a display device for display.

[0013] According to some embodiments, the above-mentioned QR code-based data encryption and transmission device also includes: a data preprocessing module, wherein the data preprocessing module is used to obtain the first original data and the initial data accuracy of the first original data; based on the initial data accuracy and preset accuracy adjustment rules, the first original data is precision processed to obtain the second original data; the multiplication of the data contained in the second original data is increased to obtain the preprocessed data.

[0014] According to some embodiments, the above-mentioned encrypted string determination module is specifically used to: call the preset encryption rules corresponding to the digital data and the letter data respectively, perform offset processing on the digital data and the letter data, and obtain string offset data corresponding to the string data; split the string offset data to obtain at least two substring offset data; swap the positions of at least two string offset data to obtain encrypted string data.

[0015] According to some embodiments, the above-mentioned encrypted string determination module is specifically used to: call the offset rule included in the preset encryption rule corresponding to the letter data, perform offset processing on the letter data, and obtain the offset of the letter data; sum the offset and the position subscript of the letter data to obtain a first summed offset; when the first summed offset does not exceed a first preset number, define the pre-letter data corresponding to the first summed offset as the offset result of the letter data; based on the offset result, encrypt the letter data.

[0016] According to some embodiments, the above-mentioned encrypted string determination module is specifically used to: when the first sum offset exceeds the first preset number, perform a difference processing on the first sum offset and the first preset number to obtain a first difference offset; define the pre-letter data corresponding to the first difference offset as the offset result of the letter data; and encrypt the letter data based on the offset result.

[0017] According to some embodiments, the above-mentioned encrypted string determination module is specifically used to: determine the position subscript of the letter data in the string data, and sum the position subscript with a second preset number to obtain a second sum offset; perform a remainder calculation on the second sum offset and the second preset number, and use the calculated remainder as the offset of the letter data.

[0018] According to some embodiments, the above-mentioned encrypted string determination module is specifically used to: when the digital data is within a first quantity range, perform a sum calculation on the digital data and a preset value to obtain a sum result, and define the sum result as an offset result of the digital data; based on the offset result, encrypt the digital data; when the digital data is within a second quantity range, perform a difference calculation on the digital data and the preset value to obtain a difference result, and define the difference result as an offset result of the digital data; based on the offset result, encrypt the digital data.

[0019] The present application provides an electronic device, which adopts the following technical solution: An electronic device, comprising: processor; The memory stores a computer program, and when the computer program is executed by the processor, the processor executes the above-mentioned data encryption and transmission method based on the two-dimensional code.

[0020] The present application provides a computer-readable storage medium, which adopts the following technical solution: A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor executes the above-mentioned data encryption and transmission method based on a two-dimensional code.

[0021] The present application provides a data decryption and transmission method based on a two-dimensional code, which adopts the following technical solution: A data decryption and transmission method based on a two-dimensional code, used for decrypting and transmitting a plurality of two-dimensional code images obtained by the above-mentioned data encryption and transmission method based on a two-dimensional code; The above data decryption and transmission method includes: Based on the preset character data respectively corresponding to the multiple two-dimensional code images, data verification is performed on the multiple two-dimensional code images; When multiple two-dimensional code images are verified to be qualified, preset character data corresponding to the multiple two-dimensional code images are eliminated, and the character string data contained in the multiple two-dimensional code images are decrypted and spliced ​​to obtain preprocessed data.

[0022] According to some embodiments, the above-mentioned data verification of multiple QR code images based on preset character data respectively corresponding to the multiple QR code images includes: determining whether the number of scanned QR code images is equal to the number of generated QR code images, and determining whether there are duplications in the multiple scanned QR code images; when the number of scanned QR code images is equal to the number of generated QR code images, and there are no duplications in the multiple scanned QR code images, obtaining the preset character data of the QR code image of the first scanning order, wherein the preset character data includes the time when the QR code image of the first scanning order is generated; based on the preset character data, determining whether the time included in the preset character data of the QR code image after the QR code image of the first scanning order is the same as the time included in the preset character data of the QR code image of the first scanning order; when the time corresponding to the QR code images after the QR code image of the first scanning order is the same as the time corresponding to the QR code image of the first scanning order, determining that the multiple QR code images have passed the verification.

[0023] The present application provides a data decryption and transmission device based on a two-dimensional code, which adopts the following technical solution: A data decryption and transmission device based on a two-dimensional code, used for decrypting and transmitting a plurality of two-dimensional code images obtained by the above-mentioned data encryption and transmission method based on a two-dimensional code; The above-mentioned data decryption transmission device includes: a data verification module and a pre-processing data recovery module, wherein: A data verification module, used for performing data verification on the multiple two-dimensional code images based on preset character data corresponding to the multiple two-dimensional code images respectively; The preprocessing data recovery module is used to remove the preset character data corresponding to the multiple two-dimensional code images when the multiple two-dimensional code images are verified to be qualified, and to decrypt and splice the character string data contained in the multiple two-dimensional code images to obtain preprocessing data.

[0024] According to some embodiments, the above-mentioned data verification module is specifically used to: determine whether the number of scanned QR code images is equal to the number of generated QR code images, and determine whether there are duplications in the multiple scanned QR code images; when the number of scanned QR code images is equal to the number of generated QR code images, and there are no duplications in the multiple scanned QR code images, obtain preset character data of the QR code image of the first scanning order, wherein the preset character data includes the time when the QR code image of the first scanning order is generated; based on the preset character data, determine whether the time included in the preset character data of the QR code image after the QR code image of the first scanning order is the same as the time included in the preset character data of the QR code image of the first scanning order; when the time corresponding to the QR code images after the QR code image of the first scanning order is the same as the time corresponding to the QR code image of the first scanning order, determine that the multiple QR code images have passed the verification.

[0025] According to the above-mentioned embodiment provided by the present application, the determined pre-processed data is compressed to obtain character string data including letter data and digital data, so as to reduce the space occupied by the data; then, the letter data and the digital data are encrypted based on the encryption rules corresponding to each other, and the character string data is encrypted to reduce the occurrence of data leakage during transmission; then, limited by the capacity of the two-dimensional code image, the encrypted character string data is segmented to obtain multiple sub-encrypted character string data, and the corresponding two-dimensional code image data are generated respectively, and then the data is transmitted using the two-dimensional code image as a carrier, thereby improving the security of data transmission. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1 It is a block diagram of a data encryption transmission method based on a QR code according to an embodiment of the present application; Figure 2 It is a block diagram of a data encryption transmission device based on a two-dimensional code according to an embodiment of the present application; Figure 3 It is a block diagram of a data decryption and transmission method based on a two-dimensional code according to an embodiment of the present application; Figure 4 It is a block diagram of a data decryption and transmission device based on a two-dimensional code according to an embodiment of the present application; Figure 5 It is a block diagram of a data encryption and decryption transmission method based on a two-dimensional code according to an embodiment of the present application; Figure 6 It is a schematic diagram of an electronic device according to an embodiment of the present application.

[0027] Description of reference numerals: 20: Data encryption and transmission device based on QR code; 201: String data determination module; 202: Encrypted string determination module; 203: Data segmentation module; 204: Image transmission module; 40: Data decryption and transmission device based on QR code; 401: Data verification module; 402: Pre-processing data recovery module; 60: Electronic device; 601: Processor; 602: Bus; 603: Memory; 604: Transceiver. DETAILED DESCRIPTION

[0028] The following is combined with Figure 1-Figure 6 This application is described in further detail.

[0029] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the drawings in the embodiments of the present application are collected below to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0030] The embodiment of the present application provides a data encryption transmission method based on a QR code, which can be executed by an electronic device, wherein the electronic device can be a server or a terminal device, wherein the server can be an independent physical server, or a server cluster or distributed device composed of multiple physical servers, or a cloud server providing cloud computing services; the server can be an independent device, or it can be installed in a SCADA system (Supervisory Control And Data Acquisition, industrial automation and real-time monitoring system). The terminal device can be a tablet computer, a laptop computer, a desktop computer, etc., but is not limited thereto. The terminal device and the server can be directly or indirectly connected via wired or wireless communication, and the embodiment of the present invention does not limit this.

[0031] Reference Figure 1 A data encryption transmission method based on a two-dimensional code includes: step S101, step S102, step S103 and step S104, wherein: S101, compressing the determined pre-processed data to obtain character string data, and determining the numeric data and letter data contained in the character string data.

[0032] In some embodiments, the electronic device queries and obtains the data to be uploaded from the database of the SCADA system, and encapsulates the data to obtain a encapsulation result in the form of a map, wherein the electronic device can use a HashMap (an implementation of the Map interface based on a hash table) encapsulation method to encapsulate the data; then, the electronic device uses the Gson library to convert the encapsulation result in the map form into a string in the json format, thereby obtaining the first original data.

[0033] In some implementations, the electronic device preprocesses the first original data to obtain preprocessed data, wherein the preprocessing of the first original data is intended to reduce the space occupied by the first original data and improve the ability of the two-dimensional code image to store data during the subsequent data-to-two-dimensional code image conversion process; thereafter, the electronic device compresses the preprocessed data using a GZIP command to obtain compressed string data; since the first original data contains letter data and digital data, the letter data and the digital data need to be encrypted using different encryption rules subsequently, and therefore, while obtaining the string data, the electronic device further determines the specific values ​​and position subscripts corresponding to the digital data and letter data contained in the string data, respectively, to prepare for the subsequent encryption of the string data.

[0034] In some embodiments, the data acquired by the electronic device that needs to be uploaded includes historical actual data and predicted data, wherein the historical actual data includes actual power data, meteorological data, etc., and the predicted data includes theoretical data, ultra-short-term data, etc.

[0035] For example, the electronic device converts the actual power data, meteorological data, theoretical data, and ultra-short-term data into a string in json format as follows: 1. The JSON format of the actual power data: { "startTime":"2019-01-01", "endTime":"2019-02-01", "plantName":"xxxx Wind Farm", "contractnum":"SP123456", "plantType":0, "farmPower": [1,2,3], (electric field power) "gridPower": [1.2,1.3,1.5] (grid-connected power) } That is, the json format of the actual power data may include: start time field and start time content, end time field and end time content, name field and name content, number field and number content, plant type field and plant type content, power plant power and power plant power content, grid-connected power field and grid-connected power content, etc.

[0036] 2. JSON format of meteorological data: { "startTime":"2019-01-01", "endTime":"2019-02-01", "plantName": "xxxx Wind Farm", "contracthum":"SP123456", "plantType":0, "farmSpeed":[1,2,3], (average wind speed in the electric field) "windspeed":[1.2,1.3,1 5] ,(average wind speed on the wind tower) " windspeedirradiance ":[1.2,1.3,1 5] (irradiance) } That is, the json format of meteorological data can include: start time field and start time content, end time field and end time content, name field and name content, number field and number content, plant type field and plant type content, power plant average wind speed field and power plant average wind speed content, wind tower average wind speed field and wind tower average wind speed content, radiometry field and radiometry content, etc.

[0037] 3. Theoretical power data in json format: { "startTime":"2019-01-01", "endTime" : "2019-02-01", "plantName":"xxxx Wind Farm", "contracthum":"SP123456", "plantType": 0, "mtheoryp": [1,2,3], (Model Theory) "mdtheoryp":[1.2, 1.3,1.5], (template method available) "wtheoryp": [1,2,3], (wind tower extrapolation theory) "wdtheoryp":[1 2,1.3,1.5], (wind tower extrapolation method is available) "wturatheoryp":[1,2 3], (head wind speed method theory) "wturtheoryp": [1.2,1.3,1.5], (head wind speed method is available) " itheoryp ":[1,2 3], (theory of photometry) "idtheoryp": [1.2,1.3,1.5] (photometry is available) } That is, the json format of theoretical power data can include: start time field and start time content, end time field and end time content, name field and name content, number field and number content, plant type field and plant type content, model method theory field and model method theory content, model method available field and model method available content, wind tower extrapolation method theory and wind tower extrapolation method theory content, wind tower extrapolation method available field and wind tower extrapolation method available content, head wind speed method theory field and head wind speed method theory content, head wind speed method available field and head wind speed method available content, photometry method theory field and photometry method theory content, photometry method available field and photometry method available content, etc.

[0038] 4. JSON format for ultra-short-term data: { "startTime":"2019-01-01", "endTime"2019-02-01" "plantName":"xxxx Wind Farm", "contractnum":"SP123456", "plantType":0 "sfcstData":[ { "datatime":1546272076, / / 2019-01-01 00:01:16 seconds "sfcsttime":1546272900, / / 2019-01-01 00:15:00 seconds "p":[1,2,3,4,5,6,7,8,9,10,11.12,13,14.15,16] }, { "datatime":1546272976, / / 2019-01-01 00:16:16 seconds "sfcsttime":1546273800, / / 2019-01-01 00:30:00 seconds "p":[1,2,3,4,5,6,7,8,9,10 11.12,13,14,15.16] } ] } The JSON format of ultra-short-term data may include: start time field and start time content, end time field and end time content, name field and name content, number field and number content, plant type field and plant type content, data field and data content, etc.

[0039] In some embodiments, since the database of the SCADA system stores data of multiple detection devices, it is necessary to set keys for the data corresponding to the multiple detection devices in the process of packaging the data; and the naming rules for the keys of the detection devices are described as follows by way of example: For example, when there are multiple wind towers or multiple detection devices of environmental monitoring equipment, the electronic device obtains multiple sets of meteorological data. At this time, the key+main device ID can be used as the key of the data encapsulation map, such as windSpeedl is the main wind tower ID 1.

[0040] In some embodiments, under normal circumstances, during the detection process of the detection device, a primary detection device and a secondary detection device are divided; when there is data of the detection device that needs to be uploaded, and the electronic device does not detect the device identification of the primary device, the electronic device obtains the data of the first-priority detection device by default.

[0041] S102, encrypting the digital data and the letter data based on the preset encryption rules corresponding to the digital data and the letter data respectively to obtain encrypted string data.

[0042] In some embodiments, after obtaining the digital data and letter data in the string data, the electronic device retrieves the preset encryption rules corresponding to the digital data and the preset encryption rules corresponding to the letter data, and performs encryption processing using the corresponding preset encryption rules, thereby improving the security of the data transmission process; wherein the preset encryption rules include offset rules and position permutation rules for the digital data and letter data, and the encryption of the digital data and letter data is completed using the offset rules and position permutation rules.

[0043] S103, splitting the encrypted string data to obtain a plurality of sub-encrypted string data.

[0044] In some embodiments, due to the limitation of the amount of data that a QR code image can accommodate, the encrypted string cannot be included in one QR code image at the same time. Therefore, before generating a QR code image from the encrypted string data, the encrypted string data needs to be segmented to form multiple sub-encrypted string data; wherein, during the segmentation process of the encrypted string data by the electronic device, the data segmentation amount can be set based on the maximum capacity of the QR code image. For example, the maximum capacity of the QR code is 2953 characters, and the electronic device can segment the encrypted string data according to the segmentation data amount less than 2953 characters, thereby obtaining multiple sub-encrypted string data.

[0045] In some embodiments, each sub-encrypted string data corresponds to a set of preset character data, and the preset character data is used to store the starting number of sheets, the total number of sheets, and the data generation time, wherein the sum of the data volume of each sub-encrypted string data and the data volume of the corresponding reserved string data is not greater than the maximum capacity of the QR code data. For example, the electronic device reserves 16 characters for each sub-encrypted string data, wherein the first 6 digits are the number of sheets and the total number of sheets, such as: 002009 represents that this is the second QR code, a total of 9 sheets; 7-16 digits are the time in Unix timestamp format for generating the QR code image, such as 1730304000 represents Beijing 2024-10-31 00:00:00.

[0046] S104, generating a plurality of two-dimensional code images using the plurality of sub-encrypted character string data and the preset character data having the preset number of characters corresponding thereto, and transmitting the plurality of two-dimensional code images to a display device for display.

[0047] In some embodiments, the electronic device integrates multiple sub-encrypted string data and preset character data with a preset number of characters corresponding to each of them, and then uses the qrcodejs plug-in to generate the corresponding two-dimensional code images; the electronic device transmits the multiple two-dimensional code images to the display device in sequence for display, so as to facilitate other image scanning devices to scan the multiple two-dimensional images; thereby, by utilizing the encryption rules corresponding to the digital data and the letter data respectively for encryption processing and storing the encrypted information in the two-dimensional code image for transmission, the security of the data during the data transmission process is improved, and the ability to transmit data in isolated network segments is improved.

[0048] In step S101, the preprocessed data is determined by the following steps: obtaining the first original data and the initial data accuracy of the first original data; based on the initial data accuracy and preset accuracy adjustment rules, performing accuracy processing on the first original data to obtain the second original data; increasing the multiplication of the data contained in the second original data to obtain the preprocessed data.

[0049] In some embodiments, the data precision of the first original data is generally only 4 decimal places. Since the data storage capacity of the two-dimensional code image is limited and the amount of data to be transmitted is large, in order to improve the data storage capacity of the two-dimensional code image, before compressing and encrypting the first original data, the first original data is firstly adjusted in precision so that the data volume can be reduced as much as possible without distortion. Therefore, after the electronic device obtains the first original data from the detection device, it determines the initial data precision corresponding to the first original data. Then, the electronic device calls the preset precision adjustment rule preset in advance to adjust the initial data of the first original data to obtain the second original data; then, the electronic device increases the second original data by a multiple to further reduce the data volume of the second original data, thereby completing the preprocessing process of the first original data and obtaining the preprocessed data.

[0050] For example, the initial data precision of the first original data is 4 decimal places. Through the preset precision adjustment rule, the last two decimal places of the first original data are discarded and the two decimal places are retained to obtain the second original data. Subsequently, the electronic device multiplies the second original data by 10 to obtain preprocessed data, thereby reducing the data volume of the second original data and reducing its storage space.

[0051] In step S102, based on the preset encryption rules corresponding to the digital data and the letter data respectively, the digital data and the letter data are encrypted to obtain encrypted string data, including: calling the preset encryption rules corresponding to the digital data and the letter data respectively, performing offset processing on the digital data and the letter data to obtain string offset data corresponding to the string data; splitting the string offset data to obtain at least two substring offset data; swapping the positions of at least two string offset data to obtain encrypted string data.

[0052] In some embodiments, the electronic device first retrieves the preset encryption rules corresponding to the digital data and the letter data respectively, and uses the offset rules included in the preset encryption rules to perform offset processing on the digital data and the letter data, thereby obtaining string offset data corresponding to the offset string data; then, the electronic device calls the preset segmentation rules to perform segmentation processing on the string offset data to obtain at least two substring offset data, wherein the preset segmentation rules can be for segmenting the string offset data into two substring offset data, or for segmenting the string offset data into multiple substring offset data. The specific preset segmentation rules can be set by technical personnel based on actual conditions, and the embodiments of the present application do not make specific limitations.

[0053] In addition, when the preset segmentation rule is to segment the string offset data into multiple sub-string offset data, the position interchange rules between the multiple sub-string offset data are flexibly set based on the technical personnel, and the embodiments of the present application do not make specific limitations; finally, the electronic device interchanges the positions of at least two sub-string offset data to obtain encrypted string data to complete the encryption process of the string data.

[0054] In step S102, based on the preset encryption rules corresponding to the digital data and the letter data respectively, the digital data and the letter data are encrypted to obtain encrypted string data, including: calling the offset rule included in the preset encryption rule corresponding to the letter data, performing offset processing on the letter data, and obtaining the offset of the letter data; summing the offset with the position subscript of the letter data to obtain a first summed offset; when the first summed offset does not exceed a first preset number, defining the pre-letter data corresponding to the first summed offset as the offset result of the letter data; and encrypting the letter data based on the offset result.

[0055] In some embodiments, for the letter data in the string data, the electronic device first calls the offset rule included in the preset encryption rule corresponding to the letter data, performs offset processing on the letter data, and obtains the offset of the letter data; at the same time, the electronic device obtains the position subscript of the letter data, and sums the position subscript pre-offset to obtain a first summed offset; then, the electronic device compares the first summed offset with the first preset data to determine whether the first summed offset exceeds the first preset number; when the first summed offset does not exceed the first preset number, it indicates that the pre-letter data corresponding to the first summed offset can be directly used as the offset result of the letter data.

[0056] In some embodiments, the offset rule included in the preset encryption rule corresponding to the letter data is called, and the letter data is offset processed using the offset rule to obtain the offset of the letter data, including: the electronic device determines the position subscript of the letter data in the string data, and sums the position subscript with a second preset number to obtain a second summed offset; then, the electronic device performs a remainder calculation on the second summed offset and the second preset number, and uses the calculated remainder as the offset of the letter data.

[0057] In some embodiments, after the offset is summed with the position subscript of the letter data to obtain a first summed offset, the digital data and the letter data are encrypted based on the preset encryption rules corresponding to each of the digital data and the letter data to obtain encrypted string data, and the following further includes: when the first summed offset exceeds a first preset number, it indicates that the data determined by the first summed offset has exceeded the preset data, and the first summed offset is subtracted from the first preset number to obtain a first subtraction offset; the pre-letter data corresponding to the first subtraction offset is defined as the offset result of the letter data; and based on the offset result, the letter data is encrypted.

[0058] In some embodiments, the first preset number can be set based on the number of English letters, that is, 26, and the second preset number can be set subjectively by a technician and is not unique. Its specific value is not specifically limited in the embodiments of this application.

[0059] For example, when the electronic device encrypts letter data according to the encryption rules corresponding to the letter data, the first character in the letter data to be encrypted is A, the ranking of A in the string data is the first, its position subscript is 0, the first preset number is 26, and the second preset number is 5, then the offset of A is (5+0)%26, which is 5; the second character of the letter data to be encrypted is a, the ranking of a in the string data is the second, and its position subscript is 1, then the offset of a is (5+1)%26, which is 6, and so on, until the offset results of all data in the letter data are determined.

[0060] In step S102, based on the preset encryption rules corresponding to the digital data and the letter data respectively, the digital data and the letter data are encrypted to obtain encrypted string data, including: when the digital data is within a first quantity range, the digital data and the preset value are summed to obtain a sum result, and the sum result is defined as an offset result of the digital data; based on the offset result, the digital data is encrypted; when the digital data is within a second quantity range, the digital data and the preset value are subtracted to obtain a difference result, and the difference result is defined as an offset result of the digital data; based on the offset result, the digital data is encrypted.

[0061] In some embodiments, for the digital data in the string data, the electronic device first calls the offset rule included in the preset encryption rule corresponding to the digital data, performs offset processing on the letter data, and obtains the offset result of the digital data, wherein the electronic device substitutes the digital data into the first quantity range for comparison to determine whether the digital data is within the first quantity range; when the digital data is within the first quantity range, the electronic device sums the digital data and the preset data to obtain a sum result, and defines the sum result as the offset result of the digital data.

[0062] For example, when character 1 in the digital data is within the first quantity range of 0-4, the character 1 is summed with the preset value 5 to obtain a sum result 6, and the electronic device defines the sum result 6 as the offset result of the digital data; then, the electronic device further encrypts the digital data based on the offset result.

[0063] When the electronic device determines that the digital data is not within the first quantity range, the electronic device substitutes the digital data into the second quantity range for comparison to determine whether the digital data is within the first quantity range; when the digital data is within the second quantity range, the electronic device calculates the difference between the digital data and the preset data to obtain a difference result, and defines the difference result as the offset result of the digital data.

[0064] For example, character 6 in the digital data is not within the first number range 0-4, but is within the second number range 5-9. In this case, the character 6 is subtracted from the preset value 5 to obtain a difference result 1, and the electronic device defines the difference result 1 as an offset result of the digital data; then, the electronic device further encrypts the digital data based on the offset result.

[0065] The present application provides a data encryption transmission device based on a two-dimensional code, which adopts the following technical solution: Reference Figure 2 A data encryption transmission device 20 based on a two-dimensional code includes: a string data determination module 201, an encrypted string determination module 202, a data segmentation module 203 and an image transmission module 204, wherein: The character string data determination module 201 is used to compress the determined pre-processed data to obtain character string data, and determine the digital data and letter data contained in the character string data; The encrypted string determination module 202 is used to encrypt the digital data and the letter data based on the preset encryption rules corresponding to the digital data and the letter data, and obtain the encrypted string data; The data segmentation module 203 is used to segment the encrypted string data to obtain a plurality of sub-encrypted string data; The image transmission module 204 is used to generate a plurality of two-dimensional code images using a plurality of sub-encrypted character string data and preset character data of a preset number of characters corresponding thereto, and transmit the plurality of two-dimensional code images to a display device for display.

[0066] In some embodiments, the above-mentioned QR code-based data encryption and transmission device 20 also includes: a data preprocessing module, wherein the data preprocessing module is used to obtain the first original data and the initial data accuracy of the first original data; based on the initial data accuracy and preset accuracy adjustment rules, the first original data is precision processed to obtain the second original data; the multiplication of the data contained in the second original data is increased to obtain preprocessed data.

[0067] In some embodiments, the above-mentioned encrypted string determination module 202 is specifically used to: call the preset encryption rules corresponding to the digital data and the letter data respectively, perform offset processing on the digital data and the letter data, and obtain string offset data corresponding to the string data; split the string offset data to obtain at least two substring offset data; swap the positions of at least two string offset data to obtain encrypted string data.

[0068] In some embodiments, the above-mentioned encrypted string determination module 202 is specifically used to: call the offset rule included in the preset encryption rule corresponding to the letter data, perform offset processing on the letter data, and obtain the offset of the letter data; sum the offset and the position subscript of the letter data to obtain a first summed offset; when the first summed offset does not exceed the first preset number, define the pre-letter data corresponding to the first summed offset as the offset result of the letter data; based on the offset result, encrypt the letter data.

[0069] In some embodiments, the above-mentioned encrypted string determination module 202 is specifically used to: when the first sum offset exceeds the first preset number, perform a difference processing on the first sum offset and the first preset number to obtain a first difference offset; define the pre-letter data corresponding to the first difference offset as the offset result of the letter data; and encrypt the letter data based on the offset result.

[0070] In some embodiments, the above-mentioned encrypted string determination module 202 is specifically used to: determine the position subscript of the letter data in the string data, and sum the position subscript with a second preset number to obtain a second sum offset; perform remainder calculation on the second sum offset and the second preset number, and use the calculated remainder as the offset of the letter data.

[0071] In some embodiments, the above-mentioned encrypted string determination module 202 is specifically used to: when the digital data is within a first quantity range, sum the digital data with a preset value to obtain a sum result, and define the sum result as an offset result of the digital data; based on the offset result, encrypt the digital data; when the digital data is within a second quantity range, perform a difference calculation on the digital data and the preset value to obtain a difference result, and define the difference result as an offset result of the digital data; based on the offset result, encrypt the digital data.

[0072] The embodiment of the present application provides a data decryption and transmission method based on a QR code, which can be executed by an electronic device, wherein the electronic device can be a server or a terminal device, wherein the server can be an independent physical server, or a server cluster or distributed device composed of multiple physical servers, or a cloud server providing cloud computing services. The terminal device can be a smart phone, a tablet computer, a laptop computer, a desktop computer, etc., but is not limited thereto. The terminal device and the server can be directly or indirectly connected via wired or wireless communication, and the embodiment of the present invention does not limit this.

[0073] Reference Figure 3 , a data decryption and transmission method based on a two-dimensional code, used to decrypt and transmit multiple two-dimensional code images determined by the above-mentioned data encryption and transmission method based on a two-dimensional code; the method comprises: step S301 and step S302, wherein, S301, performing data verification on the multiple two-dimensional code images based on the preset character data respectively corresponding to the multiple two-dimensional code images.

[0074] In some embodiments, an electronic device obtains multiple QR code images from a device equipped with an image acquisition device. Subsequently, the electronic device retrieves preset character data corresponding to each QR code image, analyzes and judges the character data, and completes data verification of the QR code image, wherein the data verification includes verifying the total number of multiple QR code images, verifying whether there are duplications between the multiple QR code images, and verifying the generation time of the multiple QR code images, so as to improve the accuracy of the scanned multiple two-dimensional images.

[0075] In some embodiments, before the electronic device obtains multiple QR code images, the device equipped with the image acquisition device needs to perform login verification, that is, the device equipped with the image acquisition device installs software such as the WeChat applet, and obtains the login credential code through WeChat login, and the software obtains the openid corresponding to the WeChat user by calling the WeChat jscode2sessionAPI; the software obtains the corresponding enterprise WeChat member userid by calling the enterprise WeChat convert_to_useridAPI; when the electronic device determines that the userid exists, it can be considered to be a company employee, that is, the device equipped with the image acquisition device completes the login verification, so that multiple two-dimensional images can be scanned and uploaded to the electronic device.

[0076] S302, when multiple two-dimensional code images are verified to be qualified, the preset character data corresponding to the multiple two-dimensional code images are removed, and the character string data contained in the multiple two-dimensional code images are decrypted and concatenated to obtain pre-processed data.

[0077] In some embodiments, after the electronic device completes the verification of multiple QR code images and the multiple two-dimensional images are qualified, the electronic device then enters the string data recovery process contained in the QR code image. Since each QR code image contains non-string data, that is, preset character data, the preset character data needs to be eliminated during the data recovery process, that is, the electronic device eliminates the preset character data corresponding to multiple long QR code images. Subsequently, the electronic device decrypts and splices the string data contained in the multiple QR code images to obtain preprocessed data, thereby completing the transmission of the data that needs to be uploaded to the database of the SCADA system.

[0078] In step S302, data verification is performed on the multiple two-dimensional code images based on the preset character data respectively corresponding to the multiple two-dimensional code images, including: determining whether the number of scanned two-dimensional code images is equal to the number of generated two-dimensional code images, and determining whether there are duplications in the multiple scanned two-dimensional code images; when the number of scanned two-dimensional code images is equal to the number of generated two-dimensional code images, and there are no duplications in the multiple scanned two-dimensional code images, obtaining the preset character data of the two-dimensional code image of the first scanning order, wherein the preset character data includes the time when the two-dimensional code image of the first scanning order is generated; based on the preset character data, determining whether the time included in the preset character data of the two-dimensional code image after the two-dimensional code image of the first scanning order is the same as the time included in the preset character data of the two-dimensional code image of the first scanning order; when the time corresponding to the two-dimensional code images after the two-dimensional code image of the first scanning order is the same as the time corresponding to the two-dimensional code image of the first scanning order, determining that the multiple two-dimensional code images have passed the verification.

[0079] In some embodiments, the electronic device first determines the number of QR code images obtained after scanning is completed, and determines whether the number is equal to the data of the generated QR code image, and at the same time determines whether there are repeated two-dimensional images between the QR code images after scanning is completed.

[0080] When the electronic device determines that the number of scanned QR code images is equal to the number of generated QR code images, and there is no duplication between the multiple scanned QR code images, it indicates that the image acquisition device of the electronic device has taken the photos correctly. The electronic device then obtains the preset character data of the two-dimensional image of the first scanning order, and obtains the time when the QR code image is generated from the preset character data, and uses the time as a reference time for time judgment. Subsequently, the time contained in the preset character data of each QR code image is obtained, and the time is compared with the reference time for time judgment. The electronic device determines that the time is consistent with the reference time, indicating that the character string data contained in the multiple QR code images scanned in the batch are data of the same batch, and the electronic device then determines that the multiple QR code images have passed the verification.

[0081] In some embodiments, when the electronic device determines that the number of scanned multiple QR code images is not equal to the number of generated QR code images, or there are duplications between the scanned multiple QR code images, or the time at which the multiple QR code images are generated is not equal, it indicates that there is an error in the scanning of the image acquisition device of the electronic device, and immediately generates a prompt message, and feeds back the prompt message to the technician to remind the technician that there is distortion in the multiple QR code images scanned this time, thereby improving the accuracy of the QR code image scanning.

[0082] The present application provides a data decryption and transmission device 40 based on a two-dimensional code, which adopts the following technical solution: A two-dimensional code-based data decryption and transmission device 40, used for decrypting and transmitting a plurality of two-dimensional code images obtained by the above-mentioned two-dimensional code-based data encryption and transmission method; The above-mentioned data decryption and transmission device 40 based on the two-dimensional code includes: a data verification module 401 and a pre-processing data recovery module 402, wherein: A data verification module 401 is used to perform data verification on the multiple two-dimensional code images based on the preset character data respectively corresponding to the multiple two-dimensional code images; The pre-processed data recovery module 402 is used to remove the preset character data corresponding to the multiple two-dimensional code images when the multiple two-dimensional code images are verified to be qualified, and to decrypt and splice the character string data contained in the multiple two-dimensional code images to obtain pre-processed data.

[0083] In some embodiments, the above-mentioned data verification module 401 is specifically used to: determine whether the number of scanned QR code images is equal to the number of generated QR code images, and determine whether there are duplications in the multiple scanned QR code images; when the number of scanned QR code images is equal to the number of generated QR code images, and there is no duplication in the multiple scanned QR code images, obtain the preset character data of the QR code image of the first scanning order, wherein the preset character data includes the time when the QR code image of the first scanning order is generated; based on the preset character data, determine whether the time included in the preset character data of the QR code image after the QR code image of the first scanning order is the same as the time included in the preset character data of the QR code image of the first scanning order; when the time corresponding to the QR code images after the QR code image of the first scanning order is the same as the time corresponding to the QR code image of the first scanning order, determine that the multiple QR code images have passed the verification.

[0084] In some embodiments, the string data determination module 201 may include a logic circuit, or may be implemented by a central processing unit, a digital signal processor, or a field programmable gate array, etc. included in the electronic device; the encrypted string determination module 202 may include a logic circuit, or may be implemented by a central processing unit, a digital signal processor, or a field programmable gate array, etc. included in the electronic device; the data segmentation module 203 may include a logic circuit, or may be implemented by a central processing unit, a digital signal processor, or a field programmable gate array, etc. included in the electronic device; and the image transmission module 204 may include a logic circuit, or may be implemented by a central processing unit, a digital signal processor, or a field programmable gate array, etc. included in the electronic device; the data preprocessing module may include a logic circuit, or may be implemented by a central processing unit, a digital signal processor, or a field programmable gate array, etc. included in the electronic device.

[0085] In some embodiments, the data verification module 401 may include a logic circuit, or may be implemented by a central processing unit, a digital signal processor, or a field programmable gate array, etc. contained in the electronic device; the pre-processing data recovery module 402 may include a logic circuit, or may be implemented by a central processing unit, a digital signal processor, or a field programmable gate array, etc. contained in the electronic device.

[0086] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0087] An embodiment of the present application discloses an electronic device, including: a processor; a memory storing a computer program, and when the computer program is executed by the processor, the processor executes the above-mentioned data decryption and transmission method based on the two-dimensional code.

[0088] An embodiment of the present application discloses a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the processor executes a data decryption and transmission method based on a two-dimensional code.

[0089] The present application embodiment provides a data encryption and decryption transmission method based on a two-dimensional code. Figure 5 The data encryption and decryption transmission method based on the two-dimensional code first obtains the first original data from the SCADA system, and then pre-processes the first original data to obtain pre-processed data; a plurality of two-dimensional code images are obtained by compressing, encrypting and generating two-dimensional code images of the pre-processed data, and the plurality of two-dimensional code images are sent to a display device for display; then, the plurality of two-dimensional code images are scanned by a device equipped with an image acquisition device, and the two-dimensional code images are uploaded to a background main control device, and after the main control device verifies that the plurality of two-dimensional code images are qualified, the plurality of two-dimensional code images are decompressed and decrypted to obtain the pre-processed data.

[0090] An embodiment of the present application discloses an electronic device, including: a processor; a memory storing a computer program, and when the computer program is executed by the processor, the processor executes the above-mentioned data encryption transmission method based on the two-dimensional code.

[0091] For example, refer to Figure 6 , Figure 6 The electronic device 60 shown includes: a processor 601 and a memory 603. The processor 601 and the memory 603 are connected, such as through a bus 602. Optionally, the electronic device 60 may also include a transceiver 604. It should be noted that in actual applications, the transceiver 604 is not limited to one, and the structure of the electronic device 60 does not constitute a limitation on the embodiment of the present invention.

[0092] Processor 601 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. It may implement or execute various exemplary logic blocks, modules and circuits described in the disclosure of the present invention. Processor 601 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.

[0093] The bus 602 may include a path to transmit information between the above components. The bus 602 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus 602 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 6 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0094] The memory 603 may be a ROM (Read Only Memory) or other types of static storage devices that can store static information and instructions, a RAM (Random Access Memory) or other types of dynamic storage devices that can store information and instructions, or an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory) or other optical disk storage, optical disk storage (including compressed optical disk, laser disk, optical disk, digital versatile disk, Blu-ray disk, etc.), a magnetic disk medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto.

[0095] The memory 603 is used to store application code for executing the solution of the present invention, and the execution is controlled by the processor 601. The processor 601 is used to execute the application code stored in the memory 603 to implement the content shown in the above method embodiment.

[0096] Figure 6 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0097] An embodiment of the present application discloses a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the processor executes a data encryption transmission method based on a two-dimensional code.

[0098] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.

[0099] The above are only some implementation methods of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A data encryption transmission method based on a two-dimensional code, characterized in that: include: Compressing the determined pre-processed data to obtain character string data, and determining the digital data and letter data contained in the character string data; Based on the preset encryption rules corresponding to the digital data and the letter data respectively, encrypt the digital data and the letter data to obtain encrypted string data; Segmenting the encrypted string data to obtain a plurality of sub-encrypted string data; A plurality of two-dimensional code images are generated using the plurality of sub-encrypted character string data and the preset character data of the preset number of characters corresponding thereto, and the plurality of two-dimensional code images are transmitted to a display device for display.

2. The method according to claim 1, characterized in that The pre-processed data is determined by the following steps: Acquire first original data and initial data accuracy of the first original data; Based on the initial data precision and a preset precision adjustment rule, performing precision processing on the first original data to obtain second original data; The magnification of the data included in the second original data is increased to obtain the pre-processed data.

3. The method according to claim 1, characterized in that: The step of encrypting the digital data and the letter data based on the preset encryption rules corresponding to the digital data and the letter data to obtain encrypted string data includes: Calling the preset encryption rules corresponding to the digital data and the letter data respectively, performing offset processing on the digital data and the letter data, and obtaining the string offset data corresponding to the string data; Segmenting the string offset data to obtain at least two substring offset data; The at least two character string offset data are swapped to obtain the encrypted character string data.

4. The method according to claim 1, characterized in that The step of encrypting the digital data and the letter data based on the preset encryption rules corresponding to the digital data and the letter data to obtain encrypted string data includes: Calling the offset rule included in the preset encryption rule corresponding to the letter data, performing offset processing on the letter data, and obtaining the offset of the letter data; The offset is summed with the position subscript of the letter data to obtain a first summed offset; In the case where the first summed offset does not exceed a first preset amount, defining the pre-letter data corresponding to the first summed offset as an offset result of the letter data; Based on the offset result, the letter data is encrypted.

5. The method according to claim 4, characterized in that After the offset is summed with the position subscript of the letter data to obtain a first summed offset, the digital data and the letter data are encrypted based on the preset encryption rules corresponding to the digital data and the letter data to obtain encrypted string data, further comprising: When the first summed offset exceeds a first preset number, performing a difference processing on the first summed offset and the first preset number to obtain a first difference offset; defining the pre-letter data corresponding to the first difference offset as the offset result of the letter data; Based on the offset result, the letter data is encrypted.

6. The method according to claim 4, characterized in that The calling of the offset rule included in the preset encryption rule corresponding to the letter data, performing offset processing on the letter data, and obtaining the offset of the letter data includes: Determine the position subscript of the letter data in the character string data, and sum the position subscript with a second preset number to obtain a second sum offset; The second summed offset is modulo a second preset number, and the calculated remainder is used as the offset of the letter data.

7. The method according to any one of claims 1 to 6, characterized in that: The step of encrypting the digital data and the letter data based on the preset encryption rules corresponding to the digital data and the letter data to obtain encrypted string data includes: When the digital data is within the first quantity range, summing the digital data with a preset value to obtain a summation result, and defining the summation result as an offset result of the digital data; Based on the offset result, encrypting the digital data; When the digital data is within the second quantity range, performing a difference calculation between the digital data and the preset value to obtain a difference result, and defining the difference result as an offset result of the digital data; The digital data is encrypted based on the shift result.

8. A data encryption transmission device based on a two-dimensional code, characterized in that: include: A character string data determination module, used for compressing the determined pre-processed data to obtain character string data, and determining the digital data and letter data contained in the character string data; An encrypted string determination module, configured to encrypt the digital data and the letter data based on the preset encryption rules corresponding to the digital data and the letter data, respectively, to obtain encrypted string data; A data segmentation module, used for segmenting the encrypted string data to obtain a plurality of sub-encrypted string data; The image transmission module is used to generate a plurality of two-dimensional code images using the plurality of sub-encrypted character string data and the preset character data of the preset character quantity corresponding thereto, and transmit the plurality of two-dimensional code images to a display device for display.

9. A data decryption and transmission method based on a two-dimensional code, characterized in that: Used to decrypt and transmit multiple two-dimensional code images obtained by the method described in any one of claims 1 to 7; The data decryption and transmission method comprises: Based on the preset character data respectively corresponding to the multiple two-dimensional code images, data verification is performed on the multiple two-dimensional code images; When the multiple two-dimensional code images are verified to be qualified, the preset character data corresponding to the multiple two-dimensional code images are eliminated, and the character string data contained in the multiple two-dimensional code images are decrypted and spliced ​​to obtain the preprocessed data.

10. The data decryption transmission method according to claim 9, characterized in that: The performing data verification on the multiple two-dimensional code images based on the preset character data respectively corresponding to the multiple two-dimensional code images includes: Determining whether the number of scanned two-dimensional code images is equal to the number of generated two-dimensional code images, and determining whether the scanned multiple two-dimensional code images are repeated; When the number of scanned two-dimensional code images is equal to the number of generated two-dimensional code images, and the scanned multiple two-dimensional code images are not repeated, obtaining preset character data of the two-dimensional code image of the first scanning order, wherein the preset character data includes the time when the two-dimensional code image of the first scanning order is generated; Based on the preset character data, determining whether the time included in the preset character data of the two-dimensional code image after the two-dimensional code image of the first scanning order is the same as the time included in the preset character data of the two-dimensional code image of the first scanning order; When the times corresponding to the two-dimensional code images subsequent to the two-dimensional code image of the first scanning order are all the same as the times corresponding to the two-dimensional code image of the first scanning order, it is determined that the multiple two-dimensional code images have passed the verification.

11. A data decryption and transmission device based on a two-dimensional code, characterized in that: Used to decrypt and transmit multiple two-dimensional code images obtained by the method described in any one of claims 1 to 7; The data decryption transmission device comprises: A data verification module, used for performing data verification on the multiple two-dimensional code images based on the preset character data respectively corresponding to the multiple two-dimensional code images; The preprocessing data recovery module is used to remove the preset character data corresponding to the multiple two-dimensional code images respectively when the multiple two-dimensional code images are verified to be qualified, and decrypt and splice the character string data contained in the multiple two-dimensional code images to obtain the preprocessing data.

Citation Information

Patent Citations

  • Two-dimensional code generating method and device, two-dimensional code data processing method and device

    CN107133270A

  • Data return method and system

    CN110351256A

  • Password encryption method and device and ciphertext decryption method and device

    CN110941817A

  • Internal and external network data isolation and transmission method based on two-dimensional code image recognition technology

    CN113094438A

  • Encryption transmission method, device and system

    CN114254373A