Data encryption method and device, equipment and medium
By real-time monitoring of the state vector of chaotic neural network and dynamically adjusting the weight matrix to generate keys, the problem of key update lag in the existing technology is solved, the security and real-time nature of image encryption are improved, and it is suitable for highly sensitive scenarios such as financial technology and medical health.
Patent Information
- Application Number
- CN202510684075.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-26
- Publication Date
- 2025-07-04
Smart Images

Figure CN120263411A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data security, and particularly to a data encryption method, apparatus, device, and storage medium. Background Art
[0002] With the continuous deepening of the application of images in various highly sensitive scenarios, existing image encryption technologies face many bottlenecks. Traditional symmetric encryption algorithms widely rely on static key mechanisms and are difficult to resist the systematic risks brought by key leakage or quantum computing attacks. Some studies introduce chaotic systems to generate key streams to improve unpredictability, but such methods mostly rely on external perturbation sources or fixed initial parameters, and there are problems such as uncontrollable entropy sources and difficulty in continuously maintaining the perturbation intensity. On the other hand, although some neural network models have the ability to process time-varying data, they still need to rely on external entropy extraction or parameter injection in actual image encryption applications, resulting in increased overall system complexity and encryption delay, and it is difficult to meet the high-concurrency and strong real-time image processing requirements.
[0003] In the field of fintech business, images are widely used for identity recognition, risk control, and the generation and verification of transaction vouchers. Sensitive information such as facial recognition images, electronic signature images, and image-based transaction documents has become the focus of attackers. Current image encryption systems mostly adopt fixed key mechanisms and lack dynamic response capabilities, and security windows are extremely likely to appear in high-frequency trading and real-time risk control environments. Once the key is leaked or predicted, it may lead to the destruction of batch user information or the illegal transfer of funds, causing serious economic consequences.
[0004] In the field of medical and health business, medical imaging data has become the mainstream of data in telemedicine, clinical diagnosis, and multi-center case analysis. High-resolution CT, MRI, or ultrasound images not only have high sensitivity but also have the characteristics of continuous acquisition and high-frequency transfer. Traditional encryption methods are difficult to balance real-time performance and stability. On the one hand, although chaotic encryption methods have a certain degree of randomness, they often rely on fixed perturbation initial values or external noise and are difficult to achieve dynamic entropy control; on the other hand, some neural network encryption schemes still need to call external entropy sources to execute key generation, resulting in significant response delays and being unable to support real-time encryption requirements under continuous image streams. Summary of the Invention
[0005] The main objective of the present invention is to provide a data encryption method, apparatus, device, and storage medium, aiming to solve the technical problem in the prior art that key generation depends on static rules or low-frequency update mechanisms and cannot respond to changes in the chaotic state of the system in real time, resulting in lagging key updates and weak anti-attack capabilities.
[0006] To achieve the above objective, the present invention provides a data encryption method, including:
[0007] Obtain a real-time state vector representing the operating state of a chaotic neural network processing unit;
[0008] Monitor the chaotic characteristics of the real-time state vector to generate a chaos intensity index;
[0009] Compare the chaos intensity index with a preset chaos threshold. When the chaos intensity index is greater than the preset chaos threshold, generate a raw key based on the real-time state vector;
[0010] Adjust the weight matrix of the chaotic neural network processing unit according to the chaos intensity index;
[0011] Perform cryptographic processing on the raw key to generate a final key;
[0012] Encrypt the target data with the final key to generate target encrypted data.
[0013] Furthermore, to achieve the above object, the present invention provides a data encryption device, including:
[0014] A state acquisition module for obtaining a real-time state vector representing the operating state of a chaotic neural network processing unit;
[0015] A chaos detection module for monitoring the chaotic characteristics of the real-time state vector to generate a chaos intensity index;
[0016] A key generation module for comparing the chaos intensity index with a preset chaos threshold. When the chaos intensity index is greater than the preset chaos threshold, generating a raw key based on the real-time state vector;
[0017] A weight perturbation module for adjusting the weight matrix of the chaotic neural network processing unit according to the chaos intensity index;
[0018] A key strengthening module for performing cryptographic processing on the raw key to generate a final key;
[0019] A data encryption module for encrypting the target data with the final key to generate target encrypted data.
[0020] Furthermore, to achieve the above object, the present invention also provides a computer device. The computer device includes a memory, a processor, and a data encryption program stored in the memory and executable on the processor. When the data encryption program is executed by the processor, the steps of the data encryption method as described above are implemented.
[0021] Furthermore, to achieve the above object, the present invention also provides a computer-readable storage medium, on which a data encryption program is stored. When the data encryption program is executed by a processor, the steps of the data encryption method described above are implemented.
[0022] Beneficial effects: The present invention relates to the field of data security technology and can be applied to business scenarios such as fintech and healthcare. It discloses a data encryption method, device, equipment and medium, including: obtaining a real-time state vector representing the operating state of a chaotic neural network processing unit, monitoring the chaotic characteristics of the real-time state vector to generate a chaos intensity index, comparing the chaos intensity index with a preset chaos threshold, generating an original key based on the real-time state vector when the key update condition is met, dynamically adjusting the weight matrix of the chaotic neural network processing unit according to the chaos intensity index, performing cryptographic processing on the original key to generate a final key, and using the final key to perform encryption processing on the target data to generate target encrypted data. By using the internal state of the chaotic neural network as the basis for generating dynamic keys and completing the linkage of key update and weight perturbation based on real-time monitoring of the system chaos intensity, the present invention eliminates the dependence on external entropy sources and fixed parameters, realizes the adaptive adjustment and high-frequency update of keys, and improves the security and real-time performance of the data encryption process. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] The present invention will be further described below in conjunction with the drawings and embodiments. In the drawings:
[0024] Figure 1 is a schematic diagram of an application environment of the data encryption method in an embodiment of the present invention;
[0025] Figure 2 is a schematic flowchart of an embodiment of the data encryption method of the present invention;
[0026] Figure 3 is a schematic diagram of the functional modules of a preferred embodiment of the data encryption device of the present invention;
[0027] Figure 4 is a schematic diagram of the structure of a computer device in an embodiment of the present invention;
[0028] Figure 5 is another schematic diagram of the structure of a computer device in an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0029] It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0030] The data encryption method provided by the embodiments of the present invention can be applied in, for example Figure 1In the application environment, the client communicates with the server through the network. The server can obtain the real-time state vector representing the operating state of the chaotic neural network processing unit through the client, monitor the chaotic characteristics of the real-time state vector to generate a chaos intensity index, compare the chaos intensity index with a preset chaos threshold, generate an original key based on the real-time state vector when the key update condition is met, dynamically adjust the weight matrix of the chaotic neural network processing unit according to the chaos intensity index, perform cryptographic processing on the original key to generate a final key, and use the final key to perform encryption processing on the target data to generate target encrypted data. By using the internal state of the chaotic neural network as the basis for dynamic key generation and completing the linkage of key update and weight perturbation based on real-time monitoring of the system chaos intensity, the present invention eliminates the dependence on external entropy sources and fixed parameters, realizes the adaptive adjustment and high-frequency update of the key, and improves the security and real-time performance of the data encryption process. Among them, the client can be, but is not limited to, various personal computers, laptop computers, smart phones, tablet computers, and portable wearable devices. The server can be implemented by an independent server or a server cluster composed of multiple servers. The present invention will be described in detail through specific embodiments below.
[0031] Please refer to Figure 2 , Figure 2 which is a schematic flowchart of an embodiment of the data encryption method provided by the present invention. It should be noted that although the logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than here.
[0032] As Figure 2 shown, the data encryption method proposed by the present invention includes the following steps:
[0033] S10, obtaining a real-time state vector representing the operating state of the chaotic neural network processing unit;
[0034] In this embodiment, a real-time state vector representing the operating state of the chaotic neural network processing unit is obtained. Essentially, it is to extract in real time from the dynamic evolution behavior of the network a high-dimensional data structure reflecting its internal operating state, which is used as the basis for key generation or the basis for state regulation in the subsequent encryption process. Before the chaotic neural network processing unit enters the operating state, an initialization process needs to be executed. This process not only includes the loading of the network structure and initial parameters, but also needs to start its internal evolution mechanism with chaotic characteristics. This mechanism is usually completed by introducing a perturbation path. For example, a non-linear perturbation factor is embedded in the recurrence relation of the network, so that the network state shows a certain degree of sensitivity and complexity while maintaining stable error convergence. The perturbation mechanism can adopt a recurrence control function based on non-linear mapping, such as the Logistic mapping, the Tent mapping, or a parameter function with bifurcation behavior, and jointly control the diversity and uncertainty of the network evolution path by adjusting the perturbation intensity and feedback weight.
[0035] After the initialization is completed, the network will enter the continuous operating state. In this state, it is necessary to capture the state output of the network in real time through the acquisition module. The acquisition module can be designed to periodically scan the activation values of the network output nodes, or can be sampled by an event trigger method when the input or weight update changes. In actual implementation, the acquisition target is not limited to the final output layer of the network, but can also be located in the intermediate hidden layer. In particular, those intermediate states that are greatly affected by non-linear transformations can often better reflect the overall dynamic response of the network. The collected data is generally a set of numerical sequences that change over time, and should be organized into a time series signal in a unified format after collection for subsequent reconstruction operations.
[0036] The collected output signal needs to be further subjected to state space reconstruction, so as to convert the one-dimensional time series into a multi-dimensional vector form and reconstruct the phase space trajectory of the network. This operation usually adopts the delay embedding technique, and organizes the data at consecutive time points into vectors by setting the embedding dimension and time delay. For example, if the embedding dimension is set to d and the delay is τ, then each vector is composed of the numerical values of the signal at times t, t + τ, t + 2τ... t+(d - 1)τ, constructing a d-dimensional state trajectory. This operation can retain the historical information and local change structure of the signal, and avoid the insufficient expression ability caused by directly using the original sequence.
[0037] To ensure the reliability and representativeness of the generated state vectors, it is also necessary to conduct validity detection on them. Validity detection can be achieved through methods such as variance detection within a sliding window, threshold filtering based on the dynamic range, or structural consistency checking. In an actual system, there may be a phenomenon of state freezing caused by short-term network convergence or perturbation failure. Once such state vectors are used for subsequent processing, it will significantly reduce the system security. Therefore, they must be identified and excluded in advance. The vectors after screening can be regarded as the effective real-time state vectors at the current moment and used as the input for subsequent processing modules.
[0038] The continuous operation of the network can be realized by embedding the nullifying neural network structure into a time-driven input stream control module. The input stream can be a random excitation signal, the feature encoding of real-time image data, or generated by the internal feedback of the system. At initialization, load the weight matrix and perturbation structure, set the initial parameter range of the non-linear perturbation channel. For example, the perturbation intensity range is set in the dynamic interval, and the frequency of perturbation iteration is set through the time controller. The acquisition module can be designed as a structure that works asynchronously with the GPU computation graph, using a shared memory structure to read the current state vector to avoid blocking the computation flow. In the state space reconstruction stage, the reconstruction parameters can be dynamically loaded from an external configuration file and automatically optimized according to the actual sampling frequency to enhance the expression ability of the reconstructed trajectory. In the processing of abnormal state points, a local mean model can be configured to backfill the mutation points, or a filter can be used to suppress the vectors with abnormal fluctuation ranges, and finally output a real-time state vector with stable structure and dynamic response characteristics.
[0039] Example illustration: In the field of medical and health services, continuous frame data such as CT images and MRI images often need to be encrypted before uploading in a medical imaging system. The system continuously operates through the nullifying neural network processing unit at the image receiving end, and uses the embedded features of the image frame sequence as the dynamic input to drive the evolution of the network. When processing each frame of the image, the current output state is obtained from the neural network in real time, the state sequence is extracted through the data acquisition module, and a state space reconstruction operation is performed to form the high-dimensional state vector corresponding to the current frame. This state vector reflects the response state of the neural network under the current image input in real time and has a high degree of image correlation. Using this state vector as the basis for subsequent key generation not only realizes the generation of image-sensitive keys but also breaks the static key structure in the encryption process, improving the difference and security of each frame of image encryption.
[0040] In the field of fintech business, in the face of the frequently triggered data encryption requirements in high-frequency trading scenarios, each trading behavior of users can be converted into a perturbation input to drive the zeroing neural network processing unit to operate in a high-frequency state. Whenever a new trading action occurs, the system will collect the state response sequence of the network through the output monitoring interface, perform embedding processing on these outputs to construct a multi-dimensional state vector, and ensure that the state vector reflects the effective state changes in the current trading context through anomaly screening. This vector is used in the subsequent key path to dynamically generate data encryption parameters corresponding to the transaction, realizing transaction-level state-driven key switching, thereby avoiding the risk of key leakage caused by repeated use of fixed keys. The dynamic nature of the state vector and the network's endogenous perturbation mechanism jointly form the real-time adaptive ability of the encryption system, which is particularly suitable for the execution of microsecond-level encryption strategies in high-fund-sensitivity environments.
[0041] In this embodiment, by constructing a stable mapping path from the running state of the chaotic neural network to the high-dimensional state vector, the internal dynamic changes of the network can be continuously extracted and utilized in a structured form, without relying on external entropy sources or external state monitoring modules, forming the ability to extract encryption-driven information from the network itself, and improving the response sensitivity of the overall system to input fluctuations and the endogenous adaptability of key regulation.
[0042] S20, monitor the chaotic characteristics of the real-time state vector and generate a chaos intensity index;
[0043] In this embodiment, monitoring the chaotic characteristics of the real-time state vector and generating a chaos intensity index is a key feedback link in the dynamic encryption process. Its essence lies in quantifying the degree of non-linear complexity and chaos exhibited by the current system operating state, so as to provide a dynamic basis for subsequent key generation condition judgment and neural network weight regulation. This process first constructs a time window sequence for dynamic characteristic analysis based on the obtained set of real-time state vectors. This window contains consecutive historical state vector samples and is used to capture the evolution trend and trajectory change characteristics of the system in the short term.
[0044] Within this time window, perform the estimation operation of the Jacobian matrix on each real-time state vector. The Jacobian matrix represents the local partial derivative distribution of the multi-dimensional state of the system in different dimensions and reflects the response sensitivity of the current system to perturbations in the state space. By calculating the linear change rate between adjacent vectors in each dimension, an approximate local linear description can be constructed under model-free conditions. On this basis, extract the principal Lyapunov vector of the Jacobian matrix, which represents the perturbation expansion trend in the most unstable direction in the current dynamic system and can capture the exponential divergence characteristics in state evolution.
[0045] Performing the vector-matrix multiplication of the principal Lyapunov vector and its corresponding Jacobian matrix can obtain the local orbit divergence trend sequence at each time point. Integrating and averaging all the results within the entire time window range, the approximate value of the Kolmogorov-Sinai entropy can be estimated. As a quantization index of the chaos intensity, the larger the value of the KS entropy, the higher the orbit complexity and information generation rate of the system during that period. The finally generated chaos intensity index is the normalized result of this approximate KS entropy value, serving as the dynamic driving signal for subsequent key update determination.
[0046] The entire operation process needs to maintain continuity, local linear estimability, and convergence trend stability during the evolution of the state vector to ensure that the chaos intensity index has good dynamic response and stable numerical trend. This index not only reflects the current chaos activity of the system but also has significant discrimination ability for abnormal states, over-stability, or state degradation, and can serve as an important quantitative basis for driving key switching and perturbation regulation.
[0047] A time-sliding window with a fixed length can be selected. Stack the continuously acquired state vectors in chronological order to form an orbit matrix, and use the finite difference or numerical differentiation method to approximately construct the Jacobian estimation of each vector. For high-dimensional state vectors, the singular value decomposition method can be used to extract the main change directions as approximate principal Lyapunov vectors, thereby reducing the computational dimension. The estimation of the local KS entropy value can be based on the weighted average of the absolute values of the principal Lyapunov exponents for each frame, and an exponentially decaying window is used to accelerate the online update. The final chaos intensity index is compressed into a stable index space through normalization for easy direct docking with the threshold comparison module.
[0048] In the scenario of edge devices with limited system resources, alternative metrics such as sample entropy, approximate entropy, or incremental self-information can also be used to calculate entropy-like estimation methods with lower computational complexity as approximations to achieve simplified model deployment and reduced operating load.
[0049] Example illustration: In the medical and health business scenario, in the face of continuously acquired ultrasound image frames or electrocardiogram dynamic sequences, a state vector will be generated for each frame of image or each sampling period. The system monitors the chaos change degree of these state vectors and calculates the chaos intensity index in real time. When the patient's state mutates or the image signal changes violently, the chaos intensity rises significantly, and the system immediately responds to switch the key path to achieve high-intensity protection for abnormal image segments and prevent attackers from using the data distribution law for decryption deduction.
[0050] In the fintech business scenario, each transaction event triggers dynamic updates of the neural network state, and the volatility of the state sequence increases during the transaction-intensive period. The system dynamically determines whether the network is currently in a high-risk or low-risk state by monitoring the chaos intensity index in the state sequence, and decides whether to trigger a new key generation logic accordingly. This mechanism enables the system to adjust the encryption complexity according to the actual business intensity, achieving a dynamic balance between resource allocation and security level.
[0051] In this embodiment, by performing local sensitivity estimation and entropy value quantization on the orbit change trend in the real-time state vector, an index signal reflecting the current chaos degree of the neural network operation can be obtained in real time. This index has the characteristics of adjustable precision and a closed-loop calculation path, and can dynamically drive key update judgment and network perturbation adjustment, enabling the encryption system to have the ability of endogenous state perception and real-time security adjustment, and fundamentally improving the response sensitivity of the dynamic key mechanism and the unpredictability of the encryption path.
[0052] S30. Compare the chaos intensity index with a preset chaos threshold. When the chaos intensity index is greater than the preset chaos threshold, generate an original key based on the real-time state vector.
[0053] In this embodiment, the operation of comparing the chaos intensity index with the preset chaos threshold belongs to the determination stage in the dynamic key control mechanism. Its purpose is to perform a threshold judgment on the non-linear complexity of the current neural network state, so as to decide whether to update the key path. The chaos intensity index, as a numerical quantity obtained from the previous stage of analysis, reflects the running chaos degree of the system. This index is usually the normalized Kolmogorov-Sinai entropy or its approximate estimated value. During the operation, the system needs to continuously compare with a set of statically set chaos thresholds. This chaos threshold is used to define the active area of the chaos characteristics, and its numerical design principle is to be between the stable operation interval and the over-perturbation interval of the system, with the two-way fault tolerance ability for judgment reference.
[0054] The core logic of the judgment condition is that when the chaos intensity index exceeds the preset chaos threshold, it indicates that the current neural network state is in a high-dynamic complexity area, with sufficient entropy input and sensitivity diffusion ability. Therefore, the generated key at this time is more unpredictable and aperiodic, and the system will enter the key update process. The input of this process is the real-time state vector collected and reconstructed at the current moment, which structurally reflects the response result of the neural network in the high-chaos state, and has high state resolution and data redundancy suppression ability.
[0055] To construct the original key from the state vector, three stages of transformation operations need to be performed on it: dimensionality compression, non-linear mapping, and perturbation convergence. First, the high-dimensional state vector is mapped to a predefined low-dimensional space through a projection matrix. The structure of the projection matrix can be a fixed construction matrix, such as an orthogonal projection matrix, a random Gaussian matrix, or an SVD-reduced subspace basis set. The purpose of dimensionality reduction is to compress the redundant information in the state representation while enhancing the separability between the input space and the key structure. Next, a non-linear activation function, such as the hyperbolic tangent function, the sigmoid function, or the ReLU family of functions, is applied to the mapping result to improve the non-linear distribution of the output, making the key distribution highly non-uniform in the value space and enhancing the cracking complexity. Finally, a modulo operation is performed on the non-linearly mapped vector to truncate the continuous real number space and map it to a discrete integer key space, ensuring that the key meets the requirements of the encryption protocol format. The result is the original key.
[0056] The original key will be further processed to generate the final key in the future. However, it originates from the state evolution trajectory of the network itself, forming an internal closed-loop channel from the network dynamic state to the encryption core parameters, avoiding dependence on external entropy sources or random number generators.
[0057] The comparison logic between the chaos intensity index and the chaos threshold can be constructed as an asynchronous trigger condition module and configured to record only the peak state when the high-frequency chaos index is updated. The threshold can be adaptively adjusted through historical statistical learning or based on network training data and solidified as an embedded parameter of the controller. When the comparison module detects that the chaos intensity index exceeds the threshold, it triggers the state vector mapping module to perform the key construction operation. The projection matrix can be selected in the form of a sparse matrix with a matching dimension to improve the mapping efficiency and reduce the computational complexity. In the activation function stage, different mapping forms can be dynamically selected according to the output distribution, and clipping or normalization processing is performed on the activation results that exceed the stable range. In the modulo operation stage, a fixed prime modulus can be used to ensure the uniformity of the key space and reduce the repetition probability.
[0058] If the network is running in an input scenario with non-stable noise or high-frequency perturbations, a sliding window can also be designed to perform a weighted average judgment on the chaos indices of several consecutive moments to avoid frequent false triggering of key updates. On some edge computing platforms, a vector threshold trigger lookup table can be used to achieve a fast comparison process, and the projection and activation functions can be hardware-accelerated in combination with FPGA logic.
[0059] Example illustration: In the medical and health business scenario, after the continuously acquired electrocardiogram waveform signals are input into the chaotic neural network processing unit, the state vectors extracted by the system reflect the subtle changes in the patient's physiological state. When the chaos intensity increases to reach the set threshold, for example, during the patient's movement or abnormal fluctuations, the system automatically generates a new original key through the current state vector to encrypt the medical data during this period, enhancing the encryption intensity of the data in the highly sensitive pathological stage.
[0060] In the fintech business scenario, when a user completes a high-risk transaction behavior (such as large-scale transfer, cross-border payment), the system will detect abnormal fluctuations in the neural network state vector, resulting in an increase in the chaos intensity index. When it exceeds the preset threshold, the system immediately generates a brand-new original key using the current state vector and applies this key in the transaction data encryption process, effectively enhancing the confidentiality and anti-tampering ability during the critical transaction process.
[0061] In this embodiment, by dynamically generating the original key based on the real-time state vector when the chaos intensity index exceeds the threshold, the system can perform key update operations in a highly complex state, achieving the synchronous coupling of the key structure and the dynamic behavior of the network, effectively enhancing the unpredictability of the key generation path, reducing the risk of the fixed key structure being cracked, and at the same time enhancing the system's security protection ability in a highly dynamic scenario.
[0062] S40, adjust the weight matrix of the chaotic neural network processing unit according to the chaos intensity index;
[0063] In this embodiment, adjusting the weight matrix of the chaotic neural network processing unit according to the chaos intensity index aims to construct a self-regulating mechanism based on the internal chaos feedback of the system, enabling the neural network to maintain its desired chaos level during operation, and then continuously outputting states with high entropy and high dynamic complexity to support key generation and structural perturbation. This mechanism constructs a closed-loop feedback channel of input-state-encryption control by introducing a perturbation control path and feeding back the chaos intensity index to the network weight update process.
[0064] The chaos intensity index is usually represented as a numerical scalar, reflecting the orbital complexity of the current network state vector. When this index deviates from the target chaos region, for example, a significant decrease indicates that the system enters a convergence trend or a stable orbit, and the system needs to reactivate the internal nonlinear volatility of the network through perturbation operations. In this context, first, a gain regulation factor needs to be generated according to the difference between the chaos intensity index and the preset chaos threshold, and this factor is used to control the perturbation intensity. The gain factor can normalize the difference through compression functions such as Sigmoid and Tanh, retaining both its directionality (positive or negative) and avoiding excessive perturbation that may cause system instability.
[0065] On the basis of generating the gain factor, a set of dynamic perturbation matrices need to be constructed. This perturbation matrix should not be a static constant, but is generated by a parameter - controllable non - linear function. The most commonly used is the Logistic mapping, that is, a set of perturbation weights that vary with the bifurcation parameter are generated through iteration. The bifurcation parameter is not fixed, but is controlled by the current chaos intensity index, that is, when the system tends to be stable, the bifurcation intensity of the mapping function is increased to output a high - fluctuation perturbation matrix.
[0066] Subsequently, an element - by - element multiplication operation is performed between the perturbation matrix and the current weight matrix to form a perturbed weight matrix. This multiplication operation essentially introduces non - linear perturbations to the original connection weight structure, changes its input - output response characteristics, and improves the dynamic responsiveness of the neural network without changing the main structure topology. Then, the perturbed weight matrix is weighted and fused with the current weight matrix in proportion to generate an updated weight matrix through weighted superposition. The fusion coefficient is controlled by the aforementioned gain factor to achieve adjustable perturbation amplitude.
[0067] Finally, the updated weight matrix will be re - loaded into the neural network structure to replace the original weight matrix. The network state will continue to evolve based on the new connection structure in the next round of operation, thus continuously maintaining the characteristics of non - determinism and instability in key generation, ensuring the non - repeatability and anti - predictability of the entire key path in the time dimension.
[0068] The chaos intensity target interval can be set, and the gain factor is calculated according to the offset distance between the current chaos intensity and the center value of this interval. This factor is used to adjust the value of the bifurcation parameter μ in the Logistic mapping, making it dynamically located outside the chaotic critical region to ensure that the perturbation matrix shows a non - linear response. The generation of the perturbation matrix adopts a parallel computing structure, and each mapping node uses different initial value inputs to construct the richness of the matrix space while avoiding periodic repetition. The matrix dimension is exactly the same as the current network weight dimension to achieve element - by - element perturbation.
[0069] After the element - by - element multiplication operation, a clipping operation can be added to avoid generating extreme values beyond the representable range of the system. For example, upper and lower threshold values are set for the positive and negative value ranges in the weight matrix, and the over - limit part is compressed and regressed or truncated. The fusion operation is achieved through weighted averaging, maintaining dominance over the original matrix, and the contribution of the perturbation matrix is directly controlled by the gain factor. Write to the network structure immediately after the update is completed to avoid state drift caused by the asynchronous process.
[0070] During training, a learning rate adjustment channel can also be set for this perturbation path, automatically reducing the perturbation amplitude in the high - chaos index frequency band and enhancing the perturbation response speed in the low - index interval to achieve fine control of the perturbation process.
[0071] Example illustration: In the field of healthcare, when a neural network processes a sequence of real-time ultrasound images, if the image changes are small and the state trajectory falls into a stable region, the system detects a decrease in the chaos intensity index, automatically increases the perturbation gain, and adjusts the network weight matrix structure to force the network output state to spread to a higher entropy region, thereby restoring dynamic complexity during the state vector generation stage and preventing the encryption key from falling into periodic repetition.
[0072] In fintech operations, when a user submits similar transaction requests multiple times within a short period, the range of change in the state vector in the system shrinks, and the chaos index continuously remains below the threshold. At this time, the network weight matrix is automatically perturbed and reconstructed to redefine the state evolution path, ensuring that the next transaction encryption key does not repeat the previous one and preventing attackers from using the predictability of user behavior for key inversion.
[0073] In this embodiment, by feeding back the chaos intensity index for self-regulating update of the neural network weight matrix, not only an endogenous coupling mechanism between the chaotic state and structural perturbation is formed, but also the key-driven link can automatically adapt to system state changes, maintain dynamic nonlinear complexity, enhance the irreversibility and temporal stability of the key generation path, and reduce the encryption risk caused by convergence or low dynamic states.
[0074] S50, perform cryptographic processing on the original key to generate a final key;
[0075] In this embodiment, performing cryptographic processing on the original key to generate a final key is the core conversion step in the encryption process to ensure the compliance, anti-collision, and anti-inversion capabilities of the key. The original key generated in the previous steps is often constructed from the neural network state vector through low-dimensional mapping and modulo operations, with high dynamicity and non-linear distribution, but may have problems such as inconsistent length, non-standard format, local partial order, or statistical offset. Therefore, further structural specification and strength enhancement are required through a cryptographic processing module.
[0076] The first stage of cryptographic processing is hash function processing. The original key is input into the hash function module for irreversible mapping. The hash function is used to compress an input of any length into a fixed-length output and ensure that small input differences result in significant output differences, forming an avalanche effect. Secure hash algorithm families such as SHA-3, BLAKE2, SM3, etc. can be used. The selected algorithm should meet cryptographic standards such as collision resistance, preimage resistance, and second preimage resistance. During the hashing process, the original key can be concatenated with internal state factors (such as timestamps, session numbers) to improve the unpredictability of the hash seed space.
[0077] After the hash output result is compressed to a unified length, it still needs to be truncated and standardized. Since the output lengths of different hash algorithms are different (for example, SHA-3 can be 224 bits, 256 bits, 384 bits, etc.), in order to adapt to the key length requirements of different encryption algorithms, such as 128 bits, 192 bits, 256 bits, etc., a length alignment strategy needs to be executed on the hash result. The alignment method can be based on taking a fixed-length byte segment from the front, middle, or tail, or the distribution optimization can be achieved by dynamically selecting a bit offset window method, so as to generate a standard-length key.
[0078] Finally, input this standard-length key into the key expansion module to generate the final key. The key expansion module refers to applying structure-level enhancement operations to the standard-length seed key to adapt to the requirements of round keys, XOR structures, key scheduling, etc. in actual symmetric encryption algorithms. The expansion method can be based on predefined key scheduling functions, round function structures, or matrix transformation logics (such as the round key expansion in AES or the linear transformation structure in SM4), ensuring that the final key has high diffusivity, low repetition rate, and independence among multiple bits.
[0079] After the final key is generated, it is used as the master key for the encryption execution path in the data block encryption operation. Its generation path is not only related to the dynamic state of the neural network but also undergoes standard cryptographic enhancement processing to achieve a complete link closed-loop from state-driven to structure specification.
[0080] The original key can be converted into a fixed-length bit string and input into the SHA-3 hash module. Set the output length to 256 bits. The system-built session identifier is used as a perturbation factor and concatenated with the original key to form a seed string, which is then sent into the hash core. After the hash is completed, the result is truncated by the first 128 bits as the standard-length key. If the target encryption algorithm requires a longer key, then the hash result is concatenated and reorganized in multiple segments, or a secondary hash nesting is performed to generate more bits. Subsequently, the truncated key is input into the key expansion module, and a round expansion algorithm similar to AES is used to generate multiple sub-keys, or a linear transformation matrix distribution strategy is adopted to construct a key table structure for segmented data encryption.
[0081] In lightweight encryption scenarios, such as edge nodes or sensor terminals, a hash function with a simpler structure but still with security guarantees (such as BLAKE2s) can also be selected, and the consistency and anti-tampering ability of the key structure are enhanced through CRC checks or HMAC mechanisms. The key expansion module can achieve round expansion through table look-up on the embedded platform to reduce the real-time running calculation amount.
[0082] Example illustration: In the healthcare scenario, a brainwave image uploaded by a user generates an original key through a pre - sequence network. This key is processed by a hash module and converted into a standardized key, and then the final key for encrypting image data blocks is generated through key expansion. Even if an attacker captures the intermediate state vector of the network, they cannot reverse - deduce the final key from the original key, ensuring the isolation and anti - tampering of patient privacy during encrypted transmission and cloud storage.
[0083] In the fintech scenario, the network state triggered during a cross - border transaction by a user is used to generate an original key. The system automatically performs hash compression, length matching, and round - key expansion, and the final key directly participates in the encryption process of payment information. Due to the high irreversibility of the hash path and expansion algorithm, even if an attacker obtains multiple transaction states, they cannot restore the encryption path, realizing the non - reuse of account keys and a dynamic anti - leakage mechanism.
[0084] In this embodiment, by performing cryptographic hash mapping, structure standardization, and key expansion operations on the original key, the final key has a fixed length, strong irreversibility, low collision probability, and high diffusion, effectively preventing the original key from being reverse - deduced to the state vector, thus establishing a dual - security structure dominated by the neural network state and strengthened by cryptographic algorithms, improving the overall anti - attack ability and cross - protocol compatibility of the key system.
[0085] S60, encrypt the target data with the final key to generate target encrypted data.
[0086] In this embodiment, encrypting the target data with the final key to generate target encrypted data, its core task is to apply the dynamically generated and standardized - expanded final key in the previous step to the segmented encryption of the original data block, thus ensuring the confidentiality and integrity of the data. This operation link depends on the matching relationship between the key - length structure and the encryption algorithm, and at the same time requires pre - processing of the data content to make it meet the input specifications of the encryption module.
[0087] The target data first needs to be segmented into a group of plain - text data blocks of a fixed length. This segmentation operation is not only related to the block size supported by the encryption algorithm (for example, AES supports 128 - bit data blocks), but also needs to consider the data type (such as images, texts, transaction instructions) and the consistency of the data - packet boundary. During the segmentation process, if the total length of the original data cannot be evenly divided by the block length, then a padding operation needs to be performed on the last data block. The padding strategy can be based on rules such as PKCS#7, ISO / IEC 7816 - 4, ANSIX9.23, etc., to make all data blocks maintain a consistent structure before entering the encryption module.
[0088] The final key is used to initialize the encryption execution module, which includes logical structures such as encryption algorithm selection, round key configuration, and round function call. In the initialization process, the final key is loaded into the internal registers or key tables of the encryption module to establish the binding relationship between the key and the data path. During the execution phase, the system sequentially sends each plaintext data block into the encryption module, transforms it layer by layer according to the round function structure, completes the encryption mapping of the data, and generates the corresponding ciphertext data block.
[0089] All ciphertext data blocks generated by encryption need to be recombined in the original division order to form a complete data encryption output structure. This combined structure not only maintains the business order of the data stream unchanged but also provides a mapping reference for subsequent decryption. In the data security system, this ciphertext structure can be directly sent to the data channel transmission module or stored and signed locally as the basis for subsequent integrity verification.
[0090] The AES-256 encryption algorithm can be used as the core component of the encryption execution module to expand the final key into 14 round keys, and the encryption process can be configured using the Electronic Codebook (ECB), Cipher Block Chaining (CBC), or Counter mode (CTR). The target data is divided into blocks with a length of 128 bits during the preprocessing stage, and the padding control module is called to perform end-block alignment processing. The system supports dynamic selection of padding rules to adapt to the boundary conditions of different format data.
[0091] In the key initialization phase, the system loads the final key into the round key table structure and calls the key scheduling algorithm to generate all in-round subkeys. After initialization, the main encryption scheduler is called to perform round function operations on all data blocks in parallel or serially. After the data blocks are encrypted, they are uniformly output to the buffer channel, and combination and splicing are performed at the encryption output layer to form a complete ciphertext output sequence.
[0092] If deployed on a lightweight computing platform, SM4 or lightweight block encryption algorithms (such as PRESENT, Simon) can be used to reduce resource consumption, and at the same time, it supports adaptation configuration of the block length and key length. When the data structure is high-resolution image or voice data, the continuous data stream can be compressed and embedded in the encryption layer through the data channel encoding module to improve the overall throughput.
[0093] Example: In the medical and health scenario, each frame of the continuously collected lung CT images is used as the target data block and input into the system. The system initializes the image encryption module with the final key generated by driving the patient's status, and cuts each frame of the image according to the data matrix structure. After encryption execution, all the ciphertexts of the image blocks are recombined to generate a complete image encryption file, realizing the frame-by-frame encryption protection of the patient's key medical images and ensuring that the attacker cannot use the repeated images or fixed formats to restore them during the transmission process.
[0094] In fintech business, each transaction in cross-border payment business consists of input structures with structured field data. The system generates a final key based on the real-time status and initializes the encryption module, encrypts the account field, amount field, currency identifier field, etc. in the transaction data in logical blocks, and combines and outputs the ciphertext packet according to the business processing sequence. This ciphertext packet is unique and unpredictable in the transmission link, effectively resisting man-in-the-middle tampering and transaction replay attacks.
[0095] In this embodiment, by applying the final key to the segmented encryption process of the target data, not only is the closed-loop construction of the key-driven path completed, but also the encryption process's complete coverage and structural consistency of business data are ensured through structural specifications, pattern adaptation, and ciphertext assembly mechanisms, effectively preventing the recovery, reverse analysis, and information leakage of plaintext content, and improving the encryption security and throughput efficiency of the system in dynamic input and high-concurrency scenarios.
[0096] The present invention relates to the field of data security technology and can be applied to business scenarios such as fintech and medical health. It discloses a data encryption method, device, equipment, and medium, including: obtaining a real-time state vector representing the operating state of a chaotic neural network processing unit, monitoring the chaotic characteristics of the real-time state vector to generate a chaos intensity index, comparing the chaos intensity index with a preset chaos threshold, generating an original key based on the real-time state vector when the key update condition is met, dynamically adjusting the weight matrix of the chaotic neural network processing unit according to the chaos intensity index, performing cryptographic processing on the original key to generate a final key, and using the final key to perform encryption processing on the target data to generate target encrypted data. By using the internal state of the chaotic neural network as the basis for generating dynamic keys, the present invention completes the linkage of key update and weight perturbation on the basis of real-time monitoring of the system's chaos intensity, eliminates the dependence on external entropy sources and fixed parameters, realizes the adaptive adjustment and high-frequency update of keys, and improves the security and real-time performance of the data encryption process.
[0097] In one embodiment, the above step S40 includes:
[0098] S401, determining an adaptive gain factor based on the difference between the chaos intensity index and the preset chaos threshold;
[0099] S402, generating a perturbation matrix of the logistic map;
[0100] S403, multiplying the perturbation matrix element by element with the current weight matrix of the chaotic neural network processing unit to generate a perturbed weight matrix;
[0101] S404, weighted and superimposing the perturbed weight matrix with the adaptive gain factor to generate an updated weight matrix;
[0102] S405. Load the updated weight matrix into the chaotic neural network processing unit to replace the current weight matrix.
[0103] In this embodiment, the weight matrix of the chaotic neural network processing unit is adjusted according to the chaos intensity index. The goal is to dynamically intervene in the internal connection structure of the network based on the chaos intensity feedback signal generated during the network operation, so that the system always maintains in the chaotic region with high entropy output ability and state sensitivity during long-term operation. This process is completed through multiple steps, from perturbation gain adjustment, perturbation matrix generation, weight perturbation fusion to final weight injection, forming a feedback closed-loop from state perception to structure regulation.
[0104] Calculate the adaptive gain factor, which reflects the deviation amplitude between the current chaos intensity index and the preset chaos threshold. If the chaos intensity index is higher than the target range, it indicates that the system may be in a hyperchaotic or unstable state and needs to converge moderately; if it is on the low side, it means that the system tends to be stable and needs to enhance the perturbation to maintain the encryption intensity. Therefore, this difference can be positive or negative, and it needs to be normalized to the gain control parameter within the stable interval through a non-linear mapping function (such as the Sigmoid function), usually with a value range limited between zero and one, to adjust the proportion of the perturbation weight in the final weight construction.
[0105] Generate a perturbation matrix. This matrix is constructed based on the logistic map, and the logistic map is a discrete mapping form with bifurcation characteristics and chaotic trajectories. Each element in the perturbation matrix is generated by iterating through the one-dimensional logistic map function, and its bifurcation parameter is not fixed but dynamically adjusted according to the current chaos intensity index. The adjustment direction of the bifurcation parameter is opposite to the gain regulation direction, that is, when the chaos intensity index is low, the bifurcation parameter is increased to make the perturbation trajectory more complex, thereby enhancing the output perturbation ability. This process ensures the non-periodicity and adjustability of the perturbation and can adaptively adjust the complexity level according to the network state.
[0106] Perform an element-wise multiplication operation on this perturbation matrix and the current weight matrix to form a perturbed weight matrix. The role of element-wise multiplication is to map the perturbation effect to each connection channel in a proportional form, forming local inconsistent changes, thereby destroying the existing convergence path, and at the same time not introducing global jumps at the structural level, maintaining the network stability.
[0107] Perform weighted superposition on the perturbed weight matrix and the current weight matrix, and the fusion degree is controlled by the adaptive gain factor. This weighted process is mainly dominated by retaining the original structure, gradually introducing perturbations in a small amplitude superposition manner, avoiding system oscillations caused by mutations, and at the same time implementing a chaos maintenance strategy of fine-tuning round by round.
[0108] Inject the updated weight matrix into the network structure to replace the original weight matrix, enabling the neural network to evolve its state based on the new structure starting from the next round of operation. This process ensures that the network continuously adjusts its own structure according to the feedback of its chaotic state during operation, establishing an internal connection that drives both key generation and network evolution bidirectionally.
[0109] In this embodiment, by constructing a perturbation path of the weight matrix with the chaotic intensity index as the core feedback signal, the dynamic structure adjustment of the neural network is realized, enabling the network output state to be in the high-entropy interval for a long time, effectively enhancing the nonlinear structure of the dynamic key and the overall unpredictability of the system, and further enhancing the resistance to periodic attacks, statistical analysis attacks, and state restoration attacks.
[0110] In one embodiment, the above step S20 includes:
[0111] S201, obtain multiple of the real-time state vectors within a preset time window;
[0112] S202, determine the corresponding Jacobian matrix according to each of the real-time state vectors;
[0113] S203, extract the principal Lyapunov vector of each Jacobian matrix;
[0114] S204, based on the product of the principal Lyapunov vector and the corresponding Jacobian matrix, determine the average Kolmogorov-Sinai entropy value within the preset time window, and generate the chaotic intensity index.
[0115] In this embodiment, by performing mathematical analysis on the state evolution trajectories within a continuous time period, the non-linear dynamic characteristic indexes are extracted therefrom to quantify the chaotic degree of the current neural network.
[0116] The first technical element of this step is to extract multiple real-time state vectors within a preset time window from the system memory. These state vectors are the system outputs obtained at fixed time intervals during the continuous operation of the neural network, usually existing in the form of high-dimensional vectors, representing the temporal evolution trajectories of the internal dynamic responses of the network. The length of the time window should be long enough to cover multiple network cycle change intervals to ensure the effectiveness of the chaos measurement.
[0117] Next, for each real-time state vector, its corresponding Jacobian matrix needs to be calculated. The Jacobian matrix is the derivative matrix used in the dynamic system to describe the influence of state changes on the system evolution, and is used to characterize the propagation relationship of small perturbations in the state space. Since the neural network does not necessarily have an explicit system equation, in actual operation, a data-driven approximate derivation method can be used, such as establishing a local linear approximation for the difference result between two consecutive state vectors, so as to estimate the approximate expression of the Jacobian matrix.
[0118] After that, the principal Lyapunov vector needs to be extracted from each Jacobian matrix. This vector represents the direction of the strongest expansion of perturbations in the current local state space, that is, the eigenvector corresponding to the largest Lyapunov exponent. Extraction methods can use QR decomposition, power method iteration, or spectral decomposition of symmetric matrices, etc., to extract the information on the linear expansion trend in the principal direction. The existence of the principal Lyapunov vector indicates that the system has the strongest instability in this direction and is an important benchmark for measuring chaos.
[0119] Finally, based on the product result of the principal Lyapunov vector and the corresponding Jacobian matrix, the instantaneous entropy value at each time slice is calculated, and average integration processing is performed within the entire preset time window range to obtain the average Kolmogorov-Sinai entropy value corresponding to this time window. The Kolmogorov-Sinai entropy is an index for measuring the information generation rate of a dynamical system, and the higher its value, the stronger the chaos of the system. The normalized KS entropy value is used as the current chaos intensity index and output to the subsequent structural perturbation and key trigger judgment logic.
[0120] The sampling frequency of the state vector and the length of the time window can be dynamically set according to the response speed of the neural network. For example, the sampling period is set to half of the network weight update period, and the time window covers ten to twenty state points. The Jacobian matrix estimation can adopt the time-delay embedding reconstruction method, establish the trajectory gradient of the state vector to calculate the local differential matrix, and avoid noise domination through singular value filtering. The extraction of the principal Lyapunov vector can use Gram-Schmidt orthogonalization to maintain orthogonality in each iteration and prevent spectral drift. In the calculation of the KS entropy value, the logarithm of the product result of each Jacobian matrix and the Lyapunov vector can be taken and then accumulated and normalized.
[0121] This embodiment realizes the real-time closed-loop quantization from state vector acquisition to chaos intensity output by constructing a mathematical measurement chain of state space changes, provides an accurate and stable dynamic reference basis for network structure adjustment and key trigger strategies, enables the system to have the ability of internal complexity detection and encryption sensitive interval identification, and improves the adaptability of the encryption system to different operating states and the ability of differential key output from the root.
[0122] In one embodiment, the above step S30 includes:
[0123] S301, obtaining a preset chaos threshold, and comparing the magnitude of the chaos intensity index with the preset chaos threshold;
[0124] S302, when the chaos intensity index is greater than the chaos threshold, determining that the key update condition is satisfied;
[0125] S303, mapping the real-time state vector to a low-dimensional space of a preset dimension through a projection matrix to generate a projection vector;
[0126] S304, perform a non - linear activation function processing on the projection vector to generate an activation vector;
[0127] S305, perform a modulus operation truncation processing on the activation vector to generate an initial key;
[0128] S306, perform an exclusive - OR operation on the initial key and a one - time random number to generate the original key.
[0129] In this embodiment, comparing the chaos intensity index with a preset chaos threshold and generating an original key based on the real - time state vector when specific conditions are met is the core decision - making module for dynamic key triggering control. Its role is to establish a response relationship between the current chaotic behavior of the system and the key update event, and to achieve the non - periodic evolution of the key structure.
[0130] First, the system obtains a set of predefined chaos thresholds. This threshold is usually a critical value in the normalized interval and is used to identify whether the system is in a highly chaotic active state. This value can be obtained through offline statistics or dynamically set in combination with historical operation behaviors. The system continuously monitors the current chaos intensity index and compares its numerical value with this threshold. When this index exceeds the threshold, the system determines that the current state meets the condition for triggering key update and enters the key generation path.
[0131] The subsequent key construction process uses the real - time state vector as the input data source. First, a linear transformation is performed on the high - dimensional state vector using a projection matrix, compressing it into a low - dimensional space of a preset dimension. This operation realizes feature selection and information compression, removing indistinguishable redundant components while retaining the key perturbation directions. The projection matrix can be a fixed construction matrix (such as Gaussian projection, orthogonal matrix) or a principal component basis obtained through data - driven training.
[0132] The projection vector then enters the non - linear activation function module. The activation function is used to enhance the non - linear distribution of the output key vector, so that the key is distributed in the value space to form high complexity, diversity, and anti - pattern prediction ability. Differentiable activation functions such as hyperbolic tangent, Sigmoid, Swish, etc. can be used, or discontinuous functions such as the ReLU family can be selected for sparsification processing. The activation output is mapped to the real number domain and needs to be further discretized.
[0133] By performing a modulus operation and truncation operation on the activation vector, the real - valued domain can be mapped to the integer key space. The modulus can be a prime number, a strong pseudo - random constant, or a structured constant matching the security protocol. This step adjusts the key value structure to a fixed - length bit sequence that adapts to the requirements of the encryption protocol format and compresses its representation space.
[0134] Finally, to enhance the non-repetitiveness and anti-replay ability of the original key, the system introduces a one-time random number and performs a bitwise XOR operation with the initial key to generate the final original key. This random number can be extracted from physical entropy sources, key session states, user identity factors, or hardware events, and is guaranteed to be discarded immediately after use and not reused.
[0135] The comparison module can implement high-frequency comparison logic using FPGA. When the input of the chaos intensity index reaches the set threshold, an interrupt is triggered to activate the key construction channel. The projection matrix can be preset as a sparse Gaussian matrix, with the dimension compressed from 1024 to 128. The projected vector undergoes a non-linear mapping through the hyperbolic tangent function and outputs a floating-point sequence. The system performs a modulo-M operation (M is 256 or 512) and rounds down to retain the valid bytes as the initial key structure. The XOR process uses a 64-byte one-time random number as the operation object. The system dynamically calls the hardware random number generator module (TRNG) or generates session random bit strings based on sensor noise fluctuation data during the key session. The result after the operation is written into the key register as the original key for subsequent calls by the cryptographic processing module. In a deployment environment with high security requirements, the output of the activation function can be enhanced through multiple rounds of perturbation to increase the uncertainty in the modulo operation and construct an original key space with time sensitivity and input perception ability.
[0136] In this embodiment, by driving the key update in real time based on the change of the chaotic state, the key evolution rate can be adapted according to the running activity of the neural network, avoiding the predictability and periodicity of the traditional static key structure. At the same time, through state vector mapping and random interference operations, the key source is embedded in the state trajectory structure, forming an encryption basic path with data-driven, perturbation control, and structure decoupling, greatly enhancing the anti-replay, anti-tracking, and key non-repetitiveness of the encryption system.
[0137] In one embodiment, the above step S50 includes:
[0138] S501, input the original key into the secure hash module for hashing processing to generate a hash result;
[0139] S502, perform key length normalization truncation processing on the hash result to generate a standard length key;
[0140] S503, input the standard length key into the key expansion module to generate the final key that meets the target encryption requirements.
[0141] In this embodiment, cryptographic processing of the original key to generate the final key is the core link in realizing structural regularization, format unification, and enhanced anti-inverse operation ability in the dynamic key system. This processing mainly includes three consecutive operations: hash compression, length standardization, and key expansion. Each link enhances the entropy structure, distribution characteristics, and security level of the key.
[0142] First, the original key is input into the secure hash module for hashing. The role of the hash function is to convert an input of any length into an output of a fixed length, and it also has high sensitivity and irreversibility. It is an important component in modern cryptographic systems to resist collision attacks and pre-image attacks. The secure hash module can call standard algorithm families such as SHA-3, BLAKE2, and SM3. These algorithms all meet the requirements of modern encryption security and have good diffusion, uniformity, and irreversibility. Hashing ensures that even if the original key comes from a state space mapping, its characteristics cannot be simply reversed, guaranteeing structural irreversibility.
[0143] After the hashing is completed, a hash result is generated, which may be of different lengths such as 224 bits, 256 bits, 384 bits, etc. Standardization processing is required according to the key length requirements of the target encryption algorithm. The key length standardization truncation operation extracts a part of the content (such as the first segment, middle segment, or last segment) in the hash result as the standard length key, or it can also be extracted by means of a sliding window or hash segmentation to enhance randomness. The core goal of this operation is to unify the key input format for easy docking with standard symmetric encryption algorithms (such as AES and SM4).
[0144] The standard length key is then input into the key expansion module. This module is used to expand the base key into a key structure that meets the requirements of the encryption algorithm, such as a round key sequence or a mask matrix. The expansion method can be designed according to the target encryption protocol. For example, AES uses a fixed key scheduling structure, SM4 uses a linear permutation structure, and lightweight algorithms use low-resource round expansion functions. Key expansion improves the key's space filling ability and the richness of the key distribution during algorithm execution, which is the guarantee for the final key to have practical security strength.
[0145] The finally generated key is the control input accepted by the encryption execution module, with a legal structure, standard length, and irreversible state. It is the bridge structure connecting the neural network state vector and the actual encryption action.
[0146] In one specific implementation, the original key is first encoded into a fixed-length binary bit stream and then input into the SHA-3 module, and the hash output is set to 256 bits. To enhance the key perturbation structure, a one-time random number or user identifier can be concatenated with the original key before performing a hash operation. The system extracts the first 128 bits of the hash result as a standard-length key, and a window sampling technique based on output bit offset can be used during the truncation process to improve key diversity. The key expansion module calls the round key scheduling logic, performs several XOR expansions and linear transformations on the standard-length key, and generates a round key table structure. In symmetric encryption, one round key is used for each round; in block ciphers, the expanded key can construct an intermediate table structure such as an S-box or an L-table. The final key is written to the encryption module register to control the subsequent ciphertext generation path. In a lightweight environment, the BLAKE2b algorithm can also be used as a hash module, and the expansion path is simplified, and the hash result is only output after performing a Reed-Muller matrix transformation once, reducing the consumption of operating resources.
[0147] This embodiment effectively improves the unpredictability of the key structure and the compatibility of the encryption algorithm by mapping the original key to a hash value and processing it in a unified format, and constructs a complete transformation path from a state-oriented dynamic key generation link to a controllable structure key, enabling the encryption system to accept unstructured inputs and output standardized, high-security keys, thereby enhancing the encryption system's anti-collision and adaptability.
[0148] In one embodiment, the above step S10 includes:
[0149] S101, initializing a chaotic neural network processing unit and activating a chaotic dynamics characteristic maintenance mechanism of the chaotic neural network processing unit;
[0150] S102, acquiring an output signal of the chaotic neural network processing unit through a data acquisition module;
[0151] S103, reconstructing the output signal in state space to generate a multi-dimensional state vector;
[0152] S104, verifying the validity of the multidimensional state vector and removing abnormal data points, and generating a verified multidimensional state vector as the real-time state vector.
[0153] In this embodiment, obtaining a real-time state vector representing the operating state of the chaotic neural network processing unit is the entry point for providing a time-sensitive entropy source in the dynamic key generation system. Its function is to extract the internal operating evolution state of the network in a structured manner for subsequent chaotic characteristic evaluation and key construction path. This process includes four closely connected links: initialization mechanism activation, output collection, state reconstruction, and anomaly elimination.
[0154] First, initializing the chaotic neural network processing unit is the starting operation of this process. The neural network structure within the system needs to be loaded into a runnable state, and initial parameters that meet the conditions for chaotic evolution are injected. This neural network structure has a non-linear feedback path, a recursive update mechanism, and sensitivity to initial conditions, and supports large-scale state evolution triggered by small perturbations. The chaotic dynamics characteristic maintenance mechanism is a regulatory component that maintains it in the chaotic state interval, and can be achieved through methods such as weight perturbation injection, feedback noise activation, and distributed perturbation adjustment, ensuring that the network output has high complexity and unpredictability.
[0155] Secondly, the output signal of the chaotic neural network processing unit is obtained through the data acquisition module. This output signal is the feature vector or state array generated by the network after each round of input state evolution, and can be the output of hidden layer neurons, the result of weight activities of a specific layer, or the output sequence in the time dimension. The acquisition module can complete signal acquisition based on periodic sampling, event-driven sampling, or parallel flow sampling methods, and at the same time supports parallel extraction in hardware interfaces (such as DMA channels) and software interfaces (such as shared memory).
[0156] Then, the system reconstructs the above output signal in the state space to generate a multi-dimensional state vector. The reconstruction process includes operations such as signal normalization, dimension alignment, and delay coordinate mapping. The purpose is to map the time series or local vector into the state space with a unified structure, and reconstruct the position of the phase space where the current running trajectory of the network is located. This vector must have consistent time semantics and spatial embedding relationships, facilitating subsequent chaotic characteristic measurement and trajectory mapping.
[0157] Finally, the reconstructed multi-dimensional state vector is verified for validity and abnormal data points are removed to ensure that it is not affected by instantaneous jumps, external noise interference, or execution interruptions. Abnormal data removal can be completed through statistical methods (such as the 3σ principle), entropy threshold screening, trend consistency judgment, etc., and only stable and reliable data is retained as the final real-time state vector. This vector will be used as the direct input of the downstream chaotic index calculation module, running through the forefront of the entire dynamic key link.
[0158] In one specific embodiment, the system pre - sets and initializes a nullifying neural network processing unit during the startup phase, loads a set of initial connection weights and bias parameters for the neural network, and simultaneously enables a set of chaotic - characteristic - maintaining components with perturbation - adjustment capabilities. For example, by dynamically embedding the network intermediate - layer connection structure into a perturbation matrix, the network output path is continuously maintained within a highly state - sensitive operating range. The system configures sampling control logic to, during the operation of the neural network, extract the network output signal in real - time. This signal can be the output vector of the last layer of the neural network or the combined output result of specific intermediate - layer nodes. The sampling control logic periodically collects several consecutive sets of output vectors at a set sampling interval and stores them in a state buffer as the original input for subsequent reconstruction operations. The system uses a state - space reconstruction module to reconstruct the structure of the output signals in the buffer. Specifically, it includes performing dimension - alignment processing on each set of output signals to make all vectors consistent in dimension; subsequently, performing time - delay mapping on each set of vectors, that is, combining the output results at different time points into a continuous - state - trajectory vector in structure, thereby mapping out the state - space coordinate points where the network operation trajectory is located. After the reconstruction is completed, the system further validates the obtained set of state vectors. This process can use a sliding - mean and standard - deviation model to judge the numerical stability between consecutive vectors, or calculate the direction - change amplitude between adjacent state vectors to judge whether there are mutations. If it is found that a certain vector exceeds the range of the historical statistical - distribution model in amplitude or its spatial direction deviates from the expected distribution center, it is determined as an abnormal data point and removed from the state sequence. After the removal operation, the remaining set of valid state vectors will be output as the current real - time state vector for subsequent chaotic - characteristic monitoring.
[0159] In this embodiment, by constructing a stable extraction path from the neural - network operation trajectory to the state vector, it provides an initial - state input with strong structural consistency and high - quality entropy source for the entire dynamic - encryption system. At the same time, through the abnormal - removal mechanism, the interference noise introduced by environmental fluctuations or algorithm jitters is stripped, ensuring the stability, continuity, and security of the subsequent key - generation path.
[0160] In one embodiment, the above - mentioned step S60 includes:
[0161] S601, divide the target data into plain - text data blocks of a preset length, and perform padding - alignment processing on the last plain - text data block according to a preset padding strategy;
[0162] S602, initialize the encryption execution module with the final key;
[0163] S603, input each plain - text data block into the encryption execution module for encryption processing to generate the corresponding cipher - text data block;
[0164] S604. Combine all the ciphertext data blocks according to the partitioning order of the target data to generate the target encrypted data.
[0165] In this embodiment, the target data is encrypted by the final key to generate the target encrypted data. The encryption conversion operation of the data is completed based on the standard block structuring mechanism, making each data segment irreversible and obfuscated in structure. It can be composed of four key technical links: data partitioning and padding, key-driven module initialization, block-by-block encryption processing, and ciphertext combination output.
[0166] First, the target data is divided into multiple plaintext data blocks to enable the encryption algorithm to perform round transformation operations on the data in a standard input format. The target data can be structured or unstructured data of any length, including files, images, serialized records, or intermediate processing results. The block length should be determined according to the plaintext input dimension required by the encryption algorithm. For example, for a fixed-block encryption structure, the plaintext input length must be the same as the encryption block size. If the end of the target data is less than a whole block, a padding strategy needs to be introduced to complete the structure. The padding strategy should have determinacy and anti-inference ability and support strategies such as length indication, 0 padding, or standard padding groups (such as PKCS).
[0167] The initialization of the key-driven encryption module is to apply the final key to the round key expansion module, the initialization vector setting logic, and the sub-structure generation path after the input of the final key, so that the encryption algorithm has complete execution conditions. The final key acts as all control parameters for the execution process of the encryption algorithm in this link, and its structural quality determines the security of the encryption round structure. The initialization process can include content such as S-box construction, linear transformation matrix generation, and permutation rule loading.
[0168] After the plaintext data block is input into the encryption execution module, the module performs multi-round encryption processing on each data block. The encryption process includes initial key mixing, linear diffusion and non-linear exchange operations in multiple transformation rounds. For example, in the standard AES, it includes steps such as round key addition, byte substitution, row shift, and column confusion. The influence of the key will run through the entire encryption path to ensure that the ciphertext formed after encrypting each plaintext data block has no statistical regularity.
[0169] All the ciphertext data blocks are combined into the target encrypted data according to the original partitioning order to ensure that the ciphertext structure and the decryption path can be reconfigured and matched. The combination method does not introduce additional format changes to maintain the adaptability of the encryption system in terms of bandwidth and format compatibility.
[0170] In one specific embodiment, after the system obtains the target data to be protected, it first performs a chunking operation on the target data according to a pre-set encryption block length. This encryption block length can be loaded from the system configuration file. For example, it can be set to a fixed length in a set of byte length units to standardize the input structure of the encryption operation. If the total length of the target data is not an integer multiple of the block length, the system appends padding content at the end of the data so that the last plaintext data block has the same length as the other blocks. The generation rule of this padding content can be selected based on strategies such as fixed byte value padding, zero padding, or length indication padding. The system loads the corresponding strategy according to the configuration and applies it to the current encryption task. After completing the data chunking, the system initializes the encryption execution module with the final key. This module includes the key parameter setting logic and the round function construction mechanism of the symmetric encryption algorithm. In the initialization stage, the system loads the final key into the key register of the encryption module and completes the expansion or extension operation of all round keys to ensure that the encryption module can perform independent encryption transformation processing on each data block later. Each padded and structure-aligned plaintext data block is sequentially input into the encryption execution module and encrypted by the encryption operation unit inside the module. During the processing, the encryption execution module performs multiple encryption rounds on each data block. Each round completes the non-linear transformation of the data content through steps such as permutation, mixing, and diffusion, thereby generating a structurally complete and irreversible ciphertext data block. When all plaintext data blocks have completed the encryption process, the system combines all ciphertext data blocks in the order of the initial data division to form the output structure of the encrypted target data. This combination operation does not perform further compression or encoding on the ciphertext content, but only concatenates according to the block index order to ensure that the data can be reversely deconstructed according to the chunking rules in the data restoration path. The encrypted target data can be written into the encryption buffer, transmitted to the communication link, or handed over to the subsequent authentication module for processing, for scenarios such as data storage encryption, transmission encryption, or access control encryption. The system records the key usage cycle and the data encryption label throughout the process to achieve key life cycle management and ciphertext traceability.
[0171] For example, the core of this system includes three key modules: the Chaotic State Monitor (CSM), the Logistic Map Perturbation Unit (LMPU), and the Trajectory-Key Mapper (TKM). The workflow can be outlined in six consecutive steps: The input image is first fed into the ZNN processing unit and enters the system core after preprocessing; subsequently, the CSM continuously monitors the chaotic characteristics of the ZNN state space, calculates the real-time KS entropy value and compares it with a preset threshold; when sufficiently strong chaotic characteristics are detected (the KS entropy value exceeds the threshold), the CSM triggers the TKM to generate a new key; meanwhile, the LMPU adjusts the perturbation intensity according to the real-time feedback of the CSM, maintaining the optimal chaotic state of the system by dynamically adjusting the bifurcation parameter and the gain factor; the dynamic key generated by the TKM is transmitted to the encryption execution module for image encryption processing; finally, the encrypted image is output, presenting a uniform noise distribution, and the pixel value histogram analysis shows complete randomization. The entire process realizes the automated processing from the input image to the output encrypted image without manual intervention, meeting the performance requirements of a real-time encryption system. The working principles of the main modules are as follows:
[0172] Chaotic State Monitor (CSM): The CSM is the core control module of the system, and its working principle is based on the sliding window Kolmogorov-Sinai entropy estimation. For the ZNN state vector x(t) ∈ R n (where x(t) represents the state vector at time t, and R n represents the n-dimensional real number space), the calculation formula for the KS entropy is:
[0173]
[0174] In this formula, W represents the sliding window size, usually selected as 5 - 10 frames; J(x(k)) is the Jacobian matrix of the ZNN at the state x(k), describing the local linear characteristics of the system at this point; v max (k) is the principal Lyapunov vector, the eigenvector corresponding to the maximum Lyapunov exponent; ||·|| represents the Euclidean norm of the vector, that is, the square root of the sum of the squares of the elements of the vector; log represents the natural logarithm. The CSM decides whether to trigger key update by calculating the KS entropy value in real time and comparing it with the preset threshold τ chaos (chaotic threshold, usually set as 0.7 - 0.8). This module is implemented using a lightweight Transformer encoder, featuring fast processing speed and low resource occupancy.
[0175] Logistic Map Perturbation Unit (LMPU): The LMPU is responsible for maintaining the chaotic intensity of the system, and its perturbation formula is:
[0176] W(t + 1) = W(t) + η·L(t) ⊙ W(t)
[0177] In this formula, W(t) represents the weight matrix at time t; η is the adaptive gain factor, with a value range of 0 < η < 0.1, which is dynamically adjusted according to the CSM output; ⊙ represents the Hadamard product, that is, the element-by-element product between matrix elements; L(t) is the Logistic mapping matrix, and its elements are
[0178] L ij(t) = 4r ij (t)(1 - r ij(t ))
[0179] The key innovation of LMPU lies in the dynamic adjustment mechanism of its bifurcation parameter r ij (t), which is optimized in real time according to the output of CSM to ensure that the system maintains the optimal chaotic state. When the KS entropy value is lower than the threshold, the system will automatically increase the value of η to enhance the perturbation, and vice versa, it will decrease the value of η to maintain the convergence characteristics of ZNN, thus achieving a balance between chaos and system performance.
[0180] Trajectory-Key Mapper (TKM): TKM is responsible for converting the chaotic state of ZNN into an actual available encryption key, and its conversion formula is:
[0181]
[0182] In this expression, σ is the sigmoid function, an S-shaped function that maps the input value to the 0 - 1 interval, defined as A is the fixed projection matrix, which is used to map the high-dimensional state space to a low-dimensional space suitable for key generation; represents the floor operation; Mod represents the modulo operation to ensure that the output is 256 bits. The final key is generated through the SHA-3-256 algorithm:
[0183] K final = SHA3(K raw ⊕ Nonce)
[0184] where SHA3 represents the Secure Hash Algorithm 3, a hash function widely used in cryptography; ⊕ represents the exclusive OR operation, which performs bitwise exclusive OR at the binary bit level; Nonce is a one-time random number, which is used to increase the randomness of the key and prevent replay attacks. TKM is implemented using the high-throughput Keccak pipeline and is tightly integrated with the existing tensor calculation core of ZNN, and can complete the key generation process in microseconds.
[0185] Example illustration: In the financial payment scenario, when a user continuously initiates multiple cross-border transaction requests, the business system introduces a state-aware dynamic key generation and encryption mechanism to prevent replay attacks and session key leakage risks during the transmission of critical data. The system first initializes the deployed annihilation neural network model and activates its chaos maintenance mechanism. Driven by user behavior events, the network runs in real time and generates a set of high-dimensional state vectors representing transaction state changes. The system collects output signals from the neural network at fixed time intervals and transforms these outputs into structurally stable multi-dimensional state vectors through state space reconstruction. After obtaining effective real-time state vectors, the system starts the chaos characteristic evaluation process. By calculating the product of the main Lyapunov vector and the Jacobian matrix within a time window, it outputs the average Kolmogorov-Sinai entropy value of the current state sequence, which is used as the chaos intensity index. The system compares this chaos intensity index with a preset threshold. If it is found to be higher than the threshold, it determines that the current business state has entered a high-dynamic transaction section and a key update operation needs to be performed. At this time, the system takes the current state vector as the input, projects it into a low-dimensional space first, then maps it through an activation function, and generates an initial key after modular operation discretization. This initial key is XORed with a one-time session random number to generate the original key. The system performs SHA-3 hashing on the original key, intercepts a specified length after obtaining the hash result, and forms a standard key structure. Then it is extended by a key expansion module into the final key structure that meets the requirements of the SM4 encryption algorithm. After the final key is loaded into the encryption execution module, it performs an encryption process on the user transaction data (including payment summary, transaction timestamp, and account identifier). The data is split into blocks, filled in the last block, and then sequentially input into the encryption module to generate ciphertext, which is combined into a complete encrypted transaction package and returned to the client. The whole process ensures that the keys for each transaction are dynamically updated, avoids key reuse attacks, and improves the security level of the financial communication channel.
[0186] In a telemedicine image transmission system, the hospital terminal needs to transmit high-resolution CT images and patient diagnosis and treatment data to the cloud AI analysis platform for joint diagnosis. The system deploys a nullifying neural network module with chaotic perturbation ability through embedded hardware to track the evolution of the patient's physiological state. After the image acquisition device is triggered, the network is activated and maintained in a high-dimensional non-linear chaotic state through a perturbation mechanism. The system periodically collects the output of the neural network and reconstructs the state space, and obtains a set of real-time state vectors as input after removing unstable vectors. To determine whether a new encryption key should be generated for the current image, the system calculates the KS entropy value as a chaotic intensity index within a short time window. When the system detects that the chaotic intensity index exceeds the set threshold, indicating that there are drastic fluctuations in the current state (such as a sudden onset of the patient), it immediately enters the dynamic key construction process. The state vector generates an initial key after linear projection, non-linear activation and modulo operation, and is XORed with a one-time random number generated based on the timestamp to obtain the original key. The original key is hashed, truncated and normalized, and extended to the final key required by the AES algorithm through the round key scheduling. This final key is input into the image encryption module to complete the block-by-block encryption process of the patient's CT image file. To ensure data integrity and decryption accuracy, the system uses the PKCS padding method to align and pad the last block of the image data. All encrypted ciphertext data blocks are recombined in the order of the image structure and encapsulated into a diagnostic task data packet for transmission to the cloud. Since the key is dynamically generated based on the patient's specific state trajectory and is only valid for a short time locally, even if an attacker steals the encrypted image, it is difficult to recover the corresponding key, which greatly improves the security level of medical data during cross-institutional transmission.
[0187] In this embodiment, by constructing a closed-loop execution path from key usage to data security encapsulation, the security attributes of the final key are fully reflected in the actual data structure. Through plaintext block division, padding alignment and key-driven encryption operations, it is ensured that even if an attacker can obtain some ciphertext fragments, it is difficult to restore the original data structure through pattern learning or block comparison. The round key change and data block perturbation mechanism during the encryption process make each group of ciphertexts have highly non-linear mapping characteristics, significantly enhancing the defense capabilities against brute-force attacks, linear analysis attacks and replay attacks.
[0188] In one embodiment, a data encryption device is provided, and this data encryption device corresponds one-to-one with the data encryption method in the above embodiment. Refer to Figure 3 , Figure 3 which is a schematic diagram of the functional modules of a preferred embodiment of the data encryption device of the present invention. The state acquisition module 10, the chaos detection module 20, the key generation module 30, the weight perturbation module 40, the key strengthening module 50 and the data encryption module 60. The detailed description of each functional module is as follows:
[0189] The state acquisition module 10 is used to obtain a real-time state vector representing the operating state of the chaotic neural network processing unit;
[0190] The chaos detection module 20 is used to monitor the chaotic characteristics of the real-time state vector and generate a chaos intensity index;
[0191] The key generation module 30 is used to compare the chaos intensity index with a preset chaos threshold. When the chaos intensity index is greater than the preset chaos threshold, an original key is generated based on the real-time state vector;
[0192] The weight perturbation module 40 is used to adjust the weight matrix of the chaotic neural network processing unit according to the chaos intensity index;
[0193] The key strengthening module 50 is used to perform cryptographic processing on the original key to generate a final key;
[0194] The data encryption module 60 is used to encrypt the target data through the final key to generate target encrypted data.
[0195] In one embodiment, the weight perturbation module 40 is specifically used for:
[0196] Determine an adaptive gain factor based on the difference between the chaos intensity index and the preset chaos threshold;
[0197] Generate a perturbation matrix of the logistic map;
[0198] Element-wise multiply the perturbation matrix with the current weight matrix of the chaotic neural network processing unit to generate a perturbed weight matrix;
[0199] Weightedly superimpose the perturbed weight matrix with the adaptive gain factor to generate an updated weight matrix;
[0200] Load the updated weight matrix into the chaotic neural network processing unit to replace the current weight matrix.
[0201] In one embodiment, the chaos detection module 20 is specifically used for:
[0202] Obtain multiple real-time state vectors within a preset time window;
[0203] Determine the corresponding Jacobian matrix according to each real-time state vector;
[0204] Extract the principal Lyapunov vector of each Jacobian matrix;
[0205] Based on the product of the main Lyapunov vector and the corresponding Jacobian matrix, an average Kolmogorov-Sinai entropy value within the preset time window is determined to generate the chaos intensity index.
[0206] In one embodiment, the key generation module 30 is specifically used to:
[0207] Obtaining a preset chaos threshold, and comparing the chaos intensity index with the preset chaos threshold;
[0208] When the chaos intensity index is greater than the chaos threshold, it is determined that the key update condition is met;
[0209] Mapping the real-time state vector to a low-dimensional space of a preset dimension through a projection matrix to generate a projection vector;
[0210] Performing nonlinear activation function processing on the projection vector to generate an activation vector;
[0211] Performing a modular operation and truncation processing on the activation vector to generate an initial key;
[0212] The initial key is XORed with a one-time random number to generate the original key.
[0213] In one embodiment, the key strengthening module 50 is specifically configured to:
[0214] Inputting the original key into a secure hash module for hash processing to generate a hash result;
[0215] Performing key length standardization truncation processing on the hash result to generate a standard length key;
[0216] The standard length key is input into a key expansion module to generate the final key that meets the target encryption requirements.
[0217] In one embodiment, the state acquisition module 10 is specifically used for:
[0218] Initializing a chaotic neural network processing unit and activating a chaotic dynamics characteristic maintenance mechanism of the chaotic neural network processing unit;
[0219] Acquire the output signal of the chaotic neural network processing unit through a data acquisition module;
[0220] Reconstructing the output signal in state space to generate a multi-dimensional state vector;
[0221] The validity of the multidimensional state vector is verified and abnormal data points are removed, and a verified multidimensional state vector is generated as the real-time state vector.
[0222] In one embodiment, the data encryption module 60 is specifically configured to:
[0223] Divide the target data into plaintext data blocks of a preset length, and perform padding alignment processing on the last plaintext data block according to a preset padding strategy;
[0224] Initialize the encryption execution module with the final key;
[0225] Input each plaintext data block into the encryption execution module for encryption processing to generate corresponding ciphertext data blocks;
[0226] Combine all the ciphertext data blocks according to the division order of the target data to generate the target encrypted data.
[0227] In one embodiment, a computer device is provided. The computer device can be a server, and its internal structure diagram can be as Figure 4 shown. The computer device includes a processor, a memory, a network interface, and a database connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile and / or volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external client through a network connection. When the computer program is executed by the processor, it realizes the functions or steps on the server side of a data encryption method.
[0228] In one embodiment, a computer device is provided. The computer device can be a client, and its internal structure diagram can be as Figure 5 shown. The computer device includes a processor, a memory, a network interface, a display screen, and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external server through a network connection. When the computer program is executed by the processor, it realizes the functions or steps on the client side of a data encryption method
[0229] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the following steps are implemented:
[0230] Obtain a real-time state vector representing the operating state of the chaotic neural network processing unit;
[0231] Monitor the chaotic characteristics of the real-time state vector and generate a chaos intensity index;
[0232] Compare the chaos intensity index with a preset chaos threshold. When the chaos intensity index is greater than the preset chaos threshold, generate an original key based on the real-time state vector;
[0233] Adjust the weight matrix of the chaotic neural network processing unit according to the chaos intensity index;
[0234] Perform cryptographic processing on the original key to generate a final key;
[0235] Encrypt the target data with the final key to generate target encrypted data.
[0236] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:
[0237] Obtain a real-time state vector representing the operating state of the chaotic neural network processing unit;
[0238] Monitor the chaotic characteristics of the real-time state vector and generate a chaos intensity index;
[0239] Compare the chaos intensity index with a preset chaos threshold. When the chaos intensity index is greater than the preset chaos threshold, generate an original key based on the real-time state vector;
[0240] Adjust the weight matrix of the chaotic neural network processing unit according to the chaos intensity index;
[0241] Perform cryptographic processing on the original key to generate a final key;
[0242] Encrypt the target data with the final key to generate target encrypted data.
[0243] It should be noted that for the functions or steps that can be achieved by the above computer-readable storage medium or computer device, reference can be made to the relevant descriptions on the server side and the user side in the foregoing method embodiments. To avoid repetition, they will not be described one by one here.
[0244] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, storage, database, or other medium used in the embodiments provided in the present application can include non-volatile and / or volatile memories. Non-volatile memories can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memories can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and Rambus dynamic RAM (RDRAM), etc.
[0245] Those skilled in the art can clearly understand that for the convenience and brevity of description, only the above division of each functional unit and module is used as an example. In actual applications, the above functions can be allocated to different functional units and modules according to needs, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0246] It should be noted that if there are software tools or components of other companies in the embodiments of the present application, they are only used for illustrative introduction and do not represent actual use. The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.
Claims
1. A data encryption method, characterized in that, Including the following steps: Obtain a real-time state vector representing the operating state of the chaotic neural network processing unit; Monitor the chaotic characteristics of the real-time state vector and generate a chaos intensity index; Compare the chaos intensity index with a preset chaos threshold. When the chaos intensity index is greater than the preset chaos threshold, generate an original key based on the real-time state vector; Adjust the weight matrix of the chaotic neural network processing unit according to the chaos intensity index; Perform cryptographic processing on the original key to generate a final key; Encrypt the target data through the final key to generate target encrypted data.
2. The data encryption method according to claim 1, wherein Adjusting the weight matrix of the chaotic neural network processing unit according to the chaos intensity index includes: Determine an adaptive gain factor based on the difference between the chaos intensity index and the preset chaos threshold; Generate a perturbation matrix of the logistic map; Perform element-wise multiplication of the perturbation matrix and the current weight matrix of the chaotic neural network processing unit to generate a perturbed weight matrix; Weightedly superimpose the perturbed weight matrix and the adaptive gain factor to generate an updated weight matrix; Load the updated weight matrix into the chaotic neural network processing unit to replace the current weight matrix.
3. The data encryption method according to claim 1, wherein Monitoring the chaotic characteristics of the real-time state vector and generating a chaos intensity index includes: Obtain multiple real-time state vectors within a preset time window; Determine the corresponding Jacobian matrix according to each real-time state vector; Extract the principal Lyapunov vector of each Jacobian matrix; Based on the product of the principal Lyapunov vector and the corresponding Jacobian matrix, determine the average Kolmogorov-Sinai entropy value within the preset time window to generate the chaos intensity index.
4. The data encryption method according to claim 1, wherein Comparing the chaos intensity index with a preset chaos threshold. When the chaos intensity index is greater than the preset chaos threshold, generating an original key based on the real-time state vector includes: Obtain a preset chaos threshold and compare the numerical magnitude of the chaos intensity index with the preset chaos threshold; When the chaos intensity index is greater than the chaos threshold, determine that the key update condition is satisfied; Map the real-time state vector to a low-dimensional space of a preset dimension through a projection matrix to generate a projection vector; Perform a non-linear activation function process on the projection vector to generate an activation vector; Perform a modulus operation truncation process on the activation vector to generate an initial key; Perform an exclusive OR operation on the initial key and a one-time random number to generate the original key.
5. The data encryption method according to claim 1, wherein Performing cryptographic processing on the original key to generate a final key includes: Input the original key into a secure hash module for hashing processing to generate a hash result; Perform a key length normalization truncation process on the hash result to generate a standard length key; Input the standard length key into a key expansion module to generate the final key that meets the target encryption requirements.
6. The data encryption method according to claim 1, wherein Obtaining a real-time state vector representing the operating state of the chaotic neural network processing unit includes: Initialize the chaotic neural network processing unit and activate the chaos dynamics characteristic maintenance mechanism of the chaotic neural network processing unit; Acquire the output signal of the chaotic neural network processing unit through a data acquisition module; Reconstructing the output signal in state space to generate a multi-dimensional state vector; The validity of the multidimensional state vector is verified and abnormal data points are removed, and a verified multidimensional state vector is generated as the real-time state vector.
7. The data encryption method according to claim 1, wherein The target data is encrypted by the final key to generate target encrypted data, including: Divide the target data into plaintext data blocks of preset length, and perform padding and alignment processing on the last plaintext data block according to a preset padding strategy; Initialize the encryption execution module using the final key; Input each plaintext data block into the encryption execution module for encryption processing to generate a corresponding ciphertext data block; All ciphertext data blocks are combined according to the division order of the target data to generate the target encrypted data.
8. A data encryption device, characterized in that, The data encryption device comprises: A state acquisition module is used to obtain a real-time state vector representing the operating state of the chaotic neural network processing unit; A chaos detection module, used to monitor the chaos characteristics of the real-time state vector and generate a chaos intensity index; A key generation module, used for comparing the chaos intensity index with a preset chaos threshold, and generating an original key based on the real-time state vector when the chaos intensity index is greater than the preset chaos threshold; A weight perturbation module, used for adjusting the weight matrix of the chaotic neural network processing unit according to the chaos intensity index; A key strengthening module, used for performing cryptographic processing on the original key to generate a final key; The data encryption module is used to encrypt the target data using the final key to generate target encrypted data.
9. A computer device, characterized in that, The computer device includes a memory, a processor, and a data encryption program stored in the memory and executable on the processor. When the data encryption program is executed by the processor, the steps of the data encryption method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium, characterized in that, The storage medium stores a data encryption program, which, when executed by a processor, implements the steps of the data encryption method according to any one of claims 1 to 7.
Citation Information
Cited By
Dynamic encryption and security level adaptive adjustment method for flight data
CN120528601A
A method for dynamic encryption and adaptive adjustment of security level of flight data
CN120528601B
Quantum key synchronous storage method for QKD
CN120582785A
Quantum key synchronization storage method for QKD
CN120582785B
Chaos enhanced credible authentication method based on vehicle-mounted gateway
CN120729503A
