An engineering supervision data security sharing method and system based on homomorphic encryption

CN122554191APending Publication Date: 2026-08-11ZHONGLIAN SHENFAN (BEIJING) TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-20
Publication Date
2026-08-11

AI Technical Summary

Technical Problem

[0006]本申请目的是提供一种基于同态加密的工程监理数据安全共享方法和系统,以解决现有技术中数据安全共享不足的问题

Benefits of technology

[0017] The method for secure sharing of engineering supervision data based on homomorphic encryption provided in this application first constructs a unit price fluctuation matrix and extracts row vectors to obtain a unit price vector, and maps inventory turnover data to an inventory polyline in a discrete coordinate system and calculates the first-order difference to obtain a consumption vector. A characteristic data structure extraction mechanism is established for material unit price fluctuation data and inventory consumption data, which effectively captures the time-series change characteristics of unit price and the characteristics of inventory consumption rate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122554191A_ABST
    Figure CN122554191A_ABST
Patent Text Reader

Abstract

This application provides a method and system for secure sharing of engineering supervision data based on homomorphic encryption, belonging to the field of data security technology. This application obtains ledger records and material quotation records from each warehousing node. Based on the quotation records, a unit price fluctuation matrix is ​​constructed to extract the unit price vector. Based on the ledger records, an inventory line graph is mapped, and a first-order difference is calculated to obtain the consumption vector. After scaling and rounding the unit price vector and consumption vector, a modular exponentiation operation is performed using the homomorphic encryption public key to obtain the ciphertext vector. Homomorphic algebra operations are then used to obtain the capital vector for each target material, and these are aggregated to obtain the target capital vector. Finally, a Pedersen commitment value is constructed on the target capital vector, and a challenge value is obtained through hash calculation. A zero-knowledge proof is generated by numerical transformation using a preset budget limit and the challenge value. The target capital vector and the zero-knowledge proof are sent to the supervision node for verification. This application realizes cross-node aggregation calculation of supply chain cost data in an encrypted state and verification of overspending risk with zero privacy exposure.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of data security technology, and in particular relates to a method and system for secure sharing of engineering supervision data based on homomorphic encryption. Background Technology

[0002] In large-scale engineering projects jointly contracted by multiple parties, all participants need to share sensitive data such as material procurement costs and inventory turnover for cost compliance audits. Homomorphic encryption-based secure data sharing methods for engineering supervision can achieve encrypted computation and verification across nodes without disclosing the original data. With the advancement of digital engineering management, how to reliably verify the risk of cost overruns while ensuring data privacy has become a crucial requirement in the field of engineering supervision.

[0003] Existing technologies include schemes for encrypting engineering data based on homomorphic encryption, which protect data privacy by encrypting plaintext data before performing ciphertext calculations. Some schemes use homomorphic encryption to aggregate cost data or utilize zero-knowledge proofs to verify whether specific conditions are met, but these schemes are usually designed for single data types or simple numerical calculation scenarios.

[0004] However, when dealing with the joint analysis of multi-dimensional data sources such as material unit price fluctuation data and inventory consumption data in engineering supervision scenarios, existing technologies lack targeted data structure extraction and encrypted collaborative calculation mechanisms, resulting in the inability to effectively capture the time-series change characteristics of unit price and the characteristics of inventory consumption rate.

[0005] Furthermore, existing solutions often require decrypting intermediate results or relying on trusted third parties when verifying budget compliance, making it impossible to perform zero-knowledge proof verification of cost summary results in a completely encrypted state. This poses risks of privacy leakage or insufficient verification credibility. Therefore, existing technologies suffer from insufficient data security sharing due to the inability to effectively extract multi-dimensional features and perform zero-knowledge verification for budget compliance when engineering supervision data is in an encrypted state. Summary of the Invention

[0006] The purpose of this application is to provide a method and system for secure sharing of engineering supervision data based on homomorphic encryption, so as to solve the problem of insufficient secure data sharing in the prior art.

[0007] To address the aforementioned technical problems, in a first aspect, this application provides a method for securely sharing engineering supervision data based on homomorphic encryption, comprising: Obtain the ledger records and material quotation records for each warehousing node within the target time period. The material quotation records include multiple quotation information from multiple suppliers for each target material. Based on the material quotation records, construct the unit price fluctuation matrix for each target material, and obtain the unit price vector for each target material by extracting the row vectors in the unit price fluctuation matrix; By mapping the circulation quantity and circulation time of each target material in the ledger record to a preset discrete coordinate system, an inventory line is obtained, and the first difference of the inventory line is calculated to obtain the consumption vector of each target material. The elements in the unit price vector and consumption vector are scaled and rounded to obtain the corresponding integer vectors. The unit price ciphertext vector and consumption ciphertext vector are obtained by performing modular exponentiation on the corresponding integer vectors using the homomorphic encryption public key. The fund vector of each target material is obtained by performing homomorphic algebraic operations on the unit price ciphertext vector and consumption ciphertext vector. The target fund vector is obtained by homomorphic addition of the fund vectors of all target materials in all storage nodes. The challenge value is obtained by hashing the Pedersen commitment value determined based on the target funding vector. The Pedersen commitment value is then numerically transformed using the preset budget limit and the challenge value to generate a zero-knowledge proof. The target funding vector and the zero-knowledge proof are then sent to the supervision node for verification.

[0008] Optionally, a unit price fluctuation matrix for each target material is constructed based on the material quotation records. The unit price vector for each target material is obtained by extracting the row vectors within the unit price fluctuation matrix, including: Extract multiple quotation times and corresponding unit prices for each target material from the material quotation records. Divide all quotation times into corresponding continuous time sub-intervals. Arrange all unit prices in each time sub-interval to obtain row vectors. Arrange all row vectors according to the time order of the time sub-intervals to obtain the unit price fluctuation matrix. The maximum and minimum bid prices in the row vectors of the price fluctuation matrix are concatenated to obtain the extreme value pairs of each row vector. Based on all extreme value pairs, the price vector of each target material is constructed.

[0009] Optionally, by mapping the circulation quantity and circulation time of each target material in the ledger records to a preset discrete coordinate system to obtain an inventory line, and calculating the first difference of the inventory line to obtain the consumption vector of each target material, including: Extract multiple circulation times and corresponding circulation quantities for each target material from the ledger records. Project these values ​​onto a discrete coordinate system with circulation time as the horizontal axis and circulation quantity as the vertical axis to obtain multiple discrete coordinate points for each target material. Connect all discrete coordinate points according to the order of their circulation time to obtain the inventory line graph for each target material; Calculate the difference in the ordinate values ​​of adjacent discrete coordinate points in the inventory polyline, and construct the consumption vector for each target material based on all the differences.

[0010] Optionally, the homomorphic encryption public key includes a generator and a ciphertext space modulus; The elements in the unit price vector and consumption vector are scaled and rounded respectively to obtain the corresponding integer vectors. Then, the corresponding integer vectors are subjected to modular exponentiation using the homomorphic encryption public key to obtain the unit price ciphertext vector and consumption ciphertext vector, including: Each element in the unit price vector and consumption vector is multiplied by a preset scaling factor and then rounded down to obtain the corresponding target integer. A first integer vector and a second integer vector are constructed based on all the target integers. For each target integer in the first integer vector and the second integer vector, generate a corresponding random number. Then, perform a power operation with the generator as the base and the target integer as the exponent to obtain the first power value. Finally, perform a power operation with the random number as the base and the ciphertext space modulus as the exponent to obtain the second power value. The ciphertext value of each target integer is obtained by taking the modulus of the ciphertext space modulus modulo the product of the first power value and the second power value. A unit-price ciphertext vector is constructed based on all the ciphertext values ​​corresponding to the first integer vector, and a consumption ciphertext vector is constructed based on all the ciphertext values ​​corresponding to the second integer vector.

[0011] Optionally, the fund vector for each target material is obtained by performing homomorphic algebraic operations on the unit price ciphertext vector and the consumption ciphertext vector, and the target fund vector is obtained by homomorphic addition of the fund vectors of all target materials across all storage nodes, including: The intermediate ciphertext value is obtained by multiplying the unit price ciphertext vector with the corresponding ciphertext value in the consumption ciphertext vector. The fund vector for each target material is then constructed based on all intermediate ciphertext values. The target ciphertext value is obtained by taking the modulus of the sum of the intermediate ciphertext values ​​at corresponding positions in all capital vectors. The target capital vector is then constructed based on all target ciphertext values.

[0012] Optionally, the challenge value is obtained by hashing the Pedersen commitment value determined based on the target funding vector, including: For each target ciphertext value in the target funding vector, generate a corresponding random blinding number. Use the preset first commitment base as the base and the target ciphertext value as the exponent to perform a power operation to obtain a third power value. Use the preset second commitment base as the base and the random blinding number as the exponent to perform a power operation to obtain a fourth power value. The intermediate commitment value for each target ciphertext value is obtained by taking the modulus of the product of the third and fourth power values ​​using the preset commitment modulus. The Pedersen commitment value is obtained by taking the modulus of the sum of all intermediate commitment values ​​using the preset commitment modulus. The Pedersen commitment value is then input into the hash function to obtain the challenge value.

[0013] Optionally, a zero-knowledge proof is generated by numerically transforming the Pedersen commitment value using a preset budget limit and challenge value. The target funding vector and the zero-knowledge proof are then sent to the monitoring node for verification, including: The limit adjustment value is obtained by multiplying the challenge value and the preset budget limit. The proof response value for each target ciphertext value is obtained by taking the modulus of the difference between the random blinding number and the limit adjustment value using the preset proof modulus. A proof response vector is constructed based on all proof response values. The Pedersen commitment value and the proof response vector are concatenated to obtain the zero-knowledge proof. The target funding vector and the zero-knowledge proof are packaged together and sent to the supervisor node for verification.

[0014] Secondly, this application provides a secure data sharing system for engineering supervision based on homomorphic encryption, comprising: The acquisition module is used to acquire the ledger records and material quotation records of each warehousing node within the target time period. The material quotation records include multiple quotation information from multiple suppliers for each target material. The module is used to construct the unit price fluctuation matrix for each target material based on the material quotation records, and to obtain the unit price vector for each target material by extracting the row vectors in the unit price fluctuation matrix. The generation module is used to obtain the inventory line by mapping the circulation quantity and circulation time of each target material in the ledger record to a preset discrete coordinate system, and to calculate the first difference of the inventory line to obtain the consumption vector of each target material. The generation module is also used to scale and round the elements in the unit price vector and consumption vector to obtain the corresponding integer vectors, use the homomorphic encryption public key to perform modular exponentiation on the corresponding integer vectors to obtain the unit price ciphertext vector and consumption ciphertext vector, perform homomorphic algebraic operations on the unit price ciphertext vector and consumption ciphertext vector to obtain the capital vector of each target material, and perform homomorphic addition on the capital vectors of all target materials in all storage nodes to obtain the target capital vector. The verification module is used to obtain the challenge value by hashing the Pedersen commitment value determined based on the target funding vector, and to generate a zero-knowledge proof by numerically transforming the Pedersen commitment value using a preset budget limit and the challenge value. The target funding vector and the zero-knowledge proof are then sent to the supervision node for verification.

[0015] Thirdly, this application provides an electronic device, comprising: Memory, used to store computer programs; A processor, configured to execute the computer program to implement the steps of the method for secure sharing of engineering supervision data based on homomorphic encryption as described in the first aspect above.

[0016] Fourthly, this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, can implement the steps of the method for secure sharing of engineering supervision data based on homomorphic encryption as described in the first aspect above.

[0017] The method for secure sharing of engineering supervision data based on homomorphic encryption provided in this application first constructs a unit price fluctuation matrix and extracts row vectors to obtain a unit price vector, and maps inventory turnover data to an inventory polyline in a discrete coordinate system and calculates the first-order difference to obtain a consumption vector. A characteristic data structure extraction mechanism is established for material unit price fluctuation data and inventory consumption data, which effectively captures the time-series change characteristics of unit price and the characteristics of inventory consumption rate.

[0018] Subsequently, the unit price vector and consumption vector are transformed into ciphertext vectors by modular exponentiation using a homomorphic encryption public key. Then, cost aggregation calculations across warehouse nodes are performed in a completely ciphertext state through homomorphic algebra operations and homomorphic addition, ensuring that the original sensitive data is not leaked during the intermediate calculation process.

[0019] Finally, by constructing a Pedersen commitment value for the target funding vector and combining it with a challenge value obtained through hash calculation to generate a zero-knowledge proof, the supervision node can verify whether the total cost exceeds the preset budget limit without decrypting the ciphertext result and without relying on a trusted third party. This eliminates the risk of privacy leakage and improves the credibility of the verification. Therefore, this application solves the technical problem in the prior art where the inability to effectively extract multi-dimensional features and perform zero-knowledge verification for budget compliance in the ciphertext state of engineering supervision data leads to insufficient data security sharing.

[0020] Furthermore, this application first obtains the intermediate ciphertext value by calculating the product of the ciphertext values ​​at corresponding positions in the unit price ciphertext vector and the consumption ciphertext vector. Without decrypting the unit price data and consumption data, it utilizes the multiplicative homomorphic properties of homomorphic encryption to achieve ciphertext collaborative calculation of material unit price and inventory consumption, directly obtaining the capital vector representing the cost of each target material.

[0021] Subsequently, by taking the modulus of the sum of the intermediate ciphertext values ​​at corresponding positions in all funding vectors using the ciphertext space modulus, the aggregation operation of cost data across warehouse nodes and target materials in a completely ciphertext state was realized by utilizing the homomorphic properties of addition in homomorphic encryption. The entire calculation process can obtain the target funding vector without decrypting any intermediate results.

[0022] This encrypted collaborative calculation mechanism based on homomorphic algebra operations and homomorphic addition not only ensures the privacy protection of unit price fluctuation characteristics and inventory consumption characteristics during the calculation process, but also avoids the risk of privacy leakage caused by decrypting intermediate data. Therefore, this application further solves the technical problem in the prior art where insufficient encrypted collaborative calculation mechanisms prevent cost data from being aggregated across nodes in a completely encrypted state. Attached Figure Description

[0023] To more clearly illustrate the technical solutions of the embodiments of this application or the prior art, 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.

[0024] Figure 1 A flowchart illustrating a method for securely sharing engineering supervision data based on homomorphic encryption, provided in an embodiment of this application; Figure 2 A flowchart illustrating a method for generating unit-price vectors provided in an embodiment of this application; Figure 3 A flowchart illustrating a method for generating a consumption vector provided in an embodiment of this application; Figure 4 A schematic diagram of the structure of an engineering supervision data security sharing system based on homomorphic encryption, provided for an embodiment of this application; Figure 5 This is a schematic diagram of the hardware structure of an electronic device provided in one embodiment of this application. Detailed Implementation

[0025] In the scenario of secure data sharing in engineering supervision, existing technologies face a dual dilemma: On the one hand, in the data feature extraction stage, traditional solutions simply encrypt material unit price fluctuation data and inventory consumption data as independent values, lacking a structured capture mechanism for the time-series evolution of unit price and changes in inventory consumption rate, resulting in the encrypted ciphertext data being unable to effectively carry multi-dimensional feature information.

[0026] On the other hand, in the budget compliance verification stage, existing solutions, in order to prove that the total cost does not exceed the budget limit, have to either decrypt the encrypted results for the supervisor to review or introduce a trusted third party as a verification intermediary. The former directly exposes sensitive data, causing privacy leaks, while the latter relies on external trust assumptions, leading to doubts about the credibility of the verification. The essence of this contradiction lies in the insufficient adaptability of encrypted computation and zero-knowledge proof technology in the specific scenarios of engineering supervision, and there is an urgent need for a collaborative solution that integrates multi-dimensional feature extraction and encrypted verification capabilities.

[0027] To address the aforementioned issues, this application proposes a secure data sharing method for engineering supervision based on homomorphic encryption. Its core lies in constructing a two-way feature extraction mechanism for a unit price fluctuation matrix and an inventory line graph, and combining this with zero-knowledge proof technology based on Pedersen commitments to achieve full-process secure verification. Specifically, by constructing a unit price fluctuation matrix from material quotation records according to time sub-intervals and extracting row vectors to obtain a unit price vector, the time-series change characteristics of unit prices are captured. Simultaneously, inventory ledger records are mapped to inventory lines in a discrete coordinate system, and the first-order difference is calculated to obtain a consumption vector representing the inventory consumption rate characteristics.

[0028] Building upon this foundation, homomorphic encryption public keys are used to perform modular exponentiation on the unit price vector and consumption vector, transforming them into ciphertext vectors. Homomorphic algebraic operations are then used to perform cost aggregation calculations across warehouse nodes in a fully ciphertext state, yielding the target funding vector without decrypting intermediate results, thus ensuring data privacy. Furthermore, a Pedersen commitment value is constructed on the target funding vector, and a zero-knowledge proof is generated by combining it with a challenge value obtained through hash calculation. Supervisory nodes can then verify whether costs exceed preset budget limits without decrypting the ciphertext results or relying on a trusted third party.

[0029] This method solves the problem of insufficient data security sharing in existing technologies due to the inability of encrypted data to carry multi-dimensional feature information and the need to expose plaintext or rely on external trust for budget verification. It achieves full-link privacy protection for engineering supervision data from feature extraction, encrypted calculation to compliance verification.

[0030] To enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments. Obviously, the described embodiments are merely some embodiments of the present application, and not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0031] To address the problems of existing technologies, embodiments of this application provide a method, apparatus, device, computer storage medium, and computer program product for secure sharing of engineering supervision data based on homomorphic encryption. The method for secure sharing of engineering supervision data based on homomorphic encryption provided in this application embodiment will be described first below.

[0032] Figure 1 This illustration shows a flowchart of a method for securely sharing engineering supervision data based on homomorphic encryption, according to an embodiment of this application. Figure 1 As shown, the method includes: S101. Obtain the ledger records and material quotation records for each warehousing node within the target time period. The material quotation records include multiple quotation information from multiple suppliers for each target material.

[0033] A warehousing node refers to a material storage and circulation management unit set up by each participating contractor at the construction site or storage area in a large-scale engineering project, with each warehousing node independently recording the entry and exit of materials within its jurisdiction. Ledger records refer to all inbound and outbound flow information generated by each warehousing node for each type of target material within a target time period, including batch number, quantity, and corresponding flow time.

[0034] Material quotation records refer to all quotation information submitted by multiple suppliers for each target material within a target time period, including supplier identification, quotation time, and corresponding settlement unit price. Target materials refer to the core procurement material categories in the project that are included in the cost compliance audit scope, and can be bulk materials such as steel, cement, and sand.

[0035] In the scenario of cost compliance auditing for large-scale projects jointly contracted by multiple parties, the first step is to determine the target time period. The project includes Each storage node is denoted as... Each warehousing node It manages a separate material storage area.

[0036] Its ledger records Including the node in Internally, a complete outbound consumption record for all target materials is provided, with each record including the time of transfer and the corresponding cumulative quantity transferred. , represented as ,in For warehousing nodes During the target time period Total number of internal circulation channels For the first The timing of the transfer of a secondary transfer event. For the first The cumulative turnover quantity corresponding to each turnover event is the total amount of all consumption and outbound quantities of the material from the start of the time period to that moment.

[0037] At the same time, the project involves The target materials are denoted as Targeting the materials and Multiple suppliers within the target time period Submitted multiple quotations and obtained a record of material quotations. ,in In order to target materials During the target time period Total number of quotes within the transaction history. For the first The supplier identifier corresponding to each quotation record. For the first The quotation time corresponding to each quotation transaction. For the first The settlement unit price corresponding to each quotation transaction.

[0038] S102. Construct a unit price fluctuation matrix for each target material based on the material quotation records, and obtain the unit price vector for each target material by extracting the row vectors in the unit price fluctuation matrix.

[0039] Optionally, step S102, which involves constructing a unit price fluctuation matrix for each target material based on the material quotation records and obtaining the unit price vector for each target material by extracting the row vectors within the unit price fluctuation matrix, may specifically include: Figure 2 A flowchart illustrating a method for generating unit price vectors according to an embodiment of this application is shown. Figure 2 As shown, the method includes: S1021. Extract multiple quotation times and corresponding unit prices for each target material from the material quotation records. Divide all quotation times into corresponding continuous time sub-intervals. Arrange all unit prices in each time sub-interval to obtain row vectors. Arrange all row vectors according to the time order of the time sub-intervals to obtain the unit price fluctuation matrix.

[0040] The unit price fluctuation matrix refers to a two-dimensional numerical array formed by vertically stacking all settlement unit prices in the quotation records of each target material according to time sub-intervals, with each row of the matrix corresponding to the sequence of all settlement unit prices within a time sub-interval.

[0041] Time sub-interval refers to the time period within the target time period. The unit price fluctuation matrix is ​​a continuous and non-overlapping time period that is evenly divided according to a preset time interval length. It can be a time period of equal length, measured in weeks, ten-day periods, or months. A row vector is a sequence of values ​​in a row corresponding to a certain time sub-interval in the unit price fluctuation matrix. It includes all settlement unit prices submitted by all suppliers for the same target material within that time sub-interval, arranged in chronological order of the corresponding quotation times.

[0042] During the implementation of the plan, the first step was to start with the material quotation records. Extract target materials All quotation times and corresponding settlement unit prices, for the target time period Divide the time intervals evenly according to the preset time interval length. Let be a continuous time subinterval, denoted as . ,in Indicates the first time sub-intervals and .

[0043] Next Each quote in the log is arranged according to the quote time. Substitute into the corresponding time sub-interval For those falling into the same time sub-interval All settlement unit prices within the range are arranged in chronological order of quotation time to obtain the [number]. The initial sequence corresponding to each time sub-interval.

[0044] Then set the preset maximum number of bids. For lengths that are insufficient The initial sequence is padded with the last valid bid price at the end, resulting in all sequences of length 1. row vectors ,in This represents the last settlement unit price within this sub-interval. Finally, the row vector is aligned across all dimensions according to the time order of the time sub-intervals. Vertical stacking yields the target materials. Normalized unit price fluctuation matrix .

[0045] S1022. Based on the maximum and minimum value of the quoted unit price in the row vector of the unit price fluctuation matrix, concatenate the extreme value pairs of each row vector to obtain the extreme value pairs, and construct the unit price vector of each target material based on all extreme value pairs.

[0046] An extreme value pair is a binary value pair obtained by concatenating the settlement price with the largest and smallest values ​​from a row vector of the price fluctuation matrix. It can be used as... In the form and in For the first The maximum value among all settlement unit prices within a given time sub-interval. It is the minimum value.

[0047] A unit price vector is a one-dimensional numerical sequence obtained by arranging the extreme value pairs corresponding to all row vectors of a target material in the order of time sub-intervals for a certain target material. It is used to represent the unit price fluctuation characteristics of the target material in each time sub-interval within the target time period.

[0048] During the implementation of the scheme, the unit price fluctuation matrix is ​​first extracted row by row. Each row vector in , respectively in The settlement unit price with the highest mid-position value The settlement unit price with the smallest value Next, and splicing to obtain the first The extreme value pairs corresponding to each time sub-interval Finally, all of them will be... The extreme value pairs corresponding to each time sub-interval Arranged sequentially according to the time sub-intervals, the target materials are obtained. unit price vector .

[0049] This embodiment retains the complete time-series distribution information of settlement unit prices within each time sub-interval. While effectively compressing the data size, it fully preserves the fluctuation range characteristics of unit prices within each time sub-interval, enabling the structured expression of quotation data from multiple suppliers and multiple time periods.

[0050] S103. By mapping the circulation quantity and circulation time of each target material in the ledger record to a preset discrete coordinate system, an inventory line is obtained, and the first difference of the inventory line is calculated to obtain the consumption vector of each target material.

[0051] Optionally, step S103, which maps the circulation quantity and circulation time of each target material in the ledger record to a preset discrete coordinate system to obtain an inventory line, and calculates the first difference of the inventory line to obtain the consumption vector of each target material, may specifically include: Figure 3 A flowchart illustrating a method for generating a consumption vector according to an embodiment of this application is shown. Figure 3 As shown, the method includes: S1031. Extract multiple circulation times and corresponding circulation quantities of each target material from the ledger records, and project them onto a discrete coordinate system with circulation time as the horizontal axis and circulation quantity as the vertical axis to obtain multiple discrete coordinate points of each target material.

[0052] A discrete coordinate system is a two-dimensional planar coordinate system established with the time of circulation as the horizontal axis and the quantity of circulation as the vertical axis. It is used to spatially represent material circulation events in the ledger records as coordinate points. A discrete coordinate point is a spatial point obtained by projecting the time of circulation and the corresponding quantity of circulation of a certain circulation event as the horizontal and vertical coordinate values, respectively, onto the discrete coordinate system. Each discrete coordinate point uniquely corresponds to a circulation record in the ledger.

[0053] During the implementation of the plan, the first step is to start with the ledger records. Extract target materials All circulation times and corresponding circulation quantities. Then, using... The x-axis value corresponds to the cumulative turnover quantity. Projecting the ordinate values ​​onto a discrete coordinate system, we obtain the first... discrete coordinate points and .

[0054] in For warehousing nodes Target materials During the target time period Total number of internal circulation channels For the first The flowing water's constant movement, This corresponds to the cumulative turnover quantity. Finally, for all... The flow of materials performs the above projection operation to obtain the target materials. At the warehousing node The set of all discrete coordinate points below .

[0055] S1032. Connect all discrete coordinate points according to the order of their circulation time to obtain the inventory line graph for each target material.

[0056] An inventory line graph is a graph formed by connecting all discrete coordinate points of a certain target material in a warehouse according to the order of its circulation time. It is used to represent the continuous trajectory of the inventory quantity of the target material changing over time within a target time period.

[0057] During the implementation of the scheme, the first step is to set the discrete coordinate points. All discrete coordinate points in the data are arranged according to the time of transition. Arranged from smallest to largest, we obtain a time-ordered sequence of coordinate points. Then, following this order, connect adjacent discrete coordinate points with line segments. and , i.e., connection and , and And so on, until a connection is made. and Ultimately, the target supplies were obtained. At the warehousing node Inventory line chart below .

[0058] S1033. Calculate the difference in the ordinate values ​​of adjacent discrete coordinate points in the inventory line graph, and construct the consumption vector for each target material based on all the differences.

[0059] The consumption vector is a one-dimensional numerical sequence obtained by arranging the differences in the ordinates of all adjacent discrete coordinate points in the inventory polygon of a certain target material at a certain storage node in chronological order of the turnover time. It is used to represent the inventory change of the target material between each adjacent turnover event, i.e., the inventory consumption rate characteristic.

[0060] During the implementation of the plan, the inventory line chart was first extracted segment by segment. adjacent discrete coordinate points and Their respective ordinate values and The difference between the ordinate values ​​of discrete coordinate points with later time periods and those with earlier time periods is calculated to obtain the first... Individual differences and .

[0061] Next, the inventory line chart was used. All Repeat the above difference calculation for adjacent discrete coordinate points to obtain Individual differences Finally, all the differences are arranged in chronological order of their transfer time to obtain the target material. At the warehousing node The consumption vector below .

[0062] This embodiment transforms the original transaction records into an intuitive time-series trajectory representation. While retaining the time-series changes in inventory quantity, it effectively extracts the inventory consumption rate characteristics between adjacent circulation events, enabling a structured representation of the dispersed ledger transaction data.

[0063] S104. Scaling and rounding the elements in the unit price vector and consumption vector respectively to obtain the corresponding integer vectors. Using the homomorphic encryption public key, performing modular exponentiation on the corresponding integer vectors to obtain the unit price ciphertext vector and consumption ciphertext vector. Performing homomorphic algebraic operations on the unit price ciphertext vector and consumption ciphertext vector to obtain the capital vector of each target material. Performing homomorphic addition on the capital vectors of all target materials in all storage nodes to obtain the target capital vector.

[0064] Optionally, the homomorphic encryption public key in step S104 includes the generator and the ciphertext space modulus.

[0065] Step S104 involves scaling and rounding the elements of the unit price vector and the consumption vector to obtain the corresponding integer vectors. The process of using the homomorphic encryption public key to perform modular exponentiation on these integer vectors to obtain the unit price ciphertext vector and the consumption ciphertext vector can specifically include: S1041. Multiply each element in the unit price vector and consumption vector by the preset scaling factor and round down to obtain the corresponding target integer. Construct the first integer vector and the second integer vector based on all the target integers.

[0066] The target integer refers to the non-negative integer obtained by multiplying an element of the unit price vector or consumption vector by a preset scaling factor and then rounding it down. It is used to convert real numbers containing decimals into the integer form required by homomorphic encryption operations.

[0067] First integer vector This refers to the integer sequence obtained by sequentially scaling and rounding all elements of a unit price vector and then arranging them in their original order. Second integer vector This refers to the integer sequence obtained by arranging all elements in the consumption vector in their original order after scaling and rounding.

[0068] Preset scaling factor This refers to a positive integer multiplier pre-set based on the decimal precision of the target material category, its unit price, and consumption data. The preset scaling factors are shown in Table 1 below: Table 1: Preset Scale Coefficient Comparison Table As shown in Table 1, Table 1 presents the correspondence between different target material categories and preset scaling factors. The value of the preset scaling factor is determined based on the number of decimal places of the unit price and consumption data of each target material. The more decimal places, the larger the scaling factor, to ensure that the target integer after scaling and rounding can completely retain the effective accuracy of the original value.

[0069] During the implementation of the scheme, the first step is to target the unit price vector. Locate the target materials according to Table 1. Corresponding preset scaling factor ,right Each element and Multiply and then round down to get the target integer. ,in Then all of them The target integers are arranged in their original order to obtain the target materials. The first integer vector .

[0070] Simultaneously targeting the consumption vector For each element With the same preset scaling factor Multiply and then round down to get the target integer. ,in Finally, all of them will be... Arrange the target integers in their original order to obtain the warehouse nodes. Target materials The second integer vector .

[0071] S1042. Generate a corresponding random number for each target integer in the first integer vector and the second integer vector, and perform a power operation with the generator as the base and the target integer as the exponent to obtain the first power value, and perform a power operation with the random number as the base and the ciphertext space modulus as the exponent to obtain the second power value.

[0072] Generator This refers to the preset base used in homomorphic encryption public keys for ciphertext space exponentiation. Ciphertext space modulus. This refers to the preset modulus in the homomorphic encryption public key used to limit the range of ciphertext values, and all results of ciphertext operations must be within the range of the modulus. Random numbers are generated within an integer space modulo 1. This refers to generating a random positive integer independently for each target integer during the ciphertext generation process. This is used to ensure that the same plaintext produces different ciphertexts under different encryption operations, thereby improving the indistinguishability of the ciphertext.

[0073] During the implementation of the scheme, the generator element in the homomorphic encryption public key is first obtained. With ciphertext space modulus Next, the first integer vectors are... With the second integer vector Each target integer in the dataset generates a corresponding random number independently. .

[0074] During the implementation of the scheme, the generator element in the homomorphic encryption public key is first obtained. With ciphertext space modulus The ciphertext space modulus Constructed into two independent large prime numbers and The product of, such as and All are 1024-bit prime numbers. Next are the first integer vectors. With the second integer vector Each target integer in the dataset generates a corresponding random number independently. To ensure the semantic security of the ciphertext, this random number... Must be in the mold Invertible multiplication group Randomly and uniformly selected from the middle satisfies .

[0075] During the implementation of the scheme, the first step is to obtain the homomorphic encryption public key parameters, including the basic modulus. Group generator and the ciphertext space modulus used for ciphertext operations. .in, Two independent large prime numbers and The product of and All are 1024-digit prime numbers. Based on the Paillier homomorphic encryption structure, it is set as follows: .

[0076] Next, they are the first integer vectors. With the second integer vector Each target integer in the dataset generates a corresponding random number independently. To ensure the semantic security of the ciphertext, this random number... Must be in the mold Invertible multiplication group Randomly and uniformly selected from the middle satisfies .

[0077] Then, for each target integer in the first integer vector Perform the following operations: With base, The first power value is obtained by exponentiation. ,by With base as the base and with basic modulus as the base The second power is obtained by exponentiation. Similarly, for each target integer in the second integer vector... The corresponding first power values ​​were obtained respectively. With the second power value .

[0078] S1043. Take the modulus of the product of the first power value and the second power value using the ciphertext space modulus to obtain the ciphertext value of each target integer. Construct a unit-price ciphertext vector based on all the ciphertext values ​​corresponding to the first integer vector, and construct a consumption ciphertext vector based on all the ciphertext values ​​corresponding to the second integer vector.

[0079] Ciphertext value This refers to the encrypted result obtained by multiplying the first and second powers of a value and then taking the modulus of the ciphertext space. It is the unique representation of the target integer in the ciphertext space. (Monovalent ciphertext vector) This refers to the first integer vector The ciphertext sequence obtained by arranging the ciphertext values ​​corresponding to all target integers in their original order. (Consumes the ciphertext vector.) This refers to the second integer vector The ciphertext sequence is obtained by arranging the ciphertext values ​​corresponding to all target integers in their original order.

[0080] During the implementation of the scheme, the first integer vector is first... Each target integer The corresponding first power value With the second power value Calculate the product and use the ciphertext space modulus. Right now Taking the modulo of the product yields the corresponding ciphertext value. Next, the first integer vector... All The ciphertext values ​​corresponding to the target integers are arranged in their original order to obtain the target materials. unit price ciphertext vector .

[0081] Similarly, for the second integer vector Each target integer The corresponding first power value With the second power value Calculate the product and use Modulo operation yields the ciphertext value. , will all The encrypted values ​​are arranged in their original order to obtain the storage node. Target materials Consumption of ciphertext vector .

[0082] Optionally, step S104, which involves obtaining the capital vector for each target material by performing homomorphic algebraic operations on the unit price ciphertext vector and the consumption ciphertext vector, and then performing homomorphic addition on the capital vectors of all target materials across all storage nodes to obtain the target capital vector, may specifically include: S1044. Calculate the intermediate ciphertext value by multiplying the unit price ciphertext vector with the ciphertext value at the corresponding position in the consumption ciphertext vector. Construct the fund vector for each target material based on all intermediate ciphertext values.

[0083] Intermediate ciphertext value It refers to the ciphertext result obtained by multiplying the unit price ciphertext vector with the corresponding ciphertext value in the consumption ciphertext vector in the ciphertext space, and its corresponding product of unit price and consumption quantity in the plaintext space is the material consumption cost within a certain time sub-interval.

[0084] Funds Vector It refers to the ciphertext sequence obtained by arranging the intermediate ciphertext values ​​of all corresponding positions in the unit price ciphertext vector and the consumption ciphertext vector of a certain target material in the original order at a certain storage node, and is used to represent the ciphertext consumption cost of the target material in each time sub-interval at that storage node.

[0085] During the implementation of the scheme, the unit price ciphertext vector is first extracted. With consumed ciphertext vector The ciphertext value at the corresponding position is used to calculate the product of the two ciphertext values ​​to obtain the intermediate ciphertext value. ,in Next, the intermediate ciphertext values ​​at all corresponding positions are arranged in their original order to obtain the storage node. Target materials Fund vector .

[0086] S1045. Take the modulus of the sum of the intermediate ciphertext values ​​at corresponding positions in all capital vectors using the ciphertext space modulus to obtain the target ciphertext value, and construct the target capital vector based on all target ciphertext values.

[0087] Target ciphertext value This refers to the ciphertext result obtained by taking the sum of all intermediate ciphertext values ​​at corresponding positions in all funding vectors modulo the ciphertext space modulus, and representing the total consumption cost of all target materials at that position across all storage nodes in the plaintext space. Target funding vector It refers to the ciphertext sequence obtained by arranging all target ciphertext values ​​in their original order, and is used to represent the distribution of the total ciphertext consumption cost of the entire project within the target time period.

[0088] During the implementation of the plan, all warehousing nodes were first extracted. All target materials Corresponding capital vector .

[0089] Subsequently, in order to aggregate the overall cost of the project, the additive homomorphic property of the homomorphic encryption algorithm was utilized to analyze all funds in the same position. The intermediate ciphertext values ​​are homomorphically multiplied, and this homomorphic algebraic operation maps to the plaintext space, resulting in a direct summation of the values, modulo the ciphertext space. Taking the modulo of the product, we get the first... Target ciphertext value ,in Represents storage nodes Target materials Fund vector The Middle The middle ciphertext value at each position. Then, all target ciphertext values ​​are arranged in their original order to obtain the target funds vector. .

[0090] This embodiment preserves the effective accuracy of the original values. It achieves a complete mapping of unit price data and consumption data to the encrypted space, and completes the summary calculation of consumption costs across the entire project in a fully encrypted state.

[0091] S105. The challenge value is obtained by hashing the Pedersen commitment value determined based on the target funding vector. The Pedersen commitment value is numerically transformed using the preset budget limit and the challenge value to generate a zero-knowledge proof. The target funding vector and the zero-knowledge proof are sent to the supervision node for verification.

[0092] Optionally, the process of obtaining the challenge value by hashing the Pedersen commitment value determined based on the target funding vector in step S105 may specifically include: S1051. Generate a corresponding random blinding number for each target ciphertext value in the target funding vector. Perform a power operation with the target ciphertext value as the exponent to obtain a third power value. Perform a power operation with the random blinding number as the exponent to obtain a fourth power value.

[0093] Randomized blinding number This refers to a random positive integer independently generated for each target ciphertext value in the target funding vector, used to randomize and mask the target ciphertext values ​​when constructing the Pedersen commitment value to ensure that the commitment value does not reveal the original information of the target ciphertext value.

[0094] Preset first commitment base With the pre-set second commitment base These refer to two independent baselines pre-defined during the Pedersen commitment construction process. The first and second pre-defined baselines are set according to different security levels, as shown in Table 2 below: Table 2: Comparison Table of Pre-set Commitment Baseline As shown in Table 2, Table 2 gives the corresponding values ​​of the preset first commitment base and the preset second commitment base under different security level scenarios. and The value of must satisfy the requirement that they are independent generators in the group of integers defined by the preset commitment modulus. The higher the security level, the longer the base number, in order to ensure the concealment and binding of the commitment value.

[0095] During the implementation of the plan, the first step is to start with the target funding vector. Extract each target ciphertext value one by one , for each Generate the corresponding random blinding number independently. Next, find the preset first commitment base corresponding to the current security level according to Table 2. With the pre-set second commitment base For each target ciphertext value Perform the following operations: With base, The third power is obtained by exponentiation. .by As the base, with random blinded numbers The fourth power is obtained by exponentiation. .

[0096] S1052. Take the modulo of the product of the third power value and the fourth power value using the preset commitment modulo to obtain the intermediate commitment value of each target ciphertext value. Take the modulo of the sum of all intermediate commitment values ​​using the preset commitment modulo to obtain the Pedersen commitment value. Input the Pedersen commitment value into the hash function to obtain the challenge value.

[0097] Intermediate commitment value This refers to the value obtained by taking the modulus of the product of the third and fourth powers modulo a preset commitment modulus. It represents the one-way commitment result of the target ciphertext value at the corresponding position in the commitment space. Preset commitment modulus It refers to the preset modulus used to limit the range of commitment values ​​during the Pedersen commitment construction process.

[0098] Pedersen's commitment value This refers to the aggregated commitment result obtained by taking the modulo of the sum of all intermediate commitment values ​​with a preset commitment modulus, and is used to represent the dense state mapping of the target funding vector in the commitment space. Challenge Value This refers to the output value obtained after inputting the Pedersen commitment value into a hash function, which is used in non-interactive zero-knowledge proofs to replace the verifier's random challenge, thus ensuring the unpredictability of the proof process. The preset commitment modulus is set according to different security levels, as shown in Table 3 below: Table 3: Preset Commitment Modulus Comparison Table Table 3 shows the corresponding values ​​and generation requirements of the preset commitment modulus under different security level scenarios. To ensure the discrete logarithmic difficulty assumption of the Pedersen commitment holds, the preset commitment modulus... It must be selected as a safe large prime number, and there must exist a large prime number. That is, the proof modulus is strictly divisible. This makes the preset first commitment base With the second commitment base All belong to the model The next level is Multiplicative subgroups.

[0099] Regarding specific numerical configurations, referencing industry standard security strength recommendations: for the standard level, equivalent to 112-bit security strength, the preset commitment modulus is... The bit length is configured to be 2048 bits; for the enhanced level, which is equivalent to 128-bit security strength, the preset commitment modulus is... The bit length is configured to be 3072 bits; for high security levels, a preset commitment modulus is used. The bit length is configured to be 7680 bits.

[0100] During the implementation of the plan, first find the preset commitment modulus corresponding to the current security level according to Table 3. For each target ciphertext value The corresponding third power value With the fourth power value Calculate the product and use the preset commitment modulus. Taking the modulo of the product, we get the first... Intermediate commitment value .

[0101] Next, the intermediate commitment values ​​corresponding to all target ciphertext values ​​are... Perform an additive obfuscated aggregation operation, sum the results, and use the predefined commitment modulus. Taking the modulo of the sum yields a disordered Pedersen commitment aggregate value. Finally, this aggregated value Input a preset hash function, and use the output value of the hash function as the challenge value. ,Right now .

[0102] Optionally, step S105, which involves numerically transforming the Pedersen commitment value using a preset budget limit and challenge value to generate a zero-knowledge proof, and then sending the target funding vector and the zero-knowledge proof to the monitoring node for verification, may specifically include: S1053. Calculate the product of the challenge value and the preset budget limit to obtain the limit adjustment value, and take the modulo of the difference between the random blinding number and the limit adjustment value using the preset proof modulus to obtain the proof response value for each target ciphertext value.

[0103] Preset budget limit This refers to the pre-set upper limit threshold of the total project cost at each supervision node, used as a reference benchmark for cost compliance verification in zero-knowledge proofs. Pre-set budget limits for different project scale scenarios can be found in Table 4. Limit Adjustment Value This refers to the intermediate value obtained by multiplying the challenge value by the preset budget limit, and is used to encode the budget constraint into the calculation process of the proof response. The preset budget limit is set according to different project scales, as shown in Table 4 below: Table 4: Preset Budget Limit Comparison Table As shown in Table 4, Table 4 provides the corresponding reference values ​​for the preset budget limit under different project scale scenarios. The preset budget limit is determined in advance by the supervision node based on the total cost ceiling agreed in the project contract. The larger the project scale, the higher the corresponding preset budget limit, so as to ensure that the compliance verification benchmark matches the actual project cost control requirements.

[0104] Preset proof modulus This refers to the preset module used to limit the range of calculation results during the proof response value calculation process. The preset proof module is set according to different security levels, as shown in Table 5 below: Table 5: Preset Proof Modulus Comparison Table As shown in Table 5, the table presents the corresponding values ​​of the preset proof modulus under different security level scenarios. The longer the number of digits in the preset proof modulus, the larger the value space of the proof response and the stronger the anti-counterfeiting capability. The higher the security level, the longer the number of digits in the corresponding preset proof modulus.

[0105] During the implementation of the plan, the challenge value obtained in S1052 is first utilized. Find the preset budget limit corresponding to the current project scale according to Table 4. ,calculate and The product of these two values ​​yields the limit adjustment value. Next, find the preset proof module corresponding to the current security level according to Table 5. For the target capital vector Each target ciphertext value Corresponding random blinding number Adjustment value of the limit Calculate the difference and use a preset proof modulus. Taking the modulo of the difference yields the proof response value corresponding to each target ciphertext value. .

[0106] S1054. Construct a proof response vector based on all proof response values, concatenate the Pedersen commitment value and the proof response vector to obtain a zero-knowledge proof, and package the target funding vector and the zero-knowledge proof together and send them to the supervisor node for verification.

[0107] Prove the response vector Zero-knowledge proof refers to a one-dimensional numerical sequence obtained by arranging the proof response values ​​corresponding to all target ciphertext values ​​in their original order, which, together with the Pedersen commitment value, constitutes a complete zero-knowledge proof. This refers to the Pedersen commitment value. With proof response vector The data set obtained by splicing the data in a preset order can be used by the supervision nodes. Verify whether the total cost of the project exceeds the preset budget limit without decrypting the target funding vector.

[0108] During the implementation of the plan, all proof response values ​​will be first... Arranged in the original order, the proof response vector is obtained. Next, the Pedersen commitment value will be... With proof response vector By assembling the components in a preset order, a zero-knowledge proof can be obtained. Finally, the target funding vector will be... With zero-knowledge proof The data is packaged into a verification dataset and sent to the supervision node through a preset communication channel.

[0109] After receiving the verification dataset, the monitoring node performs the following verification process: First from Extracting Pedersen commitment values With proof response vector ,Will The same preset hash function as the generator is input, and the verification challenge value is recalculated. .

[0110] Next, find the corresponding preset first commitment base according to Tables 2 and 3. Preset second commitment base With preset commitment modulus And find the preset budget limit according to Table 4. Targeting the funding vector Each target ciphertext value and the corresponding proof response value Calculate the verification element .

[0111] in For With base, The result of exponentiation. For With base, The result of exponentiation. For With base, The result of exponentiation. Then, all validation elements are processed. Summation, and using a preset commitment modulus. Taking the modulo of the sum yields the verified aggregate value. .

[0112] The aggregate value will eventually be verified. With Pedersen commitment value Perform a comparison, if The verification is successful, confirming that the total cost of the entire project has not exceeded the preset budget limit; if If the verification fails, it indicates that there is an anomaly in the cost data.

[0113] This embodiment ensures that the commitment process does not disclose the original encrypted information. It replaces the random challenge of the verifier in non-interactive proofs, enabling the supervision node to verify whether the total cost of the entire project exceeds the budget limit in a fully encrypted state using only zero-knowledge proofs, thus achieving zero-knowledge secure sharing of engineering supervision data.

[0114] Secondly, this application provides a secure data sharing system for engineering supervision based on homomorphic encryption, comprising: Figure 4 This application provides a schematic diagram of a specific implementation of an engineering supervision data security sharing system based on homomorphic encryption, as illustrated in the embodiments of this application. Figure 4 The system may include: The acquisition module 410 is used to acquire the ledger records and material quotation records of each warehousing node within the target time period. The material quotation records include multiple quotation information from multiple suppliers for each target material. Module 420 is used to construct the unit price fluctuation matrix of each target material based on the material quotation record, and to obtain the unit price vector of each target material by extracting the row vectors in the unit price fluctuation matrix. The generation module 430 is used to obtain an inventory line by mapping the circulation quantity and circulation time of each target material in the ledger record to a preset discrete coordinate system, and to calculate the first difference of the inventory line to obtain the consumption vector of each target material. The generation module 430 is also used to scale and round the elements in the unit price vector and the consumption vector to obtain the corresponding integer vectors, use the homomorphic encryption public key to perform modular exponentiation on the corresponding integer vectors to obtain the unit price ciphertext vector and the consumption ciphertext vector, perform homomorphic algebraic operations on the unit price ciphertext vector and the consumption ciphertext vector to obtain the capital vector of each target material, and perform homomorphic addition on the capital vectors of all target materials in all storage nodes to obtain the target capital vector. The verification module 440 is used to obtain the challenge value by hashing the Pedersen commitment value determined based on the target funding vector, and to generate a zero-knowledge proof by numerically transforming the Pedersen commitment value using a preset budget limit and the challenge value. The target funding vector and the zero-knowledge proof are then sent to the supervision node for verification.

[0115] The homomorphic encryption-based secure sharing system for engineering supervision data in this application is used to implement the aforementioned homomorphic encryption-based secure sharing method for engineering supervision data. Therefore, the specific implementation of the homomorphic encryption-based secure sharing system for engineering supervision data can be found in the embodiment section of the homomorphic encryption-based secure sharing method for engineering supervision data above. The specific implementation can be referred to the description of the corresponding embodiments, which will not be repeated here.

[0116] Figure 5 A schematic diagram of the hardware structure of an electronic device provided in one embodiment of this application is shown.

[0117] The electronic device may include a processor 510 and a memory 520 storing computer program instructions.

[0118] Specifically, the processor 510 may include a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement the embodiments of this application.

[0119] Memory 520 may include mass storage for data or instructions. For example, and not limitingly, memory 520 may include a hard disk drive (HDD), floppy disk drive, flash memory, optical disk, magneto-optical disk, magnetic tape, or Universal Serial Bus (USB) drive, or a combination of two or more of these. Where appropriate, memory 520 may include removable or non-removable (or fixed) media. Where appropriate, memory 520 may be internal or external to the integrated gateway disaster recovery device. In a particular embodiment, memory 520 is non-volatile solid-state memory.

[0120] Memory may include read-only memory (ROM), random access memory (RAM), disk storage media devices, optical storage media devices, flash memory devices, and electrical, optical, or other physical / tangible memory storage devices. Therefore, typically, memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to the first aspect of this disclosure.

[0121] The processor 510 reads and executes computer program instructions stored in the memory 520 to implement any of the above embodiments of a method for secure sharing of engineering supervision data based on homomorphic encryption.

[0122] In one example, the electronic device may also include a communication interface 530 and a bus 540. Wherein, such as Figure 5 As shown, the processor 510, memory 520, and communication interface 530 are connected through bus 540 and complete communication with each other.

[0123] The communication interface 530 is mainly used to realize communication between various modules, devices, units and / or equipment in the embodiments of this application.

[0124] Bus 540 includes hardware, software, or both, that couples components of an online data traffic metering device together. For example, and not limitingly, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), HyperTransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an Infinite Bandwidth Interconnect, a Low Pin Count (LPC) bus, a memory bus, a Microchannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local (VLB) bus, or other suitable buses, or combinations of two or more of these. Where appropriate, bus 540 may include one or more buses. Although specific buses are described and illustrated in embodiments of this application, any suitable bus or interconnect is contemplated herein.

[0125] The electronic device can execute the homomorphic encryption-based secure sharing method for engineering supervision data in the embodiments of this application, thereby realizing the homomorphic encryption-based secure sharing method for engineering supervision data described in conjunction with the accompanying drawings.

[0126] Furthermore, in conjunction with the homomorphic encryption-based secure sharing method for engineering supervision data in the above embodiments, this application embodiment can provide a computer-readable storage medium for implementation. This computer-readable storage medium stores computer program instructions; when executed by a processor, these computer program instructions implement any of the homomorphic encryption-based secure sharing methods for engineering supervision data in the above embodiments.

[0127] It should be clarified that this application is not limited to the specific configurations and processes described above and shown in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of this application is not limited to the specific steps described and shown. Those skilled in the art can make various changes, modifications, and additions, or change the order of steps, after understanding the spirit of this application.

[0128] The functional blocks shown in the above-described structural diagram can be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, they can be, for example, electronic circuits, application-specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, etc. When implemented in software, the elements of this application are programs or code segments used to perform the required tasks. Programs or code segments can be stored on a machine-readable medium or transmitted over a transmission medium or communication link via data signals carried on a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio frequency (RF) links, etc. Code segments can be downloaded via computer networks such as the Internet, intranets, etc.

[0129] It should also be noted that the exemplary embodiments mentioned in this application describe methods or systems based on a series of steps or apparatus. However, this application is not limited to the order of the above steps; that is, the steps can be performed in the order mentioned in the embodiments, or in a different order, or several steps can be performed simultaneously.

[0130] The aspects of this application have been described above with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It should be understood that each block in the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that these instructions, executable via the processor of the computer or other programmable data processing apparatus, enable the implementation of the functions / actions specified in one or more blocks of the flowchart illustrations and / or block diagrams. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field-programmable logic circuit. It is also understood that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can also be implemented by dedicated hardware performing the specified functions or actions, or can be implemented by a combination of dedicated hardware and computer instructions.

[0131] The foregoing has provided a detailed description of a method and system for secure sharing of engineering supervision data based on homomorphic encryption, as provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are merely for the purpose of helping to understand the method and its core ideas. It should be noted that those skilled in the art can make various improvements and modifications to this application without departing from its principles, and these improvements and modifications also fall within the protection scope of this application.

Claims

1. A homomorphic encryption-based engineering supervision data security sharing method, characterized in that, include: Obtain the ledger records and material quotation records for each warehousing node within the target time period. The material quotation records include multiple quotation information from multiple suppliers for each target material. Based on the material quotation records, a unit price fluctuation matrix for each target material is constructed, and the unit price vector for each target material is obtained by extracting the row vectors in the unit price fluctuation matrix. By mapping the circulation quantity and circulation time of each target material in the ledger record to a preset discrete coordinate system, an inventory line is obtained, and the first difference of the inventory line is calculated to obtain the consumption vector of each target material. The elements in the unit price vector and the consumption vector are scaled and rounded to obtain corresponding integer vectors. The corresponding integer vectors are then subjected to modular exponentiation using a homomorphic encryption public key to obtain the unit price ciphertext vector and the consumption ciphertext vector. The unit price ciphertext vector and the consumption ciphertext vector are then subjected to homomorphic algebraic operations to obtain the capital vector for each target material. Finally, the capital vectors of all target materials in all storage nodes are subjected to homomorphic addition to obtain the target capital vector. The challenge value is obtained by hashing the Pedersen commitment value determined based on the target funding vector. The Pedersen commitment value is then numerically transformed using a preset budget limit and the challenge value to generate a zero-knowledge proof. The target funding vector and the zero-knowledge proof are then sent to the supervision node for verification.

2. The method of claim 1, wherein, The step of constructing a unit price fluctuation matrix for each target material based on the material quotation records, and obtaining the unit price vector for each target material by extracting the row vectors within the unit price fluctuation matrix, includes: Extract multiple quotation times and corresponding unit prices for each target material from the material quotation records. Divide all quotation times into corresponding continuous time sub-intervals. Arrange all unit prices in each time sub-interval to obtain row vectors. Arrange all row vectors according to the time order of the time sub-intervals to obtain the unit price fluctuation matrix. Based on the maximum and minimum values ​​of the quoted unit price in the row vectors of the unit price fluctuation matrix, the extreme value pairs of each row vector are concatenated to obtain the extreme value pairs, and the unit price vector of each target material is constructed based on all the extreme value pairs.

3. The method of claim 1, wherein, The process involves mapping the circulation quantity and circulation time of each target material in the ledger records to a preset discrete coordinate system to obtain an inventory line graph, and calculating the first difference of the inventory line graph to obtain the consumption vector of each target material, including: Extract multiple circulation times and circulation quantities corresponding to each circulation time from the ledger records, and project them onto the discrete coordinate system with the circulation time as the horizontal axis value and the circulation quantity as the vertical axis value to obtain multiple discrete coordinate points for each target material. Connect all the discrete coordinate points according to the order of the circulation time to obtain the inventory line of each target material; Calculate the difference in the ordinate values ​​of adjacent discrete coordinate points in the inventory polyline, and construct a consumption vector for each target material based on all the differences.

4. The method of claim 1, wherein, The homomorphic encryption public key includes a generator and a ciphertext space modulus; The process of scaling and rounding the elements in the unit price vector and the consumption vector to obtain corresponding integer vectors, and then performing modular exponentiation on the corresponding integer vectors using the homomorphic encryption public key to obtain the unit price ciphertext vector and the consumption ciphertext vector, includes: Each element in the unit price vector and the consumption vector is multiplied by a preset scaling factor and then rounded down to obtain the corresponding target integer. A first integer vector and a second integer vector are constructed based on all the target integers. For each target integer in the first integer vector and the second integer vector, generate a corresponding random number. Then, perform a power operation with the generator as the base and the target integer as the exponent to obtain a first power value. Finally, perform a power operation with the random number as the base and the ciphertext space modulus as the exponent to obtain a second power value. The ciphertext value of each target integer is obtained by taking the modulus of the ciphertext space modulus modulo the product of the first power value and the second power value. A unit-price ciphertext vector is constructed based on all the ciphertext values ​​corresponding to the first integer vector, and a consumption ciphertext vector is constructed based on all the ciphertext values ​​corresponding to the second integer vector.

5. The method of claim 4, wherein, The process of obtaining the capital vector for each target material by performing homomorphic algebraic operations on the unit price ciphertext vector and the consumption ciphertext vector, and obtaining the target capital vector by homomorphic addition of the capital vectors of all target materials across all storage nodes, includes: The intermediate ciphertext value is obtained by multiplying the unit price ciphertext vector with the ciphertext value at the corresponding position in the consumption ciphertext vector. The fund vector for each target material is constructed based on all the intermediate ciphertext values. The target ciphertext value is obtained by taking the modulus of the sum of the intermediate ciphertext values ​​at corresponding positions in all the fund vectors. The target fund vector is then constructed based on all the target ciphertext values.

6. The method of claim 5, wherein, The process of obtaining the challenge value by hashing the Pedersen commitment value determined based on the target funding vector includes: For each target ciphertext value in the target funding vector, a corresponding random blinding number is generated. A third power value is obtained by exponentiation with the target ciphertext value as the exponent and a preset first commitment base as the base. A fourth power value is obtained by exponentiation with the random blinding number as the exponent. The intermediate commitment value of each target ciphertext value is obtained by taking the modulus of the product of the third power value and the fourth power value using a preset commitment modulus. The Pedersen commitment value is obtained by taking the modulus of the sum of all the intermediate commitment values ​​using the preset commitment modulus. The Pedersen commitment value is then input into a hash function to obtain the challenge value.

7. The method according to claim 6, characterized in that, The step of generating a zero-knowledge proof by numerically transforming the Pedersen commitment value using a preset budget limit and the challenge value, and then sending the target funding vector and the zero-knowledge proof to the monitoring node for verification, includes: The limit adjustment value is obtained by multiplying the challenge value and the preset budget limit, and the difference between the random blinding number and the limit adjustment value is moduloed by the preset proof modulus to obtain the proof response value for each target ciphertext value. A proof response vector is constructed based on all the proof response values. The Pedersen commitment value is concatenated with the proof response vector to obtain the zero-knowledge proof. The target funding vector and the zero-knowledge proof are packaged together and sent to the supervision node for verification.

8. A homomorphic encryption-based engineering supervision data security sharing system, characterized in that, include: The acquisition module is used to acquire the ledger records and material quotation records of each warehousing node within the target time period. The material quotation records include multiple quotation information from multiple suppliers for each target material. The construction module is used to construct a unit price fluctuation matrix for each target material based on the material quotation record, and to obtain the unit price vector of each target material by extracting the row vectors in the unit price fluctuation matrix; The generation module is used to obtain an inventory line by mapping the circulation quantity and circulation time of each target material in the ledger record to a preset discrete coordinate system, and to calculate the first difference of the inventory line to obtain the consumption vector of each target material. The generation module is further configured to scale and round the elements in the unit price vector and the consumption vector respectively to obtain corresponding integer vectors, perform modular exponentiation on the corresponding integer vectors using the homomorphic encryption public key to obtain unit price ciphertext vector and consumption ciphertext vector, obtain the fund vector of each target material by performing homomorphic algebraic operations on the unit price ciphertext vector and the consumption ciphertext vector, and obtain the target fund vector by performing homomorphic addition on the fund vectors of all target materials of all storage nodes. The verification module is used to obtain a challenge value by hashing the Pedersen commitment value determined according to the target funding vector, to generate a zero-knowledge proof by numerically transforming the Pedersen commitment value using a preset budget limit and the challenge value, and to send the target funding vector and the zero-knowledge proof to the supervision node for verification.

9. An electronic device, comprising: include: Memory, used to store computer programs; A processor, configured to implement the steps of the method for secure sharing of engineering supervision data based on homomorphic encryption as described in any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, enables the implementation of the engineering supervision data secure sharing method based on homomorphic encryption as described in any one of claims 1 to 7.