Dynamic encryption verification method and device based on time network protocol

Through the dynamic encryption verification method based on the time network protocol, the random forest model and the dynamic key encryption algorithm iteration number is used to solve the challenges of traditional key authentication protocol in key management and distribution, and achieve more efficient and reliable NTP key authentication.

CN119299233BActive Publication Date: 2025-04-11BEIJING HORIN TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411817714.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-11
Publication Date
2025-04-11
Estimated Expiration
2044-12-11

AI Technical Summary

Technical Problem

Traditional key authentication protocols have many challenges in key management, distribution and storage, such as key leakage risks and poor key adaptability, which cannot meet the reliability and efficiency requirements of NTP key authentication.

Method used

Provide a dynamic encryption verification method based on the time network protocol. By collecting historical encryption verification data, using a random forest model to determine important encryption verification characteristics, dynamically adjust the number of iterations of the key encryption algorithm, and realize time synchronization between the user and the server.

Benefits of technology

It improves the reliability and efficiency of time network protocol key authentication, and reduces the risk of key leakage and poor adaptability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119299233B_ABST
    Figure CN119299233B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a dynamic encryption verification method and device based on a time network protocol. The method includes: collecting historical encryption verification data, adding iteration number labels to the historical encryption verification data, inputting the key encryption algorithm iteration number labels into a preset random forest model for model training, determining corresponding important encryption verification features based on model prediction results after model training and a preset feature importance analysis algorithm, training the random forest model based on the important encryption verification features, and determining the corresponding key encryption algorithm iteration model; determining the corresponding key encryption algorithm iteration number based on the network status and the key encryption algorithm iteration model; inputting the decoded data and the key encryption algorithm iteration number into a preset key encryption algorithm to determine the corresponding key pair, and realizing time synchronization between the user end and the server end based on the key pair. The present application can improve the reliability and efficiency of time network protocol key authentication.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing, and in particular to a dynamic encryption verification method and device based on a time network protocol. Background Art

[0002] With the development of information technology, network time synchronization plays a vital role in various systems. As a standard protocol for time synchronization, NTP (Network Time Protocol) is widely used in the Internet, corporate intranets and various smart terminals. However, the security issues of NTP servers are becoming increasingly prominent. Illegal users may disrupt the normal operation of the system by tampering with time information, or even launch network attacks.

[0003] In order to ensure the accuracy and security of time synchronization of NTP servers, password authentication technology is widely used in the NTP communication process. In the field of NTP server password authentication, the authentication mechanism based on the Key Exchange Protocol has gradually become the mainstream. This protocol uses a shared key to perform identity authentication and data encryption between the client and the server to ensure the security and reliability of communication between the two parties. Among them, the shared key method is divided into symmetric encryption sharing and asymmetric encryption sharing.

[0004] Symmetric encryption is a method where the client and server share a key. It has fast encryption and decryption speeds and is suitable for encrypting large amounts of data, but key distribution and management are complex, especially in large-scale network environments. Asymmetric encryption uses a pair of keys, a public key and a private key. The public key can be made public to anyone and is used to encrypt information, while the private key is only held by the recipient and is used to decrypt information. Although it has high security, it has high computational overhead and increases communication delays.

[0005] Based on the above problems, traditional key authentication protocols still face many challenges in key management, distribution and storage, such as key leakage risk, poor key adaptability, etc. They cannot meet the requirements of reliable and efficient NTP key authentication. Summary of the invention

[0006] In response to the problems in the prior art, the present application provides a dynamic encryption verification method and device based on the time network protocol, which can improve the reliability and efficiency of the time network protocol key authentication.

[0007] In order to solve at least one of the above problems, the present application provides the following technical solutions:

[0008] In a first aspect, the present application provides a dynamic encryption verification method based on a time network protocol, comprising:

[0009] Collect historical encryption verification data, perform an iteration number label addition operation on the historical encryption verification data, determine the corresponding key encryption algorithm iteration number label, input the key encryption algorithm iteration number label into a preset random forest model for model training, determine the corresponding important encryption verification features according to the model prediction results after the model training and a preset feature importance analysis algorithm, perform model training on the random forest model according to the important encryption verification features, and determine the corresponding key encryption algorithm iteration model; obtain the network status, and determine the corresponding key encryption algorithm iteration number according to the network status and the key encryption algorithm iteration model;

[0010] The decoded data and the number of iterations of the key encryption algorithm are input into a preset key encryption algorithm to determine a corresponding key pair, and time synchronization between the user end and the server end is achieved based on the key pair, wherein the decoded data is obtained after the user end sends an identity authentication request to the server end, and the server end determines the corresponding random password according to the set password verification rule and returns it to the user end, so that the user end receives the random password and then decodes the random password according to the set password verification rule, and the number of iterations of the key encryption algorithm is shared by the user end and the server end through a pre-shared channel, and the pre-shared channel is obtained after the user end and the server end are established through a pre-shared channel when it is determined that the random number in the decoded data of the user end is consistent with the random number in the random password of the server end.

[0011] Furthermore, the server determines the corresponding random password according to the set password verification rule and returns it to the user end, including:

[0012] After receiving the identity authentication request, the server determines a corresponding random number according to a random number generation algorithm;

[0013] The random number is encrypted according to a preset encryption algorithm, a preset shared key, and a preset event count value to determine a corresponding random password.

[0014] Further, after collecting the historical encryption verification data, the method further includes:

[0015] Performing a feature extraction operation on the encryption verification history data to determine corresponding encryption verification features;

[0016] A feature conversion operation is performed on the encryption verification feature to determine a corresponding standard feature.

[0017] Furthermore, the key encryption algorithm iteration number label is input into a preset random forest model for model training, and the corresponding important encryption verification features are determined according to the model prediction results after the model training and a preset feature importance analysis algorithm, including:

[0018] Input the key encryption algorithm iteration number label and the standard feature into a preset random forest model for model training to determine the corresponding model prediction result;

[0019] A feature screening operation is performed based on the model prediction results and the preset average feature impurity to determine the corresponding important encryption verification features.

[0020] Further, the random forest model is trained according to the important encryption verification features to determine the corresponding key encryption algorithm iteration model, including;

[0021] Performing model training on the random forest model according to the important encryption verification feature, performing a performance judgment operation and a feature iteration operation on a second model performance obtained after the training and a first model performance obtained after the random forest model is trained according to the standard feature, to determine a corresponding optimal encryption verification feature;

[0022] The optimal encryption verification feature is input into the random forest model for model training to determine the corresponding key encryption algorithm iteration model.

[0023] Further, the implementing time synchronization between the user terminal and the server terminal according to the key pair includes:

[0024] The user end encrypts the time synchronization request according to the odd-numbered key in the key pair, and sends the encrypted time synchronization request to the server end;

[0025] The server receives the encrypted time synchronization request, performs a decryption operation on the encrypted time synchronization request according to the odd-numbered key in the key pair, and determines the corresponding time synchronization request.

[0026] Furthermore, the implementing time synchronization between the user terminal and the server terminal according to the key pair further includes:

[0027] The server encrypts the time data according to the even-numbered key in the key pair, and sends the encrypted time data to the user terminal;

[0028] The user terminal receives the encrypted time data, decrypts the encrypted time data according to the even-numbered key in the key pair, and performs a time synchronization operation according to the decrypted time data.

[0029] In a second aspect, the present application provides a dynamic encryption verification device based on a time network protocol, comprising:

[0030] A key encryption algorithm iteration number determination module is used to collect historical encryption verification data, perform an iteration number label addition operation on the historical encryption verification data, determine the corresponding key encryption algorithm iteration number label, input the key encryption algorithm iteration number label into a preset random forest model for model training, determine the corresponding important encryption verification feature according to the model prediction result after the model training and a preset feature importance analysis algorithm, perform model training on the random forest model according to the important encryption verification feature, and determine the corresponding key encryption algorithm iteration model; obtain the network status, and determine the corresponding key encryption algorithm iteration number according to the network status and the key encryption algorithm iteration model;

[0031] A time synchronization module is used to input the decoded data and the number of iterations of the key encryption algorithm into a preset key encryption algorithm, determine the corresponding key pair, and realize time synchronization between the user end and the server end according to the key pair, wherein the decoded data is obtained after the user end sends an identity authentication request to the server end, and the server end determines the corresponding random password according to the set password verification rule and returns it to the user end, so that the user end receives the random password and decodes the random password according to the set password verification rule, and the number of iterations of the key encryption algorithm is shared by the user end and the server end through a pre-shared channel, and the pre-shared channel is obtained after the user end and the server end are established through a pre-shared channel when it is determined that the random number in the decoded data of the user end is consistent with the random number in the random password of the server end.

[0032] In a third aspect, the present application provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the dynamic encryption verification method based on the time network protocol when executing the program.

[0033] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the dynamic encryption verification method based on the time network protocol.

[0034] In a fifth aspect, the present application provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the steps of the dynamic encryption verification method based on the time network protocol.

[0035] It can be seen from the above technical scheme that the present application provides a dynamic encryption verification method and device based on the time network protocol, which collects historical encryption verification data, adds iteration number labels to the historical encryption verification data, inputs the key encryption algorithm iteration number labels into a preset random forest model for model training, determines the corresponding important encryption verification features according to the model prediction results after model training and the preset feature importance analysis algorithm, and performs model training on the random forest model according to the important encryption verification features to determine the corresponding key encryption algorithm iteration model; determines the corresponding key encryption algorithm iteration number according to the network status and the key encryption algorithm iteration model; inputs the decoded data and the key encryption algorithm iteration number into the preset key encryption algorithm to determine the corresponding key pair, and realizes time synchronization between the user end and the server end according to the key pair, thereby improving the reliability and efficiency of the time network protocol key authentication. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0037] Figure 1 This is one of the flow charts of the dynamic encryption verification method based on the time network protocol in the embodiment of the present application;

[0038] Figure 2 This is a second flow chart of a dynamic encryption verification method based on a time network protocol in an embodiment of the present application;

[0039] Figure 3 The third flowchart of the dynamic encryption verification method based on the time network protocol in the embodiment of the present application;

[0040] Figure 4 This is a fourth flow chart of a dynamic encryption verification method based on a time network protocol in an embodiment of the present application;

[0041] Figure 5 This is a fifth flow chart of a dynamic encryption verification method based on a time network protocol in an embodiment of the present application;

[0042] Figure 6 This is a sixth flow chart of a dynamic encryption verification method based on a time network protocol in an embodiment of the present application;

[0043] Figure 7 FIG7 is a flow chart of a dynamic encryption verification method based on a time network protocol in an embodiment of the present application;

[0044] Figure 8 It is a structural diagram of a dynamic encryption verification device based on a time network protocol in an embodiment of the present application;

[0045] Fig. 9 It is a schematic diagram of the structure of an electronic device in an embodiment of the present application.

[0046] Reference numerals:

[0047] Electronic device 9600, central processing unit 9100, memory 9140, communication module 9110, input unit 9120, audio processor 9130, display 9160, power supply 9170, buffer memory 9141, application / function storage unit 9142, data storage unit 9143, driver program storage unit 9144, antenna 9111, speaker 9131, microphone 9132. DETAILED DESCRIPTION

[0048] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0049] The acquisition, storage, use, and processing of data in the technical solution of this application comply with the relevant provisions of national laws and regulations.

[0050] Considering that traditional key authentication protocols still have many challenges in key management, distribution and storage. The present application provides a dynamic encryption verification method and device based on the time network protocol, which collects historical encryption verification data, adds iteration number labels to the historical encryption verification data, inputs the key encryption algorithm iteration number labels into a preset random forest model for model training, determines the corresponding important encryption verification features according to the model prediction results after model training and the preset feature importance analysis algorithm, trains the random forest model according to the important encryption verification features, and determines the corresponding key encryption algorithm iteration model; determines the corresponding key encryption algorithm iteration number according to the network status and the key encryption algorithm iteration model; inputs the decoded data and the key encryption algorithm iteration number into the preset key encryption algorithm, determines the corresponding key pair, and realizes time synchronization between the user end and the server end according to the key pair, thereby improving the reliability and efficiency of the time network protocol key authentication.

[0051] In order to improve the reliability and efficiency of time network protocol key authentication, the present application provides an embodiment of a dynamic encryption verification method based on the time network protocol, see Figure 1 The dynamic encryption verification method based on the time network protocol specifically includes the following contents:

[0052] Step S101: collect historical encryption verification data, perform an iteration number label adding operation on the historical encryption verification data, determine the corresponding key encryption algorithm iteration number label, input the key encryption algorithm iteration number label into a preset random forest model for model training, determine the corresponding important encryption verification feature according to the model prediction result after the model training and the preset feature importance analysis algorithm, perform model training on the random forest model according to the important encryption verification feature, and determine the corresponding key encryption algorithm iteration model; obtain the network status, and determine the corresponding key encryption algorithm iteration number according to the network status and the key encryption algorithm iteration model;

[0053] Optionally, in this embodiment, the number of key encryption algorithm iterations is an important parameter in the key encryption algorithm PBKDF2, which determines the complexity of the calculation. The selection of the number of key encryption algorithm iterations needs to be based on certain standards, including the combination of performance and security standards, best practice standards, etc., so that the generated password is not easy to crack. This embodiment uses a random forest model to discover the characteristics between the number of key encryption algorithm iterations and the password security requirements, automatically generates the optimal number of key encryption algorithm iterations, and shares the number of iterations with the authenticated user end and server end, so that the password complexity is improved and difficult to crack.

[0054] Optionally, in this embodiment, one function of this step is to intelligently and dynamically adjust the number of iterations of the key encryption algorithm to adapt to different security requirements and network environments. Another function of this step is to ensure secure time synchronization between the user end and the server end through the key encryption verification process.

[0055] Specifically, the model training process in this step first collects historical encryption verification data. The historical verification data includes but is not limited to the identity information of the user and server, the specific content of the verification request, etc. These data need to fully cover the historical security verification request process in order to form full coverage of model training information.

[0056] Secondly, after collecting historical data, we first preprocess the historical data, which includes cleaning, conversion and denoising of the historical data. After obtaining the standard data, we perform feature engineering and extract all useful features in the data.

[0057] Specifically, in order to extract all useful features, feature recognition is first performed. In this step, in order to ensure data diversity, it is necessary to identify all key factors that may affect the number of iterations of the key encryption algorithm and the encryption verification results based on the business logic and prior knowledge of encryption verification. These factors include but are not limited to network status (such as latency, packet loss rate), time and frequency of verification requests, and verification results (success or failure). Then, the specific values ​​or manifestations of these key factors are extracted from the cleaned data to form a feature vector. For example, network latency can be used as a numerical feature, and the time period of the verification request can be used as a classification feature. Finally, the extracted features are converted into a form suitable for model training, including normalization, standardization, discretization and other operations to ensure comparability and consistency between different features.

[0058] Specifically, after extracting useful features, for each historical encryption verification record, it is necessary to obtain the number of iterations of the corresponding key encryption algorithm as a label. This label is the number of iterations actually used in the previous encryption verification process.

[0059] It is understandable that when the historical encryption verification records have all the features and the corresponding key encryption algorithm iteration number labels, the regularities and patterns between the data can be discovered through model learning. Therefore, we input all candidate features and labels into the random forest model for preliminary training to obtain preliminary model prediction results. Among them, the model prediction results are obtained by evaluating the model prediction with the validation set.

[0060] Next, feature importance analysis is used to find the more important features among all the features and extract these features. Specifically, the reduction in impurity when the decision tree node in the random forest is split is used to evaluate the importance of each feature to the model prediction result. The more a feature is used to split nodes in the model, or the greater the reduction in impurity it can lead to, the more important it is considered.

[0061] Then, according to the feature importance evaluation results, the features are sorted and the features with higher importance are selected as the final feature subset. The random forest model is retrained using the screened feature subset (i.e., important encryption verification features), and the model training results are verified based on the verification set.

[0062] Optionally, compare the performance of the model after training with important encryption verification features with the performance of the model after training with all useful features to ensure that the model performance does not drop significantly after removing the features, and continuously iterate and adjust the important feature subsets of all useful feature sets for model training, so that the final iterative model of the key encryption algorithm can be obtained by training based on the optimal feature combination, and continuously adjust the model parameters during training to meet business needs.

[0063] Finally, after obtaining the key encryption algorithm iteration model, the model can obtain the network status and automatically generate the key encryption algorithm iteration number that best matches the current status.

[0064] It is understandable that the number of key encryption algorithm iterations is an important parameter in the key encryption algorithm PBKDF2. Only when the number of key encryption algorithm iterations of the user end and the server end is unified through sharing, in this case, both parties can perform time synchronization based on the key encryption algorithm. The sharing process will be described in step S102.

[0065] Optionally, in this embodiment, in addition to evaluating the importance of features of the training model based on the average impurity reduction, the importance of features can also be evaluated by randomly scrambling the value of each feature and observing the impact of such randomization on model performance.

[0066] Optionally, in this embodiment, for the evaluation of the importance of features of the training model, the magnitude of the model coefficients may also be analyzed to evaluate the importance of the features.

[0067] Step S102: input the decoded data and the number of iterations of the key encryption algorithm into a preset key encryption algorithm, determine the corresponding key pair, and implement time synchronization between the user end and the server end according to the key pair, wherein the decoded data is obtained after the user end sends an identity authentication request to the server end, and the server end determines the corresponding random password according to the set password verification rule and returns it to the user end, so that the user end receives the random password and decodes the random password according to the set password verification rule, and the number of iterations of the key encryption algorithm is shared by the user end and the server end through a pre-shared channel, and the pre-shared channel is obtained after the user end and the server end are established through a pre-shared channel when it is determined that the random number in the decoded data of the user end is consistent with the random number in the random password of the server end;

[0068] Optionally, in this embodiment, the purpose of this step is to enhance the complexity and security of encryption verification.

[0069] Optionally, the key encryption algorithm used in this embodiment is PBKDF2 (Password-Based KeyDerivation Function 2), which is a password-based key derivation function. On the basis of a confirmed password, it combines the password with a salt value and performs multiple iterative calculations to generate a key. The design purpose of PBKDF2 is to make the key derivation process more time-consuming, thereby increasing the difficulty of cracking the password.

[0070] Optionally, in this embodiment, the user end and the server end perform time synchronization based on the key pair generated by the key encryption algorithm. In order to make the key pairs of the user end and the server end consistent, we set up a pre-shared channel for the user end and the server end in advance. After the model generates the optimal number of iterations of the key encryption algorithm, the number of iterations is shared with the user end and the server end through the pre-shared channel, so that the number of iterations of the key encryption algorithm used by the two is consistent. Because the two only establish a shared channel when the random numbers in the decoded data of the user end are consistent with the random numbers in the random password of the server end, the random numbers used by the two to generate the key pair are also consistent. Therefore, the key pairs generated by the user end and the server end are corresponding, and time synchronization can be performed based on the key pair.

[0071] Optionally, in this embodiment, the process of establishing the pre-shared channel is:

[0072] First, the user sends an authentication request to the server. The server creates a session for the authentication request, generates a random number based on the HOTP (Event Count One-Time Password Generation) algorithm, and uses the pre-shared key and the count value of the counter to encrypt the random number and session id (session code) to obtain a random password.

[0073] Secondly, the server sends the encrypted data to the client. The client also uses the pre-shared key to decrypt the data sent by the server based on the HOTP (Event Count One-Time Password Generation) algorithm to obtain the decoded data, that is, the random number and session id. At this time, if the client's decoded data and the random number in the server's random password are consistent, the pre-shared channel can be established.

[0074] Next, after the shared channel is established, the number of key encryption algorithm iterations obtained from the key encryption algorithm model can be shared with the user end and the server end so that both parties can synchronize time later.

[0075] Optionally, the decoded data and the number of iterations of the key encryption algorithm are input into a preset key encryption algorithm to determine a corresponding key pair, and time synchronization between the user end and the server end is achieved based on the key pair.

[0076] The client uses the decoded data random number and the number of shared iterations as parameters to use the PBKDF2 (Password-Based Key Derivation Function 2) algorithm to generate a set of keys ck1, ck2…ckn. Subsequent synchronization time requests use ck1, ck3… to encrypt the request data in order (odd subscripts). After receiving the server response, use ck2, ck4… to decrypt the data and synchronize the time (even subscripts).

[0077] Then, the server uses the same random number and iteration count as parameters as the client and uses the PBKDF2 (Password-Based Key Derivation Function 2) algorithm to generate a set of keys sk1, sk2…skn. After receiving the synchronization time request, the server uses sk1, sk3… to decrypt the data in order (odd subscripts). After verification, sk2 and sk4 are used to encrypt the time data and return it to the client (even subscripts).

[0078] Finally, the client and server will generate the next set of keys (iteration + 1) when using the last key. If the current key fails to decrypt due to network latency, they will try to use the next key to decrypt. If it still fails, the request will be rejected.

[0079] Optionally, in this embodiment, a specific example is taken of the authentication and communication process between an NTP (Network Time Protocol) server and a client:

[0080] The client sends an authentication request to the server through the NTP protocol. This request contains the client's identification information, but does not contain time information, because security authentication has not yet been performed;

[0081] The server accepts the request to create a session and sends encrypted information, creates a unique session ID and generates a random number, encrypts the random number and session ID using the pre-shared key, and sends the encrypted data (including the random number and session ID) to the client;

[0082] The client decrypts and returns the random number, uses the pre-shared key to decrypt the data received from the server, extracts the random number and session ID, and returns it to the server together with the session ID;

[0083] The server verifies the random number and verifies whether the random number returned by the client is consistent with the random number initially generated. If they are consistent, it confirms that the client has the correct pre-shared key and the communication between the two parties is secure. At this time, the number of iterations of the key encryption algorithm generated by the verification platform is shared with the user and the server.

[0084] Next, the client generates a key and sends a synchronization time request. Using the PBKDF2 algorithm, a set of keys ck1, ck2, ..., ckn are generated with a random number and the number of iterations as parameters. A synchronization time request is constructed and the request data is encrypted using ck1 (odd subscript). The encrypted request is sent to the server;

[0085] Subsequently, the server uses the same random number and number of iterations to generate the corresponding keys sk1, sk2, ..., skn through the PBKDF2 algorithm. Use sk1 (odd subscript) to decrypt the synchronization time request sent by the client. After verifying the validity of the request, obtain the current time, use sk2 (even subscript) to encrypt the time data, and return the encrypted time data to the client.

[0086] Finally, the client uses ck2 (even subscript) to decrypt the encrypted time data received from the server, extracts the time information, and updates the local time.

[0087] It can be understood that through the above steps, not only the identity authentication is completed between the NTP client and the server, but also the security of the communication data is ensured. The key group is generated using the PBKDF2 algorithm, and the encryption and decryption are performed by alternating the use of keys with odd and even subscripts, which further enhances the security of the communication. This mechanism can effectively prevent man-in-the-middle attacks and data tampering.

[0088] This example shows how this embodiment first performs security authentication, then intelligently generates the number of iterations of the key encryption algorithm based on the random forest model, and generates a key pair based on this number of iterations to achieve time synchronization between the user end and the server end based on the key pair.

[0089] From the above description, it can be seen that the dynamic encryption verification method based on the time network protocol provided in the embodiment of the present application can collect historical encryption verification data, add iteration number labels to the historical encryption verification data, input the key encryption algorithm iteration number labels into the preset random forest model for model training, and determine the corresponding important encryption verification features based on the model prediction results after model training and the preset feature importance analysis algorithm, and perform model training on the random forest model based on the important encryption verification features to determine the corresponding key encryption algorithm iteration model; determine the corresponding key encryption algorithm iteration number based on the network status and the key encryption algorithm iteration model; input the decoded data and the key encryption algorithm iteration number into the preset key encryption algorithm to determine the corresponding key pair, and realize time synchronization between the user end and the server end based on the key pair, thereby improving the reliability and efficiency of the time network protocol key authentication.

[0090] In one embodiment of the dynamic encryption verification method based on the time network protocol of the present application, see Figure 2 , and can also include the following:

[0091] Step S201: After receiving the identity authentication request, the server determines a corresponding random number according to a random number generation algorithm;

[0092] Step S202: Perform an encryption operation on the random number according to a preset encryption algorithm, a preset shared key, and a preset event count value to determine a corresponding random password.

[0093] Optionally, in this embodiment, the preset encryption algorithm is the HOTP (Event Count One-Time Password Generation) algorithm. The HOTP algorithm, whose full name is "An HMAC-Based One-Time Password Algorithm", is an event counting-based one-time password generation algorithm. In fact, the algorithm itself is very simple and can be described by two short expressions:

[0094] HOTP(K,C) = Truncate(HMAC-SHA-1(K,C))

[0095] PWD(K,C,digit) = HOTP(K,C) mod 10^Digit

[0096] In the above formula:

[0097] K represents the key shared between the authentication server and the password generation end (client device). In RFC4226, the author requires that the minimum length of the shared key is 128 bits. Preferably, this embodiment recommends using a key of 160 bits.

[0098] C represents the value of the event count, an 8-byte integer, called the moving factor. It should be noted that the integer value of C here needs to be expressed as a binary string. For example, if an event count is 3, then C is "11" (the leading binary number 0 is omitted here).

[0099] HMAC-SHA-1 means that the shared key and mobile factor are encrypted using the HMAC SHA1 algorithm to obtain an encryption result with a length of 160 bits (20 bytes).

[0100] Truncate is a truncation function. First, select the 4 low-byte bits of the last byte from the 20-byte result obtained by encrypting with the SHA-1 algorithm in the first step (note: the big-endian storage is used in the dynamic password algorithm); convert the 4-bit binary value to an integer value without punctuation, and get a number between 0 and 15 (including 0 and 15). This number is used as the offset from 0 in the 20 bytes; then, starting from the specified offset, continuously intercept 4 bytes (32 bits), and finally return the last 31 bits of the 32 bits. Back to the algorithm itself, after obtaining the 31-bit truncation result, we convert it to an integer value represented by the big-endian without punctuation. The value range of this value is 0 ~ 2^31, that is, 0 ~ 2.147483648E9. Finally, we take this number modulo 10 (digit exponent range 1-10) to get a remainder value, and add 0 to the front to get a string of specified digits.

[0101] It is understandable that the generation of a dynamic password in the HOTP algorithm depends on the shared key and the mobile factor value, and the shared key remains unchanged. In the end, only the mobile factor determines the password generation result. Among them, the mobile factor of the counting dynamic password generation is the event count value, so in the HOTP algorithm, it is required that after each successful password verification, the authentication server and the password generator (client) must add 1 to the counter value to ensure that a new password is obtained.

[0102] It can be understood that, through the above steps, the server randomly generates a number, and encrypts the random number according to the HOTP encryption algorithm, the shared key and the event count value to obtain a random password.

[0103] Through step S202, this embodiment obtains a random password, which lays a foundation for the subsequent establishment of security verification of the user end and the server end.

[0104] In one embodiment of the dynamic encryption verification method based on the time network protocol of the present application, see Figure 3 , and can also include the following:

[0105] Step S301: performing a feature extraction operation on the encryption verification history data to determine the corresponding encryption verification feature;

[0106] Step S302: Perform a feature conversion operation on the encryption verification feature to determine the corresponding standard feature.

[0107] Optionally, in this embodiment, the encrypted verification history data includes but is not limited to the identity information of the user and server, the specific content of the verification request, etc. These data need to fully cover the historical security verification request process in order to form full coverage of model training information.

[0108] Optionally, in this embodiment, the encryption verification features are all useful features in the encryption verification history data.

[0109] Optionally, in this embodiment, the standard features are comparable standard features that can be used for model training.

[0110] Specifically, in order to extract all useful features, feature recognition is first performed. In this step, in order to ensure data diversity, it is necessary to identify all key factors that may affect the number of iterations of the key encryption algorithm and the encryption verification results based on the business logic and prior knowledge of encryption verification. These factors include but are not limited to network status (such as latency, packet loss rate), time and frequency of verification requests, and verification results (success or failure). Then, the specific values ​​or manifestations of these key factors are extracted from the cleaned data to form a feature vector. For example, network latency can be used as a numerical feature, and the time period of the verification request can be used as a classification feature. Finally, the extracted features are converted into a form suitable for model training, including normalization, standardization, discretization and other operations to ensure comparability and consistency between different features.

[0111] Through step S302, this embodiment obtains standard features for model training, laying a solid data foundation for subsequent training of the random forest model.

[0112] In one embodiment of the dynamic encryption verification method based on the time network protocol of the present application, see Figure 4 , and can also include the following:

[0113] Step S401: inputting the key encryption algorithm iteration number label and the standard feature into a preset random forest model for model training to determine the corresponding model prediction result;

[0114] Step S402: performing a feature screening operation according to the model prediction result and the preset average feature impurity to determine the corresponding important encryption verification features;

[0115] Optionally, in this embodiment, when the historical encryption verification records have all the features and the corresponding key encryption algorithm iteration number labels, the regularities and patterns between the data can be discovered through model learning. Therefore, we input all candidate features (standard features) and labels into the random forest model for preliminary training to obtain preliminary model prediction results. Among them, the model prediction results are obtained by evaluating the model prediction with the verification set.

[0116] Next, feature importance analysis is used to find the more important features among all the features and extract these features. Specifically, the reduction in impurity when the decision tree node in the random forest is split is used to evaluate the importance of each feature to the model prediction result. The more a feature is used to split nodes in the model, or the greater the reduction in impurity it can lead to, the more important it is considered.

[0117] Finally, according to the feature importance evaluation results, the features are sorted and the features with higher importance are selected as the final feature subset, i.e., the important encryption verification features.

[0118] Optionally, in this embodiment, in addition to evaluating the importance of features of the training model based on the average impurity reduction, the importance of features can also be evaluated by randomly scrambling the value of each feature and observing the impact of such randomization on model performance.

[0119] Optionally, in this embodiment, for the evaluation of the importance of features of the training model, the magnitude of the model coefficients may also be analyzed to evaluate the importance of the features.

[0120] Through step S402, this embodiment successfully obtains an important feature subset, laying a solid data foundation for further iterative tuning of the subsequent model.

[0121] In one embodiment of the dynamic encryption verification method based on the time network protocol of the present application, see Figure 5 , and can also include the following:

[0122] Step S501: performing model training on the random forest model according to the important encryption verification feature, performing a performance judgment operation and a feature iteration operation on a second model performance obtained after the training and a first model performance obtained after the random forest model is trained according to the standard feature, and determining a corresponding optimal encryption verification feature;

[0123] Step S502: input the optimal encryption verification feature into the random forest model for model training to determine the corresponding key encryption algorithm iteration model.

[0124] Optionally, in this embodiment, the random forest model is retrained using the filtered feature subset (i.e., important encryption verification features), and the results of the model training are verified based on the verification set.

[0125] Optionally, compare the performance of the model after training with important encryption verification features with the performance of the model after training with all useful features (i.e., standard features) to ensure that the model performance does not drop significantly after removing the features, and continuously iteratively adjust the important feature subsets of all useful feature sets for model training to obtain the optimal important feature subset (i.e., optimal encryption verification features), so that the final key encryption algorithm iterative model can be trained according to the optimal feature combination, and continuously adjust the model parameters during training to meet business needs.

[0126] Finally, after obtaining the key encryption algorithm iteration model, the model can obtain the network status and automatically generate the key encryption algorithm iteration number that best matches the current status.

[0127] Through step S502, this embodiment successfully obtains the key encryption algorithm iteration model, laying a foundation for the subsequent secure time synchronization interaction between the user end and the server end according to the model prediction.

[0128] In one embodiment of the dynamic encryption verification method based on the time network protocol of the present application, see Figure 6 , and can also include the following:

[0129] Step S601: the user end encrypts the time synchronization request according to the odd-numbered key in the key pair, and sends the encrypted time synchronization request to the server end;

[0130] Step S602: the server receives the encrypted time synchronization request, decrypts the encrypted time synchronization request according to the odd-numbered key in the key pair, and determines the corresponding time synchronization request.

[0131] Optionally, in this embodiment, the client uses the decoded data random number and the number of shared iterations as parameters using the PBKDF2 (Password-Based Key Derivation Function 2) algorithm to generate a set of keys ck1, ck2...ckn. Subsequent synchronization time requests use ck1, ck3... to encrypt the request data in sequence (odd number subscript).

[0132] The server uses the same random number and iteration count as parameters as the client and uses the PBKDF2 (Password-Based Key Derivation Function 2) algorithm to generate a set of keys sk1, sk2…skn. When a synchronization time request is received, sk1, sk3…are used in order to decrypt the data (odd subscript).

[0133] Through step S602, this embodiment successfully implements encryption at the user end and decryption at the server end according to the base key in the key pair.

[0134] In one embodiment of the dynamic encryption verification method based on the time network protocol of the present application, see Figure 7 , and can also include the following:

[0135] Step S701: the server encrypts the time data according to the even-numbered key in the key pair, and sends the encrypted time data to the client;

[0136] Step S702: the user terminal receives the encrypted time data, decrypts the encrypted time data according to the even-numbered key in the key pair, and performs a time synchronization operation according to the decrypted time data.

[0137] Optionally, in this embodiment, the client uses the decoded data random number and the number of shared iterations as parameters using the PBKDF2 (Password-Based Key Derivation Function 2) algorithm to generate a set of keys ck1, ck2...ckn. Upon receiving the server response, the client uses ck2, ck4... to decrypt the data and synchronize the time (even subscript).

[0138] The server uses the same random number and iteration count as parameters as the client and uses the PBKDF2 (Password-Based Key Derivation Function 2) algorithm to generate a set of keys sk1, sk2…skn. After verification, the time data is encrypted with sk2 and sk4 and returned to the client (even subscript).

[0139] Through step S702, this embodiment successfully implements decryption on the user side and encryption on the server side according to the even-numbered key in the key pair, thereby completing an entire secure time synchronization process.

[0140] In order to improve the reliability and efficiency of time network protocol key authentication, the present application provides an embodiment of a dynamic encryption verification device based on a time network protocol for implementing all or part of the content of the dynamic encryption verification method based on a time network protocol, see Figure 8 The dynamic encryption verification device based on the time network protocol specifically includes the following contents:

[0141] The key encryption algorithm iteration number determination module 10 is used to collect historical encryption verification data, perform iteration number label adding operation on the historical encryption verification data, determine the corresponding key encryption algorithm iteration number label, input the key encryption algorithm iteration number label into a preset random forest model for model training, determine the corresponding important encryption verification feature according to the model prediction result after the model training and the preset feature importance analysis algorithm, perform model training on the random forest model according to the important encryption verification feature, and determine the corresponding key encryption algorithm iteration model; obtain the network status, and determine the corresponding key encryption algorithm iteration number according to the network status and the key encryption algorithm iteration model;

[0142] The time synchronization module 20 is used to input the decoded data and the number of iterations of the key encryption algorithm into a preset key encryption algorithm, determine the corresponding key pair, and realize time synchronization between the user end and the server end according to the key pair, wherein the decoded data is obtained after the user end sends an identity authentication request to the server end, and the server end determines the corresponding random password according to the set password verification rule and returns it to the user end, so that the user end receives the random password and decodes the random password according to the set password verification rule, and the number of iterations of the key encryption algorithm is shared by the user end and the server end through a pre-shared channel, and the pre-shared channel is obtained after the user end and the server end are established through a pre-shared channel when it is determined that the random number in the decoded data of the user end is consistent with the random number in the random password of the server end.

[0143] From the above description, it can be seen that the dynamic encryption verification device based on the time network protocol provided in the embodiment of the present application can collect historical encryption verification data, add iteration number labels to the historical encryption verification data, input the key encryption algorithm iteration number labels into the preset random forest model for model training, determine the corresponding important encryption verification features according to the model prediction results after model training and the preset feature importance analysis algorithm, perform model training on the random forest model according to the important encryption verification features, and determine the corresponding key encryption algorithm iteration model; determine the corresponding key encryption algorithm iteration number according to the network status and the key encryption algorithm iteration model; input the decoded data and the key encryption algorithm iteration number into the preset key encryption algorithm, determine the corresponding key pair, and realize time synchronization between the user end and the server end according to the key pair, thereby improving the reliability and efficiency of the time network protocol key authentication.

[0144] From the hardware level, in order to improve the reliability and efficiency of the time network protocol key authentication, the present application provides an embodiment of an electronic device for implementing all or part of the content of the dynamic encryption verification method based on the time network protocol, and the electronic device specifically includes the following content:

[0145] Processor, memory, communication interface and bus; wherein the processor, memory and communication interface communicate with each other through the bus; the communication interface is used to realize the information transmission between the dynamic encryption verification method based on the time network protocol and the core business system, user terminal and related database and other related devices; the logic controller can be a desktop computer, a tablet computer and a mobile terminal, etc., but the present embodiment is not limited thereto. In the present embodiment, the logic controller can be implemented with reference to the embodiment of the dynamic encryption verification method based on the time network protocol and the embodiment of the dynamic encryption verification method based on the time network protocol in the embodiment, and the contents thereof are incorporated herein, and the repeated parts are not repeated.

[0146] It is understandable that the user terminal may include a smart phone, a tablet electronic device, a network set-top box, a portable computer, a desktop computer, a personal digital assistant (PDA), a vehicle-mounted device, a smart wearable device, etc. Among them, the smart wearable device may include smart glasses, a smart watch, a smart bracelet, etc.

[0147] In practical applications, part of the dynamic encryption verification method based on the time network protocol can be executed on the electronic device side as described above, or all operations can be completed in the client device. The specific selection can be based on the processing capability of the client device and the limitations of the user's usage scenario. This application does not limit this. If all operations are completed in the client device, the client device may also include a processor.

[0148] The client device may have a communication module (i.e., a communication unit) that can communicate with a remote server to achieve data transmission with the server. The server may include a server on the task scheduling center side, and other implementation scenarios may also include a server on an intermediate platform, such as a server on a third-party server platform that has a communication link with the task scheduling center server. The server may include a single computer device, or a server cluster consisting of multiple servers, or a server structure of a distributed device.

[0149] Fig. 9 FIG. 9 is a schematic block diagram of the system structure of the electronic device 9600 according to an embodiment of the present application. Fig. 9As shown, the electronic device 9600 may include a central processor 9100 and a memory 9140; the memory 9140 is coupled to the central processor 9100. It is worth noting that Fig. 9 is exemplary; other types of structures may also be used to supplement or replace this structure to implement telecommunication functions or other functions.

[0150] In one embodiment, the function of the dynamic encryption verification method based on the time network protocol can be integrated into the central processing unit 9100. The central processing unit 9100 can be configured to perform the following control:

[0151] Step S101: collect historical encryption verification data, perform an iteration number label adding operation on the historical encryption verification data, determine the corresponding key encryption algorithm iteration number label, input the key encryption algorithm iteration number label into a preset random forest model for model training, determine the corresponding important encryption verification feature according to the model prediction result after the model training and the preset feature importance analysis algorithm, perform model training on the random forest model according to the important encryption verification feature, and determine the corresponding key encryption algorithm iteration model; obtain the network status, and determine the corresponding key encryption algorithm iteration number according to the network status and the key encryption algorithm iteration model;

[0152] Step S102: input the decoded data and the number of iterations of the key encryption algorithm into a preset key encryption algorithm, determine the corresponding key pair, and implement time synchronization between the user end and the server end according to the key pair, wherein the decoded data is obtained after the user end sends an identity authentication request to the server end, and the server end determines the corresponding random password according to the set password verification rule and returns it to the user end, so that the user end receives the random password and decodes the random password according to the set password verification rule, and the number of iterations of the key encryption algorithm is shared by the user end and the server end through a pre-shared channel, and the pre-shared channel is obtained after the user end and the server end are established through a pre-shared channel when it is determined that the random number in the decoded data of the user end is consistent with the random number in the random password of the server end.

[0153] From the above description, it can be seen that the electronic device provided in the embodiment of the present application collects historical encryption verification data, adds an iteration number label to the historical encryption verification data, inputs the key encryption algorithm iteration number label into a preset random forest model for model training, determines the corresponding important encryption verification features according to the model prediction results after model training and the preset feature importance analysis algorithm, performs model training on the random forest model according to the important encryption verification features, and determines the corresponding key encryption algorithm iteration model; determines the corresponding key encryption algorithm iteration number according to the network status and the key encryption algorithm iteration model; inputs the decoded data and the key encryption algorithm iteration number into the preset key encryption algorithm, determines the corresponding key pair, and realizes time synchronization between the user end and the server end according to the key pair, thereby improving the reliability and efficiency of time network protocol key authentication.

[0154] In another embodiment, the dynamic encryption verification method based on the time network protocol can be configured separately from the central processing unit 9100. For example, the dynamic encryption verification method based on the time network protocol can be configured as a chip connected to the central processing unit 9100, and the function of the dynamic encryption verification method based on the time network protocol can be realized through the control of the central processing unit.

[0155] like Fig. 9 As shown, the electronic device 9600 may also include: a communication module 9110, an input unit 9120, an audio processor 9130, a display 9160, and a power supply 9170. It is worth noting that the electronic device 9600 does not necessarily have to include Fig. 9 In addition, the electronic device 9600 may also include Fig. 9 For components not shown, reference may be made to the prior art.

[0156] like Fig. 9 As shown, the central processing unit 9100 is sometimes also referred to as a controller or an operation control, and may include a microprocessor or other processor device and / or logic device. The central processing unit 9100 receives input and controls the operation of various components of the electronic device 9600.

[0157] The memory 9140 may be, for example, one or more of a cache, a flash memory, a hard drive, a removable medium, a volatile memory, a non-volatile memory or other suitable devices. The above-mentioned information related to the failure may be stored, and a program for executing the relevant information may also be stored. The CPU 9100 may execute the program stored in the memory 9140 to implement information storage or processing, etc.

[0158] The input unit 9120 provides input to the central processing unit 9100. The input unit 9120 is, for example, a key or a touch input device. The power supply 9170 is used to provide power to the electronic device 9600. The display 9160 is used to display display objects such as images and texts. The display may be, for example, an LCD display, but is not limited thereto.

[0159] The memory 9140 may be a solid-state memory, such as a read-only memory (ROM), a random access memory (RAM), a SIM card, etc. It may also be a memory that saves information even when the power is off, can be selectively erased, and is provided with more data, examples of which are sometimes referred to as EPROMs, etc. The memory 9140 may also be some other type of device. The memory 9140 includes a buffer memory 9141 (sometimes referred to as a buffer). The memory 9140 may include an application / function storage unit 9142, which is used to store application programs and function programs or processes for executing the operation of the electronic device 9600 through the central processor 9100.

[0160] The memory 9140 may also include a data storage unit 9143 for storing data, such as contacts, digital data, pictures, sounds, and / or any other data used by the electronic device. The driver storage unit 9144 of the memory 9140 may include various drivers for communication functions of the electronic device and / or for executing other functions of the electronic device (such as messaging applications, address book applications, etc.).

[0161] The communication module 9110 is a transmitter / receiver that sends and receives signals via the antenna 9111. The communication module 9110 is coupled to the central processor 9100 to provide input signals and receive output signals, which may be the same as the case of a conventional mobile communication terminal.

[0162] Based on different communication technologies, multiple communication modules 9110 may be provided in the same electronic device, such as a cellular network module, a Bluetooth module and / or a wireless local area network module, etc. The communication module 9110 is also coupled to a speaker 9131 and a microphone 9132 via an audio processor 9130 to provide an audio output via the speaker 9131 and receive an audio input from the microphone 9132, thereby realizing a common telecommunication function. The audio processor 9130 may include any suitable buffer, decoder, amplifier, etc. In addition, the audio processor 9130 is also coupled to the central processor 9100, so that recording can be performed on the machine through the microphone 9132, and the sound stored on the machine can be played through the speaker 9131.

[0163] The embodiments of the present application also provide a computer-readable storage medium capable of implementing all the steps of the dynamic encryption verification method based on the time network protocol in the above-mentioned embodiments, where the execution subject is a server or a client. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, all the steps of the dynamic encryption verification method based on the time network protocol in the above-mentioned embodiments are implemented. For example, when the processor executes the computer program, the following steps are implemented:

[0164] Step S101: collect historical encryption verification data, perform an iteration number label adding operation on the historical encryption verification data, determine the corresponding key encryption algorithm iteration number label, input the key encryption algorithm iteration number label into a preset random forest model for model training, determine the corresponding important encryption verification feature according to the model prediction result after the model training and the preset feature importance analysis algorithm, perform model training on the random forest model according to the important encryption verification feature, and determine the corresponding key encryption algorithm iteration model; obtain the network status, and determine the corresponding key encryption algorithm iteration number according to the network status and the key encryption algorithm iteration model;

[0165] Step S102: input the decoded data and the number of iterations of the key encryption algorithm into a preset key encryption algorithm, determine the corresponding key pair, and implement time synchronization between the user end and the server end according to the key pair, wherein the decoded data is obtained after the user end sends an identity authentication request to the server end, and the server end determines the corresponding random password according to the set password verification rule and returns it to the user end, so that the user end receives the random password and decodes the random password according to the set password verification rule, and the number of iterations of the key encryption algorithm is shared by the user end and the server end through a pre-shared channel, and the pre-shared channel is obtained after the user end and the server end are established through a pre-shared channel when it is determined that the random number in the decoded data of the user end is consistent with the random number in the random password of the server end.

[0166] From the above description, it can be seen that the computer-readable storage medium provided in the embodiment of the present application collects historical encryption verification data, performs an iteration number label addition operation on the historical encryption verification data, inputs the key encryption algorithm iteration number label into a preset random forest model for model training, determines the corresponding important encryption verification features according to the model prediction results after model training and the preset feature importance analysis algorithm, performs model training on the random forest model according to the important encryption verification features, and determines the corresponding key encryption algorithm iteration model; determines the corresponding key encryption algorithm iteration number according to the network status and the key encryption algorithm iteration model; inputs the decoded data and the key encryption algorithm iteration number into the preset key encryption algorithm, determines the corresponding key pair, and realizes time synchronization between the user end and the server end according to the key pair, thereby improving the reliability and efficiency of time network protocol key authentication.

[0167] The embodiments of the present application also provide a computer program product capable of implementing all the steps of the dynamic encryption verification method based on the time network protocol in the above embodiments, where the execution subject is a server or a client. When the computer program / instruction is executed by a processor, the steps of the dynamic encryption verification method based on the time network protocol are implemented. For example, the computer program / instruction implements the following steps:

[0168] Step S101: collect historical encryption verification data, perform an iteration number label adding operation on the historical encryption verification data, determine the corresponding key encryption algorithm iteration number label, input the key encryption algorithm iteration number label into a preset random forest model for model training, determine the corresponding important encryption verification feature according to the model prediction result after the model training and the preset feature importance analysis algorithm, perform model training on the random forest model according to the important encryption verification feature, and determine the corresponding key encryption algorithm iteration model; obtain the network status, and determine the corresponding key encryption algorithm iteration number according to the network status and the key encryption algorithm iteration model;

[0169] Step S102: input the decoded data and the number of iterations of the key encryption algorithm into a preset key encryption algorithm, determine the corresponding key pair, and implement time synchronization between the user end and the server end according to the key pair, wherein the decoded data is obtained after the user end sends an identity authentication request to the server end, and the server end determines the corresponding random password according to the set password verification rule and returns it to the user end, so that the user end receives the random password and decodes the random password according to the set password verification rule, and the number of iterations of the key encryption algorithm is shared by the user end and the server end through a pre-shared channel, and the pre-shared channel is obtained after the user end and the server end are established through a pre-shared channel when it is determined that the random number in the decoded data of the user end is consistent with the random number in the random password of the server end.

[0170] From the above description, it can be seen that the computer program product provided by the embodiment of the present application collects historical encryption verification data, performs an iteration number label addition operation on the historical encryption verification data, inputs the key encryption algorithm iteration number label into a preset random forest model for model training, determines the corresponding important encryption verification features based on the model prediction results after model training and the preset feature importance analysis algorithm, performs model training on the random forest model based on the important encryption verification features, and determines the corresponding key encryption algorithm iteration model; determines the corresponding key encryption algorithm iteration number based on the network status and the key encryption algorithm iteration model; inputs the decoded data and the key encryption algorithm iteration number into the preset key encryption algorithm, determines the corresponding key pair, and realizes time synchronization between the user end and the server end based on the key pair, thereby improving the reliability and efficiency of time network protocol key authentication.

[0171] It should be understood by those skilled in the art that embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0172] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (apparatus), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0173] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0174] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0175] The present invention uses specific embodiments to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. A dynamic encryption verification method based on a time network protocol, characterized in that: Applied to a verification platform, the verification platform is connected to a user end and a server end respectively, the method comprises: Collect historical encryption verification data, perform an iteration number label addition operation on the historical encryption verification data, determine the corresponding key encryption algorithm iteration number label, input the key encryption algorithm iteration number label into a preset random forest model for model training, determine the corresponding important encryption verification features according to the model prediction results after the model training and a preset feature importance analysis algorithm, perform model training on the random forest model according to the important encryption verification features, and determine the corresponding key encryption algorithm iteration model; obtain the network status, and determine the corresponding key encryption algorithm iteration number according to the network status and the key encryption algorithm iteration model; The decoded data and the number of iterations of the key encryption algorithm are input into a preset key encryption algorithm to determine a corresponding key pair, and time synchronization between the user end and the server end is achieved based on the key pair, wherein the decoded data is obtained after the user end sends an identity authentication request to the server end, and the server end determines the corresponding random password according to the set password verification rule and returns it to the user end, so that the user end receives the random password and then decodes the random password according to the set password verification rule, and the number of iterations of the key encryption algorithm is shared by the user end and the server end through a pre-shared channel, and the pre-shared channel is obtained after the user end and the server end are established through a pre-shared channel when it is determined that the random number in the decoded data of the user end is consistent with the random number in the random password of the server end.

2. The dynamic encryption verification method based on the time network protocol according to claim 1 is characterized in that: The server determines the corresponding random password according to the set password verification rule and returns it to the user end, including: After receiving the identity authentication request, the server determines a corresponding random number according to a random number generation algorithm; The random number is encrypted according to a preset encryption algorithm, a preset shared key, and a preset event count value to determine a corresponding random password.

3. The dynamic encryption verification method based on the time network protocol according to claim 1 is characterized in that: After the historical encryption verification data is collected, the following steps are included: Performing a feature extraction operation on the historical encryption verification data to determine corresponding encryption verification features; A feature conversion operation is performed on the encryption verification feature to determine a corresponding standard feature.

4. The dynamic encryption verification method based on the time network protocol according to claim 1 is characterized in that: The step of inputting the key encryption algorithm iteration number label into a preset random forest model for model training, and determining the corresponding important encryption verification features according to the model prediction results after the model training and a preset feature importance analysis algorithm, includes: Inputting the key encryption algorithm iteration number label and the preset standard features into a preset random forest model for model training to determine the corresponding model prediction result; A feature screening operation is performed based on the model prediction results and the preset average feature impurity to determine the corresponding important encryption verification features.

5. The dynamic encryption verification method based on the time network protocol according to claim 1 is characterized in that: The performing model training on the random forest model according to the important encryption verification features to determine the corresponding key encryption algorithm iteration model includes: Performing model training on the random forest model according to the important encryption verification feature, performing a performance judgment operation and a feature iteration operation on a second model performance obtained after the training and a first model performance obtained after the random forest model is trained according to the preset standard feature, to determine a corresponding optimal encryption verification feature; The optimal encryption verification feature is input into the random forest model for model training to determine the corresponding key encryption algorithm iteration model.

6. The dynamic encryption verification method based on the time network protocol according to claim 1 is characterized in that: The implementing time synchronization between the user terminal and the server terminal according to the key pair includes: The user end encrypts the time synchronization request according to the odd-numbered key in the key pair, and sends the encrypted time synchronization request to the server end; The server receives the encrypted time synchronization request, performs a decryption operation on the encrypted time synchronization request according to the odd-numbered key in the key pair, and determines the corresponding time synchronization request.

7. The dynamic encryption verification method based on the time network protocol according to claim 1 is characterized in that: The time synchronization between the client and the server is realized according to the key pair, and further includes: The server encrypts the time data according to the even-numbered key in the key pair, and sends the encrypted time data to the user terminal; The user terminal receives the encrypted time data, decrypts the encrypted time data according to the even-numbered key in the key pair, and performs a time synchronization operation according to the decrypted time data.

8. A dynamic encryption verification device based on a time network protocol, characterized in that: The device comprises: A key encryption algorithm iteration number determination module is used to collect historical encryption verification data, perform an iteration number label addition operation on the historical encryption verification data, determine the corresponding key encryption algorithm iteration number label, input the key encryption algorithm iteration number label into a preset random forest model for model training, determine the corresponding important encryption verification feature according to the model prediction result after the model training and a preset feature importance analysis algorithm, perform model training on the random forest model according to the important encryption verification feature, and determine the corresponding key encryption algorithm iteration model; obtain the network status, and determine the corresponding key encryption algorithm iteration number according to the network status and the key encryption algorithm iteration model; A time synchronization module is used to input the decoded data and the number of iterations of the key encryption algorithm into a preset key encryption algorithm, determine the corresponding key pair, and realize time synchronization between the user end and the server end according to the key pair, wherein the decoded data is obtained after the user end sends an identity authentication request to the server end, and the server end determines the corresponding random password according to the set password verification rule and returns it to the user end, so that the user end receives the random password and decodes the random password according to the set password verification rule, and the number of iterations of the key encryption algorithm is shared by the user end and the server end through a pre-shared channel, and the pre-shared channel is obtained after the user end and the server end perform a pre-shared channel establishment operation when it is determined that the random number in the decoded data of the user end is consistent with the random number in the random password of the server end.

9. An electronic 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 dynamic encryption verification method based on the time network protocol described in any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the dynamic encryption verification method based on the time network protocol described in any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Internet of vehicles security evaluation system based on block chain

    CN117857220A

  • Multi-key homomorphic encryption authentication evaluation method for data grid environment

    CN117978356A