Bayesian-based quantum key distribution parameter optimization method and system
Through the Bayesian optimization method of quantum key distribution parameter optimization, the parameters of the quantum key distribution system are optimized using the XGBoost model and Bayesian optimization library, and the problems of large calculation volume and low efficiency in the existing technology are solved, and efficient system parameter optimization and key generation rate are achieved.
Patent Information
- Application Number
- CN202411542748.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-31
- Publication Date
- 2025-02-25
AI Technical Summary
When optimizing the parameters of the quantum key distribution system, the calculation is large and the efficiency is low, making it difficult to realize real-time parameter optimization and optimal configuration of large quantum communication networks. The hyperparameter tuning method based on the XGBoost model is complex and time-consuming, and cannot effectively improve the key generation rate.
The Bayesian-based quantum key distribution parameter optimization method is adopted to determine the hyperparameter optimization space through the XGBoost model, and the Bayesian optimization library is used to iteratively optimize the hyperparameters to build a parameter optimal model containing the optimal hyperparameters to achieve efficient optimization of system parameters.
It improves the efficiency of system parameter optimization, reduces time cost, greatly improves the key generation rate, can meet the real-time parameter optimization requirements of high-speed quantum key distribution systems, and realizes the optimal configuration of large quantum communication network resources.
Smart Images

Figure CN119519945A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of quantum information processing, and in particular relates to a parameter optimization method and system for Bayesian-based quantum key distribution. Background Art
[0002] The statements in this section merely provide background information related to the present invention and do not necessarily constitute prior art.
[0003] Quantum key distribution (QKD) uses the properties of quantum mechanics to ensure the security of communications. It enables both parties in communication to generate and share a random, secure key to encrypt and decrypt messages. In actual key distribution, fully optimized parameters can greatly improve the key rate considering the limited key length. When the number of users in the QKD network independent of the measurement device increases, the selection of parameters (the probability of selecting the X basis or Z basis, the strength of the signal state and the decoy state, etc.) becomes challenging. In addition, with the development of Internet of Things technology, an attractive development direction for QKD may be a quantum network with multiple devices and numerous connections, which also brings huge computational challenges to optimizing the system parameters of large-scale connected quantum networks.
[0004] At present, people usually use exhaustive search algorithms or local search algorithms to search for optimal parameters. Although these methods can accurately find the optimized parameters, these algorithms have large computational complexity and slow operation speed on low-power platforms, which will cause system delays, consume a lot of time and hardware resources, and are difficult to achieve real-time parameter optimization of high-speed quantum key distribution (QKD) systems and optimal configuration requirements of large-scale quantum communication network resources. In addition, the XGBoost model contains many hyperparameters, and the hyperparameter tuning process is very complicated and time-consuming. In addition, the existing method for optimizing the parameters of quantum key distribution systems based on the XGBoost model does not give a clear hyperparameter tuning method, and it may not be possible to obtain an XGBoost model containing the optimal hyperparameters within a certain hyperparameter search space, resulting in the inability to obtain the optimal system parameters and the inability to better improve the key generation rate. At the same time, in the three-intensity MDI-QKD, the optimal parameters of QKD are also related to the intensity and transmission probability of the signal state and the decoy state. In the prior art, the optimization method for these parameters is often obtained by means of local search algorithms or exhaustive search algorithms, and they all need to solve different parameters through multiple iterations to obtain the maximum value.
[0005] It can be seen that there are certain deficiencies in the existing system parameter optimization:
[0006] (1) Although traditional local search algorithms or exhaustive search algorithms can also give the optimal system parameters, they require continuous searching or enumeration. The system algorithm has a large amount of computation, low efficiency, and consumes a lot of time and hardware resources. It is difficult to achieve real-time parameter optimization of high-speed quantum key distribution (QKD) systems and the optimal configuration requirements of large-scale quantum communication network resources.
[0007] (2) The existing method for optimizing the parameters of the quantum key distribution system based on the XGBoost model does not provide a clear hyperparameter tuning method, and it is impossible to obtain an XGBoost model containing the optimal hyperparameters within a certain hyperparameter search space, which leads to the inability to obtain the optimal system parameters. The model prediction accuracy is low, which greatly reduces the key generation rate and enhances the security of the system. Summary of the invention
[0008] In order to overcome the deficiencies of the above-mentioned prior art, the present invention provides a parameter optimization method and system for quantum key distribution based on Bayesian. Based on the XGBoost model, a hyperparameter optimization space is determined, and the hyperparameters of the XGBoost model are iteratively optimized based on Bayesian optimization, and a parameter optimal model based on Bayesian optimization containing the optimal hyperparameters is constructed. The parameter optimal model based on Bayesian optimization can accurately predict the system parameters to be optimized, and the model has high prediction accuracy and efficiency, which greatly improves the key generation rate.
[0009] To achieve the above objectives, one or more embodiments of the present invention provide the following technical solutions:
[0010] In a first aspect, a parameter optimization method for Bayesian quantum key distribution is disclosed, comprising:
[0011] Obtain the data to be predicted, and perform preprocessing to obtain preprocessed data;
[0012] The preprocessed data is input into the trained parameter optimal model for prediction and optimization to obtain the optimal parameters and the optimal key generation rate;
[0013] Wherein, the optimal parameter model, when training, includes:
[0014] An initial data set is obtained, and the initial data set is input into an XGBoost model containing initial hyperparameters to obtain a hyperparameter search space; a hyperparameter optimization library based on Bayesian optimization is used to iteratively optimize the hyperparameter search space to obtain a parameter optimal model containing optimal hyperparameters.
[0015] As a further technical solution, the initial data set includes system parameters, transmission probability, signal state strength data and decoy state strength data; the system parameters include local bit error rate, dark count rate, total number of signals sent and transmission distance between the communicating parties.
[0016] As a further technical solution, after obtaining the initial data set, the initial data set is preprocessed. Specifically, the Z-Score is used to perform feature scaling on the initial data set to obtain preprocessed data.
[0017] As a further technical solution, during the training process, the hyperparameter optimization library based on Bayesian optimization iteratively optimizes the hyperparameter search space to obtain a parameter optimal model containing the optimal hyperparameters, specifically:
[0018] Construct the minimum loss function for the optimal hyperparameter combination;
[0019] Using the minimum loss function, Bayesian optimization is used to iteratively search for the optimal hyperparameter combination to obtain the optimal hyperdata combination;
[0020] Use the optimal hyperparameter combination to build a model with optimal parameters.
[0021] As a further technical solution, based on the optimal parameters, the key generation rate of the optimal parameters is obtained, specifically:
[0022] The optimal parameters signal state strength, optimal decoy state strength and optimal transmission probability are used as response vectors, and the optimal parameters local bit error rate, dark count rate, total number of pulses transmitted and the communication distance between the two are used as system condition vectors;
[0023] According to the system vector and the response vector, the local optimal parameters are obtained;
[0024] Predict model accuracy based on local optimal parameters;
[0025] When the model accuracy is the highest, the optimal parameters are local optimal parameters;
[0026] According to the optimal parameters, the optimal key generation rate is obtained.
[0027] As a further technical solution, the optimal key generation rate is obtained according to the optimal parameters, and the formula is:
[0028]
[0029] Where r represents the optimal key generation rate, represents the response vector containing the optimal signal state strength, the optimal decoy state strength and the optimal sending probability, Represents the optimal parameters predicted using the parameter optimal model.
[0030] In a second aspect, a parameter optimization system for Bayesian quantum key distribution is disclosed, comprising:
[0031] The data acquisition and processing module is used to acquire the data to be predicted and perform preprocessing to obtain the preprocessed data;
[0032] The model training prediction module is used to input the preprocessed data into the trained parameter optimal model for prediction and optimization to obtain the optimal parameters and the optimal key generation rate; wherein, when training the parameter optimal model, the following steps are included: obtaining an initial data set, and inputting the initial data set into an XGBoost model containing initial hyperparameters to obtain a hyperparameter search space; using a hyperparameter optimization library based on Bayesian optimization to iteratively optimize the hyperparameter search space to obtain a parameter optimal model containing the optimal hyperparameters.
[0033] The third aspect of the present invention is to provide a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of the parameter optimization method based on Bayesian quantum key distribution are implemented.
[0034] A fourth aspect of the present invention is to provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the steps of the above-mentioned Bayesian-based quantum key distribution parameter optimization method.
[0035] The fifth aspect of the present invention is to provide a computer program product, which, when running on a computer, enables the computer to execute the above-mentioned Bayesian-based quantum key distribution parameter optimization method and function.
[0036] One or more of the above technical solutions have the following beneficial effects:
[0037] In this embodiment, through the parameter optimal model based on Bayesian optimization, the system parameters to be optimized can be accurately predicted, the efficiency of system parameter optimization is improved, the time cost is reduced, and the key generation rate is greatly improved; at the same time, through the combination of the XGBoost model and the Bayesian optimization library, the hyperparameters of the model are optimized within a certain search range, thereby optimizing the model prediction effect.
[0038] In this embodiment, the time for obtaining the optimal parameters through the parameter optimal model based on Bayesian optimization is only 0.3 seconds, compared with 0.9 hours calculated by the local search algorithm, which greatly reduces the time cost, reduces the amount of calculation, and improves the prediction efficiency. It can meet the real-time parameter optimization of high-speed quantum key distribution (QKD) systems and the optimal configuration requirements of large-scale quantum communication network resources.
[0039] Advantages of additional aspects of the present invention will be given in part in the following description, and in part will become obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] The accompanying drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.
[0041] Figure 1 This is a flow chart of a parameter optimization method based on Bayesian quantum key distribution in the first embodiment of the present invention;
[0042] Figure 2 It is a fitting diagram of the actual value calculated by the local search algorithm of the first embodiment and the predicted value using the final-XGBoost model;
[0043] Figure 3 It is the degree of closeness between the parameters predicted by the final-XGBoost model of this embodiment 1 and the parameters calculated by the local search algorithm. DETAILED DESCRIPTION
[0044] It should be noted that the following detailed descriptions are exemplary and are intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.
[0045] It should be noted that the terms used herein are for describing specific embodiments only and are not intended to be limiting of exemplary embodiments according to the present invention.
[0046] In the absence of conflict, the embodiments of the present invention and the features of the embodiments may be combined with each other.
[0047] The overall idea proposed in the present invention is as follows: by determining a hyperparameter optimization space based on the XGBoost model, iteratively optimizing the hyperparameters of the XGBoost model based on Bayesian optimization, constructing a parameter optimal model based on Bayesian optimization that includes the optimal hyperparameters, and utilizing the parameter optimal model based on Bayesian optimization to accurately predict the optimal parameters, and then obtaining the key generation rate of the optimal parameters based on the optimal parameters. The model has high prediction accuracy and prediction efficiency, and greatly improves the key generation rate.
[0048] Embodiment 1
[0049] This embodiment discloses a parameter optimization method for quantum key distribution based on Bayesian.
[0050] In order to more clearly illustrate this embodiment, the implementation process of a parameter optimization method based on Bayesian quantum key distribution can be specifically described as follows:
[0051] A parameter optimization method for quantum key distribution based on Bayesian method, comprising:
[0052] S1. Obtain the data to be predicted and perform preprocessing to obtain the preprocessed data;
[0053] S2. Input the preprocessed data into the trained parameter optimal model for prediction and optimization to obtain the optimal parameters and the optimal key generation rate.
[0054] like Figure 1 As shown, in step S1, the data to be predicted is obtained and preprocessed to obtain the preprocessed data;
[0055] The data to be predicted include system parameters, transmission probability, signal state strength data and decoy state strength data;
[0056] The predicted data is preprocessed using the Z-Score feature scaling method to obtain the preprocessed data. The formula is:
[0057]
[0058] Among them, mean(x) represents the mean of feature x, and σ represents the variance of feature x.
[0059] like Figure 1 As shown, in step S2, the preprocessed data is input into the trained parameter optimal model for prediction and optimization to obtain the optimal parameters and the optimal key generation rate.
[0060] In quantum key distribution, in order to obtain the optimal key generation rate, it is necessary to optimize the parameters, that is, to have the optimal signal state strength, the optimal decoy state strength and the optimal transmission probability, and to obtain the optimal parameters, it is necessary to build a model containing the optimal parameters. In this embodiment, a parameter optimal model is built.
[0061] In this embodiment, S21, construct a parameter optimal model, and perform training and testing.
[0062] S211. Obtain an initial data set.
[0063] The initial data set includes system parameters as well as the transmission probability, signal state strength data, and decoy state strength data in the MDI-QKD protocol;
[0064] In this embodiment, an open source dataset from IEEE DataPort is used.
[0065] The data set contains key parameters such as bit error rate ed, dark count rate d, total number of transmitted signals N, and transmission distance L between the two communicating parties. These parameters are crucial for the performance evaluation of quantum key distribution systems. In addition, in order to construct a complete data set, signal state intensity data and decoy state intensity data and transmission probability are randomly generated through a program to meet the needs under different experimental conditions.
[0066] Among them, the signal state strength is used to transmit the main key information; the decoy state strength is used to detect eavesdropping behavior; the sending probability of the signal state is used to send the signal state; the sending probability of the decoy state is used to send the decoy state.
[0067] S212. Set the ranges of signal state strength, decoy state strength and sending probability respectively, and generate a data set.
[0068] Set a reasonable range [min, max] for the three parameters of signal state strength, decoy state strength and sending probability respectively. Set the signal state strength range to [0.4, 0.8]; the decoy state strength range to [0.01, 0.3], the signal state sending probability range to [0.5, 0.9]; the decoy state sending probability is set to [0.05, 0.5]. Generate a data set containing 50,000 data points within this range.
[0069] Select a value in this range using the following formula:
[0070] S = min + (max - min) rand (0, 1)
[0071] Here, rand(0,1) is a random number uniformly distributed between 0 and 1.
[0072] After the above steps, the initial parameters of the quantum key distribution system are obtained, providing a data basis for subsequent model construction and training.
[0073] like Figure 1 As shown, S213, preprocessing the initial data set to obtain preprocessed data.
[0074] In this embodiment, the data set is preprocessed using the Z-Score feature scaling method, that is, the data set is substituted into formula (1) to obtain the preprocessed data set.
[0075] The preprocessed dataset is divided into training set and test set according to the ratio of 1:2.
[0076] After the above steps, the standardized data conforms to the standard normal distribution, so that the weight parameters can converge quickly, that is, the training data and test data of the model are more in line with the requirements.
[0077] S214. Input the training set into the XGBoost model to obtain a hyperparameter search space.
[0078] First, define an XGBoost model with initial hyperparameters and determine a hyperparameter search space, including the maximum depth of the XGBoost model, the number of iterations, the learning rate, the feature sampling ratio, and the regularization weight ratio.
[0079] Specifically, the initialization hyperparameter search space param_grid is defined as shown in Table 1, including n_estimators, max_depth, learning_rate, subsample, and reg_lambda.
[0080] Table 1
[0081] n_estimators max_depth learning_rate subsample reg_lambda (50,500) (2,100) (0.01,1.0) (0.0,1.0) (0.0,1.5)
[0082] The purpose of preliminary training of the XGBoost model using the initial dataset is to help us understand the basic performance that the model can achieve without hyperparameter optimization. Preliminary training allows us to understand the performance of the model under the default parameters, which helps to narrow the search range of hyperparameters and speed up the Hyperopt optimization process.
[0083] Secondly, the training set data is input into the XGBoost model in sequence to obtain a parameter prediction model based on XGBoost.
[0084] Specifically, the system conditions and transmission parameter combinations in the training set (ed, d, N, L, μ, v, P μ , P v ) is input into the XGBoost model for parameter prediction, and the corresponding optimal signal state strength, decoy state strength, sending probability and system conditions are predicted, that is, a trained parameter prediction model based on the XGBoost model is obtained, and the hyperparameter search space after training is determined.
[0085] After the above steps, a trained parameter prediction model based on the XGBoost model is obtained. The XGBoost model is a highly scalable gradient boosting decision tree algorithm that can quickly find the influence of various parameters on performance indicators in the quantum key distribution system, laying the foundation for the establishment of the subsequent parameter optimal model.
[0086] S215. The hyperparameter optimization library based on Bayesian optimization iteratively optimizes the hyperparameter search space to obtain a parameter optimal model based on Bayesian optimization that includes the optimal hyperparameter combination.
[0087] (1) Construct the minimum loss function of the optimal hyperparameter combination, the formula is as follows:
[0088]
[0089] G=minf(θ)(3)
[0090] Among them, y represents the true label, X represents the system conditional bit error rate, dark count rate, total number of transmitted signals and communication distance, θ represents the hyperparameter combination, It means that the system conditions are used together with the hyperparameter combination θ to train the XGBoost model, thereby optimizing the hyperparameters, that is, the prediction results obtained after the model is trained using the hyperparameter combination θ.
[0091] (2) Using the minimum loss function, Bayesian optimization is used to iteratively search for the optimal hyperparameter combination to obtain the optimal hyperparameter combination.
[0092] The Bayesian optimization strategy is used for formula (3) to iteratively search for the optimal hyperparameter combination. In each iteration, the selected hyperparameter combination is updated according to the feedback of the minimum loss function, and the loss f(θ) of each group θ is recorded.
[0093] Set the maximum number of iterations. In the G function, set the maximum number of evaluations N to control the number of iterations of the hyperparameter search. This parameter ensures that the algorithm stops optimizing after a maximum of N evaluations. In this embodiment, the maximum number of iterations is set to 100, expressed as: Iteration: n≤N;
[0094] If it is within this range, the G function will continue to search for the hyperparameter combination that can minimize f(θ) until n=N, the G function iteration ends, and the optimal hyperparameter combination θ is obtained. * , so that the loss function reaches the minimum value, the formula is; θ * =arg minf(θ).
[0095] By setting the maximum number of iterations, we can control the consumption of computing resources and balance the search efficiency and result quality. When the loss function is already minimized and the hyperparameters are close to the optimal value, continuing the search may not bring significant improvements. The setting of the maximum number of iterations provides a reasonable stopping condition to prevent the algorithm from wasting time.
[0096] (3) Using the optimal hyperparameter combination, we obtain the optimal parameter model based on Bayesian optimization.
[0097] The optimal hyperparameter combination is directly applied to the model to generate the optimal model with optimized parameters, which is the final XGBoost model with optimal parameters based on Bayesian optimization.
[0098] (4) Train and test the optimal parameter model based on Bayesian optimization.
[0099] During the training process, the optimal parameters signal state strength, decoy state strength and sending probability are used as the response vector The optimal parameters of local bit error rate, dark count rate, total number of pulses sent and the communication distance between them are taken as the system condition vector A series of data Input into the final-XGBoost model for training. The purpose of the model is to predict the optimal transmission parameters based on a given system condition vector, thereby optimizing the performance of the quantum key distribution system.
[0100] And input the test data into the trained final-XGBoost model for testing.
[0101] The test data is input into the trained final-XGBoost model to obtain the optimal parameter prediction value. The optimal signal state strength, optimal decoy state strength and optimal transmission probability are used as the response vector, and the optimal system parameters local bit error rate, dark count rate, total number of pulses sent and the communication distance between the two are used as the system condition vector. According to the response vector and the system condition vector, the key generation rate is obtained. The formula is:
[0102]
[0103] in, represents the system condition vector, represents the response vector, and r represents the key generation rate under fixed parameters.
[0104] The above formula only gives the key rate r under fixed parameters. In general, in order to achieve the best performance of QKD, it is necessary to search for That is:
[0105]
[0106] Where U is the response vector The search space of is about the given system parameters A function of It indicates the optimal result obtained by using the local search algorithm LSA. The key goal of QKD parameter optimization is to Find the optimal set
[0107] According to the optimal parameter set, the model accuracy is predicted as follows:
[0108]
[0109] in, represents the optimal parameters obtained using the local search algorithm LSA, Represents the optimal parameters predicted by the final-XGBoost model.
[0110] When the prediction model accuracy is close to 1, That is, the optimal parameters predicted by the final-XGBoost model are infinitely close to the optimal parameters obtained by local search. In other words, the final-XGBoost model not only has less computational complexity and higher efficiency than the local search algorithm, but also has the same high prediction accuracy.
[0111] According to the optimal parameters predicted by the model, the optimal key generation rate is obtained, and the formula is:
[0112]
[0113] Where r represents the optimal key generation rate, represents the response vector containing the optimal signal state strength, the optimal decoy state strength and the optimal sending probability, Represents the optimal parameters predicted using the parameter optimal model.
[0114] By comparison and It can be seen that when the optimal parameters predicted by the final-XGBoost model are infinitely close to the optimal parameters obtained by local search, the key generation rates generated by the two are also infinitely close, and the key generation rate obtained by the final-XGBoost model is also optimal.
[0115] The XGBoost model based on Bayesian optimization can establish a mapping relationship between input features and outputs, and predict outputs based on new input features. Therefore, once the final-XGBoost model containing the optimal hyperparameters is trained, it can be used to optimize the system parameters based on any input. as well as Directly find the optimal set of transmission parameters To obtain the maximized key generation rate r.
[0116] After the above steps, the trained final-XGBoost model is obtained.
[0117] like Figure 1 As shown, S22, the data to be predicted is input into the trained parameter optimal model, and the optimal parameters are output.
[0118] Apply the trained final-XGBoost model to the quantum key distribution system. The system parameters to be predicted and the transmission probability, signal state and decoy state intensity data in the MDI-QKD protocol are input into the trained final-XGBoost. The optimal parameters of the quantum key distribution system can be directly predicted, and there is no need for cumbersome local search algorithms or exhaustive search algorithms to find the optimal system parameters.
[0119] like Figure 1 As shown, S23, the optimal parameters are obtained through the trained final-XGBoost model, and the key generation rate of the optimal parameters is obtained based on the optimal parameters.
[0120] The optimal key generation rate is obtained according to the strength of the optimized signal state and decoy state, the transmission probability and the system condition parameters.
[0121] In quantum key distribution, according to the laws of quantum physics, two legitimate users Alice and Bob are allowed to share a secure random key unconditionally. In the triple-strength MDI-QKD protocol, the sender Alice (or the receiver Bob) needs to optimize the signal state strength μ and the decoy state strength ν, as well as the sending probability (Pμ, Pν), where Pμ (Pν) is the probability of selecting the signal state (decoy state), and then unify these parameters as a vector response.
[0122] The data set of signal state and decoy state strength and transmission probability contained in the triple-intensity MDI-QKD is sent to the final-XGBoost model, and the mean square error is output to measure the closeness between the prediction made by the model and the actual value, as shown in Table 2. According to the experimental results, the final-XGBoost model can be used to optimize the parameters contained in the triple-intensity MDI-QKD to obtain the optimal value, such as Figure 2 shown.
[0123] Table 2
[0124] parameter μ ν <![CDATA[P μ ]]> <![CDATA[P ν ]]> MSE <![CDATA[5.119×10 -7 ]]> <![CDATA[8.343×10 -8 ]]> <![CDATA[1.381×10 -6 ]]> <![CDATA[2.029×10 -6 ]]>
[0125] The optimal parameters of signal state strength, decoy state strength and transmission probability are used as response vectors, and the optimal parameters of local bit error rate, dark count rate, total number of pulses sent and communication distance between the two are used as system condition vectors. Substitute them into formula (4) to obtain the key rate r under fixed parameters. According to formula (5), under given system conditions, Finally, according to formula (6), the optimal predicted values of the final-XGBoost model parameters are compared with the optimal parameters calculated by the local search algorithm. The optimal parameters predicted by the final-XGBoost model are infinitely close to the optimal parameters obtained by the local search. In other words, the final-XGBoost model is not only less computationally intensive and more efficient than the local search algorithm, but also has the same high prediction accuracy.
[0126] Substituting the optimal parameters predicted by the model into formula (7), the optimal key generation rate can be obtained.
[0127] Fit the actual values calculated by the local search algorithm to the predicted values using the final-XGBoost model, such as Figure 2 , Figure 3 shown.
[0128] From Table 2, Figure 2 and Figure 3 As shown in the figure, although the traditional local search algorithm or exhaustive search algorithm can also give the optimal system parameter value and improve the key generation rate, it takes a lot of time and hardware resources and cannot respond quickly. In the quantum key distribution system, the Final-XGBoost model not only improves the efficiency of system parameter optimization, but also combines with the hyperparameter optimization library Hyperopt to make the model's hyperparameters reach the optimal value within a certain search range, thereby optimizing the model's effect. It can be seen that the value predicted by the final-XGBoost model is very close to the actual value calculated by the local search algorithm LSA. In addition, according to the experimental results, the time it takes for the XGBoost model to predict the optimal parameters is 0.3 seconds, and the time calculated by the local search algorithm is 0.9 hours. That is to say, the prediction accuracy of the XGBoost model is very close to the local search algorithm, and the time cost is greatly reduced.
[0129] Embodiment 2
[0130] The purpose of this embodiment is to provide a parameter optimization system for Bayesian quantum key distribution, including:
[0131] The data acquisition and processing module is used to acquire the data to be predicted and perform preprocessing to obtain the preprocessed data;
[0132] The model training prediction module is used to input the preprocessed data into the trained parameter optimal model for prediction and optimization to obtain the optimal parameters and the optimal key generation rate; wherein, when training the parameter optimal model, the following steps are included: obtaining an initial data set, and inputting the initial data set into an XGBoost model containing initial hyperparameters to obtain a hyperparameter search space; using a hyperparameter optimization library based on Bayesian optimization to iteratively optimize the hyperparameter search space to obtain a parameter optimal model containing the optimal hyperparameters.
[0133] Based on providing a parameter optimization system for Bayesian-based quantum key distribution, the method steps in embodiment 1 are implemented.
[0134] Embodiment 3
[0135] The purpose of this embodiment is to provide a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of the above-mentioned parameter optimization method for Bayesian-based quantum key distribution are implemented.
[0136] Embodiment 4
[0137] The purpose of this embodiment is to provide a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps of the above-mentioned parameter optimization method based on Bayesian quantum key distribution are performed.
[0138] Embodiment 5
[0139] The purpose of this embodiment is to provide a computer program product containing instructions, which, when running on a computer, enables the computer to execute a parameter optimization method and function based on Bayesian quantum key distribution involved in any of the above embodiments.
[0140] The steps involved in the apparatus of the above embodiment correspond to the method embodiment 1, and the specific implementation method can refer to the relevant description part of embodiment 1. The term "computer-readable storage medium" should be understood as a single medium or multiple media including one or more instruction sets; it should also be understood to include any medium that can store, encode or carry an instruction set for execution by a processor and enable the processor to execute any method in the present invention.
[0141] Those skilled in the art should understand that the modules or steps of the present invention described above can be implemented by a general-purpose computer device, or alternatively, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. The present invention is not limited to any specific combination of hardware and software.
[0142] Although the above describes the specific implementation mode of the present invention in conjunction with the accompanying drawings, it is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art on the basis of the technical solution of the present invention without creative work are still within the scope of protection of the present invention.
Claims
1. A parameter optimization method for quantum key distribution based on Bayesian, characterized in that: include: Obtain the data to be predicted, and perform preprocessing to obtain preprocessed data; The preprocessed data is input into the trained parameter optimal model for prediction and optimization to obtain the optimal parameters and the optimal key generation rate; Wherein, the optimal parameter model, when training, includes: An initial data set is obtained, and the initial data set is input into an XGBoost model containing initial hyperparameters to obtain a hyperparameter search space; a hyperparameter optimization library based on Bayesian optimization is used to iteratively optimize the hyperparameter search space to obtain a parameter optimal model containing optimal hyperparameters.
2. A parameter optimization method for Bayesian quantum key distribution according to claim 1, characterized in that: The initial data set includes system parameters, transmission probability, signal state strength data and decoy state strength data; the system parameters include local bit error rate, dark count rate, the total number of signals sent and the transmission distance between the communicating parties.
3. A parameter optimization method for Bayesian quantum key distribution according to claim 1, characterized in that: After obtaining the initial data set, the initial data set is preprocessed. Specifically, the Z-Score is used to perform feature scaling on the initial data set to obtain preprocessed data.
4. A parameter optimization method for Bayesian quantum key distribution according to claim 1, characterized in that: During the training process, the hyperparameter optimization library based on Bayesian optimization iteratively optimizes the hyperparameter search space to obtain the optimal parameter model containing the optimal hyperparameters, specifically: Construct the minimum loss function for the optimal hyperparameter combination; Using the minimum loss function, Bayesian optimization is used to iteratively search for the optimal hyperparameter combination to obtain the optimal hyperdata combination; Use the optimal hyperparameter combination to build a model with optimal parameters.
5. A parameter optimization method for Bayesian quantum key distribution according to claim 1, characterized in that: Based on the optimal parameters, the key generation rate of the optimal parameters is obtained, specifically: The optimal parameters signal state strength, decoy state strength and transmission probability are used as response vectors, and the optimal parameters local bit error rate, dark count rate, total number of pulses transmitted and the communication distance between the two are used as system condition vectors; According to the system vector and the response vector, the local optimal parameters are obtained; Predict model accuracy based on local optimal parameters; When the model accuracy is the highest, the optimal parameters are local optimal parameters; According to the optimal parameters, the optimal key generation rate is obtained.
6. A parameter optimization method for Bayesian quantum key distribution according to claim 1, characterized in that: According to the optimal parameters, the optimal key generation rate is obtained, and the formula is: Where r represents the optimal key generation rate, represents the response vector containing the optimal parameter signal state strength, optimal decoy state strength and optimal sending probability, Represents the optimal parameters predicted using the parameter optimal model.
7. A parameter optimization system for quantum key distribution based on Bayesian method, characterized in that: Executing the parameter optimization method based on Bayesian quantum key distribution as described in any one of claims 1 to 6, comprising: The data acquisition and processing module is used to acquire the data to be predicted and perform preprocessing to obtain the preprocessed data; The model training prediction module is used to input the preprocessed data into the trained parameter optimal model for prediction and optimization to obtain the optimal parameters and the optimal key generation rate; wherein, when training the parameter optimal model, the following steps are included: obtaining an initial data set, and inputting the initial data set into an XGBoost model containing initial hyperparameters to obtain a hyperparameter search space; using a hyperparameter optimization library based on Bayesian optimization to iteratively optimize the hyperparameter search space to obtain a parameter optimal model containing the optimal hyperparameters.
8. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are performed.
10. A computer program product, which runs on a computer, characterized in that Enable the computer to execute the method and function as described in any one of claims 1 to 6.
Citation Information
Cited By
Quantum key distribution parameter optimization method and system based on dynamic adaptive loss
CN120710674A
Quantum key distribution parameter optimization method and system based on dynamic adaptive loss
CN120710674B