An anonymous transaction method and system based on zero-knowledge proof

By selecting an appropriate encryption algorithm and dynamically adjusting the verification time, the problem of transaction data leakage and computational overhead in anonymous transactions based on zero-knowledge proof is solved, and efficient transaction information protection and anonymity enhancement are achieved.

CN118195600BActive Publication Date: 2024-10-11SHENZHEN SHUDUN INFORMATION TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410456359.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-16
Publication Date
2024-10-11
Estimated Expiration
2044-04-16

AI Technical Summary

Technical Problem

In anonymous transactions based on zero-knowledge proofs, generating proofs that are too large or take too long to verify may lead to transaction data leakage, destroy anonymity, increase computing overhead, and reduce user experience.

Method used

By selecting an appropriate encryption algorithm, determining the key length based on security requirements and algorithm characteristics, extracting the sensitivity of the encrypted information and algorithm security index, comprehensively analyzing and evaluating the degree of protection of the encryption scheme, dividing transaction information into different encryption levels, and based on real-time The verification time is dynamically adjusted based on the abnormality of network load and transaction volume deviation.

Benefits of technology

Effectively protect the security of transaction information, reduce the risk of transaction data leakage, enhance anonymity, reduce computing overhead, and improve system stability and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118195600B_ABST
    Figure CN118195600B_ABST
Patent Text Reader

Abstract

The invention discloses an anonymous transaction method and system based on zero-knowledge proof, and specifically relates to the technical field of transaction data management. By selecting a suitable encryption algorithm and determining a key length to meet the requirements of security requirement information and algorithm characteristic information, feature extraction is performed on the security requirement information and encryption algorithm information, and features such as encryption information sensitivity and algorithm security index are extracted. These features are comprehensively analyzed to evaluate the degree of protection of transaction information by the encryption scheme. According to the evaluation result, the transaction information is divided into different encryption levels, and the encryption scheme is optimized in real time. The optimized encryption scheme is executed, and a comprehensive analysis is performed on the real-time network load abnormality and transaction volume deviation value. According to the analysis result, the verification time is dynamically adjusted to improve the stability of the system, reduce the calculation overhead, ensure the security of transaction information and the stable operation of the system, and provide users with more reliable anonymous transaction services.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of transaction data management, and in particular to an anonymous transaction method and system based on zero-knowledge proof. Background Art

[0002] Anonymous transactions based on zero-knowledge proofs mean that when conducting transactions, participants can verify the validity of the transaction without revealing the specific details of the transaction or the relevant identity information involved. Zero-knowledge proof is a cryptographic concept that allows a statement to be proved to be true without revealing any specific information about the statement or leaking the privacy of the prover. In anonymous transactions, zero-knowledge proofs can be used to prove that the funds involved in the transaction are indeed valid, have not been double-spent, and that the identity information of any participant in the transaction has not been leaked.

[0003] First, in an anonymous transaction based on zero-knowledge proof, the initiator of the transaction encrypts the transaction information to be conducted and generates a proof that the transaction is valid, but does not disclose the specific transaction details. Then, the recipient of the transaction verifies the proof to confirm the validity of the transaction, but also does not know the identity of the initiator or the transaction details. This method protects the privacy of transaction participants and allows transactions to be conducted while protecting personal information. This technology is widely used in the field of cryptocurrency to achieve anonymity and security of transactions.

[0004] The prior art has the following deficiencies:

[0005] In anonymous transactions based on zero-knowledge proofs, when the initiator of the transaction encrypts the transaction information to be carried out, if the generated proof is too large or the verification time is too long, it may lead to the leakage of transaction data, allowing attackers to infer the content of the transaction by analyzing the size and structure of the transaction, thereby destroying the anonymity of the transaction. At the same time, the long verification process will generate high computing overhead, which will increase the cost of the transaction and reduce the user experience. Summary of the invention

[0006] The purpose of the present invention is to provide an anonymous transaction method and system based on zero-knowledge proof to solve the shortcomings of the background technology.

[0007] In order to achieve the above-mentioned object, the present invention provides the following technical solution: an anonymous transaction method based on zero-knowledge proof, characterized in that: it comprises the following steps;

[0008] S1: Formulate an encryption scheme by selecting an encryption algorithm and determine the key length based on security requirements and algorithm characteristics;

[0009] S2: Extract features from security requirement information and encryption algorithm information, extract the sensitivity of encryption information in security requirement information and the algorithm security index in algorithm characteristic information;

[0010] S3: Comprehensively analyze the sensitivity of encrypted information and the algorithm security index to evaluate the degree of protection of transaction information by the encryption scheme;

[0011] S4: Divide the transaction information into different encryption levels according to the degree of protection of the encryption scheme for the transaction information, and optimize the encryption scheme in real time;

[0012] S5: Execute the optimized encryption scheme, conduct a comprehensive analysis of the real-time network load anomaly and transaction volume deviation, and dynamically adjust the verification time based on the analysis results, thereby improving the stability of the system and reducing computing overhead.

[0013] In a preferred implementation, in S2, feature extraction is performed on the security requirement information and the encryption algorithm information to extract the sensitivity of the encryption information in the security requirement information, specifically:

[0014] The method for obtaining the sensitivity of encrypted information is as follows:

[0015] Collect transaction information that needs to be encrypted, convert the transaction information into a data set, and establish a transaction information set , X represents an attribute in the data set, n represents the total number of attribute values, and each transaction information corresponds to a data item, which contains multiple features as attributes;

[0016] For each feature X in the dataset, calculate its information entropy , the calculation expression of information entropy is: H(X)= * ;in, is the information entropy, represents the probability of the occurrence of the i-th attribute value in feature X, and n represents the total number of attribute values;

[0017] Get transaction information collection , and the corresponding information entropy set , get the weight set corresponding to each feature , the information entropy of each feature is weighted and summed to calculate the sensitivity of the encrypted information. The calculation expression of the sensitivity of the encrypted information is: = * + * +...+ * ;in, i represents the weight of the i-th feature, The sensitivity of the encrypted information.

[0018] In a preferred implementation, in S2, feature extraction is performed on the security requirement information and the encryption algorithm information to extract the algorithm security index in the algorithm characteristic information, specifically:

[0019] The method for obtaining the algorithm security index is as follows: obtain the prime order n of the curve, which is the minimum positive integer value of the infinite point O obtained by repeatedly adding the points G on the elliptic curve n times, and obtain the number of points q on the curve, which refers to the number of all points on the elliptic curve E that satisfy the equation, including the base point G; calculate the algorithm security index based on the selected elliptic curve parameters, the calculated prime order n and the number of points q on the curve, and the specific calculation formula is: , where is the algorithm security index.

[0020] In a preferred implementation, in S3, the sensitivity of the encrypted information and the algorithm security index are comprehensively analyzed, specifically:

[0021] The encryption information sensitivity and algorithm security index are normalized, and the security assessment coefficient of the encryption scheme for protecting transaction information is calculated based on the normalized encryption information sensitivity and algorithm security index.

[0022] In a preferred embodiment, in S4, the transaction information is divided into different encryption levels according to the degree of protection of the transaction information by the encryption scheme, specifically:

[0023] The obtained safety assessment coefficient is compared with a gradient standard threshold, the gradient standard threshold includes a first standard threshold and a second standard threshold, and the first standard threshold is less than the second standard threshold, and the safety assessment coefficient is compared with the first standard threshold and the second standard threshold respectively;

[0024] If the security assessment coefficient is greater than the second standard threshold, no warning signal is issued and the simple encryption level is selected;

[0025] If the security assessment coefficient is greater than the first standard threshold and less than or equal to the second standard threshold, a second-level warning signal is issued and the general encryption level is selected;

[0026] If the security assessment coefficient is less than or equal to the first standard threshold, a first-level warning signal is issued and a complex encryption level is selected.

[0027] In a preferred implementation, in S5, the optimized encryption scheme is executed to obtain the real-time abnormality of the network load, specifically:

[0028] The method for obtaining the abnormal degree of network load is as follows:

[0029] In the anonymous transaction system, the M / M / 1 queue model is used to define the parameters. λ is the transaction arrival rate, μ is the transaction service rate, and ρ represents the system utilization rate. The calculation expression is: ρ = λ / μ;

[0030] According to the queue model and defined parameters, calculate the average queue length L, L = λ / (μ - λ); and the average waiting time W, W = 1 / (μ-λ);

[0031] According to the calculated system performance indicators, the expected value E(L) of the average queue length queue L, the expected value E(W) of the average waiting time W, and the expected value E(ρ) of the system utilization ρ are obtained respectively. The standard value DL of the average queue length queue L, the standard value DW of the average waiting time W, and the standard value Dρ of the system utilization ρ under the preset standard state are obtained. The abnormality degree of the network load is calculated. The specific calculation expression is: = ; In the formula, The abnormal degree of network load.

[0032] In a preferred embodiment, in S5, the optimized encryption scheme is executed to obtain the transaction volume deviation value, specifically:

[0033] The method for obtaining the transaction volume deviation value is:

[0034] Determine the window size used to calculate the moving average, and use the selected window size to calculate the moving average at each time point; for each time point t, average the transaction volume within the past window size to obtain the moving average M(t). The specific calculation expression is: M(t)= ;Where V(i) is the trading volume at time point i; w is the size of the moving window;

[0035] At each time point t, the deviation between the actual trading volume and the moving average is calculated. The specific calculation expression is: P(t) = actual trading volume (t) − M(t); where P(t) is the deviation value;

[0036] As time goes by, the moving average and deviation values ​​are continuously updated; at each new time point, the latest transaction volume is added to the window, the oldest transaction volume in the window is removed, and the moving average and deviation values ​​are recalculated; the transaction volume deviation value is calculated, and the specific calculation expression is: = ; In the formula, is the transaction volume deviation value.

[0037] In a preferred embodiment, a comprehensive analysis is performed on the real-time network load anomaly degree and transaction volume deviation value, and the verification time is dynamically adjusted according to the analysis results, specifically:

[0038] The abnormal degree of network load and the transaction volume deviation value are normalized, and the execution effect coefficient of the optimized encryption scheme is calculated by the normalized abnormal degree of network load and the transaction volume deviation value;

[0039] The execution effect coefficient is compared with the standard threshold. If the execution effect coefficient is greater than or equal to the standard threshold, a normal signal is issued and the verification time is reduced to reduce the computing overhead. If the execution effect coefficient is less than the standard threshold, an abnormal signal is issued and the verification time needs to be increased to improve

[0040] System stability.

[0041] The present invention also provides an anonymous transaction system based on zero-knowledge proof, including an encryption scheme selection module, a feature extraction module, an encryption scheme evaluation module, an encryption level division module and a dynamic verification time adjustment module:

[0042] Encryption scheme selection module: formulates an encryption scheme by selecting an encryption algorithm and determines the key length based on security requirements and algorithm characteristics;

[0043] Feature extraction module: extracts features from security requirement information and encryption algorithm information, extracts the sensitivity of encryption information in security requirement information and the algorithm security index in algorithm characteristic information;

[0044] Encryption scheme evaluation module: conducts a comprehensive analysis of the sensitivity of encrypted information and the algorithm security index to evaluate the degree of protection of transaction information by the encryption scheme;

[0045] Encryption level division module: divides transaction information into different encryption levels according to the degree of protection of transaction information by the encryption scheme, and optimizes the encryption scheme in real time;

[0046] Dynamic verification time adjustment module: Executes the optimized encryption scheme, conducts a comprehensive analysis of the real-time network load anomaly and transaction volume deviation, and dynamically adjusts the verification time based on the analysis results, thereby improving the stability of the system and reducing computing overhead.

[0047] In the above technical solution, the technical effects and advantages provided by the present invention are:

[0048] 1. The present invention can effectively protect the security of transaction information, reduce the risk of transaction data leakage, and enhance the anonymity of transactions by comprehensively analyzing security requirement information and encryption algorithm information, formulating appropriate encryption schemes, and dynamically optimizing them. Transaction information is divided into different encryption levels, and the encryption scheme is adjusted in real time according to the evaluation results, which helps to carry out refined protection of transaction information according to actual needs and improve the security of the entire system.

[0049] 2. The present invention can adjust the verification time according to the real-time network load anomaly and transaction volume deviation value through the optimized encryption scheme to reduce computing overhead and improve system stability. This can not only reduce the high computing cost caused by long-term verification, but also improve transaction efficiency and user experience. By dynamically adjusting the verification time, the system can more effectively adapt to different loads and transaction volumes, thereby improving overall efficiency, reducing transaction costs, and improving user satisfaction. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] 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 will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.

[0051] Figure 1 The figure is a flow chart of the method of the present invention.

[0052] Figure 2 It is a system module diagram of the present invention. DETAILED DESCRIPTION

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

[0054] See also Figure 1 As shown, the anonymous transaction method based on zero-knowledge proof described in this embodiment includes the following steps:

[0055] S1: Formulate an encryption scheme by selecting an encryption algorithm and determine the key length based on security requirements and algorithm characteristics;

[0056] S2: Extract features from security requirement information and encryption algorithm information, extract the sensitivity of encryption information in security requirement information and the algorithm security index in algorithm characteristic information;

[0057] S3: Comprehensively analyze the sensitivity of encrypted information and the algorithm security index to evaluate the degree of protection of transaction information by the encryption scheme;

[0058] S4: Divide the transaction information into different encryption levels according to the degree of protection of the encryption scheme for the transaction information, and optimize the encryption scheme in real time;

[0059] S5: Execute the optimized encryption scheme, conduct a comprehensive analysis of the real-time network load anomaly and transaction volume deviation, and dynamically adjust the verification time based on the analysis results, thereby improving the stability of the system and reducing computing overhead.

[0060] Among them, the encryption scheme is formulated by selecting an encryption algorithm, and the key length is determined according to the security requirement information and algorithm characteristic information, specifically:

[0061] Commonly used encryption algorithms include: Elliptic Curve Cryptography (ECC): ECC is a very efficient asymmetric encryption algorithm that uses point operations on elliptic curves to implement encryption and decryption operations. ECC is widely used in digital currency transactions to generate and manage digital currency addresses, sign transactions, and verify transactions.

[0062] Zero-Knowledge Proof (ZKP): ZKP allows the prover to prove that a statement is true without revealing any specific information about the statement or leaking the prover's privacy. In digital currency transactions, ZKP can be used to prove the validity and legality of transactions without revealing the specific details of the transaction, thereby achieving anonymity and privacy protection of transactions.

[0063] Hash Function: A hash function maps an input message of any length to an output summary of a fixed length, which has the characteristics of fixed length and irreversibility. Hash functions are often used to generate transaction summaries and transaction IDs to verify the integrity and uniqueness of transactions.

[0064] Symmetric encryption algorithm: Symmetric encryption algorithm uses the same key for encryption and decryption operations. It has fast encryption and decryption speed and is suitable for encryption of large amounts of data. Symmetric encryption algorithm can be used to protect the transmission and storage security of transaction data, such as SSL / TLS encryption transport layer, data encryption and decryption, etc.

[0065] Asymmetric encryption algorithms (such as RSA): Asymmetric encryption algorithms use a pair of keys, namely a public key and a private key, where the public key is used to encrypt data and the private key is used to decrypt data. Asymmetric encryption algorithms can be used for digital signatures and verification in digital currency transactions to ensure the authenticity and integrity of transactions and protect the secure transmission of transaction information.

[0066] Determine the key length based on security requirements and algorithm characteristics, mainly including:

[0067] Conduct security requirements analysis on transaction information, including assessing the sensitivity, security requirements and possible threats of transaction information. This information will directly affect the selection of key length.

[0068] Refer to existing cryptographic standards and recommendations and determine the key length for different security levels.

[0069] Use cryptographic tools and evaluation software to evaluate the impact of different key lengths on encryption algorithms. These tools can simulate the encryption and decryption process of keys of different lengths to evaluate their security and performance.

[0070] Considering the impact of the development of quantum computers on encryption algorithms in the future, it is necessary to select encryption algorithms with quantum security and corresponding key lengths. Some cryptography experts suggest increasing the key length to improve resistance to quantum attacks.

[0071] Conduct attack simulations and penetration tests to simulate potential attack scenarios and evaluate security at different key lengths. This can help identify potential security holes and weaknesses, thus guiding the selection of an appropriate key length.

[0072] Analyze and optimize the performance of encryption algorithms under different key lengths. Consider performance indicators such as encryption and decryption speed, memory consumption, and computing resources to select the most suitable key length.

[0073] Dynamically adjust the key length according to actual conditions and changes in security requirements. As time goes by and technology develops, it may be necessary to continuously adjust the key length to adapt to new security threats and technological developments.

[0074] Perform feature extraction on security requirement information and encryption algorithm information, extract the encryption information sensitivity in security requirement information and the algorithm security index in algorithm characteristic information, specifically:

[0075] The sensitivity of encrypted information refers to the importance or sensitivity of transaction information to security. Different types of transaction information may contain different levels of sensitive data.

[0076] The sensitivity of transaction information encryption information includes the confidentiality of the data, whether the data contained in the transaction information is confidential information, and the leakage may have a significant impact on the transaction participants. The privacy of the data, whether the transaction information contains personal privacy data, such as name, address, bank account number, etc. The integrity of the data, whether the transaction information needs to ensure its integrity to prevent tampering or forgery.

[0077] The method for obtaining the sensitivity of encrypted information is as follows:

[0078] Collect transaction information that needs to be encrypted, convert the transaction information into a data set, and establish a transaction information set , X represents a feature or attribute in the data set, n represents the total number of attribute values, and each transaction information corresponds to a data item, which contains multiple features as attributes;

[0079] For each feature X in the dataset, calculate its information entropy , The information entropy of feature X measures the uncertainty or information content of feature X. The calculation expression of information entropy is: H(X)= * ;in, represents the probability of the occurrence of the i-th attribute value in feature X, and n represents the total number of attribute values;

[0080] Get transaction information collection , and the corresponding information entropy set , get the weight set corresponding to each feature , the information entropy of each feature is weighted and summed to calculate the sensitivity of the encrypted information. The calculation expression of the sensitivity of the encrypted information is: = * + * +...+ * ,in, i represents the weight of the i-th feature, The sensitivity of the encrypted information.

[0081] The higher the sensitivity of encrypted information, the higher the uncertainty and complexity of the transaction information, which may contain more sensitive information, and therefore requires stronger encryption protection. The greater the sensitivity of encrypted information, the higher the encryption requirements for transaction information, and the stronger the encryption protection required.

[0082] In anonymous transactions based on zero-knowledge proof, it is crucial to choose a suitable encryption algorithm. Extracting the algorithm security index from the security requirement information means evaluating the security of the selected encryption algorithm. The algorithm security index is an indicator for evaluating the security quality of the selected algorithm. Specifically, it includes:

[0083] First, the characteristics of the selected encryption algorithm need to be analyzed. This includes the design structure of the algorithm, the encryption process, the key generation method, and the operation of plaintext, ciphertext, and keys. Next, it is necessary to understand the known attack methods, including common attack methods in symmetric cryptography and public key cryptography. These attacks include exhaustive attacks, differential attacks, linear attacks, chosen ciphertext attacks, etc. By analyzing the design characteristics of the algorithm and the known attack methods, the algorithm's anti-attack ability can be evaluated. For example, if the algorithm uses a strong key generation method, has a large enough key space and randomness, then it may be highly resistant to exhaustive attacks. In addition, the security of the encryption algorithm in actual application scenarios also needs to be considered. This includes factors such as the algorithm's performance, scalability, and applicability.

[0084] Finally, the security index of the algorithm is determined based on a comprehensive analysis of the algorithm's characteristics, known attack methods, and actual application scenarios. This security index can be a qualitative assessment or a quantitative value to indicate the security level of the algorithm.

[0085] The method for obtaining the algorithm security index is:

[0086] For encryption algorithms based on elliptic curves, you first need to select appropriate elliptic curve parameters, including the elliptic curve equation, base point G, group order n and other parameters.

[0087] The algorithm security index can be calculated by analyzing the selected elliptic curve parameters. Common security indexes include the prime order n of the curve, the number of points on the curve q, the security of the elliptic curve, etc.

[0088] Get the prime order n of the curve. The prime order n refers to the minimum positive integer value of the infinite point O obtained by repeatedly adding the points G on the elliptic curve n times. Generally, the larger n is, the higher the security of the elliptic curve is. The algorithm's ability to resist discrete logarithm attacks can be evaluated by analyzing the size of n. And get the number of points on the curve q. The number of points on the curve q refers to the number of all points on the elliptic curve E that satisfy the equation, including the base point G. Generally, the size of q is related to the prime order n. The larger q is, the higher the security of the elliptic curve is. The algorithm's ability to resist small-rank attacks can be evaluated by analyzing the size of q.

[0089] According to the selected elliptic curve parameters, the calculated prime order n and the number of points q on the curve are used to calculate the algorithm security index. The specific calculation formula is: , where is the algorithm security index;

[0090] The larger the algorithm security index, the stronger the security of the encryption scheme for transaction information. Because the increase in the algorithm security index usually indicates that the encryption algorithm has higher anti-attack capabilities and stronger security. Specifically, when the algorithm security index is larger, it means that the selected encryption algorithm is more robust in design and can better resist various attacks. This includes stronger resistance to known attack methods, such as exhaustive attacks, differential attacks, linear attacks, etc. In addition, a higher security index also means that the algorithm is more reliable in practical applications and can provide higher security.

[0091] Therefore, when the algorithm security index is larger, the encryption scheme is more secure for transaction information, and the transaction information is less likely to be cracked or leaked, thereby effectively protecting the privacy and confidentiality of the transaction.

[0092] Comprehensively analyze the sensitivity of encrypted information and the algorithm security index to evaluate the degree of protection of transaction information by the encryption scheme, specifically:

[0093] The encryption information sensitivity and algorithm security index are normalized, and the security assessment coefficient of the encryption scheme for protecting transaction information is calculated based on the normalized encryption information sensitivity and algorithm security index.

[0094] For example, the present invention can use the following formula to calculate the security evaluation coefficient of the encryption scheme for protecting transaction information, and the calculation expression is: = ; In the formula, is the safety assessment factor, is the algorithm security index, To encrypt the information, is the algorithm security index, the proportional coefficient of the sensitivity of the encrypted information, and 0;

[0095] It can be seen from the calculation expression that the larger the value of the algorithm security index, the smaller the value of the encrypted information sensitivity, the greater the security assessment coefficient of the encryption scheme for protecting transaction information, and the higher the security of the transaction information.

[0096] According to the degree of protection of transaction information by the encryption scheme, the transaction information is divided into different encryption levels, and the encryption scheme is optimized in real time, specifically:

[0097] Compare the obtained safety assessment coefficient with the gradient standard threshold, the gradient standard threshold in the present application includes a first standard threshold and a second standard threshold, and the first standard threshold is less than the second standard threshold, and compare the safety assessment coefficient with the first standard threshold and the second standard threshold respectively;

[0098] If the security assessment coefficient is greater than the second standard threshold, it means that the encryption scheme has a higher security for protecting transaction information. At this time, no warning signal is issued. For transaction information with higher security, a simple encryption level can be selected. Simple encryption uses a more common and easy-to-implement encryption algorithm, such as the AES symmetric encryption algorithm. This type of encryption usually uses a shorter key length, such as a 128-bit AES key.

[0099] If the security assessment coefficient is greater than the first standard threshold and less than or equal to the second standard threshold, it means that the encryption scheme is generally secure in protecting transaction information. At this time, a second-level warning signal is issued, and more advanced protection measures are required for transaction information with general security. You can choose a general encryption level, use a more complex encryption algorithm and a longer key length, for example, you can choose a longer AES key (such as 256 bits) or a longer RSA key (such as 2048 bits or more).

[0100] If the security assessment coefficient is less than or equal to the first standard threshold, it means that the encryption scheme's protection of transaction information is less secure, and a first-level warning signal is issued. For transaction information with lower security, a complex encryption level can be selected; the most advanced and powerful encryption technology needs to be adopted, which may include the use of complex encryption algorithms (such as homomorphic encryption, zero-knowledge proof, etc.) and longer key lengths. This type of encryption has strong protection capabilities and can remain secure even when new attack methods such as quantum computing emerge in the future.

[0101] It should be noted here that the importance of the first-level warning signal is greater than that of the second-level warning signal. Relevant personnel can focus on encrypting transaction information with general security and lower security according to the importance of the warning signal, and optimize the encryption scheme in real time.

[0102] In this embodiment, an encryption scheme is formulated by selecting an encryption algorithm, and the key length is determined according to the security requirement information and the algorithm characteristic information; feature extraction is performed on the security requirement information and the encryption algorithm information, and the sensitivity of the encryption information in the security requirement information and the algorithm security index in the algorithm characteristic information are extracted; the sensitivity of the encryption information and the algorithm security index are comprehensively analyzed to evaluate the degree of protection of the encryption scheme for transaction information; the transaction information is divided into different encryption levels according to the degree of protection of the encryption scheme for transaction information, and the encryption scheme is optimized in real time. Not only can a suitable encryption algorithm be selected according to the security requirement information and the algorithm characteristic information, and a suitable key length be determined, but also through feature extraction, the sensitivity of the encryption information and the security of the algorithm can be evaluated, thereby comprehensively analyzing the degree of protection of the encryption scheme for transaction information.

[0103] Example 2

[0104] Execute the optimized encryption scheme, conduct a comprehensive analysis of the real-time network load anomaly and transaction volume deviation, and dynamically adjust the verification time based on the analysis results, thereby improving the stability of the system and reducing computing overhead;

[0105] The degree of network load anomaly refers to the degree of deviation of network load from the normal state. In a normally operating network, there is a baseline load level, which represents the normal load condition of the network. The degree of network load anomaly can be measured based on the difference between the current network load condition and this baseline level.

[0106] Specifically, when the network load is higher than the normal level, it can be said that the network load abnormality is high; conversely, when the network load is lower than the normal level, the network load abnormality is low. The degree of abnormality can be quantified by the degree of deviation of load indicators, such as network delay, packet loss rate, bandwidth utilization, etc.

[0107] In anonymous transactions based on zero-knowledge proof, the degree of network load anomaly can affect the speed and efficiency of transaction processing. Therefore, dynamically adjusting the verification time according to the real-time network load anomaly can make the system more flexible to deal with different network load conditions, thereby improving the performance and stability of the transaction system.

[0108] The method for obtaining the abnormal degree of network load is as follows:

[0109] First, we need to determine a queue model that is suitable for describing the transaction system. In an anonymous transaction system, the M / M / 1 queue model can be used, which is suitable for describing the randomness of arrival and departure in a single service.

[0110] After determining the queue model, the parameters are defined: λ is the transaction arrival rate, which indicates the average number of transactions arriving per unit time; μ is the transaction service rate, which indicates the average number of transactions completed per unit time; ρ is the system busyness, which indicates the utilization rate of the system. The calculation expression is: ρ = λ / μ.

[0111] According to the queue model and defined parameters, the average queue length L is calculated, L = λ / (μ - λ); the average queue length L represents the average number of transactions queued in the system; and the average waiting time W, W = 1 / (μ-λ); the average waiting time W represents the average waiting time of a transaction in the queue; the system utilization ρ is calculated, ρ = λ / μ; the system utilization ρ represents the utilization of the server in the system, that is, the ratio of the transaction service rate to the arrival rate.

[0112] According to the calculated system performance indicators, the expected value E(L) of the average queue length queue L, the expected value E(W) of the average waiting time W, and the expected value E(ρ) of the system utilization ρ are obtained respectively. The standard value DL of the average queue length queue L, the standard value DW of the average waiting time W, and the standard value Dρ of the system utilization ρ under the preset standard state are obtained. The abnormality degree of the network load is calculated. The specific calculation expression is: = ; In the formula, The abnormal degree of network load;

[0113] A greater degree of network load anomaly means a greater deviation between the system's performance and expectations. This may indicate a worsening of system stability. When the degree of network load anomaly increases, the system may experience the following:

[0114] An abnormal increase in network load may lead to a decrease in system performance, such as slower transaction processing, increased latency, or reduced service quality. In extreme cases, a high degree of abnormal network load may lead to system crashes or service interruptions, making the system unable to operate normally, thereby affecting user experience and transaction processes.

[0115] An abnormal increase in network load may lead to excessive consumption of system resources (such as computing resources, memory, bandwidth, etc.), thereby affecting the normal operation of other system functions and even causing system crashes. High abnormal network load may increase the risk of system failures, such as errors and anomalies caused by overload, further affecting the stability and reliability of the system.

[0116] Volume deviation refers to the difference between current volume and expected volume. In anonymous trading systems, expected volume is usually determined based on historical data, trading patterns, or other factors. Volume deviation can be used to measure the degree of deviation of current volume from expected value.

[0117] The method for obtaining the transaction volume deviation value is:

[0118] Determines the window size used for calculating the moving average. This window size represents the time frame of recent trading volumes.

[0119] Using the selected window size, the moving average is calculated at each time point. For each time point t, the transaction volume within the past window size is averaged to obtain the moving average M(t). The specific calculation expression is: M(t)= ; Where V(i) is the trading volume at time point i; w is the size of the moving window, indicating the time range of the most recent trading volume to be considered.

[0120] At each time point t, calculate the deviation between the actual volume and the moving average. This can be calculated using the following formula: P(t) = Actual Volume(t) − M(t); P(t) is the deviation value, which represents the difference between the actual volume and the moving average.

[0121] As time goes by, the moving average and deviation values ​​are continuously updated. At each new time point, the latest transaction volume is added to the window, the oldest transaction volume in the window is removed, and the moving average and deviation values ​​are recalculated. The specific calculation expression for calculating the transaction volume deviation value is: = ; In the formula, is the transaction volume deviation value.

[0122] The larger the volume deviation value, the greater the difference between the current volume and the moving average. The stability of the system is generally considered to be related to the volatility of the volume. Therefore, the larger the volume deviation value, the greater the volatility of the current volume of the system, the greater the uncertainty, and the stability of the system may be affected.

[0123] Larger trading volume fluctuations mean that the system may experience larger trading volume changes in a short period of time, which may lead to increased system instability and affect the normal operation of the system.

[0124] Large fluctuations in trading volume may increase system risks. Especially for financial systems or other critical systems, the instability of trading volume may lead to greater risks, such as market fluctuations, transaction delays and other issues.

[0125] When the system is processing large fluctuations in transaction volume, it may require more resources to cope with it, which may lead to a decline in system performance, including increased latency, reduced processing speed and other issues.

[0126] The network load anomaly degree and transaction volume deviation value are normalized, and the execution effect coefficient of the optimized encryption scheme is calculated based on the normalized network load anomaly degree and transaction volume deviation value.

[0127] For example, the present invention may use the following formula to calculate the execution effect coefficient of the optimized encryption scheme, and the calculation expression is: = ; In the formula, is the execution effect coefficient, is the abnormal degree of network load, is the transaction volume deviation value, are the network load anomaly degree and the proportional coefficient of the transaction volume deviation value, respectively, and 0;

[0128] Compare the execution effect coefficient with the standard threshold. If the execution effect coefficient is greater than or equal to the standard threshold, it means that the encryption scheme after execution is effective and the system stability is high. At this time, a normal signal is issued and the verification time can be appropriately reduced to reduce the computing overhead. If the execution effect coefficient is less than the standard threshold, it means that the encryption scheme after execution is effective and the system stability is low. At this time, an abnormal signal is issued and the verification time needs to be increased to improve the system stability.

[0129] In this embodiment, data such as the degree of abnormality of network load and the deviation value of transaction volume are collected in real time and comprehensively analyzed. According to the analysis results, the system dynamically adjusts the verification time. If the degree of abnormality of network load or the deviation value of transaction volume is high, the system may increase the verification time to ensure security; conversely, if the environment is relatively stable, the verification time can be appropriately reduced to reduce computing overhead. By dynamically adjusting the verification time, the system can maintain stability according to real-time environmental changes. This ensures that the system can run effectively under different circumstances and reduces the risk of system crashes or anomalies. The optimized encryption scheme and the dynamic adjustment of the verification time strategy can effectively reduce the computing overhead of the system. By increasing the verification time when necessary, the system can reduce unnecessary computing costs as much as possible while ensuring security, thereby improving the efficiency of the system.

[0130] Example 3

[0131] See also Figure 2 As shown, the anonymous transaction system based on zero-knowledge proof described in this embodiment includes an encryption scheme selection module, a feature extraction module, an encryption scheme evaluation module, an encryption level division module and a dynamic verification time adjustment module:

[0132] Encryption scheme selection module: formulates an encryption scheme by selecting an encryption algorithm and determines the key length based on security requirements and algorithm characteristics;

[0133] Feature extraction module: extracts features from security requirement information and encryption algorithm information, extracts the sensitivity of encryption information in security requirement information and the algorithm security index in algorithm characteristic information;

[0134] Encryption scheme evaluation module: conducts a comprehensive analysis of the sensitivity of encrypted information and the algorithm security index to evaluate the degree of protection of transaction information by the encryption scheme;

[0135] Encryption level division module: divides transaction information into different encryption levels according to the degree of protection of transaction information by the encryption scheme, and optimizes the encryption scheme in real time;

[0136] Dynamic verification time adjustment module: Executes the optimized encryption scheme, conducts a comprehensive analysis of the real-time network load anomaly and transaction volume deviation, and dynamically adjusts the verification time based on the analysis results, thereby improving the stability of the system and reducing computing overhead.

[0137] The above embodiments can be implemented in whole or in part by software, hardware, firmware or any other combination. When implemented by software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that contains one or more available media sets. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium. The semiconductor medium can be a solid-state hard disk.

[0138] It should be understood that the term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. A and B can be singular or plural. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship, but it may also indicate an "and / or" relationship. Please refer to the context for specific understanding.

[0139] It should be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0140] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0141] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. An anonymous transaction method based on zero-knowledge proof, characterized by: The steps include: S1: Formulate an encryption scheme by selecting an encryption algorithm and determine the key length based on security requirements and algorithm characteristics; S2: Extract features from security requirement information and encryption algorithm information, extract the sensitivity of encryption information in security requirement information and the algorithm security index in algorithm characteristic information; S3: Comprehensively analyze the sensitivity of encrypted information and the algorithm security index to evaluate the degree of protection of transaction information by the encryption scheme; S4: Divide the transaction information into different encryption levels according to the degree of protection of the encryption scheme for the transaction information, and optimize the encryption scheme in real time; S5: Execute the optimized encryption scheme, conduct a comprehensive analysis of the real-time network load anomaly and transaction volume deviation, and dynamically adjust the verification time based on the analysis results, thereby improving the stability of the system and reducing computing overhead; Step S5 specifically includes: a method for obtaining the abnormality degree of network load is: In the anonymous transaction system, the M / M / 1 queue model is used to define the parameters. λ is the transaction arrival rate, μ is the transaction service rate, and ρ represents the system utilization rate. The calculation expression is: ρ = λ / μ; According to the queue model and defined parameters, calculate the average queue length L, L = λ / (μ - λ); and the average waiting time W, W = 1 / (μ-λ); According to the calculated system performance indicators, the expected value E(L) of the average queue length queue L, the expected value E(W) of the average waiting time W, and the expected value E(ρ) of the system utilization ρ are obtained respectively. The standard value DL of the average queue length queue L, the standard value DW of the average waiting time W, and the standard value Dρ of the system utilization ρ under the preset standard state are obtained. The abnormality degree of the network load is calculated. The specific calculation expression is: = ; In the formula, The abnormal degree of network load; The method for obtaining the transaction volume deviation value is: Determine the window size used to calculate the moving average, and use the selected window size to calculate the moving average at each time point; for each time point t, average the transaction volume within the past window size to obtain the moving average M(t). The specific calculation expression is: M(t)= ;Where V(i) is the trading volume at time point i; w is the size of the moving window; At each time point t, the deviation between the actual transaction volume and the moving average is calculated. The specific calculation expression is: ; Where P(t) is the deviation value and D(t) is the actual transaction volume; As time goes by, the moving average and deviation values ​​are continuously updated; at each new time point, the latest transaction volume is added to the window, the oldest transaction volume in the window is removed, and the moving average and deviation values ​​are recalculated; the transaction volume deviation value is calculated, and the specific calculation expression is: = ; In the formula, is the volume deviation value; The abnormal degree of network load and the transaction volume deviation value are normalized, and the execution effect coefficient of the optimized encryption scheme is calculated by the normalized abnormal degree of network load and the transaction volume deviation value; The execution effect coefficient is compared with the standard threshold. If the execution effect coefficient is greater than or equal to the standard threshold, a normal signal is issued and the verification time is reduced to reduce computing overhead. If the execution effect coefficient is less than the standard threshold, an abnormal signal is issued and the verification time needs to be increased to improve system stability.

2. The anonymous transaction method based on zero-knowledge proof according to claim 1, characterized in that: In S2, feature extraction is performed on the security requirement information and encryption algorithm information to extract the sensitivity of the encryption information in the security requirement information, specifically: The method for obtaining the sensitivity of encrypted information is as follows: Collect transaction information that needs to be encrypted, convert the transaction information into a data set, and establish a transaction information set , X represents an attribute in the data set, n represents the total number of attribute values, and each transaction information corresponds to a data item, which contains multiple features as attributes; For each feature X in the dataset, calculate its information entropy , the calculation expression of information entropy is: H(X)= ;in, is the information entropy, represents the probability of the occurrence of the i-th attribute value in feature X, and n represents the total number of attribute values; Get transaction information collection , and the corresponding information entropy set , get the weight set corresponding to each feature , the information entropy of each feature is weighted and summed to calculate the sensitivity of the encrypted information. The calculation expression of the sensitivity of the encrypted information is: in, i represents the weight of the i-th feature, The sensitivity of the encrypted information.

3. The anonymous transaction method based on zero-knowledge proof according to claim 2, characterized in that: In S2, feature extraction is performed on the security requirement information and encryption algorithm information to extract the algorithm security index in the algorithm characteristic information, specifically: The method for obtaining the algorithm security index is as follows: obtain the prime order n of the curve, which is the minimum positive integer value of the infinite point O obtained by repeatedly adding the points G on the elliptic curve n times, and obtain the number of points q on the curve, which refers to the number of all points on the elliptic curve E that satisfy the equation, including the base point G; calculate the algorithm security index based on the selected elliptic curve parameters, the calculated prime order n and the number of points q on the curve, and the specific calculation formula is: , where is the algorithm security index.

4. The anonymous transaction method based on zero-knowledge proof according to claim 3, characterized in that: In S3, the sensitivity of encrypted information and the algorithm security index are comprehensively analyzed, specifically: The encryption information sensitivity and algorithm security index are normalized, and the security assessment coefficient of the encryption scheme for protecting transaction information is calculated based on the normalized encryption information sensitivity and algorithm security index.

5. The anonymous transaction method based on zero-knowledge proof according to claim 4, characterized in that: In S4, the transaction information is divided into different encryption levels according to the degree of protection of the transaction information by the encryption scheme, specifically: The obtained safety assessment coefficient is compared with a gradient standard threshold, the gradient standard threshold includes a first standard threshold and a second standard threshold, and the first standard threshold is less than the second standard threshold, and the safety assessment coefficient is compared with the first standard threshold and the second standard threshold respectively; If the security assessment coefficient is greater than the second standard threshold, no warning signal is issued and the simple encryption level is selected; If the security assessment coefficient is greater than the first standard threshold and less than or equal to the second standard threshold, a second-level warning signal is issued and the general encryption level is selected; If the security assessment coefficient is less than or equal to the first standard threshold, a first-level warning signal is issued and a complex encryption level is selected.

6. An anonymous transaction system based on zero-knowledge proof, used to implement an anonymous transaction method based on zero-knowledge proof according to any one of claims 1 to 5, characterized in that: It includes encryption scheme selection module, feature extraction module, encryption scheme evaluation module, encryption level division module and dynamic verification time adjustment module: Encryption scheme selection module: formulates an encryption scheme by selecting an encryption algorithm and determines the key length based on security requirements and algorithm characteristics; Feature extraction module: extracts features from security requirement information and encryption algorithm information, extracts the sensitivity of encryption information in security requirement information and the algorithm security index in algorithm characteristic information; Encryption scheme evaluation module: conducts a comprehensive analysis of the sensitivity of encrypted information and the algorithm security index to evaluate the degree of protection of transaction information by the encryption scheme; Encryption level division module: divides transaction information into different encryption levels according to the degree of protection of transaction information by the encryption scheme, and optimizes the encryption scheme in real time; Dynamic verification time adjustment module: Executes the optimized encryption scheme, conducts a comprehensive analysis of the real-time network load anomaly and transaction volume deviation, and dynamically adjusts the verification time based on the analysis results, thereby improving the stability of the system and reducing computing overhead.