Cross-domain encryption method, device and storage medium

By acquiring the runtime environment parameters of cross-domain communication scenarios, the topology density and neuron connection topology of the encryption architecture are dynamically adjusted, solving the problem that the encryption complexity and resource consumption in cross-domain communication cannot match the scenario requirements, and realizing the dynamic reconfigurability and adaptability improvement of the encryption architecture.

CN122204476APending Publication Date: 2026-06-12WEBANK (CHINA)
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
WEBANK (CHINA)
Filing Date
2026-03-23
Publication Date
2026-06-12

Smart Images

  • Figure CN122204476A_ABST
    Figure CN122204476A_ABST
Patent Text Reader

Abstract

The application discloses a cross-domain encryption method and device and a storage medium, and relates to the technical field of artificial intelligence. The method comprises the following steps: acquiring a running environment parameter of a current cross-domain communication scene; determining a target topology density of a preset encryption architecture based on the running environment parameter; constructing a neuron connection topology of the preset encryption architecture according to the target topology density, and obtaining a target encryption layer adaptive to the current cross-domain communication scene; and performing encryption processing on to-be-encrypted data through the target encryption layer, and obtaining an encryption result. The application can improve the encryption adaptability to different cross-domain communication scenes, and improve the data encryption effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence technology, and in particular to a cross-domain encryption method, device and storage medium. Background Technology

[0002] With the penetration of information technology into multiple fields such as industrial control, the Internet of Things, and quantum communication, the application scenarios of cross-domain communication are becoming increasingly complex. Examples include the interaction between IoT devices and the cloud, the integration of quantum communication networks and traditional communication networks, and the connection between brain-computer interfaces and medical systems. Information security is of paramount importance in these scenarios.

[0003] Currently, commonly used encryption technologies in cross-domain communication scenarios employ fixed encryption structures and algorithm logic. This makes it impossible to adjust the encryption complexity and resource consumption according to the actual needs of different cross-domain scenarios. For example, in scenarios where IoT devices with limited computing power conduct cross-domain communication, complex encryption algorithms can lead to excessive power consumption and increased response latency. In cross-domain scenarios with high security requirements, such as quantum communication, simple encryption algorithms cannot resist quantum attacks and are difficult to meet the security protection requirements of the scenario.

[0004] Therefore, improving the encryption adaptability for different cross-domain communication scenarios to enhance data encryption effectiveness is a problem that urgently needs to be solved. Summary of the Invention

[0005] The main purpose of this application is to provide a cross-domain encryption method, device and storage medium, which aims to improve the encryption adaptability for different cross-domain communication scenarios and thus enhance the data encryption effect.

[0006] To achieve the above objectives, this application provides a cross-domain encryption method, the cross-domain encryption method comprising:

[0007] Obtain the runtime environment parameters of the current cross-domain communication scenario; The target topology density of the preset encryption architecture is determined based on the aforementioned operating environment parameters; Based on the target topology density, the neural connection topology of the preset encryption architecture is constructed to obtain a target encryption layer adapted to the current cross-domain communication scenario; The target encryption layer encrypts the data to be encrypted, resulting in an encrypted result.

[0008] In one embodiment, the step of determining the target topology density of the preset encryption architecture based on the operating environment parameters includes: A scenario threat vector is constructed based on the aforementioned operating environment parameters, and the scenario threat vector is normalized to obtain a normalized vector. The initial topological density is determined based on the normalized vector and the preset density limit. The target topology density is determined based on the initial topology density and the preset density constraints.

[0009] In one embodiment, the preset density limit includes a preset upper density limit and a preset lower density limit, and the step of determining the initial topological density based on the normalized vector and the preset density limit includes: The elements in the normalized vector are weighted and summed to obtain the first sum. The first sum is normalized to obtain the processed first sum. Determine the difference between the preset upper density limit and the preset lower density limit, and multiply the difference by the processed first sum to obtain the product; The product is summed with the preset lower density limit to obtain the initial topological density.

[0010] In one embodiment, the density constraint includes computing power constraint, encryption complexity constraint, and latency constraint. The step of determining the target topology density based on the initial topology density and the preset density constraint includes: Based on the computing power constraint, the encryption complexity constraint, and the latency constraint, the target constraint is determined; The target topology density that satisfies the target constraint is determined from the density limit corresponding to the target constraint and the initial topology density.

[0011] In one embodiment, the preset encryption architecture employs a memristor cross array of a preset size, and the step of encrypting the data to be encrypted through the target encryption layer to obtain the encryption result includes: Determine the adjacency matrix corresponding to the neuron connection topology of the target encryption layer, and determine the degree sequence based on the adjacency matrix; A chaotic sequence is generated using the mean of the degree sequence as a seed, and a dynamic encoding template is constructed based on the chaotic sequence; Based on the chaotic sequence and the dynamic codebook, the data to be encrypted is subjected to pulse coding processing to obtain a pulse sequence; The pulse sequence is input into the memristor cross array to obtain the encryption result.

[0012] In one embodiment, the method further includes: During the encryption process of the data to be encrypted through the target encryption layer, in response to the detected attack behavior, the attack behavior is subjected to attack feature extraction to obtain an attack feature vector, wherein the attack feature vector includes attack frequency, data tampering rate and duration of continuous attack. The antibody factor matrix is ​​determined based on the attack feature vector, wherein the antibody factor matrix has the same dimension as the synaptic weight matrix of the memristor cross array; The synaptic weight matrix is ​​modified based on the antibody factor matrix to obtain the modified synaptic weight matrix. An optimized target encryption layer is generated based on the modified synaptic weight matrix, and the step of encrypting the data to be encrypted through the target encryption layer to obtain the encryption result is performed based on the optimized target encryption layer.

[0013] In one embodiment, the step of determining the antibody factor matrix based on the attack feature vector includes: The attack feature vector is recalibrated to obtain the recalibrated vector; The recalibrated vector is input into a preset encoder, and heterogeneous antibody factors corresponding to each element in the attack feature vector are generated by multiple preset projection heads. The confidence level of each element in the attack feature vector is determined, and the heterogeneous antibody factors are weighted and fused based on the confidence level to obtain the antibody factor matrix.

[0014] In one embodiment, the method further includes: In response to the satisfaction of preset self-evolution triggering conditions, the target encryption layer or the optimized target encryption layer is evaluated in multiple dimensions to obtain multiple performance scores; A comprehensive score is determined based on each of the performance scores, and it is determined whether the comprehensive score is lower than a preset score threshold. If the overall score is lower than the preset score threshold, the parameters of the target encryption layer are optimized based on each performance score to obtain a self-evolved target encryption layer. The step of encrypting the data to be encrypted through the target encryption layer to obtain the encryption result is then performed based on the self-evolved target encryption layer.

[0015] Furthermore, to achieve the above objectives, this application also provides a cross-domain encryption device, the cross-domain encryption device comprising: The parameter acquisition module is used to obtain the operating environment parameters of the current cross-domain communication scenario; The density determination module is used to determine the target topology density of the preset encryption architecture based on the operating environment parameters. The topology construction module is used to construct the neuron connection topology of the preset encryption architecture according to the target topology density, so as to obtain a target encryption layer adapted to the current cross-domain communication scenario. The encryption module is used to encrypt the data to be encrypted through the target encryption layer to obtain the encryption result.

[0016] In addition, to achieve the above objectives, this application also proposes an electronic device, the device comprising: a memory, a processor, and a computer program stored on the memory and executable on the processor, the computer program being configured to implement the steps of the cross-domain encryption method as described above.

[0017] In addition, to achieve the above objectives, this application also provides a storage medium, which is a computer-readable storage medium, on which a program implementing a cross-domain encryption method is stored, and the program implementing the cross-domain encryption method is executed by a processor to implement the steps of the cross-domain encryption method as described above.

[0018] In addition, to achieve the above objectives, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the cross-domain encryption method as described above.

[0019] This application provides a cross-domain encryption method. First, the application obtains the operating environment parameters of the current cross-domain communication scenario; based on the operating environment parameters, it determines the target topology density of the preset encryption architecture; based on the target topology density, it constructs the neuron connection topology of the preset encryption architecture to obtain a target encryption layer adapted to the current cross-domain communication scenario; finally, it encrypts the data to be encrypted through the target encryption layer to obtain the encryption result.

[0020] In summary, this application obtains the runtime environment parameters of the current cross-domain communication scenario to characterize the resource constraints and security requirements of the current scenario, providing a basis for subsequent adaptability adjustments. Then, based on the runtime environment parameters, it determines the target topology density of the encryption architecture and constructs a neuron connection topology according to the target topology density, generating a target encryption layer whose encryption strength and resource overhead match the requirements of the current scenario. This breaks free from the rigid limitations of traditional fixed encryption structures and achieves dynamic reconfigurability of the encryption architecture. Finally, the target encryption layer is used for data encryption. Thus, compared to the traditional method of using fixed encryption structures and algorithm logic for data encryption in different cross-domain scenarios, this application achieves on-demand dynamic adjustment of encryption complexity and resource consumption, improving the adaptability of the encryption architecture to different cross-domain communication scenarios. Attached Figure Description

[0021] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0022] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0023] Figure 1 This is a flowchart illustrating the first embodiment of the cross-domain encryption method of this application; Figure 2 This is a schematic diagram of the cross-domain encryption process involved in an embodiment of the cross-domain encryption method of this application; Figure 3 This is a schematic diagram of the encryption architecture involved in an embodiment of the cross-domain encryption method of this application; Figure 4 This is a schematic diagram of the module structure of the cross-domain encryption device of this application; Figure 5 This is a schematic diagram of the device structure of the hardware operating environment involved in the cross-domain encryption method in this application embodiment.

[0024] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0025] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.

[0026] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.

[0027] Currently, commonly used encryption technologies in cross-domain communication scenarios employ fixed encryption structures and algorithm logic. This makes it impossible to adjust the encryption complexity and resource consumption according to the actual needs of different cross-domain scenarios. For example, in scenarios where IoT devices with limited computing power conduct cross-domain communication, complex encryption algorithms can lead to excessive power consumption and increased response latency. In cross-domain scenarios with high security requirements, such as quantum communication, simple encryption algorithms cannot resist quantum attacks and are difficult to meet the security protection requirements of the scenario.

[0028] Therefore, improving the encryption adaptability for different cross-domain communication scenarios to enhance data encryption effectiveness is a problem that urgently needs to be solved.

[0029] The main solution of this application is: to obtain the operating environment parameters of the current cross-domain communication scenario; to determine the target topology density of the preset encryption architecture based on the operating environment parameters; to construct the neuron connection topology of the preset encryption architecture according to the target topology density, thereby obtaining a target encryption layer adapted to the current cross-domain communication scenario; and to encrypt the data to be encrypted through the target encryption layer to obtain the encryption result.

[0030] This application obtains the runtime environment parameters of the current cross-domain communication scenario to characterize the resource constraints and security requirements of the current scenario, providing a basis for subsequent adaptability adjustments. Then, based on the runtime environment parameters, it determines the target topology density of the encryption architecture and constructs a neural network connection topology according to the target topology density, generating a target encryption layer whose encryption strength and resource overhead match the requirements of the current scenario. This breaks free from the rigid limitations of traditional fixed encryption structures and achieves dynamic reconfigurability of the encryption architecture. Finally, the target encryption layer is used for data encryption. Thus, compared to the traditional method of using fixed encryption structures and algorithm logic for data encryption in different cross-domain scenarios, this application achieves on-demand dynamic adjustment of encryption complexity and resource consumption, improving the adaptability of the encryption architecture to different cross-domain communication scenarios.

[0031] It should be noted that the execution subject of the cross-domain encryption method in this application can be a data encryption system or a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, or mobile phone. This embodiment does not specifically limit this. The following uses a data encryption system as the execution subject to describe this embodiment and the following embodiments.

[0032] Based on this, this application proposes a cross-domain encryption method according to a first embodiment, please refer to... Figure 1 The cross-domain encryption method includes steps S10 to S40: Step S10: Obtain the operating environment parameters of the current cross-domain communication scenario.

[0033] It should be noted that cross-domain communication scenarios refer to communication scenarios involving cross-domain data interaction, including but not limited to scenarios where IoT devices interact with the cloud, scenarios where quantum communication networks merge with traditional communication networks, and scenarios where brain-computer interfaces connect with medical systems. Operating environment parameters are a set of core parameters characterizing the resource supply capacity and security risk level of the current cross-domain communication scenario. These include, but are not limited to, communication bandwidth, device computing power, and attack threat level. Communication bandwidth (unit: Gbps) measures the data transmission rate of the scenario, device computing power (unit: TOPS) measures the hardware computing power of the scenario, and attack threat level (dimensionless, quantized from 1 to 10 levels) measures the degree of security attack risk faced by the scenario.

[0034] In the initial stage of cross-domain encryption operation, the operating environment parameters of the current cross-domain communication scenario are collected in real time by a preset scene perception unit at a preset sampling frequency. The resource constraints (bandwidth, computing power) and security requirements (attack threat level) of the scenario are accurately perceived and quantified. After the collected parameters are preprocessed (such as unit unification and outlier removal), effective parameters that can be directly used for subsequent calculations are formed. This provides objective and accurate data support for the determination of the target topology density and the construction of the neuron connection topology, ensuring that the subsequent adaptation and adjustment of the encryption architecture fits the actual needs of the current scenario and avoids resource waste or security deficiencies caused by blind adaptation.

[0035] In the first feasible implementation, for IoT low-computing-power cross-domain scenarios (such as IoT sensor and edge gateway communication scenarios), the scene perception unit collects operating environment parameters at a sampling frequency of 1Hz, specifically the communication bandwidth of 0.5Gbps, device computing power of 0.5TOPS, and attack threat level of 4 (medium-low threat). After collection, the bandwidth and computing power parameters are unified in units (converted to bit / s and operations / second), and the valid parameters are output after removing abnormal fluctuation data.

[0036] In the second feasible implementation, for high-security cross-domain scenarios of quantum communication (such as the integration of quantum key distribution networks and traditional communication networks), the operating environment parameters are collected in real time by a high-frequency scene sensing unit. Specifically, the communication bandwidth is 50Gbps, the device computing power is 50TOPS, and the attack threat level is level 9 (high threat). After collection, no additional frequency reduction processing is required, and high-precision parameters are directly output for subsequent calculations.

[0037] In the third feasible implementation, for cross-domain scenarios of brain-computer interfaces (such as communication scenarios between brain-computer interface devices and medical monitoring systems), the operating environment parameters are collected by the scene perception unit adapted to the medical device. Specifically, the communication bandwidth is 5Gbps, the device computing power is 5TOPS, and the attack threat level is 7 (medium threat). After collection, the parameters are noise-reduced to ensure the stability of the parameters before output.

[0038] Step S20: Determine the target topology density of the preset encryption architecture based on the operating environment parameters.

[0039] It should be noted that the preset encryption architecture refers to a dynamically reconfigurable cross-domain encryption architecture based on neuromorphic design. Its core includes a neural synaptic encryption layer, a dynamic topology adaptation layer, and a cross-domain immune protection layer. The neural synaptic encryption layer is based on a memristor cross array as its hardware foundation, the dynamic topology adaptation layer includes a scene perception unit, and the cross-domain immune protection layer includes an attack feature recognition model. Topology density refers to the percentage of connections between neurons in the preset encryption architecture. It is a core parameter that determines encryption complexity, hardware resource consumption, and security protection strength. It can be dynamically adjusted between 10% and 90% (empirical value, ensuring hardware feasibility) according to scenario requirements, and is divided into three types: sparse (10%-30%), balanced (40%-60%), and dense (70%-90%).

[0040] Based on the acquired runtime environment parameters, a target topology density that matches the resource constraints and security requirements of the current scenario is calculated. This process enables the target topology density to accurately match the scenario's bandwidth capacity, computing power limit, and security requirements, breaking free from the rigid limitation of fixed topology density in traditional encryption architectures and achieving a dynamic balance between encryption strength and resource consumption.

[0041] In the first feasible implementation, taking a low-computing-power cross-domain IoT scenario as an example, the steps for constructing a preset encryption architecture include: the neural synaptic encryption layer adopts 256... The 256-memristor cross array has an initial synaptic weight matrix with a mean of 0.5 and a standard deviation of 0.1, and sets the safety threshold range for each weight in the matrix to 0.5 ± 0.3; the scene perception unit of the dynamic topology adaptation layer has a sampling frequency of 1 Hz; the cross-domain immune protection layer attack feature recognition model has 100,000 training samples and a recognition accuracy requirement of 98.6%.

[0042] In the second feasible implementation, taking a high-security cross-domain scenario of quantum communication as an example, the steps for constructing a preset encryption architecture include: the neural synapse encryption layer uses 1024... The 1024 memristor cross array has an initial synaptic weight matrix with a mean of 0.5 and a standard deviation of 0.1, and sets the safety threshold range for each weight in the matrix to 0.5 ± 0.3; the scene perception unit of the dynamic topology adaptation layer has a sampling frequency of 10 Hz; the cross-domain immune protection layer attack feature recognition model has 150,000 training samples and a recognition accuracy requirement of 99.2%.

[0043] In the third feasible implementation, taking a cross-domain brain-computer interface scenario as an example, the steps for constructing a preset encryption architecture include: the neural synapse encryption layer adopts 512... A 512-memristor cross array is used to balance processing speed and hardware complexity; the initial synaptic weight matrix has a mean of 0.5 and a standard deviation of 0.1, and the safety threshold range for each weight in the matrix is ​​set to 0.5 ± 0.3; the scene perception unit of the dynamic topology adaptation layer has a sampling frequency of 10 Hz to adapt to rapid changes in neural signals; the cross-domain immune protection layer attack feature recognition model has 120,000 training samples and a recognition accuracy requirement of 98.8%. In this embodiment, the attack feature recognition model uses a ResNet (Deep Residual Network) specifically trained for neural signal attack patterns.

[0044] Step S30: Construct the neuron connection topology of the preset encryption architecture based on the target topology density to obtain a target encryption layer adapted to the current cross-domain communication scenario.

[0045] It should be noted that neuron connection topology refers to the topological structure generated based on Graph Neural Networks (GNNs) that reflects the connection relationships between neurons. Its connection density is consistent with the target topology density, including sparse, balanced, and dense topologies. The target encryption layer refers to the neural synaptic encryption core built on the neuron connection topology using memristor cross arrays as hardware. It is the core encryption part of the preset encryption architecture, possessing dynamic reconfigurability, high security, and scene adaptability. It can adjust its structure according to scene requirements to achieve encryption functionality.

[0046] The target topology density is input into the dynamic topology adaptation layer of the preset encryption architecture. The topology generation module (based on a GNN model) generates the corresponding neuron connection topology based on the target topology density (determining whether neurons are connected and the connection strength). This neuron connection topology is then sent to the neural synapse encryption layer to reconstruct the connection relationships of the memristor cross array, forming a target encryption layer adapted to the current cross-domain communication scenario. This process realizes the transformation of the encryption core from a fixed structure to a dynamically adaptable structure, ensuring that the structure of the target encryption layer is highly matched with the resource constraints and security requirements of the current scenario.

[0047] In the first feasible implementation, for low-computing-power cross-domain scenarios of IoT, a neuron connection topology (adjacency matrix) with a connection density of 25% is generated by a GNN model based on a sparse target topology density of 25%. The number of neuron connections in this topology is relatively small. It is then distributed to a 256×256 memristor cross array and reconstructed to form a low-power target encryption layer, reducing the flip-flop frequency of the memristor array and adapting to the low-computing-power and low-power requirements of IoT devices.

[0048] In the second feasible implementation, for the high-security cross-domain scenario of quantum communication, based on the dense target topology density of 85%, a neuron connection topology with a connection density of 85% is generated by the GNN model. The neuron connections in this topology are dense, and it is sent down to a 1024×1024 memristor cross array to reconstruct a high-security target encryption layer, thereby increasing the complexity of the encryption structure and enhancing the resistance to quantum attacks.

[0049] In the third feasible implementation, for cross-domain scenarios of brain-computer interfaces, a neuron connection topology with a connection density of 55% is generated by a GNN model based on a balanced target topology density of 55%. This topology takes into account both connection density and computational efficiency. It is then distributed to a 512×512 memristor cross array and reconstructed to form a stable and compatible target encryption layer. This ensures the security of brain-computer interface data transmission and avoids excessive consumption of medical equipment computing power.

[0050] Step S40: The data to be encrypted is encrypted through the target encryption layer to obtain the encryption result.

[0051] It should be noted that the data to be encrypted refers to business data that requires security protection and must be prevented from being leaked or tampered with during cross-domain communication, including but not limited to environmental data collected by IoT sensors, key data in quantum communication, and neural signal data transmitted by brain-computer interfaces. The encryption result refers to the ciphertext data obtained after the data to be encrypted has been processed by the target encryption layer. This ciphertext data has high randomness (must pass 100% of the NIST SP 800-22 standard test) and strong resistance to attacks, and can only be restored to the data to be encrypted through the corresponding decryption mechanism.

[0052] First, the data to be encrypted is converted into a pulse signal using Pulse Code Modulation (PCM) or Pulse Topology Adaptive Coding (PTAC) to ensure the data can adapt to the neuromorphic encryption logic of the target encryption layer. Then, the converted pulse signal is input into the memristor cross-array of the target encryption layer. Based on the synaptic weight matrix corresponding to the current neuron connection topology, the pulse signal is modulated to generate a dynamic encryption keystream. Finally, this dynamic keystream is used to perform encryption operations on the pulse signal corresponding to the data to be encrypted, completing the encryption process and outputting the encryption result. This ensures the encryption result meets the security requirements of the current scenario while also considering data transmission efficiency. It should be noted that the PTAC algorithm dynamically generates encoding rules based on the neuron connection topology features generated in real time by the dynamic topology adaptation layer, deeply coupling data encoding with the encryption network structure. This achieves a security upgrade from "one-time pad" to "one topology pad," fundamentally enhancing resistance to analysis.

[0053] In the first feasible implementation, for IoT low-computing-power cross-domain scenarios, the data to be encrypted is the ambient temperature data (e.g., 25℃) collected by IoT sensors. Pulse Topology Adaptive Coding (PTAC) is used to convert the data to be encrypted into an 8-bit pulse sequence, which is input into the target encryption layer composed of a 256×256 memristor cross array. An encryption key stream (encryption rate 100Mbps) is generated based on the synaptic weight matrix corresponding to the 25% sparse topology to complete the encryption processing of the temperature data and obtain the encrypted ciphertext data, ensuring the security and efficiency of data transmission between low-computing-power devices.

[0054] In the second feasible implementation, for the high-security cross-domain scenario of quantum communication, the data to be encrypted is the key data in the quantum key distribution process. PCM encoding is used to convert the data to be encrypted into a 16-bit pulse signal, which is input into the target encryption layer composed of a 1024×1024 memristor cross array. A highly random key stream is generated based on the synaptic weight matrix corresponding to the 85% dense topology. The encryption strength is further enhanced by combining quantum random numbers, and the encryption processing of the key data is completed, resulting in an encryption result that can resist quantum attacks.

[0055] In the third feasible implementation, for cross-domain scenarios of brain-computer interfaces, the data to be encrypted is neural signal data transmitted by the brain-computer interface. PTAC encoding is used to convert the data to be encrypted into a 12-bit pulse sequence, which is input into the target encryption layer composed of a 512×512 memristor cross array. Based on the synaptic weight matrix corresponding to the 50% balanced topology, an appropriate encryption key stream is generated to complete the encryption processing of neural signal data, and an encryption result that balances security and real-time performance is obtained to avoid medical data leakage.

[0056] Thus, this embodiment of the application first obtains operational environment parameters such as communication bandwidth, device computing power, and attack threat level of the current cross-domain communication scenario to achieve accurate perception of scenario resource constraints and security requirements, providing reliable data support for subsequent encryption adaptation; then, based on these operational environment parameters, it determines the target topology density of the preset encryption architecture, breaking the rigid limitation of fixed topology in traditional encryption architectures, enabling the topology density to be dynamically adjusted according to scenario differences, achieving precise matching between encryption complexity, resource consumption, and scenario requirements; furthermore, it constructs an adapted neural network connection topology based on the target topology density, forming a target encryption layer that fits the current scenario, achieving dynamic reconfigurability of the encryption core; finally, it encrypts the data to be encrypted through this target encryption layer to obtain an encryption result that meets the scenario's security and efficiency requirements. In IoT cross-domain scenarios with limited computing power, a low-density target encryption layer can reduce computational load, decrease device power consumption and response latency, and avoid resource overload. In quantum communication cross-domain scenarios with high security requirements, a high-density target encryption layer can increase encryption complexity and enhance the ability to resist advanced threats such as quantum attacks. In cross-domain scenarios with medium requirements, such as brain-computer interfaces, a target encryption layer with balanced topology density can balance security and efficiency, ensuring data transmission security and stable device operation. Overall, this effectively improves the adaptability of the encryption architecture to different cross-domain communication scenarios, fundamentally solving the technical problems of traditional fixed encryption structures being unable to adjust encryption complexity and resource consumption according to scenario requirements and having poor adaptability. It achieves a dynamic balance between security protection and resource efficiency in cross-domain encryption.

[0057] Based on the first embodiment of this application, in the second embodiment of this application, the content that is the same as or similar to that in the first embodiment described above can be referred to the above description and will not be repeated hereafter. Based on this, step S20 may include: Step 201: Construct a scenario threat vector based on the operating environment parameters, and normalize the scenario threat vector to obtain a normalized vector.

[0058] It should be noted that the scenario threat vector is a three-dimensional vector formed by quantifying and integrating the operating environment parameters (communication bandwidth, device computing power, and attack threat level), denoted as V=(B,C,L), where B represents communication bandwidth (unit: Gbps), C represents device computing power (unit: TOPS), and L represents attack threat level (dimensionless, quantized from 1 to 10 levels). It is used to centrally characterize the resource supply capacity and security risk level of the current cross-domain communication scenario. Normalization refers to the process of eliminating the dimensional differences of the parameters in the scenario threat vector and mapping the values ​​of each parameter to the [0,1] interval. The normalized vector is denoted as V'=(B',C',L'), where each component is in the [0,1] interval. This is used to eliminate the calculation bias caused by the differences in the magnitude of different parameters and to provide standardized input for subsequent topology density calculation.

[0059] After obtaining the operating environment parameters of the current cross-domain communication scenario, the three core parameters of communication bandwidth, device computing power, and attack threat level are first integrated in a preset order to construct a scenario threat vector, thereby achieving centralized integration of multi-dimensional scenario information. Since the parameters in the scenario threat vector have different dimensions and large differences in value range, direct use for calculation will lead to result deviation. Therefore, the scenario threat vector is then normalized. A preset normalization formula is used to uniformly map each parameter to the [0,1] interval to obtain a normalized vector, so that the three core parameters are at the same order of magnitude. This not only completes the standardized integration of scenario information, but also provides a reliable guarantee for the accurate calculation of the initial topology density, ensuring that the entire process is coherent and logically rigorous.

[0060] In the first feasible implementation, for low-computing-power cross-domain IoT scenarios, based on the collected operating environment parameters (communication bandwidth 0.5Gbps, device computing power 0.5TOPS, attack threat level 4), a scenario threat vector V=(0.5,0.5,4) is first constructed, and then a normalization formula is used: B'=(B B_min) / (B_max B_min); C'=(C C_min) / (C_max C_min); L'=(L L_min) / (L_max L_min); Wherein, B_min=0.1Gbps (preset minimum bandwidth for IoT devices), B_max=10Gbps (preset maximum bandwidth for cross-domain scenarios), C_min=0.1TOPS (preset minimum computing power for IoT devices), C_max=100TOPS (preset maximum computing power for cross-domain scenarios), L_min=1, L_max=10. The threat vector for this scenario is normalized to obtain the normalized vector V'≈(0.0404,0.0040,0.3333). In the second feasible implementation, for the high-security cross-domain scenario of quantum communication, based on the collected operating environment parameters (communication bandwidth 50Gbps, device computing power 50TOPS, attack threat level 9), a scenario threat vector V=(50,50,9) is first constructed. Then, the same normalization formula is used (where B_max is adjusted to 100Gbps) to normalize the scenario threat vector, resulting in a normalized vector V'≈(0.4995,0.4995,0.8889). In the third feasible implementation, for cross-domain scenarios of brain-computer interfaces, based on the collected operating environment parameters (communication bandwidth 5Gbps, device computing power 5TOPS, attack threat level 7), a scenario threat vector V=(5,5,7) is first constructed. Then, the same normalization formula is used (where B_max is adjusted to 100Gbps) to normalize the scenario threat vector, resulting in a normalized vector V'≈(0.0491,0.0491,0.6667).

[0061] Step 202: Determine the initial topological density based on the normalized vector and the preset density limit.

[0062] It should be noted that the preset density limit refers to the range of values ​​for the neuron connection topology density in the preset encryption architecture, specifically from 10% (D_min) to 90% (D_max), used to define the boundaries of the initial topology density. The initial topology density refers to the topology density calculated based on the normalized vectors, without adjustment for scene resource constraints. It is the basic calculated value of the target topology density and is used to initially match the security requirements and resource conditions of the scene.

[0063] The normalized vector is input into a preset mapping function (obtained through extensive scenario simulation training, using the Sigmoid function to achieve linear weighted sum mapping to the [0,1] interval). Combined with the preset weight coefficients of each parameter, the initial topological density is calculated. At the same time, the calculation results are constrained by a preset density limit (10%-90%) to ensure that the initial topological density is within a reasonable range, avoiding excessively high or low topological density due to calculation deviations, thus laying the foundation for subsequent adjustment of the target topological density.

[0064] In this embodiment, the preset density limit includes a preset upper density limit and a preset lower density limit. Step S202 may include: Step S2021: Perform a weighted summation on each element in the normalized vector to obtain the first sum value; Step S2022: Normalize the first sum to obtain the processed first sum; Step S2023: Determine the difference between the preset upper density limit and the preset lower density limit, and multiply the difference by the processed first sum to obtain the product; Step S2024: Summing the product with the preset density lower limit to obtain the initial topological density.

[0065] It should be noted that the preset density limit is the boundary of the neuron connection topology density in the preset encryption architecture. Specifically, it includes the preset density upper limit (D_max) and the preset density lower limit (D_min). The preset density upper limit is the maximum allowed neuron connection topology density (90%) of the preset encryption architecture, and the preset density lower limit is the minimum allowed neuron connection topology density (10%).

[0066] After obtaining the normalized vector, the preset weight coefficients (ω_B, ω_C, ω_L) are used to perform a weighted summation on each element of the vector. The sum of the products of each element and its corresponding weight coefficient is calculated to obtain the result value (hereinafter referred to as the first sum value for distinction). This process highlights the influence weight of different scenario parameters on topology density and avoids calculation deviations caused by equal influence of each parameter. Subsequently, the first sum value is normalized and constrained to the interval [0,1] to obtain the processed first sum value. This eliminates the magnitude fluctuation of the first sum value caused by the difference in weight coefficients and ensures that subsequent calculations are appropriate. Next, the difference between the preset upper and lower density limits is determined to clarify the adjustable range of the topology density. Then, this difference is multiplied by the processed first sum to convert the scene integration level into the topology density offset (the offset is positively correlated with the scene integration level). Finally, this product is summed with the preset lower density limit to obtain the initial topology density. The entire calculation process ensures that the initial topology density is always within the preset density limit (10%-90%), which not only achieves a precise correspondence between the scene integration level and the topology density, but also lays a reliable foundation for the subsequent adjustment of the target topology density.

[0067] In the first feasible implementation, for IoT low-computing-power cross-domain scenarios, the normalized vector V'≈(0.0404,0.0040,0.3333) is input into the mapping function: D = D_min + (D_max) D_min)×Sigmoid(ω_B×B'+ω_C×C'+ω_L×L'), With ω_B=2.0, ω_C=3.0, ω_L=5.0, D_min=10%, and D_max=90%, the calculated initial topological density is approximately 78.3%, which is within the preset density limit range.

[0068] In the second feasible implementation, for the high-security cross-domain scenario of quantum communication, the normalized vector V'≈(0.4995,0.4995,0.8889) is input into the same mapping function mentioned above, where ω_B=0.5, ω_C=0.5, ω_L=8.0 (emphasis on threat level in quantum scenario), D_min=10%, D_max=90%, and the calculated initial topological density is ≈89.9%, which is within the preset density limit range (10%-90%).

[0069] In the third feasible implementation, for the cross-domain scenario of brain-computer interface, the normalized vector V'≈(0.0491,0.0491,0.6667) is input into the same mapping function mentioned above, where ω_B=3.0, ω_C=3.0, ω_L=4.0, D_min=10%, D_max=90%, and the calculated initial topological density is ≈86.1%, which is within the preset density limit range.

[0070] Step S203: Determine the target topology density based on the initial topology density and the preset density constraints.

[0071] It should be noted that the preset density constraint refers to the topology density limit set according to the resource upper limit (such as the low computing power constraint of IoT devices) and the bottom line of security requirements for different cross-domain communication scenarios. It is used to adjust the initial topology density to adapt it to the actual hardware capabilities of the scenario. The target topology density refers to the topology density used to build the neuron connection topology after the density constraint adjustment. It is the optimal density value adapted to the current scenario and is used for the subsequent construction of the neuron connection topology.

[0072] In this embodiment, the density constraint includes computing power constraint, encryption complexity constraint, and latency constraint. Step S203 may include: Step S2031: Determine the target constraint based on the computing power constraint, the encryption complexity constraint, and the delay constraint.

[0073] It should be noted that density constraints include computing power constraints, encryption complexity constraints, and latency constraints: Computing power constraints refer to the topology density limit set based on the current scenario's maximum computing power, used to prevent excessive topology density from overloading the device's computing power; encryption complexity constraints refer to the topology density limit set based on the current scenario's security requirements, used to ensure that the topology density meets the scenario's encryption security requirements; latency constraints refer to the topology density limit set based on the current scenario's communication latency requirements, used to prevent excessive topology density from causing communication latency to exceed the scenario's tolerance range. Target constraints refer to the final topology density limit determined after comprehensively considering computing power constraints, encryption complexity constraints, and latency constraints, and are the core basis for subsequent selection of target topology densities.

[0074] The specific requirements of computing power constraints, encryption complexity constraints, and latency constraints in the current cross-domain communication scenario are clearly defined. Then, the three constraints are comprehensively analyzed, conflicting constraints are eliminated, and all valid constraints are retained. The target constraints that can simultaneously meet the requirements of computing power, encryption complexity, and latency are determined, ensuring that the target constraints are both compatible with the hardware resources of the scenario and meet the security and efficiency requirements of the scenario. This provides a clear standard for the subsequent determination of the target topology density.

[0075] Step S2032: Determine the target topology density that satisfies the target constraint from the density limit corresponding to the target constraint and the initial topology density.

[0076] It should be noted that the density limit corresponding to the target constraint refers to the range of topological density values ​​(such as upper limit, lower limit or interval) defined by the target constraint.

[0077] The initial topological density is compared with the density limit corresponding to the target constraint to determine whether the initial topological density meets the target constraint: if the initial topological density is within the density limit range corresponding to the target constraint, it is directly used as the target topological density; if the initial topological density exceeds the density limit corresponding to the target constraint, the initial topological density is corrected according to the density limit corresponding to the target constraint (such as taking the upper or lower limit of the constraint), and finally the target topological density that meets all constraints and is suitable for the current scene is obtained, providing an accurate basis for the subsequent construction of neuron connection topology.

[0078] In the first feasible implementation, for IoT low-computing-power cross-domain scenarios, the density constraints are specifically: computing power constraint (topology density ≤ 25%, adapting to the current scenario's low computing power of 0.5 TOPS), encryption complexity constraint (topology density ≥ 10%, meeting basic security requirements), and latency constraint (topology density ≤ 30%, avoiding excessive latency). The target constraint is determined to be "topology density 10%-25%". The initial topology density of 78.3% exceeds this range, so it is corrected to the upper limit of the target constraint of 25%, and the final target topology density is determined to be 25%.

[0079] In the second feasible implementation, for the high-security cross-domain scenario of quantum communication, the density constraints are specifically: computing power constraint (topology density ≤ 90%, adapting to 100 TOPS high computing power), encryption complexity constraint (topology density ≥ 70%, resisting quantum attacks), and latency constraint (topology density ≤ 90%, adapting to 50Gbps high bandwidth). The target constraint is determined to be "topology density 70%-90%". The initial topology density of 89.9% is within this range, so it is directly used as the target topology density.

[0080] In the third feasible implementation, for cross-domain brain-computer interface scenarios, the density constraints are specifically: computing power constraints (topology density ≤ 60%, adapting to 10 TOPS computing power), encryption complexity constraints (topology density ≥ 40%, ensuring neural signal security), and latency constraints (topology density ≤ 55%, meeting the real-time medical transmission requirements). The target constraint is determined to be "topology density 40%-55%". The initial topology density of 86.1% exceeds this range, so it is corrected to the upper limit of the target constraint of 55%. The final target topology density is determined to be 55% (Note: Because the initial topology density exceeds the constraint after correction, the target topology density is adjusted synchronously to ensure compliance with the computing power constraints of the scenario).

[0081] Thus, this application embodiment constructs and normalizes the scenario threat vector by integrating scenario operating environment parameters, and completes standardized calculations by combining preset density limits. At the same time, it takes into account computing power, encryption complexity and latency constraints, and achieves deep adaptation between topology density and scenario resource supply and security requirements. This avoids problems such as device overload and insufficient security caused by excessively high or low topology density, and provides reliable support for the construction of the target encryption layer. Overall, it solves the core defects of traditional encryption technology, such as poor adaptability and inability to balance security and efficiency.

[0082] In this embodiment, the preset encryption architecture uses a memristor cross array of a preset size, and step S30 may include: Step S301: Determine the adjacency matrix corresponding to the neuron connection topology of the target encryption layer, and determine the degree sequence based on the adjacency matrix; It should be noted that the adjacency matrix is ​​a two-dimensional matrix representing the topology of neuron connections in the target encryption layer. Matrix elements take values ​​of 0 or 1, where 1 indicates a connection between two neurons and 0 indicates no connection. Its dimension matches the size of the preset memristor cross array. The degree sequence refers to the sequence of the number of connections corresponding to each neuron in the adjacency matrix (i.e., the number of 1s in each row or column of the matrix). It reflects the density of the neuron connection topology and provides core seed parameters for the subsequent generation of chaotic sequences.

[0083] After obtaining the target encryption layer adapted to the current cross-domain communication scenario, the adjacency matrix corresponding to its neuron connection topology is extracted first. By traversing each row (or column) of the adjacency matrix, the number of neuron connections is counted, and a degree sequence is generated to quantify the neuron connection topology features. This provides an accurate seed for the subsequent generation of chaotic sequences, ensuring that the chaotic sequences are highly adapted to the topology of the target encryption layer, thus laying the foundation for pulse coding and memristor array encryption.

[0084] Step S302: Generate a chaotic sequence using the mean of the degree sequence as a seed, and construct a dynamic encoding template based on the chaotic sequence; It should be noted that a chaotic sequence refers to a highly random and unpredictable sequence generated using the mean of the degree sequence as the initial seed and through a preset chaotic mapping (such as a Logistic mapping), used to ensure the security of encryption keys. A dynamic codebook is a set of encoding rules built upon the randomness of chaotic sequences. It defines the mapping relationship of pulse coding and can be dynamically adjusted according to the chaotic sequence, improving the encoding's resistance to cracking.

[0085] First, the mean of the degree sequence is calculated, and this mean is used as the initial seed to input the preset chaotic mapping model to generate a highly random chaotic sequence. Then, based on the random characteristics of the chaotic sequence, a dynamically changing codebook is constructed to make the encoding rules unpredictable, avoid the defects of fixed codebooks being easily cracked, and at the same time ensure that the codebook is compatible with the topology of the target encryption layer and the hardware characteristics of the memristor cross array.

[0086] Step S303: Based on the chaotic sequence and the dynamic codebook, perform pulse coding processing on the data to be encrypted to obtain a pulse sequence; It should be noted that pulse coding processing refers to the process of converting continuous or discrete data to be encrypted into a pulse signal sequence that conforms to the operational logic of a memristor cross array. Different algorithms (including PTAC and PCM algorithms) can be selected to implement this process depending on the scenario requirements. The pulse sequence is a set of discrete pulse signals obtained after pulse coding processing, which is used as input to the memristor cross array to complete the encryption operation.

[0087] The data to be encrypted is input into a preset encoding module. Combining the randomness of the chaotic sequence and the encoding rules of the dynamic encoding book, the data to be encrypted is converted into a pulse sequence through pulse encoding processing. During this process, an appropriate pulse encoding algorithm can be selected according to the bandwidth, computing power and security requirements of the current cross-domain communication scenario to ensure that the pulse sequence can not only adapt to the hardware operation logic of the memristor cross array, but also take into account both encryption efficiency and security strength, so as to provide an appropriate input signal for subsequent encryption operations.

[0088] Step S304: Input the pulse sequence into the memristor cross array to obtain the encryption result.

[0089] It should be noted that the pre-sized memristor cross array is the hardware foundation of the target encryption layer. Its size matches the scale of the neuron connection topology and has the characteristics of high parallel operation and low power consumption.

[0090] In the first feasible implementation, for IoT low-computing-power cross-domain scenarios, the steps of using the PTAC algorithm to implement pulse coding processing include: determining the adjacency matrix (256×256, matching the size of the memristor cross array) corresponding to the connection topology of the target encryption layer neurons; counting the number of 1s in each row based on the adjacency matrix to generate a degree sequence, and calculating the mean of the degree sequence to ≈64; using 64 as a seed, generating a chaotic sequence through Logistic chaotic mapping, and constructing a dynamic encoding book based on this chaotic sequence; and using the PTAC algorithm to pulse code the IoT sensor data to be encrypted (such as temperature and status data) to obtain an 8-bit pulse sequence, the specific pulse coding formula being:

[0091] Where x is the data to be encrypted (temperature 25℃), X is the Tent chaotic sequence, and i is the encoding bit index. This is a dynamic threshold, and the dynamic threshold is calculated as follows: , The base threshold is set to 0.5. Let i be the i-th element of the normalized degree sequence. Substitute the data to calculate... The value range is 0.45~0.55. For example, x=25, and the encoded 8-bit pulse sequence P=[1,0,1,1,0,0,1,0]. This pulse sequence is input into a 256×256 memristor cross array to generate an encryption key stream. The pulse sequence is then encrypted using this key stream to obtain the encryption result. Thus, compared to static PCM encoding, the PTAC algorithm, in the current wireless network scenario, can ensure that the correlation coefficient of pulse sequences generated by the same temperature data in different topologies is less than 0.1, thereby effectively resisting attacks based on flow analysis and providing a dynamically changing, highly secure input for subsequent neuromorphic encryption.

[0092] In the second feasible implementation, for high-security cross-domain scenarios in quantum communication, the steps of implementing pulse coding processing using the PCM algorithm (PCM is a reasonable alternative implementation of pulse coding, suitable for real-time encryption requirements in high-bandwidth, high-computing-power scenarios) include: determining the adjacency matrix (1024×1024, matching the size of the memristor cross array) corresponding to the topology of the target encryption layer neurons; generating a degree sequence based on the adjacency matrix, calculating the mean of the degree sequence to approximately 870; generating a chaotic sequence with 870 as the seed to construct a dynamic encoding template; pulse coding the quantum key data to be encrypted using the PCM algorithm based on the chaotic sequence and the dynamic encoding template, obtaining a 16-bit pulse sequence; inputting this pulse sequence into a 1024×1024 memristor cross array to generate an encryption key stream; and performing encryption operations on the pulse sequence using this encryption key stream to obtain the encryption result. Wherein, the pulse signal frequency f = 1 GHz = 109 Hz, 16-bit encoding, original key stream rate R = f × 16 = 16 Gbps. Effective key rate R_eff = R × η, where η = 0.0625 (the effective data ratio in quantum communication scenarios is reduced due to synchronization and verification overhead), therefore R_eff = 16 × 0.0625 = 1 Gbps.

[0093] In the third feasible implementation, for cross-domain scenarios of brain-computer interfaces, the steps of using the PTAC algorithm to implement pulse coding processing include: determining the adjacency matrix (512×512, adapted to memristor cross array) corresponding to the neuron connection topology of the target encryption layer; generating a degree sequence based on the adjacency matrix, and calculating the mean of the degree sequence ≈ 256; generating a chaotic sequence with 256 as the seed to construct a dynamic encoding template; using the chaotic sequence and the dynamic encoding template, pulse coding is performed on the neural signal data to be encrypted using the PTAC algorithm to obtain a 12-bit pulse sequence. For example, plaintext x=1500 is encoded as a pulse sequence P=[1,0,1,1,0,0,1,0,1,1,0,1]; inputting the pulse sequence into a 512×512 memristor cross array to complete the encryption process and obtain an encryption result that balances security and real-time performance. Wherein, the pulse signal frequency f = 800MHz = 8 × 10⁸ Hz, 12-bit encoding, and the original key stream rate R = f × 12 = 9.6 Gbps. The effective key rate Reff = R × η, where η = 0.0625 (a high-strength synchronization and verification mechanism is introduced to ensure the timing accuracy of the neural signal, resulting in significant overhead), therefore Reff = 9.6 × 0.0625 = 0.6 Gbps = 600 Mbps.

[0094] In this embodiment, as Figure 2 The diagram illustrates the cross-domain encryption process. First, the operating environment parameters of the current cross-domain communication scenario are obtained, and a scenario threat vector is constructed. The scenario threat vector is then normalized to obtain a normalized vector. The normalized vector is substituted into a mapping function to obtain an initial topology density. From the initial topology density within the limits of preset density constraints, a target topology density that satisfies the density constraints of the current scenario is determined. Based on the target topology density, a neural network topology of a preset encryption architecture is constructed to obtain a target encryption layer adapted to the current scenario. Simultaneously, it monitors whether an encryption command (indicating an encryption task) is received. In response to the encryption command, the data to be encrypted is pulse-encoded to obtain a pulse sequence, which is then encrypted by the target encryption layer to obtain the encryption result.

[0095] Thus, this embodiment of the application maps the topology of the target encryption layer neurons to an adjacency matrix and extracts the degree sequence. It uses the mean of the degree sequence as a seed to generate a highly random chaotic sequence and a dynamic codebook. Combined with a pulse coding algorithm adapted to the scenario, a pulse sequence is generated. Then, encryption is completed through a memristor cross array. This effectively achieves deep adaptation between the encryption process and the topology and hardware characteristics. It not only relies on the chaotic sequence and the dynamic codebook to improve the encryption resistance to cracking, but also uses the high parallelism of the memristor cross array to ensure encryption efficiency. At the same time, it adapts to the encoding requirements of different scenarios, taking into account encryption security, operating efficiency and scenario adaptability, and provides reliable and efficient technical support for cross-domain data encryption.

[0096] Based on the first embodiment of this application, in the second embodiment of this application, the content that is the same as or similar to that in the first embodiment described above can be referred to the above description and will not be repeated hereafter. Furthermore, the cross-domain encryption method of this application also includes: Step A10: During the encryption process of the data to be encrypted through the target encryption layer, in response to the detected attack behavior, the attack behavior is subjected to attack feature extraction to obtain an attack feature vector, wherein the attack feature vector includes attack frequency, data tampering rate and duration of continuous attack. It should be noted that attack behavior refers to malicious interference or cracking of cross-domain encrypted data or encryption architecture detected during the encryption process. Attack feature extraction refers to the process of quantifying and collecting the core features of attack behavior by the attack feature recognition model. The attack feature vector is a set of quantified core attack features, specifically including attack frequency (unit: times / second), data tampering rate (dimensionless, 0-1 interval), and duration of continuous attack (unit: seconds), used to accurately characterize the intensity and characteristics of attack behavior.

[0097] Throughout the entire process of data encryption at the target encryption layer, the operating status of the encryption link and the memristor cross array is monitored in real time. When an attack is detected, the feature extraction mechanism is immediately triggered to quantify and collect three core features of the attack: attack frequency, data tampering rate, and duration of continuous attack. These features are then integrated to form an attack feature vector, providing accurate attack feature input for the subsequent determination of the antibody factor matrix, thus achieving accurate identification and quantification of attack behavior.

[0098] Step A20: Determine the antibody factor matrix based on the attack feature vector, wherein the antibody factor matrix has the same dimension as the synaptic weight matrix of the memristor cross array; It should be noted that the synaptic weight matrix is ​​a quantification matrix of the neuron connection strength in the memristor cross array. Its dimensions are consistent with the size of the memristor cross array and its adjacency matrix, and it determines the encryption performance of the target encryption layer. The antibody factor matrix is ​​a correction matrix generated based on attack characteristics and used to resist corresponding attacks. Its dimensions perfectly match those of the synaptic weight matrix.

[0099] In this embodiment, step A20 may include: Step A201: Recalibrate the attack feature vector to obtain the recalibrated vector; It should be noted that the attack feature vector is recalibrated to highlight its key features.

[0100] For example, the attack feature vector is passed through a lightweight compression-activation network (SENet) module to obtain the recalibrated vector F'_attack, which can be represented as: F'_attack=F_attack⊙σ(W2 δ(W1 GAP(F_attack))) Where ⊙ represents element-wise multiplication (Hadamard product), GAP ( ) represents the global average pooling operation, W1 and W2 are the weight matrices of the fully connected layer, δ is the ReLU activation function, and σ is the Sigmoid activation function.

[0101] Step A202: Input the recalibrated vector into a preset encoder, and generate heterogeneous antibody factors corresponding to each element in the attack feature vector through multiple preset projection heads; It should be noted that the default encoder is a miniature Transformer encoder, and the projection head is a sub-module built into the encoder. Each projection head corresponds to one element in the attack feature vector and has independent feature transformation capabilities, which can generate antibody factors with corresponding defensive characteristics.

[0102] After obtaining the recalibrated standardized vector, it is input into a preset encoder. The encoder automatically calls a corresponding number of preset projection heads (three sets of projection heads for three core elements) based on the number of elements in the attack feature vector. Each projection head is specifically designed for one type of attack feature element. Through a preset transformation algorithm, the standardized feature values ​​are converted into heterogeneous antibody factors with corresponding defensive properties. Specifically, the projection head corresponding to the attack frequency generates antibody factors to resist interference from the attack frequency, the projection head corresponding to the data tampering rate generates antibody factors to resist data tampering, and the projection head corresponding to the duration of the sustained attack generates antibody factors to resist long-term attacks. This ensures that each attack feature has a corresponding defensive factor, providing diverse and targeted inputs for the subsequent weighted fusion to generate the antibody factor matrix, achieving a precise correspondence between attack features and defensive factors.

[0103] For example, in a brain-computer interface scenario, F'_attack = (800MHz, 0.4%, 1.5s). The recalibrated vector F'_attack is input to a miniature Transformer encoder, and through different projection heads, k=3 heterogeneous antibody factors {F_type1, F_type2, F_type3}∈ These are used to optimize the anti-attack capabilities corresponding to the three attack characteristics. The generation process of the above heterogeneous antibody factors can be represented as: F_typek=Head_k(Transformer(F'_attack)), where k=1,2,3.

[0104] Step A203: Determine the confidence level of each element in the attack feature vector, and perform weighted fusion processing on each heterogeneous antibody factor based on each confidence level to obtain an antibody factor matrix.

[0105] It should be noted that confidence level refers to the credibility of each element in the attack feature vector in representing the attack behavior. The value range is [0,1]. The higher the confidence level, the more accurate the representation of the attack behavior by that element is, and the greater the defensive weight of the corresponding heterogeneous antibody factor.

[0106] The algorithm analyzes the representational power of each element in the attack feature vector using a pre-defined algorithm, determining the confidence level of each element. Data tampering rate has the highest representational power for attack behavior and corresponds to the highest confidence level. Attack frequency and duration of sustained attacks are assigned confidence levels based on scenario requirements. Subsequently, each heterogeneous antibody factor is multiplied by its corresponding confidence level to achieve differentiated allocation of defense weights, giving antibody factors corresponding to attack features with strong representational power higher defense weights. Finally, all weighted heterogeneous antibody factors are fused and integrated, generating an antibody factor matrix with the same dimension as the synaptic weight matrix through matrix operations. This ensures that the antibody factor matrix accurately matches the defense requirements of the attack features and adapts to the hardware dimension of the memristor cross array, providing a reliable basis for subsequent correction of the synaptic weight matrix and completing the closed loop of transformation from attack features to defense correction matrix.

[0107] For example, in low-computing-power IoT scenarios, based on the confidence distribution of the attack characteristics [ , , (Calculated by Softmax from the output layer of the ResNet model), the heterogeneous antibodies are weighted and fused to obtain the final antibody factor matrix F, which can be expressed as: F = F_type1+ F_type2+ F_type3. Wherein... + + =1. In the passive eavesdropping attack of this embodiment, the confidence distribution is [0.7, 0.2, 0.1], indicating that the system determines that this attack is mainly frequency sniffing. Finally, the synaptic weight matrix of the neural synaptic encryption layer is modified using the fused antibody factor matrix F (the security threshold mechanism remains unchanged), where the security threshold mechanism refers to the weight range in the matrix being within a preset security range.

[0108] Thus, this application employs the AHAG (Attention-based Heterogeneous Antibody Generation) algorithm, increasing the success rate of defense against hybrid attacks (such as those involving both eavesdropping and minor tampering) from ~70% in the original GAN ​​(Generative Adversarial Network) scheme to 92%. Simultaneously, because antibody generation is more targeted, unnecessary weight perturbations are avoided, and the architecture's efficiency score (E_efficiency) remains stable during the defense process, with fluctuations less than ±2%. It should be noted that the AHAG algorithm can automatically focus on key features in composite attacks and generate a set of heterogeneous antibody factors with different correction strategies to achieve precise combined defense against attacks at complex locations, improving the intelligence and effectiveness of immune protection.

[0109] Step A30: Based on the antibody factor matrix, the synaptic weight matrix is ​​modified to obtain the modified synaptic weight matrix; A preset correction algorithm is invoked to fuse the antibody factor matrix with the synaptic weight matrix of the current memristor cross array. The formula W_new=W_old+λ×F (where λ is the influence coefficient, ranging from 0.1 to 0.5, dynamically adjusted according to scenario requirements) is used to perturb and correct the elements of the synaptic weight matrix through the antibody factor matrix, adjusting the neuron connection strength, strengthening the encryption layer's defense against current attacks, and offsetting the interference of attacks on the encryption process. After correction, the corrected synaptic weight matrix is ​​obtained. This matrix retains the original encryption core logic while adding targeted defense features, providing core support for subsequent optimization of the target encryption layer.

[0110] Step A40: Generate an optimized target encryption layer based on the modified synaptic weight matrix, and perform the step of encrypting the data to be encrypted through the target encryption layer to obtain the encryption result based on the optimized target encryption layer.

[0111] Based on the modified synaptic weight matrix, the neuronal connection topology of the target encryption layer is reconstructed to generate an optimized target encryption layer. The neuronal connection strength and distribution of this encryption layer are modified by antibody factors, which can specifically resist the currently detected attack behavior and adapt to the hardware characteristics of the memristor cross array. After reconstruction, the encryption process defined above is followed, and the encryption processing of the data to be encrypted is continued based on the optimized target encryption layer to realize the closed loop of "attack detection → feature extraction → antibody generation → weight correction → encryption layer optimization → continuous encryption", ensuring that the encryption process is not interrupted, while improving the anti-attack capability and dynamic adaptability of the encryption architecture.

[0112] In this embodiment, as Figure 3 The diagram shows a schematic of the encryption architecture, which includes a neural synaptic encryption layer, a dynamic topology adaptation layer, and a cross-domain immune protection layer. The neural synaptic encryption layer is based on a memristor cross array (specifications can be 256×256, 512×512, and 1024×1024, etc.). The dynamic topology adaptation layer includes a scene perception unit and a topology generation module. The scene perception unit collects runtime environment parameters, and the topology generation module (GNN) generates the neuron connection topology of the memristor cross array. The cross-domain immune protection layer includes an attack feature recognition module and an antibody factor generation unit. The attack feature recognition module identifies attack behaviors and extracts attack features, while the antibody factor generation unit (using the AHAG algorithm) generates antibody factors based on the attack feature vectors to adjust the synaptic weight matrix in the neural synaptic encryption layer, thereby improving the encryption layer's anti-attack capability, especially its defense against unknown attacks.

[0113] Thus, this application addresses the problem that traditional encryption technologies lack effective defense mechanisms against novel location attacks by employing a deep residual network to construct an attack feature recognition model, which monitors and identifies various attack behaviors in real time, extracts attack features, and generates immune antibody factors through a generative adversarial network to correct the weight matrix of the neural synaptic encryption layer, thereby improving the anti-attack capability of the encryption architecture.

[0114] Based on the first and second embodiments of this application, in the third embodiment of this application, the content that is the same as or similar to that in embodiments one and two above can be referred to the above description and will not be repeated hereafter. Furthermore, the cross-domain encryption method of this application also includes: Step B10: In response to the satisfaction of the preset self-evolution triggering condition, perform multi-dimensional performance evaluation on the target encryption layer or the optimized target encryption layer to obtain multiple performance scores; It should be noted that the preset self-evolution trigger conditions are the core prerequisites for driving the self-evolution module to start. These conditions include three categories: the security score falling below a preset threshold, the rate of change of environmental characteristics (attack frequency, bandwidth, computing load) exceeding a set proportion, and a fixed-period system "health check" update. Meeting any one of these three conditions will trigger self-evolution. Multi-dimensional performance evaluation refers to a comprehensive assessment based on the core performance dimensions of the encryption architecture, including at least four core dimensions: security score, computing overhead score, communication efficiency score, and environment compatibility score. The evaluation scores (i.e., performance scores) for each of these four dimensions range from 0 to 1 and are used in the subsequent calculation of the comprehensive score.

[0115] The system monitors the encryption layer's operating status, environmental parameters, and security level in real time, continuously determining whether the preset self-evolution trigger conditions are met. When the security score falls below the threshold, environmental characteristics fluctuate drastically, or a fixed "check-up" cycle is reached, the system immediately responds and initiates the self-evolution process. First, it performs a multi-dimensional performance evaluation on the currently running target encryption layer (before attack correction) or the optimized target encryption layer (after attack correction). It evaluates the performance from four core dimensions: security, computing power consumption, communication efficiency, and environment compatibility. Combining the calculation basis of each dimension, it completes a quantitative score, resulting in four independent performance scores. This provides accurate performance evaluation basis for subsequent comprehensive score calculation and encryption layer optimization, ensuring that the self-evolution optimization is targeted.

[0116] Step B20: Determine a comprehensive score based on each performance score, and determine whether the comprehensive score is lower than a preset score threshold; After obtaining the four performance scores, the weights of each performance score are determined based on the core requirements of the current cross-domain scenario (e.g., IoT scenarios emphasize computing power overhead, while quantum communication scenarios emphasize security and communication efficiency). These weights are then substituted into a preset comprehensive score calculation formula to calculate the overall comprehensive score of the encryption layer. The preset comprehensive score calculation formula is expressed as: Total=(w1×Ssec)+(w2×Scomp)+(w3×Seff)+(w4×Sctx), where w1-w4 are the weights of each dimension (which can be dynamically adjusted according to the scenario), Ssec is the security score, Scomp is the computing power overhead score, Seff is the communication efficiency score, and Sctx is the environment matching score. Subsequently, the comprehensive score is compared with a preset score threshold (default 0.65) to determine whether the current overall performance of the encryption layer meets the scenario requirements: if the comprehensive score is not lower than the threshold, the encryption layer is considered to be operating well, and the current parameters are maintained; if the comprehensive score is lower than the threshold, the encryption layer performance is considered to be unbalanced, and subsequent parameter optimization processes need to be initiated to ensure the rationality and targeting of the self-evolutionary optimization.

[0117] Step B30: If the overall score is lower than the preset score threshold, optimize the parameters of the target encryption layer based on each performance score to obtain a self-evolved target encryption layer, and then perform the step of encrypting the data to be encrypted through the target encryption layer to obtain the encryption result based on the self-evolved target encryption layer.

[0118] When the overall score is determined to be lower than the preset score threshold, the encryption layer parameter optimization process is initiated. First, a source analysis is performed on the performance scores of each dimension to identify the lowest-scoring sub-item (performance bottleneck), and targeted optimization strategies are formulated: if the security score is low, the neuron connection density D is increased; if the computing power overhead score is low, a topology pruning algorithm is initiated to reduce the connection density D; if the environment matching score is low, the antibody factor coefficient Alpha is adjusted. Then, according to the optimization strategy, the optimized parameters are calculated by substituting them into the parameter reconstruction formula (D_new=D_old+Beta×(1-Stotal), where Beta is the learning rate coefficient). Based on the optimized parameters, the neuron connection topology is reconstructed to obtain the self-evolved target encryption layer. Finally, the original encryption process is continued to encrypt the data to be encrypted based on the self-evolved target encryption layer, realizing the dynamic self-evolution of the encryption layer and ensuring that the encryption performance always adapts to the needs of the scenario.

[0119] Thus, this application addresses the problem that traditional encryption technologies cannot autonomously optimize encryption strategies based on environmental changes and attack threats. By triggering condition responses, multi-dimensional performance evaluation, and targeted parameter optimization, it achieves dynamic self-evolution of the encryption layer. This not only allows for real-time adaptation to scenario resource bottlenecks and changes in attack threats, overcoming the shortcomings of traditional encryption layers with fixed performance and inability to dynamically adapt, but also balances encryption security, computing power consumption, and environmental adaptability through comprehensive scoring and parameter optimization, continuously improving the operational performance of the encryption layer and further enhancing the reliability, adaptability, and long-term operational stability of the cross-domain encryption architecture.

[0120] This application also provides a cross-domain encryption device; please refer to... Figure 4 The cross-domain encryption device includes: The parameter acquisition module 10 is used to acquire the operating environment parameters of the current cross-domain communication scenario; Density determination module 20 is used to determine the target topology density of the preset encryption architecture based on the operating environment parameters; Topology construction module 30 is used to construct the neuron connection topology of the preset encryption architecture according to the target topology density, so as to obtain a target encryption layer adapted to the current cross-domain communication scenario; The encryption module 40 is used to encrypt the data to be encrypted through the target encryption layer to obtain the encryption result.

[0121] Optionally, the density determination module 20 is further configured to: A scenario threat vector is constructed based on the aforementioned operating environment parameters, and the scenario threat vector is normalized to obtain a normalized vector. The initial topological density is determined based on the normalized vector and the preset density limit. The target topology density is determined based on the initial topology density and the preset density constraints.

[0122] Optionally, the preset density limit includes a preset upper density limit and a preset lower density limit, and the density determination module 20 is further configured to: The elements in the normalized vector are weighted and summed to obtain the first sum. The first sum is normalized to obtain the processed first sum. Determine the difference between the preset upper density limit and the preset lower density limit, and multiply the difference by the processed first sum to obtain the product; The product is summed with the preset lower density limit to obtain the initial topological density.

[0123] Optionally, the density constraint includes computing power constraint, encryption complexity constraint, and latency constraint, and the density determination module 20 is further used for: Based on the computing power constraint, the encryption complexity constraint, and the latency constraint, the target constraint is determined; The target topology density that satisfies the target constraint is determined from the density limit corresponding to the target constraint and the initial topology density.

[0124] Optionally, the preset encryption architecture employs a memristor cross array of a preset size, and the encryption module 40 is further used for: Determine the adjacency matrix corresponding to the neuron connection topology of the target encryption layer, and determine the degree sequence based on the adjacency matrix; A chaotic sequence is generated using the mean of the degree sequence as a seed, and a dynamic encoding template is constructed based on the chaotic sequence; Based on the chaotic sequence and the dynamic codebook, the data to be encrypted is subjected to pulse coding processing to obtain a pulse sequence; The pulse sequence is input into the memristor cross array to obtain the encryption result.

[0125] Optionally, the cross-domain encryption device further includes an anti-attack module, which is used for: During the encryption process of the data to be encrypted through the target encryption layer, in response to the detected attack behavior, the attack behavior is subjected to attack feature extraction to obtain an attack feature vector, wherein the attack feature vector includes attack frequency, data tampering rate and duration of continuous attack. The antibody factor matrix is ​​determined based on the attack feature vector, wherein the antibody factor matrix has the same dimension as the synaptic weight matrix of the memristor cross array; The synaptic weight matrix is ​​modified based on the antibody factor matrix to obtain the modified synaptic weight matrix. An optimized target encryption layer is generated based on the modified synaptic weight matrix, and the step of encrypting the data to be encrypted through the target encryption layer to obtain the encryption result is performed based on the optimized target encryption layer.

[0126] Optionally, the anti-attack module is further used for: The attack feature vector is recalibrated to obtain the recalibrated vector; The recalibrated vector is input into a preset encoder, and heterogeneous antibody factors corresponding to each element in the attack feature vector are generated by multiple preset projection heads. The confidence level of each element in the attack feature vector is determined, and the heterogeneous antibody factors are weighted and fused based on the confidence level to obtain the antibody factor matrix.

[0127] Optionally, the cross-domain encryption device further includes a self-evolving module, which is used for: In response to the satisfaction of preset self-evolution triggering conditions, the target encryption layer or the optimized target encryption layer is evaluated in multiple dimensions to obtain multiple performance scores; A comprehensive score is determined based on each of the performance scores, and it is determined whether the comprehensive score is lower than a preset score threshold. If the overall score is lower than the preset score threshold, the parameters of the target encryption layer are optimized based on each performance score to obtain a self-evolved target encryption layer. The step of encrypting the data to be encrypted through the target encryption layer to obtain the encryption result is then performed based on the self-evolved target encryption layer.

[0128] The cross-domain encryption device provided in this application, employing the cross-domain encryption method described in the above embodiments, can solve the technical problem of how to improve encryption adaptability for different cross-domain communication scenarios, thereby enhancing data encryption effectiveness. Compared with the prior art, the beneficial effects of the cross-domain encryption device provided in this application are the same as those of the cross-domain encryption method provided in the above embodiments, and other technical features in the cross-domain encryption device are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.

[0129] This application provides an electronic device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the cross-domain encryption method in Embodiment 1 above.

[0130] The following is for reference. Figure 5The diagram illustrates a structural schematic of an electronic device suitable for implementing embodiments of this application. The electronic devices in these embodiments may include, but are not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 5 The electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.

[0131] like Figure 5 As shown, the electronic device may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory 1002 or a program loaded from a storage device 1003 into a random access memory 1004. The random access memory 1004 also stores various programs and data required for the operation of the electronic device. The processing unit 1001, the read-only memory 1002, and the random access memory 1004 are interconnected via a bus 1005. An input / output interface 1006 is also connected to the bus. Typically, the following systems can be connected to the input / output interface 1006: input devices 1007 including, for example, touchscreens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices 1008 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 1003 including, for example, magnetic tapes, hard disks, etc.; and communication devices 1009. The communication device 1009 allows the electronic device to communicate wirelessly or wiredly with other devices to exchange data. Although the diagrams show electronic devices with various systems, it should be understood that it is not required to implement or have all of the systems shown. More or fewer systems may be implemented alternatively.

[0132] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from read-only memory 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.

[0133] The electronic device provided in this application, employing the cross-domain encryption method in the above embodiments, can solve the technical problem of how to improve encryption adaptability for different cross-domain communication scenarios, thereby enhancing data encryption effectiveness. Compared with the prior art, the beneficial effects of the electronic device provided in this application are the same as those of the cross-domain encryption method provided in the above embodiments, and other technical features in this electronic device are the same as those disclosed in the previous embodiment method, and will not be repeated here.

[0134] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.

[0135] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

[0136] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, the computer-readable program instructions being used to execute the cross-domain encryption method in the above embodiments.

[0137] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems or devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.

[0138] The aforementioned computer-readable storage medium may be included in an electronic device or may exist independently without being assembled into an electronic device.

[0139] The aforementioned computer-readable storage medium carries one or more programs. When the aforementioned one or more programs are executed by an electronic device, the electronic device: obtains the operating environment parameters of the current cross-domain communication scenario; determines the target topology density of the preset encryption architecture based on the operating environment parameters; constructs the neural network connection topology of the preset encryption architecture according to the target topology density to obtain a target encryption layer adapted to the current cross-domain communication scenario; and encrypts the data to be encrypted through the target encryption layer to obtain an encryption result.

[0140] Computer program code for performing the operations of this application can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0141] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0142] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.

[0143] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the above-described cross-domain encryption method. This solves the technical problem of how to improve encryption adaptability for different cross-domain communication scenarios, thereby enhancing data encryption effectiveness. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the cross-domain encryption method provided in the above embodiments, and will not be repeated here.

[0144] This application provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the cross-domain encryption method described above.

[0145] The computer program product provided in this application can improve the encryption adaptability for different cross-domain communication scenarios, thereby enhancing the data encryption effect. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as those of the cross-domain encryption method provided in the above embodiments, and will not be repeated here.

[0146] The above are merely preferred embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent scope of this application.

Claims

1. A cross-domain encryption method, characterized in that, The cross-domain encryption method includes: Obtain the runtime environment parameters of the current cross-domain communication scenario; The target topology density of the preset encryption architecture is determined based on the aforementioned operating environment parameters; Based on the target topology density, the neural connection topology of the preset encryption architecture is constructed to obtain a target encryption layer adapted to the current cross-domain communication scenario; The target encryption layer encrypts the data to be encrypted, resulting in an encrypted result.

2. The cross-domain encryption method as described in claim 1, characterized in that, The step of determining the target topology density of the preset encryption architecture based on the operating environment parameters includes: A scenario threat vector is constructed based on the aforementioned operating environment parameters, and the scenario threat vector is normalized to obtain a normalized vector. The initial topological density is determined based on the normalized vector and the preset density limit. The target topology density is determined based on the initial topology density and the preset density constraints.

3. The cross-domain encryption method as described in claim 2, characterized in that, The preset density limit includes a preset upper density limit and a preset lower density limit. The step of determining the initial topological density based on the normalized vector and the preset density limit includes: The elements in the normalized vector are weighted and summed to obtain the first sum. The first sum is normalized to obtain the processed first sum. Determine the difference between the preset upper density limit and the preset lower density limit, and multiply the difference by the processed first sum to obtain the product; The product is summed with the preset lower density limit to obtain the initial topological density.

4. The cross-domain encryption method as described in claim 2, characterized in that, The density constraints include computing power constraints, encryption complexity constraints, and latency constraints. The step of determining the target topology density based on the initial topology density and the preset density constraints includes: Based on the computing power constraint, the encryption complexity constraint, and the latency constraint, the target constraint is determined; The target topology density that satisfies the target constraint is determined from the density limit corresponding to the target constraint and the initial topology density.

5. The cross-domain encryption method as described in claim 1, characterized in that, The preset encryption architecture employs a memristor cross array of a preset size. The step of encrypting the data to be encrypted through the target encryption layer to obtain the encryption result includes: Determine the adjacency matrix corresponding to the neuron connection topology of the target encryption layer, and determine the degree sequence based on the adjacency matrix; A chaotic sequence is generated using the mean of the degree sequence as a seed, and a dynamic encoding template is constructed based on the chaotic sequence; Based on the chaotic sequence and the dynamic codebook, the data to be encrypted is subjected to pulse coding processing to obtain a pulse sequence; The pulse sequence is input into the memristor cross array to obtain the encryption result.

6. The cross-domain encryption method as described in claim 5, characterized in that, The method further includes: During the encryption process of the data to be encrypted through the target encryption layer, in response to the detected attack behavior, the attack behavior is subjected to attack feature extraction to obtain an attack feature vector, wherein the attack feature vector includes attack frequency, data tampering rate and duration of continuous attack. The antibody factor matrix is ​​determined based on the attack feature vector, wherein the antibody factor matrix has the same dimension as the synaptic weight matrix of the memristor cross array; The synaptic weight matrix is ​​modified based on the antibody factor matrix to obtain the modified synaptic weight matrix. An optimized target encryption layer is generated based on the modified synaptic weight matrix, and the step of encrypting the data to be encrypted through the target encryption layer to obtain the encryption result is performed based on the optimized target encryption layer.

7. The cross-domain encryption method as described in claim 6, characterized in that, The step of determining the antibody factor matrix based on the attack feature vector includes: The attack feature vector is recalibrated to obtain the recalibrated vector; The recalibrated vector is input into a preset encoder, and heterogeneous antibody factors corresponding to each element in the attack feature vector are generated by multiple preset projection heads. The confidence level of each element in the attack feature vector is determined, and the heterogeneous antibody factors are weighted and fused based on the confidence level to obtain the antibody factor matrix.

8. The cross-domain encryption method as described in claim 6, characterized in that, The method further includes: In response to the satisfaction of preset self-evolution triggering conditions, the target encryption layer or the optimized target encryption layer is evaluated in multiple dimensions to obtain multiple performance scores; A comprehensive score is determined based on each of the performance scores, and it is determined whether the comprehensive score is lower than a preset score threshold. If the overall score is lower than the preset score threshold, the parameters of the target encryption layer are optimized based on each performance score to obtain a self-evolved target encryption layer. The step of encrypting the data to be encrypted through the target encryption layer to obtain the encryption result is then performed based on the self-evolved target encryption layer.

9. An electronic device, characterized in that, The electronic device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the cross-domain encryption method as described in any one of claims 1 to 8.

10. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the cross-domain encryption method as described in any one of claims 1 to 8.