Image encryption method and system based on BAM memristor neural network finite time synchronization

By constructing an inertial BAM memristive neural network drive system and response system with uncertain parameters, and designing an adaptive synchronization controller, limited time synchronization is achieved, solving the problems of image encryption complexity and insufficient security, and significantly improving the encryption system. complexity and security.

CN118673974BActive Publication Date: 2025-01-17YANCHENG INST OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410631723.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-21
Publication Date
2025-01-17
Estimated Expiration
2044-05-21

AI Technical Summary

Technical Problem

The prior art is difficult to achieve limited time synchronization of inertial BAM memristor neural networks with uncertain parameters, resulting in insufficient complexity and security of image encryption.

Method used

By constructing the inertial BAM memristive neural network drive system and response system with uncertain parameters, and designing an adaptive synchronization controller to achieve limited time synchronization of the drive system and the response system, an image encryption method based on BAM memristive neural network and system.

Benefits of technology

It significantly improves the complexity and security of image encryption, realizes limited time synchronization of inertial BAM memristive neural networks with uncertain parameters, and enhances the system's robustness and interference suppression capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118673974B_ABST
    Figure CN118673974B_ABST
Patent Text Reader

Abstract

The present invention belongs to the field of new generation information technology, and specifically relates to an image encryption method and system based on finite time synchronization of a BAM memristor neural network, including: step S1: constructing an inertial BAM memristor neural network drive system and a response system with uncertain parameters; step S2: setting the synchronization error of the drive system and the response system, and establishing a synchronization error system; step S3: designing an adaptive synchronization controller, applying the adaptive synchronization controller to the response system, so that the response system is synchronized with the drive system for a finite time, thereby realizing an image encryption method. The present invention introduces an inertial term into a BAM memristor neural network, and designs an adaptive synchronization controller, solves the problem of finite time synchronization of an inertial BAM memristor neural network, and applies it to the field of image encryption. The proposed image encryption method and system can significantly improve the security of the image encryption system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of new generation information technology, and in particular to an image encryption method and system based on BAM memristor neural network finite time synchronization. Background Art

[0002] Neural networks, especially BAM neural networks, have been widely studied and applied in signal and image processing, pattern recognition, artificial intelligence and other fields due to their good information storage and associative memory performance. It is well known that memristors have the characteristics of nanometer size, non-volatility and hysteresis loop, which makes them work like neuron synapses. Based on the advantages of memristors, they can replace traditional resistors to simulate biological synapses, and the synaptic density in memristor neural networks is closer to that of biological neural networks. Naturally, researchers combined memristors with BAM neural networks to form a type of neural network called BAM memristor neural networks.

[0003] Inertia is the core tool for generating bifurcation and chaos. In practical applications of neural networks, inertia helps in disordered search of memory. Inertial neural networks can be used as research models in many fields such as physics, electronics, biology, and mechanical engineering. Inertia is introduced into the BAM memristor neural network to form an inertial BAM memristor neural network. The second-order system is transformed into a first-order system by introducing appropriate variable substitution. The synchronization of the inertial BAM memristor neural network has research value in theory and application.

[0004] Compared with the existing control methods, the adaptive control method is used to achieve the finite time synchronization of the inertial BAM memristor neural network. Synchronization is a common phenomenon in the network and an important dynamic behavior of the BAM neural network, because it has great application prospects in new generation information technologies such as pseudo-random number generators, pattern recognition, and secure communications. It is worth pointing out that compared with traditional asymptotic synchronization, finite time synchronization requires the response system and the drive system to be synchronized in a finite time, which makes the finite time control method have the advantages of better practicality, better interference suppression, better robustness, etc. Summary of the invention

[0005] In view of this, the purpose of the present invention is to provide an image encryption method and system based on the finite-time synchronization of a BAM memristor neural network, which can realize the finite-time synchronization of an inertial BAM memristor neural network with uncertain parameters, and propose an image encryption method and system, thereby significantly improving the complexity and security of image encryption.

[0006] The present invention provides an image encryption method and system based on BAM memristor neural network finite time synchronization, comprising the following steps:

[0007] Step S1: construct an inertial BAM memristor neural network drive system and a response system with uncertain parameters; Step S1 specifically includes the following steps:

[0008] Step S11: construct an inertial BAM memristor neural network drive system with uncertain parameters:

[0009]

[0010] Wherein, time t≥0; i=1,2,…,n; j=1,2,…,m; n≥2 and m≥2 are the number of neurons in the i-th layer and the j-th layer of the driving system respectively; x i (t) and y j (t) are the state variables of the neurons in the i-th and j-th layers of the driving system at time t, and They are state variables x i (t) and y j The second-order derivative of (t) is the inertia term of the drive system; and is a positive constant; τ(t) is a discrete time lag and satisfies 0≤τ(t)≤τ, where τ is a positive constant; Δa ji (t), Δb ji (t), Δc ij (t) and Δd ij (t) represents an uncertain parameter and satisfies |Δa ji (t)|≤σ ji (1), |Δb ji (t)|≤σ ji (2) , where σ ji (1) , σ ji (2) , and is a positive constant; f j (·) and g i (·) represents an activation function, and each activation function satisfies the Lipschitz condition, that is, for any real number a and b, and |g i (a)-g i (b)|≤L i |ab|, where L i and is a positive number; at the same time, each activation function is bounded, satisfying and |g i (·)|≤F i , where F i and is a positive constant; aji (x i (t))、b ji (x i (t))、c ij (y j (t)) and d ij (y j (t)) represents the memristor connection weight, and they satisfy:

[0011]

[0012] The switching interval of the memristor is T i >0, and are all constants,

[0013] Introducing a replacement function α i and β j As a constant, replace the variables of the drive system and rewrite it into the following form:

[0014]

[0015] Step S12: constructing a response system corresponding to the driving system:

[0016]

[0017] in and Respectively represent the state variables of the neurons in the i-th layer and the j-th layer of the response system at time t; u i (t), v i (t) and An adaptive synchronous controller to be designed; and represents an uncertain parameter and satisfies

[0018] in and is a positive constant; and represents the memristor connection weight, and they satisfy:

[0019]

[0020] The switching interval of the memristor is T i >0, and are all constants, The other performance indicators in the response system are the same as the performance indicators in the drive system;

[0021] Step S2: according to the driving system and the response system established in step S1, a synchronization error is set and an adaptive synchronization controller is designed;

[0022] Step S3: Based on the response system being synchronized with the driving system for a limited time under the action of the adaptive synchronization controller, image encryption and decryption are implemented. The specific implementation steps are as follows:

[0023] The encryption process is as follows:

[0024] Step S31: read the original color image, the image size is M×N×3, extract the red component matrix R(p,q), green component matrix G(p,q), and blue component matrix B(p,q) of the original color image, p∈{1,2,…,M}, q∈{1,2,…,N}, where R(p,q), G(p,q), and B(p,q) are all values ​​between 0,1,…,255;

[0025] Step S32: After the drive system and the response system reach finite time synchronization, the chaotic signal x i (t) and y j (t), select three chaotic signal sequences z 1 (p,q),z 2 (p,q) and z 3 (p,q), p∈{1,2,…,M}, q∈{1,2,…,N};

[0026] Step S33: The three chaotic signal sequences z obtained in step S32 are 1 (p,q),z 2 (p,q) and z 3 (p,q), after a specific transformation, three new signal sequences Z are obtained 1 (p,q),Z 2 (p,q) and Z 3 (p,q), p∈{1,2,…,M}, q∈{1,2,…,N}, where Z 1 (p,q),Z 2 (p,q) and Z 3 (p, q) are all values ​​between 0, 1, ..., 255, and the specific conversion formula used in step S33 is:

[0027] Z 1 (p,q)=mod(10000*(z 1 (p,q)-floor(z1 (p,q))),256),

[0028] Z 2 (p,q)=mod(10000*(z 2 (p,q)-floor(z 2 (p,q))),256),

[0029] Z 3 (p,q)=mod(10000*(z 3 (p,q)-floor(z 3 (p,q))),256);

[0030] Step S34: The three new signal sequences Z obtained in step S33 are 1 (p,q),Z 2 (p,q) and Z 3 (p, q) is XORed with the corresponding position elements in the three color component matrices R(p, q), G(p, q) and B(p, q) of the original unencrypted color image to obtain the replaced three color component matrices R * (p,q),G * (p,q) and B * (p,q), p∈{1,2,…,M}, q∈{1,2,…,N};

[0031] Step S35: Arnold transformation is used to transform the three color component matrices R after substitution. * (p,q),G * (p,q) and B * (p, q) is scrambled to obtain the three color component matrices R after scrambling ** (p,q),G ** (p,q) and B ** (p, q), ip∈{1,2,…,M}, q∈{1,2,…,N}, the Arnold transformation algorithm is:

[0032]

[0033] Where (X, Y) is the original position of the pixel, (X′, Y′) is the position of the pixel after scrambling, and a and b are constants;

[0034] Step S36: The three color component matrices R after scrambling in step S35 are ** (p,q),G ** (p,q) and B ** (p, q) are used as three color component matrices of the encrypted image, and the encrypted image color component matrices are combined to generate an encrypted image;

[0035] The decryption process is the reverse process of the encryption process, specifically:

[0036] Step S37: read the encrypted image, extract three color component matrices r(p,g), g(p,g) and b(p,q), p∈{1,2,…,M}, q∈{1,2,…,N}, where r(p,q), g(p,q) and b(p,q) are all values ​​between 0,1,…,255;

[0037] Step S38: Use Arnold inverse transform to perform inverse scrambling operation on the three color component matrices r(p,q), g(p,q) and b(p,q) of the encrypted image to restore the three color component matrices r * (p,q),g * (p,q) and b * (p, q), p∈{1,2,…,M}, q∈{1,2,…,N}, the Arnold inverse transform algorithm is:

[0038]

[0039] Where (X, Y) is the original position of the pixel, (X′, Y′) is the position of the pixel after scrambling, and a and b are constants;

[0040] Step S39: After the driving system and the response system reach finite time synchronization, the chaotic signal of the response system is and Select the same as in step S32 1 (p,q),z 2 (p,q) and z 3 The chaotic signal sequence corresponding to (p,q) and

[0041] Step S310: The chaotic signal sequence obtained in step S39 and After a specific transformation, three new signal sequences can be obtained: and in and are all values ​​in the range of 0, 1, ..., 255. The specific conversion formula used in step S310 is:

[0042]

[0043] Step S311: The three new signal sequences obtained in step S310 are and Respectively with the three color component matrices r restored in step S38 * (p,q),g * (p,q) and b * The corresponding position elements in (p, q) are XORed to restore the three color component matrices r of the original color image ** (p,q),g ** (p,q) and b ** (p, q), ip∈{1,2,…,M}, q∈{1,2,…,N};

[0044] Step S312: The three color component matrices r of the original color image restored in step S311 are ** (p,q),g ** (p,q) and b ** (p,q) are recombined and decrypted to get the original color image.

[0045] Furthermore, step S2 specifically includes the following steps:

[0046] Step S21: According to the inertial BAM memristor neural network drive system and response system with uncertain parameters constructed in step S1, the synchronization error of the drive system and the response system is set to:

[0047]

[0048] Step S21: According to the inertial BAM memristor neural network drive system and response system with uncertain parameters constructed in step S1, the synchronization error of the drive system and the response system is set to:

[0049]

[0050] Step S22: According to step S21, the synchronization error between the drive system and the response system is set, and the adaptive synchronization controller is designed as follows:

[0051]

[0052] in

[0053]

[0054] and

[0055]

[0056] Where i = 1, 2, ..., n, j = 1, 2, ..., m; sign(·) is the sign function; and is the adaptive synchronous controller gain; and are all arbitrary normal numbers; ω i , and are all constants and satisfy:

[0057]

[0058] The adaptive synchronization controller acts on the response system so that the response system is synchronized with the drive system for a limited time.

[0059] Furthermore, the response system is synchronized with the drive system for a limited time, and the range of the limited time is:

[0060]

[0061] in and are all arbitrary normal numbers,

[0062] In a second aspect of the present invention, an image encryption system based on finite-time synchronization of a BAM memristor neural network is proposed, the image encryption system comprising:

[0063] Chaotic signal acquisition module: Based on the inertial BAM memristor neural network, a drive system and a response system are established, and the synchronization error is set, and an adaptive synchronization controller is designed to make the drive system and the response system synchronized in a finite time; after the drive system and the response system are synchronized in a finite time, the chaotic signal x of the drive system is obtained. i (t) and y j (t), select three chaotic signal sequences z 1 (p,q),z 2 (p,q) and z 3 (p,q), according to the chaotic signal of the response system and Select and z 1 (p,g),z 2 (p,q) and z 3 The chaotic signal sequence corresponding to (p,q) and

[0064] Drive system chaotic signal processing module: used to transform chaotic signal sequence z 1 (p,q),z 2 (p,q) and z 3(p,q), after a specific transformation, three new signal sequences Z can be obtained 1 (p,q),Z 2 (p,q) and Z 3 (p,q);

[0065] Response system chaotic signal processing module: used to transform chaotic signal sequence and After a specific transformation, three new signal sequences can be obtained: and Where Z 1 (p,q),Z 2 (p,q),Z 3 (p,q), and All are values ​​between 0, 1, ..., 255;

[0066] Original color image component reading module: used to read the original color image during the encryption process, and extract the red component matrix R(p,q), green component matrix q(p,q), and blue component matrix B(p,q) of the original color image;

[0067] Encrypted image component reading module: used to read the encrypted image and extract the three color component matrices r(p,q), g(p,q) and b(p,q) of the encrypted image during the decryption process;

[0068] Encryption permutation operation module: used to convert the three new signal sequences Z obtained in step S33 into 1 (p,q),Z 2 (p,q) and Z 3 (p, q) is subjected to an exclusive OR operation with the corresponding position elements in the three color component matrices R(p, q), G(p, q) and B(p, q) of the original color image respectively;

[0069] Decryption permutation operation module: used to replace the three new signal sequences obtained in step S310 during the decryption process and Respectively with the three color component matrices r restored in step S38 * (p,q),g * (p,q) and b * Perform XOR operation on the corresponding position elements in (p,q);

[0070] Scrambling operation module: used in the encryption process, using Arnold transformation to permute the three color component matrices R * (p,q),G * (p,q) and B *(p, q) is scrambled to obtain the three color component matrices R after scrambling ** (p,q),G ** (p,q) and B ** (p,q);

[0071] Inverse scrambling operation module: used in the decryption process, using Arnold inverse transformation to perform inverse scrambling operation on the three color component matrices r(p,g), g(p,q) and b(p,q) of the encrypted image to restore the three color component matrices r * (p,q),g * (p,q) and b * (p,q);

[0072] Encrypted image component combination module: used to combine the three color component matrices R of the encrypted image during the encryption process ** (p,q),G ** (p,q) and B ** (p,q), generate encrypted image;

[0073] Decrypted image component combination module: used in the decryption process to restore the three color component matrices r of the original color image ** (p,g),g ** (p,q) and b ** (p,q) are recombined and decrypted to get the original color image.

[0074] The present invention provides an image encryption method and system based on BAM memristor neural network finite time synchronization. Compared with the prior art, the present invention has the following beneficial effects:

[0075] 1. The present invention uses memristors to simulate synapses in a neural network and constructs a memristor neural network.

[0076] 2. In the present invention, an inertia term is introduced into the BAM memristor neural network, an inertial BAM memristor neural network is constructed, and parameter uncertainty factors are taken into consideration.

[0077] 3. In the present invention, in order to synchronize the response system with the drive system within a limited time, an adaptive synchronization controller is considered to effectively reduce the control cost. BRIEF DESCRIPTION OF THE DRAWINGS

[0078] Figure 1 This is a flow chart of the image encryption method based on BAM memristor neural network finite time synchronization proposed by the present invention;

[0079] Figure 2 The synchronous error variation trajectory diagram without the synchronous controller in the present invention, where (a) is the synchronous error z without the synchronous controller i(t) and e i (t), i = 1, 2 change trajectory diagram, (b) is the synchronization error without the synchronization controller and Change trajectory diagram;

[0080] Figure 3 is a state change trajectory diagram of the driving system and the response system under the action of the adaptive synchronous controller in the present invention, where (a) is x under the action of the adaptive synchronous controller 1 (t) and y 1 (t) and State change trajectory diagram, (b) is the x under the action of adaptive synchronization controller 2 (t) and y 2 (t) and Change trajectory diagram, (c) is the s under the action of adaptive synchronization controller 1 (t) and r 1 (t) and Change trajectory diagram, (d) is the s under the action of adaptive synchronization controller 2 (t) and r 2 (t) and Change trajectory diagram;

[0081] Figure 4 is a synchronous error variation trajectory diagram under the action of the adaptive synchronous controller in the present invention, wherein (a) is the synchronous error z under the action of the adaptive synchronous controller i (t) and e i (t), i = 1, 2 change trajectory diagram, (b) is the synchronization error under the action of the adaptive synchronization controller and j=1,2 change trajectory diagram;

[0082] Figure 5 This is a control gain change trajectory diagram under the action of the adaptive synchronous controller in the present invention, where (a) is the control gain under the action of the adaptive synchronous controller and Change trajectory diagram, (b) is the control gain under the action of adaptive synchronous controller and Change trajectory diagram.

[0083] Figure 6 The image encryption effect is shown in the present invention, where (a) is the original color image, (b) is the encrypted image, and (c) is the decrypted image;

[0084] Figure 7This is a flow chart of the image encryption system based on the finite time synchronization of the BAM memristor neural network proposed by the present invention. DETAILED DESCRIPTION

[0085] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0086] Embodiment 1:

[0087] like Figure 1 As shown, this embodiment provides an image encryption method and system based on BAM memristor neural network finite time synchronization. The synchronization control method includes the following steps:

[0088] Step S1: construct an inertial BAM memristor neural network drive system and a response system with uncertain parameters; Step S1 specifically includes the following steps:

[0089] Step S11: construct an inertial BAM memristor neural network drive system with uncertain parameters:

[0090]

[0091] Wherein, time t≥0; i=1,2,…,n; j=1,2,…,m; n≥2 and m≥2 are the number of neurons in the i-th layer and the j-th layer of the driving system respectively; x i (t) and y j (t) are the state variables of the neurons in the i-th and j-th layers of the driving system at time t, and They are state variables x i (t) and y j The second-order derivative of (t) is the inertia term of the drive system; and is a positive constant; τ(t) is a discrete time lag and satisfies 0≤τ(t)≤τ, where τ is a positive constant; Δa ji (t), Δb ji (t), Δc ij (t) and Δd ij (t) represents an uncertain parameter and satisfies |Δa ji (t)|≤σ ji (1) , |Δb ji (t)|≤σ ji (2) , where σji (1) , σ ji (2) , and is a positive constant; f j (·) and g i (·) represents an activation function, and each activation function satisfies the Lipschitz condition, that is, for any real number a and b, and |g i (a)-g i (b)|≤L i |ab|, where L i and is a positive number; at the same time, each activation function is bounded, satisfying and |g i (·)|≤F i , where F i and is a positive constant; a ji (x i (t))、b ji (x i (t))、c ij (y j (t)) and d ij (y j (t)) represents the memristor connection weight, and they satisfy:

[0092]

[0093] The switching interval of the memristor is T i >0, and are all constants,

[0094] Introducing a replacement function α i and β j As a constant, replace the variables of the drive system and rewrite it into the following form:

[0095]

[0096] Step S12: constructing a response system corresponding to the driving system:

[0097]

[0098] in and Respectively represent the state variables of the neurons in the i-th layer and the j-th layer of the response system at time t; u i (t), vi (t) and An adaptive synchronous controller to be designed; and represents an uncertain parameter and satisfies in and is a positive constant; and represents the memristor connection weight, and they satisfy:

[0099]

[0100] The switching interval of the memristor is T i >0, and are all constants, The other performance indicators in the response system are the same as the performance indicators in the drive system;

[0101] Step S2: according to the driving system and the response system established in step S1, a synchronization error is set and an adaptive synchronization controller is designed;

[0102] Step S3: Based on the response system being synchronized with the driving system for a limited time under the action of the adaptive synchronization controller, image encryption and decryption are implemented. The specific implementation steps are as follows:

[0103] The encryption process is as follows:

[0104] Step S31: read the original color image, the image size is M×N×3, extract the red component matrix R(p,q), green component matrix G(p,q), and blue component matrix B(p,q) of the original color image, p∈{1,2,…,M}, q∈{1,2,…,N}, where R(p,q), G(p,g), and B(p,q) are all values ​​between 0,1,…,255;

[0105] Step S32: After the drive system and the response system reach finite time synchronization, the chaotic signal x i (t) and y j (t), select three chaotic signal sequences z 1 (p,q),z 2 (p,q) and z 3 (p,q), p∈{1,2,…,M}, q∈{1,2,…,N};

[0106] Step S33: The three chaotic signal sequences z obtained in step S32 are 1 (p,q),z 2 (p,q) and z 3 (p,q), after a specific transformation, three new signal sequences Z are obtained 1 (p,q),Z 2 (p,q) and Z 3 (p,q), p∈{1,2,…,M}, q∈{1,2,…,N}, where Z 1 (p,q),Z 2 (p,q) and Z 3 (p, q) are all values ​​between 0, 1, ..., 255, and the specific conversion formula used in step S33 is:

[0107] Z 1 (p,q)=mod(10000*(z 1 (p,q)-floor(z 1 (p,q))),256),

[0108] Z 2 (p,q)=mod(10000*(z 2 (p,q)-floor(z 2 (p,q))),256),

[0109] Z 3 (p,q)=mod(10000*(z 3 (p,q)-floor(z 3 (p,q))),256);

[0110] Step S34: The three new signal sequences Z obtained in step S33 are 1 (p,q),Z 2 (p,q) and Z 3 (p, q) is XORed with the corresponding position elements in the three color component matrices R(p, q), G(p, q) and B(p, q) of the original unencrypted color image to obtain the replaced three color component matrices R * (p,q),G * (p,q) and B * (p,q), p∈{1,2,…,M}, q∈{1,2,…,N};

[0111] Step S35: Arnold transformation is used to transform the three color component matrices R after substitution. * (p,q),G * (p,q) and B *(p, q) is scrambled to obtain the three color component matrices R after scrambling ** (p,q),G ** (p,q) and B ** (p, q), ip∈{1,2,…,M}, q∈{1,2,…,N}, the Arnold transformation algorithm is:

[0112]

[0113] Where (X, Y) is the original position of the pixel, (X′, Y′) is the position of the pixel after scrambling, and a and b are constants;

[0114] Step S36: The three color component matrices R after scrambling in step S35 are ** (p,q),G ** (p,q) and B ** (p, q) are used as three color component matrices of the encrypted image, and the encrypted image color component matrices are combined to generate an encrypted image;

[0115] The decryption process is the reverse process of the encryption process, specifically:

[0116] Step S37: read the encrypted image, extract three color component matrices r(p,q), g(p,q) and b(p,q), p∈{1,2,…,M}, q∈{1,2,…,N}, where r(p,q), g(p,q) and b(p,q) are all values ​​between 0,1,…,255;

[0117] Step S38: Use Arnold inverse transform to perform inverse scrambling operation on the three color component matrices r(p,q), g(p,q) and b(p,q) of the encrypted image to restore the three color component matrices r * (p,q),g * (p,q) and b * (p, q), p∈{1,2,…,M}, q∈{1,2,…,N}, the Arnold inverse transform algorithm is:

[0118]

[0119] Where (X, Y) is the original position of the pixel, (X′, Y′) is the position of the pixel after scrambling, and a and b are constants;

[0120] Step S39: After the driving system and the response system reach finite time synchronization, the chaotic signal of the response system is and Select the same as in step S32 1 (p,g),z 2(p,q) and z 3 The chaotic signal sequence corresponding to (p,q) and

[0121] Step S310: The chaotic signal sequence obtained in step S39 and After a specific transformation, three new signal sequences can be obtained: and in and are all values ​​in the range of 0, 1, ..., 255. The specific conversion formula used in step S310 is:

[0122]

[0123] Step S311: The three new signal sequences obtained in step S310 are and Respectively with the three color component matrices r restored in step S38 * (p,q),g * (p,q) and b * The corresponding position elements in (p, q) are XORed to restore the three color component matrices r of the original color image ** (p,q),g ** (p,q) and b ** (p, q), ip∈{1,2,…,M}, q∈{1,2,…,N};

[0124] Step S312: The three color component matrices r of the original color image restored in step S311 are ** (p,q),g ** (p,q) and b ** (p,q) are recombined and decrypted to get the original color image.

[0125] also, Figure 7 This is a flow chart of the image encryption system based on BAM memristor neural network finite time synchronization proposed by the present invention. The image encryption system includes:

[0126] Chaotic signal acquisition module: Based on the inertial BAM memristor neural network, a drive system and a response system are established, and the synchronization error is set, and an adaptive synchronization controller is designed to make the drive system and the response system synchronized in a finite time; after the drive system and the response system are synchronized in a finite time, the chaotic signal x of the drive system is obtained. i (t) and y j (t), select three chaotic signal sequences z 1 (p,q),z2 (p,q) and z 3 (p,q), according to the chaotic signal of the response system and Select and z 1 (p,q),z 2 (p,q) and z 3 The chaotic signal sequence corresponding to (p,q) and

[0127] Drive system chaotic signal processing module: used to transform chaotic signal sequence z 1 (p,q),z 2 (p,q) and z 3 (p,q), after a specific transformation, three new signal sequences Z can be obtained 1 (p,q),Z 2 (p,q) and Z 3 (p,q);

[0128] Response system chaotic signal processing module: used to transform chaotic signal sequence and After a specific transformation, three new signal sequences can be obtained: and Where Z 1 (p,q),Z 2 (p,q),Z 3 (p,q), and All are values ​​between 0, 1, ..., 255;

[0129] Original color image component reading module: used to read the original color image during the encryption process, and extract the red component matrix R(p,q), green component matrix G(p,q), and blue component matrix B(p,q) of the original color image;

[0130] Encrypted image component reading module: used to read the encrypted image and extract the three color component matrices r(p,q), g(p,q) and b(p,q) of the encrypted image during the decryption process;

[0131] Encryption permutation operation module: used to convert the three new signal sequences Z obtained in step S33 into 1 (p,q),Z 2 (p,q) and Z 3 (p, q) is subjected to an exclusive OR operation with the corresponding position elements in the three color component matrices R(p, q), G(p, q) and B(p, q) of the original color image respectively;

[0132] Decryption permutation operation module: used to replace the three new signal sequences obtained in step S310 during the decryption process and Respectively with the three color component matrices r restored in step S38 * (p,q),g * (p,q) and b * Perform XOR operation on the corresponding position elements in (p,q);

[0133] Scrambling operation module: used in the encryption process, using Arnold transformation to permute the three color component matrices R * (p,q),G * (p,q) and B * (p, q) is scrambled to obtain the three color component matrices R after scrambling ** (p,q),G ** (p,q) and B ** (p,q);

[0134] Inverse scrambling operation module: used in the decryption process, using Arnold inverse transformation to perform inverse scrambling operation on the three color component matrices r(p,q), g(p,q) and b(p,q) of the encrypted image to restore the three color component matrices r * (p,q),g * (p,q) and b * (p,q);

[0135] Encrypted image component combination module: used to combine the three color component matrices R of the encrypted image during the encryption process ** (p,q),G ** (p,q) and B ** (p,q), generate encrypted image;

[0136] Decrypted image component combination module: used in the decryption process to restore the three color component matrices r of the original color image ** (p,q),g ** (p,q) and b ** (p,q) are recombined and decrypted to get the original color image.

[0137] It is worth noting that in the present invention, memristors are used to simulate synapses in neural networks. In neural networks, synapses are responsible for information storage and calculation, so they are indispensable. Memristors have memory characteristics similar to synapses and can simulate synapses well. According to the characteristics of memristors, the BAM memristor neural network model is particularly considered, the inertia term is introduced, and the inertial BAM memristor neural network is considered, so that the image encryption method of the BAM memristor neural network has a wider application background and the complexity of image encryption is further improved. In the present invention, an adaptive synchronous controller is considered, which can effectively reduce the control cost compared to the traditional feedback synchronous controller.

[0138] Embodiment 2:

[0139] This embodiment mainly includes two parts:

[0140] The first is to theoretically prove the effectiveness of the image encryption method and system based on the finite-time synchronization of the BAM memristor neural network proposed in Example 1.

[0141] The second is to verify the synchronization performance of the inertial BAM memristor neural network drive system and response system with uncertain parameters in Example 1 through numerical simulation methods.

[0142] (Neither the theoretical proof nor the simulation experiment is used to limit the present invention. In other embodiments, the simulation experiment may not be performed, and other experimental schemes may be used to perform experiments to verify the performance of the neural network system.)

[0143] 1. Theoretical Proof

[0144] The synchronization error between the driving system and the response system is defined as:

[0145]

[0146] The error system obtained from the driving system and the response system is as follows:

[0147]

[0148] in

[0149]

[0150] in

[0151] The following are the lemmas that will be used in the proof:

[0152] Lemma 1: For the synchronization error between the drive system and the response system, if there exists a positive definite continuous function V(t) that satisfies the inequality D +V(t)≤-β(V(t)), then the drive system and the response system achieve finite time synchronization, and the finite time T satisfies Furthermore, if β(V(t)) = FV ε (t), then the finite time T satisfies:

[0153]

[0154] Among them, for any χ>0, we have D + The symbol for finding the Dini derivative of a function; F>0, 0<ε<1;

[0155] Lemma 2: Let x 1 , x 2 , …, x n is a positive constant and 0<a≤1,b> 1, then

[0156]

[0157] Next, construct the Lyapunov functional:

[0158] V(t)=V 1 (t)+V 2 (t)

[0159]

[0160] Find the Dini derivative of a Lyapunov functional:

[0161]

[0162] D + V 1 (t) and D + V 2 (t) Through mathematical formulas and related lemmas, we can finally get:

[0163]

[0164] According to Lemma 2, we can conclude that:

[0165]

[0166]

[0167] Therefore, it can be deduced that:

[0168]

[0169] in and are all arbitrary normal numbers.

[0170] In addition, for any χ∈(0,+∞), we can get Thus, we can obtain a finite time upper bound

[0171] Therefore, according to Lemma 1 and Lemma 2, it can be seen that: under the action of the adaptive synchronization controller, the response system is synchronized with the drive system in a finite time, and the finite time

[0172] 2. Numerical Simulation

[0173] In this embodiment, the following inertial BAM memristor neural network system model with uncertain parameters is considered, and the driving system is:

[0174]

[0175] The corresponding response system is:

[0176]

[0177] The specific parameter settings are as follows: i = 1, 2; j = 1, 2; t ≥ 0; the activation function is set to f j (·) = g i (·)=tanh(·); discrete time lag α 1 =1;β 1 =1.2,α 2 =1.2,β 2 =1.3; Δa ji (t) = Δc ij (t) = 0.01cos(x), Δb ji (t) = Δd ij (t) = 0.01sin(x),

[0178] Initial value x 1 (s) = x 2 (s) = 0.8, y 1 (s) = y 2 (s) = 1, s 1 (s) = -1.2, s 2 (s) = 1.2, r 1 (s) = -0.8, r 2 (s) = 0.8, s∈[-2,0]; switching interval T i =1, According to the memristor connection weight, we can get:

[0179] According to the above parameter settings and inequalities, the parameter value ranges are: 1 ≥1.7,ω 2 ≥1.6, Select ω 1 =1.8,ω 2 =1.6, Other parameters and The value is 1, where i = 1, 2, j = 1, 2, we can get

[0180] The specific simulation experiment results are as follows: Figure 2 The synchronous error variation trajectory diagram without the synchronous controller in the present invention, where (a) is the synchronous error z without the synchronous controller i (t) and e i (t), i = 1, 2 change trajectory diagram, (b) is the synchronization error without the synchronization controller and Change trajectory diagram; Figure 3 is a state change trajectory diagram of the driving system and the response system under the action of the adaptive synchronous controller in the present invention, where (a) is x under the action of the adaptive synchronous controller 1 (t) and y 1 (t) and State change trajectory diagram, (b) is the x under the action of adaptive synchronization controller 2 (t) and y 2 (t) and Change trajectory diagram, (c) is the s under the action of adaptive synchronization controller 1 (t) and r 1 (t) and Change trajectory diagram, (d) is the s under the action of adaptive synchronization controller 2 (t) and r 2 (t) and Change trajectory diagram; Figure 4is a synchronous error variation trajectory diagram under the action of the adaptive synchronous controller in the present invention, wherein (a) is the synchronous error z under the action of the adaptive synchronous controller i (t) and e i (t), i = 1, 2 change trajectory diagram, (b) is the synchronization error under the action of the adaptive synchronization controller and Change trajectory diagram; Figure 5 This is a control gain change trajectory diagram under the action of the adaptive synchronous controller in the present invention, where (a) is the control gain under the action of the adaptive synchronous controller and Change trajectory diagram, (b) is the control gain under the action of adaptive synchronous controller and Change trajectory diagram. Figure 6 The image encryption effect is shown in the present invention, where (a) is the original color image, (b) is the encrypted image, and (c) is the decrypted image; Figure 6 The encryption effect is intuitively displayed. The encrypted image has no similarity with the original color image, achieving the purpose of image encryption.

[0181] Based on the fact that the response system in this embodiment is synchronized with the driving system for a limited time under the action of the adaptive synchronization controller, image encryption and decryption are realized, and the specific implementation steps are as follows:

[0182] Step S31: Read the original color image Figure 6 As shown in (a), an image matrix with a data size of 256×256×3 is obtained, and its three color component matrices R(p,q), G(p,q) and B(p,q) are extracted respectively. R(p,q) is the red component matrix, G(p,q) is the green component matrix, and B(p,q) is the blue component matrix, where p∈{1,2,…,256}, q∈{1,2,…,256}, and the value range of these components is between 0 and 255, representing the intensity values ​​of the red, green, and blue channels of each pixel in the color image;

[0183] Step S32: Based on the fact that the response system is synchronized with the drive system in a limited time under the action of the adaptive synchronization controller, according to the chaotic signal x 1 (t), y 1 (t) and y 2 (t), select three chaotic signal sequences z 1 (p,q),z 2 (p,q) and z 3 (p,q);

[0184] Step S33: The three chaotic signal sequences z obtained in step S32 are 1 (p,q),z 2 (p,q) and z 3 (p,q), after a specific transformation, three new signal sequences Z are obtained 1 (p,q),Z 2 (p,q) and Z 3 (p, q), the specific conversion formula used in step S33 is:

[0185] Z 1 (p,q)=mod(10000*(z 1 (p,q)-floor(z 1 (p,q))),256),

[0186] Z 2 (p,q)=mod(10000*(z 2 (p,q)-floor(z 2 (p,q))),256),

[0187] Z 3 (p,q)=mod(10000*(z 3 (p,q)-floor(z 3 (p,q))),256);

[0188] Step S34: The three new signal sequences Z obtained in step S33 are 1 (p,q),Z 2 (p,q) and Z 3 (p, q) is XORed with the corresponding position elements in the three color component matrices R(p, q), G(p, q) and B(p, q) of the original color image to obtain the image matrix R of the first pixel replacement * (p,q),G * (p,q) and B * (p,q);

[0189] Step S35: Arnold transformation is used to transform the three color component matrices R after substitution. * (p,q),G * (p,q) and B * (p, q) is scrambled to obtain the three color component matrices R after scrambling ** (p,q),G ** (p,q) and B ** (p, q), the Arnold transformation algorithm is: Where (X, Y) is the original position of the pixel, (X′, Y′) is the position of the pixel after scrambling, a=2, b=3;

[0190] Step S36: The three color component matrices R after scrambling in step S35 are ** (p,q),G ** (p,q) and B ** (p, q) are used as the three color component matrices of the encrypted image. These encrypted color component matrices are combined together to generate an encrypted image, such as Figure 6 (b)

[0191] The decryption process is the reverse process of the encryption process, specifically:

[0192] Step S37: reading the encrypted image, and extracting three color component matrices r(p,q), g(p,q) and b(p,q) of the encrypted image;

[0193] Step S38: Use Arnold inverse transform to perform inverse scrambling operation on the three color component matrices r(p,q), g(p,q) and b(p,q) of the encrypted image to restore the three color component matrices r * (p,q),g * (p,q) and b * (p, q), the Arnold inverse transform algorithm is: Where (X, Y) is the original position of the pixel, (X′, Y′) is the position of the pixel after scrambling, a=2, b=3;

[0194] Step S39: Based on the fact that the response system is synchronized with the drive system in a limited time under the action of the adaptive synchronization controller, according to the chaotic signal of the response system and Select the same as in step S32 1 (p,q),z 2 (p,q) and z 3 The chaotic signal sequence corresponding to (p,q) and

[0195] Step S310: The chaotic signal sequence obtained in step S39 and After a specific transformation, three new signal sequences are obtained. and The specific conversion formula used in step S310 is:

[0196]

[0197] Step S311: The three new signal sequences obtained in step S310 are and Respectively with the three color component matrices r restored in step S38 * (p,q),g * (p,q) and b * The corresponding position elements in (p, q) are XORed to restore the three color component matrices r of the original color image ** (p,q),g ** (p,q) and b ** (p,q);

[0198] Step S312: The three color component matrices r of the original color image restored in step S311 are ** (p,q),g ** (p,q) and b ** (p,q) are recombined and decrypted to get the original color image, such as Figure 6 (c) as shown.

[0199] Finally, it should be noted that the above description is only a preferred example of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art can still modify the technical solutions described in the aforementioned embodiments or replace some of the technical features therein by equivalents. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. An image encryption method based on BAM memristor neural network finite time synchronization, characterized in that: The following steps are involved: Step S1: construct an inertial BAM memristor neural network drive system and a response system with uncertain parameters; Step S1 specifically includes the following steps: Step S11: construct an inertial BAM memristor neural network drive system with uncertain parameters: Wherein, time t≥0; i=1,2,…,n; j=1,2,…,m; n≥2 and m≥2 are the number of neurons in the i-th layer and the j-th layer of the driving system respectively; x i (t) and y j (t) are the state variables of the neurons in the i-th and j-th layers of the driving system at time t, and They are state variables x i (t) and y j The second-order derivative of (t) is the inertia term of the drive system; and is a positive constant; τ(t) is a discrete time lag and satisfies 0≤τ(t)≤τ, where τ is a positive constant; Δa ji (t), Δb ji (t), Δc ij (t) and Δd ij (t) represents an uncertain parameter and satisfies in and is a positive constant; f j (·) and g i (·) represents an activation function, and each activation function satisfies the Lipschitz condition, that is, for any real number a and b, and |g i (a)-g i (b)|≤L i |ab|, where L i and is a positive number; at the same time, each activation function is bounded, satisfying and |g i (·)|≤F i , where F i and is a positive constant; a ji (x i (t))、b ji (x i (t))、c ij (y j (t)) and d ij (y j (t)) represents the memristor connection weight, and they satisfy: The switching interval of the memristor is T i >0, and are all constants, Introducing a replacement function α i and β j As a constant, replace the variables of the drive system and rewrite it into the following form: Step S12: constructing a response system corresponding to the driving system: in and Respectively represent the state variables of the neurons in the i-th layer and the j-th layer of the response system at time t; u i (t), v i (t) and An adaptive synchronous controller to be designed; and represents an uncertain parameter and satisfies in and is a positive constant; and represents the memristor connection weight, and they satisfy: The switching interval of the memristor is T i >0, and are all constants, The other performance indicators in the response system are the same as the performance indicators in the drive system; Step S2: according to the driving system and the response system established in step S1, a synchronization error is set and an adaptive synchronization controller is designed; Step S3: Based on the response system being synchronized with the driving system for a limited time under the action of the adaptive synchronization controller, image encryption and decryption are implemented. The specific implementation steps are as follows: The encryption process is as follows: Step S31: read the original color image, the image size is M×N×3, extract the red component matrix R(p,q), green component matrix G(p,q), and blue component matrix B(p,q) of the original color image, p∈{1,2,…,M}, q∈{1,2,…,N}, where R(p,q), G(p,q), and B(p,q) are all values ​​between 0,1,…,255; Step S32: After the drive system and the response system reach finite time synchronization, the chaotic signal x i (t) and y j (t), select three chaotic signal sequences z1(p,q), z2(p,q) and z3(p,q), p∈{1,2,…,M}, q∈{1,2,…,N}; Step S33: The three chaotic signal sequences z1(p,q), z2(p,q) and z3(p,q) obtained in step S32 are subjected to specific transformation to obtain three new signal sequences Z1(p,q), Z2(p,q) and Z3(p,q), p∈{1,2,…,M}, q∈{1,2,…,N}, wherein Z1(p,q), Z2(p,q) and Z3(p,q) are all values ​​in the range of 0,1,…,255, and the specific transformation formula used in step S33 is: Z1(p,q)=mod(10000*(z1(p,q)-floor(z1(p,q))),256), Z2(p,q)=mod(10000*(z2(p,q)-floor(z2(p,q))),256), Z3(p,q)=mod(10000*(z3(p,q)-floor(z3(p,q))),256); Step S34: XOR the three new signal sequences Z1(p,q), Z2(p,q) and Z3(p,q) obtained in step S33 with the corresponding position elements in the three color component matrices R(p,q), G(p,q) and B(p,q) of the original unencrypted color image to obtain the replaced three color component matrices R * (p,q),G * (p,q) and B * (p,q), p∈{1,2,…,M}, q∈{1,2,…,N}; Step S35: Arnold transformation is used to transform the three color component matrices R after substitution. * (p,q),G * (p,q) and B * (p, q) is scrambled to obtain the three color component matrices R after scrambling ** (p,q),G ** (p,q) and B ** (p, q), ip∈{1,2,…,M}, q∈{1,2,…,N}, the arnold transformation algorithm is: Where (X, Y) is the original position of the pixel, (X ′ ,Y ′ ) is the position of the pixel after scrambling, a and b are constants; Step S36: The three color component matrices R after scrambling in step S35 are ** (p,q),G ** (p,q) and B ** (p, q) are used as three color component matrices of the encrypted image, and the encrypted image color component matrices are combined to generate an encrypted image; The decryption process is the reverse process of the encryption process, specifically: Step S37: read the encrypted image, extract three color component matrices r(p,q), g(p,q) and b(p,q), p∈{1,2,…,M}, q∈{1,2,…,N}, where r(p,q), g(p,q) and b(p,q) are all values ​​between 0,1,…,255; Step S38: Use Arnold inverse transform to perform inverse scrambling operation on the three color component matrices r(p,q), g(p,q) and b(p,q) of the encrypted image to restore the three color component matrices r * (p,q),g * (p,q) and b * (p, q), p∈{1,2,…,M}, q∈{1,2,…,N}, the Arnold inverse transform algorithm is: Where (X, Y) is the original position of the pixel, (X ′ ,Y ′ ) is the position of the pixel after scrambling, a and b are constants; Step S39: After the driving system and the response system reach finite time synchronization, the chaotic signal of the response system is and Select the chaotic signal sequence corresponding to z1(p,q), z2(p,q) and z3(p,q) in step S32 and p∈{1,2,…,M}, q∈{1,2,…,N}; Step S310: The chaotic signal sequence obtained in step S39 and After a specific transformation, three new signal sequences can be obtained: and p∈{1,2,…,M},q∈{1,2,…,N},where and are all values ​​in the range of 0, 1, ..., 255. The specific conversion formula used in step S310 is: Step S311: The three new signal sequences obtained in step S310 are and Respectively with the three color component matrices r restored in step S38 * (p,q),g * (p,q) and b * The corresponding position elements in (p, q) are XORed to restore the three color component matrices r of the original color image ** (p,q),g ** (p,q) and b ** (p, q), ip∈{1,2,…,M}, q∈{1,2,…,N}; Step S312: The three color component matrices r of the original color image restored in step S311 are ** (p,q),g ** (p,q) and b ** (p,q) are recombined and decrypted to get the original color image.

2. The image encryption method based on BAM memristor neural network finite time synchronization according to claim 1 is characterized in that: Step S2 specifically includes the following steps: Step S21: According to the inertial BAM memristor neural network drive system and response system with uncertain parameters constructed in step S1, the synchronization error of the drive system and the response system is set to: Step S22: According to step S21, the synchronization error between the drive system and the response system is set, and the adaptive synchronization controller is designed as follows: in and Where i = 1, 2, ..., n, j = 1, 2, ..., m; sign(·) is the sign function; and is the adaptive synchronous controller gain; and are all arbitrary normal numbers; ω i , and are all constants and satisfy: The adaptive synchronization controller acts on the response system so that the response system is synchronized with the drive system for a limited time.

3. The image encryption method based on BAM memristor neural network finite time synchronization according to claim 2 is characterized in that: The response system is synchronized with the drive system for a limited time, and the range of the limited time is: in and are all arbitrary normal numbers, 4. An image encryption system based on BAM memristor neural network finite time synchronization applied to any of the methods described in claims 1-3, characterized in that: The image encryption system includes: Chaotic signal acquisition module: Based on the inertial BAM memristor neural network, a drive system and a response system are established, and the synchronization error is set, and an adaptive synchronization controller is designed to make the drive system and the response system synchronized in a finite time; after the drive system and the response system are synchronized in a finite time, the chaotic signal x of the drive system is obtained. i (t) and y j (t), select three chaotic signal sequences z1(p,q), z2(p,q) and z3(p,q), according to the chaotic signal of the response system and Select the chaotic signal sequences corresponding to z1(p,q), z2(p,q) and z3(p,q) and Chaotic signal processing module of driving system: used to transform the chaotic signal sequences z1(p,q), z2(p,q) and z3(p,q) into three new signal sequences Z1(p,q), Z2(p,q) and Z3(p,q) after specific transformation; Response system chaotic signal processing module: used to transform chaotic signal sequence and After a specific transformation, three new signal sequences can be obtained: and Among them, Z1(p,q), Z2(p,q), Z3(p,q), and All are values ​​between 0, 1, ..., 255; Original color image component reading module: used to read the original color image during the encryption process, and extract the red component matrix R(p,q), green component matrix G(p,q), and blue component matrix B(p,q) of the original color image; Encrypted image component reading module: used to read the encrypted image and extract the three color component matrices r(p,q), g(p,q) and b(p,q) of the encrypted image during the decryption process; Encryption replacement operation module: used for performing XOR operation on the three new signal sequences Z1(p,q), Z2(p,q) and Z3(p,q) obtained in step S33 and the corresponding position elements in the three color component matrices R(p,q), G(p,q) and B(p,q) of the original color image respectively during the encryption process; Decryption permutation operation module: used to replace the three new signal sequences obtained in step S310 during the decryption process and Respectively with the three color component matrices r restored in step S38 * (p,q),g * (p,q) and b * Perform XOR operation on the corresponding position elements in (p,q); Scrambling operation module: used in the encryption process, using Arnold transformation to permute the three color component matrices R * (p,q),G * (p,q) and B * (p, q) is scrambled to obtain the three color component matrices R after scrambling ** (p,q),G ** (p,q) and B ** (p,q); Inverse scrambling operation module: used in the decryption process, using Arnold inverse transformation to perform inverse scrambling operation on the three color component matrices r(p,q), g(p,q) and b(p,q) of the encrypted image to restore the three color component matrices r * (p,q),g * (p,q) and b * (p,q); Encrypted image component combination module: used to combine the three color component matrices R of the encrypted image during the encryption process ** (p,q),G ** (p,q) and B ** (p,q), generate encrypted image; Decrypted image component combination module: used in the decryption process to restore the three color component matrices r of the original color image ** (p,q),g ** (p,q) and b ** (p,q) are recombined and decrypted to get the original color image.

Citation Information

Patent Citations

  • Image encryption method and system based on inertial memristor neural network anti-synchronization

    CN116847033A

  • Synchronization control method based on memristor neural network and method thereof in image encryption

    CN117131909A