An information encryption method, system and medium for transaction cloud platform
By analyzing the characteristics and information of the coding position between the bidding information blocks, the adaptive determination of the encryption wheel is determined, and the problem of the traditional AES encryption algorithm cannot effectively hide the data mode when the bidding file is encrypted. Safety.
Patent Information
- Application Number
- CN202411581617.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-07
- Publication Date
- 2025-01-24
- Estimated Expiration
- 2044-11-07
AI Technical Summary
When encrypting bid files, the traditional AES encryption algorithm uses a fixed encryption round to cause the same plaintext block to be encrypted into the same ciphertext block, which cannot effectively hide the data mode, which increases the risk of bid files being leaked.
By analyzing the number and position distribution characteristics of coding bits between different bid information blocks, the encryption round difference between each pair of bid information blocks is calculated, and combined with the information importance of each bid information block, adaptively determines each bid The encryption round of the information block is encrypted using the AES encryption algorithm.
The encryption level of the bidding documents has been improved, the encryption effect is enhanced, and the risk of leaking the bidding documents is reduced. Through the adaptive encryption rotation settings, the differences between different bidding information blocks are adapted to the differential information blocks, which improves the differences and security of encryption. Essence
Smart Images

Figure CN119067666B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data encryption technology, and in particular to an information encryption method, system and medium for a transaction cloud platform. Background Art
[0002] Electronic bidding and tendering completes all processes through an online platform, reducing the time and manpower for printing, distributing and organizing documents. Bidders do not need to go to a specific location to submit materials, reducing logistics costs and the risk of document loss. By encrypting the bid documents of each bidder through the electronic bidding and tendering transaction cloud platform, it can prevent the bid documents from being tampered with or leaked before the bid opening, ensuring that all bidders compete under the same conditions, thereby maintaining the fairness of the bidding and tendering.
[0003] Traditional bidding and tendering transaction cloud platforms often use the AES encryption algorithm to encrypt bidding documents. Because the AES encryption algorithm has a length limit on the operation object, the algorithm first divides the bidding documents into multiple 128-bit blocks before encryption, and then encrypts each block separately with the same key, and the encryption rounds of each block are preset fixed values. Since the traditional AES algorithm uses a fixed encryption round for each bidding document block, the same plaintext block is encrypted into the same ciphertext block, which cannot hide the data pattern well, resulting in the risk of bidding documents being leaked. Summary of the invention
[0004] In order to solve the problem that the bidding documents still have the risk of being leaked after being encrypted by the existing AES encryption algorithm, the purpose of the present invention is to provide an information encryption method, system and medium for a transaction cloud platform. The technical scheme adopted is as follows:
[0005] In a first aspect, the present invention provides an information encryption method for a transaction cloud platform, the method comprising the following steps:
[0006] Obtain the bidding document to be encrypted, encode and divide the bidding document to be encrypted into blocks to obtain each bidding information block;
[0007] The difference degree of encryption rounds between each two bidding information blocks is obtained by combining the number distribution characteristics of the same coding bits and the position distribution characteristics of the same coding bits between each two bidding information blocks; the information importance of each bidding information block is obtained by combining the frequency of each coding bit in each bidding information block in the coded text after the plain text encoding of the encrypted bidding document and the proportion of the number of digital coding bits;
[0008] Determine the encryption degree of each bidding information block based on the information importance of each bidding information block and the difference in encryption rounds between each bidding information block and other bidding information blocks; determine the encryption round of each bidding information block based on the encryption degree of each bidding information block and the quantity distribution of the bidding information blocks;
[0009] The encryption round is used to perform encryption processing using the AES encryption algorithm.
[0010] Preferably, the step of combining the number distribution characteristics of the same coding bits and the position distribution characteristics of the same coding bits between every two bidding information blocks to obtain the degree of difference in encryption rounds between every two bidding information blocks includes:
[0011] For any two bidding information blocks:
[0012] The ratio between the number of identical coding bits between any two bidding information blocks and the maximum number of identical coding bits between every two bidding information blocks in the bidding document to be encrypted is recorded as the first ratio between the any two bidding information blocks;
[0013] Obtain the characteristic center bits corresponding to the arbitrary two bidding information blocks; the characteristic center bits are the coding bits corresponding to the result of rounding up the mean of the coordinates of all identical coding bits; determine the pointing vector of each identical coding bit in the bidding information block, the direction of the pointing vector is the direction from each identical coding bit to the characteristic center bit, and the size of the pointing vector is the relative distance between each identical coding bit and the characteristic center bit;
[0014] Superimposing the directional vectors of all identical coding bits in each bidding information block to obtain the directional superposition vector corresponding to each bidding information block;
[0015] The difference between the pointing superposition vectors corresponding to the arbitrary two bidding information blocks and the first proportion are comprehensively considered to obtain the degree of difference in encryption rounds between the arbitrary two bidding information blocks.
[0016] Preferably, the step of comprehensively analyzing the difference between the pointing superposition vectors corresponding to the two bidding information blocks and the first proportion to obtain the degree of difference in encryption rounds between the two bidding information blocks includes:
[0017] Calculate the amplitude difference and angle between the pointing superposition vectors corresponding to any two bidding information blocks respectively;
[0018] According to the normalized result of the amplitude difference, the normalized result of the angle and the first proportion, the degree of difference in encryption rounds between any two bidding information blocks is obtained, the normalized result of the amplitude difference and the normalized result of the angle are negatively correlated with the degree of difference in encryption rounds, and the first proportion is positively correlated with the degree of difference in encryption rounds.
[0019] Preferably, the information importance of each bidding information block is obtained by combining the frequency of occurrence of each coding bit in each bidding information block in the coded text after the plain text encoding of the encrypted bidding document and the proportion of the number of digital coding bits, including:
[0020] The information importance of the candidate information block is obtained according to the information high frequency degree of the candidate information block and the number ratio of the digital form coding bits of the candidate information block, wherein the information high frequency degree and the number ratio of the digital form coding bits are both positively correlated with the information importance;
[0021] The information high frequency is the normalized result of the average frequency of all the coding bits in the candidate information block appearing in the coded text after the encrypted bidding document is plaintext-encoded; the number ratio of the digital form coding bits of the candidate information block is the ratio between the number of digital form coding bits of the candidate information block and the total number of all coding bits of the candidate information block;
[0022] The candidate information block is any bidding information block.
[0023] Preferably, the step of determining the degree of encryption of each bidding information block based on the information importance of each bidding information block and the degree of difference in encryption rounds between each bidding information block and other bidding information blocks includes:
[0024] If the information importance of other bidding information blocks except the candidate information block is greater than the information importance of the candidate information block, the sum of the characteristic value of the candidate information block and the encryption round difference degree of the corresponding other bidding information blocks is used as the characteristic value of the corresponding other bidding information blocks; if the information importance of other bidding information blocks except the candidate information block is less than or equal to the information importance of the candidate information block, the difference between the characteristic value of the candidate information block and the encryption round difference degree of the corresponding other bidding information blocks is used as the characteristic value of the corresponding other bidding information blocks; the characteristic value of the candidate information block is a preset value;
[0025] Mapping the characteristic values of all bidding information blocks into an empty array to obtain an array corresponding to the candidate information block, wherein the number of elements in the empty array is equal to the number of bidding information blocks in the bidding document to be encrypted;
[0026] The degree to be encrypted of the candidate information block is determined based on the array corresponding to the candidate information block.
[0027] Preferably, obtaining the degree of encryption of the bidding information block includes:
[0028] Obtain a normalized result of the sum of all data at the same position in the array corresponding to all bidding information blocks of the bidding document to be encrypted, and record it as superposition data at the corresponding position;
[0029] The superimposed data at all positions constitute a superimposed data sequence, and the elements at each position in the superimposed data sequence are determined as the degree to be encrypted of the corresponding bidding information block.
[0030] Preferably, the step of comprehensively determining the encryption round of each bidding information block based on the degree of encryption to be performed for each bidding information block and the quantity distribution of the bidding information blocks comprises:
[0031] Calculating a first ratio between the number of bid information blocks of the bid document to be encrypted and the average number of bid information blocks of all encrypted bid documents;
[0032] The encryption round of the candidate information block is determined by rounding up the product of the average value of the total encryption rounds of all encrypted bidding documents, the degree of encryption of the candidate information block and the first ratio.
[0033] Preferably, the step of encoding and dividing the encrypted bidding document into blocks to obtain each bidding information block includes:
[0034] Perform BASE64 encoding on non-digital information in the encrypted bidding document to obtain an encoded file;
[0035] The encoded file is processed into plain text blocks through the ECB working mode to obtain each bidding information block.
[0036] In a second aspect, the present invention provides an information encryption system for a transaction cloud platform, the system comprising:
[0037] An information acquisition module is used to acquire the bidding document to be encrypted, encode the bidding document to be encrypted and process it into blocks to obtain each bidding information block;
[0038] A calculation module is used to obtain the degree of difference in encryption rounds between each two bidding information blocks by combining the number distribution characteristics of the same coding bits and the position distribution characteristics of the same coding bits between each two bidding information blocks; and obtain the information importance of each bidding information block by combining the frequency of each coding bit in each bidding information block in the coded text after the plain text encoding of the encrypted bidding document and the proportion of the number of digital coding bits;
[0039] The encryption round determination module is used to determine the encryption degree of each bidding information block based on the information importance of each bidding information block and the difference in encryption rounds between each bidding information block and other bidding information blocks; and determine the encryption round of each bidding information block based on the encryption degree of each bidding information block and the quantity distribution of the bidding information blocks;
[0040] The encryption module is used to perform encryption processing using the AES encryption algorithm using the encryption round.
[0041] In a third aspect, the present invention provides an information encryption medium for a transaction cloud platform, wherein the medium stores at least one program executable by a computer, and when the at least one program is executed by a computer, the computer executes the steps in the above-mentioned information encryption method for a transaction cloud platform.
[0042] The present invention has at least the following beneficial effects:
[0043] The present invention first encodes and blocks the bidding document to be encrypted, and obtains a plurality of bidding information blocks. Considering that the conventional AES algorithm uses a fixed encryption round to process the bidding information blocks when encrypting each bidding information block, resulting in the same plaintext block being encrypted into the same ciphertext block, and failing to achieve a good effect of hiding data, the present invention analyzes the number distribution characteristics of the same coding bits and the position distribution characteristics of the same coding bits between different bidding information blocks, obtains the degree of difference in encryption rounds between different bidding information blocks, and calculates the number of different bidding information blocks according to the frequency of each coding bit in each bidding information block in the coded text after the plaintext encoding of the encrypted bidding document and the proportion of the number of digital coding bits. The information importance of each bidding information block is evaluated, and then the degree of encryption of each bidding information block is obtained in combination with the information importance of each bidding information block and the difference in encryption rounds with other bidding information blocks, so as to adaptively determine the encryption rounds of each bidding information block. Compared with the traditional AES algorithm in which each bidding information block uses a fixed encryption round, the method provided by the present invention can adaptively determine the encryption round of each bidding information block in combination with the difference between different bidding information blocks, so that the difference in encryption rounds between bidding information blocks with a greater degree of repetition during encryption is greater, thereby improving the encryption level of the bidding document and ensuring the encryption effect of the bidding document. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0045] Figure 1 A flowchart of an information encryption method for a transaction cloud platform provided by an embodiment of the present invention;
[0046] Figure 2 A structural block diagram of an information encryption system for a transaction cloud platform provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0047] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined purpose of the invention, the following is a detailed description of an information encryption method, system and medium for a transaction cloud platform proposed in accordance with the present invention in combination with the accompanying drawings and preferred embodiments.
[0048] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
[0049] The following is a detailed description of a specific scheme of an information encryption method, system and medium for a transaction cloud platform provided by the present invention in conjunction with the accompanying drawings.
[0050] An information encryption method embodiment for a transaction cloud platform:
[0051] The specific scenario targeted by this embodiment is: electronic bidding is usually conducted on a bidding transaction cloud platform. The bidding party releases the bidding announcement and bidding documents on the transaction cloud platform. Each bidder prepares and encrypts the submitted bidding documents during the bidding period. Each encrypted bidding document is protected by an encryption algorithm before the bid opening to prevent unauthorized personnel from accessing it. Then, the bidder decrypts their own encrypted bidding documents online at the online bidding site, ensuring the privacy of the bidding documents before the bid opening and the fairness of the bidding. The bidding transaction platform often uses the AES encryption algorithm to encrypt each bidding document. In the traditional AES encryption algorithm, the bidding document is divided into bidding information blocks, and then each bidding information block is encrypted using the same and fixed encryption rounds. The key used by the bidder in the encryption process is the bidder's CA digital certificate, and the digital certificate is kept by the bidder throughout the process. However, when the existing AES encryption algorithm is used to encrypt the bidding document, each bidding information block uses the same and fixed encryption rounds, resulting in the same bidding information block being encrypted into the same ciphertext, thereby failing to achieve a good data hiding effect, and causing the encrypted bidding document to be easily cracked. This embodiment adaptively determines the encryption rounds of each bidding information block based on the differences between different information blocks in the bidding document, thereby ensuring the encryption effect of the bidding document.
[0052] This embodiment proposes an information encryption method for a transaction cloud platform, such as Figure 1 As shown, an information encryption method for a transaction cloud platform in this embodiment includes the following steps:
[0053] Step S1, obtaining the bidding document to be encrypted, encoding and dividing the bidding document to be encrypted into blocks to obtain various bidding information blocks.
[0054] First, the bidder writes the original bidding document according to the bidding announcement and bidding documents. The transaction cloud platform receives the original bidding document in real time and submits it to the encryption pre-processing module. The encryption pre-processing module encodes the non-digital information in the bidding document with BASE64, and the digital information remains unchanged; the encoded bidding document is processed in plain text blocks through the ECB working mode to obtain each bidding information block; the size of each bidding information block is 128 bits to meet the AES encryption algorithm operation requirements, and the PKCS7 padding algorithm is used to fill the blocks that do not meet the size requirements; each bidding information block that meets the encryption size requirements is uploaded to the encryption center.
[0055] So far, this embodiment has obtained the bidding document to be encrypted, and completed the encoding and block processing thereof, thereby obtaining a plurality of bidding information blocks.
[0056] Step S2, combining the number distribution characteristics of the same coding bits between every two bidding information blocks and the position distribution characteristics of the same coding bits, obtain the degree of difference in encryption rounds between every two bidding information blocks; combining the frequency of each coding bit in each bidding information block in the encoded text after the plain text encoding of the encrypted bidding document and the proportion of the number of coding bits in digital form, obtain the information importance of each bidding information block.
[0057] This embodiment will obtain the degree of difference in encryption rounds between bid information blocks based on the proportion and arrangement characteristics of the same codes between any two bid information blocks in the bid information block to be encrypted, and then obtain the degree of encryption of each bid information block in combination with the importance of the information in the bid information block, and then obtain the total encryption rounds of the bid document based on the characteristics of the amount of information covered by the bid document, and adapt the encryption rounds of each bid information block to its degree of encryption in the bid document.
[0058] Considering that in order to ensure the encryption effect of the data, a larger difference in encryption rounds should be set between the bidding information blocks with higher information repetition characteristics, it is necessary to first analyze the information repetition characteristics between the bidding information blocks. The higher the proportion of the same coding bits between different bidding information blocks, the more similar the distribution characteristics of the same coding bits between their respective bidding information blocks, and the more significant the information repetition characteristics between the bidding information blocks, the greater the degree of difference in encryption rounds between the bidding information blocks.
[0059] Based on the above characteristics, this embodiment will evaluate the degree of difference in encryption rounds between bid information blocks by combining the number distribution characteristics of the same coding bits and the position distribution characteristics of the same coding bits between every two bid information blocks of the bid document to be encrypted. This embodiment takes any two bid information blocks of the bid document to be encrypted as an example for explanation, and the method provided by this embodiment can be used to process other bid information blocks.
[0060] Specifically, for any two bidding information blocks of the bidding document to be encrypted: the coding bits with the same coding value in the two bidding information blocks are recorded as the same coding bits, and the ratio between the number of the same coding bits between the any two bidding information blocks and the maximum number of the same coding bits between all two bidding information blocks in the bidding document to be encrypted is recorded as the first ratio between the any two bidding information blocks; the characteristic center bits corresponding to the any two bidding information blocks are obtained; the characteristic center bits are the coding bits corresponding to the result of rounding up the mean of the coordinates of all the same coding bits; the pointing vector of each same coding bit in the bidding information block is determined, the direction of the pointing vector is the direction from each same coding bit to the characteristic center bit, and the size of the pointing vector is the relative distance between each same coding bit and the characteristic center bit. In this embodiment, the relative distance between each same coding bit and the characteristic center bit is obtained by: obtaining the coordinate information of each coding bit, and taking the Euclidean distance of the coordinates of the two coding bits as the relative distance between the two. The pointing vectors of all the same coding bits in each bidding information block are superimposed to obtain the pointing superposition vector corresponding to each bidding information block.
[0061] The amplitude difference and the angle between the pointing superposition vectors corresponding to any two bidding information blocks are calculated respectively; the degree of encryption round difference between the any two bidding information blocks is obtained according to the normalized result of the amplitude difference, the normalized result of the angle and the first proportion, the normalized result of the amplitude difference and the normalized result of the angle are negatively correlated with the degree of encryption round difference, and the first proportion is positively correlated with the degree of encryption round difference.
[0062] Among them, the positive correlation relationship means that the dependent variable will increase as the independent variable increases, and the dependent variable will decrease as the independent variable decreases. It can be an additive relationship, a multiplicative relationship, etc., which is determined by actual application; the negative correlation relationship means that the dependent variable will decrease as the independent variable increases, and the dependent variable will increase as the independent variable decreases. It can be a subtractive relationship, a division relationship, etc.
[0063] There are many methods for normalizing data. In this embodiment, the normalization methods for amplitude difference and angle both adopt the maximum and minimum value normalization method. As other implementation methods, other normalization methods may also be used for normalization processing.
[0064] In this embodiment, a specific calculation formula for the encryption round difference degree is given. The encryption round difference degree between the i-th bidding information block and the j-th bidding information block can be expressed as:
[0065]
[0066] in, represents the difference in encryption rounds between the i-th bidding information block and the j-th bidding information block, represents the first ratio between the i-th bidding information block and the j-th bidding information block, represents the amplitude difference between the directional superposition vector corresponding to the bid of the i-th bid information block and the directional superposition vector corresponding to the j-th bid information block, represents the angle between the directional superposition vector corresponding to the bid of the i-th bid information block and the directional superposition vector corresponding to the j-th bid information block, It indicates the preset first adjustment parameter, and norm() indicates the normalization function.
[0067] In this embodiment, the preset first adjustment parameter is introduced into the calculation formula of the degree of encryption round difference in order to prevent the denominator from being 0. In this embodiment, the preset first adjustment parameter is 0.01. In specific applications, the implementer can set it according to the specific situation.
[0068] The greater the difference in amplitude between the directional superposition vector corresponding to the bid of the i-th bid information block and the directional superposition vector corresponding to the j-th bid information block, and the greater the angle between the directional superposition vectors, the greater the difference in the distribution characteristics of the same coded bits in the two bid information blocks. The greater the first proportion between the i-th bid information block and the j-th bid information block, and the greater the degree of distribution difference of the same coded bits. The smaller it is, the more significant the information repetition feature between the i-th bidding information block and the j-th bidding information block is. At this time, the greater the difference in encryption rounds between the two bidding information blocks should be, that is, the greater the difference in encryption rounds between the i-th bidding information block and the j-th bidding information block.
[0069] By adopting the above method, the degree of difference in encryption rounds between every two bidding information blocks of the bidding document to be encrypted can be obtained.
[0070] Next, a bidding information block of the bidding document to be encrypted will be taken as an example for description. The method provided in this embodiment can be used to process other bidding information blocks of the bidding document to be encrypted.
[0071] Specifically, any bidding information block of the bidding document to be encrypted is recorded as a candidate information block, and the information importance of the candidate information block is obtained according to the information high frequency degree of the candidate information block and the proportion of the number of digitally coded bits of the candidate information block, and the information high frequency degree and the proportion of the number of digitally coded bits are both positively correlated with the information importance degree; the information high frequency degree is the normalized result of the average frequency of all coded bits in the candidate information block appearing in the coded text after the plain text encoding of the encrypted bidding document; the proportion of the number of digitally coded bits of the candidate information block is the ratio between the number of digitally coded bits of the candidate information block and the total number of all coded bits of the candidate information block.
[0072] Among them, the positive correlation means that the dependent variable will increase as the independent variable increases, and the dependent variable will decrease as the independent variable decreases. It can be an additive relationship, a multiplicative relationship, etc., which is determined by practical applications.
[0073] In this embodiment, a specific calculation formula for information importance is given, and the information importance of the i-th bidding information block can be expressed as:
[0074]
[0075] in, represents the information importance of the i-th bidding information block, represents the high frequency of the information in the i-th bidding information block, Indicates the maximum value of the information high frequency of all bidding information blocks in the bidding document to be encrypted, Indicates the minimum value of the information high frequency of all bidding information blocks in the bidding document to be encrypted, Represents the percentage of digitally encoded bits in the i-th bidding information block.
[0076] The normalized result of the information high frequency of the i-th bidding information block is represented. The larger the normalized result of the information high frequency of the i-th bidding information block is and the larger the proportion of the number of digital encoding bits is, the greater the information importance of the bidding information block is.
[0077] So far, the method provided by this embodiment is used to obtain the difference degree of encryption rounds between every two bidding information blocks and the information importance degree of each bidding information block.
[0078] Step S3, based on the information importance of each bidding information block and the difference in encryption rounds between each bidding information block and other bidding information blocks, determine the degree of encryption of each bidding information block; comprehensively consider the degree of encryption of each bidding information block and the number distribution of bidding information blocks to determine the encryption round of each bidding information block.
[0079] Next, this embodiment is still described by taking the candidate information block as an example, and other bidding information blocks can be processed by the method provided in this embodiment.
[0080] For a candidate information block, if the information importance of other bidding information blocks except the candidate information block is greater than the information importance of the candidate information block, the sum of the characteristic value of the candidate information block and the encryption round difference degree of the corresponding other bidding information blocks is used as the characteristic value of the corresponding other bidding information blocks; if the information importance degree of other bidding information blocks except the candidate information block is less than or equal to the information importance degree of the candidate information block, the difference between the characteristic value of the candidate information block and the encryption round difference degree of the corresponding other bidding information blocks is used as the characteristic value of the corresponding other bidding information blocks; the characteristic value of the candidate information block is a preset value; using this method, the characteristic value of each bidding information block can be obtained. In this embodiment, the preset value is 1, and in specific applications, the implementer can set it according to specific circumstances. The characteristic values of all bidding information blocks are mapped to the corresponding positions in the empty array to obtain the array corresponding to the candidate information block, wherein the number of elements in the empty array is equal to the number of bidding information blocks in the bidding document to be encrypted. The first element in the array corresponding to the candidate information block is the characteristic value of the first bid information block of the bid document to be encrypted, the second element in the array corresponding to the candidate information block is the characteristic value of the second bid information block of the bid document to be encrypted, the third element in the array corresponding to the candidate information block is the characteristic value of the third bid information block of the bid document to be encrypted, and so on, the last element in the array corresponding to the candidate information block is the characteristic value of the last bid information block of the bid document to be encrypted.
[0081] By adopting the above method, an array corresponding to each bidding information block can be obtained. One bidding information block corresponds to one array, and the lengths of the arrays corresponding to all bidding information blocks are equal, which is the number of all bidding information blocks in the bidding document to be encrypted.
[0082] Obtain a normalized result of the sum of all data at the same position in the array corresponding to all the bid information blocks of the bid document to be encrypted, and record it as the superimposed data of the corresponding position; for example: for the first position, calculate the sum of all data at the first position in the array corresponding to all the bid information blocks of the bid document to be encrypted, and use the normalized result of the sum as the superimposed data of the first position; for the second position, calculate the sum of all data at the second position in the array corresponding to all the bid information blocks of the bid document to be encrypted, and use the normalized result of the sum as the superimposed data of the second position; for the third position, calculate the sum of all data at the third position in the array corresponding to all the bid information blocks of the bid document to be encrypted, and use the normalized result of the sum as the superimposed data of the third position; and so on, obtain the superimposed data of all positions, and the number of superimposed data is equal to the number of all bid information blocks of the bid document to be encrypted. The superimposed data at all positions constitute a superimposed data sequence, that is, the number of elements in the superimposed data sequence is the number of all bid information blocks in the bid document to be encrypted. The elements at each position in the superimposed data sequence are determined as the degree of encryption of the corresponding bid information block, that is, each bid information block corresponds to a degree of encryption.
[0083] According to the number of bid information blocks of all encrypted bid documents, the average number of bid information blocks of all encrypted bid documents is calculated. The first ratio between the number of bid information blocks of the bid document to be encrypted and the average number of bid information blocks of all encrypted bid documents is calculated; the product of the average number of total encryption rounds of all encrypted bid documents, the degree of encryption of the candidate information block and the first ratio is rounded up to determine the encryption round of the candidate information block.
[0084] It should be noted that the encrypted bidding documents are bidding documents that belong to the same batch submitted as the bidding documents to be encrypted and have been encrypted using the AES encryption algorithm. The encryption rounds for the first encrypted bidding document are set manually, and the encryption rounds for the second and all subsequent encrypted bidding documents can be adaptively obtained using the method provided in this embodiment.
[0085] By adopting the above method, the encryption round of each bidding information block of the bidding document to be encrypted can be obtained.
[0086] Step S4, using the encryption round to perform encryption using the AES encryption algorithm.
[0087] Considering that the bidding transaction platform should ensure that the encryption level of all bidders' bid documents is consistent, and different bid documents cover different amounts of information, that is, the number of bid information blocks is different, the total encryption rounds of each bid document are different. Among them, the bid document covering more information should be set with a higher total encryption round, and then the encryption round of a single bid information block is adaptively adjusted based on the more accurate total encryption round combined with the encryption degree of the block.
[0088] After obtaining the encryption round of each bid information block of the bid document to be encrypted, the AES encryption algorithm is used to encrypt each bid information block. When a bid document is encrypted, the encrypted bid information in the adaptive encryption round method is updated, and the adaptive encryption round of the new bid document to be encrypted during the bidding period is calculated based on the updated encrypted bid information; when the bidding period expires, the transaction cloud platform stops encrypting and submitting new bid documents, and all encrypted bid documents are stored in a secure path until the online bid opening begins. The AES encryption algorithm is a prior art and will not be described in detail here.
[0089] At this point, the encryption process of the bidding document to be encrypted is completed using the method provided in this embodiment.
[0090] In this embodiment, the encrypted bidding document is first encoded and divided into blocks to obtain a plurality of bidding information blocks. Considering that the conventional AES algorithm uses a fixed encryption round to process the bidding information blocks when encrypting each bidding information block, resulting in the same plaintext block being encrypted into the same ciphertext block, which cannot achieve a good effect of hiding data, this embodiment analyzes the number distribution characteristics of the same coding bits and the position distribution characteristics of the same coding bits between different bidding information blocks, obtains the degree of difference in encryption rounds between different bidding information blocks, and calculates the number of different bidding information blocks according to the frequency of each coding bit in each bidding information block in the coded text after the plaintext of the encrypted bidding document is encoded and the number of digital coding bits. By comparison, the information importance of each bidding information block is evaluated, and then the degree of encryption of each bidding information block is obtained in combination with the information importance of each bidding information block and the difference in encryption rounds with other bidding information blocks, so as to adaptively determine the encryption rounds of each bidding information block. Compared with the traditional AES algorithm in which each bidding information block uses a fixed encryption round, the method provided in this embodiment can adaptively determine the encryption round of each bidding information block in combination with the difference between different bidding information blocks, so that the difference in encryption rounds between bidding information blocks with a greater degree of repetition during encryption is greater, thereby improving the encryption level of the bidding document and ensuring the encryption effect of the bidding document.
[0091] An embodiment of an information encryption system for a transaction cloud platform:
[0092] like Figure 2 As shown, the figure shows a structural block diagram of an information encryption system for a transaction cloud platform, the system includes an information acquisition module, a calculation module, an encryption round determination module and an encryption module;
[0093] The information acquisition module is used to obtain the bidding document to be encrypted, encode the bidding document to be encrypted and process it into blocks to obtain each bidding information block;
[0094] A calculation module is used to obtain the degree of difference in encryption rounds between each two bidding information blocks by combining the number distribution characteristics of the same coding bits and the position distribution characteristics of the same coding bits between each two bidding information blocks; and obtain the information importance of each bidding information block by combining the frequency of each coding bit in each bidding information block in the coded text after the plain text encoding of the encrypted bidding document and the proportion of the number of digital coding bits;
[0095] The encryption round determination module is used to determine the encryption degree of each bidding information block based on the information importance of each bidding information block and the difference in encryption rounds between each bidding information block and other bidding information blocks; and determine the encryption round of each bidding information block based on the encryption degree of each bidding information block and the quantity distribution of the bidding information blocks;
[0096] The encryption module is used to perform encryption processing using the AES encryption algorithm using the encryption round.
[0097] It should be understood that Figure 2 The structural block diagram of an information encryption system for a transaction cloud platform and its modules shown can be implemented in various ways. For example, in some embodiments, the system and its modules can be implemented by hardware, software, or a combination of software and hardware. Among them, the hardware part can be implemented using dedicated logic; the software part can be stored in a memory and executed by an appropriate instruction execution system, such as a microprocessor or dedicated design hardware. Those skilled in the art can understand that the above methods and systems can be implemented using computer executable instructions and / or included in processor control codes, such as carrier media such as disks, CDs or DVD-ROMs, programmable memories such as read-only memories (firmware), or data carriers such as optical or electronic signal carriers. Such codes are provided on. The system and its modules of this specification can not only be implemented by hardware circuits such as ultra-large-scale integrated circuits or gate arrays, semiconductors such as logic chips, transistors, etc., or programmable hardware devices such as field programmable gate arrays, programmable logic devices, etc., but can also be implemented by software executed by various types of processors, and can also be implemented by a combination of the above hardware circuits and software (for example, firmware).
[0098] For more details about the above modules, please refer to other places in this manual and will not be repeated here.
[0099] In other embodiments, an information encryption medium for a transaction cloud platform is also provided, wherein the medium stores at least one program executable by a computer, and when the at least one program is executed by a computer, the computer executes the steps of the information encryption method for a transaction cloud platform in the above-mentioned embodiment, and the medium may be a computer-readable storage medium.
[0100] Among them, the provided systems and media are used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above, and will not be repeated here.
[0101] It should be noted that 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 principles of the present invention should be included in the protection scope of the present invention.
Claims
1. An information encryption method for a transaction cloud platform, characterized in that: The method comprises the following steps: Obtain the bidding document to be encrypted, encode and divide the bidding document to be encrypted into blocks to obtain each bidding information block; The difference degree of encryption rounds between each two bidding information blocks is obtained by combining the number distribution characteristics of the same coding bits and the position distribution characteristics of the same coding bits between each two bidding information blocks; the information importance of each bidding information block is obtained by combining the frequency of each coding bit in each bidding information block in the coded text after the plain text encoding of the encrypted bidding document and the proportion of the number of digital coding bits; Determine the encryption degree of each bidding information block based on the information importance of each bidding information block and the difference in encryption rounds between each bidding information block and other bidding information blocks; determine the encryption round of each bidding information block based on the encryption degree of each bidding information block and the quantity distribution of the bidding information blocks; Using the encryption round to perform encryption processing using the AES encryption algorithm; The step of combining the number distribution characteristics of the same coding bits and the position distribution characteristics of the same coding bits between every two bidding information blocks to obtain the degree of difference in encryption rounds between every two bidding information blocks includes: For any two bidding information blocks: The ratio between the number of identical coding bits between any two bidding information blocks and the maximum number of identical coding bits between every two bidding information blocks in the bidding document to be encrypted is recorded as the first ratio between the any two bidding information blocks; Obtain the characteristic center bits corresponding to the arbitrary two bidding information blocks; the characteristic center bits are the coding bits corresponding to the result of rounding up the mean of the coordinates of all identical coding bits; determine the pointing vector of each identical coding bit in the bidding information block, the direction of the pointing vector is the direction from each identical coding bit to the characteristic center bit, and the size of the pointing vector is the relative distance between each identical coding bit and the characteristic center bit; Superimposing the directional vectors of all identical coding bits in each bidding information block to obtain the directional superposition vector corresponding to each bidding information block; The difference between the pointing superposition vectors corresponding to the arbitrary two bidding information blocks and the first proportion are comprehensively considered to obtain the degree of difference in encryption rounds between the arbitrary two bidding information blocks; The information importance of each bidding information block is obtained by combining the frequency of occurrence of each coding bit in each bidding information block in the coded text after the plain text encoding of the encrypted bidding document and the proportion of the number of digital coding bits, including: The information importance of the candidate information block is obtained according to the information high frequency degree of the candidate information block and the number ratio of the digital form coding bits of the candidate information block, wherein the information high frequency degree and the number ratio of the digital form coding bits are both positively correlated with the information importance; The information high frequency is the normalized result of the average frequency of all the coding bits in the candidate information block appearing in the coded text after the encrypted bidding document is plaintext-encoded; the number ratio of the digital form coding bits of the candidate information block is the ratio between the number of digital form coding bits of the candidate information block and the total number of all coding bits of the candidate information block; The candidate information block is any bidding information block; The step of determining the degree of encryption of each bidding information block based on the information importance of each bidding information block and the degree of difference in encryption rounds between each bidding information block and other bidding information blocks includes: If the information importance of other bidding information blocks except the candidate information block is greater than the information importance of the candidate information block, the sum of the characteristic value of the candidate information block and the encryption round difference degree of the corresponding other bidding information blocks is used as the characteristic value of the corresponding other bidding information blocks; if the information importance of other bidding information blocks except the candidate information block is less than or equal to the information importance of the candidate information block, the difference between the characteristic value of the candidate information block and the encryption round difference degree of the corresponding other bidding information blocks is used as the characteristic value of the corresponding other bidding information blocks; the characteristic value of the candidate information block is a preset value; Mapping the characteristic values of all bidding information blocks into an empty array to obtain an array corresponding to the candidate information block, wherein the number of elements in the empty array is equal to the number of bidding information blocks in the bidding document to be encrypted; Determining the degree of encryption of the candidate information block based on the array corresponding to the candidate information block; The step of comprehensively determining the encryption round of each bidding information block based on the degree of encryption of each bidding information block and the quantity distribution of the bidding information blocks comprises: Calculating a first ratio between the number of bid information blocks of the bid document to be encrypted and the average number of bid information blocks of all encrypted bid documents; The result of rounding up the product of the average value of the total encryption rounds of all encrypted bidding documents, the degree of encryption of the candidate information block and the first ratio is determined as the encryption round of the candidate information block; The step of encoding and dividing the encrypted bidding document into blocks to obtain each bidding information block includes: Perform BASE64 encoding on non-digital information in the encrypted bidding document to obtain an encoded file; The encoded file is processed into plain text blocks through the ECB working mode to obtain each bidding information block.
2. The information encryption method for a transaction cloud platform according to claim 1, characterized in that: The step of comprehensively analyzing the difference between the pointing superposition vectors corresponding to the two bidding information blocks and the first proportion to obtain the degree of difference in encryption rounds between the two bidding information blocks includes: Calculate the amplitude difference and angle between the pointing superposition vectors corresponding to any two bidding information blocks respectively; According to the normalized result of the amplitude difference, the normalized result of the angle and the first proportion, the degree of difference in encryption rounds between any two bidding information blocks is obtained, the normalized result of the amplitude difference and the normalized result of the angle are negatively correlated with the degree of difference in encryption rounds, and the first proportion is positively correlated with the degree of difference in encryption rounds.
3. The information encryption method for a transaction cloud platform according to claim 1, characterized in that: The acquisition of the encryption level of the bidding information block includes: Obtain a normalized result of the sum of all data at the same position in the array corresponding to all bidding information blocks of the bidding document to be encrypted, and record it as superposition data at the corresponding position; The superimposed data at all positions constitute a superimposed data sequence, and the elements at each position in the superimposed data sequence are determined as the degree to be encrypted of the corresponding bidding information block.
4. An information encryption system for a transaction cloud platform, the system being used to execute the steps in the information encryption method for a transaction cloud platform as described in any one of claims 1 to 3, characterized in that: The system includes: An information acquisition module is used to acquire the bidding document to be encrypted, encode the bidding document to be encrypted and process it into blocks to obtain each bidding information block; A calculation module is used to obtain the degree of difference in encryption rounds between each two bidding information blocks by combining the number distribution characteristics of the same coding bits and the position distribution characteristics of the same coding bits between each two bidding information blocks; and obtain the information importance of each bidding information block by combining the frequency of each coding bit in each bidding information block in the coded text after the plain text encoding of the encrypted bidding document and the proportion of the number of digital coding bits; The encryption round determination module is used to determine the encryption degree of each bidding information block based on the information importance of each bidding information block and the difference in encryption rounds between each bidding information block and other bidding information blocks; and determine the encryption round of each bidding information block based on the encryption degree of each bidding information block and the quantity distribution of the bidding information blocks; The encryption module is used to perform encryption processing using the AES encryption algorithm using the encryption round.
5. An information encryption medium for a transaction cloud platform, wherein the medium stores at least one program executable by a computer, characterized in that: When the at least one program is executed by a computer, the computer executes the steps of the information encryption method for a transaction cloud platform as described in any one of claims 1 to 3.
Citation Information
Patent Citations
Credible bidding encryption and decryption method supporting centralized decryption
CN112016111A
Information encryption method and device for client-side energy consumption control system
CN112953890A