An underground pipeline data privacy protection method based on homomorphic encryption
Patent Information
- Application Number
- CN202610869418.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-16
- Publication Date
- 2026-10-30
AI Technical Summary
[0005]因此,本发明提供了一种基于同态加密的地下管线数据隐私保护方法解决了跨单位地下管线协同查询中空间范围判断、属性条件筛选和统计聚合难以在同态加密状态下连续完成,以及统计输出难以由多个权属单位共同控制的问题
[0016]本发明有益效果为:通过地下管线字段值密文、地下管线字段比特密文、目标边界比特密文和密文比较电路的协同处理,使空间范围判断和属性条件筛选能够在不解密单条地下管线字段值的情况下完成,减少跨单位协同查询过程中明文字段值和明文筛选状态的暴露;通过联合密文筛选标志分别参与命中数量统计和字段值筛选,使地下管线命中数量统计密文与地下管线属性聚合密文的数据来源相互区分;通过多方门限解密方式恢复统计明文值,使统计输出由多个地下管线权属单位共同参与控制,兼顾地下管线数据协同利用和隐私保护需求。
Smart Images

Figure CN123020009A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data encryption technology, and in particular to a method for protecting the privacy of underground pipeline data based on homomorphic encryption. Background Technology
[0002] Against the backdrop of ever-increasing demands for refined management of urban infrastructure and safety governance of underground spaces, collaborative processing of underground pipeline data involving multiple ownership entities has become a crucial aspect of digital construction. To achieve cross-entity data exchange, querying, and statistics, conventional methods typically establish unified data structures, field expression standards, and transmission formats. This ensures that coordinates, pressure ratings, pipe diameters, laying dates, and material types of underground pipelines from different entities can be compatible and parsed within the same expression system. Furthermore, in multi-party data collaboration, existing methods generally employ encrypted transmission, access control, and permission-based mechanisms. This allows different entities to use data within their authorized scope without directly sharing original records, thus balancing data availability and security to a certain extent.
[0003] However, existing methods still have two limitations: First, in cross-unit collaborative processing, traditional encrypted transmission and controlled access methods mainly protect data security during transmission and storage. However, when performing cross-unit joint statistics, conditional filtering, or spatial range determination, plaintext intermediate results may still be generated and interacted, resulting in unclear data exposure boundaries during the collaborative computing phase. Second, when facing query requirements with both multi-dimensional attribute filtering and spatial constraints, conventional methods often require a single collaborating party to centrally execute the filtering logic. It is difficult for each unit to jointly control the filtering process, statistical process, and statistical output process, thus there is still room for improvement in terms of multi-party equal collaboration and secure and reliable data processing. Summary of the Invention
[0004] In view of the aforementioned existing problems, the present invention is proposed.
[0005] Therefore, this invention provides a method for protecting the privacy of underground pipeline data based on homomorphic encryption, which solves the problems that spatial range judgment, attribute condition filtering and statistical aggregation are difficult to be completed continuously under homomorphic encryption in cross-unit underground pipeline collaborative query, and that statistical output is difficult to be jointly controlled by multiple ownership units.
[0006] To solve the above-mentioned technical problems, the present invention provides the following technical solution: This invention provides a method for protecting the privacy of underground pipeline data based on homomorphic encryption. The method includes: performing format unification and integer representation on raw underground pipeline data from different ownership entities; performing fully homomorphic encryption on the integer-represented raw underground pipeline data to generate underground pipeline ciphertext codes; generating target boundary bit ciphertext based on the spatial range and attribute conditions proposed by different ownership entities; and generating spatial hit ciphertext flags and attribute hit ciphertext flags through a ciphertext comparison circuit; and generating... A joint ciphertext filtering flag is used to filter the ciphertext of underground pipeline field values, generating filtered underground pipeline ciphertext codes. Ciphertext statistical processing is performed on the joint ciphertext filtering flag and the filtered underground pipeline ciphertext codes to generate underground pipeline hit count ciphertext and underground pipeline attribute aggregate ciphertext. Based on a threshold decryption method involving multiple parties, joint decryption processing is performed on the underground pipeline hit count ciphertext and underground pipeline attribute aggregate ciphertext to generate underground pipeline hit count plaintext values and underground pipeline attribute aggregate plaintext values.
[0007] As a preferred embodiment of the homomorphic encryption-based underground pipeline data privacy protection method described in this invention, the following steps are included: unifying the format and integerizing the original underground pipeline data from different ownership entities. This involves unifying the format of the coordinates, pressure rating, diameter, laying date, and material type of the underground pipelines provided by different ownership entities, respectively, by specifying the coordinate units, pressure rating description methods, diameter value units, date recording methods, and material type description methods; and then integerizing the unified underground pipeline coordinates, pressure rating, diameter, laying date, and material type to form an integer representation of the underground pipeline data. The data includes coordinates, pressure rating, diameter, laying date, and material category of underground pipelines in integer form. Each underground pipeline ownership unit extracts the lower and upper bounds of the same type of underground pipeline field integers within its own unit, and these are collaboratively aggregated to form a field boundary record table. The field bit length is determined based on the lower and upper bounds of the field integers in the field boundary record table. The coordinates, pressure rating, diameter, laying date, and material category of underground pipelines in integer form are then expanded into field bit sequences according to their respective field bit lengths.
[0008] As a preferred embodiment of the homomorphic encryption-based underground pipeline data privacy protection method of the present invention, the step of performing a fully homomorphic encryption operation on the integer-expressed original underground pipeline data to generate underground pipeline ciphertext encoding includes: generating a public key, an evaluation key, and a decryption key share using a fully homomorphic encryption algorithm that supports ciphertext addition, ciphertext multiplication, and Boolean comparison circuit evaluation; performing a fully homomorphic encryption operation on the integer-form underground pipeline coordinates, integer-form underground pipeline pressure level, integer-form underground pipeline diameter, integer-form underground pipeline laying year, and integer-form underground pipeline material category using the public key to generate underground pipeline field value ciphertext; performing a fully homomorphic encryption operation on each bit value in the field bit sequence using the public key to generate underground pipeline field bit ciphertext; and forming the underground pipeline ciphertext encoding together with the underground pipeline field value ciphertext and the underground pipeline field bit ciphertext.
[0009] As a preferred embodiment of the homomorphic encryption-based underground pipeline data privacy protection method of the present invention, the step of generating target boundary bit ciphertext based on the spatial range and attribute conditions proposed by different ownership units includes: when different ownership units propose a query request for the spatial range of underground pipelines, converting the spatial boundary data submitted by the querying party into an integer lower bound and an integer upper bound of the target spatial range according to the same integerization method as the underground pipeline coordinates, and forming a spatial judgment field set based on the coordinate field names in the spatial boundary data; when different ownership units propose a query request for the attribute conditions of underground pipelines, converting the attribute condition boundary data submitted by the querying party into an integer lower bound and an integer upper bound of the target attribute according to the same integerization method as the underground pipeline pressure level, underground pipeline diameter, underground pipeline laying year, and underground pipeline material category, and forming an attribute condition field set based on the field names in the attribute condition boundary data; when the attribute condition field set includes an underground pipeline material category field, the target boundary boundary data is generated into a target boundary boundary. Both the lower bound of the target attribute and the upper bound of the target attribute are taken as the integer form of the underground pipeline material category after the same material category name submitted by the querying party is mapped to an integer. For each type of underground pipeline field involved in the query judgment, the target effective lower bound and the target effective upper bound are formed according to the target submission lower bound, the target submission upper bound, the field integer lower bound and the field integer upper bound in the field boundary record table. When the target effective lower bound is greater than the target effective upper bound, the interval hit ciphertext flag of this type of underground pipeline field is set to the miss state constant in the encrypted state. When the target effective lower bound is less than or equal to the target effective upper bound, the target effective lower bound and the target effective upper bound are offset according to the field integer lower bound to form a non-negative target lower bound value and a non-negative target upper bound value. The non-negative target lower bound value and the non-negative target upper bound value are expanded into a target lower bound bit sequence and a target upper bound bit sequence according to the field bit length, respectively. A fully homomorphic encryption operation is performed on each bit value in the target lower bound bit sequence and the target upper bound bit sequence to form the target lower bound bit ciphertext and the target upper bound bit ciphertext.
[0010] As a preferred embodiment of the homomorphic encryption-based underground pipeline data privacy protection method of the present invention, the step of generating spatial hit ciphertext flags and attribute hit ciphertext flags through a ciphertext comparison circuit includes, with the support of an evaluation key, comparing the underground pipeline field bit ciphertext, the target lower bound bit ciphertext, and the target upper bound bit ciphertext through a ciphertext comparison circuit to generate an interval hit ciphertext flag; the ciphertext comparison circuit includes a ciphertext comparison circuit not less than the target effective lower bound and a ciphertext comparison circuit not greater than the target effective upper bound; the ciphertext comparison circuit not less than the target effective lower bound generates a ciphertext flag not less than the target effective lower bound; the ciphertext comparison circuit not greater than the target effective upper bound generates a ciphertext flag not greater than the target effective upper bound. Ciphertext flags; perform homomorphic multiplication on ciphertext flags not less than the target's effective lower bound and ciphertext flags not greater than the target's effective upper bound to generate interval hit ciphertext flags; perform homomorphic multiplication on all coordinate field interval hit ciphertext flags belonging to the spatial judgment field set in the same underground pipeline record to generate spatial hit ciphertext flags; when the queryer does not specify any spatial range conditions, set the spatial hit ciphertext flags to the hit state constant in the encrypted state; perform homomorphic multiplication on all attribute field interval hit ciphertext flags belonging to the attribute condition field set in the same underground pipeline record to generate attribute hit ciphertext flags; when the queryer does not specify any attribute conditions, set the attribute hit ciphertext flags to the hit state constant in the encrypted state.
[0011] As a preferred embodiment of the homomorphic encryption-based method for protecting the privacy of underground pipeline data described in this invention, the step of generating a joint ciphertext filtering flag based on spatial hit ciphertext flags and attribute hit ciphertext flags includes, with the support of an evaluation key, performing homomorphic multiplication on the spatial hit ciphertext flags and attribute hit ciphertext flags of the same underground pipeline record to form a joint ciphertext filtering flag.
[0012] As a preferred embodiment of the homomorphic encryption-based underground pipeline data privacy protection method of the present invention, the step of performing ciphertext filtering on the ciphertext of underground pipeline field values according to the joint ciphertext filtering flag to generate the filtered underground pipeline ciphertext code includes, with the support of the evaluation key, performing homomorphic multiplication on the ciphertext of underground pipeline coordinate field values, underground pipeline pressure level field values, underground pipeline diameter field values, underground pipeline laying year field values, and underground pipeline material category field values respectively to form the filtered underground pipeline field value ciphertext; when the plaintext meaning of the joint ciphertext filtering flag is a hit state, the filtered underground pipeline field value ciphertext carries the integer value of the underground pipeline field; when the plaintext meaning of the joint ciphertext filtering flag is a miss state, the filtered underground pipeline field value ciphertext carries a zeroed field value; the filtered underground pipeline field value ciphertext forms the filtered underground pipeline ciphertext code.
[0013] As a preferred embodiment of the homomorphic encryption-based underground pipeline data privacy protection method of the present invention, the following steps are included: performing ciphertext statistical processing on the joint ciphertext filtering flags and the filtered underground pipeline ciphertext codes: With the support of the evaluation key, performing cumulative processing on the joint ciphertext filtering flags of all underground pipeline records in ciphertext state to generate underground pipeline hit count ciphertext; when the statistical output request submitted by the querying party contains field cumulative statistics, forming an attribute aggregation field set based on the field names listed in the field cumulative statistics; for each type of underground pipeline field in the attribute aggregation field set, performing ciphertext statistical processing on the filtering flags of all underground pipeline records... The encrypted values of the underground pipeline fields are then accumulated in encrypted state to generate the cumulative encrypted field data. When the statistical output request submitted by the querying party contains material category statistics, a material category statistics list is formed based on the material category names listed in the querying party's statistical output request, and a material category item encrypted count flag is formed based on the material category statistics list. The material category item encrypted count flags of all underground pipeline records under each material category are accumulated in encrypted state to generate the material category item quantity statistics encrypted text. The underground pipeline attribute aggregation encrypted text is formed by at least one of the cumulative encrypted field data and the material category item quantity statistics encrypted text.
[0014] As a preferred embodiment of the homomorphic encryption-based underground pipeline data privacy protection method of the present invention, the joint decryption process includes: compiling the underground pipeline hit count ciphertext, the field cumulative ciphertext of each underground pipeline field in the attribute aggregation field set, and the material category item count ciphertext into a list of ciphertexts to be decrypted according to the statistical output requirements submitted by the querying party; multiple underground pipeline ownership units each hold a decryption key share, which is formed by splitting the decryption key share by the fully homomorphic encryption algorithm during the key generation stage; each underground pipeline ownership unit participating in decryption uses its own decryption key share to perform a partial decryption operation on each ciphertext item in the list of ciphertexts to be decrypted, forming a partial decryption value of quantity, a partial decryption value of field cumulative, or a partial decryption value of material category.
[0015] As a preferred embodiment of the homomorphic encryption-based underground pipeline data privacy protection method of the present invention, the joint decryption processing further includes performing quantity verification on a plurality of partial decryption values formed for the same ciphertext item; when the quantity of the collected partial decryption values for the same ciphertext item reaches a threshold quantity, performing merging processing on the plurality of partial decryption values according to the threshold merging rule matched with the fully homomorphic encryption algorithm, to recover the corresponding plaintext value; the threshold quantity is an integer not less than two and not more than the total number of underground pipeline ownership units participating in threshold decryption; performing merging processing on a plurality of quantity partial decryption values formed by the underground pipeline hit quantity statistics ciphertext, to generate the underground pipeline hit quantity plaintext value; performing merging processing on a plurality of field cumulative partial decryption values formed by the field cumulative ciphertext, to generate the field cumulative plaintext value; performing merging processing on a plurality of material category sub-item partial decryption values formed by the material category sub-item quantity statistics ciphertext, to generate the material category sub-item quantity plaintext value; the underground pipeline attribute aggregation plaintext value is formed by at least one of the field cumulative plaintext value and the material category sub-item quantity plaintext value.
[0016] The beneficial effects of the present invention are: through the collaborative processing of the underground pipeline field value ciphertext, the underground pipeline field bit ciphertext, the target boundary bit ciphertext and the ciphertext comparison circuit, the spatial range judgment and attribute condition screening can be completed without decrypting the single underground pipeline field value, reducing the exposure of plaintext field values and plaintext screening states in the process of cross-unit collaborative query; the joint ciphertext screening flag participates in hit quantity statistics and field value screening respectively, so that the data sources of the underground pipeline hit quantity statistics ciphertext and the underground pipeline attribute aggregation ciphertext are distinguished from each other; the statistical plaintext value is recovered through the multi-party threshold decryption mode, so that the statistical output is jointly controlled by a plurality of underground pipeline ownership units, and the requirements of collaborative utilization and privacy protection of underground pipeline data are both satisfied. Brief Description of the Drawings
[0017] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the drawings that need to be used in the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention, and for those of ordinary skill in the art, other drawings can also be obtained based on these drawings without any creative effort.
[0018] Figure 1 This is the flow chart of the homomorphic encryption-based underground pipeline data privacy protection method.
[0019] Figure 2 This is the flow chart of underground pipeline ciphertext encoding construction.
[0020] Figure 3 This is the flow chart of target boundary bit ciphertext and joint ciphertext screening.
[0021] Figure 4This is a flowchart for underground pipeline encrypted data statistics and threshold decryption. Detailed Implementation
[0022] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0023] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.
[0024] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in different places in this specification does not necessarily refer to the same embodiment, nor is it a single or selective embodiment that is mutually exclusive with other embodiments.
[0025] Reference Figures 1-4 This is one embodiment of the present invention, which provides a method for protecting the privacy of underground pipeline data based on homomorphic encryption, including the following steps: S1. Standardize and integerize the original underground pipeline data from different ownership units, and perform fully homomorphic encryption on the integerized original underground pipeline data to generate underground pipeline ciphertext codes.
[0026] Furthermore, within each underground pipeline ownership unit, the original underground pipeline data held by the unit is processed locally. During the local processing, no original records are exposed to the outside world. The format is standardized, expressed as integers, and encrypted only within each underground pipeline ownership unit.
[0027] The original data of underground pipelines includes the coordinates of the underground pipelines, the pressure rating of the underground pipelines, the diameter of the underground pipelines, the year of laying the underground pipelines, and the material type of the underground pipelines.
[0028] The coordinates of underground pipelines include at least one coordinate component; when the coordinates of underground pipelines are expressed in planar coordinates, the coordinates of underground pipelines include horizontal coordinate components and vertical coordinate components; when the coordinates of underground pipelines are expressed in three-dimensional coordinates, the coordinates of underground pipelines include horizontal coordinate components, vertical coordinate components and elevation coordinate components; each coordinate component participates in integer expression and fully homomorphic encryption operation as an independent underground pipeline coordinate field.
[0029] Furthermore, the format of raw underground pipeline data from different ownership entities is standardized.
[0030] For underground pipeline coordinates, pressure ratings, pipe diameters, laying years, and material categories provided by different ownership entities, the formats for coordinate units, pressure rating descriptions, pipe diameter units, year recording methods, and material category descriptions are standardized to ensure that the original underground pipeline data from different ownership entities have a consistent expression in terms of recording units, numerical precision, and field description methods.
[0031] When different ownership units use different coordinate representations, the coordinates of underground pipelines will be unified to the same coordinate axis direction, the same unit length, and the same decimal precision; when different ownership units use different pressure level identification methods, the pressure levels of underground pipelines will be unified to the same graded expression method; when different ownership units use different pipe diameter representation methods, the pipe diameters of underground pipelines will be unified to the same unit expression method; when different ownership units use different age representation methods, the laying age of underground pipelines will be unified to the same year expression format; when different ownership units use different material category coding methods, the material categories of underground pipelines will be unified to the same coding format.
[0032] Furthermore, the original underground pipeline data, after being standardized in format, is converted into an integer representation.
[0033] The coordinates, pressure ratings, diameters, laying dates, and material types of underground pipelines after standardization are expressed as integers.
[0034] The standardized underground pipeline coordinates are converted to integers by eliminating decimal points; the standardized pressure ratings are converted to integers using discrete sequential numbering; the standardized pipeline diameters are converted to integers by eliminating decimal points; the standardized pipeline laying dates are directly used as integers; and the standardized underground pipeline material categories are mapped to integers according to a uniformly selected category sequence. For example, steel is mapped to integer 1, cast iron to integer 2, and plastic to integer 3. Each underground pipeline material category in the uniformly selected category sequence corresponds to a unique integer representation. The integer underground pipeline material categories are used to identify the material category name and do not indicate the order of size between different underground pipeline material categories.
[0035] The integer representation method used should be consistent across all underground pipeline ownership units to ensure that the original data of each type of underground pipeline has a unified representation after integer representation.
[0036] Furthermore, the field bit length is determined according to the underground pipeline field category.
[0037] For each type of underground pipeline field, after standardizing the format and converting it to integer representation, the minimum and maximum integer values are extracted from the integer values of similar underground pipeline fields participating in this collaborative processing. The minimum integer value is recorded as the lower bound of the field integer in the field boundary record table, and the maximum integer value is recorded as the upper bound of the field integer in the field boundary record table. The field boundary record table is formed by each underground pipeline ownership unit after extracting the lower and upper bounds of the field integers of similar underground pipeline fields within its own unit, and then collaboratively summarizing them. It is used to record the global lower and upper bounds of the field integers for each type of underground pipeline field within the scope of this collaborative processing.
[0038] When the integer value of the underground pipeline field contains a value less than zero, the integer value of the underground pipeline field is offset according to the lower bound of the field integer, resulting in a non-negative integer value, represented as: ; in, This indicates the underground pipeline record number, used to distinguish different underground pipeline records; This indicates the category number of the underground pipeline field, used to distinguish underground pipeline coordinates, underground pipeline pressure rating, underground pipeline diameter, underground pipeline laying year, and underground pipeline material category; Indicates the first The first underground pipeline record Integer values for the underground pipeline field; Indicates the first The lower bound of the underground pipeline field in the field boundary record table; Indicates the first The first underground pipeline record The non-negative integer value of the underground pipeline field after offset processing.
[0039] The range of values for a field is calculated based on its lower and upper integer bounds, and is expressed as follows: ; in, Indicates the first The range of values that can be taken for the "underground pipeline" field; Indicates the first The upper bound of the field integer in the field boundary record table for the underground pipeline field.
[0040] The field bit length is determined based on the range of field values; the range of field values plus one indicates the number of integer values that can be covered between the lower and upper bounds of the field integers. The field bit length is expressed as: ; in, Indicates the first The field bit length of the underground pipeline field; This indicates the operation of finding the maximum value. This indicates the minimum possible value for the field's bit length. This indicates the rounding up operation; Represents logarithmic operations to the base 2; Indicates the first The number of integer values that the underground pipeline field can cover between the lower bound and the upper bound of the field's integer values.
[0041] When the integer value of the underground pipeline field contains a value less than zero, the non-negative integer value is expanded into a field bit sequence according to the field bit length; when the integer value of the underground pipeline field does not contain a value less than zero, the integer value of the underground pipeline field is expanded into a field bit sequence according to the field bit length. Each bit in the field bit sequence is either 0 or 1, and the field bit sequence can uniquely represent the field value participating in the evaluation of the ciphertext comparison circuit.
[0042] Furthermore, a fully homomorphic encryption algorithm based on lattice cryptography is used to generate public keys, evaluation keys, and decryption key shares. The fully homomorphic encryption algorithm employs an integer plaintext space to encode integer values of underground pipeline fields, field bit sequences, hit state constants, and miss state constants; the plaintext modulus of the integer plaintext space is an integer greater than the maximum cumulative value of the underground pipeline field, the maximum cumulative value of the number of hits, and the maximum cumulative value of the number of material category items. The public key is used to encrypt the integer values of the underground pipeline fields and the field bit sequences; the evaluation key is used to perform homomorphic addition, homomorphic multiplication, ciphertext comparison circuit evaluation (not less than the target's effective lower bound), ciphertext comparison circuit evaluation (not greater than the target's effective upper bound), and ciphertext equivalence comparison circuit evaluation in the ciphertext state; the decryption key shares are held separately by multiple underground pipeline ownership units.
[0043] The fully homomorphic encryption algorithm selected supports precise integer arithmetic and Boolean comparison circuit evaluation, including BFV-type, BGV-type, or TFHE-type fully homomorphic encryption algorithms. When performing ciphertext multiplication and ciphertext comparison circuit evaluation, the ciphertext modulus chain and noise budget are set according to the number of ciphertext comparison circuits not less than the target's effective lower bound, not greater than the target's effective upper bound, the ciphertext equivalence comparison circuit, and the number of multiplication layers required for ciphertext accumulation processing. After ciphertext multiplication, relinearization is performed; if the noise budget is insufficient to complete the current ciphertext comparison circuit evaluation or ciphertext accumulation processing, bootstrapping is performed.
[0044] Furthermore, a fully homomorphic encryption operation is performed on the integer form of the underground pipeline field value to generate the ciphertext of the underground pipeline field value; a fully homomorphic encryption operation is also performed on each bit value in the field bit sequence to generate the ciphertext of the underground pipeline field bits; the ciphertext of the underground pipeline field value and the ciphertext of the underground pipeline field bits together constitute the underground pipeline ciphertext code. The ciphertext of the underground pipeline field value is used to store the integer value of the underground pipeline field, and the ciphertext of the underground pipeline field bits is used to store the value of the underground pipeline field at each bit.
[0045] The encrypted value of the underground pipeline field is represented as: ; in, Indicates the first The first underground pipeline record Ciphertext of underground pipeline field values; Indicates using public key A fully homomorphic encryption function used as an encryption parameter; This represents the public key generated by the fully homomorphic encryption algorithm.
[0046] The underground pipeline field is represented in bit ciphertext as follows: ; in, Indicates the first The first underground pipeline record The value of the underground pipeline field is in the first... The field ciphertext is located at each bit position; Indicates the bit number, used to distinguish different bits in the field bit sequence; Indicates the first The first underground pipeline record The field bit sequence of the underground pipeline field value in the first position The bit value at each bit position.
[0047] When the underground pipeline field value is offset to form a non-negative integer value, the non-negative integer value is first expanded into a field bit sequence according to the field bit length, and then a fully homomorphic encryption operation is performed on each bit value in the field bit sequence to form the field bit ciphertext; when the underground pipeline field value does not require offset processing, the integer underground pipeline field value is first expanded into a field bit sequence according to the field bit length, and then a fully homomorphic encryption operation is performed on each bit value in the field bit sequence to form the field bit ciphertext.
[0048] By synchronously forming the ciphertext of underground pipeline field values and the ciphertext of underground pipeline field bits, the integer values of underground pipeline fields can be stored in the ciphertext state, and the bit values of underground pipeline fields can participate in the evaluation of the comparison circuit in the ciphertext state. This allows the original underground pipeline data to form ciphertext codes that can participate in ciphertext calculation without exposing the plaintext content.
[0049] S2. Based on the spatial range and attribute conditions proposed by different ownership units, generate target boundary bit ciphertext, and generate spatial hit ciphertext flags and attribute hit ciphertext flags through ciphertext comparison circuit.
[0050] Furthermore, when different ownership entities submit requests to query the spatial extent of underground pipelines, the spatial boundary data submitted by the querying party is converted into an integer lower bound and an integer upper bound of the target spatial extent, using the same coordinate unit, coordinate axis direction, decimal precision, and integer conversion method as the coordinates of the underground pipelines.
[0051] When underground pipeline coordinates are expressed using planar coordinates, the lower boundary of the target spatial range includes both the lower boundary of the horizontal coordinates and the lower boundary of the vertical coordinates, while the upper boundary of the target spatial range includes both the upper boundary of the horizontal coordinates and the upper boundary of the vertical coordinates. When underground pipeline coordinates are expressed using three-dimensional coordinates, the lower boundary of the target spatial range also includes the lower boundary of the elevation coordinates, and the upper boundary of the target spatial range also includes the upper boundary of the elevation coordinates.
[0052] Based on the coordinate field names in the spatial boundary data submitted by the querying party, a spatial judgment field set is formed. When the spatial boundary data contains both horizontal and vertical coordinate boundaries, the horizontal and vertical coordinate fields are recorded in the spatial judgment field set; when the spatial boundary data also contains elevation coordinate boundaries, the elevation coordinate field is recorded in the spatial judgment field set.
[0053] Furthermore, when different ownership entities submit requests for querying underground pipeline attribute conditions, the attribute condition boundary data submitted by the querying party is converted into integer form for the target attribute lower bound and target attribute upper bound, using the same integerization method as for underground pipeline pressure level, underground pipeline diameter, underground pipeline laying year, and underground pipeline material category. The target attribute lower bound and target attribute upper bound are used to limit at least one attribute field among underground pipeline pressure level, underground pipeline diameter, underground pipeline laying year, and underground pipeline material category. When the underground pipeline material category is used as an attribute field in the attribute condition query, both the target attribute lower bound and target attribute upper bound are taken as the integer form of the underground pipeline material category obtained by integerizing the same material category name submitted by the querying party.
[0054] When the attribute condition boundary data submitted by the querying party contains multiple underground pipeline material categories, material category attribute conditions with the same lower and upper bound values for the target attribute are formed for each underground pipeline material category, and the interval hit ciphertext flags formed by the attribute conditions of each material category are combined in the ciphertext state.
[0055] Based on the field names in the attribute condition boundary data submitted by the querying party, an attribute condition field set is formed. If the attribute condition boundary data includes a pressure level condition, the underground pipeline pressure level field is added to the attribute condition field set; if the attribute condition boundary data includes a pipe diameter condition, the underground pipeline pipe diameter field is added to the attribute condition field set; if the attribute condition boundary data includes a laying year condition, the underground pipeline laying year field is added to the attribute condition field set; if the attribute condition boundary data includes a material category condition, the underground pipeline material category field is added to the attribute condition field set.
[0056] Furthermore, for each type of underground pipeline field involved in the query judgment, a target submission lower bound and a target submission upper bound are first formed based on the spatial boundary data or attribute condition boundary data submitted by the querying party. The target submission lower bound represents the lower boundary formed after the boundary data submitted by the querying party has been formatted and expressed as integers; the target submission upper bound represents the upper boundary formed after the boundary data submitted by the querying party has been formatted and expressed as integers.
[0057] The target's effective lower bound is formed by taking the larger of the lower bound of the target submission and the lower bound of the field integers in the field boundary record table; the target's effective upper bound is formed by taking the smaller of the upper bound of the target submission and the upper bound of the field integers in the field boundary record table, as shown below: ; ; in, Indicates the first The target of the underground pipeline field is committed to a lower bound. Indicates the first The effective lower bound of the target field for underground pipelines; Indicates the first The target of the underground pipeline field is committed to an upper bound. Indicates the first The effective upper bound of the target field for the underground pipeline category; This indicates the minimum value operation.
[0058] When the effective lower bound of the target is greater than the effective upper bound of the target, the target range submitted by the querier does not intersect with the range of integer values of the field in the field boundary record table. The interval hit ciphertext flag of this type of underground pipeline field is set as the miss state constant in the encrypted state. The miss state constant is formed by encrypting the plaintext constant 0 by the fully homomorphic encryption function, and the target boundary bit sequence expansion and ciphertext comparison circuit evaluation of this type of underground pipeline field are stopped.
[0059] When the effective lower bound of the target is less than or equal to the effective upper bound of the target, the effective lower bound and the effective upper bound of the target together form the effective range of the target that can participate in the ciphertext comparison; then, offset processing is performed according to the integer lower bound of the field to form a non-negative target lower bound value and a non-negative target upper bound value, represented as follows: ; ; in, Indicates the first The non-negative target lower bound value for the underground pipeline field; Indicates the first The upper bound of the non-negative target for the underground pipeline field.
[0060] Expand the non-negative target lower bound value and the non-negative target upper bound value into a target lower bound bit sequence and a target upper bound bit sequence respectively according to the field bit length. Then, perform a fully homomorphic encryption operation on each bit value in the target lower bound bit sequence and the target upper bound bit sequence to form the target lower bound bit ciphertext and the target upper bound bit ciphertext, represented as: ; ; in, Indicates the first The non-negative target lower bound of the underground pipeline field is in the first... The target lower bound bit ciphertext at 1 bit position; Indicates the first The non-negative target lower bound of the underground pipeline field is in the first... The bit value at each bit position; Indicates the first The non-negative target upper bound of the underground pipeline field is at the 1st The target upper bound bit ciphertext at each bit position; Indicates the first The non-negative target upper bound of the underground pipeline field is at the 1st The bit value at each bit position.
[0061] Furthermore, with the support of the evaluation key, the ciphertext comparison circuit compares the ciphertext of the underground pipeline field, the ciphertext of the target lower bound, and the ciphertext of the target upper bound to generate an interval hit ciphertext flag.
[0062] The ciphertext comparison circuit includes a ciphertext comparison circuit that is not less than the target's effective lower bound and a ciphertext comparison circuit that is not greater than the target's effective upper bound. The ciphertext comparison circuit that is not less than the target's effective lower bound is used to determine whether the underground pipeline field value is greater than or equal to the target's effective lower bound; the ciphertext comparison circuit that is not greater than the target's effective upper bound is used to determine whether the underground pipeline field value is less than or equal to the target's effective upper bound.
[0063] The ciphertext comparison circuit compares the ciphertext of the field bits and the ciphertext of the target boundary bits sequentially from the most significant bit to the least significant bit. During the comparison, it first checks if the higher-order bits are the same; if they are, it continues to compare the next bit; when a different bit is encountered for the first time, the comparison result is formed based on the relationship between the two bit values. The comparison result is output in ciphertext state, with a plaintext meaning of 0 or 1.
[0064] The interval hit ciphertext flag is represented as: ; in, Indicates the first The first underground pipeline record The interval hit ciphertext flag for the underground pipeline field; Indicates the first The first underground pipeline record The encrypted flag whose value for the underground pipeline field is not less than the effective lower bound of the target; Indicates the first The first underground pipeline record A ciphertext flag indicating that the value of the underground pipeline field is not greater than the effective upper bound of the target; This represents a ciphertext multiplication operation supported by a fully homomorphic encryption algorithm.
[0065] When the plaintext meaning of the interval hit ciphertext flag is 1, it indicates that the underground pipeline field value is between the target's effective lower bound and the target's effective upper bound; when the plaintext meaning of the interval hit ciphertext flag is 0, it indicates that the underground pipeline field value is not between the target's effective lower bound and the target's effective upper bound.
[0066] Furthermore, a homomorphic multiplication is performed on all coordinate field intervals belonging to the spatial judgment field set in the same underground pipeline record to generate a spatial hit ciphertext flag, represented as: ; in, Indicates the first The spatial hit ciphertext markers of the underground pipeline records; This represents the set of spatial judgment fields, which is formed by the coordinate field names in the spatial boundary data submitted by the querying party. This indicates that continuous homomorphic multiplication is performed on the interval hit ciphertext flags within the set.
[0067] When the plaintext meaning of the spatial hit ciphertext flag is 1, it means that all coordinate fields in the underground pipeline record are within the target space range; when the plaintext meaning of the spatial hit ciphertext flag is 0, it means that at least one coordinate field in the underground pipeline record is not within the target space range.
[0068] Furthermore, a homomorphic multiplication is performed on the attribute field interval match ciphertext flags belonging to the attribute condition field set in the same underground pipeline record to generate attribute match ciphertext flags, represented as: ; in, Indicates the first The attributes of the underground pipeline record match the encrypted flag; This represents the set of attribute condition fields, which is formed by the field names in the attribute condition boundary data submitted by the querying party.
[0069] When the plaintext meaning of the attribute match ciphertext flag is 1, it means that the underground pipeline record meets all the attribute conditions proposed by the querying party; when the plaintext meaning of the attribute match ciphertext flag is 0, it means that at least one attribute field in the underground pipeline record does not meet the attribute conditions proposed by the querying party.
[0070] When the querying party does not specify any spatial range conditions, the spatial hit ciphertext flag is set to the hit state constant in the encrypted state, represented as: ; in, This represents the hit state constant that satisfies the spatial range condition.
[0071] When the querying party does not specify any attribute conditions, the attribute hit ciphertext flag is set to the hit state constant in the encrypted state, represented as: ; in, This represents the hit state constant that satisfies the attribute conditions.
[0072] It should be noted that both spatial range judgment and attribute condition judgment use the field bit ciphertext and target boundary bit ciphertext as input, and the ciphertext comparison circuit outputs a binary hit ciphertext flag; in the process of generating the spatial hit ciphertext flag and the attribute hit ciphertext flag, the underground pipeline field value is not decrypted, and the plaintext intermediate result of a single underground pipeline record is not exposed.
[0073] S3. Generate a joint ciphertext filtering flag based on the spatial hit ciphertext flag and the attribute hit ciphertext flag, and perform ciphertext filtering on the underground pipeline field value ciphertext according to the joint ciphertext filtering flag to generate the filtered underground pipeline ciphertext code.
[0074] Furthermore, with the support of the evaluation key, homomorphic multiplication is performed on the spatial hit ciphertext flag and attribute hit ciphertext flag of the same underground pipeline record to form a joint ciphertext filtering flag, represented as: ; in, Indicates the first A joint encrypted screening marker for underground pipeline records.
[0075] When the plaintext meaning of the joint ciphertext filter flag is 1, it indicates that the underground pipeline record simultaneously meets the spatial range and attribute conditions proposed by the querying party; when the plaintext meaning of the joint ciphertext filter flag is 0, it indicates that the underground pipeline record does not simultaneously meet the spatial range and attribute conditions proposed by the querying party.
[0076] Furthermore, with the support of the evaluation key, the joint encrypted filtering flag is homomorphically multiplied with the encrypted values of the underground pipeline coordinate field, the underground pipeline pressure level field, the underground pipeline diameter field, the underground pipeline laying year field, and the underground pipeline material category field, respectively, to form the filtered encrypted values of the underground pipeline fields, represented as: ; in, Indicates the first The first underground pipeline record The filtered field values of the underground pipeline field are encrypted.
[0077] When the plaintext meaning of the joint ciphertext filtering flag is 1, the plaintext meaning of the filtered field value is the integer value of the underground pipeline field; when the plaintext meaning of the joint ciphertext filtering flag is 0, the plaintext meaning of the filtered field value is 0. This ensures that underground pipeline field values that meet the spatial range and attribute conditions specified by the queryer are retained in ciphertext, while underground pipeline field values that do not meet the spatial range or attribute conditions specified by the queryer are set to zero in ciphertext.
[0078] Furthermore, the filtered underground pipeline encrypted codes include the encrypted values of the filtered underground pipeline coordinate field, the filtered underground pipeline pressure level field, the filtered underground pipeline diameter field, the filtered underground pipeline laying year field, and the filtered underground pipeline material category field.
[0079] Furthermore, when underground pipeline materials need to be statistically analyzed separately by category, a material category statistical list is generated based on the material category names listed in the query's statistical output requirements. If the statistical output requirements list one material category name, the material category statistical list contains one material category; if the statistical output requirements list multiple material category names, the listed material category names are sorted according to the order in a unified material category sequence to form the material category statistical list.
[0080] For each material category in the material category statistics list, a material category statistics number is generated, and the material category name is converted into a material category integer value according to a unified material category sequence. Then, the material category integer value is expanded into a material category target bit sequence according to the field bit length of the material category field, and a fully homomorphic encryption operation is performed on each bit value in the material category target bit sequence to form the material category target bit ciphertext.
[0081] The encrypted equivalent comparison circuit performs an equivalent comparison between the encrypted bit of the underground pipeline material category field and the encrypted bit of the material category target, generating an encrypted material category equivalent match flag. When the plaintext meaning of the encrypted material category equivalent match flag is 1, it indicates that the underground pipeline record belongs to the material category listed in the queryer's statistical output requirements; when the plaintext meaning of the encrypted material category equivalent match flag is 0, it indicates that the underground pipeline record does not belong to the material category listed in the queryer's statistical output requirements.
[0082] Perform a homomorphic multiplication between the joint ciphertext filtering flag and the material category equivalent hit ciphertext flag to form a material category itemized ciphertext count flag, represented as: ; in, Indicates the first The underground pipeline record is in the first Sub-item encrypted count flags under each material category; Indicates the statistical number of the material category; Indicates the first The underground pipeline record belongs to the first Equivalent hit ciphertext markers for various material categories.
[0083] When the plaintext meaning of the encrypted count flag for the material category is 1, it indicates that the underground pipeline record meets the spatial range and attribute conditions and belongs to the first item in the material category statistical list. Material category statistical number; when the plaintext meaning of the material category sub-item encrypted count flag is 0, it indicates that the underground pipeline record does not meet the spatial range, does not meet the attribute conditions, or does not belong to the material category statistical list. Material categories under the statistical number of each material category.
[0084] It should be noted that the field value ciphertext is filtered by multiplication using the joint ciphertext filtering flag, and the material category itemized ciphertext count flag is used to retain the material category itemized statistical basis, so that the ciphertext filtering results can be directly entered into the ciphertext statistical processing process.
[0085] S4. Perform ciphertext statistical processing on the joint ciphertext screening flag and the ciphertext code of the screened underground pipeline to generate underground pipeline hit count ciphertext and underground pipeline attribute aggregation ciphertext.
[0086] Furthermore, with the support of the evaluation key, the joint ciphertext filtering flags of all underground pipeline records are accumulated in ciphertext state to generate ciphertext statistics of underground pipeline hits, represented as: ; in, This is a ciphertext indicating the number of underground pipeline hits. This indicates the total number of underground pipeline records included in the query. This indicates a ciphertext addition operation supported by a fully homomorphic encryption algorithm.
[0087] The plaintext meaning of the underground pipeline hit count ciphertext is the number of underground pipeline records that meet the spatial range and attribute conditions specified by the querying party. The plaintext meaning of the joint ciphertext filtering flag is 1 or 0. The joint ciphertext filtering flag is added to the ciphertext to form the hit count.
[0088] Furthermore, when the statistical output request submitted by the querying party includes cumulative statistics for fields, an attribute aggregation field set is formed based on the field names listed in the statistical output request. If the statistical output request lists a cumulative pressure level field, the underground pipeline pressure level field is included in the attribute aggregation field set; if the statistical output request lists a cumulative pipe diameter field, the underground pipeline pipe diameter field is included in the attribute aggregation field set; if the statistical output request lists a cumulative laying year field, the underground pipeline laying year field is included in the attribute aggregation field set.
[0089] For each category of underground pipeline field in the attribute aggregation field set, the filtered field values of all underground pipeline records are accumulated in ciphertext mode to generate the cumulative ciphertext of the field, represented as: ; in, Indicates the first Accumulated encrypted data for fields in the category of underground pipelines.
[0090] The plaintext meaning of the cumulative encrypted field is the underground pipeline records that meet the spatial range and attribute conditions proposed by the queryer, listed in the statistical output requirements. The cumulative integer values in the underground pipeline field. When the plaintext meaning of the joint ciphertext filter flag is 1, the ciphertext of the filtered field value retains the integer value of the underground pipeline field; when the plaintext meaning of the joint ciphertext filter flag is 0, the ciphertext of the filtered field value is 0. Therefore, the cumulative ciphertext of the field only accumulates the underground pipeline field values that meet the query conditions.
[0091] Furthermore, when the statistical output request submitted by the querying party includes material category item statistics, the encrypted count flags of all underground pipeline records under each material category are accumulated in encrypted state to generate encrypted material category item quantity statistics, represented as: ; in, Indicates the first Encrypted data on the number of items in each material category.
[0092] The plaintext meaning of the encrypted text for the material category quantity statistics is that, among the underground pipeline records that meet the spatial range and attribute conditions specified by the querying party, it belongs to the item in the material category statistics list. The number of underground pipeline records with statistical numbers for each material category.
[0093] Furthermore, the underground pipeline attribute aggregation ciphertext includes the cumulative ciphertext of each underground pipeline field in the attribute aggregation field set, as well as the ciphertext of the quantity statistics of each material category.
[0094] When the attribute aggregation field set is empty and the statistical output requirement includes material category item statistics, the underground pipeline attribute aggregation ciphertext is formed by the material category item quantity statistics ciphertext; when the attribute aggregation field set is not empty and the statistical output requirement does not include material category item statistics, the underground pipeline attribute aggregation ciphertext is formed by the field cumulative ciphertext; when the attribute aggregation field set is not empty and the statistical output requirement includes material category item statistics, the underground pipeline attribute aggregation ciphertext is formed by both the field cumulative ciphertext and the material category item quantity statistics ciphertext.
[0095] It should be noted that by accumulating the ciphertext of the joint ciphertext filtering flags, the ciphertext for the underground pipeline hit count is formed by the number of hit records; by accumulating the ciphertext of the filtered field values, the ciphertext for the underground pipeline attribute aggregation is formed by the field values that meet the query conditions; the count and attribute aggregation use different ciphertext data sources to avoid mistakenly taking the accumulated coordinate field values as the number of underground pipeline records.
[0096] S5. Based on a threshold decryption method involving multiple parties, joint decryption processing is performed on the underground pipeline hit count ciphertext and the underground pipeline attribute aggregation ciphertext to generate the underground pipeline hit count plaintext value and the underground pipeline attribute aggregation plaintext value.
[0097] Furthermore, the encrypted text of the underground pipeline hit count, the encrypted text of the cumulative field of each underground pipeline field in the attribute aggregation field set, and the encrypted text of the material category item count are compiled into a list of encrypted texts to be decrypted.
[0098] The list of encrypted text to be decrypted includes one or more of the following: encrypted text for the number of underground pipeline hits, encrypted text for the cumulative pressure rating, encrypted text for the cumulative pipe diameter, encrypted text for the cumulative laying year, and encrypted text for the quantity statistics of each material category. The encrypted text items in the list of encrypted text to be decrypted are jointly determined by the statistical output requirements submitted by the querying party, the encrypted text for the number of underground pipeline hits, the cumulative encrypted text of fields in the attribute aggregation field set, and the encrypted text for the quantity statistics of each material category.
[0099] Furthermore, multiple underground pipeline owners each hold a share of the decryption key. These shares are generated by a fully homomorphic encryption algorithm during the key generation phase. Each underground pipeline owner holds one share of the decryption key, and no single underground pipeline owner's share can independently recover the plaintext value of any ciphertext item in the list of ciphertexts to be decrypted.
[0100] Furthermore, each underground pipeline ownership unit participating in the decryption process uses its own share of the decryption key to perform partial decryption operations on each ciphertext item in the list of ciphertexts to be decrypted, forming partial decryption values for quantity, cumulative field values, or material category values.
[0101] The decrypted value for the quantity section is generated by the underground pipeline ownership unit using its decryption key share to perform a partial decryption operation on the underground pipeline hit quantity statistics ciphertext. The decrypted value for the cumulative field section is generated by the underground pipeline ownership unit using its decryption key share to perform a partial decryption operation on the cumulative field ciphertext. The decrypted value for the material category sub-item section is generated by the underground pipeline ownership unit using its decryption key share to perform a partial decryption operation on the material category sub-item quantity statistics ciphertext.
[0102] Furthermore, the number of partial decryption values generated from the same ciphertext item is verified. When the number of partial decryption values collected for the same ciphertext item reaches the threshold, the multiple partial decryption values are merged according to the threshold merging rules accompanying the fully homomorphic encryption algorithm to restore the corresponding plaintext value; when the number of partial decryption values collected for the same ciphertext item does not reach the threshold, plaintext recovery processing is not performed.
[0103] The threshold number is an integer greater than or equal to 2 and less than or equal to the total number of underground pipeline ownership units participating in threshold decryption. The threshold number is used to limit the minimum number of partial decryption values required to recover the ciphertext item to be decrypted.
[0104] Furthermore, the decrypted values of the multiple quantity components generated from the encrypted underground pipeline hit count are merged to produce a plaintext value for the underground pipeline hit count. This plaintext value represents the number of underground pipeline records that meet the spatial range and attribute conditions specified by the querying party.
[0105] The decrypted values of multiple cumulative fields formed by the cumulative ciphertext are merged to generate the cumulative plaintext value. The cumulative plaintext value represents the cumulative integer value of the corresponding underground pipeline field for underground pipeline records that meet the spatial range and attribute conditions proposed by the querying party.
[0106] The decrypted values of multiple material category sub-items generated from the encrypted material category quantity statistics are merged to generate plaintext material category quantity values. These plaintext material category quantity values represent the number of underground pipeline records that meet the spatial range and attribute conditions specified by the querying party and belong to the corresponding material category in the material category statistics list.
[0107] Furthermore, the aggregated plaintext values of underground pipeline attributes include one or both of the cumulative plaintext values of the fields and the plaintext values of the material category item quantity.
[0108] When the statistical output requirement includes fields for pressure rating, pipe diameter, or laying date, the aggregated plaintext values of underground pipeline attributes include the cumulative plaintext values of the corresponding fields. When the statistical output requirement includes material category statistics, the aggregated plaintext values of underground pipeline attributes include the plaintext values of the quantity of each material category.
[0109] It should be noted that the joint decryption process only applies to the encrypted text of underground pipeline hit count statistics, cumulative field data, and material category item count statistics; it does not perform decryption on the encrypted text of individual underground pipeline field values. The querying party obtains the plaintext values of underground pipeline hit counts and aggregated underground pipeline attributes, but does not obtain the plaintext data of coordinates, pressure rating, pipe diameter, laying year, or material category for individual underground pipeline records.
[0110] In summary, this invention achieves the following: By collaboratively processing the encrypted values of underground pipeline fields, the encrypted bits of underground pipeline fields, the encrypted bits of target boundaries, and the encrypted comparison circuit, spatial range determination and attribute condition filtering can be completed without decrypting the field values of individual underground pipelines, reducing the exposure of plaintext field values and plaintext filtering status during cross-unit collaborative queries; by using joint encrypted filtering flags to participate in both hit count statistics and field value filtering, the data sources of the encrypted underground pipeline hit count statistics and the encrypted underground pipeline attribute aggregation are mutually distinguishable; and by recovering the statistical plaintext values through multi-threshold decryption, the statistical output is jointly controlled by multiple underground pipeline ownership units, balancing the needs of collaborative utilization of underground pipeline data and privacy protection.
[0111] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. A method for protecting the privacy of underground pipeline data based on homomorphic encryption, characterized in that: include, The original underground pipeline data from different ownership units are formatted and expressed as integers. Then, the original underground pipeline data expressed as integers are encrypted using a fully homomorphic encryption operation to generate ciphertext codes for underground pipelines. Based on the spatial range and attribute conditions proposed by different ownership units, target boundary bit ciphertext is generated, and spatial hit ciphertext flags and attribute hit ciphertext flags are generated through ciphertext comparison circuits. A joint ciphertext filtering flag is generated based on the spatial hit ciphertext flag and the attribute hit ciphertext flag. The ciphertext filtering of the underground pipeline field value is performed according to the joint ciphertext filtering flag to generate the filtered underground pipeline ciphertext code. The combined ciphertext screening flag and the ciphertext code of the screened underground pipeline are subjected to ciphertext statistical processing to generate underground pipeline hit count ciphertext and underground pipeline attribute aggregation ciphertext. Based on a threshold decryption method involving multiple parties, joint decryption processing is performed on the encrypted text of underground pipeline hit count statistics and the encrypted text of underground pipeline attribute aggregation to generate plaintext values of underground pipeline hit count and underground pipeline attribute aggregation.
2. The method for protecting the privacy of underground pipeline data based on homomorphic encryption as described in claim 1, characterized in that: The process of unifying the format and integerizing the original underground pipeline data from different ownership entities includes unifying the format of the coordinates, pressure ratings, pipe diameters, laying years, and material categories of underground pipelines provided by different ownership entities, respectively, for the coordinates, pressure rating descriptions, pipe diameter units, year recording methods, and material category descriptions. The coordinates, pressure ratings, diameters, laying dates, and material categories of underground pipelines after standardization are expressed as integers, resulting in integer representations of the coordinates, pressure ratings, diameters, laying dates, and material categories of underground pipelines. Each underground pipeline ownership unit extracts the lower and upper bounds of the field integers of the same type of underground pipeline within its own unit, and then collaboratively summarizes them to form a field boundary record table. The field bit length is determined based on the lower and upper bounds of the field integers in the field boundary record table. The integer underground pipeline coordinates, pressure ratings, diameters, laying years, and material categories are then expanded into field bit sequences according to their respective field bit lengths.
3. The method for protecting the privacy of underground pipeline data based on homomorphic encryption as described in claim 1 or 2, characterized in that: The step of performing a fully homomorphic encryption operation on the original underground pipeline data after integer representation to generate underground pipeline ciphertext encoding includes generating a public key, an evaluation key, and a decryption key share using a fully homomorphic encryption algorithm that supports ciphertext addition, ciphertext multiplication, and Boolean comparison circuit evaluation. By performing a fully homomorphic encryption operation on the integer coordinates, pressure rating, diameter, laying year, and material category of underground pipelines using a public key, ciphertext of the underground pipeline field values is generated. The underground pipeline field ciphertext is generated by performing a fully homomorphic encryption operation on each bit value in the field bit sequence using the public key. The underground pipeline ciphertext code is formed by combining the ciphertext of the underground pipeline field value and the ciphertext of the underground pipeline field bits.
4. The method for protecting the privacy of underground pipeline data based on homomorphic encryption as described in claim 2, characterized in that: The step of generating target boundary bit ciphertext based on the spatial range and attribute conditions proposed by different ownership units includes: when different ownership units propose a query request for the spatial range of underground pipelines, converting the spatial boundary data submitted by the querying party into an integer lower bound and an integer upper bound of the target spatial range according to the same integerization method as the coordinates of underground pipelines, and forming a set of spatial judgment fields based on the coordinate field names in the spatial boundary data; When different ownership entities submit requests to query underground pipeline attribute conditions, the attribute condition boundary data submitted by the querying party is converted into integer lower bound and integer upper bound of the target attribute in the same integerization method as underground pipeline pressure level, underground pipeline diameter, underground pipeline laying year and underground pipeline material category. The attribute condition field set is then formed based on the field names in the attribute condition boundary data. When the set of attribute condition fields includes the underground pipeline material category field, both the lower bound and the upper bound of the target attribute are taken as the underground pipeline material category in integer form after the same material category name submitted by the querying party is integerized and mapped. For each type of underground pipeline field involved in the query judgment, the target effective lower bound and target effective upper bound are formed based on the target submission lower bound, target submission upper bound, field integer lower bound and field integer upper bound in the field boundary record table; When the effective lower bound of the target is greater than the effective upper bound of the target, the interval hit ciphertext flag of this type of underground pipeline field is set to the miss state constant in the encrypted state. When the effective lower bound of the target is less than or equal to the effective upper bound of the target, the effective lower bound and the effective upper bound of the target are offset according to the lower bound of the field integer, forming a non-negative target lower bound value and a non-negative target upper bound value. The non-negative target lower bound value and the non-negative target upper bound value are then expanded into a target lower bound bit sequence and a target upper bound bit sequence according to the field bit length, respectively. Perform a fully homomorphic encryption operation on each bit value in the target lower bound bit sequence and the target upper bound bit sequence to form the target lower bound bit ciphertext and the target upper bound bit ciphertext.
5. The method for protecting the privacy of underground pipeline data based on homomorphic encryption as described in claim 4, characterized in that: The step of generating spatial hit ciphertext flags and attribute hit ciphertext flags through the ciphertext comparison circuit includes, with the support of the evaluation key, comparing the underground pipeline field bit ciphertext, the target lower bound bit ciphertext, and the target upper bound bit ciphertext through the ciphertext comparison circuit to generate interval hit ciphertext flags. The ciphertext comparison circuit includes a ciphertext comparison circuit that is not less than the effective lower bound of the target and a ciphertext comparison circuit that is not greater than the effective upper bound of the target. A ciphertext flag not less than the target effective lower bound is generated by a ciphertext comparison circuit. A ciphertext flag not greater than the target's effective upper bound is generated using a ciphertext comparison circuit that is not greater than the target's effective upper bound. Homomorphic multiplication is performed on the ciphertext flags that are not less than the effective lower bound of the target and the ciphertext flags that are not greater than the effective upper bound of the target to generate interval hit ciphertext flags; Homomorphic multiplication is performed on all coordinate field intervals that belong to the spatial judgment field set in the same underground pipeline record to generate spatial hit ciphertext flags; When the querying party does not specify any spatial range conditions, the spatial hit ciphertext flag is set to the hit state constant in the encrypted state; Homomorphic multiplication is performed on all attribute field intervals that match the attribute condition field set in the same underground pipeline record to generate attribute match ciphertext flags; When the querying party does not specify any attribute conditions, the attribute hit ciphertext flag is set to the hit state constant in the encrypted state.
6. The method for protecting the privacy of underground pipeline data based on homomorphic encryption as described in claim 5, characterized in that: The method of generating a joint ciphertext screening flag based on spatial hit ciphertext flags and attribute hit ciphertext flags includes performing homomorphic multiplication on the spatial hit ciphertext flags and attribute hit ciphertext flags of the same underground pipeline record, with the support of the evaluation key, to form a joint ciphertext screening flag.
7. The method for protecting the privacy of underground pipeline data based on homomorphic encryption as described in claim 6, characterized in that: The step of performing ciphertext filtering on the ciphertext of underground pipeline field values based on the joint ciphertext filtering flag to generate the filtered underground pipeline ciphertext code includes, with the support of the evaluation key, performing homomorphic multiplication on the ciphertext of underground pipeline coordinate field values, underground pipeline pressure level field values, underground pipeline diameter field values, underground pipeline laying year field values, and underground pipeline material category field values respectively to form the filtered underground pipeline field value ciphertext. When the plaintext meaning of the joint ciphertext filtering flag is a hit, the ciphertext of the filtered underground pipeline field value carries the integer value of the underground pipeline field. When the plaintext meaning of the joint ciphertext filtering flag is a no-hit state, the ciphertext value of the filtered underground pipeline field is set to zero. The filtered underground pipeline field values are used to form the filtered underground pipeline ciphertext code.
8. The method for protecting the privacy of underground pipeline data based on homomorphic encryption as described in claim 1 or 7, characterized in that: The ciphertext statistical processing of the joint ciphertext screening flag and the filtered underground pipeline ciphertext code includes, with the support of the evaluation key, performing an accumulation process on the joint ciphertext screening flag of all underground pipeline records in the ciphertext state to generate underground pipeline hit count ciphertext. When the statistical output request submitted by the querying party contains cumulative field statistics, an attribute aggregation field set is formed based on the field names listed in the cumulative field statistics; For each type of underground pipeline field in the attribute aggregation field set, the filtered underground pipeline field values of all underground pipeline records are accumulated in ciphertext state to generate cumulative ciphertext of the fields; When the statistical output request submitted by the querying party contains material category statistics, a material category statistics list is generated based on the material category names listed in the querying party's statistical output request, and a material category item encrypted count flag is generated based on the material category statistics list. All underground pipelines are recorded in the encrypted text count flags of each material category under each material category. The encrypted text count flags of the material category items are accumulated in the encrypted state to generate encrypted text statistics of the material category items. The underground pipeline attribute aggregation ciphertext is formed by at least one of the field cumulative ciphertext and the material category item quantity statistics ciphertext.
9. The method for protecting the privacy of underground pipeline data based on homomorphic encryption as described in claim 8, characterized in that: The joint decryption process includes compiling the underground pipeline hit count ciphertext, the field accumulation ciphertext of each underground pipeline field in the attribute aggregation field set, and the material category item count ciphertext into a list of ciphertexts to be decrypted according to the statistical output requirements submitted by the querying party. Multiple underground pipeline owners each hold a share of the decryption key, which is generated by a fully homomorphic encryption algorithm during the key generation phase. Each underground pipeline ownership unit participating in the decryption uses its share of the decryption key to perform partial decryption operations on each ciphertext item in the list of ciphertexts to be decrypted, forming a partial decryption value for quantity, a partial decryption value for cumulative fields, or a partial decryption value for material category.
10. The method for protecting the privacy of underground pipeline data based on homomorphic encryption as described in claim 9, characterized in that: The joint decryption process also includes verifying the quantity of multiple partial decryption values formed from the same ciphertext item; When the number of partially decrypted values collected for the same ciphertext item reaches the threshold, the multiple partially decrypted values are merged according to the threshold merging rules of the fully homomorphic encryption algorithm to restore the corresponding plaintext value. The number of thresholds is an integer that is no less than two and no more than the total number of underground pipeline ownership units participating in threshold decryption. The decrypted values of multiple quantity components generated from the encrypted data of underground pipeline hit counts are merged to generate the plaintext value of the underground pipeline hit count. The decrypted values of multiple cumulative fields formed by the cumulative ciphertext of the fields are merged to generate the cumulative plaintext value of the fields. The decrypted values of multiple material category items formed by the encrypted text of the quantity statistics of material category items are merged to generate plaintext values of the quantity of material category items. The aggregated plaintext value of underground pipeline attributes is formed by at least one of the cumulative plaintext value of the field and the plaintext value of the material category item quantity.