Engineering bidding quotation method based on block chain

By calculating the entropy value and digit length of the random number and optimizing the collision evaluation model based on the network throughput, the problem of unbalanced random number safety and calculation performance in the engineering quotation system is solved, and the collision risk is reduced and system efficiency is improved. Effect.

CN119398888APending Publication Date: 2025-02-07ANHUI ANZHAO ENG TECH CONSULTING SERVICE CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411672469.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-21
Publication Date
2025-02-07

AI Technical Summary

Technical Problem

In the existing engineering quotation system, the safety and calculation performance of random numbers are imbalanced, resulting in an increase in collision risk and reducing the safety and efficiency of the system.

Method used

By obtaining the bit length and entropy value of the random number, enter the collision evaluation model to calculate the collision occurrence probability and optimize and adjust according to the network throughput to ensure that the collision probability is within a reasonable range.

Benefits of technology

It effectively solves the problem of random number security and computational performance imbalance, reduces the probability of collisions, and improves the safety and efficiency of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119398888A_ABST
    Figure CN119398888A_ABST
Patent Text Reader

Abstract

The invention discloses an engineering bidding quotation method based on a block chain. The engineering bidding quotation method based on the block chain comprises the following steps: obtaining a random number which is prepared to be sent together with a bidding quotation, and calculating the bit length of the random number; calculating the entropy value of the random number to obtain the complexity of the random number; inputting the bit length of the random number and the complexity of the random number into a collision evaluation model to obtain a collision occurrence probability; the collision occurrence probability is optimized and adjusted according to the network throughput; presetting a standard collision probability threshold value, and calculating a distribution difference value between the optimized collision occurrence probability and the preset standard collision probability threshold value; and when the distribution difference value is within a standard error allowable range, sending the corresponding random number to the bid invitation node. By improving the security of the system random number, the problem that the security and calculation performance of the random number of the existing engineering quotation system are unbalanced is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of engineering bidding and quotation, and in particular to an engineering bidding and quotation method based on blockchain. Background Art

[0002] Blockchain technology is a new distributed infrastructure and computing method that uses block chain data structures to verify and store data, distributed node consensus algorithms to generate and update data, cryptography to ensure the security of data transmission and access, and smart contracts composed of automated script codes to program and operate data. Specifically, blockchain is a chain that combines data blocks in a sequential manner in chronological order, and is a distributed ledger that is cryptographically guaranteed to be tamper-proof and unforgeable.

[0003] The application of random numbers in blockchain is crucial, especially in ensuring system security, decentralization and fairness. Blockchain networks rely on random number generators to support multiple key links such as consensus algorithms, smart contract execution, encryption operations and address generation. Random numbers are also used to generate private and public key pairs to ensure the security of blockchain transactions. Since blockchain emphasizes decentralization, ideal random number generation should be verifiable and unpredictable to prevent potential malicious manipulation.

[0004] Random numbers are used in the process to ensure the uniqueness of bids and prevent tampering. The existing bidding and quotation system will generate a unique random number when sending a bid, and bind it to the quotation information through hash calculation to ensure that the information cannot be tampered with. However, if the random number is too short or the generation method is too simple, it may lead to collision risks, that is, the probability of different bidders generating the same random number increases, resulting in possible duplication of hash values, reducing the security of the system. On the contrary, if the random number is too long or too complex, it will increase the demand for computing resources and reduce efficiency. Therefore, in practical applications, it is necessary to balance the security and computing performance of random numbers.

[0005] For example, the invention patent announcement number is: CN104239059A based on

[0006] If the random number is too low, it may lead to collision risk, that is, the probability of different bidders generating the same random number increases, resulting in possible duplication of hash values, reducing the security of the system.

[0007] If the random number is too high, it will increase the demand for computing resources and reduce efficiency. Therefore, in practical applications, it is necessary to balance the security and computing performance of random numbers. Summary of the invention

[0008] In order to overcome the above-mentioned defects of the prior art, an embodiment of the present invention provides a blockchain-based engineering bidding and quotation method, which solves the problem of imbalance between the security and computing performance of random numbers in the existing engineering quotation system by improving the security of the system's random numbers.

[0009] To achieve the above object, the present invention provides the following technical solutions:

[0010] A method for bidding and quoting for an engineering project based on blockchain comprises the following steps: obtaining a random number to be sent together with the bidding quotation, and calculating the number of digits of the random number; calculating the entropy value of the random number based on the Shannon entropy formula to obtain the random number complexity; inputting the number of digits of the random number and the random number complexity into a collision assessment model to obtain the probability of collision; optimizing and adjusting the collision probability according to the network throughput, and calculating the distribution difference value between the optimized collision probability and a preset standard collision probability threshold; when the distribution difference value is within the allowable range of the standard error, sending the corresponding random number to the bidding node.

[0011] In a preferred embodiment, the entropy value of the random number is calculated based on the Shannon entropy formula, and the calculation method includes: counting the number of occurrences of each binary value and calculating the probability value of each possible binary value in the random number sequence; substituting the probability value into the Shannon entropy formula to calculate the overall entropy value.

[0012] In a preferred embodiment, the probability of collision is obtained by: determining the size of the random number space based on the number of bits of the random number; using the hash value length generated by the hash algorithm, and determining the size of the hash value space based on the hash value length; calculating the probability of collision based on the matching of the number of bits of the random number length and the hash value space.

[0013] In a preferred embodiment, the dynamically adjusted entropy value generation strategy includes a network throughput monitoring module, an entropy value dynamic adjustment module, and a collision detection and optimization module, specifically: a network throughput monitoring module, which is used to obtain network throughput data in real time and calculate the throughput value based on the number of bytes and time interval; an entropy value dynamic adjustment module, which is used to set the throughput classification interval according to a predetermined interval definition rule, and map the calculated throughput value to the throughput classification interval; a collision detection and optimization module: uses a polling method to monitor whether the generated random numbers collide, captures throughput fluctuations in time, and classifies the captured throughput.

[0014] In a preferred embodiment, the throughput classification interval is set according to a predetermined interval definition rule, and the throughput classification interval is as follows: if the throughput is less than one thousand bits per second, it is classified as low bandwidth; if the throughput is greater than one thousand bits per second and less than one megabit per second, it is classified as medium bandwidth; if the throughput is greater than one megabit per second and less than ten megabits per second, it is classified as high bandwidth; if the throughput is greater than ten megabits per second, it is classified as ultra-high bandwidth.

[0015] In a preferred embodiment, the collision probability is optimized and adjusted according to the network throughput, specifically: when the throughput is in the high bandwidth or ultra-high bandwidth classification interval, the corresponding entropy value is reduced; when the throughput is in the low bandwidth or medium bandwidth classification interval, a higher entropy value is used; the collision probability of the optimized entropy value is recalculated to obtain the optimized collision probability.

[0016] One or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages:

[0017] 1. Through the blockchain-based engineering bidding and quotation method, the security and computing performance of random numbers are guaranteed, which effectively solves the problem of imbalance in the security and computing performance of random numbers in the engineering quotation system in the existing technology.

[0018] 2. By using the Shannon entropy formula to calculate the entropy value of random numbers, the complexity of random numbers is quantified, thereby reducing the probability of collision.

[0019] 3. By dynamically adjusting the entropy value generation strategy, the complexity of random number generation is enhanced, thereby avoiding the impact of network bottlenecks on the bidding process.

[0020] 4. By calculating the distribution difference between the optimized collision probability and the preset standard collision probability threshold, the collision probability is ensured to always remain within a reasonable range, thereby increasing the system's fault tolerance and reducing uncertainty and potential safety hazards. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 A flowchart of a blockchain-based project bidding and quotation method provided in an embodiment of the present application; DETAILED DESCRIPTION

[0022] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only 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.

[0023] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "include..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0024] Embodiment 1, Figure 1 The present invention provides a method for bidding and quoting for an engineering project based on blockchain, comprising the following steps:

[0025] S1 obtains a random number to be sent together with the bid price, and calculates the length of the random number;

[0026] S2 calculates the entropy value of the random number based on the Shannon entropy formula to obtain the random number complexity;

[0027] S3 inputs the length of the random number and the complexity of the random number into the collision assessment model to obtain the probability of collision occurrence;

[0028] S4 optimizes and adjusts the collision probability according to the network throughput, and calculates the distribution difference value between the optimized collision probability and a preset standard collision probability threshold;

[0029] S5: When the distribution difference value is within the allowable range of the standard error, the corresponding random number is sent to the bidding node.

[0030] The bit length of a random number is the number of binary bits it contains, which is the number of "1" and "0" in the binary representation of the calculated random number.

[0031] The length of the random number is too short. The security of the hash function depends on the randomness and complexity of its input. If you use a shorter random number (for example, only 16 or 32 bits), the number of all possible random numbers generated is very limited. For a random number with a length of n bits, the number of unique values ​​it can represent is 2^n. If the number of bits of the random number is small, the total number of unique random numbers that can be generated may be very small, which increases the probability of collision.

[0032] The entropy value of the random number is calculated based on the Shannon entropy formula, and the calculation method includes:

[0033] Count the number of occurrences of each binary value and calculate the probability value of each possible binary value in the random number sequence;

[0034] Substitute the probability value into the Shannon entropy formula to calculate the overall entropy value.

[0035] The entropy value of the random number is calculated based on the Shannon entropy formula, and the calculation formula is as follows:

[0036]

[0037] Where: H is the Shannon entropy formula; is a random variable taking the value The probability of is a binary number, which is 0 or 1; n is the length of the random number; for The total number of occurrences.

[0038] It should be noted that the base of the logarithm is 2, and the unit of information is bit.

[0039] It should be noted that if the entropy value is equal to 1, it means that the random number sequence is completely unbiased. In the binary case, the probability of 0 and 1 is 0.5, which means that the sequence has maximum randomness and complexity. If the entropy value is equal to 0, it means that the random number sequence is completely deterministic, for example, the sequence is all 0 or all 1, without any randomness.

[0040] The entropy value itself is used to measure randomness or uncertainty, while complexity refers to the unpredictability of a sequence. In information theory, the higher the entropy value, the higher the complexity, which means that the algorithm or process that generates the sequence is more difficult to predict or replicate. If you calculate the entropy value of a random number sequence to be 1, then the sequence is completely unpredictable and has the highest complexity.

[0041] In computer science, a "collision" occurs when two different input data (in this case, a random number and a quote) are processed by the same hash algorithm and produce the same hash value. The function of a hash function is to map an input of arbitrary length to an output of fixed length, usually a short, fixed-length string of numbers (for example, the hash value output by the SHA-256 algorithm is 256 bits). Ideally, different input data should generate different hash values, but since the output space is finite and the input space is infinite, there is always the possibility that different inputs will map to the same output, i.e., a collision will occur.

[0042] The goal of the collision assessment model is to determine the collision probability of a given random number. A collision is the result of different random numbers producing the same hash value. When multiple bidders submit bids, if they use similar algorithms to generate random numbers or the same random number seeds in the algorithms, they may generate the same random numbers and thus the same hash values. This situation will cause the system to be unable to distinguish between bids from different bidders, which is called a collision. If multiple bidders use the same or similar random numbers, then the bids will produce the same hash value, which may cause the bid information to be tampered with or mistaken for the same, thereby reducing the security and fairness of the system.

[0043] The collision probability is obtained by:

[0044] Determine the size of the random number space based on the length of the number of bits of the random number;

[0045] The length of the hash value generated by the hash algorithm is used, and the size of the hash value space is determined according to the length of the hash value; the probability of collision is calculated according to the length of the random number and the matching of the hash value space.

[0046] The collision probability is calculated as follows:

[0047]

[0048] Where: is the calculation formula for the probability of collision, z is the size of the hash value space, H is the entropy value of the random number, and n is the number of bits of the random number.

[0049] It should be noted that the collision probability is usually related to the number of bits of the random number. The addition of entropy value correlation in this application can increase the effective number of bits of the random number, thereby reducing the probability of collision. The more bits and the higher the entropy value, the lower the probability of collision.

[0050] If a collision occurs, it may lead to the following risk consequences:

[0051] Security loss: If two different bids generate the same hash value, attackers can use this to tamper with the bid. For example, they can disguise their bid as another bidder's bid and commit fraud.

[0052] Information tampering risk: The uniqueness of hash values ​​is the basis of information security. If hash values ​​collide, it may mean that the integrity of the data cannot be guaranteed, and malicious users have the opportunity to modify the quotation information without being detected by the system.

[0053] Legal and fairness issues: During the bidding process, multiple bidders using the same hash value may cause the bidding results to be questioned, affect the fairness of the entire bidding process, and may even lead to legal disputes.

[0054] Network throughput refers to the amount of data that the network can successfully transmit per unit time, usually measured in bits per second (bps). Changes in throughput directly reflect the network load and resource availability. In networks with high throughput, more emphasis may be placed on improving the efficiency of random number generation, while in networks with low throughput, the security of random number generation needs to be enhanced.

[0055] The dynamic adjustment entropy value generation strategy includes a network throughput monitoring module, an entropy value dynamic adjustment module, and a collision detection and optimization module, specifically:

[0056] The network throughput monitoring module is used to obtain network throughput data in real time and calculate the throughput value based on the number of bytes and time interval;

[0057] An entropy value dynamic adjustment module, used to set a throughput classification interval according to a predetermined interval definition rule, and map the calculated throughput value to the throughput classification interval;

[0058] Collision detection and optimization module: uses polling to monitor whether the generated random numbers collide, captures throughput fluctuations in a timely manner, and classifies the captured throughput.

[0059] The throughput value is calculated based on the number of bytes and time interval, and the calculation formula is as follows:

[0060]

[0061] Where: t is the throughput, is the time interval for throughput acquisition, r is the amount of data received in the time interval, and g is the amount of data sent in the time interval.

[0062] The throughput classification interval is set according to the predetermined interval definition rule, and the throughput classification interval is as follows:

[0063] If the throughput is less than one kilobit per second, it is classified as low bandwidth;

[0064] If the throughput is greater than one thousand bits per second and less than one megabit per second, it is classified as medium bandwidth;

[0065] If the throughput is greater than one megabit per second and less than ten megabits per second, it is classified as high bandwidth;

[0066] If the throughput is greater than ten megabits per second, it is classified as ultra-high bandwidth.

[0067] The optimization and adjustment of the collision probability according to the network throughput is specifically as follows:

[0068] When the throughput is in the high bandwidth or ultra-high bandwidth classification interval, the corresponding entropy value is reduced;

[0069] When the throughput is in the low-bandwidth or medium-bandwidth classification interval, a higher entropy value is used;

[0070] The collision probability of the optimized entropy value is recalculated to obtain the optimized collision probability.

[0071] The calculation formula for the distribution difference between the calculated optimized collision probability and the preset standard collision probability threshold is:

[0072]

[0073] Where: Y is the distribution difference value, k is the ratio of the optimized collision probability to the unoptimized collision probability, is the optimized collision probability, is the non-optimized collision probability.

[0074] The risk of collision is closely related to the design of the hash function, the range of input data, the length of the random number, the generation method, etc. If the length of the random number used is short or the generation method is too simple, the probability of collision may increase, specifically including the following:

[0075] Characteristics of hash functions: A hash function is essentially a mapping that compresses data into a fixed length, and the output space is limited. For example, SHA-256 produces a 256-bit hash value, which means there can only be 2^256 different hash values. The input space is theoretically infinite (for example, any combination of quotes and random numbers). Therefore, as the number of inputs increases, the probability of hash collisions will also increase, especially when the amount of input data is large enough.

[0076] The above formulas are all dimensionless and numerical calculations. The formula is a formula for the most recent real situation obtained by collecting a large amount of data and performing software simulation. The preset parameters in the formula are set by technicians in this field according to actual conditions.

[0077] The above embodiments may be implemented in whole or in part by software, hardware, firmware or any other combination. When implemented by software, the above embodiments may be implemented in whole or in part in the form of a computer program product.

[0078] Those of ordinary skill in the art will appreciate that the modules 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.

[0079] In addition, each functional module in each embodiment of the present application may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module.

[0080] 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.

[0081] Finally: The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. The project bidding and quotation method based on blockchain is characterized by: The following steps are involved: Obtain a random number to be sent together with the bid price, and calculate the length of the random number; The entropy value of the random number is calculated based on the Shannon entropy formula as the complexity of the random number; Input the length of the random number and the complexity of the random number into the collision assessment model to obtain the probability of collision occurrence; Optimizing and adjusting the collision probability according to the network throughput, and calculating the distribution difference value between the optimized collision probability and a preset standard collision probability threshold; When the distribution difference value is within the allowable range of standard error, the corresponding random number is sent to the bidding node.

2. The method for bidding and quoting for an engineering project based on blockchain as claimed in claim 1, characterized in that: The entropy value of the random number is calculated based on the Shannon entropy formula, and the calculation method includes: counting the number of occurrences of each binary value, and calculating the probability value of each binary value that may appear in the random number sequence; Substitute the probability value into the Shannon entropy formula to calculate the overall entropy value.

3. The method for bidding and quoting for an engineering project based on blockchain as claimed in claim 2, characterized in that: The collision probability is obtained by: Determine the size of the random number space based on the length of the number of bits of the random number; The length of the hash value generated by the hash algorithm is used, and the size of the hash value space is determined according to the length of the hash value; The probability of collision is calculated based on the length of the random number and the matching of the hash value space.

4. The method for bidding and quoting for an engineering project based on blockchain as claimed in claim 3, characterized in that: The optimization and adjustment of the collision probability according to the network throughput is specifically as follows: Obtain network throughput data in real time and calculate throughput values ​​based on the number of bytes and time intervals; Setting a throughput classification interval according to a predetermined interval definition rule, and mapping the calculated throughput value to the throughput classification interval; A polling method is used to monitor whether the generated random numbers collide, capture throughput fluctuations in a timely manner, and classify the captured throughput.

5. The method for bidding and quoting for an engineering project based on blockchain as claimed in claim 4, characterized in that: The throughput classification interval is set according to the predetermined interval definition rule, and the throughput classification interval is as follows: If the throughput is less than one kilobit per second, it is classified as low bandwidth; If the throughput is greater than one thousand bits per second and less than one megabit per second, it is classified as medium bandwidth; If the throughput is greater than one megabit per second and less than ten megabits per second, it is classified as high bandwidth; If the throughput is greater than ten megabits per second, it is classified as ultra-high bandwidth.

6. The method for bidding and quoting for an engineering project based on blockchain as claimed in claim 5, characterized in that: The optimization and adjustment of the collision probability according to the network throughput is specifically as follows: When the throughput is in the high bandwidth or ultra-high bandwidth classification interval, the corresponding entropy value is reduced; When the throughput is in the low-bandwidth or medium-bandwidth classification interval, a higher entropy value is used; The collision probability of the optimized entropy value is recalculated to obtain the optimized collision probability.

7. The method for bidding and quoting for an engineering project based on blockchain as claimed in claim 6, characterized in that: The calculation formula for the distribution difference between the calculated optimized collision probability and the preset standard collision probability threshold is: , Where: Y is the distribution difference value, k is the ratio of the optimized collision probability to the unoptimized collision probability, is the optimized collision probability, is the non-optimized collision probability.

8. The method for bidding and quoting for an engineering project based on blockchain as claimed in claim 7, characterized in that: The entropy value of the random number is calculated based on the Shannon entropy formula, and the calculation formula is as follows: , Where: H is the Shannon entropy formula; is a random variable taking the value The probability of is a binary number, which is 0 or 1; n is the length of the random number; for The total number of occurrences.

9. The method for bidding and quoting for an engineering project based on blockchain as claimed in claim 8, characterized in that: The collision probability is calculated as follows: , Where: is the calculation formula for the probability of collision, z is the size of the hash value space, H is the entropy value of the random number, and n is the number of bits of the random number.

10. The method for bidding and quoting for an engineering project based on blockchain as claimed in claim 9, characterized in that: The throughput value is calculated based on the number of bytes and time interval, and the calculation formula is as follows: , Where: t is the throughput, is the time interval for throughput acquisition, r is the amount of data received in the time interval, and g is the amount of data sent in the time interval.

Citation Information

Patent Citations

  • Construction method for intelligent power distribution and utilization unified information supporting platform based on full model

    CN104239059A