CN112116048B - Improved Lorenz and Zigzag transformation encryption method for power battery traceability management - Google Patents

Improved Lorenz and Zigzag transformation encryption method for power battery traceability management Download PDF

Info

Publication number
CN112116048B
CN112116048B CN202010910111.1A CN202010910111A CN112116048B CN 112116048 B CN112116048 B CN 112116048B CN 202010910111 A CN202010910111 A CN 202010910111A CN 112116048 B CN112116048 B CN 112116048B
Authority
CN
China
Prior art keywords
matrix
code
lorenz
battery
image
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.)
Active
Application number
CN202010910111.1A
Other languages
Chinese (zh)
Other versions
CN112116048A (en
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.)
Yanshan University
Original Assignee
Yanshan University
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 Yanshan University filed Critical Yanshan University
Priority to CN202010910111.1A priority Critical patent/CN112116048B/en
Publication of CN112116048A publication Critical patent/CN112116048A/en
Application granted granted Critical
Publication of CN112116048B publication Critical patent/CN112116048B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/16Matrix or vector computation, e.g. matrix-matrix or matrix-vector multiplication, matrix factorization
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • 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/06046Constructional details
    • G06K19/0614Constructional details the marking being selective to wavelength, e.g. color barcode or barcodes only visible under UV or IR
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N7/00Computing arrangements based on specific mathematical models
    • G06N7/08Computing arrangements based on specific mathematical models using chaos models or non-linear system models

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Computational Mathematics (AREA)
  • Mathematical Analysis (AREA)
  • Pure & Applied Mathematics (AREA)
  • Mathematical Optimization (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Computing Systems (AREA)
  • Algebra (AREA)
  • Databases & Information Systems (AREA)
  • Nonlinear Science (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Computation (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Facsimile Transmission Control (AREA)

Abstract

The invention discloses an improved Lorenz and Zigzag transformation encryption method for traceability management of a power battery, which comprises the following steps: establishing a complete traceability management system, and encoding life cycle information of power battery production, sale, scrapping, recycling, disassembly and reuse and the like into a QR code in stages; decomposing the color QR image into gray QR code images of three RGB channels, performing improved Lorenz chaotic encryption and Zigzag transformation to obtain an encrypted gray QR code image, combining the three channels, and finally generating an encrypted color QR code and uploading the encrypted color QR code to form a database; decryption is the reverse process of encryption, an initial QR code image is restored, and a user can inquire the tracing information of the battery through scanning equipment. The invention increases the decryption difficulty, greatly improves the confidentiality and privacy of the QR code information, effectively protects the information of the power battery, constructs a traceability management system for encrypting, decrypting and uploading the information of the power battery at each stage, and provides a precondition guarantee for recycling the battery.

Description

Improved Lorenz and Zigzag transformation encryption method for power battery traceability management
Technical Field
The invention belongs to the technical field of coding, and particularly relates to an improved Lorenz and Zigzag transformation encryption method for traceability management of a power battery.
Background
With the increasingly prominent problems of energy shortage, environmental pollution and the like in the world, electric automobiles are receiving a lot of attention due to the advantages of energy conservation and environmental protection. The power battery is the key of the whole system of the electric automobile, and the problem of echelon utilization of the power battery is widely discussed in society. The echelon utilization of the power battery refers to the disassembly, detection, classification and recombination of waste power batteries on the electric automobile. The battery is utilized in grades according to the using condition of the battery, and is applied to other fields to fully exert the residual value of the battery. Therefore, a traceability system of the power battery is established and perfected, and the full life cycle of battery production, application, scrapping and death is effectively controlled, so that the method has important significance and value.
The QR code is a matrix type two-dimensional code developed by Denso corporation of Japan, has large information capacity, strong reliability and anti-counterfeiting performance, and has great advantages in the aspects of rapid and omnibearing identification and the like. By utilizing the advantages of the QR code, the full life cycle information of the battery is coded in the QR code, and great convenience is provided for the management of the power battery traceability system. However, since the algorithm for encoding and decoding the QR code is itself public, if the carried information is read by an unrelated organization, organization or person at will, unnecessary information leakage and privacy exposure are easily caused. Therefore, a simple, fast and effective encryption means is needed when the QR code is used as a medium for sensitive information transmission. The most common method for images is scrambling-diffusing of pixel values, and there are many encryption methods such as chaotic mapping, Arnold, DES and AES. However, these conventional encryption methods generally have problems in terms of security, complexity, and key space.
Disclosure of Invention
Aiming at the defects of the prior art, the invention provides an improved Lorenz and Zigzag transformation encryption method for the traceability management of a power battery. Decomposing a QR code image containing battery information into images of three channels of RGB, diffusing pixel values of the images according to a certain rule by using three chaotic sequences obtained by a Lorenz chaotic system, scrambling the positions of pixels through improved Zigzag conversion, and merging three channels of the encrypted QR code image to obtain an encrypted QR code. Based on the position scrambling of the pixels and the diffusion of the pixel values, the QR code image containing the related battery information is encrypted in the traceability system of the full life cycle of the power battery, and the information safety is improved. The invention aims to effectively ensure the safety of battery information in QR codes in each stage in a full life cycle tracing system of a power battery, and provides a method for obtaining a QR code encrypted image by combining improved Zigzag transformation on the basis of three-dimensional chaotic encryption.
In order to solve the technical problems and achieve the purpose of the invention, the invention is realized by the following technical scheme:
an encryption method for improving Lorenz and Zigzag transformation for traceability management of a power battery comprises the following steps:
s1, encoding the battery data of each life cycle of the plaintext information power battery to generate a color QR code image Q with the size of n multiplied by n0
S2, converting the image Q0Decomposing the image into grayscale images of three channels of RGB, wherein the matrixes are R (n, n), G (n, n) and B (n, n);
s3, utilizing Matlab2018b software and an expression (2), enabling the Lorenz chaotic system to generate three chaotic sequences:
{x(k),y(k),z(k)|k=1,2...};
the expression (2) is:
Figure GDA0002718156180000021
wherein k is a positive integer, t is time, x, y and z are respectively state variables of the system, a, b and c are system parameters, a is 10,
Figure GDA0002718156180000022
c is 28, and the system is in a chaotic state; selecting an initial value x0、y0、z0Are respectively 0, 1 and 0 and are stored as Key1Storing for later use;
s4, optimizing the chaotic sequence to obtain processed optimized chaotic sequences X ' (k), Y ' (k) and Z ' (k);
s5, carrying out exclusive OR operation on the optimized chaotic sequences X '(k), Y' (k) and Z '(k) and matrixes R (n, n), G (n, n) and B (n, n) according to the constructed expression (4) to obtain encryption matrixes R' (n, n), G '(n, n) and B' (n, n) containing plaintext characteristics;
Figure GDA0002718156180000023
Figure GDA0002718156180000031
Figure GDA0002718156180000032
wherein, i is 1,2, nxn, R (i), G (i), B (i) and B (i) respectively represent the value of the ith element in the matrix corresponding to the QR code images of the three channels, R ' (i), G ' (i) and B ' (i) respectively represent the value of the ith element in the matrix corresponding to the QR code images of the three channels after encryption, and p (i) represents the value of the ith element in the matrix corresponding to the grayscale image of the original QR code without channel separation;
s6, constructing an improved Zigzag transformation, scrambling the matrixes R ' (n, n), G ' (n, n) and B ' (n, n) respectively by using the improved Zigzag transformation to obtain a Key2 and the scrambled matrixes R "(n, n), G" (n, n) and B "(n, n), and the steps are as follows:
s61, constructing an improved Zigzag transformation;
s611, taking a matrix S with the size of m multiplied by m as an input matrix, equally dividing all matrix elements into four small blocks according to a horizontal axis and a vertical axis, if m is an odd number, carrying out boundary expansion processing on the small blocks to enable the small blocks to be even numbers, then taking each small block as a whole, and exchanging the positions of the matrix elements according to a diagonal line according to an expression (5) to obtain a symmetrical exchange matrix
Figure GDA0002718156180000036
The expression (5) is:
Figure GDA0002718156180000033
wherein u is more than or equal to 1,
Figure GDA0002718156180000034
step _ r is m/2, step _ c is m/2, u is the row coordinate, and v is the ordinate. S is an input matrix, and S is an input matrix,
Figure GDA0002718156180000035
is a symmetric switching matrix;
s612, symmetrical switching matrix
Figure GDA0002718156180000041
Scrambling is performed, the element position state of which changes as expressed by expression (6), and
Figure GDA0002718156180000042
sequentially ordering the medium elements to obtain a two-dimensional matrix
Figure GDA0002718156180000043
The expression (6) is:
Figure GDA0002718156180000044
wherein i is more than or equal to 1, j is more than or equal to m, u is a row coordinate, v is a vertical coordinate,
Figure GDA0002718156180000045
is composed of
Figure GDA0002718156180000046
The scrambled matrix;
s62, repeating the scrambling process of the step S61R times, scrambling the matrix R '(n, n) to obtain a final scrambled matrix R' (n, n);
s63, storing the scrambling times r as a Key2 for later use;
s64, repeating the step S61 r times in total, scrambling the matrix G '(n, n) to obtain a scrambled matrix G' (n, n);
s65, repeating the step S61 r times in total, scrambling the matrix B '(n, n) to obtain a scrambled matrix B' (n, n);
s7, respectively generating corresponding gray QR code images by the two-dimensional matrixes R ' (n, n), G ' (n, n) and B ' (n, n) after scrambling, merging three channels to obtain an encrypted color QR code image Q1The ciphertext information of (1);
s8, decryption process;
the decryption process is opposite to the encryption process, and the QR code image Q is obtained after decryption0By scanning the QR code image Q0Plaintext information about the battery is obtained.
Preferably, the battery data of each life cycle of the power battery in step S1 at least includes information of production, sale, scrap, recycle, disassembly and reuse cycles.
Preferably, the sequence elements after the optimization processing in step S4 are all positive numbers and between 0 and 255.
Preferably, the optimization processing in step S4 is performed according to expression (3);
the expression (3) is:
Figure GDA0002718156180000047
preferably, the decryption process in step S8 includes the following steps:
s81, encrypting QR image Q1Decomposing the image into three channels of RGB to obtain three gray QR code encrypted images, wherein the matrixes of the three QR code encrypted images are R "(n, n), G" (n, n) and B "(n, n);
s82, inputting a key2, and performing improved Zigzag inverse transformation on the R '(n, n), G' (n, n) and B '(n, n) matrixes respectively to obtain matrixes R' (n, n), G '(n, n) and B' (n, n);
s83, inputting a key1, generating and optimizing chaotic sequences X ' (k), Y ' (k) and Z ' (k) by a matrix R ' (n, n), G ' (n, n) and a Lorenz system, bitwise XOR-reducing the matrix R (n, n), G (n, n) and B (n, n) according to the rule of an expression (7), and recovering an original QR code Q after combining three channels0
Figure GDA0002718156180000051
Figure GDA0002718156180000052
Figure GDA0002718156180000053
S84, scanning QR code image Q0Plaintext information about the battery is obtained.
Compared with the prior art beneficial effect that has:
in the method, the QR code image is decomposed into images of three channels of RGB, and the selection of the QR code image to the chaotic sequence in the Lorenz encryption link is related to the plaintext, so that the safety of the algorithm is improved; in the step of scrambling by Zigzag conversion, in view of the limitation of the traditional Zigzag, the diagonal exchange process of image blocks is added before conversion, so that the pixel position scrambling achieves a better effect; a traceability management system for encrypting, decrypting and uploading power battery information at each stage is established, and the safety of the information transmission process can be well ensured. And the information of each stage of the battery is traced, so that a precondition guarantee is provided for the recycling of the battery.
Drawings
FIG. 1 is a frame diagram of a traceability management system of the present invention for improving the encryption method of Lorenz and Zigzag transformation for traceability management of power batteries;
FIG. 2 is a flow chart of an encryption method of the present invention;
FIG. 3 is a flow chart of a decryption method of the present invention;
FIG. 4 is a diagram of an original QR code for one embodiment of the present invention;
FIG. 5 is a diagram of an encrypted QR code for one embodiment of the present invention;
fig. 6a is a schematic view of a 4 x 4 matrix provided in an embodiment of the invention;
FIG. 6b is a schematic diagram of the matrix 4 x 4 in FIG. 6a after conventional Zigzag transformation to obtain another scrambling matrix;
FIG. 7a is a pair of the embodiments of the present invention
Figure GDA0002718156180000061
Schematic diagram before Z-shaped conversion;
FIG. 7b is a view of the pair of FIG. 7a
Figure GDA0002718156180000062
Is subjected to Z-shaped conversion scrambling to obtain
Figure GDA0002718156180000063
Schematic representation of (a).
Detailed Description
The invention will be described in more detail below with reference to the accompanying figures 1-5 and the detailed description of the invention:
an improved Lorenz and Zigzag transformation encryption method for power battery traceability management is disclosed, wherein a traceability management system framework is shown in fig. 1, and the contents are as follows:
the whole life cycle of the power battery mainly comprises the stages of battery production, sale, scrapping, recycling, disassembly and reuse and the like, and the battery information of each stage is different. If people are employed to track the collected information at each stage, the efficiency is not high, and the fund is wasted, so that the establishment of a traceability management system throughout the whole life cycle of the battery is very necessary. Taking the production stage as an example, the coded information of the batteries produced in the same batch is the same, but the serial numbers are different, and the serial numbers are printed on the outer packages of the batteries. The staff encodes the production information of the battery into the QR code, encrypts the QR code (reserves a secret key for use in decryption), and uploads the encrypted QR code to the management system. When the sales stage of the next stage is reached, the staff calls out the encrypted QR code containing the battery production information in a mode of searching the battery number, the encrypted QR code is decrypted and restored by using the key, the sales information provided by the sales company is encoded, and the encrypted QR code is encrypted (the key is reserved) and uploaded, and the processes of other stages are the same as those of the next stage.
And finally, the battery recycling enterprise can inquire the traceability information of the whole life cycle of the battery through the QR code decrypted by scanning, disassemble the battery according to the production and use conditions, realize the secondary utilization of raw materials, and encode the disassembly utilization information into the QR code for encryption and uploading. For ease of understanding, the entire process can be simply expressed by the following equation:
Figure GDA0002718156180000064
wherein, W1、W2、W3、W4、W5And respectively representing accumulated battery information contained in the encrypted QR code at the production, sale, scrap, recovery, disassembly and reuse stages of the power battery. And P isr、Se、Sc、Re、DiRespectively representing the newly generated battery information of the power battery at each current stage.
The invention takes a battery ex-warehouse link in the production stage of a power battery as a specific embodiment, designs a QR code encryption method based on combination of Lorenz chaotic mapping and improved Zigzag transformation, wherein QR contains information such as production time, specification size, attribute and the like of the battery, and experiments prove that the method has good encryption effect and guarantees the information safety of the battery.
An encryption method for improving Lorenz and Zigzag transformation for traceability management of a power battery is disclosed, an encryption flow chart is shown in FIG. 2, and the content thereof comprises the following steps:
s1, in the embodiment, a color QR code image Q containing information such as battery production time, specification size, attribute and the like is generated by encoding the battery ex-warehouse link in the production stage in the power battery full life cycle traceability system0(256X 256) as shown in FIG. 4Shown in the specification;
s2, pair Q0Decomposing the QR code image into three channels of RGB, wherein the two-dimensional matrix of the QR code image is R, G, B, and the size of the QR code image is 256 multiplied by 256;
s3, according to the expression (2), three chaotic sequences generated by the Lorenz chaotic system are as follows:
{x(k),y(k),z(k)|k=1,2...};
expression (2) is:
Figure GDA0002718156180000071
wherein k is a positive integer, t is time, x, y and z are respectively state variables of the system, a, b and c are system parameters, a is 10,
Figure GDA0002718156180000072
and c is 28, and the system is in a chaotic state. Selecting an initial value x0、y0、z0Respectively 0, 1 and 0, and is stored as a Key1 for use by a user in decrypting the QR code. Substituting the parameters and the initial values into a written file of the Matlab2018b version, and generating three chaotic sequences by using a program in the file;
s4, selecting the first 256 × 256 entries of each sequence, which are denoted as { x (k), y (k), z (k) | k ═ 1,2., 256 × 256}, and optimizing the sequences according to the expression (3), so as to ensure that the elements of the sequences are all positive numbers and between 0 and 255;
Figure GDA0002718156180000081
s5, carrying out exclusive OR on the processed chaotic sequences X '(k), Y' (k) and Z '(k) and the matrix R, G, B according to the rule of formula (4), so that the selection of the chaotic sequences depends on the plaintext, the algorithm safety is improved, and the matrixes R', G 'and B' which are equal to the selection are obtained.
Figure GDA0002718156180000082
Figure GDA0002718156180000083
Figure GDA0002718156180000084
Wherein, i ═ 1., 256 × 256, R (i), G (i), and B (i) respectively represent values of the ith element in the matrix corresponding to the QR code images of the three channels, R ' (i), G ' (i), and B ' (i) respectively represent values of the ith element in the matrix corresponding to the QR code images of the three channels after encryption, and p (i) represents a value of the ith element in the matrix corresponding to the grayscale image of the original QR code without channel separation;
s6, after chaotic encryption, the pixel values of the QR code image are changed, but the relation between pixel rows is not changed, and the best encryption effect on the QR code containing the battery information cannot be achieved. Therefore, the improved Zigzag transformation is adopted to scramble the pixel positions of the QR code image subjected to Lorenz chaotic encryption, namely, the matrixes R ', G' and B 'are scrambled respectively, the frequency R is 10, the scrambling frequency is used as a Key Key2, and the Key Key2 is stored for later use to obtain two-dimensional matrixes R', G ', B' with equal size.
S61 construction of improved Zigzag transformation
The schematic diagram of the conventional Zigzag scan scrambling method is shown in fig. 6a and 6b, and a 4 × 4 matrix is set to obtain another scrambling matrix after the conventional Zigzag transform.
It can be seen that the positions of some elements are unchanged after the traditional Zigzag transformation, and in order to achieve a better scrambling effect, the method is improved on the basis that a previous stage of processing is performed before transformation. Taking an m x m matrix S, for example, dividing S equally into four small blocks with all matrix elements on the horizontal and vertical axes. If m is odd number, the boundary expansion processing is carried out to make it be even number, then each small block is taken as a whole, the positions of the matrix elements are exchanged according to the diagonal line to obtain the symmetrical exchange matrix
Figure GDA0002718156180000091
Figure GDA0002718156180000092
Then is aligned with
Figure GDA0002718156180000093
Performing Z-font conversion, scrambling, and changing element position state, that is, pointing from the arrow from the current position state to the next position state can be represented by expression (6), and pointing according to the arrow
Figure GDA0002718156180000094
The medium elements are sequentially sequenced according to the rows to obtain an equal-size two-dimensional matrix
Figure GDA0002718156180000095
The schematic diagrams are shown in fig. 7a and 7 b.
Such that
Figure GDA0002718156180000096
For S, the positions of all its elements are changed.
The improved Zigzag transform can be described by the following mathematical expression:
1) diagonal matrix switching
Figure GDA0002718156180000097
2) Zigzag transformation
Figure GDA0002718156180000098
Wherein, 1 in 1) is more than or equal to u,
Figure GDA0002718156180000101
2) wherein, u is less than or equal to 1, v is less than or equal to m, step _ r is m/2, step _ c is m/2, the row coordinate is u, and the ordinate is v. The symmetric switching matrix of the input matrix S is
Figure GDA0002718156180000102
Figure GDA0002718156180000103
The Zigzag transformed matrix is
Figure GDA0002718156180000104
S62, repeating the scrambling process of the step S61 r times, wherein the scrambling process is set to 10 in the embodiment; scrambling the matrix R 'to obtain a final scrambled two-dimensional matrix R';
s63, storing the scrambling times r as a Key2 for later use;
s64, repeating the step S61 r times in total, and scrambling the matrix G 'to obtain a two-dimensional matrix G' after scrambling;
s65, repeating the step S61 r times in total, and scrambling the matrix B 'to obtain a two-dimensional matrix B' after scrambling;
s7, respectively generating corresponding gray QR code images by the two-dimensional matrixes R ', G ' and B ' after scrambling, carrying out three-channel combination to obtain an encrypted QR code image Q1The ciphertext information of (1);
the QR code image containing the battery information is encrypted according to the steps, the encryption operation ensures the information security of the whole life cycle of the battery, but the user needs to decrypt the tracing information by using the provided secret key, and the flow chart is shown in FIG. 3.
S8, decryption process;
the decryption process is opposite to the encryption process, and the QR code image Q is obtained after decryption0By scanning the QR code image Q0Plaintext information about the battery is obtained.
The decryption process comprises the following steps:
s81, encrypting QR image Q1Decomposing the image into three channels of RGB to obtain three gray QR code encrypted images, wherein two-dimensional matrixes of the three QR code encrypted images are R ', G ' and B ' respectively;
s82, inputting a key2, and performing improved Zigzag inverse transformation on the matrix R ', G' and B 'respectively to obtain matrices R', G 'and B';
s83, inputting a secret key1, performing bitwise exclusive OR on the matrixes R ', G', B 'and chaotic sequences X' (k), Y '(k) and Z' (k) generated by the Lorenz system according to the rule of an expression (7) to restore a matrix R, G, B, and recovering an original QR code Q after three components are fused0
Figure GDA0002718156180000105
Figure GDA0002718156180000111
Figure GDA0002718156180000112
S84, the user can scan the QR code image Q0And information about the production time, specification size, attributes and the like of the battery is obtained, the source, destination and node of the power battery can be checked, and the tracing system is clear and transparent.
The experiment analyzes the encryption method through the correlation aspect of adjacent pixels: a good image encryption method should reduce the correlation of neighboring pixels to achieve zero correlation as much as possible. Three aspects of the image, horizontal, vertical, and diagonal pixels, are typically analyzed. The correlation coefficient of the adjacent pixel is as shown in expression (8):
Figure GDA0002718156180000113
wherein N is randomly extracted as adjacent pixels, x, from the gray pixel value matrix of the imageiAnd yiIs the pixel value of a certain pair of neighboring pixels. The experiment randomly abstracts 1000 to analyze the pixel values. The analytical results are shown in Table 1.
TABLE 1 correlation table of adjacent pixels of original QR code and encrypted QR code
Figure GDA0002718156180000114
Experimental results show that the correlation coefficient of adjacent pixels of the encrypted image is reduced by orders of magnitude, which shows that the encryption method has a good encryption effect.
The invention provides an improved Lorenz and Zigzag transformation encryption method for traceability management of a power battery. Experimental analysis shows that the algorithm has a good encryption effect and can guarantee the safety of the battery information in the QR code at each stage in the full life cycle system of the power battery.
The scope of the invention is defined by the claims. Various modifications and equivalents may be made by those skilled in the art within the spirit and scope of the present invention, and such modifications and equivalents should also be considered as falling within the scope of the present invention.

Claims (5)

1. An improved Lorenz and Zigzag transformation encryption method for power battery traceability management is characterized by comprising the following steps:
s1, encoding the battery data of each life cycle of the plaintext information power battery to generate a color QR code image Q with the size of n multiplied by n0
S2, converting the image Q0Decomposing the image into grayscale images of three channels of RGB, wherein the matrixes are R (n, n), G (n, n) and B (n, n);
s3, utilizing Matlab2018b software and an expression (2), enabling the Lorenz chaotic system to generate three chaotic sequences:
{x(k),y(k),z(k)|k=1,2...};
the expression (2) is:
Figure FDA0002662949790000011
wherein k is a positive integer, t is time, and x, y and z are each a seriesThe system state variables, a, b and c are system parameters, let a equal to 10,
Figure FDA0002662949790000012
c is 28, and the system is in a chaotic state; selecting an initial value x0、y0、z0Respectively 0, 1 and 0, and is stored for standby as a Key 1;
s4, optimizing the chaotic sequence to obtain processed optimized chaotic sequences X ' (k), Y ' (k) and Z ' (k);
s5, carrying out exclusive OR operation on the optimized chaotic sequences X '(k), Y' (k) and Z '(k) and matrixes R (n, n), G (n, n) and B (n, n) according to the constructed expression (4) to obtain encryption matrixes R' (n, n), G '(n, n) and B' (n, n) containing plaintext characteristics;
Figure FDA0002662949790000013
Figure FDA0002662949790000014
Figure FDA0002662949790000021
wherein, i is 1,2, nxn, R (i), G (i), B (i) and B (i) respectively represent the value of the ith element in the matrix corresponding to the QR code images of the three channels, R ' (i), G ' (i) and B ' (i) respectively represent the value of the ith element in the matrix corresponding to the QR code images of the three channels after encryption, and p (i) represents the value of the ith element in the matrix corresponding to the grayscale image of the original QR code without channel separation;
s6, constructing an improved Zigzag transformation, scrambling the matrixes R ' (n, n), G ' (n, n) and B ' (n, n) respectively by using the improved Zigzag transformation to obtain a Key2 and the scrambled matrixes R "(n, n), G" (n, n) and B "(n, n), and the steps are as follows:
s61, constructing an improved Zigzag transformation;
s611, taking a matrix S with the size of m multiplied by m as an input matrix, equally dividing all matrix elements into four small blocks according to a horizontal axis and a vertical axis, if m is an odd number, carrying out boundary expansion processing on the small blocks to enable the small blocks to be even numbers, then taking each small block as a whole, and exchanging the positions of the matrix elements according to a diagonal line according to an expression (5) to obtain a symmetrical exchange matrix
Figure FDA0002662949790000028
The expression (5) is
Figure FDA0002662949790000022
Wherein the content of the first and second substances,
Figure FDA0002662949790000023
step _ r is m/2, step _ c is m/2, u is a row coordinate, and v is a vertical coordinate; s is an input matrix, and S is an input matrix,
Figure FDA0002662949790000024
is a symmetric switching matrix;
s612, symmetrical switching matrix
Figure FDA0002662949790000025
Scrambling is performed, the element position state of which changes as expressed by expression (6), and
Figure FDA0002662949790000026
sequentially ordering the medium elements to obtain a two-dimensional matrix
Figure FDA0002662949790000027
The expression (6) is:
Figure FDA0002662949790000031
wherein i is more than or equal to 1, j is more than or equal to m, u is a row coordinate, v is a vertical coordinate,
Figure FDA0002662949790000032
is composed of
Figure FDA0002662949790000033
The scrambled matrix;
s62, repeating the scrambling process of the step S61R times, scrambling the matrix R '(n, n) to obtain a final scrambled matrix R' (n, n);
s63, storing the scrambling times r as a Key2 for later use;
s64, repeating the step S61 r times in total, scrambling the matrix G '(n, n) to obtain a scrambled matrix G' (n, n);
s65, repeating the step S61 r times in total, scrambling the matrix B '(n, n) to obtain a scrambled matrix B' (n, n);
s7, respectively generating corresponding gray QR code images by the two-dimensional matrixes R ' (n, n), G ' (n, n) and B ' (n, n) after scrambling, merging three channels to obtain an encrypted color QR code image Q1The ciphertext information of (1);
s8, decryption process;
the decryption process is opposite to the encryption process, and the QR code image Q is obtained after decryption0By scanning the QR code image Q0Plaintext information about the battery is obtained.
2. The encryption method for improving Lorenz and Zigzag transformation for the traceability management of power batteries according to claim 1, wherein the battery data of each life cycle of the power batteries in the step S1 at least includes information of production, sale, abandonment, recovery, disassembly and reuse cycles.
3. The improved Lorenz and Zigzag encryption method for the traceability management of power batteries according to claim 1, wherein the sequence elements optimized in step S4 are all positive numbers and are between 0 and 255.
4. The encryption method for improving Lorenz and Zigzag transformation for traceability management of power batteries according to claim 3, wherein the optimization process in step S4 is performed according to expression (3);
the expression (3) is:
Figure FDA0002662949790000034
5. the encryption method for improving Lorenz and Zigzag transformation for the traceability management of power batteries according to claim 1, wherein the decryption process in step S8 comprises the following steps:
s81, encrypting QR image Q1Decomposing the image into three channels of RGB to obtain three gray QR code encrypted images, wherein the matrixes of the three QR code encrypted images are R "(n, n), G" (n, n) and B "(n, n);
s82, inputting a key2, and performing improved Zigzag inverse transformation on the R '(n, n), G' (n, n) and B '(n, n) matrixes respectively to obtain matrixes R' (n, n), G '(n, n) and B' (n, n);
s83, inputting a key1, generating and optimizing chaotic sequences X ' (k), Y ' (k) and Z ' (k) by a matrix R ' (n, n), G ' (n, n) and a Lorenz system, bitwise XOR-reducing the matrix R (n, n), G (n, n) and B (n, n) according to the rule of an expression (7), and recovering an original QR code Q after combining three channels0
Figure FDA0002662949790000041
Figure FDA0002662949790000042
Figure FDA0002662949790000043
S84, scanning QR code image Q0Plaintext information about the battery is obtained.
CN202010910111.1A 2020-09-02 2020-09-02 Improved Lorenz and Zigzag transformation encryption method for power battery traceability management Active CN112116048B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010910111.1A CN112116048B (en) 2020-09-02 2020-09-02 Improved Lorenz and Zigzag transformation encryption method for power battery traceability management

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010910111.1A CN112116048B (en) 2020-09-02 2020-09-02 Improved Lorenz and Zigzag transformation encryption method for power battery traceability management

Publications (2)

Publication Number Publication Date
CN112116048A CN112116048A (en) 2020-12-22
CN112116048B true CN112116048B (en) 2021-08-31

Family

ID=73805491

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010910111.1A Active CN112116048B (en) 2020-09-02 2020-09-02 Improved Lorenz and Zigzag transformation encryption method for power battery traceability management

Country Status (1)

Country Link
CN (1) CN112116048B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101417679B1 (en) * 2013-10-23 2014-07-09 주식회사 지엠에스 VSDT device for detecting lane Violation and Communication fee Payment method using the same
CN104635204A (en) * 2015-01-22 2015-05-20 燕山大学 Signal source positioning method of Duffing-Lorenz-based chaotic system
CN107610034A (en) * 2017-09-06 2018-01-19 贵州航天计量测试技术研究所 Image encryption method based on chaos system and the reversible cellular automaton of two dimension
CN109472338A (en) * 2018-11-19 2019-03-15 南通大学 A kind of Mass production method of commodity anti-counterfeit two-dimensional bar code

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030138742A1 (en) * 2000-04-11 2003-07-24 Nikon Corporation Exposure method and exposure apparatus

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101417679B1 (en) * 2013-10-23 2014-07-09 주식회사 지엠에스 VSDT device for detecting lane Violation and Communication fee Payment method using the same
CN104635204A (en) * 2015-01-22 2015-05-20 燕山大学 Signal source positioning method of Duffing-Lorenz-based chaotic system
CN107610034A (en) * 2017-09-06 2018-01-19 贵州航天计量测试技术研究所 Image encryption method based on chaos system and the reversible cellular automaton of two dimension
CN109472338A (en) * 2018-11-19 2019-03-15 南通大学 A kind of Mass production method of commodity anti-counterfeit two-dimensional bar code

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
色散媒质中的理想匹配层吸收边界及其误差分析;陈明阳等;《光学学报》;20020417;全文 *

Also Published As

Publication number Publication date
CN112116048A (en) 2020-12-22

Similar Documents

Publication Publication Date Title
Sheela et al. Image encryption based on modified Henon map using hybrid chaotic shift transform
Gao et al. EFR-CSTP: Encryption for face recognition based on the chaos and semi-tensor product theory
Li et al. Fractional-order 4D hyperchaotic memristive system and application in color image encryption
Chai An image encryption algorithm based on bit level Brownian motion and new chaotic systems
CN106023051B (en) DNA image encryption method and system based on cloud model and hyperchaotic system
CN101706947B (en) Image fusion encryption method based on DNA sequences and multiple chaotic mappings
Yousif et al. A new image encryption based on bit replacing, chaos and DNA coding techniques
Zhang et al. On the security of symmetric ciphers based on DNA coding
Wang et al. Chaotic image encryption algorithm based on block theory and reversible mixed cellular automata
Amani et al. A new approach in adaptive encryption algorithm for color images based on DNA sequence operation and hyper-chaotic system
CN106713274A (en) Method and device for generating two-dimensional code based on text compression and method and device for reading two-dimensional code based on text compression
CN105046634A (en) Image encryption method based on information entropy and a spatiotemporal chaotic system
Abusukhon et al. New direction of cryptography: A review on text-to-image encryption algorithms based on RGB color value
CN111262684A (en) Power battery traceability management coding encryption method based on improved AES algorithm
Wang et al. I mage encryption scheme based on Chaos and DNA plane operations
CN113691362B (en) Bit plane image compression encryption method based on hyperchaotic system and DNA coding
Asl et al. Scale invariant digital color image encryption using a 3D modular chaotic map
CN104182926B (en) Color image encrypting method based on Hilbert conversion and chaos Liu algorithms
Wang et al. An efficient batch images encryption method based on DNA encoding and PWLCM
Movafegh Ghadirli et al. Color image DNA encryption using mRNA properties and non-adjacent coupled map lattices
Zhou A quantum image encryption method based on DNACNot
Shi et al. A novel memristor-based chaotic image encryption algorithm with Hash process and S-box
Salman et al. Color image encryption depend on DNA operation and chaotic system
Chong et al. Block color image encryption algorithm based on elementary cellular automata and DNA sequence operations
Sha et al. Cross-plane colour image encryption scheme based on BST model and chaotic map

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
GR01 Patent grant
GR01 Patent grant