A secure communication method, apparatus, electronic device, and storage medium

By obtaining channel parameters and time parameters to determine the basic encryption strength of the security key and writing it into the secure isolation partition, the target key state is selected to encrypt the plaintext of the business, which solves the problem of the disconnect between key allocation and business needs and improves the security of confidential communication.

CN123122994APending Publication Date: 2026-11-17POWER DISPATCHING CONTROL CENT OF GUANGDONG POWER GRID CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611519853.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-29
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

In existing secure communication technologies, the key distribution and scheduling are disconnected from business security requirements, resulting in inconsistent quality of generated secure keys. This makes it impossible to accurately select keys that match the plaintext security requirements of the business, thus posing a risk of data leakage.

Method used

By acquiring data transmission requests, physical channel parameters, and real-time validity parameters of the security key set, the basic encryption strength of the security key is determined based on the channel parameters and written into the corresponding security isolation partition. The target security key is selected by combining the real-time validity parameters and security requirements, and the target key state is generated to encrypt the business plaintext.

Benefits of technology

It enables precise selection of the target key state based on channel parameters and timeliness parameters, solving the problem of mismatch between key encryption strength and business security requirements in traditional secure communication, eliminating the risk of leakage, and improving communication security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123122994A_ABST
    Figure CN123122994A_ABST
Patent Text Reader

Abstract

This invention discloses a secure communication method, apparatus, electronic device, and storage medium, belonging to the field of secure communication technology. The method includes: acquiring a data transmission request, channel parameters of the physical channel, a set of security keys, and corresponding real-time parameters; determining the basic encryption strength of each security key based on the channel parameters, and writing it into the corresponding security isolation partition according to a preset security threshold; selecting a target security key by combining the real-time parameters and security requirements, generating a target key state, and encrypting the plaintext of the service to generate ciphertext data; generating a status synchronization message according to the target key state and the data transmission request, and sending the ciphertext data and the status synchronization message to the communication peer device. By implementing this invention, the problem of leakage risks caused by the indiscriminate extraction of security keys due to the neglect of channel parameter fluctuations and the lack of security isolation mechanisms in existing technologies, which leads to a mismatch between the key encryption strength and the security requirements of the service, can be solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of secure communication technology, specifically to a secure communication method, apparatus, electronic device, and storage medium. Background Technology

[0002] With the development of information technology, secure communication plays a central role in data transmission and privacy protection. Secure communication generates ciphertext data by encrypting plaintext business data, thus resisting external eavesdropping attacks and ensuring the confidentiality of ciphertext data transmission to the other end of the communication network. In the face of complex and ever-changing network environments, ensuring the secure transmission of data that meets different security requirements has always been a key research area in information security.

[0003] However, current secure communication technologies suffer from a disconnect between key allocation and scheduling and business security requirements. This problem arises because fluctuations in the physical channel environment lead to inconsistent quality of generated security keys. Existing technologies typically treat all generated security keys as having the same security level, failing to assess and manage the basic encryption strength of the keys in conjunction with the physical channel parameters. Furthermore, existing mechanisms often neglect the real-time validity of the security keys during the scheduling phase. This fixed key scheduling pattern makes it difficult for the system to accurately select security keys that match the plaintext security requirements of the business when receiving data transmission requests. This can easily lead to the allocation of low-encryption-strength or outdated keys to high-security applications, resulting in the risk of encrypted data being compromised. Summary of the Invention

[0004] This invention provides a secure communication method, apparatus, electronic device, and storage medium that can solve the problem in the prior art where the security key is extracted indiscriminately due to the neglect of channel parameter fluctuations and the lack of a security isolation mechanism, leading to the leakage risk of the key encryption strength not matching the business security requirements.

[0005] An embodiment of the present invention provides a secure communication method, comprising: The system acquires a data transmission request, the channel parameters of the physical channel, the security key set to be allocated, and the real-time validity parameters corresponding to the security key set; wherein, the data transmission request includes security requirements and service plaintext; Based on channel parameters, determine the basic encryption strength of each security key in the security key set; Based on preset security thresholds and basic encryption strength, each security key is written into its corresponding secure isolation partition. Based on real-time timeliness parameters and security requirements, a matching target security key is selected from the security isolation partition, and a target key state is generated based on the target security key; The target key state is used to encrypt the plaintext of the business, generating ciphertext data; A status synchronization message is generated based on the target key state and data transmission request, and the encrypted data and status synchronization message are sent to the preset communication peer device.

[0006] Furthermore, the data transmission request, the channel parameters of the physical channel, the security key set to be allocated, and the real-time validity parameters corresponding to the security key set are obtained, including: The original key stream and the original measurement characteristics within the sliding time window are obtained from the quantum key distribution terminal through a hardware communication interface. The average quantum error state and the original key length are extracted from the original measurement features, and the average quantum error state and the original key length are aggregated to construct the channel parameters of the physical channel; It receives the final key sequence and final key length output by external processing hardware after performing error correction and privacy amplification operations on the original key stream, and associates the final key sequence and final key length to construct a set of security keys to be allocated; By parsing the request message sent by the communication terminal received by the gateway, the service plaintext, service session identifier, minimum security quality requirement and maximum tolerable delay parameter are extracted from the request message. The minimum security quality requirement and the maximum tolerable delay parameter are aggregated to construct a security requirement, and the security requirement, service plaintext and service session identifier are encapsulated into a data transmission request. Extract the initial construction time node of the security key set to be allocated, and generate the real-time validity parameters of the corresponding security key set by combining it with the current system time node.

[0007] Furthermore, the basic encryption strength of each security key in the security key set is determined, including: Based on the preset smoothing parameter and the original key length, determine the finite key statistical correction parameter; A conservative upper limit parameter for bit error rate is constructed by combining the average quantum error state with the finite key statistical correction parameter. Based on the conservative error limit parameter, the preset smoothing parameter, and the original key length, a smoothing conditional minimum entropy rate is generated; The total security entropy is generated by using the smooth conditional minimum entropy rate, the original key length, the average quantum error state, and a preset privacy amplification parameter. The basic encryption strength of each security key in the security key set is determined based on the total security entropy and the final key length.

[0008] Furthermore, based on preset security thresholds and basic encryption strength, each security key is written into its corresponding secure isolation partition, including: Extract the preset high security threshold and the preset low security threshold from the preset security threshold; Write a security key with a basic encryption strength no less than the high security threshold into a high-security isolated partition; Write a security key with a basic encryption strength that is less than the high security threshold and not less than the low security threshold into a normal security isolation partition; Write a security key with a base encryption strength lower than the low security threshold into the isolation partition to be evaluated. Aggregate high-security isolation partitions, ordinary security isolation partitions, and isolation partitions to be evaluated to generate corresponding security isolation partitions.

[0009] Furthermore, based on real-time timeliness parameters and security requirements, a matching target security key is selected from the security isolation partition, and a target key state is generated based on the target security key, including: Extract the minimum safety quality requirements and the maximum tolerable delay parameters from the safety requirements; Extract the business session identifier from the data transmission request; By combining the basic encryption strength with real-time timeliness parameters, dynamic security quality parameters for each security key are generated. Extract security keys within the security isolation partition whose dynamic security quality parameters are not less than the minimum security quality requirement and whose real-time timeliness parameters do not exceed the maximum tolerable delay parameter, and construct a candidate security key set using the extracted security keys; Based on the dynamic security quality parameters and real-time validity parameters of each security key in the candidate security key set, the corresponding utility matching degree is generated. The security key with the highest utility match is determined as the target security key; A polymorphic transformation operation is performed by combining the target security key, the service session identifier, and the physical random number output by the quantum random number generator to generate a polymorphic transformation key, and the polymorphic transformation key is determined as the target key state.

[0010] Furthermore, the target key state is used to encrypt the plaintext business data, generating ciphertext data, including: Extract the business plaintext from the data transmission request; Obtain the data length of the plaintext business message, and extract the encryption key sequence from the target key state based on the data length; The encryption key sequence is used to perform encryption calculations on the plaintext of the business to generate the basic ciphertext. The encryption key sequence is used to perform information authentication calculations on the basic ciphertext to generate an integrity verification tag. The basic ciphertext is aggregated with the integrity check tag to generate ciphertext data.

[0011] Furthermore, based on the target key state and data transmission request, a state synchronization message is generated, and the ciphertext data and the state synchronization message are sent to a preset communication peer device, including: Based on the target key state, extract the key index identifier from the secure isolation partition; Obtain the transformation state parameters corresponding to the target key state; Extract the business session identifier from the data transmission request; The key index identifier, the transformation state parameter, and the business session identifier are aggregated to generate a state synchronization message; Obtain the preset channel routing parameters of the communication peer device; Using channel routing parameters, encrypted data and status synchronization messages are sent to the preset communication peer device.

[0012] Based on the above method embodiments, the present invention provides corresponding apparatus embodiments.

[0013] One embodiment of the present invention provides a secure communication device, comprising: a parameter acquisition module, a strength determination module, an isolation writing module, a key state generation module, and an encrypted transmission module; The parameter acquisition module is used to acquire data transmission requests, channel parameters of the physical channel, a set of security keys to be allocated, and real-time validity parameters corresponding to the security key set; wherein, the data transmission request includes security requirements and service plaintext; The strength determination module is used to determine the basic encryption strength of each security key in the security key set based on channel parameters. The isolation writing module is used to write each security key into the corresponding security isolation partition based on a preset security threshold and basic encryption strength. The key state generation module is used to select a matching target security key from the security isolation partition based on real-time timeliness parameters and security requirements, and generate a target key state based on the target security key; The encrypted transmission module is used to perform encryption processing on the plaintext of the service using the target key state to generate ciphertext data; generate a status synchronization message based on the target key state and the data transmission request, and send the ciphertext data and the status synchronization message to the preset communication peer device.

[0014] Based on the above method embodiments, the present invention provides corresponding electronic device embodiments.

[0015] One embodiment of the present invention provides an electronic device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor executes the computer program to implement any of the secure communication methods described in the above-described method embodiments.

[0016] Based on the above method embodiments, the present invention provides corresponding storage medium embodiments.

[0017] One embodiment of the present invention provides a storage medium storing a computer program thereon, wherein, when the computer program is running, it controls the device where the storage medium is located to execute any of the secure communication methods described in the above-described method embodiments.

[0018] Compared with the prior art, the present invention has the following beneficial effects: This invention provides a secure communication method, apparatus, electronic device, and storage medium. The method acquires a data transmission request, channel parameters of the physical channel, a security key set, and corresponding real-time parameters; determines the basic encryption strength of each security key based on the channel parameters, and writes it into the corresponding secure isolation partition according to a preset security threshold; selects a target security key based on the real-time parameters and security requirements, generates a target key state, encrypts the plaintext data to generate ciphertext data; generates a status synchronization message based on the target key state and the data transmission request, and sends the ciphertext data and the status synchronization message to the communication peer device.

[0019] This invention determines the basic encryption strength of each security key by acquiring the channel parameters of the physical channel, and writes each security key into its corresponding secure isolation partition according to a preset security threshold and basic encryption strength. This solves the technical problem in traditional secure communication where ignoring channel parameter fluctuations and lacking a security isolation mechanism leads to the indiscriminate extraction of security keys. Furthermore, based on real-time timeliness parameters and security requirements in data transmission requests, it accurately selects matching target security keys from the corresponding secure isolation partitions and generates a target key state for encrypting plaintext business data. This overcomes the inverted defect of traditional coarse extraction where the encryption strength of the security key is lower than the business security requirements, and eliminates the risk of leakage during the generation of the target key state. Attached Figure Description

[0020] Figure 1 This is a flowchart illustrating a secure communication method provided in an embodiment of the present invention.

[0021] Figure 2 This is a schematic diagram of the structure of a secure communication device provided in an embodiment of the present invention. Detailed Implementation

[0022] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0023] like Figure 1As shown, to address the problem in existing technologies where ignoring channel parameter fluctuations and lacking security isolation mechanisms leads to the indiscriminate extraction of security keys, resulting in a mismatch between key encryption strength and business security requirements, an embodiment of the present invention provides a secure communication method, comprising at least the following steps: Step S1: Obtain the data transmission request, the channel parameters of the physical channel, the security key set to be allocated, and the real-time validity parameters corresponding to the security key set; wherein, the data transmission request includes security requirements and service plaintext; In a preferred embodiment, obtaining the data transmission request, the channel parameters of the physical channel, the security key set to be allocated, and the real-time validity parameters corresponding to the security key set includes: The original key stream and the original measurement characteristics within the sliding time window are obtained from the quantum key distribution terminal through a hardware communication interface. The average quantum error state and the original key length are extracted from the original measurement features, and the average quantum error state and the original key length are aggregated to construct the channel parameters of the physical channel; It receives the final key sequence and final key length output by external processing hardware after performing error correction and privacy amplification operations on the original key stream, and associates the final key sequence and final key length to construct a set of security keys to be allocated; By parsing the request message sent by the communication terminal received by the gateway, the service plaintext, service session identifier, minimum security quality requirement and maximum tolerable delay parameter are extracted from the request message. The minimum security quality requirement and the maximum tolerable delay parameter are aggregated to construct a security requirement, and the security requirement, service plaintext and service session identifier are encapsulated into a data transmission request. Extract the initial construction time node of the security key set to be allocated, and generate the real-time validity parameters of the corresponding security key set by combining it with the current system time node.

[0024] Specifically, when implementing secure communication methods, the first step is to comprehensively extract data from the underlying physical communication environment and upper-layer service requests. This involves obtaining data transmission requests, channel parameters of the physical channel, the security key set to be allocated, and the real-time validity parameters corresponding to the security key set. The data transmission request encompasses pre-established security requirements and the plaintext of the service to be transmitted. To ensure the completeness of the acquired features and high-throughput real-time performance, the parameter extraction process is achieved through the coordinated execution of the following sequential lower-level actions.

[0025] The original key stream and original measurement features within the sliding time window are obtained from the quantum key distribution terminal via a hardware communication interface. The quantum key distribution terminal operates a quantum key generation process based on the decoy BB84 protocol. The decoy BB84 protocol is an encryption mechanism that establishes a shared random sequence between communicating parties based on the no-cloning theorem for non-orthogonal quantum states. In a quantum hardware system connected to the decoy BB84 protocol, the system is configured with a high-bandwidth bus interface or a descriptive state transition network interface for peripheral component interconnection standards. The original measurement parameters generated by the underlying quantum hardware are periodically retrieved through the network management port using the aforementioned interface. The sliding time window is set to a dynamic translation window structure with a length of 1 second. Within the 1-second sliding time window, the system divides multiple data batches with dynamic length characteristics according to their arrival time order to capture rapidly changing channel disturbance characteristics. For the decoy BB84 protocol, the theoretically proven absolute security threshold is typically 11%. Considering the channel noise and device imperfection margins in system engineering deployment, the system's preset alarm threshold is strictly set to 8%. When the average quantum error rate exceeds the preset alarm threshold of 8%, the system immediately generates a physical-level blocking alarm flag to ensure that the alarm judgment has a solid physical support base.

[0026] To ensure low latency and high throughput for data capture, the hardware communication interface is deployed as a high-bandwidth peripheral component interconnect bus interface or a dedicated representational state transition network interface. A pre-defined periodic polling mechanism continuously pulls the raw data stream generated by the underlying quantum hardware. The hardware communication interface initializes a direct memory access channel at the underlying level. This channel bypasses the central processing unit (CPU) and directly maps the raw data stream to a pre-allocated circular buffer memory. The circular buffer memory uses a first-in, first-out (FIFO) data structure. To absorb sudden bursts of high-speed data traffic, the pre-allocated capacity of the circular buffer memory is set to 1024 megabytes. When the data volume in the circular buffer memory reaches the 512-megabyte high-water mark, the hardware communication interface generates a hardware interrupt signal to notify the upper-layer parsing logic to capture data. Deploying the direct memory access channel and the circular buffer memory eliminates the computational overhead of memory copying and prevents packet loss issues in high-speed quantum key generation scenarios. The sliding time window is set to a 1-second dynamic shift window, encompassing multiple data batches with dynamic length characteristics within each window to capture rapidly changing channel disturbance features.

[0027] The average quantum error state (QEOS) and original key length are extracted from the raw measurement features, and then aggregated to construct the channel parameters of the physical channel. For the raw measurement features within the sliding time window, the independent quantum error rate (QEOS) and independent key length for each data batch are extracted separately. The average quantum error state characterizes the overall physical channel degradation within the current sliding time window. Combining the extracted batch data, a weighted average model is used to calculate the average quantum error state, as shown in the following formula: In the formula, The average quantum error state; This represents the total number of data batches within the sliding time window. This refers to the data batch index sequence number; For the first Independent quantum bit error rate of each data batch; For the first The independent key length for each data batch. Since the theoretical security threshold of the decoy BB84 protocol is set at 11%, an 8% preset alarm threshold is established to retain sufficient engineering protection margin. When the average quantum error rate exceeds the 8% preset alarm threshold, a channel anomaly alarm flag is synchronously generated and encapsulated into the channel parameters, providing underlying physical measurement support for subsequent security strategy blocking.

[0028] The system receives the final key sequence and length output from the external processing hardware after performing error correction and privacy amplification operations on the original key stream. It then associates the final key sequence and length to construct a set of secure keys to be allocated. This external processing hardware is independent of the core routing logic and is dedicated to handling high-concurrency post-processing operations. At the physical level, the external processing hardware is implemented using a field-programmable gate array (FPGA). The FPGA contains a massive number of parallel logic gates specifically designed for high-speed matrix multiplication. A low-density parity-check matrix (LDPC) algorithm constructs a sparse bipartite graph and performs iterative belief propagation to detect and flip erroneous bits in the original key stream. The Toplitz matrix hash algorithm multiplies the LDPC matrix with the error-corrected key vector, compressing the key data length and eliminating information leaked to potential eavesdroppers during the error correction phase. The FPGA ensures microsecond-level deterministic processing latency, avoiding computational blocking caused by operating system thread scheduling at the software level. Error correction is performed using the LDPC algorithm, while privacy amplification is performed using the Toplitz matrix hash algorithm.

[0029] Both the low-density parity-check matrix algorithm and the Toplitz matrix hash algorithm run in a closed loop on an external secure optical post-processing terminal independent of the local operating system. After executing error correction and privacy amplification instructions, the external processing terminal synchronously pushes the final security key, corresponding key length, and original error parameters to the local processing stream via a dedicated secure control network channel. During the push phase, the system performs cryptographic theoretical derivation based on a pre-allocated total error probability parameter constraint. The total error probability parameter is set to an engineered value of 10. -5 The total error probability parameter is composed of the combined sum of the error correction error rate, the privacy amplification leakage rate, and the smoothing parameter. The system's default smoothing parameter is set to 10. -6 The system's preset privacy amplification leakage rate is set to 10. -10 The aforementioned stringent parameter allocation rules endow the input key with explicit information-theoretic security properties.

[0030] After completing the aforementioned operations, the final key sequence, along with the final key length, is pushed into the current processing stream via an isolated security control plane. To ensure that key allocation complies with stringent cryptographic constraints, a total error probability parameter allocation criterion is set, and the allocation formula is as follows: In the formula, Let be the total error probability parameter, and let be the value used in engineering. ; To correct the error rate; To amplify the privacy leakage rate, the engineering value is [value missing]. ; For smoothing parameters, the engineering value is set to... By implementing the aforementioned derivation criteria, the final output key sequence is guaranteed to have a solid theoretical security basis.

[0031] By parsing request messages sent by the communication end through the gateway, the plaintext business information, business session identifier, minimum security quality requirements, and maximum tolerable latency parameters are extracted from the request messages. The minimum security quality requirements and the maximum tolerable latency parameters are aggregated to construct security requirements. Furthermore, the security requirements, plaintext business information, and business session identifier are encapsulated into a unified data transmission request. The minimum security quality requirements define the minimum security quality metric for plaintext business access, and the maximum tolerable latency parameter defines the maximum allowable time from request initiation to encrypted output. The business session identifier, as a contextual element, ensures a unique mapping for business data flow during concurrent processing.

[0032] Extract the initial construction time of the security key set to be allocated, and combine it with the current time to generate the real-time validity parameter of the corresponding security key set. The real-time validity parameter accurately describes the physical time span of the security key set from its generation to the present moment, thus giving the static security key a dynamic decay time attribute.

[0033] Based on the aforementioned multi-dimensional parameter acquisition and data construction operations, the bidirectional extraction of the underlying quantum channel fluctuation state and the upper-layer business security constraints was completed, the accurate quantization of the key time decay attribute was achieved, the measurement distortion defect caused by static parameter distribution was prevented, and the adaptation accuracy of subsequent key allocation and high-strength encryption execution was improved.

[0034] Step S2: Based on the channel parameters, determine the basic encryption strength of each security key in the security key set; In a preferred embodiment, the basic encryption strength of each security key in the security key set is determined based on channel parameters, including: Based on the preset smoothing parameter and the original key length, determine the finite key statistical correction parameter; A conservative upper limit parameter for bit error rate is constructed by combining the average quantum error state with the finite key statistical correction parameter. Based on the conservative error limit parameter, the preset smoothing parameter, and the original key length, a smoothing conditional minimum entropy rate is generated; The total security entropy is generated by using the smooth conditional minimum entropy rate, the original key length, the average quantum error state, and a preset privacy amplification parameter. The basic encryption strength of each security key in the security key set is determined based on the total security entropy and the final key length.

[0035] Specifically, after acquiring the parameters of the underlying communication environment and upper-layer service requests, the process involves determining the basic encryption strength of each security key in the security key set based on channel parameters. This basic encryption strength quantifies the security level of a single-bit key at the information theory level. To achieve an objective and rigorous quantitative assessment, for each security key, a finite key statistical correction parameter is determined based on a preset smoothing parameter and the original key length. Since the original key length is a finite value in physical acquisition, there are statistical fluctuations between the error distribution obtained from the finite-length statistics and the asymptotic error rate of a theoretically infinite-long sequence. In a practically deployed quantum key distribution system, the total number of photon pulse signals transmitted and measured within a specific time window is always a finite integer. According to the law of large numbers and the central limit theorem, a finite number of samples inevitably leads to a significant deviation between the observed error frequency and the true mathematical expectation of the physical channel error probability. If the observed error frequency is directly used for security assessment, the assessment logic will severely overestimate the encryption strength of the security key when encountering statistical downward fluctuations. A mandatory calculation of the conservative error cap parameter covers the worst-case statistical bias scenario under strict confidence intervals, ensuring that the evaluated cryptographic security entropy rate always remains within the absolute security boundary. To compensate for the uncertainty caused by statistical fluctuations, a finite-key statistical correction parameter in the form of a one-sided confidence boundary is established, with the specific calculation formula as follows: In the formula, Statistical correction parameters for finite keys; This is the original key length; It is the natural logarithm function.

[0036] After establishing the compensation benchmark, a conservative upper limit parameter for the bit error rate is constructed by combining the average quantum error state and the finite key statistical correction parameter. To ensure the rigorous conservatism of the evaluation, a physical upper limit cutoff value of 0.5 is set for the bit error rate. When the bit error rate reaches or exceeds the cutoff value of 0.5, it indicates that the quantum physical channel has degenerated into a noisy channel, losing the physical basis for generating unconditionally secure keys. The derivation formula for the conservative upper limit parameter is as follows: In the formula, This is a conservative upper limit parameter for bit error rate; This is a function that takes the minimum value.

[0037] After constructing the upper bound, a smoothing conditional minimum entropy rate is generated based on the conservative error upper bound parameter, the preset smoothing parameter, and the original key length. The smoothing conditional minimum entropy rate represents the lower bound of the safe entropy rate that the physical channel can provide after deducting the entropy rate loss term caused by the finite key effect. The formula for calculating the smoothing conditional minimum entropy rate is as follows: In the formula, The minimum entropy rate under smooth conditions; This is a function to find the maximum value. It is the binary entropy function; It is a logarithmic function with base 2.

[0038] After calculating the minimum channel entropy rate, the total security entropy is generated using the minimum entropy rate under smoothing conditions, the original key length, the average quantum error state, and a preset privacy amplification parameter. An error correction efficiency factor is introduced simultaneously during the generation process to quantify the additional information leakage caused by the channel during the negotiation error correction phase. The preset error correction efficiency factor is limited to a value between 1.05 and 1.30, with a default engineering value of 1.16. The formula for extracting the total security entropy is as follows: In the formula, The total security entropy; This is the error correction efficiency factor.

[0039] Finally, based on the total security entropy and the final key length, the basic encryption strength of each security key in the security key set is determined. The total security entropy reflects the total amount of security information contained in the current key block. Distributing the total security entropy to the final key sequence after post-processing yields a single-bit security quality metric. The formula for outputting the basic encryption strength is as follows: In the formula, Basic encryption strength; This represents the final key length.

[0040] By performing rigorous finite key statistical correction and information theory entropy rate derivation, a precise mapping from physical channel fluctuation characteristics to cryptographic security strength is achieved, ensuring that the output basic encryption strength has objective mathematical support and providing a reliable quantitative benchmark for subsequent security isolation classification.

[0041] Step S3: Based on the preset security threshold and basic encryption strength, write each security key into the corresponding security isolation partition; In a preferred embodiment, based on a preset security threshold and basic encryption strength, each security key is written into its corresponding secure isolation partition, including: Extract the preset high security threshold and the preset low security threshold from the preset security threshold; Write a security key with a basic encryption strength no less than the high security threshold into a high-security isolated partition; Write a security key with a basic encryption strength that is less than the high security threshold and not less than the low security threshold into a normal security isolation partition; Write a security key with a base encryption strength lower than the low security threshold into the isolation partition to be evaluated. Aggregate high-security isolation partitions, ordinary security isolation partitions, and isolation partitions to be evaluated to generate corresponding security isolation partitions.

[0042] Specifically, after quantizing and deriving the basic encryption strength, the process involves writing each security key into its corresponding secure isolation partition based on preset security thresholds and the basic encryption strength. To achieve fine-grained hierarchical control of the keys, preset high-security thresholds and preset low-security thresholds are extracted from the preset security thresholds. These preset high-security thresholds and preset low-security thresholds are pre-written into configuration constants by engineers based on the initial steady-state physical parameters of the underlying quantum communication hardware, and are strictly limited to a defined numerical range, specifically satisfying the following relationship: In the formula, The preset low security threshold; This is a preset high security threshold.

[0043] After extracting the threshold values, differentiated physical isolation write operations are performed based on the quantization comparison results. For the physical isolation environment, the physical storage carriers of the high-security isolation partition, the ordinary security isolation partition, and the isolation partition to be evaluated are restricted to deployment in secure memory within the hardware security module, or in a trusted execution environment that supports hardware-level memory isolation. The trusted execution environment is an independent protected memory region allocated based on the CPU hardware extended instruction set. Specifically, the trusted execution environment is built using a software protection extended architecture or a trusted execution zone architecture. Under this security architecture, the key data flow in the high-security isolation partition, the ordinary security isolation partition, and the isolation partition to be evaluated is all completed within the chip, completely cutting off unauthorized read paths from external host operating systems, virtual machine monitors, and even operators with the highest management privileges, establishing absolute confidentiality of the key isolation partition from the physical memory root node. Inside the trusted execution environment, the CPU enables a hardware-level memory encryption engine. The memory encryption engine uses a temporary hardware key to automatically encrypt all data written to the high-security isolation partition, the ordinary security isolation partition, and the isolation partition to be evaluated. The temporary hardware key is randomly generated each time the system boots and resides solely in the CPU register, never being written to any external non-volatile storage medium. Any attack attempting to physically probe the dual in-line memory module will only obtain meaningless garbled data. Furthermore, the hardware security module integrates an active anti-tampering mesh and a highly sensitive temperature sensor. Upon detecting physical intrusion or abnormal thermal shock, the hardware security module instantly triggers a zeroing and destruction circuit. This circuit cuts off the power supply to the secure static random access memory, completely erasing all stored security keys and preset thresholds, achieving physical self-destruction to prevent the leakage of core data. Relying on this underlying hardware isolation barrier, it effectively prevents unauthorized access risks at the operating system level.

[0044] In the specific classification and write execution, security keys with a basic encryption strength not less than a preset high security threshold are written to a high-security isolation partition, and a first maximum retention time is configured for the security keys stored in the high-security isolation partition. Security keys with a basic encryption strength less than the preset high security threshold but not less than a preset low security threshold are written to a normal security isolation partition, and a second maximum retention time is configured for the security keys stored in the normal security isolation partition. Security keys with a basic encryption strength less than the preset low security threshold are written to the isolation partition to be evaluated, and a third maximum retention time is configured for the security keys stored in the isolation partition to be evaluated. The numerical constraints on the aforementioned retention times satisfy the following mathematical limitations: In the formula, The first maximum retention time; This is the second maximum retention time; This is the third longest retention time.

[0045] Concurrently, a downgraded usage blocking control is implemented for security keys falling into the isolation partition to be evaluated. Security keys stored in the isolation partition to be evaluated are restricted to use only for generating hybrid key states in subsequent polymorphic transformation operations. Logically, they are restricted to being directly output as basic key states and cannot be used as derivation input seeds for new key states. After completing all write operations and rule bindings, the high-security isolation partition, the ordinary security isolation partition, and the isolation partition to be evaluated are aggregated to generate corresponding security isolation partitions, thereby constructing a complete hierarchical key storage architecture.

[0046] By implementing hardware-level security isolation and differentiated time-limited retention configuration operations, the security keys are accurately matched, stored, and physically isolated based on their quantification strength level. This prevents low-quality keys from overstepping their authority to participate in highly sensitive business processing, significantly improving the underlying data isolation security and anti-backtracking capabilities of the secure communication architecture.

[0047] Step S4: Based on real-time timeliness parameters and security requirements, select a matching target security key from the security isolation partition, and generate a target key state based on the target security key; In a preferred embodiment, based on real-time timeliness parameters and security requirements, a matching target security key is selected from the security isolation partition, and a target key state is generated based on the target security key, including: Extract the minimum safety quality requirements and the maximum tolerable delay parameters from the safety requirements; Extract the business session identifier from the data transmission request; By combining the basic encryption strength with real-time timeliness parameters, dynamic security quality parameters for each security key are generated. Extract security keys within the security isolation partition whose dynamic security quality parameters are not less than the minimum security quality requirement and whose real-time timeliness parameters do not exceed the maximum tolerable delay parameter, and construct a candidate security key set using the extracted security keys; Based on the dynamic security quality parameters and real-time validity parameters of each security key in the candidate security key set, the corresponding utility matching degree is generated. The security key with the highest utility match is determined as the target security key; A polymorphic transformation operation is performed by combining the target security key, the service session identifier, and the physical random number output by the quantum random number generator to generate a polymorphic transformation key, and the polymorphic transformation key is determined as the target key state.

[0048] Specifically, after the construction and writing of the secure isolation partition are completed, the execution phase begins, in which a matching target security key is selected from the corresponding partition based on real-time timeliness parameters and security requirements, and a target key state is generated based on the target security key.

[0049] First, the minimum security quality requirement and the maximum tolerable delay parameter are extracted from the security requirements. The minimum security quality requirement defines the bottom line of security threshold for plaintext access to services, while the maximum tolerable delay parameter defines the maximum time redundancy for cryptographic operations and scheduling allocation. Then, the service session identifier is extracted from the data transmission request, and this identifier serves as the sole contextual constraint for subsequent key derivation operations.

[0050] Combining the basic encryption strength and real-time validity parameters, dynamic security quality parameters are generated for each security key. The specific generation logic involves reading the maximum retention time of the security isolation partition to which the security key belongs and comparing it with the real-time validity parameter. When the real-time validity parameter is less than the maximum retention time, the basic encryption strength is directly assigned to the dynamic security quality parameter; when the real-time validity parameter is not less than the maximum retention time, the dynamic security quality parameter is forcibly reset to zero, triggering automatic expiration and isolation blocking logic. This forced zeroing action eliminates any possibility of expired keys being reactivated. After triggering the automatic expiration and isolation blocking logic, the hardware security module is invoked to perform a random number interleaved overwrite operation on the forcibly zeroed security key. This random number interleaved overwrite operation uses a true random number sequence to perform seven consecutive deep erases on the physical memory sector originally occupied by the security key, completely destroying any residual voltage level signals on the physical storage medium, ensuring that expired security keys cannot be recovered by data recovery tools.

[0051] After dynamic weighting, security keys within the secure isolation partition are extracted, ensuring that the dynamic security quality parameter is not less than the minimum security quality requirement and the real-time efficiency parameter does not exceed the maximum tolerable latency parameter. To prevent duplicate allocation of security keys in high-concurrency scenarios, this filtering stage combines underlying atomic instructions to determine the physical lock status of security keys, excluding locked keys, and constructing a candidate security key set using the extracted security keys that meet all filtering thresholds. The atomic instruction used to determine the physical lock status is the Compare-and-Swap instruction natively supported by the CPU instruction set architecture. Each security key managed within the secure isolation partition has a dedicated status flag byte mapped in a contiguous memory array. When the scheduling thread attempts to allocate a specific security key, it reads the current value of the dedicated status flag byte. Subsequently, the scheduling thread issues a Compare-and-Swap instruction, attempting to overwrite the dedicated status flag byte with a locked value, provided the current value is equal to the unlocked value. Because the Compare-and-Swap instruction locks the system memory bus during its execution cycle, other concurrent threads cannot read or modify the same dedicated status flag byte at the same time. If the compare and swap instruction returns a failure, it means that the specific security key has been preempted and allocated by another thread. The currently scheduled thread immediately relinquishes the specific security key and continues to traverse the next candidate object within the secure isolation partition.

[0052] Based on the dynamic security quality parameters and real-time validity parameters of each security key in the candidate security key set, a corresponding utility matching degree is generated. To comprehensively balance security level redundancy and timeliness, the following utility matching degree evaluation formula is used for iterative calculation: In the formula, For utility matching degree; For dynamic safety and quality parameters; Minimum safety and quality requirements; The first preset weight parameter has a value range limited to 0.5 to 2 and is pre-written into the static configuration constant table by engineers based on business security preferences; For real-time and timely parameters; This corresponds to the maximum retention time; The second preset weight parameter has a value range limited to 0.5 to 2, and is derived from the static configuration constant table.

[0053] After traversal calculations, the security key with the highest utility matching degree is determined as the target security key. In the extreme case where multiple utility matching degree values ​​are consistent, the security key with the lowest real-time validity parameter value is selected as the target security key to ensure priority allocation of key resources with the freshest physical lifecycle.

[0054] After selecting the optimal key, a polymorphic transformation operation is performed by combining the target security key, the business session identifier, and the physical random numbers output by the quantum random number generator to generate a polymorphic transformation key. The polymorphic transformation operation covers derivation mode and hybrid mode. When executing the derivation mode, the standard hash key derivation algorithm is invoked, using the target security key as a high-entropy input seed and the business session identifier as a contextual element input into the algorithm logic to generate the transformed key of the derivation state. The standard hash key derivation algorithm employs a message authentication code derivation mechanism based on a 256-bit secure hash algorithm. The business session identifier is input into the algorithm logic as contextual constraint information, ensuring that even with the same target security key, a completely independent and unique derivation key sequence is generated when facing different business requests. The physical random numbers required for the operation are provided in real-time by a quantum random number generator board integrated on the system chassis motherboard using a peripheral component interconnection protocol. The quantum random number generator board extracts true randomness from fundamental quantum mechanics processes. The quantum random number generator board uses a vacuum state fluctuation measurement module or a laser phase noise measurement module as the core physical entropy source. The vacuum fluctuation measurement module uses a balanced zero-beat detector to measure quantum fluctuations in the electromagnetic vacuum field and digitizes the analog noise signal into a binary bit stream via an analog-to-digital converter. Because quantum fluctuations are governed by the Heisenberg uncertainty principle, the output physical random numbers exhibit zero predictability. These generated physical random numbers are continuously buffered in a hardware entropy pool, providing high-quality, non-deterministic, high-entropy seed data for polymorphic transformation operations. After the polymorphic transformation key is output, the system immediately constructs an optimistic lock by comparing and exchanging atomic instructions in the underlying central processing unit, or applies a memory lock by invoking a hardware cache coherency protocol. This locking action, performed in microsecond-level high-concurrency scheduling scenarios, eliminates the risk of concurrent contention caused by multiple business processes repeatedly allocating and calling the same target security key instance.

[0055] When executing the hybrid mode, the extracted physical random number is XORed with the target security key to generate the hybrid state transformation key. If no derivation or hybrid logic is executed, the base state transformation key is directly output. The keys generated through the aforementioned polymorphic transformation operations—the derivation state, hybrid state, and base state—are collectively referred to as the polymorphic transformation key. Finally, the polymorphic transformation key is determined as the target key state, and immediately after the target key state is output, a one-time use constraint lock is applied to the original target security key via atomic instructions.

[0056] By relying on a strict dynamic threshold filtering and utility matching calculation mechanism, combined with polymorphic transformation operations in conjunction with business context, the risk of leakage caused by key downgrade allocation is prevented, the computing power threshold for the eavesdropping end to reverse deduce the physical key is increased, and the high security level of the ciphertext generation process is effectively guaranteed.

[0057] Step S5: Encrypt the plaintext of the service using the target key state to generate ciphertext data; generate a status synchronization message based on the target key state and the data transmission request, and send the ciphertext data and the status synchronization message to the preset communication peer device.

[0058] In a preferred embodiment, the plaintext of the service is encrypted using the target key state to generate ciphertext data, including: Extract the business plaintext from the data transmission request; Obtain the data length of the plaintext business message, and extract the encryption key sequence from the target key state based on the data length; The encryption key sequence is used to perform encryption calculations on the plaintext of the business to generate the basic ciphertext. The encryption key sequence is used to perform information authentication calculations on the basic ciphertext to generate an integrity verification tag. The basic ciphertext is aggregated with the integrity check tag to generate ciphertext data.

[0059] In a preferred embodiment, a state synchronization message is generated based on the target key state and the data transmission request, and the ciphertext data and the state synchronization message are sent to a preset communication peer device, including: Based on the target key state, extract the key index identifier from the secure isolation partition; Obtain the transformation state parameters corresponding to the target key state; Extract the business session identifier from the data transmission request; The key index identifier, the transformation state parameter, and the business session identifier are aggregated to generate a state synchronization message; Obtain the preset channel routing parameters of the communication peer device; Using channel routing parameters, encrypted data and status synchronization messages are sent to the preset communication peer device.

[0060] Specifically, after generating the target key state, the process proceeds to encrypt the plaintext using the target key state to generate ciphertext data. The plaintext to be processed is extracted from the previously encapsulated data transmission request. The length of the plaintext is obtained, and based on this length, continuous data segments of the corresponding length are truncated bit-by-bit from the target key state. These truncated data segments are then extracted as an encryption key sequence. Encryption calculations are performed on the plaintext using the encryption key sequence to generate the basic ciphertext. The encryption calculation process calls the Advanced Encryption Standard (AES) algorithm or bitwise XOR calculation logic to convert the plaintext into obfuscated data with no obvious statistical pattern. The AES algorithm is configured to operate in Galois counter mode. Galois counter mode supports pipelined parallel encryption operations, significantly improving the throughput of ciphertext data. Before executing the AES algorithm, data padding is performed on the plaintext according to public-key cryptography standards to ensure that the byte length of the input data is strictly aligned with the 128-bit encryption block boundary. The data padding operation uses an incrementing byte sequence to fill the empty space at the end of the plaintext, preventing memory overflow errors caused by encryption operations. To defend against man-in-the-middle attacks lurking in the transmission channel, an information authentication calculation is further performed on the basic ciphertext using an encryption key sequence to generate an integrity verification tag. The information authentication calculation relies on the message authentication code calculation service provided by the hardware security module, mapping the basic ciphertext to a fixed-length verification sequence. The basic ciphertext and the integrity verification tag are then aggregated according to a preset data packet structure to generate ciphertext data.

[0061] Synchronously, the process generates a state synchronization message based on the target key state and data transmission request, and sends the encrypted data and state synchronization message to the preset communication peer device. Based on the currently active target key state, the mapped key index identifier is retrieved from the secure isolation partition. The transformation state parameter corresponding to the generated target key state is obtained; this parameter explicitly indicates the algorithm identifier used in derivation processing or the physical random number seed used in hybrid processing. The globally circulating service session identifier is extracted from the data transmission request. The key index identifier, transformation state parameter, and service session identifier are structurally aggregated to generate the state synchronization message. The state synchronization message embeds a classic secure synchronization channel header used to establish end-to-end consistency. The state synchronization message not only encapsulates the key index identifier and transformation state parameter but also overlays a message authentication code verification tag generated based on the pre-shared system root key. Once the sender's lifecycle management process updates the destruction or degradation status of a specific key, it immediately sends the state synchronization message with the message authentication code verification tag to the preset communication peer device via the classic communication network. After the peer device receives the message and verifies the message authentication code, it synchronously adjusts the mapping record corresponding to the local key pool to establish absolute strong consistency of the underlying key lifecycle state at both ends of the communication. To ensure the absolute reliability of the state synchronization message transmission, a deterministic timeout retransmission mechanism is deployed on top of the classic communication network. After sending the state synchronization message, the sending end immediately starts a 50-millisecond acknowledgment timer. If the sending end does not receive a valid acknowledgment data packet from the peer device before the 50-millisecond acknowledgment timer expires, the sending end automatically retransmits the state synchronization message. Retransmission is allowed a maximum of three consecutive times. If the third retransmission also triggers a timeout, the sending end determines that the current classic communication network is in a state of severe congestion or a denial-of-service attack. The sending end actively terminates the current secure communication session, calls the hardware security module to forcibly clear the target key state associated with the failed state synchronization message, and generates a network fault audit log. The network fault audit log is appended to an immutable hash data chain as a solidified basis for subsequent security event tracing and evidence collection.

[0062] The state synchronization message serves as the alignment function for outband quantum key negotiation. Next, the channel routing parameters of the preset communication peer device are obtained. These parameters are derived from the destination node addressing information pre-entered by the network administrator in the static routing table, encompassing the Internet Protocol address and the corresponding physical port number. Using the obtained channel routing parameters, the encrypted data, along with the state synchronization message, is sent to the preset communication peer device via the network communication interface. The preset communication peer device is located at the receiving node position in the network topology.

[0063] By performing the aforementioned ciphertext encapsulation and out-of-band negotiation synchronization operations, a closed loop of ciphertext transmission and key logic alignment is constructed, preventing the risk of data eavesdropping and tampering under public channels and improving the security level of end-to-end secure communication.

[0064] Based on the above method embodiments, the present invention provides corresponding apparatus embodiments.

[0065] like Figure 2 As shown, an embodiment of the present invention provides a secure communication device, including: a parameter acquisition module 101, a strength determination module 102, an isolation writing module 103, a key state generation module 104, and an encrypted transmission module 105; The parameter acquisition module 101 is used to acquire data transmission request, channel parameters of physical channel, security key set to be allocated, and real-time validity parameters corresponding to the security key set; wherein, the data transmission request includes security requirements and service plaintext; The strength determination module 102 is used to determine the basic encryption strength of each security key in the security key set based on channel parameters. The isolation writing module 103 is used to write each security key into the corresponding security isolation partition based on a preset security threshold and basic encryption strength. The key state generation module 104 is used to select a matching target security key from the security isolation partition based on real-time timeliness parameters and security requirements, and generate a target key state based on the target security key; The encrypted transmission module 105 is used to perform encryption processing on the plaintext of the service using the target key state to generate ciphertext data; generate a status synchronization message based on the target key state and the data transmission request, and send the ciphertext data and the status synchronization message to a preset communication peer device.

[0066] It should be noted that the embodiments of the apparatus described above correspond to the embodiments of the present invention described above, and can realize any of the secure communication methods described above. Furthermore, the embodiments of the apparatus described above are merely illustrative. The modules described as separate components may or may not be physically separate, and the components shown as modules may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Additionally, in the accompanying drawings of the apparatus embodiments provided by the present invention, the connection relationship between modules indicates that they have a communication connection, which can be specifically implemented as one or more communication buses or signal lines. Those skilled in the art can understand and implement this without creative effort.

[0067] Based on the above-described method embodiments of the present invention, a corresponding embodiment of an electronic device is provided.

[0068] An embodiment of the present invention provides an electronic device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements the secure communication method according to any one of the present invention, or, when the processor executes the computer program, it implements the functions of each module in the above-described device embodiments.

[0069] For example, the computer program may be divided into one or more modules, which are stored in the memory and executed by the processor to complete the present invention. The one or more modules may be a series of computer program instruction segments capable of performing specific functions, which describe the execution process of the computer program in the terminal device.

[0070] The terminal device may be a desktop computer, laptop, handheld computer, or cloud server, etc. The terminal device may include, but is not limited to, a processor and a memory.

[0071] The processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor. The processor is the control center of the terminal device, connecting all parts of the terminal device via various interfaces and lines.

[0072] The memory can be used to store the computer programs and / or modules. The processor implements various functions of the terminal device by running or executing the computer programs and / or modules stored in the memory and by calling data stored in the memory. The memory may mainly include a program storage area and a data storage area. The program storage area may store the operating system, applications required for at least one function, etc.; the data storage area may store data created based on the use of the mobile phone, etc. In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as hard disk, memory, plug-in hard disk, smart media card (SMC), secure digital card (SD card), flash card, at least one disk storage device, flash memory device, or other volatile solid-state storage device.

[0073] Based on the above method embodiments, the present invention provides corresponding storage medium embodiments; Another embodiment of the present invention provides a storage medium including a stored computer program, wherein, when the computer program is executed, it controls the device where the storage medium is located to execute any of the above-described secure communication methods of the present invention.

[0074] The aforementioned storage medium is a computer-readable storage medium, and the computer program includes computer program code, which may be in the form of source code, object code, executable file, or certain intermediate forms. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording media, USB flash drive, portable hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc.

[0075] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of those different embodiments or examples.

[0076] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications are also considered to be within the scope of protection of the present invention.

Claims

1. A secure communication method, characterized in that, include: The system acquires a data transmission request, the channel parameters of the physical channel, the security key set to be allocated, and the real-time validity parameters corresponding to the security key set; wherein, the data transmission request includes security requirements and service plaintext; Based on channel parameters, determine the basic encryption strength of each security key in the security key set; Based on preset security thresholds and basic encryption strength, each security key is written into its corresponding secure isolation partition. Based on real-time timeliness parameters and security requirements, a matching target security key is selected from the security isolation partition, and a target key state is generated based on the target security key; The target key state is used to encrypt the plaintext of the business, generating ciphertext data; A status synchronization message is generated based on the target key state and data transmission request, and the encrypted data and status synchronization message are sent to the preset communication peer device.

2. The secure communication method as described in claim 1, characterized in that, Obtain the data transmission request, the channel parameters of the physical channel, the security key set to be allocated, and the real-time validity parameters corresponding to the security key set, including: The original key stream and the original measurement characteristics within the sliding time window are obtained from the quantum key distribution terminal through a hardware communication interface. The average quantum error state and the original key length are extracted from the original measurement features, and the average quantum error state and the original key length are aggregated to construct the channel parameters of the physical channel; It receives the final key sequence and final key length output by external processing hardware after performing error correction and privacy amplification operations on the original key stream, and associates the final key sequence and final key length to construct a set of security keys to be allocated; By parsing the request message sent by the communication terminal received by the gateway, the service plaintext, service session identifier, minimum security quality requirement and maximum tolerable delay parameter are extracted from the request message. The minimum security quality requirement and the maximum tolerable delay parameter are aggregated to construct a security requirement, and the security requirement, service plaintext and service session identifier are encapsulated into a data transmission request. Extract the initial construction time node of the security key set to be allocated, and generate the real-time validity parameters of the corresponding security key set by combining it with the current system time node.

3. The secure communication method as described in claim 2, characterized in that, Based on channel parameters, determine the basic encryption strength of each security key in the security key set, including: Based on the preset smoothing parameter and the original key length, determine the finite key statistical correction parameter; A conservative upper limit parameter for bit error rate is constructed by combining the average quantum error state with the finite key statistical correction parameter. Based on the conservative error limit parameter, the preset smoothing parameter, and the original key length, a smoothing conditional minimum entropy rate is generated; The total security entropy is generated by using the smooth conditional minimum entropy rate, the original key length, the average quantum error state, and a preset privacy amplification parameter. The basic encryption strength of each security key in the security key set is determined based on the total security entropy and the final key length.

4. The secure communication method as described in claim 3, characterized in that, Based on preset security thresholds and basic encryption strength, each security key is written into its corresponding secure isolation partition, including: Extract the preset high security threshold and the preset low security threshold from the preset security threshold; Write a security key with a basic encryption strength no less than the high security threshold into a high-security isolated partition; Write a security key with a basic encryption strength that is less than the high security threshold and not less than the low security threshold into a normal security isolation partition; Write a security key with a base encryption strength lower than the low security threshold into the isolation partition to be evaluated. Aggregate high-security isolation partitions, ordinary security isolation partitions, and isolation partitions to be evaluated to generate corresponding security isolation partitions.

5. The secure communication method as described in claim 4, characterized in that, Based on real-time timeliness parameters and security requirements, a matching target security key is selected from the secure isolation partition, and a target key state is generated based on the target security key, including: Extract the minimum safety quality requirements and the maximum tolerable delay parameters from the safety requirements; Extract the business session identifier from the data transmission request; By combining the basic encryption strength with real-time timeliness parameters, dynamic security quality parameters for each security key are generated. Extract security keys within the security isolation partition whose dynamic security quality parameters are not less than the minimum security quality requirement and whose real-time timeliness parameters do not exceed the maximum tolerable delay parameter, and construct a candidate security key set using the extracted security keys; Based on the dynamic security quality parameters and real-time validity parameters of each security key in the candidate security key set, the corresponding utility matching degree is generated. The security key with the highest utility match is determined as the target security key; A polymorphic transformation operation is performed by combining the target security key, the service session identifier, and the physical random number output by the quantum random number generator to generate a polymorphic transformation key, and the polymorphic transformation key is determined as the target key state.

6. The secure communication method as described in claim 5, characterized in that, The target key state is used to encrypt the plaintext of the business data, generating ciphertext data, including: Extract the business plaintext from the data transmission request; Obtain the data length of the plaintext business message, and extract the encryption key sequence from the target key state based on the data length; The encryption key sequence is used to perform encryption calculations on the plaintext of the business to generate the basic ciphertext. The encryption key sequence is used to perform information authentication calculations on the basic ciphertext to generate an integrity verification tag. The basic ciphertext is aggregated with the integrity verification tag to generate ciphertext data.

7. The secure communication method as described in claim 6, characterized in that, Generate a state synchronization message based on the target key state and data transmission request, and send the ciphertext data and the state synchronization message to the preset communication peer device, including: Based on the target key state, extract the key index identifier from the secure isolation partition; Obtain the transformation state parameters corresponding to the target key state; Extract the business session identifier from the data transmission request; The key index identifier, the transformation state parameter, and the business session identifier are aggregated to generate a state synchronization message; Obtain the preset channel routing parameters of the communication peer device; Using channel routing parameters, encrypted data and status synchronization messages are sent to the preset communication peer device.

8. A secure communication device, characterized in that, include: The module includes a parameter acquisition module, a strength determination module, an isolation writing module, a key state generation module, and an encrypted transmission module. The parameter acquisition module is used to acquire data transmission requests, channel parameters of the physical channel, a set of security keys to be allocated, and real-time validity parameters corresponding to the security key set; wherein, the data transmission request includes security requirements and service plaintext; The strength determination module is used to determine the basic encryption strength of each security key in the security key set based on channel parameters. The isolation writing module is used to write each security key into the corresponding security isolation partition based on a preset security threshold and basic encryption strength. The key state generation module is used to select a matching target security key from the security isolation partition based on real-time timeliness parameters and security requirements, and generate a target key state based on the target security key; The encrypted transmission module is used to perform encryption processing on the plaintext of the service using the target key state to generate ciphertext data; generate a status synchronization message based on the target key state and the data transmission request, and send the ciphertext data and the status synchronization message to the preset communication peer device.

9. An electronic device, characterized in that, It includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor, when executing the computer program, implements the secure communication method as described in any one of claims 1 to 7.

10. A storage medium, characterized in that, The storage medium includes a stored computer program, wherein, when the computer program is executed, it controls the device where the storage medium is located to perform the secure communication method as described in any one of claims 1 to 7.