Search

CN-122027133-A - Quantum cryptography computing performance optimization method based on computer

CN122027133ACN 122027133 ACN122027133 ACN 122027133ACN-122027133-A

Abstract

The invention discloses a quantum password calculation performance optimization method based on a computer, which particularly relates to the technical field of calculation performance optimization, and is characterized in that a vector instruction stream and a polynomial coefficient memory track of a quantum password calculation kernel are obtained to construct a vectorization execution diagram, a vector channel which is easy to distort is positioned based on the cross analysis of a cache line and a channel boundary, a polynomial coefficient vector is extracted at a fixed time interval and subjected to modulus consistency check to obtain a channel check sequence, a check deviation threshold value is determined through cross-channel difference and period detection to generate a distortion trigger mark, a shadow scalar complex calculation is started and is compared with a vector result point by point to obtain a distortion correction map, and finally the instruction rearrangement and the loading grouping adjustment are executed according to the distortion correction map to write back the quantum password calculation kernel, so that the quantum password calculation performance is remarkably improved.

Inventors

  • XIAO CHENG
  • Tu Qiangbo

Assignees

  • 湖南大学

Dates

Publication Date
20260512
Application Date
20260213

Claims (7)

  1. 1. The quantum cryptography calculation performance optimization method based on the computer is characterized by comprising the following steps: s1, acquiring vector instruction flow and polynomial coefficient memory access track of a quantum cryptography computation core, and positioning a vectorization section according to a cycle boundary to obtain a vectorization execution diagram; S2, carrying out cache line alignment analysis and channel boundary analysis on the vectorized execution graph, screening the easily distorted vector channels and obtaining an easily distorted vector channel set; s3, extracting polynomial coefficient vectors according to fixed intervals in the operation period corresponding to the channel set of the easily distorted vectors, and calculating a preset modulus consistency check value to obtain a channel check sequence; s4, performing cross-channel difference and period detection on the channel check sequence, and identifying a vectorization section of a check deviation threshold value to obtain a distortion trigger mark; S5, enabling shadow scalar back calculation for the vectorization section corresponding to the distortion trigger mark, and comparing the scalar result of the extraction point with the vector result point by point to obtain distortion correction mapping; And S6, implementing instruction rearrangement and loading grouping adjustment on the vector section based on the distortion correction mapping, and writing back the quantum cryptography computation core to obtain an optimized computation core.
  2. 2. The method for optimizing the computing performance of the quantum cryptography based on the computer according to claim 1, wherein S1 is specifically: Obtaining a vector instruction stream of a quantum cryptography computation core and analyzing to obtain cycle boundary information and vectorization operation information; obtaining a polynomial coefficient memory access track of a quantum cryptography computation core, and binding a memory access address and a memory access time sequence in the polynomial coefficient memory access track to vectorization operation information; And (3) carrying out interval alignment on the vectorization operation information and the polynomial coefficient memory track based on the cycle boundary information, and merging to generate a vectorization execution diagram containing vectorization section identifiers.
  3. 3. The method for optimizing the computing performance of the quantum cryptography based on the computer according to claim 2, wherein S2 is specifically: analyzing and acquiring a vectorization section identifier in a vectorization execution diagram, and extracting a memory access sequence and a memory access time sequence corresponding to the vectorization section identifier; calculating a cache line alignment result according to the access address sequence and outputting a cache line boundary mark; Extracting vector register loading boundaries according to vectorization operation information and outputting channel boundary marks; and screening the easily distorted vector channels based on the cross consistency of the cache line boundary marks and the channel boundary marks and generating an easily distorted vector channel set.
  4. 4. The method for optimizing the computing performance of a quantum cryptography based on a computer according to claim 3, wherein S3 is specifically: invoking the easy-distortion vector channel set and correlating vectorization operation information in the vectorization execution graph to determine an extraction window corresponding to the easy-distortion vector channel set; Intercepting polynomial coefficient vectors at fixed intervals according to a memory access time sequence in an extraction window and keeping the intercepting order; Performing preset modulus normalization processing on the polynomial coefficient vector, and calculating a preset modulus consistency check value; and splicing the preset modulus consistency check values according to the interception sequence to generate a channel check sequence.
  5. 5. The method for optimizing the computing performance of a quantum cryptography based on a computer of claim 4, wherein S4 is specifically: Extracting a channel check sequence and dividing channel fragments of the channel check sequence according to a channel set of the distortion vector; Performing cross-channel differential computation based on the channel segments and outputting a cross-channel differential sequence; Performing period detection based on the cross-channel differential sequence and locating a period-consistent deviation interval; and determining a verification deviation threshold value based on the deviation amplitude statistics of the deviation interval and identifying a vectorized section of the verification deviation threshold value, and generating a distortion trigger mark.
  6. 6. The method for optimizing the computing performance of a quantum cryptography based on a computer of claim 5, wherein S5 is specifically: obtaining a distortion trigger mark and positioning a vectorization section corresponding to the distortion trigger mark in a vectorization execution diagram; reading interception positions of the polynomial coefficient vectors at fixed intervals in the vectorization section and locking vectorization operation information corresponding to the interception positions; Enabling shadow scalar recalculation to obtain an extraction point scalar result based on the interception position and vectorization operation information, and synchronously obtaining the extraction point vector result; and comparing the scalar result of the extraction point with the vector result of the extraction point by point, recording the difference positions, and summarizing the difference positions to generate a distortion correction map.
  7. 7. The method for optimizing the computing performance of a quantum cryptography based on a computer of claim 6, wherein S6 is specifically: Invoking distortion correction mapping and associating vectorization operation information corresponding to a vectorization section identification positioning difference position in a vectorization execution diagram; Extracting a loading sequence relation and an operation dependency relation from vectorization operation information according to the difference position and generating an instruction rearrangement constraint; executing instruction rearrangement on the vector instruction stream in the vector section according to the instruction rearrangement constraint and outputting the rearranged vector instruction stream; And executing loading grouping adjustment on the polynomial coefficient memory track according to the rearranged vector instruction stream and writing back the quantum cryptography computation core to generate an optimized computation core.

Description

Quantum cryptography computing performance optimization method based on computer Technical Field The invention relates to the technical field of computing performance optimization, in particular to a quantum cryptography computing performance optimization method based on a computer. Background The existing quantum cryptography calculation method generally relies on vectorization instructions in a computer to perform batch operation so as to improve the overall operation efficiency. In an actual running environment, due to the characteristics of a hardware cache structure and a vector register, there is often a mismatch between a vector instruction and a memory access mode of polynomial coefficient data. The dependence of the existing vectorization execution process on the calculation consistency and the data access consistency is difficult to be compatible with uncertainty generated by the fact that the instruction execution sequence and the data loading sequence are influenced by a hardware storage hierarchy and a scheduling mechanism when a computer actually runs, so that calculation deviation which is difficult to stably reproduce in different vectorization sections of a quantum password calculation kernel is caused, and the reliable running and performance stability of the quantum password calculation kernel are affected. Disclosure of Invention In order to overcome the above-mentioned drawbacks of the prior art, embodiments of the present invention provide a method for optimizing quantum cryptography computing performance based on a computer to solve the above-mentioned problems set forth in the background art. In order to achieve the above purpose, the present invention provides the following technical solutions: a quantum cryptography computation performance optimization method based on a computer comprises the following steps: s1, acquiring vector instruction flow and polynomial coefficient memory access track of a quantum cryptography computation core, and positioning a vectorization section according to a cycle boundary to obtain a vectorization execution diagram; S2, carrying out cache line alignment analysis and channel boundary analysis on the vectorized execution graph, screening the easily distorted vector channels and obtaining an easily distorted vector channel set; s3, extracting polynomial coefficient vectors according to fixed intervals in the operation period corresponding to the channel set of the easily distorted vectors, and calculating a preset modulus consistency check value to obtain a channel check sequence; s4, performing cross-channel difference and period detection on the channel check sequence, and identifying a vectorization section of a check deviation threshold value to obtain a distortion trigger mark; S5, enabling shadow scalar back calculation for the vectorization section corresponding to the distortion trigger mark, and comparing the scalar result of the extraction point with the vector result point by point to obtain distortion correction mapping; And S6, implementing instruction rearrangement and loading grouping adjustment on the vector section based on the distortion correction mapping, and writing back the quantum cryptography computation core to obtain an optimized computation core. In a preferred embodiment, S1 is specifically: Obtaining a vector instruction stream of a quantum cryptography computation core and analyzing to obtain cycle boundary information and vectorization operation information; obtaining a polynomial coefficient memory access track of a quantum cryptography computation core, and binding a memory access address and a memory access time sequence in the polynomial coefficient memory access track to vectorization operation information; And (3) carrying out interval alignment on the vectorization operation information and the polynomial coefficient memory track based on the cycle boundary information, and merging to generate a vectorization execution diagram containing vectorization section identifiers. In a preferred embodiment, S2 is specifically: analyzing and acquiring a vectorization section identifier in a vectorization execution diagram, and extracting a memory access sequence and a memory access time sequence corresponding to the vectorization section identifier; calculating a cache line alignment result according to the access address sequence and outputting a cache line boundary mark; Extracting vector register loading boundaries according to vectorization operation information and outputting channel boundary marks; and screening the easily distorted vector channels based on the cross consistency of the cache line boundary marks and the channel boundary marks and generating an easily distorted vector channel set. In a preferred embodiment, S3 is specifically: invoking the easy-distortion vector channel set and correlating vectorization operation information in the vectorization execution graph to determine an extraction window correspon