A ciphertext order-preserving storage method based on non-uniform bucketing and physical ordering

By employing non-uniform bucketing, hash mapping, physical sorting, and noise injection, the problems of ciphertext order leakage and low computational efficiency in the OPE scheme are solved, enabling efficient and secure ciphertext querying. This approach is suitable for data storage and querying scenarios in industries such as power and telecommunications.

CN123179457APending Publication Date: 2026-11-27GUILIN UNIV OF ELECTRONIC TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611453692.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-18
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

Existing OPE solutions suffer from issues such as sequential information leakage, poor adaptability of bucketing strategies, low computational efficiency, and high interaction overhead in encrypted range queries, making it difficult to effectively protect the security and efficiency of sensitive data in a cloud computing environment.

Method used

A non-uniform bucketing strategy is adopted, the order between buckets is hidden by hash mapping, the row number is physically stored to achieve O(1) ciphertext comparison, and the high-frequency values ​​and noise injection are used to confuse the distribution characteristics by dispersing high-frequency values ​​and noise through equal-value bucket groups. Combined with a multi-key encryption mechanism, the efficiency and security of ciphertext query are achieved.

Benefits of technology

It effectively hides the ciphertext distribution pattern, reduces the effectiveness of frequency analysis, improves query efficiency, and reduces interaction overhead. It is suitable for daily data writing scenarios in industries such as power and telecommunications, and provides an efficient ciphertext range query solution.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123179457A_ABST
    Figure CN123179457A_ABST
Patent Text Reader

Abstract

The application discloses a ciphertext order-preserving storage method based on non-uniform bucketing and physical ordering. A data owner generates non-uniform bucketing boundaries according to historical distribution, hashes real bucket numbers and stores them in a query agent I, and establishes a secret bijection. New data is globally sorted and then bucketed, and high-frequency equivalent data is dispersed through equivalent bucket groups. In the bucket, the data is encrypted by independent AES-256 keys of each user in the order of plaintext and stored in a query agent II. The maximum bucket capacity is filled with noise to balance the observation capacity. When querying, O(1) ciphertext comparison is realized by comparing the bucket number and the physical row number. The method replaces the cryptographic order-preserving operation with physical storage order, combines non-uniform bucketing, hash mapping, equivalent bucket groups and noise injection, and resists frequency analysis, distribution inference and file injection attacks; the multi-key architecture further reduces the risk of frequency analysis. Two schemes of O(2n) and O(n) are provided to adapt to high-security and high-efficiency scenarios. The total time consumption of 35000 data tests is 0.453 seconds, which is about 65 times higher than the performance of traditional order-preserving encryption.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of data security and privacy protection technology, specifically involving a method for preserving the order of encrypted data based on non-uniform bucketing and physical sorting. It is applicable to outsourced storage and encrypted range query scenarios of sensitive data in industries such as power, telecommunications, and finance under cloud computing environments. Background Technology

[0002] Industries such as power, telecommunications, and finance are accelerating their integration with cloud platforms and the Internet of Things (IoT), centralizing business data in the cloud, which contains a significant amount of user privacy data. Taking smart grids as an example, residential electricity consumption details are often outsourced for cloud storage, used for electricity billing, load forecasting, and user queries. While outsourcing reduces local maintenance costs, entrusting data storage to third-party cloud platforms also introduces the risk of data leakage. Balancing range query efficiency and data security in encrypted states is the core issue of encrypted retrieval. Order-Preserving Encryption (OPE) preserves the numerical order of ciphertext and plaintext, allowing databases to perform range queries without decryption. However, existing OPE and bucket-based order-preserving schemes still have limitations in practical engineering implementation.

[0003] The leakage of order information is the most fundamental problem of OPE. OPE is a deterministic encryption protocol, and the ciphertext inherently carries the order relationship of the plaintext. Agrawal et al.'s OPES scheme achieves order preservation through data distribution sampling, but subsequent research by Naveed et al. showed that attackers can recover the original data distribution and even deduce some plaintext values ​​by using frequency statistics and order restoration attacks. In addition, the leakage function is coupled with the actual query pattern; the more queries and the more concentrated the range, the more auxiliary information attackers can utilize.

[0004] Bucketing strategies also impact deployment. Traditional solutions often use uniform bucketing at fixed intervals, which is poorly adapted to the non-uniform distribution of real-world data. This can easily lead to a few buckets accumulating while most are idle, reducing query efficiency and exposing ciphertext distribution patterns due to density differences between buckets. Adaptive and non-uniform bucketing can alleviate this problem, but they increase the complexity of preprocessing and metadata management. In terms of computational performance, mainstream OPE algorithms use recursive encryption for single plaintext entries, with a complexity of O(logN). The encryption process requires repeated hypergeometric sampling and recursive calls, and the overhead increases significantly as the data volume grows. With millions of data entries, recursive encryption accounts for a high proportion of the overall encryption process, which cannot be eliminated by hardware acceleration alone. Stateful OPE solutions, such as mOPE, have problems more at the interaction level. When inserting new data, the generated ciphertext may need to be dynamically corrected, forcing frequent synchronization between the client and server. Communication overhead increases with the scale of insertions, especially in distributed or high-concurrency scenarios.

[0005] Overall, OPE has clear application value in encrypted range queries, but its security, bucketing strategy, computational efficiency, and interaction mode are mutually constrained. Based on current research progress, OPE is more suitable as a compromise solution for scenarios with controllable leakage, rather than the ultimate answer for general privacy queries. Future work to promote its implementation may focus not on pursuing stronger order preservation capabilities, but on establishing clearer leakage metrics and scenario adaptation standards. Summary of the Invention

[0006] The purpose of this invention is to overcome the shortcomings of the prior art and provide a ciphertext order-preserving storage method based on non-uniform bucketing and physical sorting. Through non-uniform bucketing strategy: hash mapping hides the order between buckets: physical storage of row numbers achieves O(1) ciphertext comparison: equal-value bucket groups disperse high-frequency values: noise injection confuses distribution characteristics, effectively solving the technical problems of serious frequency leakage, low query efficiency and large interaction overhead in the existing OPE scheme.

[0007] The system of this invention comprises five types of entities: data owner, data user, query agent I, query agent II, and cloud server.

[0008] The Data Owner (DO) holds all the original plaintext data and can generate independent AES-256 keys for different business users. Bucketing rule formulation, secret mapping table construction, and data encryption are all completed offline. After completion, the DO distributes the secret mapping table to the query agent I via a secure channel. The DO is a trusted entity, but the transmission link between the DO and the agent must still ensure confidentiality and integrity.

[0009] Data users (DUs) are the end users of query services, such as power grid maintenance personnel or ordinary residential users. DUs initiate queries to Query Agent II through front-end applications and receive decrypted plaintext results. They do not participate in key generation or mapping table construction, nor do they hold keys or mapping parameters. Their plaintext results are decrypted by the Data Controller (DO) or an agent authorized by the DO.

[0010] Proxy I stores a secret mapping table, recording the correspondence between bucket numbers and the sorting of data within each bucket, for use in ciphertext query comparison; it does not store the ciphertext data itself. Proxy II stores the ciphertext data. Data from each bucket is organized into independent data tables according to a predetermined sorting rule and stored uniformly in Proxy II. Proxy II also receives and forwards query requests. Both Proxy I and Proxy II are semi-honest entities, and it is assumed that they do not collude. If they collude, joint analysis of the mapping relationship and the ciphertext data may weaken the security boundary of this scheme.

[0011] A cloud server (CS) is an honest-but-curious entity that stores encrypted ciphertext data, bucket sequence information, and real business data and noisy data used to balance data distribution. The noisy data is generated by the data distribution object (DO) during the offline phase, encrypted using the same rules as the real data, and then stored in the CS. The CS may passively snoop on the stored data, but it is assumed that it will not actively tamper with the data or launch a collusive attack.

[0012] Step S1: Non-uniform bucket boundary generation: The data owner (DO) generates a non-uniform bucket boundary sequence B based on the distribution characteristics of the historical dataset Dold, and assigns a hash mapping value to each real bucket number, which is stored in the query proxy I.

[0013] Step S2: Bucket Sort of Real Data: Sort the new dataset After global sorting, data is assigned to the corresponding bucket based on the bucket boundary sequence B. Equal-value high-frequency data is distributed to multiple peer-level buckets through the equal-value bucket group mechanism.

[0014] Step S3: Physical storage implements numerical sorting: Data within the bucket is encrypted using a user-specific AES-256 key in plaintext order and stored sequentially in the corresponding data table of Proxy II.

[0015] Step S4: Noise Mixing: Count the number of real data in each bucket, and inject noise records with the maximum bucket capacity as the target to make the observation capacity of each bucket tend to be balanced.

[0016] Step S5: Ciphertext Query and Comparison: After the user submits the query value, the ciphertext comparison is first performed by comparing the bucket sequence number (Proxy I), and then by comparing the physical row number within the bucket (Proxy II or CS), achieving O(1) complexity ciphertext comparison.

[0017] Step S1 specifically includes:

[0018] S1.1: Preset target number of buckets Calculate the estimated data volume per barrel , where n is the total number of elements in the historical dataset;

[0019] S1.2: Transfer historical datasets Sort in ascending order and store in a one-dimensional array;

[0020] S1.3: Traverse the sorted array with step size c, and take the value at each step size position to form the bucket boundary sequence. ,in (Lower bound of data) (Upper bound of data);

[0021] S1.4: The actual number of each bucket Take the hash value H(Bucket_i) as the actual bucket number used, and store it in Proxy I in order, establishing a secret bijective mapping between the real bucket number and the hash bucket number. .

[0022] The equal-value bucket mechanism described in step S2 specifically includes:

[0023] When multiple consecutive interval boundaries are equal (i.e.) At that time, each bucket is still numbered. When actually adding data to buckets, prioritize adding it to buckets with smaller serial numbers; when the data in a bucket reaches the estimated data volume... When the data volume in the last bucket reaches a certain value, subsequent data of equal value is placed into the next bucket with a smaller sequence number; if the data volume in the last bucket reaches a certain value... If there are still more data of equal value that have not been put into the bucket, then repeat the aforementioned bucketing method until the data to be sorted belongs to the next bucket.

[0024] The multi-key encryption architecture described in step S3 is as follows: different data users encrypt their own data using independent AES-256 keys, and the same plaintext generates different ciphertexts under different user keys, and the ciphertexts are not comparable.

[0025] The noise injection method described in step S4 is as follows:

[0026] S4.1: Count the number of data points in each bucket, and take the maximum value as the target number of data points in each bucket. ;

[0027] S4.2: Each bucket calculates the required number of noise records, generates noise records according to preset rules, and stores them as "ciphertext-bucket number" key-value pairs, mimicking real data records;

[0028] S4.3: Randomly insert noise records into sorted buckets without changing the relative order of real records.

[0029] The encrypted query and comparison described in step S5 includes two deployment schemes:

[0030] Option 1 (O(2n) storage complexity) deployment scheme:

[0031] S5.1a: User A and User B each use their own keys. and encryption and ;

[0032] S5.2a: Send the ciphertext to CS to query its corresponding bucket number. and ;

[0033] S5.3a: If Query Proxy I and The storage location is used to determine the size relationship based on the storage order;

[0034] S5.4a: If Query the storage location of the two ciphertexts in the bucket table of Proxy II, and determine their size relationship based on the storage order;

[0035] Option 2 (O(n) storage complexity) deployment scheme:

[0036] S5.1b: User A and User B each use their own keys. and encryption and ;

[0037] S5.2b: Send the ciphertext to CS to retrieve its corresponding bucket number. and ;

[0038] S5.3b: If Query Proxy I and The storage location is used to determine the size relationship based on the storage order;

[0039] S5.4b: If We can directly query the physical storage location of the two ciphertexts in the CS within the bucket and determine their size relationship based on the storage order. Beneficial effects

[0040] Compared with the prior art, the present invention has the following beneficial effects:

[0041] (1) Ciphertext comparison efficiency

[0042] This scheme does not rely on cryptographic order-preserving operations, but instead completes the ciphertext comparison according to the physical storage order of the database, with a comparison complexity of O(1), avoiding the computational overhead of O(log N) recursive encryption in the traditional OPE algorithm. With a data scale of 35,000 records, the total time of this scheme is 0.453 seconds, which is about 65 times faster than the traditional OPE algorithm. The experimental environment, data distribution and comparison algorithm are shown in Table 1.

[0043] (2) Anti-frequency analysis mechanism

[0044] This scheme reduces the effectiveness of frequency analysis through four paths: non-uniform bucketing to balance the amount of data within each bucket; hash mapping to hide the order between buckets; equal-value bucket groups to disperse high-frequency values; and noise injection to balance bucket capacity. These four methods are not independent of each other, but rather act on three levels: bucket partitioning, inter-bucket relationships, and intra-bucket statistics, making it difficult for attackers to reconstruct the plaintext distribution from the ciphertext or bucket statistics. This conclusion is based on assumption (6) and is not unconditionally true.

[0045] (3) Multi-key frequency hiding

[0046] Different users encrypt their data using independent AES-256 keys. The same plaintext generates different ciphertexts under different keys, and the ciphertext equality cannot be directly used to infer the plaintext frequency distribution. This mechanism eliminates the premise of "the same plaintext corresponds to the same ciphertext" on which frequency analysis depends, but it cannot cover all statistical attacks on its own and still needs to be combined with the bucketing and noise mechanism in Article (2).

[0047] (4) Daily incremental data writing

[0048] The system adopts a daily table partitioning architecture, eliminating the need to re-sort the global data during incremental writes. This design is primarily aimed at daily data write scenarios in industries such as power and telecommunications.

[0049] (5) Two deployment schemes

[0050] This patent designs two deployment schemes that can be selected according to the security and efficiency requirements of the business. The O(2n) scheme adopts a two-layer proxy physical isolation architecture, which has higher security and is suitable for scenarios with high privacy protection requirements. The O(n) scheme strikes a balance between security and efficiency, reducing communication overhead by about 50% compared to the O(2n) scheme, and is suitable for most common scenarios. The applicable scope and performance boundaries of the two schemes are shown in Table 1.

[0051] (6) Proof of safety

[0052] Under the multi-key assumption and standard cryptographic assumptions, this scheme possesses frequency hiding properties. The adversary's distinguishing advantage can be reduced to the sum of three parts: the pseudo-randomness of AES, the one-wayness of the hash function, and the frequency dilution effect of equal-value buckets. When the corresponding assumptions hold, all three parts are negligible.

[0053] Table 1. Comparison of total time for each option (unit: seconds)

[0054] Data volume OPE encryption O(2n) storage scheme O(n) storage scheme OPE / O(n) multiple 10000 8.6833 0.1386 0.1552 55.9× 15000 13.0159 0.2036 0.2004 65.0× 20000 17.6661 0.2692 0.2593 68.1× 25000 21.9776 0.3501 0.3425 64.2× 30000 26.4317 0.4126 0.3996 66.2× 35000 30.7041 0.4617 0.4532 67.8× Attached Figure Description

[0055] Figure 1 Generate a time comparison chart for the lookup table of O(2n) and O(n) storage schemes;

[0056] Figure 2 This is a comparison chart of the total time of the OPE algorithm and the storage scheme of this invention;

[0057] Figure 3 Here is a flowchart of the O(2n) storage scheme query process;

[0058] Figure 4 The flowchart for querying using an O(n) storage scheme. Detailed Implementation

[0059] The present invention will now be described in further detail with reference to the accompanying drawings and specific embodiments.

[0060] Example 1: Generation of Non-Uniform Bucket Boundaries

[0061] This embodiment details the process of generating non-uniform bucket boundaries.

[0062] Step 1: The data owner transfers the historical dataset. Sort the data in ascending order to obtain an ordered array sorted_data, and count the total number of elements n.

[0063] Step 2: Divide the bins according to the preset target quantity. Calculate the estimated data volume c per barrel using the following formula: .

[0064] Step 3: Initialize the bucket boundary sequence `boundaries`, using the lower bound of the data `m` as the first element. Starting from the `c`th position of the sorted array, append every `c` elements to `boundaries` until the entire array has been traversed. If the last element of the sequence is not equal to the upper bound of the data `M`, then append `M` to the end.

[0065] Step 4: Remove duplicates from the boundaries to eliminate duplicate boundary values ​​caused by equal data, and obtain the final bucket boundary sequence B.

[0066] Step 5: Sequentially number each interval formed by two adjacent boundary values ​​in B to obtain the actual bucket numbers. Take the hash value for each real bucket number. The mapping between real bucket numbers and hash bucket indices is stored in a hash mapping table π, and the hash bucket indices are stored sequentially in the query agent I. This mapping table constitutes a secret bijective mapping between real bucket indices and hash bucket indices, preventing the cloud server from deducing the order of real buckets from the hash bucket indices.

[0067] Example 2: Data Bucket Sort

[0068] Step 1: Add the new dataset Sort globally in ascending order.

[0069] Step 2: Initialize the empty bucket set. The number of buckets is one less than the number of elements in the bucket boundary sequence B. Set a counter r with an initial value of 0 to record the distribution position of equal-value data in the same-level bucket group.

[0070] Step 3: Traverse the sorted... For each data point num, call FindBucketIndex to determine its bucket range index i.

[0071] Step 4: If Simply append num to the hash bucket index. The corresponding bucket.

[0072] Step 5: If This indicates that the data falls within the equal-value boundary range, requiring the use of the equal-value bucket mechanism. Starting from position i, search for consecutive equal boundary values ​​to determine the range of the equal-value bucket and calculate its size, `group_size`. As the target bucket offset target, append num to The corresponding bucket, then r is incremented by one.

[0073] Step 6: After traversal, sort the data in each bucket in ascending or descending order and return the bucket results (buckets).

[0074] Example 3: Noise Confusion

[0075] This embodiment details the specific process of noise injection. A certain amount of noise ciphertext is introduced into the data within each bucket, primarily for two security reasons: firstly, the new data... Although compared with past data While data may have similar distributions, actual data distributions can still differ, especially with a large number of buckets. Dividing densely populated areas may not achieve a perfectly uniform distribution, potentially leading to the leakage of data distribution characteristics within some buckets. Secondly, to prevent attacks that speculate on bucket boundaries due to differences in data volume between buckets, it's necessary to minimize significant differences in data structure characteristics between each bucket. Simultaneously, it's desirable to minimize introduced noise to reduce storage pressure.

[0076] The specific methods for generating and inserting noise into each bucket are as follows:

[0077] Step 1: Count the number of actual data points in each bucket, and take the maximum number of data points in each bucket as the target number of data points for all buckets. .

[0078] Step 2: For each bucket, calculate the required number of noise records, i.e., the number of data records in the target bucket. The difference between the actual number of data points in the bucket and the actual number of data points in the bucket.

[0079] Step 3: Generate the corresponding number of noise records according to preset rules. The noise records are stored in the form of "ciphertext-bucket number" key-value pairs, mimicking the format of real data records. The ciphertext value uses the same encryption format as the real record, making it impossible for attackers to distinguish noise from real data at the ciphertext level.

[0080] Step 4: Randomly insert the generated noise records into the sorted buckets, without changing the relative order of the real records, so that the observation capacity of each bucket reaches the required level. Attackers cannot infer the sparse or dense areas of the original data distribution from the differences in bucket capacity.

[0081] Example 5: O(2n) storage scheme and query scheme

[0082] This embodiment details the O(2n) storage scheme and its query comparison process, as shown in the appendix. Figure 3 As shown.

[0083] During the storage phase, the data within each bucket, after noise obfuscation, is arranged in a random order and stored on the cloud server CS, without considering the original sorting relationship. The inter-bucket order mapping is stored in query agent I, and the ordered ciphertext list within each bucket is stored in query agent II, forming a two-layer agent architecture.

[0084] Let the data to be compared for user A and user B be as follows: and The process of querying and comparing encrypted values ​​is as follows:

[0085] Step 1: User A and User B each use their respective keys. and encryption and Obtain the encrypted data and .

[0086] Step 2: and Send the query to CS to retrieve the corresponding bucket number. Let the bucket numbers obtained from the query be BucketA and BucketB.

[0087] Step 3: If BucketA is not equal to BucketB, then query the storage locations of BucketA and BucketB in Proxy I. If the storage order is BucketA before BucketB, then... Less than ,on the contrary Greater than .

[0088] Step 4: If BucketA equals BucketB, then query the Proxy II bucket table. and The storage location, if the storage order exist Previously, Less than ,on the contrary Greater than .

[0089] Step 5: Return the query results.

[0090] Example 5: O(n) storage and query schemes

[0091] This embodiment details the O(n) storage scheme and its query comparison process, as shown in the appendix. Figure 4 As shown.

[0092] Building upon the O(2n) storage scheme, the original random sorting is replaced with a system where data from different buckets can be freely interleaved. However, the relative physical storage relationship of data within the same bucket on the cloud server must be consistent with the sorting relationship within the bucket. In other words, by adding sorting rules, the Proxy II functionality in the O(2n) storage scheme is transferred to the CS (Client / Server) architecture, reducing the memory and communication overhead of Proxy II.

[0093] Let the data to be compared for user A and user B be as follows: and The specific query rules are as follows:

[0094] Step 1: User A and User B each use their respective keys. and encryption and Obtain the encrypted data and .

[0095] Step 2: and Send the query to CS to retrieve the corresponding bucket number. Let the bucket numbers obtained from the query be BucketA and BucketB.

[0096] Step 3: If BucketA is not equal to BucketB, then query the storage locations of BucketA and BucketB in Proxy I. If the storage order is BucketA before BucketB, then... Less than ,on the contrary Greater than .

[0097] Step 4: If BucketA equals BucketB, then query... and Storage location in CS, if storage order exist Previously, Less than ,on the contrary Greater than .

[0098] Step 5: Return the query results.

Claims

1. A method for preserving the order of encrypted text based on non-uniform bucketing and physical sorting, characterized in that, Includes the following steps: Step S1: The data owner bases their data on historical datasets. Based on the distribution characteristics, a non-uniform bucket boundary sequence B is generated, and a hash mapping value is assigned to each real bucket number and stored in the query Proxy I; Step S2: Transfer the new dataset After global sorting, the data is distributed to the corresponding buckets according to the bucket boundary sequence B; for high-frequency data of equal value, the equal bucket group mechanism is used to distribute the data to multiple buckets at the same level. Step S3: Encrypt the data in each bucket in plaintext order using the user-specific AES-256 key, and store it in the corresponding data table of Proxy II while maintaining the order. Step S4: Count the number of real data in each bucket, and inject noise records into each bucket with the maximum bucket capacity as the target to balance the observed capacity of each bucket. Step S5: When the user submits the query value, the encrypted comparison is performed with O(1) complexity by comparing the bucket sequence number and the physical row number within the bucket.

2. The method according to claim 1, characterized in that, The non-uniform bucket boundary generation in step S1 specifically includes: Step S1.1: Preset the target number of buckets Calculate the estimated data volume per barrel , where n is the total number of elements in the historical dataset; Step S1.2: Transfer the historical dataset Sort in ascending order and store in a one-dimensional array; Step S1.3: Traverse the sorted array with a step size c, and take the value at each step size position to form a bucket boundary sequence. ,in As the lower bound of the data, The upper bound of the data; Step S1.4: Perform deduplication on the bucket boundary sequence to remove duplicate boundary values ​​caused by equal data; Step S1.5: Assign a real number to each bucket. Get hash value As the actual bucket numbers used, they are stored in Proxy I in order, establishing a secret bijective mapping π between the real bucket numbers and the hash bucket numbers.

3. The method according to claim 1, characterized in that, The equal-value bucket mechanism described in step S2 specifically includes: When multiple consecutive intervals have the same boundary, each bucket is still numbered. When actually adding data to buckets, prioritize adding data to the bucket with the smaller sequence number. When the data in a bucket reaches the estimated data volume c, the subsequent data of equal value is added to the next bucket with the smaller sequence number. If the last bucket has a data volume c and there is still more data of equal value that has not been added, repeat the above bucketing method until the data to be sorted belongs to the next bucket.

4. The method according to claim 1, characterized in that, The multi-key encryption architecture described in step S3 is as follows: different data users encrypt their own data using independent AES-256 keys. The same plaintext generates different ciphertexts under different user keys, and the ciphertexts are not comparable.

5. The method according to claim 1, characterized in that, The noise injection method described in step S4 specifically includes: Step S4.1: Count the number of data points in each bucket, and take the maximum value as the target number of data points in each bucket. ; Step S4.2: Calculate the required number of noise records for each bucket, generate noise records according to preset rules, and store them as "ciphertext-bucket number" key-value pairs, mimicking real data records; Step S4.3: Randomly insert the noise records into the sorted buckets, but do not change the relative order of the real records.

6. The method according to claim 1, characterized in that, The ciphertext query and comparison in step S5 adopts an O(2n) storage complexity scheme, specifically including: Step S5.1a: User A and User B each use their respective keys. and encryption and Obtain the encrypted data and ; Step S5.2a: Send the ciphertext to CS to query its corresponding bucket number. and ; Step S5.3a: If Query Proxy I and The storage location is used to determine the size relationship based on the storage order; Step S5.4a: If Query the storage location of the two ciphertexts in the bucket table of Proxy II, and determine their size relationship based on the storage order; Step S5.5a: Return the query results.

7. The method according to claim 1, characterized in that, The ciphertext query and comparison in step S5 employs an O(n) storage complexity scheme, specifically including: Step S5.1b: User A and User B encrypt using their respective keys k_a and k_b. and ; Step S5.2b: Send the ciphertext to CS to query its corresponding bucket number. and ; Step S5.3b: If Query Proxy I and The storage location is used to determine the size relationship based on the storage order; Step S5.4b: If Directly query the physical storage location of the two ciphertexts in the bucket in CS, and determine their size relationship based on the storage order; Step S5.5b: Return the query results.

8. The method according to claim 1, characterized in that, The method also includes a security verification step: Construct a simulator S. Given the randomization order information and the capacity of the balanced bucket, the simulator determines the total order ranking of all data items based on the randomization order and randomly selects simulated plaintext values. To ensure consistent ranking, encrypt using a random key chosen by the simulator. Noise recording was injected to ensure that the capacity of each barrel was uniform. The simulator does not access any real plaintext, real keys, or hash maps. Assuming opponent A has a non-negligible advantage The ability to distinguish between real and simulated views must come from distinguishing between AES ciphertext and random values, distinguishing between hash values ​​and random values, or using frequency aggregation to distinguish between the three, which contradicts the pseudo-randomness of AES-256, the one-way nature of hash functions, and the frequency dilution mechanism of equal-value buckets, respectively. The opponent's advantage can be broken down into: All of these are negligible quantities.

9. The method according to claim 1, characterized in that, The method supports incremental writing of daily updated data, and the daily table partitioning architecture eliminates the need for global reordering during incremental writing.

10. The method according to claim 1, characterized in that, The AES-256 encryption uses CBC mode in conjunction with random IVs, producing different ciphertext outputs for the same plaintext.

11. The method according to claim 1, characterized in that, The hash mapping uses a keyed hash function, which is privately selected by the data owner. The cloud server cannot deduce the actual bucket order from the hash bucket sequence number.

12. The method according to claim 1, characterized in that, The physical storage row number comparison is achieved through the physical storage location of the database. The order of two ciphertexts within the same bucket directly reflects the size relationship of their plaintext values, without the need for any cryptographic comparison operations.