General-purpose big data encrypted interactive comparison system

By processing data using homomorphic encryption, the problems of data privacy leakage and abuse in cross-entity and cross-industry data interaction and comparison are solved, achieving data security and comparison accuracy, adapting to various complex and diverse data verification scenarios, and improving the system's versatility and practicality.

CN121193406BActive Publication Date: 2026-04-03CNPC BEIDOU (HEBEI) TECHNOLOGY ENERGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-11-27
Publication Date
2026-04-03

AI Technical Summary

Technical Problem

In the process of cross-entity and cross-industry data interaction and comparison, there are risks of data privacy leakage and abuse, and existing technologies are insufficient to effectively guarantee data security and privacy.

Method used

Homomorphic encryption is used to process the data. By comparing the encrypted information, it is ensured that the data is not decrypted during the interaction and comparison process. Combined with rule configuration storage modules and appropriate homomorphic encryption methods, the appropriate encryption method is selected according to different subjects and dimensions to be verified, so as to achieve flexible data comparison.

Benefits of technology

It effectively avoids the risks of data privacy leakage and abuse, meets the data security requirements in cross-entity and cross-industry data interaction and comparison scenarios, improves the system's versatility and practicality, and ensures the accuracy and efficiency of data comparison.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121193406B_ABST
    Figure CN121193406B_ABST
Patent Text Reader

Abstract

This application provides a general-purpose big data encrypted interactive comparison system, belonging to the field of data encryption technology. The system includes: a data acquisition module for receiving verification requests; an encryption method determination module for determining the comparison rules for each dimension to be verified corresponding to each subject to be verified in the verification request, and determining the homomorphic encryption method for each dimension to be verified based on the comparison rules; a data sending module for sending the homomorphic encryption methods for each dimension to be verified to the device to be verified and the verification device; a data comparison module for, in response to receiving encrypted information to be verified and encrypted verification information, comparing the information to be verified and the verification information to obtain a comparison result; and a data feedback module for encrypting the comparison result and feeding it back to the device to be verified and the verification device. This application can reduce the risk of data privacy leakage and abuse during the data comparison process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data encryption technology, and in particular to a general-purpose big data encryption interactive comparison system. Background Technology

[0002] With the development of the digital economy, the demand for cross-entity and cross-industry data exchange and comparison is increasing. Enterprises need to verify the authenticity of customer information through third-party data, and regulatory authorities need to verify the compliance of business data.

[0003] For example, online freight platforms need to verify the fuel deduction information uploaded by employees. In this case, the online freight platform usually uploads the information uploaded by employees to a third-party data verification company. The third-party data verification company obtains the relevant information uploaded by the gas station management system and compares and verifies the data. However, there are risks of data privacy leakage and abuse in this process. Summary of the Invention

[0004] This application provides a general-purpose big data encrypted interactive comparison system to reduce the risk of data privacy leakage and abuse during the data comparison process.

[0005] This application provides a general-purpose big data encrypted interactive comparison system, including:

[0006] The data acquisition module is used to receive verification requests; each verification request contains at least one subject to be verified and at least one corresponding dimension to be verified.

[0007] The encryption method determination module is used to determine the comparison rules for each verification dimension corresponding to each verification subject in the verification request, and to determine the homomorphic encryption method for each verification dimension based on the comparison rules of each verification dimension.

[0008] The data sending module is used to send the homomorphic encryption method of each verification dimension corresponding to each verification subject to the verification device, so that the verification device can return the encrypted verification information; and to send each verification subject, the verification dimension corresponding to each verification subject, and the homomorphic encryption method of each verification dimension corresponding to each verification subject to the verification device, so that the verification device can return the encrypted verification information.

[0009] The data comparison module is used to respond to the received encrypted verification information sent by the device to be verified and the encrypted verification information sent by the verification device, and to compare the information based on the verification information and the verification information to obtain the comparison result.

[0010] The data feedback module is used to encrypt the comparison results and then send them back to the device to be verified and the verification device.

[0011] In one exemplary embodiment of this application, the data comparison module is specifically used for:

[0012] In response to the total amount of data of the information to be verified and the verification information received within a preset time period exceeding a preset data volume threshold, the block size and the number of parallel threads are optimized.

[0013] The information to be verified is compared with the verification information based on the optimized block size and the optimized number of parallel threads.

[0014] In one exemplary embodiment of this application, the information to be verified contains multiple ciphertexts to be verified; the verification information contains multiple verification ciphertexts.

[0015] Each ciphertext to be verified is obtained by the device to be verified for each dimension information to be verified for each subject to be verified, based on the homomorphic encryption method of that dimension information; the dimension to be verified is the dimension corresponding to that dimension information.

[0016] Each verification ciphertext is obtained by the verification device homomorphically encrypting the verification dimension information for each subject to be verified using the homomorphic encryption method of that dimension. The verification dimension information corresponding to each subject to be verified is obtained by querying each subject to be verified and its corresponding verification dimension.

[0017] In one exemplary embodiment of this application, the data comparison module is further configured to:

[0018] Determine the range of possible values ​​for the number of parallel threads;

[0019] The range of values ​​for the block size is determined based on the size of each ciphertext to be verified and the size of each ciphertext to be verified.

[0020] The solution space is determined based on the range of values ​​for the number of parallel threads and the range of values ​​for the block size;

[0021] Optimize block size and number of parallel threads based on solution space and fitness function.

[0022] In one exemplary embodiment of this application, the data comparison module is further configured to:

[0023] Determine the maximum and average ciphertext size for each ciphertext; each ciphertext includes the ciphertext to be verified and the ciphertext to be verified.

[0024] Set the maximum ciphertext size as the lower limit of the block size;

[0025] The upper limit of the block size is determined based on the average ciphertext size and the preset maximum memory capacity.

[0026] In one exemplary embodiment of this application, the data comparison module is further configured to:

[0027] The size dispersion of the ciphertext is determined based on each ciphertext;

[0028] The first lower bound is determined based on the average ciphertext size and the dispersion of the ciphertext size.

[0029] The second lower bound is determined based on the maximum memory capacity and memory utilization coefficient;

[0030] The minimum value between the first and second lower limits is determined as the upper limit of the block size.

[0031] In one exemplary embodiment of this application, the fitness function contains at least one of the following constraints:

[0032] Hardware resource constraints;

[0033] Operation time constraints;

[0034] Dependency constraints; Dependency constraints are used to constrain the allocation of multiple dimensions of encrypted data to the same subject to be verified to the same block and the same thread.

[0035] In one exemplary embodiment of this application, the data comparison module is specifically used for:

[0036] For each dimension of the same subject to be verified, extract the ciphertext to be verified and the verification ciphertext corresponding to that dimension; according to the homomorphic encryption method corresponding to that dimension, call the appropriate ciphertext operation interface to perform the operation corresponding to the comparison rule on the ciphertext to be verified and the verification ciphertext; match the operation result with the preset benchmark ciphertext corresponding to that dimension to generate the sub-comparison result of that dimension to be verified.

[0037] The comparison result is obtained based on the sub-comparison results of all dimensions to be verified of the subject to be verified.

[0038] In one exemplary embodiment of this application, the encryption method determination module is specifically used for:

[0039] For each dimension to be verified:

[0040] If the comparison rule for the dimension to be verified is addition and non-floating-point arithmetic, then the homomorphic encryption method of the dimension to be verified is determined to be a partially homomorphic encryption method.

[0041] If the comparison rule of the dimension to be verified is a mixture of addition and multiplication operations and is a non-floating-point operation, then the homomorphic encryption method of the dimension to be verified is determined to be a hierarchical homomorphic encryption method.

[0042] If the comparison rule for the dimension to be verified is floating-point arithmetic, then the homomorphic encryption method for the dimension to be verified is determined to be a fully homomorphic encryption method.

[0043] In one exemplary embodiment of this application, the general-purpose big data encrypted interactive comparison system is characterized by further comprising:

[0044] The rule configuration storage module is used to store the comparison rule library; the comparison rule library contains the comparison rules corresponding to each dimension to be verified.

[0045] The beneficial effects of the general-purpose big data encrypted interactive comparison system provided in this application embodiment are as follows:

[0046] The general-purpose big data encrypted interactive comparison system provided in this application uses homomorphic encryption to process data. During the data interaction and comparison process, the device to be verified provides encrypted information to be verified, and the verification device provides encrypted verification information. The data comparison module directly compares the encrypted information. The entire process does not require decryption of the original data, thus ensuring the privacy of data during the interaction and comparison process from a technical perspective. This effectively avoids the risks of data privacy leakage and abuse, and meets the strict requirements for data security in cross-entity and cross-industry data interaction and comparison scenarios. The encryption method determination module in this embodiment determines the comparison rules for each dimension to be verified for each subject in the verification request, and determines the homomorphic encryption method for each dimension based on these comparison rules. This allows the application to flexibly select appropriate homomorphic encryption methods according to different subjects and dimensions to be verified, thereby adapting to various complex and diverse data verification scenarios. Whether it's a network freight platform verifying employee fuel deduction information, other enterprises verifying the authenticity of customer information, or regulatory departments verifying the compliance of business data, this application can achieve accurate and effective data comparison and verification, improving its versatility and practicality. Attached Figure Description

[0047] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0048] Figure 1 This is a schematic diagram of the structure of a general-purpose big data encrypted interactive comparison system provided in an embodiment of this application. Detailed Implementation

[0049] To enable those skilled in the art to better understand this solution, the technical solutions in the embodiments of this solution will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this solution, not all of them. Based on the embodiments of this solution, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this solution.

[0050] The term "comprising" and any other variations thereof in the specification, claims, and accompanying drawings of this invention mean "including but not limited to," and are intended to cover a non-exclusive inclusion, not limited to the examples listed herein. Furthermore, the terms "first" and "second," etc., are used to distinguish different objects, not to describe a specific order.

[0051] The implementation of this application will be described in detail below with reference to the specific accompanying drawings:

[0052] Figure 1 This is a schematic diagram of the structure of a general-purpose big data encrypted interactive comparison system provided in an embodiment of this application. (Refer to...) Figure 1 This general-purpose big data encrypted interactive comparison system includes:

[0053] Data acquisition module 10 is used to receive verification requests; the verification request contains at least one subject to be verified and at least one corresponding dimension to be verified.

[0054] The encryption method determination module 11 is used to determine the comparison rules of each verification dimension corresponding to each verification subject in the verification request, and to determine the homomorphic encryption method of each verification dimension based on the comparison rules of each verification dimension.

[0055] The data sending module 12 is used to send the homomorphic encryption method of each verification dimension corresponding to each verification subject to the verification device, so that the verification device can return the encrypted verification information; and to send each verification subject, the verification dimension corresponding to each verification subject, and the homomorphic encryption method of each verification dimension corresponding to each verification subject to the verification device, so that the verification device can return the encrypted verification information.

[0056] The data comparison module 13 is used to respond to receiving encrypted verification information sent by the device to be verified and encrypted verification information sent by the verification device, and to compare the information based on the verification information and the verification information to obtain the comparison result.

[0057] The data feedback module 14 is used to encrypt the comparison results and then feed them back to the device to be verified and the verification device.

[0058] In this embodiment, the data acquisition module 10 is responsible for receiving the verification request initiated by the party to be verified. The verification request should contain at least one subject to be verified and at least one dimension to be verified corresponding to each subject.

[0059] For example, if the party to be verified is an online freight platform, the platform needs to verify the fuel deduction information uploaded by its employees. The platform can initiate a verification request, which should include information on at least one employee, as well as the fuel amount, refueling time, or gas station number uploaded by each employee for verification purposes.

[0060] The encryption method determination module 11 can match the corresponding comparison rules and homomorphic encryption methods for each verification dimension of each subject based on the request received by the data acquisition module 10. More specifically, the general-purpose big data encrypted interactive comparison system also includes: a rule configuration storage module 15, used to store a comparison rule library; the comparison rule library contains comparison rules corresponding to each dimension to be verified. The encryption method determination module 11 can obtain the comparison rules corresponding to each verification dimension from the rule configuration storage module 15, and then determine the corresponding homomorphic encryption method based on the comparison rules. The information stored in the comparison rule library can be preset and can contain multiple templates from multiple industries, in which logical relationships and thresholds can be configured. For example, the deviation between refueling time and delivery time is ≤30 minutes, and the number of consumptions in the past year is ≥3 times.

[0061] In this embodiment, different dimensions of verification information have different comparison rules. For example, verifying whether the fuel consumption amount is consistent requires an equality comparison rule, while verifying whether the total fuel consumption amount meets the standard requires an addition operation rule. Different homomorphic encryption methods support different types of operations, and the ciphertext lengths after encryption vary, resulting in different encryption and computational efficiencies. For instance, some homomorphic encryption methods only support addition operations, and the ciphertext after encryption typically consists of two large integers, with a simple structure and no additional noise expansion. Hierarchical homomorphic encryption supports mixed addition, subtraction, and multiplication operations, and the ciphertext after encryption requires carrying a noise polynomial and dimension parameters. Fully homomorphic encryption can adapt to complex operations such as floating-point numbers, and the ciphertext contains an extended polynomial, noise refresh parameters, and encoded information, resulting in the longest ciphertext length. Therefore, a suitable homomorphic encryption method can be matched for each dimension to be verified, avoiding comparison failures due to incompatibility between the encryption method and the comparison rules, while simultaneously ensuring privacy and computational efficiency.

[0062] Specifically, for each dimension to be verified:

[0063] If the comparison rule for the dimension to be verified is addition and non-floating-point arithmetic, then the homomorphic encryption method of the dimension to be verified is determined to be a partially homomorphic encryption method.

[0064] If the comparison rule of the dimension to be verified is a mixture of addition and multiplication operations and is a non-floating-point operation, then the homomorphic encryption method of the dimension to be verified is determined to be a hierarchical homomorphic encryption method.

[0065] If the comparison rule for the dimension to be verified is floating-point arithmetic, then the homomorphic encryption method for the dimension to be verified is determined to be a fully homomorphic encryption method.

[0066] In this embodiment, for dimensions that only require determining equality, such as fuel consumption consistency verification, the core relies on basic numerical comparison logic, and a partial homomorphic encryption method can be selected accordingly to reduce computational complexity while meeting the ciphertext comparison requirements. For dimensions that require addition operations, such as total fuel consumption compliance verification, if integer operations are involved, a partial homomorphic encryption method can also be used to balance computational speed and security. If the comparison rules involve mixed addition and multiplication operations, such as cost sharing ratio verification in some scenarios, a hierarchical homomorphic encryption method should be selected to support ciphertext processing for multiple types of operations. If floating-point operations are involved, such as precise fuel consumption accumulation verification with decimals, a fully homomorphic encryption method should be used to ensure the accuracy of ciphertext comparison in complex computational scenarios.

[0067] In this embodiment, the device to be verified refers to the information receiving and sending device designated by the party to be verified, such as the computer in the finance department of the online freight platform. Correspondingly, the verification device refers to the information receiving and sending device designated by the verifier, such as the computer in the information management department corresponding to the gas station's head office.

[0068] Since the verification request is sent by the party to be verified, meaning the party to be verified can know the various entities to be verified, the data sending module 12 can send back the homomorphic encryption method for each dimension to be verified corresponding to each entity to be verified, so that the device to be verified can send back the encrypted verification information. However, since the verifier cannot know the entity information to be verified, the data sending module 12 can send back the various entities to be verified, the dimensions to be verified corresponding to each entity, and the homomorphic encryption method for each dimension to be verified, so that the verification device can send back the encrypted verification information.

[0069] After receiving the encrypted verification information sent by the device to be verified and the encrypted verification information sent by the verification device, the data comparison module 13 can perform information comparison based on the verification information, the verification information, and the comparison rules for each verification dimension to obtain the comparison result. The information comparison process does not require decryption; it can be achieved by relying on the ciphertext operation characteristics of homomorphic encryption.

[0070] In one embodiment of this application, the data comparison module 13 is specifically used for:

[0071] For each dimension of the same subject to be verified, extract the ciphertext to be verified and the verification ciphertext corresponding to that dimension; according to the homomorphic encryption method corresponding to that dimension, call the appropriate ciphertext operation interface to perform the operation corresponding to the comparison rule on the ciphertext to be verified and the verification ciphertext; match the operation result with the preset benchmark ciphertext corresponding to that dimension to generate the sub-comparison result of that dimension to be verified.

[0072] The comparison result is obtained based on the sub-comparison results of all dimensions to be verified of the subject to be verified.

[0073] In this embodiment, focusing on the same subject to be verified, two sets of corresponding ciphertexts are identified for each dimension to be verified. For example, the ciphertext to be verified is the encrypted data of that dimension from the device to be verified (such as the employee's encrypted refueling amount). The ciphertext to be verified is the actual data of that dimension from the device to be verified (such as the gas station system) (such as the gas station's encrypted actual refueling amount for the employee). Based on the homomorphic encryption method corresponding to that dimension, a specially adapted ciphertext operation interface is called to perform operations on the two sets of ciphertexts according to the preset comparison rules.

[0074] The preset baseline ciphertext is the encryption result corresponding to a predefined comparison standard. For example, a gas station system encrypts the refueling amount A as E(A), and an online freight platform encrypts the reimbursement amount B as E(B). The system calculates the ciphertext difference E(AB). If the result is E(0), the amounts are considered to be the same, and no decryption is required throughout the process. Here, E(0) is the preset baseline ciphertext. This process is essentially the process of calculating whether the values ​​are equal, which can be implemented based on addition operations.

[0075] In this embodiment, the final result is considered true and valid only if all dimension sub-results pass; otherwise, the final result is considered invalid.

[0076] Specifically, when comparing information, the data comparison module 13 can first split the encrypted data into two sets according to the combination of "subject to be verified + dimension to be verified," ensuring that the ciphertext of the same dimension for the same subject corresponds one-to-one. For example, the ciphertext of "fuel amount" to be verified for employee C only matches the verification ciphertext of "fuel amount" for employee C in the gas station system. Subsequently, for the comparison rules of each dimension, such as "equal values," "range meets the standard," and "sum verification," the ciphertext operation interface adapted to the homomorphic encryption method of that dimension is called. For example, the addition operation interface corresponding to partial homomorphic encryption or the floating-point comparison interface corresponding to full homomorphic encryption directly performs the corresponding operation on the two sets of ciphertext.

[0077] In this embodiment, the homomorphic encryption methods invoked for "equal values", "range met", and "sum verification" can be as follows:

[0078] For the dimension of "equal numerical values", the corresponding homomorphic encryption method can be either partial homomorphic encryption or full homomorphic encryption, depending on whether floating-point numbers may be involved in the specific calculation. For example, for the calculation of equal numerical values ​​of refueling amounts, floating-point numbers may be involved, so the corresponding encryption method should be determined as full homomorphic encryption. If the calculation of equal numerical values ​​of the number of refueling vehicles does not involve floating-point numbers, the corresponding encryption method can be determined as partial homomorphic encryption.

[0079] For the "scope compliance" dimension, the corresponding homomorphic encryption method can be hierarchical homomorphic encryption or fully homomorphic encryption, depending on whether floating-point numbers are involved in the specific calculation. Taking the aforementioned embodiment as an example, the gas station system encrypts the refueling amount A as E(A), and the online freight platform encrypts the reimbursement amount B as E(B). If the difference in amounts does not exceed a preset amount C, the scope compliance is deemed met, and the gas station system can encrypt the preset amount C as E(C). This judgment logic is to judge |AB|≤C, which is equivalent to (AB). 2 ≤C 2 That is, the final judgment is E((AB)). 2 -C 2 Does E((AB)) belong to the preset set of non-positive numerical encryption bases? 2 -C 2 If the value of an item belongs to the benchmark set, then the difference in amount is determined to be no more than C, and the range meets the standard; otherwise, it does not meet the standard. Wherein, E((AB) 2 -C 2 )=E(AB)×E(AB)-E(C)×E(C), the amount of fuel may involve floating-point numbers, so for the range of fuel amount that meets the standard, the corresponding homomorphic encryption method can be fully homomorphic encryption.

[0080] Similarly, for the "range compliance" dimension, if the online freight platform stipulates that the deviation between the refueling time uploaded by the employee and the refueling time provided by the gas station must not exceed 60 seconds (in this embodiment, the default time precision is seconds), floating-point numbers will not be involved. Therefore, for the range compliance of the refueling time dimension, the corresponding homomorphic encryption method can be hierarchical homomorphic encryption. The judgment method of the homomorphic encryption method corresponding to the "sum verification" dimension is similar, and its essence is the same as the calculation method of the "numerical equality" dimension, which will not be repeated in this embodiment.

[0081] After the operation is completed, the encrypted result is matched with the preset baseline encrypted text for that dimension. For example, if the baseline encrypted text for the "equality rule" is "0", it means that the difference between the two sets of encrypted text is 0, indicating a match. This generates a sub-alignment result for the dimension to be verified. Finally, the sub-alignment results for all dimensions of the same subject to be verified are summarized to form the complete alignment result for that subject. If all dimension sub-results meet the requirements, the overall result is considered verified. If any dimension sub-result fails to meet the requirements, the specific failing dimension and the type of deviation are marked to ensure that the alignment results are accurate and traceable.

[0082] Throughout the entire process, whether it is the information to be verified, the verification information, or the intermediate data in the calculation process, it exists in encrypted form. Neither the system nor any third party can obtain the original plaintext. This not only fulfills the core requirement of data comparison but also fundamentally prevents the possibility of privacy leakage.

[0083] The data feedback module 14 can feed back the comparison results to the device to be verified and the verification device.

[0084] As can be seen from the above, in the entire data interaction and comparison process of this embodiment, from the feedback information from the device to be verified and the verification device, to the information comparison by the data comparison module 13, and then to the feedback of the comparison results by the data feedback module 14, all data exists in encrypted form. The device to be verified and the verification device encrypt the data according to the received homomorphic encryption method before feeding it back. The data comparison module 13 relies on the ciphertext operation characteristics of homomorphic encryption to complete the comparison without decrypting the original information. The data feedback module 14 also encrypts the comparison results before feeding them back, fundamentally blocking the possibility of privacy leakage during the data interaction and comparison process, and effectively protecting the sensitive information of enterprises and users. In this embodiment, the encryption method determination module 11 combines the comparison rule library preset in the rule configuration storage module 15, which covers multiple industries and templates and is configured with logical relationships and thresholds, to accurately match the appropriate homomorphic encryption method for each verification dimension of each subject to be verified. This avoids the problem of comparison failure due to incompatibility between the encryption method and the comparison rules, and ensures the accuracy and effectiveness of data comparison in different verification scenarios.

[0085] In this embodiment, different homomorphic encryption methods differ in the length of the encrypted ciphertext, encryption efficiency, and computational efficiency. Therefore, a suitable homomorphic encryption method is selected as needed based on the comparison rules of the dimension to be verified. While satisfying privacy and security, it also takes into account computational efficiency, avoiding the problem of decreased computational performance caused by uniformly using high-complexity encryption methods, and improving the overall operating efficiency of the system.

[0086] In one embodiment of this application, the data comparison module 13 is specifically used for:

[0087] In response to the total amount of data of the information to be verified and the verification information received within a preset time period exceeding a preset data volume threshold, the block size and the number of parallel threads are optimized.

[0088] The information to be verified is compared with the verification information based on the optimized block size and the optimized number of parallel threads.

[0089] In this embodiment, the preset time period can be a short period, such as 10 seconds, 30 seconds, or 1 minute. When the total amount of data received within the preset time period, including the information to be verified and the verification information, exceeds the preset data volume threshold, it indicates that the system has received a large amount of comparison information in a short period of time. In this case, to avoid system lag and memory overflow caused by comparing massive amounts of data at once, and to ensure comparison efficiency, the block size and the number of parallel threads can be optimized. The preset data volume threshold can be preset based on experience, such as system hardware configuration.

[0090] In this embodiment, massive amounts of encrypted data are divided into several small data blocks, the size of which is the block size. This optimization ensures that the size of each block is adapted to the system's processing capacity, preventing both excessively large blocks that lead to long processing times and excessively small blocks that result in high management costs. The number of parallel threads refers to the multiple processing threads started simultaneously by the system, each responsible for processing one or more data blocks. This optimization maximizes the utilization of hardware resources and avoids the inefficiency of single-threaded serial processing.

[0091] In this embodiment, in response to the total amount of data of the information to be verified and the verification information received within a preset time period being less than or equal to a preset data amount threshold, the information to be verified and the verification information are compared according to the system default block size and the system default number of parallel threads.

[0092] As can be seen from the above, when the total amount of data received within a preset time period, including the information to be verified and the verification information, exceeds a preset data volume threshold, it indicates that the system is facing a massive data processing challenge. Comparing these massive amounts of encrypted data all at once can easily lead to system lag, affecting overall operational smoothness, and may even cause memory overflow issues, resulting in system crashes. In this embodiment, the data comparison module 13 optimizes the block size and the number of parallel threads, reasonably dividing the massive encrypted data into several small data blocks, avoiding the pressure caused by processing too much data at once, and ensuring the stable operation of the system when processing massive amounts of data.

[0093] In one embodiment of this application, the information to be verified contains multiple ciphertexts to be verified; the verification information contains multiple verification ciphertexts.

[0094] Each ciphertext to be verified is obtained by the device to be verified for each dimension information to be verified for each subject to be verified, based on the homomorphic encryption method of that dimension information; the dimension to be verified is the dimension corresponding to that dimension information.

[0095] Each verification ciphertext is obtained by the verification device homomorphically encrypting the verification dimension information for each subject to be verified using the homomorphic encryption method of that dimension. The verification dimension information corresponding to each subject to be verified is obtained by querying each subject to be verified and its corresponding verification dimension.

[0096] In this embodiment, neither the information to be verified nor the verification information is a single ciphertext, but rather a collection of multiple ciphertexts, each corresponding to a specific subject and dimension combination. The device to be verified can encrypt the original dimension information using the aforementioned homomorphic encryption method for each dimension to be verified (e.g., the employee's refueling amount) for each subject to be verified (e.g., an employee). The verification device (e.g., a gas station system, or the party storing the real data) can first query the corresponding real dimension information from its own database based on the subject to be verified and the corresponding dimension. It then encrypts the queried real dimension information using the exact same homomorphic encryption method as the ciphertext to be verified, resulting in a verification ciphertext.

[0097] Data comparison module 13 is also specifically used for:

[0098] Determine the range of possible values ​​for the number of parallel threads;

[0099] The range of values ​​for the block size is determined based on the size of each ciphertext to be verified and the size of each ciphertext to be verified.

[0100] The solution space is determined based on the range of values ​​for the number of parallel threads and the range of values ​​for the block size;

[0101] Optimize block size and number of parallel threads based on solution space and fitness function.

[0102] In this embodiment, the range of the number of parallel threads can be determined by the system configuration. For example, based on the number of CPU cores, if the CPU has 8 cores, the number of threads can be set to a range of 2-8. This avoids excessive threads causing hardware resource contention, or insufficient threads failing to leverage the advantages of parallelism, ensuring that the number of threads is within the hardware's carrying capacity.

[0103] The range of the number of parallel threads can be determined based on the size of each ciphertext to be verified and the size of each ciphertext to be verified. The logic is that the block size must be able to accommodate a single ciphertext, cannot be smaller than the largest ciphertext, and cannot exceed the system's processing capacity, nor can it be larger than the largest data block that can be handled in a single run, to avoid invalid blocks or memory overflow. The solution space is the set of all possible combinations of block size and number of parallel threads, providing candidate data for subsequent optimization and avoiding blindly adjusting parameters.

[0104] In this embodiment, optimization algorithms such as particle swarm optimization or genetic algorithms can be used to optimize the number of parallel threads and the block size.

[0105] Taking the particle swarm optimization (PSO) algorithm as an example, each particle corresponds to a set of parameter combinations to be optimized, namely, block size S and number of parallel threads T. N particles are randomly generated in the solution space, and the (S, T) combination of each particle is a valid candidate in the solution space. The PSO algorithm iterates through the particles in the solution space. After each iteration, the fitness value of each particle is calculated based on its position and fitness function. The iteration stops when a preset number of iterations is reached or the difference between the fitness function values ​​is less than a preset difference for M consecutive iterations. The solution corresponding to the optimal position of the population at this point is taken as the optimized block size and the optimized number of parallel threads. In this embodiment, the solution space refers to the feasible region boundary and search range during the optimization of block size and number of parallel threads based on the PSO algorithm. The fitness function is an indicator that evaluates the quality of the particle's position after each iteration during the optimization of block size and number of parallel threads based on the PSO algorithm. In this embodiment, other parameters of the PSO algorithm, such as the learning factor and inertia weight, can be set to default values ​​or determined based on experience.

[0106] As can be seen from the above, in this embodiment, both the information to be verified and the verification information exist in the form of multiple sets of ciphertexts, and each ciphertext precisely corresponds to a specific subject + dimension combination. The device to be verified encrypts each dimension information of each subject using the homomorphic encryption method of that dimension to obtain the ciphertext to be verified; the verification device queries the actual dimension information from its own database based on the subject to be verified and the corresponding dimension, and obtains the verification ciphertext using the exact same homomorphic encryption method. This ensures that data comparison is performed between ciphertexts of the same subject and dimension, avoiding data comparison errors caused by dimension mismatch or subject confusion, and improving the accuracy of data comparison. In this embodiment, the range of block size is determined based on the size of each ciphertext to be verified and the size of each verification ciphertext. The block size must be able to accommodate a single ciphertext and cannot be smaller than the largest ciphertext, otherwise the block will be invalid; at the same time, it cannot exceed the system processing capacity and cannot be larger than the maximum data block that can be carried at one time, to avoid memory overflow. This ensures that the block size meets the basic requirements of data processing and adapts to the system's processing capacity, improving the stability and efficiency of the system when processing data.

[0107] In one embodiment of this application, the data comparison module 13 is further used for:

[0108] Determine the maximum and average ciphertext size for each ciphertext; each ciphertext includes the ciphertext to be verified and the ciphertext to be verified.

[0109] Set the maximum ciphertext size as the lower limit of the block size;

[0110] The upper limit of the block size is determined based on the average ciphertext size and the preset maximum memory capacity; the preset maximum memory capacity is the maximum memory that the system can provide for a single task.

[0111] In this embodiment, the maximum ciphertext size can be set as the lower limit of the block size to ensure that all ciphertext can be completely assigned to a single block. The upper limit of the block size can be determined by combining the average ciphertext size and the maximum memory capacity for processing a single task. The average ciphertext size reflects the typical size of most ciphertext, and using this as a reference allows the block size to adapt to the overall data volume. The maximum memory capacity is the maximum memory block size that the system can provide for a single task; exceeding this limit will lead to memory overflow, system lag, or crashes.

[0112] More specifically, in one embodiment of this application, the data comparison module 13 is further used for:

[0113] The size dispersion of the ciphertext is determined based on each ciphertext;

[0114] The first lower bound is determined based on the average ciphertext size and the dispersion of the ciphertext size.

[0115] The second lower bound is determined based on the maximum memory capacity and memory utilization coefficient;

[0116] The minimum value between the first and second lower limits is determined as the upper limit of the block size.

[0117] In this embodiment, the ciphertext size dispersion is used to characterize the degree of difference in the size of all ciphertexts. The greater the size difference, the higher the dispersion, indicating that the data size is more unbalanced and that it is more necessary to use upper limit constraints to avoid the blocks being too small.

[0118] The first lower bound is a minimum allowable value for the upper limit of block size. If the dispersion is high, it means that many ciphertexts deviate from the average. If the upper limit is too low, it will lead to blocks that are too small and the number of blocks will be too large, increasing management and computation costs. Therefore, the first lower bound will be relatively high. If the dispersion is low, most ciphertexts are close to the average, and the first lower bound can be relatively low, balancing block efficiency and number.

[0119] The formula for calculating the first lower limit can be: ,in, Indicates the first lower limit. Indicates the average ciphertext size. This represents the dispersion adjustment coefficient. This represents the standard deviation of the ciphertext size, used to measure the dispersion of the ciphertext size. The value can be set to 0.5-2.

[0120] The second lower bound is another minimum allowable value relative to the maximum block size. Its core purpose is to reserve system safety redundancy. The memory utilization coefficient is a system-preset safety ratio, such as 0.8, meaning only 80% of the maximum memory is used, preventing memory from being filled by block data, which could lead to stuttering or overflow. The second lower bound can be equal to the product of the maximum memory capacity and the memory utilization coefficient.

[0121] By comparing the first and second lower bounds, the smaller value is set as the upper limit of the final block size, so that the block size does not waste resources due to uneven data distribution, nor does it cause system risks due to exceeding memory redundancy.

[0122] In one embodiment of this application, the fitness function contains at least one of the following constraints:

[0123] Hardware resource constraints;

[0124] Operation time constraints;

[0125] Dependency constraints; Dependency constraints are used to constrain the allocation of multiple dimensions of encrypted data to the same subject to be verified to the same block and the same thread.

[0126] In this embodiment, hardware resource constraints can be used to ensure that the block size and the number of parallel threads do not exceed the actual carrying capacity of the system hardware. Computation time constraints can be used to ensure that the combination of block size and the number of parallel threads minimizes the total computation time. Dependency constraints can be used to ensure that multiple dimensions of encrypted data to be verified for the same subject are allocated to the same block and the same thread.

[0127] In this embodiment, the above-mentioned constraints can be set by the user. For example, the hardware resource constraint can be: the total memory usage of all parallel threads does not exceed the product of the total available memory of the system and the memory utilization threshold, and the memory utilization can be 0.8.

[0128] The computation time constraint can be: the total computation time does not exceed a preset time threshold. It should be noted that the total computation time depends on the block size and the number of parallel threads. Specifically, it can be determined based on historical data. The computation time corresponding to the combination with the highest similarity to the current block size and the current number of parallel threads in the historical data is taken as the current total computation time. In this embodiment, the block size and the number of parallel threads can be used as coordinates, and then similarity can be calculated using methods such as Euclidean distance or Manhattan distance. Alternatively, the block size and the number of parallel threads can be used as vectors, and the similarity can be calculated by calculating cosine similarity.

[0129] The dependency constraint term can be: if the ciphertext of each dimension of any subject to be verified is allocated to multiple blocks, and / or, the ciphertext blocks of each dimension of any subject to be verified are allocated to multiple threads, then the dependency constraint term takes the maximum value, which is used to restrict the dependency constraint term as a hard constraint condition.

[0130] As can be seen from the above, this embodiment determines the ciphertext size dispersion based on each ciphertext and determines the first lower limit based on the average ciphertext size and dispersion, taking into account the characteristics of the data itself. Ciphertext size dispersion reflects the degree of difference in the size of all ciphertexts. When the dispersion is high, it means that the data size is unbalanced, and many ciphertexts deviate from the average. In this case, setting the first lower limit higher can avoid the block size being too small and the number of blocks being too large due to the upper limit being too low. Conversely, when the dispersion is low, most ciphertexts are close to the average, and the first lower limit can be lower, thus balancing block efficiency and quantity, making the block strategy more reasonable. This embodiment determines the second lower limit based on the maximum memory capacity and memory utilization coefficient, and then determines the minimum value between the first and second lower limits as the upper limit of the block size, taking into account both uneven data distribution and reserving system security redundancy. The first lower bound constrains data characteristics, while the second lower bound constrains system memory resources. By taking the minimum value, the block size is ensured to avoid wasting resources due to uneven data distribution and preventing system risks caused by exceeding memory redundancy, thus optimizing the block partitioning strategy. The fitness function includes at least one constraint, such as hardware resource constraints, computation time constraints, and dependency constraints, which apply to the data comparison process. Hardware resource constraints ensure stable system operation, computation time constraints improve computational efficiency, and dependency constraints ensure the accuracy of data processing, thereby improving the overall effectiveness of data comparison from multiple aspects.

[0131] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.

Claims

1. A general-purpose big data encrypted interactive comparison system, characterized in that, include: The data acquisition module is used to receive verification requests; The verification request contains at least one subject to be verified and at least one corresponding dimension to be verified. The encryption method determination module is used to determine the comparison rules for each verification dimension corresponding to each verification subject in the verification request, and to determine the homomorphic encryption method for each verification dimension based on the comparison rules of each verification dimension. The data sending module is used to send the homomorphic encryption method of each verification dimension corresponding to each verification subject to the verification device, so that the verification device can return the encrypted verification information; and to send each verification subject, the verification dimension corresponding to each verification subject, and the homomorphic encryption method of each verification dimension corresponding to each verification subject to the verification device, so that the verification device can return the encrypted verification information. The data comparison module is used to respond to receiving encrypted verification information sent by the device to be verified and encrypted verification information sent by the verification device, and to perform information comparison based on the verification information and the verification information to obtain a comparison result. The data feedback module is used to encrypt the comparison result and then feed it back to the device to be verified and the verification device; The encryption method determination module is specifically used for: For each dimension to be verified: if the comparison rule for the dimension to be verified is addition and non-floating-point arithmetic, then the homomorphic encryption method for the dimension to be verified is determined to be a partially homomorphic encryption method; if the comparison rule for the dimension to be verified is a mixture of addition and multiplication and non-floating-point arithmetic, then the homomorphic encryption method for the dimension to be verified is determined to be a hierarchical homomorphic encryption method; if the comparison rule for the dimension to be verified is floating-point arithmetic, then the homomorphic encryption method for the dimension to be verified is determined to be a fully homomorphic encryption method.

2. The general-purpose big data encrypted interactive comparison system as described in claim 1, characterized in that, The data comparison module is specifically used for: In response to the total amount of data of the information to be verified and the verification information received within a preset time period exceeding a preset data amount threshold, the block size and the number of parallel threads are optimized. The information to be verified is compared with the information to be verified based on the optimized block size and the optimized number of parallel threads.

3. The general-purpose big data encrypted interactive comparison system as described in claim 2, characterized in that, The information to be verified contains multiple ciphertexts to be verified; the verification information contains multiple verification ciphertexts. Each ciphertext to be verified is obtained by the device to be verified for each dimension information to be verified for each subject to be verified, based on the homomorphic encryption method of that dimension information; the dimension to be verified is the dimension corresponding to that dimension information. Each verification ciphertext is obtained by the verification device homomorphically encrypting the verification dimension information for each subject to be verified using the homomorphic encryption method of that dimension. The verification dimension information corresponding to each subject to be verified is obtained by querying each subject to be verified and its corresponding verification dimension.

4. The general-purpose big data encrypted interactive comparison system as described in claim 3, characterized in that, The data comparison module is further used for: Determine the range of possible values ​​for the number of parallel threads; The range of values ​​for the block size is determined based on the size of each ciphertext to be verified and the size of each ciphertext to be verified. The solution space is determined based on the range of values ​​for the number of parallel threads and the range of values ​​for the block size; The block size and the number of parallel threads are optimized based on the solution space and fitness function.

5. The general-purpose big data encrypted interactive comparison system as described in claim 4, characterized in that, The data comparison module is further used for: Determine the maximum and average ciphertext size for each ciphertext; each ciphertext includes the ciphertext to be verified and the ciphertext to be verified. Set the maximum ciphertext size as the lower limit of the block size; The upper limit of the block size is determined based on the average ciphertext size and the preset maximum memory capacity.

6. The general-purpose big data encrypted interactive comparison system as described in claim 5, characterized in that, The data comparison module is further used for: The size dispersion of the ciphertext is determined based on each ciphertext; A first lower limit is determined based on the average ciphertext size and the ciphertext size dispersion. The second lower bound is determined based on the maximum memory capacity and memory utilization coefficient; The minimum value between the first and second lower limits is determined as the upper limit of the block size.

7. The general-purpose big data encrypted interactive comparison system as described in claim 4, characterized in that, The fitness function contains at least one of the following constraints: Hardware resource constraints; Operation time constraints; Dependency constraints; the dependency constraints are used to constrain the allocation of multiple unverified dimension ciphertext data of the same subject to the same block and the same thread.

8. The general-purpose big data encrypted interactive comparison system as described in claim 1, characterized in that, The data comparison module is specifically used for: For each dimension of the same subject to be verified, extract the ciphertext to be verified and the verification ciphertext corresponding to that dimension; according to the homomorphic encryption method corresponding to that dimension, call the appropriate ciphertext operation interface to perform the operation corresponding to the comparison rule on the ciphertext to be verified and the verification ciphertext; match the operation result with the preset benchmark ciphertext corresponding to that dimension to generate the sub-comparison result of that dimension to be verified. The comparison result is obtained based on the sub-comparison results of all dimensions to be verified of the subject to be verified.

9. The general-purpose big data encrypted interactive comparison system as described in claim 1, characterized in that, Also includes: The rule configuration storage module is used to store the comparison rule library; the comparison rule library contains the comparison rules corresponding to each dimension to be verified.

Citation Information

Patent Citations

  • Private data processing method, medium and electronic equipment

    CN116545773A

  • Supply management information determination system and method

    CN117077167A