CN116933299A - Tax electric data safety fusion method, tax electric node, equipment and medium - Google Patents
Tax electric data safety fusion method, tax electric node, equipment and medium Download PDFInfo
- Publication number
- CN116933299A CN116933299A CN202311197942.9A CN202311197942A CN116933299A CN 116933299 A CN116933299 A CN 116933299A CN 202311197942 A CN202311197942 A CN 202311197942A CN 116933299 A CN116933299 A CN 116933299A
- Authority
- CN
- China
- Prior art keywords
- tax
- electricity
- data
- ciphertext
- key
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000007500 overflow downdraw method Methods 0.000 title claims abstract description 18
- 230000005611 electricity Effects 0.000 claims abstract description 407
- 230000004927 fusion Effects 0.000 claims abstract description 101
- 239000012634 fragment Substances 0.000 claims abstract description 55
- 238000004422 calculation algorithm Methods 0.000 claims abstract description 54
- 238000013467 fragmentation Methods 0.000 claims abstract description 37
- 238000006062 fragmentation reaction Methods 0.000 claims abstract description 37
- 238000000034 method Methods 0.000 claims abstract description 26
- 238000004364 calculation method Methods 0.000 claims description 45
- 230000015654 memory Effects 0.000 claims description 27
- 238000003860 storage Methods 0.000 claims description 18
- 230000010354 integration Effects 0.000 claims description 10
- 238000005265 energy consumption Methods 0.000 claims description 7
- 238000005516 engineering process Methods 0.000 abstract description 6
- 239000000284 extract Substances 0.000 abstract description 2
- 238000009826 distribution Methods 0.000 description 12
- 230000008569 process Effects 0.000 description 8
- 238000004458 analytical method Methods 0.000 description 7
- 238000011161 development Methods 0.000 description 6
- 230000006872 improvement Effects 0.000 description 5
- 230000004888 barrier function Effects 0.000 description 3
- 230000008901 benefit Effects 0.000 description 3
- 238000010586 diagram Methods 0.000 description 3
- 230000002776 aggregation Effects 0.000 description 2
- 238000004220 aggregation Methods 0.000 description 2
- 238000004891 communication Methods 0.000 description 2
- 230000000295 complement effect Effects 0.000 description 2
- 238000004141 dimensional analysis Methods 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 239000007787 solid Substances 0.000 description 2
- 238000010276 construction Methods 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 238000009434 installation Methods 0.000 description 1
- 238000007726 management method Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 238000007619 statistical method Methods 0.000 description 1
- 238000005728 strengthening Methods 0.000 description 1
- 230000029305 taxis Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/602—Providing cryptographic facilities or services
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/245—Query processing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/25—Fusion techniques
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Databases & Information Systems (AREA)
- Health & Medical Sciences (AREA)
- Computer Hardware Design (AREA)
- General Health & Medical Sciences (AREA)
- Computational Linguistics (AREA)
- Bioethics (AREA)
- Software Systems (AREA)
- Life Sciences & Earth Sciences (AREA)
- Artificial Intelligence (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Bioinformatics & Computational Biology (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Evolutionary Biology (AREA)
- Evolutionary Computation (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
本发明涉及信息安全技术领域,公开了一种税电数据安全融合方法、税电节点、设备及介质,该方法包括:结合税务数据和电力数据计算税电数据融合指标;接收安全查询中心根据门限秘密共享算法拆分保序密钥获得的密钥分片;根据所述密钥分片对所述税电数据融合指标进行联合加密获得税电密文;基于接收到的查询区间从所述税电密文中查询得到位于所述查询区间的密文数据集;根据所述密钥分片对所述密文数据集进行联合解密得到查询结果。本发明通过基于门限秘密共享算法的保序密钥进行加解密,能够保证密钥以及数据安全性。
The invention relates to the field of information security technology and discloses a tax and electricity data security fusion method, tax and electricity nodes, equipment and media. The method includes: calculating a tax and electricity data fusion index by combining tax data and electricity data; receiving a security inquiry center according to a threshold The secret sharing algorithm splits the key fragments obtained by splitting the order-preserving key; jointly encrypts the tax and electricity data fusion index according to the key fragments to obtain the tax and electricity ciphertext; based on the received query interval, extracts the tax and electricity ciphertext from the key fragments. The electronic ciphertext is queried to obtain the ciphertext data set located in the query interval; the ciphertext data set is jointly decrypted according to the key fragmentation to obtain the query result. The present invention can ensure the security of keys and data by performing encryption and decryption with order-preserving keys based on the threshold secret sharing algorithm.
Description
技术领域Technical field
本发明涉及信息安全技术领域,具体涉及一种税电数据安全融合方法、税电节点、设备及介质。The invention relates to the field of information security technology, and specifically relates to a tax and electricity data security fusion method, tax and electricity nodes, equipment and media.
背景技术Background technique
随着大数据的发展,数据成为新的生产要素,近年来,相关指导意见要求不断强化大数据技术在经济运行研判和社会管理等领域的深层次应用,建设敏捷高效可复用的新一代数字技术基础设施。With the development of big data, data has become a new factor of production. In recent years, relevant guidance requires continuous strengthening of the in-depth application of big data technology in economic operation analysis and social management and other fields, and the construction of an agile, efficient and reusable new generation of digital technology. Technical infrastructure.
税务部门、电网公司均拥有平台、用户、数据、品牌等丰富数据资源,税务、电力数据规模巨大、种类繁多,具有全面、高频、实时、准确等特征,且双方数据均实现了集中管理,标准统一、易于采集。税务、电力数据具有良好的互补性,二者在行业分类与国民经济统计标准一致性较高,具备较好的数据融合基础,因此,通过对税务、电力数据的融合分析构建税电数据融合指标,在服务部门精准施策、企业提质增效等方面,具有重要意义。Both the tax department and the power grid company have rich data resources such as platforms, users, data, and brands. The tax and power data are huge in scale and of various types. They are comprehensive, high-frequency, real-time, and accurate, and the data of both parties have been centrally managed. The standards are unified and easy to collect. Taxation and electricity data are very complementary. The two are highly consistent in industry classification and national economic statistical standards, and have a good data fusion foundation. Therefore, tax and electricity data fusion indicators are constructed through the fusion analysis of taxation and electricity data. , which is of great significance in the precise implementation of policies by service departments and the improvement of quality and efficiency of enterprises.
保序加密是一种密文查询加密方法,密文大小关系反映明文大小关系。在实际应用中,数据拥有者需要将密钥发送给数据用户,对检索到密文集进行解密得到统计结果。但是数据用户可能是恶意的,同时目前保序加密无法应用于多用户的场景。因此,需要在能源架构下实现各方数据的保密需求,实现密文查询的同时保证密钥的安全。Order-preserving encryption is a ciphertext query encryption method, and the ciphertext size relationship reflects the plaintext size relationship. In practical applications, the data owner needs to send the key to the data user, and decrypt the retrieved ciphertext set to obtain statistical results. However, data users may be malicious, and currently order-preserving encryption cannot be applied to multi-user scenarios. Therefore, it is necessary to realize the confidentiality requirements of the data of all parties under the energy architecture, and ensure the security of the key while realizing ciphertext query.
发明内容Contents of the invention
有鉴于此,本发明提供了一种税电数据安全融合方法、税电节点、设备及介质,以解决现有方案中保序加密在多用户场景下进行数据融合和查询时不能保证密钥安全的技术问题。In view of this, the present invention provides a tax and electricity data secure fusion method, tax and electricity nodes, equipment and media to solve the problem that order-preserving encryption in the existing solution cannot ensure key security when performing data fusion and query in a multi-user scenario. technical issues.
第一方面,本发明提供了一种税电数据安全融合方法,应用于税电系统中的一个税电节点,所述税电系统包括多个税电节点,税电数据安全融合方法包括:结合税务数据和电力数据计算税电数据融合指标;接收安全查询中心根据门限秘密共享算法拆分保序密钥获得的密钥分片;根据所述密钥分片对所述税电数据融合指标进行联合加密获得税电密文;基于接收到的查询区间从所述税电密文中查询得到位于所述查询区间的密文数据集;根据所述密钥分片对所述密文数据集进行联合解密得到查询结果。In a first aspect, the present invention provides a tax and electricity data secure fusion method, which is applied to a tax and electricity node in a tax and electricity system. The tax and electricity system includes multiple tax and electricity nodes. The tax and electricity data secure fusion method includes: combining The tax data and electricity data calculate tax and electricity data fusion indicators; receive the key fragments obtained by splitting the order-preserving key according to the threshold secret sharing algorithm by the security query center; and perform the tax and electricity data fusion indicators according to the key fragments. joint encryption to obtain the tax and electricity ciphertext; based on the received query interval, query the tax and electricity ciphertext to obtain a ciphertext data set located in the query interval; and combine the ciphertext data sets according to the key fragmentation Decrypt to get the query results.
本发明实施例的一种税电数据安全融合方法,通过结合税务数据和电力数据计算税电数据融合指标,接收安全查询中心根据门限秘密共享算法拆分保序密钥获得的密钥分片,根据所述密钥分片对所述税电数据融合指标进行联合加密获得税电密文,基于接收到的查询区间从所述税电密文中查询得到位于所述查询区间的密文数据集,根据所述密钥分片对所述密文数据集进行联合解密得到查询结果,能够通过查询税电数据融合指标对经济发展状况进行分析,多个税电节点通过基于门限秘密共享算法拆分保序密钥获得的密钥分片对税电数据融合指标进行加解密,保序密钥需要多个密钥分片才能获得,因此每个税电节点需要其他税电节点发送的密钥分片才能重构出保序密钥,保证了密钥安全,并且由于通过保序密钥进行加解密,在查询税电数据融合指标时只需要对密文进行查询,然后把查询得到的密文数据集进行解密就可以得到查询结果,不需要对全部税电数据融合指标进行解密,保证数据安全性。A tax and electricity data security fusion method according to an embodiment of the present invention calculates tax and electricity data fusion indicators by combining tax data and electricity data, and receives the key fragments obtained by splitting the order-preserving key according to the threshold secret sharing algorithm by the security query center, Perform joint encryption on the tax and electricity data fusion index according to the key fragmentation to obtain the tax and electricity ciphertext, and query the tax and electricity ciphertext based on the received query interval to obtain the ciphertext data set located in the query interval, The ciphertext data set is jointly decrypted according to the key sharding to obtain query results, and the economic development status can be analyzed by querying tax and electricity data fusion indicators. Multiple tax and electricity nodes are split and protected through a threshold secret sharing algorithm. The key fragments obtained by the order key encrypt and decrypt the tax and electricity data fusion indicators. The order-preserving key requires multiple key fragments to obtain, so each tax and electricity node requires key fragments sent by other tax and electricity nodes. Only then can the order-preserving key be reconstructed, ensuring key security. Since encryption and decryption are performed through the order-preserving key, when querying tax and electricity data fusion indicators, you only need to query the ciphertext, and then query the ciphertext data. The query results can be obtained by decrypting the set. There is no need to decrypt all tax and electricity data fusion indicators to ensure data security.
在一可选实施例中,所述结合税务数据和电力数据计算税电数据融合指标,包括:结合税务数据和电力数据计算税电能效指标、用电能耗指标和税务经济指标,所述税电能效指标的计算公式为:In an optional embodiment, calculating tax and electricity data fusion indicators by combining tax data and electricity data includes: combining tax data and electricity data to calculate tax and electricity energy efficiency indicators, electricity consumption indicators and tax economic indicators. The calculation formula of the electrical energy efficiency index is:
式中,代表税电能效指标,/>表示税务本期用电量,/>表示电力本期用电量;所述用电能耗指标的计算公式为:In the formula, Represents tax electricity energy efficiency index,/> Indicates the electricity consumption in the tax period,/> Indicates the electricity consumption in this period; the calculation formula of the electricity consumption indicator is:
式中,表示用电能耗指标,/>、/>表示对应的权重系数,/>表示电力本期用户数,/>表示电力同期用户数,/>表示电力同期用电量;In the formula, Indicates the power consumption indicator,/> ,/> Indicates the corresponding weight coefficient,/> Indicates the number of electricity users in this period,/> Indicates the number of electricity users in the same period,/> Indicates electricity consumption during the same period;
所述税务经济指标的计算公式为:The calculation formula of the tax economic indicators is:
式中,表示税务经济指标,/>、/>表示对应的权重系数,/>表示税务本期用户数,/>表示税务同期用户数,/>表示税务同期用电量;将所述税电能效指标、所述用电能耗指标和所述税务经济指标分别乘以对应权重系数得到税电数据融合指标,所述税电数据融合指标的计算公式为:In the formula, Indicates tax economic indicators,/> ,/> Indicates the corresponding weight coefficient,/> Indicates the number of tax users in the current period,/> Indicates the number of tax users in the same period,/> represents the tax electricity consumption during the same period; multiply the tax electricity energy efficiency index, the electricity consumption index and the tax economic index by the corresponding weight coefficients to obtain the tax electricity data fusion index. Calculation of the tax electricity data fusion index The formula is:
式中,表示税电数据融合指标,/>、/>、/>表示对应的权重系数。In the formula, Indicates tax and electricity data fusion indicators,/> ,/> ,/> Indicates the corresponding weight coefficient.
通过结合税务数据和电力数据计算税电能效指标、用电能耗指标、税务经济指标、税电数据融合指标等指标,打通彼此的数据壁垒,解决单一数据存在的痛点问题,税电数据融合指标在服务部门精准施策、企业提质增效等方面,具有重要意义。By combining tax data and electricity data to calculate tax and electricity energy efficiency indicators, electricity consumption indicators, tax economic indicators, tax and electricity data fusion indicators and other indicators, we can break up each other's data barriers and solve the pain points of single data. Tax and electricity data fusion indicators It is of great significance in the precise implementation of policies by service departments and the improvement of quality and efficiency of enterprises.
在一可选实施例中,所述结合税务数据和电力数据计算税电能效指标、用电能耗指标和税务经济指标,包括:基于近似计算同态加密算法生成公私密钥对,所述公私密钥对包括公钥和私钥;根据所述公钥对税务数据和电力数据进行同态加密得到税务数据密文和电力数据密文;基于对应的计算公式,结合税务数据密文和电力数据密文进行密文融合计算,得到税电能效指标、用电能耗指标和税务经济指标。In an optional embodiment, the combination of tax data and electricity data to calculate tax energy efficiency indicators, electricity consumption indicators and tax economic indicators includes: generating a public-private key pair based on an approximate computing homomorphic encryption algorithm. The key pair includes a public key and a private key; the tax data and the power data are homomorphically encrypted according to the public key to obtain the tax data ciphertext and the power data ciphertext; based on the corresponding calculation formula, the tax data ciphertext and the power data are combined The ciphertext is fused and calculated to obtain the tax electricity energy efficiency index, electricity energy consumption index and tax economic index.
通过近似计算同态加密算法对税务数据和电力数据进行同态加密后基于密文进行密文融合计算,从而保证各个税电节点的数据安全。The tax data and power data are homomorphically encrypted using an approximate computing homomorphic encryption algorithm and then ciphertext fusion calculation is performed based on the ciphertext to ensure the data security of each tax and power node.
在一可选实施例中,所述根据所述密钥分片对所述税电数据融合指标进行联合加密获得税电密文,包括:基于门限秘密共享算法的门限值,请求获取其他税电节点的密钥分片;根据自身的密钥分片和其他税电节点的密钥分片计算得到保序密钥;基于所述保序密钥对所述税电数据融合指标进行加密获得税电密文。In an optional embodiment, jointly encrypting the tax and electricity data fusion indicators according to the key fragmentation to obtain the tax and electricity ciphertext includes: requesting to obtain other tax and electricity ciphertext based on the threshold value of the threshold secret sharing algorithm. The key fragmentation of the electricity node; the order-preserving key is calculated based on its own key fragmentation and the key fragmentation of other tax and electricity nodes; the tax and electricity data fusion index is obtained by encrypting the order-preserving key based on the key fragmentation Tax code cipher text.
通过请求获取其他税电节点的密钥分片恢复出保序密钥,在加密数据时需要得到其他税电节点的密钥分片,增加密钥的安全性。Recover the order-preserving key by requesting the key fragments of other tax and electricity nodes. When encrypting data, you need to obtain the key fragments of other tax and electricity nodes to increase the security of the key.
在一可选实施例中,所述基于接收到的查询区间从所述税电密文中查询得到位于所述查询区间的密文数据集,包括:基于等值数据归并的排序算法将本地的税电密文进行排序得到本地排序后的税电密文;基于接收到的查询区间从本地排序后的税电密文中查询得到位于所述查询区间的密文数据集。In an optional embodiment, querying the tax ciphertext based on the received query interval to obtain the ciphertext data set located in the query interval includes: sorting the local tax ciphertext based on equivalent data merging. The electronic ciphertext is sorted to obtain the locally sorted tax and electronic ciphertext; based on the received query interval, the locally sorted tax and electronic ciphertext is queried to obtain the ciphertext data set located in the query interval.
通过基于等值数据归并的排序算法实现税电密文的快速排序,提高查询效率。Through the sorting algorithm based on equivalent data merging, the tax and electricity ciphertext can be quickly sorted to improve query efficiency.
在一可选实施例中,所述根据所述密钥分片对所述密文数据集进行联合解密得到查询结果,包括:基于门限秘密共享算法的门限值,请求获取其他税电节点的密钥分片;根据自身的密钥分片和其他税电节点的密钥分片计算得到保序密钥;基于所述保序密钥对所述密文数据集进行解密得到查询结果。In an optional embodiment, the joint decryption of the ciphertext data set according to the key fragmentation to obtain the query result includes: requesting to obtain the information of other tax and electricity nodes based on the threshold value of the threshold secret sharing algorithm. Key fragmentation; calculate the order-preserving key based on its own key fragmentation and the key fragmentation of other tax and electricity nodes; decrypt the ciphertext data set based on the order-preserving key to obtain the query result.
通过请求获取其他税电节点的密钥分片解密密文数据集,实现本地数据查询。By requesting the key shard decryption ciphertext data set of other tax and electricity nodes, local data query can be realized.
在一可选实施例中,所述根据所述密钥分片对所述密文数据集进行联合解密得到查询结果,包括:将所述密钥分片和密文数据集发送给安全查询中心;通过所述安全查询中心基于等值数据归并的排序算法对接收到的各个税电节点发送的密文数据集进行联合排序,并通过所述安全查询中心结合其他所述税电节点发送的所述密钥分片对联合排序后的密文数据集进行联合解密得到查询结果。In an optional embodiment, jointly decrypting the ciphertext data set according to the key fragments to obtain query results includes: sending the key fragments and the ciphertext data set to a secure query center ; Use the security query center's sorting algorithm based on equivalent data merging to jointly sort the received ciphertext data sets sent by each tax and electricity node, and combine all the received ciphertext data sets sent by the other tax and electricity nodes through the security query center The key sharding is used to jointly decrypt the jointly sorted ciphertext data set to obtain the query result.
通过安全查询中心对接收到的各个税电节点发送的密文数据集进行联合排序,并通过所述安全查询中心结合其他所述税电节点发送的所述密钥分片对联合排序后的密文数据集进行联合解密得到查询结果,实现对多个税电节点的数据的查询。The security query center jointly sorts the received ciphertext data sets sent by each tax and electricity node, and uses the security query center to combine the key fragments sent by other tax and electricity nodes to jointly sort the ciphertext data sets. The text data set is jointly decrypted to obtain the query results, and the data of multiple tax and electricity nodes can be queried.
第二方面,本发明提供了一种基于税电数据安全融合的税电节点,包括:In the second aspect, the present invention provides a tax and electricity node based on the secure integration of tax and electricity data, including:
指标计算模块,用于结合税务数据和电力数据计算税电数据融合指标;The indicator calculation module is used to calculate tax and electricity data fusion indicators by combining tax data and electricity data;
密钥分片接收模块,用于接收安全查询中心根据门限秘密共享算法拆分保序密钥获得的密钥分片;The key fragment receiving module is used to receive the key fragments obtained by the security query center by splitting the order-preserving key according to the threshold secret sharing algorithm;
联合加密模块,用于根据所述密钥分片对所述税电数据融合指标进行联合加密获得税电密文;A joint encryption module, configured to jointly encrypt the tax and electricity data fusion index according to the key fragmentation to obtain the tax and electricity ciphertext;
查询模块,用于基于接收到的查询区间从所述税电密文中查询得到位于所述查询区间的密文数据集;A query module, configured to query the tax and electricity ciphertext based on the received query interval to obtain the ciphertext data set located in the query interval;
联合解密模块,用于根据所述密钥分片对所述密文数据集进行联合解密得到查询结果。A joint decryption module, configured to jointly decrypt the ciphertext data set according to the key fragmentation to obtain query results.
第三方面,本发明提供了一种计算机设备,包括:存储器和处理器,所述存储器和所述处理器之间互相通信连接,所述存储器中存储有计算机指令,所述处理器通过执行所述计算机指令,从而执行本发明第一方面提供的税电数据安全融合方法。In a third aspect, the present invention provides a computer device, including: a memory and a processor. The memory and the processor are communicatively connected to each other. Computer instructions are stored in the memory. The processor executes the instructions. The computer instructions are used to execute the tax and electricity data security fusion method provided by the first aspect of the present invention.
第四方面,本发明提供了一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有计算机指令,所述计算机指令用于使计算机执行本发明第一方面提供的税电数据安全融合方法。In a fourth aspect, the present invention provides a computer-readable storage medium, characterized in that computer instructions are stored on the computer-readable storage medium, and the computer instructions are used to cause the computer to execute the tax method provided in the first aspect of the present invention. Electronic data security fusion method.
附图说明Description of the drawings
为了更清楚地说明本发明具体实施方式或现有技术中的技术方案,下面将对具体实施方式或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施方式,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly explain the specific embodiments of the present invention or the technical solutions in the prior art, the accompanying drawings that need to be used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings in the following description The drawings illustrate some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without exerting any creative effort.
图1是本发明实施例的税电数据安全融合税电方法的流程示意图;Figure 1 is a schematic flow chart of a tax and electricity method for securely integrating tax and electricity data according to an embodiment of the present invention;
图2是本发明实施例的另一税电数据安全融合税电方法的流程示意图;Figure 2 is a schematic flowchart of another tax and electricity method for securely integrating tax and electricity data according to an embodiment of the present invention;
图3是本发明实施例的基于税电数据安全融合的税电节点的结构框图;Figure 3 is a structural block diagram of a tax and electricity node based on the secure integration of tax and electricity data according to an embodiment of the present invention;
图4是本发明实施例的计算机设备的硬件结构示意图。Figure 4 is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention.
具体实施方式Detailed ways
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments These are some embodiments of the present invention, rather than all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative efforts fall within the scope of protection of the present invention.
目前,税务部门、电网公司均拥有丰富数据资源,税务、电力数据具有良好的互补性,二者在行业分类与国民经济统计标准一致性较高,具备较好的数据融合基础。本发明实施例通过对税务、电力数据的融合分析构建税电数据融合指标以衡量单位用电带来的经济效益、社会电力能耗情况、社会税收经济情况以及社会经济发展情况,在服务部门精准施策、企业提质增效等方面,具有重要意义。At present, both tax authorities and power grid companies have abundant data resources, and tax and electricity data are highly complementary. The two have high consistency in industry classification and national economic statistical standards, and have a good data integration foundation. The embodiment of the present invention constructs a tax and electricity data fusion index through the fusion analysis of tax and electricity data to measure the economic benefits brought by unit electricity consumption, social electricity energy consumption, social taxation and economic conditions, and social and economic development, and is accurate in the service department. It is of great significance in terms of policy implementation and enterprise improvement in quality and efficiency.
根据本发明实施例,提供了一种税电数据安全融合方法,需要说明的是,在附图的流程图示出的步骤可以在诸如一组计算机可执行指令的计算机系统中执行,并且,虽然在流程图中示出了逻辑顺序,但是在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤。According to an embodiment of the present invention, a tax and electricity data security fusion method is provided. It should be noted that the steps shown in the flow chart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although A logical order is shown in the flowcharts, but in some cases, the steps shown or described may be performed in a different order than herein.
在本实施例中提供了一种税电数据安全融合方法,应用于税电系统中的一个税电节点,税电系统包括多个税电节点,其中,税电节点可以为设置在电网的电力端设备或设置在税务部门的税务端设备,电力端设备存储了本地的电力数据如用电量、业扩报装净增容量等,税务端设备存储了本地的税务数据,如发票开票金额、开具发票纳税人数量等,税务端设备和电力端设备可以进行交互获得彼此存储的本地数据密文。请参见图1和图2,本发明实施例的税电数据安全融合方法包括如下步骤:In this embodiment, a tax and electricity data security fusion method is provided, which is applied to a tax and electricity node in a tax and electricity system. The tax and electricity system includes multiple tax and electricity nodes, where the tax and electricity node can be an electric power set in the power grid. End equipment or tax end equipment set up in the tax department. The power end equipment stores local power data such as electricity consumption, industry expansion report and net added capacity, etc. The tax end equipment stores local tax data, such as invoice amount, The tax end device and the power end device can interact to obtain the local data ciphertext stored by each other, such as the number of taxpayers issuing invoices. Referring to Figures 1 and 2, the tax and electricity data security fusion method according to the embodiment of the present invention includes the following steps:
步骤S101,结合税务数据和电力数据计算税电数据融合指标。Step S101: Calculate tax and electricity data fusion indicators by combining tax data and electricity data.
具体地,对税电数据融合业务的数据语义、业务逻辑和业务目标进行分析,根据税电数据融合业务逻辑和目标抽取分布在不同数据库、不同数据表中的相关数据字段,包括电力经营数据、电力预期数据、税务经营数据和税务预期数据,具体如发票开票金额、开具发票纳税人数量、用电量、业扩报装净增容量等,构建税电数据融合业务数据空间,该数据空间中包含了计算税电数据融合指标所需要的税务数据和电力数据。Specifically, the data semantics, business logic and business goals of the tax and electricity data fusion business are analyzed, and relevant data fields distributed in different databases and different data tables are extracted according to the tax and electricity data fusion business logic and goals, including power operating data, Electric power expected data, tax operating data and tax expected data, such as invoice amount, number of taxpayers issuing invoices, electricity consumption, net increase in industry expansion report and installation capacity, etc., to build a tax and electricity data fusion business data space, in this data space Contains tax data and electricity data required to calculate tax and electricity data fusion indicators.
根据税电数据融合业务目标确定当前业务需要统计的区间分布边界值、此次需要统计分析的业务数据特征维度,将数据空间中的税务数据和电力数据进行整合对比获得税电数据总表,将税电数据总表中的原始数据通过分组统计、线性组合、数据运算等聚合操作完成用能单位的税电能效指标、月度用电指标、月度税务指标等指标的计算。从时间、区域、行业等多个维度构建税电数据总表,统计不同时间、空间和行业的税电数据融合指标,从而实现从年度、季度、月度等不同时间尺度、不同的空间区域、行业等角度分析税电数据,实现电力看经济的多维分析,解决数据合规制约下的税电数据多方安全高效统计问题。According to the tax and electricity data fusion business objectives, determine the interval distribution boundary values that need to be counted for the current business and the business data feature dimensions that require statistical analysis this time. The tax data and electricity data in the data space are integrated and compared to obtain a tax and electricity data summary table. The original data in the tax and electricity data summary table completes the calculation of tax and electricity energy efficiency indicators, monthly electricity consumption indicators, monthly tax indicators and other indicators of energy-consuming units through group statistics, linear combination, data operations and other aggregation operations. Construct a comprehensive table of tax and electricity data from multiple dimensions such as time, region, and industry, and count tax and electricity data fusion indicators at different times, spaces, and industries, thereby achieving yearly, quarterly, monthly, and other different time scales, different spatial regions, and industries. Analyze tax and electricity data from other angles, realize multi-dimensional analysis of electricity economics, and solve the problem of multi-party safe and efficient statistics of tax and electricity data under data compliance constraints.
步骤S102,接收安全查询中心根据门限秘密共享算法拆分保序密钥获得的密钥分片。Step S102: Receive the key fragments obtained by the security query center by splitting the order-preserving key according to the threshold secret sharing algorithm.
具体地,安全查询中心作为第三方安全认证中心,其选取保序加密算法获取保序密钥,保序密钥/>为对称密钥,即加解密共用同一密钥。安全查询中心确定密钥分片的持有者即税电节点的数量n以及门限值k,采用Shamir门限秘密共享算法拆分保序密钥得到n个密钥分片/>,将每个密钥分片分别发送给对应的持有者,每个税电节点接收并存储其中的一个对应密钥分片。Specifically, the security query center, as a third-party security certification center, selects an order-preserving encryption algorithm to obtain the order-preserving key. , order-preserving key/> It is a symmetric key, that is, encryption and decryption share the same key. The security query center determines the holders of key shards, namely the number n of tax and electricity nodes and the threshold value k, and uses the Shamir threshold secret sharing algorithm to split the order-preserving keys. Get n key shards/> , each key fragment is sent to the corresponding holder, and each tax electricity node receives and stores one of the corresponding key fragments.
其中,采用Shamir门限秘密共享算法拆分保序密钥得到n个密钥分片的过程包括:Among them, the Shamir threshold secret sharing algorithm is used to split the order-preserving key. The process of obtaining n key fragments includes:
步骤1:在1到p的有限域中随机取k-1个数,记做,/>,…,/>,将其作为k-1次多项式f(x)的非常数项的系数;Step 1: Randomly pick k-1 numbers in the finite field from 1 to p, recorded as ,/> ,…,/> , take it as the coefficient of the non-constant term of the k-1 degree polynomial f(x);
步骤2:构建多项式为...+/>;Step 2: Construct the polynomial as ...+/> ;
步骤3:n个持有者记作,持有者/>获得子密钥为/>。Step 3: n holders are recorded as , holder/> Get the subkey as/> .
步骤S103,根据密钥分片对税电数据融合指标进行联合加密获得税电密文。Step S103: Jointly encrypt the tax and electricity data fusion indicators based on key fragmentation to obtain the tax and electricity ciphertext.
具体地,根据Shamir门限秘密共享算法的原理可知,每个税电节点想要获得保序密钥至少需要得到k个密钥分片,即每个税电节点至少需要联合其他k-1个税电节点共同对税电数据融合指标进行联合加密得到税电密文。Specifically, according to the principle of the Shamir threshold secret sharing algorithm, each tax and electricity node needs to obtain at least k key shards to obtain an order-preserving key, that is, each tax and electricity node needs to combine at least k-1 other tax and electricity nodes. The electricity nodes jointly encrypt the tax and electricity data fusion indicators to obtain the tax and electricity ciphertext.
步骤S104,基于接收到的查询区间从税电密文中查询得到位于查询区间的密文数据集。Step S104: Query the tax and electricity ciphertext based on the received query interval to obtain the ciphertext data set located in the query interval.
具体地,查询区间为用户直接向税电节点输入的查询条件,以查询税电节点本地的数据;或向安全查询中心输入的查询条件,以查询全体税电节点存储的数据。在前一种情况中,本地税电节点联合其他税电节点基于密钥分片对查询区间进行加密,然后将查询区间密文和税电密文进行对比,得到密文数据集,查询得到的密文数据集为位于查询区间的税电密文。在后一种情况中,安全查询中心将查询区间进行保序加密后发送给各个税电节点,各个税电节点将加密后的查询区间和各自保存的税电密文进行对比,得到位于查询区间的本地的密文数据集,然后将密文数据集发送给安全查询中心,由安全查询中心对接收到的密文数据集进行整合。Specifically, the query range is a query condition input directly by the user to the tax and electricity node to query the local data of the tax and electricity node; or a query condition input to the security query center to query the data stored in all tax and electricity nodes. In the former case, the local tax and electricity node joins other tax and electricity nodes to encrypt the query interval based on key sharding, and then compares the query interval ciphertext with the tax and electricity ciphertext to obtain the ciphertext data set. The query obtained The ciphertext data set is the tax and electricity ciphertext located in the query interval. In the latter case, the security query center encrypts the query interval in order and sends it to each tax and electricity node. Each tax and electricity node compares the encrypted query interval with its own saved tax and electricity ciphertext to obtain the query interval. The local ciphertext data set is then sent to the security query center, and the security query center integrates the received ciphertext data set.
步骤S105,根据密钥分片对密文数据集进行联合解密得到查询结果。Step S105: Jointly decrypt the ciphertext data set according to the key fragmentation to obtain the query result.
具体地,在用户直接向税电节点查询本地数据时,税电节点需要联合其他k-1个税电节点共同对密文数据集进行联合解密得到查询结果。在用户向安全查询中心输入的查询条件时,税电节点将密钥分片和密文数据集发送给安全查询中心,通过安全查询中心根据接收到的密钥分片对密文数据集进行解密,得到查询结果。Specifically, when the user directly queries the local data from the tax and electricity node, the tax and electricity node needs to jointly decrypt the ciphertext data set with other k-1 tax and electricity nodes to obtain the query result. When the user inputs query conditions to the security query center, the tax and electricity node sends the key fragments and ciphertext data set to the security query center, and the security query center decrypts the ciphertext data set based on the received key fragments. , get the query results.
用户通过查询结果,可以知道各个时间、空间区域的税电数据融合指标,通过结合税务数据和电力数据计算的税电数据融合指标可以对经济发展情况进行客观分析。Through the query results, users can know the tax and electricity data fusion indicators of various time and space regions. The tax and electricity data fusion indicators calculated by combining tax data and electricity data can objectively analyze economic development.
本发明实施例的一种税电数据安全融合方法,通过结合税务数据和电力数据计算税电数据融合指标,接收安全查询中心根据门限秘密共享算法拆分保序密钥获得的密钥分片,根据密钥分片对税电数据融合指标进行联合加密获得税电密文,基于接收到的查询区间从税电密文中查询得到位于查询区间的密文数据集,根据密钥分片对密文数据集进行联合解密得到查询结果,能够通过查询税电数据融合指标对经济发展状况进行分析,多个税电节点通过基于门限秘密共享算法拆分保序密钥获得的密钥分片对税电数据融合指标进行加解密,保序密钥需要多个密钥分片才能获得,因此每个税电节点需要其他税电节点发送的密钥分片才能重构出保序密钥,保证了密钥安全,并且由于通过保序密钥进行加解密,在查询税电数据融合指标时只需要对密文进行查询,然后把查询得到的密文数据集进行解密就可以得到查询结果,不需要对全部税电数据融合指标进行解密,保证数据安全性。A tax and electricity data security fusion method according to an embodiment of the present invention calculates tax and electricity data fusion indicators by combining tax data and electricity data, and receives the key fragments obtained by splitting the order-preserving key according to the threshold secret sharing algorithm by the security query center, The tax and electricity data fusion indicators are jointly encrypted according to the key fragmentation to obtain the tax and electricity ciphertext. Based on the received query interval, the ciphertext data set located in the query interval is obtained from the tax and electricity ciphertext. The ciphertext is encrypted according to the key fragmentation. The data set is jointly decrypted to obtain the query results, which can analyze the economic development status by querying the tax and electricity data fusion indicators. Multiple tax and electricity nodes use the key shards obtained by splitting the order-preserving keys based on the threshold secret sharing algorithm to analyze the tax and electricity data. Data fusion indicators are used for encryption and decryption. The order-preserving key requires multiple key fragments to obtain. Therefore, each tax electricity node needs key fragments sent by other tax electricity nodes to reconstruct the order-preserving key, ensuring the encryption The key is secure, and since encryption and decryption are performed through order-preserving keys, when querying tax and electricity data fusion indicators, you only need to query the ciphertext, and then decrypt the ciphertext data set obtained by the query to obtain the query results. There is no need to All tax and electricity data fusion indicators are decrypted to ensure data security.
在一些可选实施例中,步骤S101中,结合税务数据和电力数据计算税电数据融合指标,包括:In some optional embodiments, in step S101, calculating tax and electricity data fusion indicators by combining tax data and electricity data includes:
步骤S1011,结合税务数据和电力数据计算税电能效指标、用电能耗指标和税务经济指标,税电能效指标的计算公式为:Step S1011, combine the tax data and electric power data to calculate the tax electricity energy efficiency index, electricity consumption index and tax economic index. The calculation formula of the tax electricity energy efficiency index is:
式中,代表税电能效指标,/>表示税务本期用电量,/>表示电力本期用电量;In the formula, Represents tax electricity energy efficiency index,/> Indicates the electricity consumption in the tax period,/> Indicates the electricity consumption in this period;
用电能耗指标的计算公式为:The calculation formula for the electricity consumption indicator is:
式中,表示用电能耗指标,/>、/>表示对应的权重系数,/>表示电力本期用户数,/>表示电力同期用户数,/>表示电力同期用电量;In the formula, Indicates the power consumption indicator,/> ,/> Indicates the corresponding weight coefficient,/> Indicates the number of electricity users in this period,/> Indicates the number of electricity users in the same period,/> Indicates electricity consumption during the same period;
税务经济指标的计算公式为:The calculation formula of tax economic indicators is:
式中,表示税务经济指标,/>、/>表示对应的权重系数,/>表示税务本期用户数,/>表示税务同期用户数,/>表示税务同期用电量。In the formula, Indicates tax economic indicators,/> ,/> Indicates the corresponding weight coefficient,/> Indicates the number of tax users in the current period,/> Indicates the number of tax users in the same period,/> Indicates electricity consumption during the tax period.
步骤S1012,将税电能效指标、用电能耗指标和税务经济指标分别乘以对应权重系数得到税电数据融合指标,税电数据融合指标的计算公式为:Step S1012: Multiply the tax and electricity energy efficiency index, the electricity consumption index and the tax economic index by the corresponding weight coefficients to obtain the tax and electricity data fusion index. The calculation formula of the tax and electricity data fusion index is:
式中,表示税电数据融合指标,/>、/>、/>表示对应的权重系数。In the formula, Indicates tax and electricity data fusion indicators,/> ,/> ,/> Indicates the corresponding weight coefficient.
具体地,税电能效指标用于分析单位能耗带来的经济效益,用电能耗指标用于分析社会电力能耗情况,税务经济指标/>用于分析社会税收情况,通过结合税务数据和电力数据计算税电能效指标、用电能耗指标、税务经济指标、税电数据融合指标等指标,打通彼此的数据壁垒,解决单一数据存在的痛点问题,税电数据融合指标在服务部门精准施策、企业提质增效等方面,具有重要意义。Specifically, the tax electricity energy efficiency index Used to analyze the economic benefits brought by unit energy consumption, electricity consumption indicators Used to analyze social electricity energy consumption, tax economic indicators/> Used to analyze social taxation situations, and calculate tax and electricity energy efficiency indicators, electricity consumption indicators, tax economic indicators, tax and electricity data fusion indicators and other indicators by combining tax data and electricity data to break through each other's data barriers and solve the pain points of single data. Question, tax and electricity data integration indicators are of great significance in the precise implementation of policies by service departments and the improvement of quality and efficiency of enterprises.
基于税电能效指标、用电能耗指标/>、税务经济指标/>综合计算得到的税电数据融合指标/>能够综合税收和用电情况对经济情况进行分析,可以从时间、区域、行业等多个维度构建税电数据融合指标多维分析模型,通过年度、季度、月度等不同时间尺度,实现结合电力税收看经济的多维分析。Based on tax electricity energy efficiency index , Electricity consumption index/> , tax economic indicators/> Comprehensive calculation of tax and electricity data fusion indicators/> It can analyze the economic situation comprehensively based on taxation and electricity consumption. It can build a multi-dimensional analysis model of tax and electricity data fusion indicators from multiple dimensions such as time, region, and industry, and realize a comprehensive analysis of electricity taxation through different time scales such as annual, quarterly, and monthly. Multidimensional analysis of economics.
在一些可选实施例中,步骤S1011中,结合税务数据和电力数据计算税电能效指标、用电能耗指标和税务经济指标,包括:In some optional embodiments, in step S1011, tax data and power data are combined to calculate tax power efficiency indicators, power consumption indicators and tax economic indicators, including:
步骤a1,基于近似计算同态加密算法生成公私密钥对,公私密钥对包括公钥和私钥。Step a1: Generate a public-private key pair based on the approximate computing homomorphic encryption algorithm. The public-private key pair includes a public key and a private key.
具体地,选择一个2的幂N,以及一个特殊模数P,定义,使得N和/>满足安全等级/>,Q为L层模数的规模,/>为Q的约数,L为密文层次,/>为定义的基在第L层的值,/>为安全等级参数,选择一个私钥相关的分布/>,一个错误分布/>,然后计算公私密钥对/>,计算过程如下:Specifically, choose a power N of 2, and a special modulus P, define , making N and/> Meet safety level/> ,Q is the scale of L layer module,/> is the divisor of Q, L is the ciphertext level,/> is the value of the defined basis at the Lth layer,/> For the security level parameter, select a private key related distribution/> , an error distribution/> , and then calculate the public-private key pair/> , the calculation process is as follows:
步骤1:实例化,以及/>;Step 1: Instantiate , and/> ;
步骤2:设置私钥;Step 2: Set up private key ;
步骤3:计算公钥,其中,/>。Step 3: Calculate the public key , where,/> .
其中,表示与私钥相关的分布,/>表示符合/>分布的一个样本,/>表示一个错误分布,/>表示符合/>分布的一个样本,/>表示私钥,/>表示公钥,/>表示明文空间,/>表示空间的样本。in, Represents the distribution associated with the private key, /> Indicates compliance/> A sample of the distribution,/> represents an error distribution, /> Indicates compliance/> A sample of the distribution,/> Represents the private key,/> Represents the public key,/> Represents plaintext space,/> express Sample of space.
步骤a2,根据公钥对税务数据和电力数据进行同态加密得到税务数据密文和电力数据密文。Step a2: Perform homomorphic encryption on the tax data and power data based on the public key to obtain the tax data ciphertext and power data ciphertext.
若税电节点为电力端设备,则其接收税务端节点发送的税务数据密文,并把自身的电力数据进行加密并把自身加密后的电力数据密文交换给对应的税务端节点,税电节点对税务数据或电力数据的加密过程如下:If the tax and electricity node is a power-end device, it receives the tax data ciphertext sent by the tax end node, encrypts its own power data, and exchanges its encrypted power data ciphertext to the corresponding tax end node. The node’s encryption process for tax data or power data is as follows:
选择一个随机分布用作加密,明文/>,生成/>,以及/>,构建密文/>。Choose a random distribution Used for encryption, plaintext/> , generate/> , and/> , construct ciphertext/> .
其中,表示明文空间,明文/>,/>表示一个错误分布,/>和/>表示符合/>分布的样本,/>表示一个随机分布,/>表示符合/>分布的一个样本,/>表示密文。in, Represents plaintext space, plaintext/> ,/> represents an error distribution, /> and/> Indicates compliance/> Distribution samples,/> Represents a random distribution,/> Indicates compliance/> A sample of the distribution,/> Represents cipher text.
步骤a3,基于对应的计算公式,结合税务数据密文和电力数据密文进行密文融合计算,得到税电能效指标、用电能耗指标和税务经济指标。Step a3: Based on the corresponding calculation formula, the tax data ciphertext and the electricity data ciphertext are combined to perform ciphertext fusion calculation to obtain the tax electricity energy efficiency index, electricity energy consumption index and tax economic index.
在计算税电能效指标、用电能耗指标/>、税务经济指标/>、税电数据融合指标/>等指标时,用到了乘法运算和加法运算,因此在进行密文计算时需要应用到密文加法、密文和明文相乘、密文和密文相乘三类算子,通过这三类算子构建密文统计计算逻辑进行密文融合计算,得到税电能效指标、用电能耗指标和税务经济指标,三类算子的计算公式如下:Energy efficiency indicators in calculating taxes , Electricity consumption index/> , tax economic indicators/> , Tax and electricity data fusion indicators/> When calculating other indicators, multiplication and addition operations are used. Therefore, when performing ciphertext calculations, three types of operators need to be applied: ciphertext addition, ciphertext and plaintext multiplication, and ciphertext and ciphertext multiplication. Through these three types of operators, Sub-construct the ciphertext statistical calculation logic to perform ciphertext fusion calculation, and obtain the tax electricity energy efficiency index, electricity consumption index and tax economic index. The calculation formulas of the three types of operators are as follows:
其中,表示明文空间,/>表示密文空间,明文/>,两个密文/>,表示密文和,/>表示密文和明文乘,/>表示密文和密文乘,/>表示辅助密钥,/>、/>和/>表示密文/>和/>的中间值,/>表示四舍五入。in, Represents plaintext space,/> Represents ciphertext space, plaintext/> , two ciphertexts/> , Represents the ciphertext sum,/> Represents the multiplication of ciphertext and plaintext,/> Represents the multiplication of ciphertext and ciphertext,/> Represents the auxiliary key,/> ,/> and/> Indicates ciphertext/> and/> The middle value of /> Indicates rounding.
基于密文融合计算,得到的是税电能效指标、用电能耗指标和税务经济指标的密文,将其根据税电数据融合指标的计算公式计算得到税电数据融合指标的密文,然后通过私钥对其进行解密,得到解密后的税电数据融合指标。Based on the ciphertext fusion calculation, the ciphertext of the tax and electricity energy efficiency index, the electricity consumption index and the tax economic indicator are obtained. The ciphertext of the tax and electricity data fusion index is calculated according to the calculation formula of the tax and electricity data fusion index. Then, Decrypt it through the private key to obtain the decrypted tax and electricity data fusion index.
在密文运算中,利用近似计算同态加密算法的密文加法、密文和密文相乘、密文和明文相乘实现税电数据的密文融合计算,密态计算结果通过私钥解密,通过加解密各方相互制约,强化多主体税电数据的数据保密能力。通过近似计算同态加密算法对税务数据和电力数据进行同态加密后基于密文进行密文融合计算,每个税电节点只收到其他税电节点发送的数据的密文而无法知道明文,从而保证在计算税电数据融合指标时各个税电节点的数据安全。In the ciphertext operation, the ciphertext addition, multiplication of ciphertext and ciphertext, and multiplication of ciphertext and plaintext of the homomorphic encryption algorithm are used to realize the ciphertext fusion calculation of tax and electricity data. The ciphertext calculation result is decrypted by the private key. , through mutual restraint between encryption and decryption parties, the data confidentiality capabilities of multi-subject tax and electricity data are strengthened. The tax data and electricity data are homomorphically encrypted using an approximate computing homomorphic encryption algorithm and then the ciphertext fusion calculation is performed based on the ciphertext. Each tax and electricity node only receives the ciphertext of the data sent by other tax and electricity nodes and cannot know the plaintext. This ensures the data security of each tax and electricity node when calculating tax and electricity data fusion indicators.
在一些可选实施例中,步骤S103,根据密钥分片对税电数据融合指标进行联合加密获得税电密文,包括:In some optional embodiments, step S103, perform joint encryption on tax and electricity data fusion indicators based on key fragmentation to obtain tax and electricity ciphertext, including:
步骤S1031,基于门限秘密共享算法的门限值,请求获取其他税电节点的密钥分片。Step S1031: Based on the threshold value of the threshold secret sharing algorithm, request to obtain the key shards of other tax and electricity nodes.
示例性地,门限秘密共享算法的门限值为k,税电节点需要在k个密钥分片的协助下加密税电数据融合指标,因此税电节点需要向其他k-1个税电节点发起请求以获得对应的密钥分片。其他税电节点同意加密请求后返回自身的密钥分片给发起请求的税电节点。For example, the threshold value of the threshold secret sharing algorithm is k, and the tax electricity node needs to encrypt the tax electricity data fusion index with the assistance of k key shards. Therefore, the tax electricity node needs to provide information to other k-1 tax electricity nodes. Initiate a request to obtain the corresponding key shard. Other tax and electricity nodes agree to the encryption request and return their own key fragments to the tax and electricity node that initiated the request.
步骤S1032,根据自身的密钥分片和其他税电节点的密钥分片计算得到保序密钥。Step S1032: Calculate the order-preserving key based on its own key fragments and the key fragments of other tax and electricity nodes.
具体地,通过k个密钥分片恢复出保序密钥的计算公式为:Specifically, the calculation formula for recovering the order-preserving key through k key fragments is:
其中,表示保序密钥,/>表示第i个密钥分片。in, Represents an order-preserving key,/> Represents the i-th key fragment.
步骤S1033,基于保序密钥对税电数据融合指标进行加密获得税电密文。Step S1033: Encrypt the tax and electricity data fusion index based on the order-preserving key to obtain the tax and electricity ciphertext.
可以理解的,在恢复出保序密钥后,基于保序密钥对税电数据融合指标进行加密获得税电密文。示例性地,税电节点j在k个密钥分片的协助下加密水电融合指标x,输出电密文y的过程表示为:It can be understood that after the order-preserving key is recovered, the tax and electricity data fusion indicators are encrypted based on the order-preserving key to obtain the tax and electricity ciphertext. For example, the tax and electricity node j encrypts the hydropower integration index x with the assistance of k key shards, and the process of outputting the electricity ciphertext y is expressed as:
通过请求获取其他税电节点的密钥分片恢复出保序密钥,在加密数据时需要得到其他税电节点的密钥分片,增加密钥的安全性。Recover the order-preserving key by requesting the key fragments of other tax and electricity nodes. When encrypting data, you need to obtain the key fragments of other tax and electricity nodes to increase the security of the key.
在一些可选实施例中,步骤S104,基于接收到的查询区间从税电密文中查询得到位于查询区间的密文数据集,包括:In some optional embodiments, step S104, query the tax and electricity ciphertext based on the received query interval to obtain the ciphertext data set located in the query interval, including:
步骤S1041,基于等值数据归并的排序算法将本地的税电密文进行排序得到本地排序后的税电密文。Step S1041, the local tax and electricity ciphertext is sorted based on the sorting algorithm of equivalent data merging to obtain the locally sorted tax and electricity ciphertext.
具体地,基于等值数据归并的排序算法利用分治法思想,将税电密文组合的数列在每一轮下被拆分成两部分,然后通过递归将左侧部分排好序后,再递归排好右侧部分的顺序,通过多次比较和交换来实现税电密文的高效排序。Specifically, the sorting algorithm based on equivalent data merging uses the idea of divide and conquer method to split the tax and electricity ciphertext combination sequence into two parts in each round, and then sort the left part through recursion, and then Arrange the order of the right part recursively, and achieve efficient sorting of tax and electricity ciphertext through multiple comparisons and exchanges.
步骤S1042,基于接收到的查询区间从本地排序后的税电密文中查询得到位于查询区间的密文数据集。Step S1042: Based on the received query interval, query the locally sorted tax and electricity ciphertext to obtain the ciphertext data set located in the query interval.
具体地,保序加密密文本身具有排序性,通过将查询区间进行保序加密得到查询区间密文,将查询区间密文和排序后的税电密文进行对比,即可查询得到位于查询区间的密文数据集。Specifically, the order-preserving encrypted ciphertext itself has sorting properties. By performing order-preserving encryption on the query interval, the query interval ciphertext is obtained. By comparing the query interval ciphertext with the sorted tax and electricity ciphertext, the query interval can be obtained. ciphertext data set.
通过基于等值数据归并的排序算法实现税电密文的快速排序,提高提升快速排序检索的稳定性和效率。Through the sorting algorithm based on equivalent data merging, the tax and electricity ciphertext can be quickly sorted to improve the stability and efficiency of quick sort retrieval.
在一些可选实施例中,步骤S105,根据密钥分片对密文数据集进行联合解密得到查询结果,包括:In some optional embodiments, step S105, jointly decrypt the ciphertext data set according to key fragmentation to obtain query results, including:
步骤b1,基于门限秘密共享算法的门限值,请求获取其他税电节点的密钥分片。Step b1: Based on the threshold value of the threshold secret sharing algorithm, request to obtain the key shards of other tax and electricity nodes.
步骤b2,根据自身的密钥分片和其他税电节点的密钥分片计算得到保序密钥。Step b2: Calculate the order-preserving key based on its own key fragments and the key fragments of other tax and electricity nodes.
步骤b3,基于保序密钥对密文数据集进行解密得到查询结果。Step b3: Decrypt the ciphertext data set based on the order-preserving key to obtain the query result.
具体地,本实施例用于在用户直接向税电节点查询本地数据的情况下。门限秘密共享算法的门限值为k,税电节点需要在k个密钥分片的协助下加密税电数据融合指标,因此税电节点需要向其他k-1个税电节点发起请求以获得对应的密钥分片。其他税电节点同意加密请求后返回密钥分片给发起请求的税电节点。得到k个密钥分片后,恢复出保序密钥的计算公式为:Specifically, this embodiment is used when the user directly queries the tax and electricity node for local data. The threshold value of the threshold secret sharing algorithm is k. The tax electricity node needs to encrypt the tax electricity data fusion indicator with the assistance of k key shards. Therefore, the tax electricity node needs to initiate a request to other k-1 tax electricity nodes to obtain The corresponding key shard. Other tax and electricity nodes agree to the encryption request and return the key fragments to the tax and electricity node that initiated the request. After obtaining k key fragments, the calculation formula for recovering the order-preserving key is:
得到保序密钥后,通过保序密钥对密文数据集进行解密得到查询结果,公式如下:After obtaining the order-preserving key, decrypt the ciphertext data set using the order-preserving key to obtain the query result. The formula is as follows:
其中,表示保序密钥,/>表示第i个密钥分片,/>、/>分别表示密文数据集和查询结果,/>表示模数。in, Represents an order-preserving key,/> Represents the i-th key fragment,/> ,/> Represents the ciphertext data set and query results respectively,/> Represents the modulus.
通过请求获取其他税电节点的密钥分片解密密文数据集,实现本地数据查询。By requesting the key shard decryption ciphertext data set of other tax and electricity nodes, local data query can be realized.
在一些可选实施例中,步骤S105,根据密钥分片对密文数据集进行联合解密得到查询结果,包括:In some optional embodiments, step S105, jointly decrypt the ciphertext data set according to key fragmentation to obtain query results, including:
步骤c1,将密钥分片和密文数据集发送给安全查询中心。Step c1: Send the key fragment and ciphertext data set to the security query center.
步骤c2,通过安全查询中心基于等值数据归并的排序算法对接收到的各个税电节点发送的密文数据集进行联合排序,并通过安全查询中心结合其他税电节点发送的密钥分片对联合排序后的密文数据集进行联合解密得到查询结果。Step c2: Jointly sort the received ciphertext data sets sent by each tax and electricity node through the security query center's sorting algorithm based on equivalent data merging, and combine the key shard pairs sent by other tax and electricity nodes through the security query center. The jointly sorted ciphertext data sets are jointly decrypted to obtain the query results.
具体地,本实施例适用于向安全中心查询全部税电节点的数据的场景。Specifically, this embodiment is suitable for the scenario of querying the security center for data of all tax and electricity nodes.
用户向安全查询中心输入的查询条件,安全查询中心将查询条件进行加密后将其发送至各个税电节点,各个税电节点将加密后的查询区间和各自保存已排序的税电密文进行对比,得到位于查询区间的本地的密文数据集,然后将密文数据集和各自的密钥分片发送给安全查询中心,通过安全查询中心基于等值数据归并的排序算法对接收到的各个税电节点发送的密文数据集进行联合排序。各个税电节点发送的密文数据集在发送给安全查询中心前已经做了排序,安全查询中心需要将各个税电节点发送的密文数据集基于等值数据归并的排序算法再次进行联合排序,并结合其他税电节点发送的密钥分片对联合排序后的密文数据集进行联合解密得到查询结果,其解密过程和上述实施例中相同。安全查询中心输出的查询结果包括各个税电节点保存的符合查询区间的数据,能够对全部税电节点的数据进行整体查询。安全查询中心恢复保序密钥和解密过程如下:The user enters the query conditions into the security query center. The security query center encrypts the query conditions and sends them to each tax and electricity node. Each tax and electricity node compares the encrypted query interval with its own sorted tax and electricity ciphertext. , obtain the local ciphertext data set located in the query interval, and then send the ciphertext data set and respective key fragments to the security query center, and use the security query center's sorting algorithm based on equivalent data merging to sort each received tax The ciphertext data sets sent by the electrical nodes are jointly sorted. The ciphertext data sets sent by each tax and electricity node have been sorted before being sent to the security query center. The security query center needs to jointly sort the ciphertext data sets sent by each tax and electricity node based on the sorting algorithm of equivalent data merging. The jointly sorted ciphertext data set is jointly decrypted with the key fragments sent by other tax and electricity nodes to obtain the query results. The decryption process is the same as in the above embodiment. The query results output by the security query center include the data saved by each tax and electricity node that conforms to the query range, and can conduct an overall query of the data of all tax and electricity nodes. The security query center restores the order-preserving key and decrypts the process as follows:
其中,表示保序密钥,/>表示第i个密钥分片,/>、/>分别表示税电数据融合指标即明文和税电密文,/>表示模数。in, Represents an order-preserving key,/> Represents the i-th key fragment,/> ,/> Respectively represent the tax and electricity data fusion indicators, namely plain text and tax and electricity cipher text,/> Represents the modulus.
通过安全查询中心对接收到的各个税电节点发送的密文数据集进行联合排序,并通过安全查询中心结合其他税电节点发送的密钥分片对联合排序后的密文数据集进行联合解密得到查询结果,实现对多个税电节点的数据的查询。The security query center jointly sorts the received ciphertext data sets sent by each tax and electricity node, and the security query center combines the key fragments sent by other tax and electricity nodes to jointly decrypt the jointly sorted ciphertext data set. Get the query results and query the data of multiple tax and electricity nodes.
下面结合一个具体应用实例说明本发明实施例的税电数据安全融合方法的实现过程。The implementation process of the tax and electricity data security fusion method according to the embodiment of the present invention will be described below with reference to a specific application example.
假设有税电节点包括A省税务端设备、A省电力端设备、B省电力端设备、B省税务端设备进行税电数据安全融合。Assume that there are tax and electricity nodes including tax end equipment in Province A, power end equipment in Province A, power end equipment in Province B, and tax end equipment in Province B for secure integration of tax and electricity data.
具体的实现方案为:The specific implementation plan is:
(1)根据税电数据融合业务数据空间,A省税务端设备、A省电力端设备、B省电力端设备、B省税务端设备分别从各自的数据库中本地化抽取业务数据字段。(1) According to the tax and electricity data fusion business data space, the tax end equipment of Province A, the electric power end equipment of Province A, the electric power end equipment of Province B, and the tax end equipment of Province B extract business data fields locally from their respective databases.
(2)基于近似计算同态加密算法CKKS构造公私密钥对。(2) Construct a public-private key pair based on the approximate computing homomorphic encryption algorithm CKKS .
(3)各方通过公钥加密本地数据进行密文交换。(3) All parties pass the public key Encrypt local data for ciphertext exchange.
(4)基于密文加法、密文和明文相乘、密文和密文相乘三类算子计算税电能效指标、用电能耗指标/>、税务经济指标/>。(4) Calculate the tax power efficiency index based on three types of operators: ciphertext addition, ciphertext and plaintext multiplication, and ciphertext and ciphertext multiplication. , Electricity consumption index/> , tax economic indicators/> .
(5)按照税电数据融合业务,进行同态密文聚合操作,实现税电数据统计特征计算,获得税电数据融合指标。(5) According to the tax and electricity data fusion business, perform homomorphic ciphertext aggregation operations to calculate the statistical characteristics of tax and electricity data and obtain tax and electricity data fusion indicators. .
(6)选取保序加密算法并获取保序密钥,利用Shamir门限秘密共享算法拆分保序密钥/>,生成4个密钥分片/>。(6) Select the order-preserving encryption algorithm and obtain the order-preserving key , use the Shamir threshold secret sharing algorithm to split the order-preserving key/> , generate 4 key shards/> .
(7)各方利用密钥分片联合加密税电数据融合指标得到税电密文,基于等值数据归并的快速排序算法进行本地排序存储。(7) All parties use key sharding to jointly encrypt tax and electricity data fusion indicators to obtain tax and electricity ciphertext, and perform local sorting and storage based on the quick sorting algorithm of equivalent data merging.
(8)根据税电数据密文联合检索需求即查询区间,通过在快速排序算法前引入等值数据检索归并措施,实现税电密文的分布式联合检索。(8) According to the joint retrieval requirements of tax and electricity data ciphertext, that is, the query interval, the distributed joint retrieval of tax and electricity ciphertext is realized by introducing equivalent data retrieval and merging measures before the quick sort algorithm.
(9)通过k个密钥份额,恢复出密钥,解密检索出的税电密文的明文,得到查询结果。(9) Recover the key through k key shares , decrypt the plain text of the retrieved tax and electricity ciphertext, and obtain the query results.
在另一个应用场景中,可以通过安全查询中心将查询区间发送给各个税电节点,各个税电节点将加密后的查询区间和各自保存已排序的税电密文进行对比,得到位于查询区间的本地的密文数据集,然后将密文数据集和各自的密钥分片发送给安全查询中心,然后,安全查询中心将得到的密文数据集进行联合排序,并联合各省级税电平台运行多方数据保序加密机制解密算法,得到查询结果。In another application scenario, the query interval can be sent to each tax and electricity node through the security query center. Each tax and electricity node compares the encrypted query interval with the sorted tax and electricity ciphertext stored in it to obtain the tax and electricity cipher text located in the query interval. The local ciphertext data set is then sent to the security query center. The security query center then jointly sorts the obtained ciphertext data set and combines it with the provincial tax and electricity platforms. Run the multi-party data order-preserving encryption mechanism decryption algorithm to obtain the query results.
本发明实施例的税电数据安全融合方法,兼顾多方密文快速排序和各方数据安全保护需求,将门限密钥技术和保序加密技术引入到税电数据融合业务中,通过将保序加密密钥进行门限密钥设计,构造(k,n)门限加解密方案,通过保序密钥的k个密钥分片联合加密税电融合数据,实现了将保序加密算法应用于多方加解密的场景,进行数据融合和查询时能够保证密钥安全。The tax and electricity data security fusion method of the embodiment of the present invention takes into account the rapid sorting of multi-party ciphertext and the data security protection needs of all parties, and introduces threshold key technology and order-preserving encryption technology into the tax and electricity data fusion business. By using order-preserving encryption The key is designed as a threshold key, and a (k, n) threshold encryption and decryption scheme is constructed. The tax-electricity fusion data is jointly encrypted through k key shards of the order-preserving key, thereby realizing the application of the order-preserving encryption algorithm to multi-party encryption and decryption. scenarios, key security can be ensured during data fusion and query.
基于快速排序的密文排序方案,利用分治法实现大规模密文的高效检索分析。The ciphertext sorting scheme based on quick sort uses the divide-and-conquer method to achieve efficient retrieval and analysis of large-scale ciphertext.
并且,本发明实施例的税电数据安全融合方法,通过结合税务数据和电力数据计算税电能效指标、用电能耗指标、税务经济指标、税电数据融合指标等指标,打通彼此的数据壁垒,解决单一数据存在的痛点问题,税电数据融合指标在服务部门精准施策、企业提质增效等方面,具有重要意义。Moreover, the tax and electricity data security fusion method of the embodiment of the present invention breaks through each other's data barriers by combining tax data and electricity data to calculate tax and electricity energy efficiency indicators, electricity consumption indicators, tax economic indicators, tax and electricity data fusion indicators and other indicators. , to solve the pain points of single data, tax and electricity data integration indicators are of great significance in the precise implementation of policies by service departments and the improvement of quality and efficiency of enterprises.
在本实施例中还提供了一种基于税电数据安全融合的税电节点,用于实现上述实施例及优选实施方式,已经进行过说明的不再赘述。如以下所使用的,术语“模块”可以实现预定功能的软件和/或硬件的组合。尽管以下实施例所描述的装置较佳地以软件来实现,但是硬件,或者软件和硬件的组合的实现也是可能并被构想的。This embodiment also provides a tax and electricity node based on the secure integration of tax and electricity data, which is used to implement the above embodiments and preferred implementations. What has already been explained will not be described again. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
本发明实施例还提供一种基于税电数据安全融合的税电节点,如图3所示,包括:An embodiment of the present invention also provides a tax and electricity node based on the secure integration of tax and electricity data, as shown in Figure 3, including:
指标计算模块301,用于结合税务数据和电力数据计算税电数据融合指标;The indicator calculation module 301 is used to calculate tax and electricity data fusion indicators by combining tax data and electricity data;
密钥分片接收模块302,用于接收安全查询中心根据门限秘密共享算法拆分保序密钥获得的密钥分片;The key fragment receiving module 302 is used to receive the key fragments obtained by the security query center by splitting the order-preserving key according to the threshold secret sharing algorithm;
联合加密模块303,用于根据密钥分片对税电数据融合指标进行联合加密获得税电密文;The joint encryption module 303 is used to jointly encrypt the tax and electricity data fusion indicators based on key fragmentation to obtain the tax and electricity ciphertext;
查询模块304,用于基于接收到的查询区间从税电密文中查询得到位于查询区间的密文数据集;The query module 304 is configured to query the tax and electricity ciphertext based on the received query interval to obtain the ciphertext data set located in the query interval;
联合解密模块305,用于根据密钥分片对密文数据集进行联合解密得到查询结果。The joint decryption module 305 is used to jointly decrypt the ciphertext data set according to the key fragmentation to obtain the query result.
本发明实施例的一种基于税电数据安全融合的税电节点,通过结合税务数据和电力数据计算税电数据融合指标,接收安全查询中心根据门限秘密共享算法拆分保序密钥获得的密钥分片,根据密钥分片对税电数据融合指标进行联合加密获得税电密文,基于接收到的查询区间从税电密文中查询得到位于查询区间的密文数据集,根据密钥分片对密文数据集进行联合解密得到查询结果,能够通过查询税电数据融合指标对经济发展状况进行分析,多个税电节点通过基于门限秘密共享算法拆分保序密钥获得的密钥分片对税电数据融合指标进行加解密,保序密钥需要多个密钥分片才能获得,因此每个税电节点需要其他税电节点发送的密钥分片才能重构出保序密钥,保证了密钥安全,并且由于通过保序密钥进行加解密,在查询税电数据融合指标时只需要对密文进行查询,然后把查询得到的密文数据集进行解密就可以得到查询结果,不需要对全部税电数据融合指标进行解密,保证数据安全性。A tax and electricity node based on the secure fusion of tax and electricity data according to the embodiment of the present invention calculates the tax and electricity data fusion index by combining tax data and electricity data, and receives the secret key obtained by the security query center by splitting the order-preserving key according to the threshold secret sharing algorithm. Key fragmentation, jointly encrypt the tax and electricity data fusion indicators according to the key fragmentation to obtain the tax and electricity ciphertext, query the tax and electricity ciphertext based on the received query interval to obtain the ciphertext data set located in the query interval, and obtain the ciphertext data set located in the query interval based on the key fragmentation The query results are obtained by jointly decrypting the ciphertext data set, and the economic development status can be analyzed by querying the tax and electricity data fusion indicators. Multiple tax and electricity nodes split the order-preserving keys based on the threshold secret sharing algorithm to obtain the key analysis. Slices encrypt and decrypt tax and electricity data fusion indicators. The order-preserving key requires multiple key fragments to obtain. Therefore, each tax and electricity node requires key fragments sent by other tax and electricity nodes to reconstruct the order-preserving key. , ensuring the security of the key, and since encryption and decryption are performed through order-preserving keys, when querying tax and electricity data fusion indicators, you only need to query the ciphertext, and then decrypt the ciphertext data set obtained from the query to obtain the query results. , there is no need to decrypt all tax and electricity data fusion indicators to ensure data security.
在一些可选实施例中,指标计算模块301包括:In some optional embodiments, the indicator calculation module 301 includes:
第一计算模块,用于结合税务数据和电力数据计算税电能效指标、用电能耗指标和税务经济指标,税电能效指标的计算公式为:The first calculation module is used to calculate tax electricity energy efficiency indicators, electricity consumption indicators and tax economic indicators by combining tax data and electricity data. The calculation formula of tax electricity energy efficiency indicators is:
式中,代表税电能效指标,/>表示税务本期用电量,/>表示电力本期用电量;In the formula, Represents tax electricity energy efficiency index,/> Indicates the electricity consumption in the tax period,/> Indicates the electricity consumption in this period;
用电能耗指标的计算公式为:The calculation formula for the electricity consumption indicator is:
式中,表示用电能耗指标,/>、/>表示对应的权重系数,/>表示电力本期用户数,/>表示电力同期用户数,/>表示电力同期用电量;In the formula, Indicates the power consumption indicator,/> ,/> Indicates the corresponding weight coefficient,/> Indicates the number of electricity users in this period,/> Indicates the number of electricity users in the same period,/> Indicates electricity consumption during the same period;
税务经济指标的计算公式为:The calculation formula of tax economic indicators is:
式中,表示税务经济指标,/>、/>表示对应的权重系数,/>表示税务本期用户数,/>表示税务同期用户数,/>表示税务同期用电量;In the formula, Indicates tax economic indicators,/> ,/> Indicates the corresponding weight coefficient,/> Indicates the number of tax users in the current period,/> Indicates the number of tax users in the same period,/> Indicates the electricity consumption during the tax period;
第二计算指标模块,用于将税电能效指标、用电能耗指标和税务经济指标分别乘以对应权重系数得到税电数据融合指标,税电数据融合指标的计算公式为:The second calculation index module is used to multiply the tax and electricity energy efficiency indicators, electricity consumption indicators and tax economic indicators by the corresponding weight coefficients to obtain the tax and electricity data fusion index. The calculation formula of the tax and electricity data fusion index is:
式中,表示税电数据融合指标,/>、/>、/>表示对应的权重系数。In the formula, Indicates tax and electricity data fusion indicators,/> ,/> ,/> Indicates the corresponding weight coefficient.
在一些可选实施例中,第一计算模块包括:In some optional embodiments, the first computing module includes:
密钥构建模块,用于基于近似计算同态加密算法生成公私密钥对,公私密钥对包括公钥和私钥;The key building module is used to generate a public-private key pair based on the approximate computing homomorphic encryption algorithm. The public-private key pair includes a public key and a private key;
同态加密模块,用于根据公钥对税务数据和电力数据进行同态加密得到税务数据密文和电力数据密文;The homomorphic encryption module is used to homomorphically encrypt tax data and power data based on the public key to obtain tax data ciphertext and power data ciphertext;
第三计算模块,用于基于对应的计算公式,结合税务数据密文和电力数据密文进行密文融合计算,得到税电能效指标、用电能耗指标和税务经济指标。The third calculation module is used to perform ciphertext fusion calculation based on the corresponding calculation formula, combined with the tax data ciphertext and the power data ciphertext, to obtain tax and electricity energy efficiency indicators, electricity energy consumption indicators and tax economic indicators.
在一些可选实施例中,联合加密模块303包括:In some optional embodiments, the joint encryption module 303 includes:
第一分片获取模块,用于基于门限秘密共享算法的门限值,请求获取其他税电节点的密钥分片;The first shard acquisition module is used to request the key shards of other tax and electricity nodes based on the threshold value of the threshold secret sharing algorithm;
第一密钥重构模块,用于根据自身的密钥分片和其他税电节点的密钥分片计算得到保序密钥;The first key reconstruction module is used to calculate the order-preserving key based on its own key fragments and the key fragments of other tax and electricity nodes;
保序加密模块,用于基于保序密钥对税电数据融合指标进行加密获得税电密文。The order-preserving encryption module is used to encrypt the tax and electricity data fusion indicators based on the order-preserving key to obtain the tax and electricity ciphertext.
在一些可选实施例中,查询模块304包括:In some optional embodiments, query module 304 includes:
第一排序模块,用于基于等值数据归并的排序算法将本地的税电密文进行排序得到本地排序后的税电密文;The first sorting module is used to sort the local tax and electricity ciphertext based on the sorting algorithm of equivalent data merging to obtain the locally sorted tax and electricity ciphertext;
区间比对模块,用于基于接收到的查询区间从本地排序后的税电密文中查询得到位于查询区间的密文数据集。The interval comparison module is used to query the locally sorted tax and electricity ciphertext based on the received query interval to obtain the ciphertext data set located in the query interval.
在一些可选实施例中,联合解密模块305包括:In some optional embodiments, the joint decryption module 305 includes:
第二分片获取模块,基于门限秘密共享算法的门限值,请求获取其他税电节点的密钥分片;The second shard acquisition module requests to obtain the key shards of other tax and electricity nodes based on the threshold value of the threshold secret sharing algorithm;
第二密钥重构模块,根据自身的密钥分片和其他税电节点的密钥分片计算得到保序密钥;The second key reconstruction module calculates the order-preserving key based on its own key fragments and the key fragments of other tax and electricity nodes;
保序解密模块,用于基于保序密钥对密文数据集进行解密得到查询结果。The order-preserving decryption module is used to decrypt the ciphertext data set based on the order-preserving key to obtain query results.
在一些可选实施例中,联合解密模块305包括:In some optional embodiments, the joint decryption module 305 includes:
发送模块,用于将密钥分片和密文数据集发送给安全查询中心;The sending module is used to send key fragments and ciphertext data sets to the security query center;
联合解密模块,用于通过安全查询中心基于等值数据归并的排序算法对接收到的各个税电节点发送的密文数据集进行联合排序,并通过安全查询中心结合其他税电节点发送的密钥分片对联合排序后的密文数据集进行联合解密得到查询结果。The joint decryption module is used to jointly sort the received ciphertext data sets sent by each tax and electricity node through the security query center's sorting algorithm based on equivalent data merging, and combine the keys sent by other tax and electricity nodes through the security query center The shards jointly decrypt the jointly sorted ciphertext data set to obtain the query results.
上述各个模块和单元的更进一步的功能描述与上述对应实施例相同,在此不再赘述。Further functional descriptions of the above-mentioned modules and units are the same as those in the above-mentioned corresponding embodiments, and will not be described again here.
请参阅图4,图4是本发明实施例提供的一种计算机设备的结构示意图,如图4所示,该计算机设备包括:一个或多个处理器10、存储器20,以及用于连接各部件的接口,包括高速接口和低速接口。各个部件利用不同的总线互相通信连接,并且可以被安装在公共主板上或者根据需要以其它方式安装。处理器可以对在计算机设备内执行的指令进行处理,包括存储在存储器中或者存储器上以在外部输入/输出装置(诸如,耦合至接口的显示设备)上显示GUI的图形信息的指令。在一些可选的实施方式中,若需要,可以将多个处理器和/或多条总线与多个存储器和多个存储器一起使用。同样,可以连接多个计算机设备,各个设备提供部分必要的操作(例如,作为服务器阵列、一组刀片式服务器、或者多处理器系统)。图4中以一个处理器10为例。Please refer to Figure 4. Figure 4 is a schematic structural diagram of a computer device provided by an embodiment of the present invention. As shown in Figure 4, the computer device includes: one or more processors 10, a memory 20, and a device for connecting various components. interfaces, including high-speed interfaces and low-speed interfaces. Various components communicate with each other using different buses and can be installed on a common motherboard or in other ways as needed. The processor may process instructions executed within the computer device, including instructions stored in or on memory to display graphical information of the GUI on an external input/output device, such as a display device coupled to the interface. In some alternative implementations, multiple processors and/or multiple buses may be used with multiple memories and multiple memories, if desired. Likewise, multiple computer devices may be connected, each device providing part of the necessary operation (eg, as a server array, a set of blade servers, or a multi-processor system). In Figure 4, a processor 10 is taken as an example.
处理器10可以是中央处理器,网络处理器或其组合。其中,处理器10还可以进一步包括硬件芯片。上述硬件芯片可以是专用集成电路,可编程逻辑器件或其组合。上述可编程逻辑器件可以是复杂可编程逻辑器件,现场可编程逻辑门阵列,通用阵列逻辑或其任意组合。The processor 10 may be a central processing unit, a network processor, or a combination thereof. The processor 10 may further include a hardware chip. The above-mentioned hardware chip can be an application-specific integrated circuit, a programmable logic device or a combination thereof. The above-mentioned programmable logic device may be a complex programmable logic device, a field programmable logic gate array, a general array logic or any combination thereof.
其中,存储器20存储有可由至少一个处理器10执行的指令,以使至少一个处理器10执行实现上述实施例示出的方法。The memory 20 stores instructions that can be executed by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.
存储器20可以包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需要的应用程序;存储数据区可存储根据计算机设备的使用所创建的数据等。此外,存储器20可以包括高速随机存取存储器,还可以包括非瞬时存储器,例如至少一个磁盘存储器件、闪存器件、或其他非瞬时固态存储器件。在一些可选的实施方式中,存储器20可选包括相对于处理器10远程设置的存储器,这些远程存储器可以通过网络连接至该计算机设备。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。The memory 20 may include a program storage area and a data storage area, where the program storage area may store an operating system and an application program required for at least one function; the storage data area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid-state storage device. In some optional implementations, the memory 20 may optionally include memories remotely located relative to the processor 10 , and these remote memories may be connected to the computer device through a network. Examples of the above-mentioned networks include but are not limited to the Internet, intranets, local area networks, mobile communication networks and combinations thereof.
存储器20可以包括易失性存储器,例如,随机存取存储器;存储器也可以包括非易失性存储器,例如,快闪存储器,硬盘或固态硬盘;存储器20还可以包括上述种类的存储器的组合。The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memories.
该计算机设备还包括通信接口30,用于该计算机设备与其他设备或通信网络通信。The computer device also includes a communication interface 30 for the computer device to communicate with other devices or communication networks.
本发明实施例还提供了一种计算机可读存储介质,上述根据本发明实施例的方法可在硬件、固件中实现,或者被实现为可记录在存储介质,或者被实现通过网络下载的原始存储在远程存储介质或非暂时机器可读存储介质中并将被存储在本地存储介质中的计算机代码,从而在此描述的方法可被存储在使用通用计算机、专用处理器或者可编程或专用硬件的存储介质上的这样的软件处理。其中,存储介质可为磁碟、光盘、只读存储记忆体、随机存储记忆体、快闪存储器、硬盘或固态硬盘等;进一步地,存储介质还可以包括上述种类的存储器的组合。可以理解,计算机、处理器、微处理器控制器或可编程硬件包括可存储或接收软件或计算机代码的存储组件,当软件或计算机代码被计算机、处理器或硬件访问且执行时,实现上述实施例示出的方法。Embodiments of the present invention also provide a computer-readable storage medium. The above-mentioned method according to the embodiment of the present invention can be implemented in hardware or firmware, or can be recorded in a storage medium, or can be implemented as original storage downloaded through the network. Computer code in a remote storage medium or a non-transitory machine-readable storage medium and to be stored in a local storage medium such that the methods described herein may be stored on a computer using a general purpose computer, a special purpose processor, or programmable or special purpose hardware Such software processing on storage media. The storage medium may be a magnetic disk, an optical disk, a read-only memory, a random access memory, a flash memory, a hard disk or a solid state drive, etc.; further, the storage medium may also include a combination of the above types of memories. It can be understood that a computer, processor, microprocessor controller or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by the computer, processor or hardware, the above implementations are implemented. The method illustrated.
虽然结合附图描述了本发明的实施例,但是本领域技术人员可以在不脱离本发明的精神和范围的情况下做出各种修改和变型,这样的修改和变型均落入由所附权利要求所限定的范围之内。Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations fall within the scope of the appended rights. within the scope of the requirements.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311197942.9A CN116933299B (en) | 2023-09-18 | 2023-09-18 | Tax electric data safety fusion method, tax electric node, equipment and medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311197942.9A CN116933299B (en) | 2023-09-18 | 2023-09-18 | Tax electric data safety fusion method, tax electric node, equipment and medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN116933299A true CN116933299A (en) | 2023-10-24 |
CN116933299B CN116933299B (en) | 2023-12-05 |
Family
ID=88390042
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202311197942.9A Active CN116933299B (en) | 2023-09-18 | 2023-09-18 | Tax electric data safety fusion method, tax electric node, equipment and medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116933299B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117151349A (en) * | 2023-10-31 | 2023-12-01 | 广东电力交易中心有限责任公司 | Tax and electric power data joint analysis system with privacy protection function |
CN119172077A (en) * | 2024-11-25 | 2024-12-20 | 浪潮软件科技有限公司 | Data distributed storage method and system based on secret sharing technology |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20170147835A1 (en) * | 2015-11-25 | 2017-05-25 | International Business Machines Corporation | Efficient two party oblivious transfer using a leveled fully homomorphic encryption |
CN112381634A (en) * | 2020-11-20 | 2021-02-19 | 湖南智慧政务区块链科技有限公司 | Tax statistics and settlement method, device, equipment and storage medium |
CN113111090A (en) * | 2021-04-15 | 2021-07-13 | 西安电子科技大学 | Multidimensional data query method based on order-preserving encryption |
CN114039767A (en) * | 2021-11-05 | 2022-02-11 | 美林数据技术股份有限公司 | Tax and power combined analysis method based on privacy calculation |
CN114331658A (en) * | 2021-12-30 | 2022-04-12 | 航天信息股份有限公司 | A kind of tax electricity index calculation method and device |
CN115580484A (en) * | 2022-11-15 | 2023-01-06 | 国网智能电网研究院有限公司 | Secure joint computing method, system and storage medium for energy consumption data |
CN116204897A (en) * | 2022-12-20 | 2023-06-02 | 航天信息股份有限公司 | Tax ring combination analysis method and device based on privacy calculation and storage medium |
-
2023
- 2023-09-18 CN CN202311197942.9A patent/CN116933299B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20170147835A1 (en) * | 2015-11-25 | 2017-05-25 | International Business Machines Corporation | Efficient two party oblivious transfer using a leveled fully homomorphic encryption |
CN112381634A (en) * | 2020-11-20 | 2021-02-19 | 湖南智慧政务区块链科技有限公司 | Tax statistics and settlement method, device, equipment and storage medium |
CN113111090A (en) * | 2021-04-15 | 2021-07-13 | 西安电子科技大学 | Multidimensional data query method based on order-preserving encryption |
CN114039767A (en) * | 2021-11-05 | 2022-02-11 | 美林数据技术股份有限公司 | Tax and power combined analysis method based on privacy calculation |
CN114331658A (en) * | 2021-12-30 | 2022-04-12 | 航天信息股份有限公司 | A kind of tax electricity index calculation method and device |
CN115580484A (en) * | 2022-11-15 | 2023-01-06 | 国网智能电网研究院有限公司 | Secure joint computing method, system and storage medium for energy consumption data |
CN116204897A (en) * | 2022-12-20 | 2023-06-02 | 航天信息股份有限公司 | Tax ring combination analysis method and device based on privacy calculation and storage medium |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117151349A (en) * | 2023-10-31 | 2023-12-01 | 广东电力交易中心有限责任公司 | Tax and electric power data joint analysis system with privacy protection function |
CN117151349B (en) * | 2023-10-31 | 2024-02-23 | 广东电力交易中心有限责任公司 | Tax and electric power data joint analysis system with privacy protection function |
CN119172077A (en) * | 2024-11-25 | 2024-12-20 | 浪潮软件科技有限公司 | Data distributed storage method and system based on secret sharing technology |
Also Published As
Publication number | Publication date |
---|---|
CN116933299B (en) | 2023-12-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN116933299B (en) | Tax electric data safety fusion method, tax electric node, equipment and medium | |
US20190173859A1 (en) | Systems and methods for implementing modular digital encryption key management solutions | |
CN104426973B (en) | A kind of cloud database encryption method, system and device | |
WO2018184407A1 (en) | K-means clustering method and system having privacy protection | |
CN107682308A (en) | The electronic evidence preservation system for Channel Technology of being dived based on block chain | |
US10764261B2 (en) | System and method for enabling a scalable public-key infrastructure on a smart grid network | |
CN104750784B (en) | A kind of space querying integrity verification method based on Merkle tree constructions | |
CN104967693A (en) | Document similarity calculation method facing cloud storage based on fully homomorphic password technology | |
CN114944963B (en) | Government affair data opening method and system | |
CN110474764A (en) | Ciphertext data set intersection calculation method, device, system, client, server and medium | |
Ren et al. | Prifr: Privacy-preserving large-scale file retrieval system via blockchain for encrypted cloud data | |
Zhang et al. | Blockchain-assisted data sharing supports deduplication for cloud storage | |
Han et al. | IP 2 DM for V2G networks in smart grid | |
CN114978664A (en) | Data sharing method and device and electronic equipment | |
CN115580484B (en) | Secure Joint Computing Method, System and Storage Medium Applicable to Energy Consumption Data | |
CN113408729A (en) | Data processing method for DNA calculation | |
CN117394978A (en) | BGV homomorphic encryption-based power data sharing method, system and storage medium | |
Chavan et al. | Secure CRM cloud service using RC5 algorithm | |
Karkouda et al. | Privacy and availability in cloud data warehouse | |
Nagesh et al. | Modeling an efficient authentic provable data possession model using legacy filter model for IOT and cloud environment | |
Zhang et al. | A survey on data security in network storage systems | |
CN115473630B (en) | A privacy query method and system for the Internet of Things based on quantum computing | |
CN114928445B (en) | Network security intelligent monitoring early warning management system based on cloud computing | |
Devi et al. | A Blockchain Security Management Based on Rehashing Shift Code Rail Encryption Using Circular Shift Round Random Padding Key for Decentralized Cloud Environment | |
CN115328988B (en) | An Information Management Method Based on Big Data and Internet |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |