CN113779642A - Data processing method and device, system and electronic equipment thereof - Google Patents

Data processing method and device, system and electronic equipment thereof Download PDF

Info

Publication number
CN113779642A
CN113779642A CN202111027793.2A CN202111027793A CN113779642A CN 113779642 A CN113779642 A CN 113779642A CN 202111027793 A CN202111027793 A CN 202111027793A CN 113779642 A CN113779642 A CN 113779642A
Authority
CN
China
Prior art keywords
data
terminal
intelligent
chain
ammeter
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
Application number
CN202111027793.2A
Other languages
Chinese (zh)
Other versions
CN113779642B (en
Inventor
潘鸣宇
王伟贤
李香龙
孙舟
陈振
赵宇彤
袁小溪
李卓群
刘祥璐
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
State Grid Corp of China SGCC
State Grid Beijing Electric Power Co Ltd
Original Assignee
State Grid Corp of China SGCC
State Grid Beijing Electric Power Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by State Grid Corp of China SGCC, State Grid Beijing Electric Power Co Ltd filed Critical State Grid Corp of China SGCC
Priority to CN202111027793.2A priority Critical patent/CN113779642B/en
Priority claimed from CN202111027793.2A external-priority patent/CN113779642B/en
Publication of CN113779642A publication Critical patent/CN113779642A/en
Application granted granted Critical
Publication of CN113779642B publication Critical patent/CN113779642B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/21Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/2151Time stamp

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a data processing method, a device and a system thereof and electronic equipment. The data processing method comprises the following steps: the method comprises the steps of obtaining data of the off-link ammeter, processing the data of the off-link ammeter according to a preset error evaluation rule, then carrying out initial digital signature on the data of the off-link ammeter, broadcasting an initial signature result and the data of the off-link ammeter to at least one other intelligent terminal in a terminal battery, verifying authenticity of the data of the off-link ammeter by adopting a public key fragment and a preset signature verification algorithm to obtain a verification result, carrying out digital signature on the data of the off-link ammeter by adopting a complete private key, a system time stamp and a first preset signature algorithm to obtain a digital signature result, and uploading an initial signature result set, the data of the off-link ammeter and the digital signature result to a power block chain. The invention solves the technical problems that in the related art, each intelligent terminal independently uploads the acquired data to the block chain, so that the network pressure of the block chain is increased, and the operation efficiency is reduced.

Description

Data processing method and device, system and electronic equipment thereof
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a data processing method, an apparatus, a system, and an electronic device.
Background
In the related art, the existing language predictive machine technology provides a way for enabling an intelligent contract to request data outside a chain, and the language predictive machine is used as a gateway for communication between the intelligent contract and the external world and can truly and accurately input the data outside the chain into the chain, so that the authenticity of the data on the chain is guaranteed, and the credible interaction between the intelligent contract and the external world is realized.
However, the following problems may occur due to a single talker node (corresponding to a smart terminal): (1) the method comprises the following steps of (1) single point failure, (2) performance bottleneck, (3) centralized trust and the like, which cannot guarantee the authenticity and reliability of data, so that in order to prevent a trust problem of a single-node prediction machine, a plurality of nodes are arranged to jointly execute request processing of prediction machine data, namely a plurality of different prediction machine nodes are arranged in a network, and each prediction machine can acquire data from a data source. The decentralized prediction machine network connects the block chain with the data under the chain, and has extremely high safety, reliability and tamper resistance.
In the existing decentralized prediction machine mode, each prediction machine needs to respond to an intelligent contract sent to a block chain (the intelligent contract is deployed in a contract module and is responsible for aggregating all data to a single data point and then sending the data to the block chain), and triggers and executes a corresponding intelligent contract, so that part of nodes can be effectively prevented from submitting wrong data, the final result is influenced, the authenticity and reliability of the data are guaranteed, and meanwhile, the whole execution process is completely open and transparent on the chain, and the reliability is high. However, the above method of aggregation within an intelligent contract also has problems, that is, since each predictor node separately uploads external data to the blockchain, the pressure of the blockchain network is increased, and the operation efficiency is low.
In addition, data sources may have integrity issues, and users should first confirm that the accessed data source is secure and reliable when using a predictive speaker. However, when a user accesses an insecure data source, the insecure data is likely to cause the prophetic to return an erroneous result, and although using multiple data sources to access data may reduce the number of dishonest data sources, this approach is not universal because not every piece of data has multiple external data source offerings, and therefore, the prophetic system also needs to consider the dishonest data source problem.
In view of the above problems, no effective solution has been proposed.
Disclosure of Invention
The embodiment of the invention provides a data processing method, a device, a system and electronic equipment thereof, which are used for at least solving the technical problems that in the related art, each intelligent terminal independently uploads acquired data to a block chain, so that the network pressure of the block chain is increased and the operation efficiency is reduced.
According to an aspect of an embodiment of the present invention, there is provided a data processing method including: acquiring off-chain ammeter data, and analyzing and processing the off-chain ammeter data according to a preset error evaluation rule to obtain processed off-chain ammeter data; performing initial digital signature on the off-chain ammeter data, and broadcasting an initial signature result and the off-chain ammeter data to at least one other intelligent terminal in a terminal battery, wherein the terminal battery comprises: the current intelligent terminal and other intelligent terminals participating in data acquisition are elected as the aggregation intelligent terminal of the terminal pool; verifying the authenticity of the off-link ammeter data by adopting a public key fragment and a preset signature verification algorithm to obtain a verification result; performing digital signature on the off-chain ammeter data by adopting a complete private key, a system timestamp and a first preset signature algorithm to obtain a digital signature result, wherein the complete private key is obtained by synthesizing private key fragments of the current intelligent terminal and private key fragments of other intelligent terminals; uploading an initial signature result set, the off-chain ammeter data and the digital signature result to a power block chain, wherein the initial signature result set is a set formed by integrating initial signature results submitted by the intelligent terminals at present.
Optionally, before acquiring the off-chain ammeter data, the processing method further comprises: receiving a data acquisition request through an intelligent contract module, wherein the data acquisition request is sent to a data request contract in the intelligent contract module by a data request module according to a preset period; generating a data request list based on the data acquisition request through an intelligent contract module; and sending the data request list to the terminal pool through an intelligent contract module so as to call each intelligent terminal in the terminal pool to acquire the data of the out-of-chain ammeter.
Optionally, before generating, by the intelligent contract module, a data request list based on the data acquisition request, the processing method further includes: generating a pair of public key and private key for the terminal pool based on a preset threshold signature consensus mechanism; based on the number of intelligent terminals in the terminal pool, performing fragment segmentation operation on the public key and the private key to obtain public key fragments and private key fragments; and distributing the public key fragments and the private key fragments to all intelligent terminals participating in acquiring the data of the off-link ammeter in the terminal pool.
Optionally, before generating, by the intelligent contract module, a data request list based on the data acquisition request, the processing method further includes: generating a shared key based on a preset threshold signature consensus mechanism; and distributing a key copy of the shared key to each intelligent terminal in the terminal pool.
Optionally, the data request list includes: the method comprises the steps of required power data information, public key fragments, private key fragments, key copies, preset threshold values and the required number of intelligent terminals.
Optionally, the step of analyzing and processing the off-chain ammeter data according to a preset error evaluation rule to obtain processed off-chain ammeter data includes: analyzing an error value between the total electric quantity of the electric meter data and the total electric quantity of the corresponding electric meter data sub-meters based on a preset error evaluation rule, wherein the total electric meter data and the corresponding electric meter data sub-meters are a data acquisition unit of the off-chain electric meter data; and marking the electric meter data summary table with the error value more than or equal to a preset error value and the corresponding electric meter data branch table to obtain the processed off-link electric meter data.
Optionally, the step of performing an initial digital signature on the off-chain meter data, and broadcasting the initial signature result and the off-chain meter data to at least one other intelligent terminal in the terminal pool includes: performing digital signature on the off-link ammeter data based on the private key fragments, the key copy and a second preset signature algorithm, and calculating to obtain an initial signature result; broadcasting the initial signature result and the off-chain ammeter data to at least one other intelligent terminal in a terminal pool.
Optionally, after broadcasting the initial signature result and the off-chain meter data to at least one other intelligent terminal in a terminal pool, the processing method further includes: and broadcasting the information of canceling the submitted initial signature result, and waiting for receiving the information of canceling the submitted initial signature result broadcasted by other intelligent terminals, wherein the quantity of the received information of canceling the submitted initial signature result is more than or equal to a preset threshold value.
Optionally, after verifying the authenticity of the off-link ammeter data by using a public key fragment and a preset signature verification algorithm and obtaining a verification result, the processing method further includes: and when the number of the obtained verification results is true is larger than or equal to a preset threshold value, obtaining a consensus result based on a preset threshold signature consensus mechanism.
Optionally, after uploading the initial signature result set, the out-of-chain meter data, and the digital signature result to the power block chain, the processing method further comprises: according to the initial signature result submitted by each intelligent terminal in the initial signature result set, evaluating each intelligent terminal through a credit contract in an intelligent contract module to obtain an evaluation result; and executing reward operation or punishment operation on each intelligent terminal according to the evaluation result.
Optionally, the reputation evaluation index of the reputation contract in the intelligent contract module for each intelligent terminal includes at least one of the following: task response time, broadcast result time, total number of data requests allocated, total number of data requests completed, and total number of feedback results accepted.
According to another aspect of the embodiments of the present invention, there is also provided a data processing system, including: the system comprises a heterogeneous terminal pool network, an intelligent contract module, a data request module and a data storage node, wherein the heterogeneous terminal pool network comprises at least two terminal pools, each terminal pool in the heterogeneous terminal pool network executes different data acquisition commands of data request intelligent contracts, each terminal pool comprises at least two intelligent terminals, each intelligent terminal is used for verifying the authenticity of the off-chain ammeter data by adopting a public key fragment and a preset signature verification algorithm after acquiring the off-chain ammeter data to obtain a verification result, a threshold signature common identification mechanism is adopted to obtain a common identification result, and a complete private key, a system time stamp and a first preset signature algorithm are adopted to digitally sign the off-chain ammeter data to obtain a digital signature result; the intelligent contract module comprises a data request contract and a reputation contract, and uploads an initial signature result set, off-chain ammeter data and a digital signature result to the power block chain, wherein the data request contract is interactive with the data request module and is used for receiving a data access request of the data request module, sending a data request list to a terminal pool, receiving off-chain ammeter data returned by the aggregated intelligent terminals and the digital signature, and the reputation contract is used for tracking, calculating and managing the reputation of the intelligent terminals, calculating the overall average reputation score of each intelligent terminal, selecting the highest-score intelligent terminal and returning the average reputation score of a given intelligent terminal address; the data request module calls the data request contract according to a preset period and sends a data acquisition request to the data request contract; the data storage node comprises at least one of: the system comprises a data storage terminal, a system storage node and a cloud storage node.
According to another aspect of the embodiments of the present invention, there is also provided a data processing apparatus, including: the acquisition unit is used for acquiring the data of the off-chain ammeter, and analyzing and processing the data of the off-chain ammeter according to a preset error evaluation rule to obtain processed data of the off-chain ammeter; a broadcasting unit, configured to perform an initial digital signature on the off-link ammeter data, and broadcast an initial signature result and the off-link ammeter data to at least one other intelligent terminal in a terminal pool, where the terminal pool includes: the current intelligent terminal and other intelligent terminals participating in data acquisition are elected as the aggregation intelligent terminal of the terminal pool; the verification unit is used for verifying the authenticity of the off-link ammeter data by adopting a public key fragment and a preset signature verification algorithm to obtain a verification result; the signature unit is used for digitally signing the off-link ammeter data by adopting a complete private key, a system timestamp and a first preset signature algorithm to obtain a digital signature result, wherein the complete private key is obtained by synthesizing private key fragments of the current intelligent terminal and private key fragments of other intelligent terminals; and the uploading unit is used for uploading an initial signature result set, the off-chain ammeter data and the digital signature result to the power block chain, wherein the initial signature result set is a set formed by integrating initial signature results submitted by the intelligent terminals by the current intelligent terminals.
Optionally, the processing apparatus further comprises: the intelligent contract management system comprises a first receiving module, a second receiving module and a third receiving module, wherein the first receiving module is used for receiving a data acquisition request through an intelligent contract module before acquiring data of the off-link ammeter, and the data acquisition request is sent to a data request contract in the intelligent contract module by a data request module according to a preset period; the first generation module is used for generating a data request list based on the data acquisition request through the intelligent contract module; and the first sending module is used for sending the data request list to the terminal pool through the intelligent contract module so as to call each intelligent terminal in the terminal pool to acquire the data of the out-of-chain ammeter.
Optionally, the processing apparatus further comprises: the second generation module is used for generating a pair of public key and private key for the terminal pool based on a preset threshold signature consensus mechanism before generating a data request list based on the data acquisition request through the intelligent contract module; the first segmentation module is used for carrying out fragment segmentation operation on the public key and the private key based on the number of the intelligent terminals in the terminal pool to obtain public key fragments and private key fragments; and the first distribution module is used for distributing the public key fragments and the private key fragments to all intelligent terminals participating in acquiring the data of the off-link ammeter in the terminal pool.
Optionally, the processing apparatus further comprises: a third generation module, configured to generate a shared secret key based on a preset threshold signature consensus mechanism before generating a data request list based on the data acquisition request through the intelligent contract module; and the second distribution module is used for distributing the key copy of the shared key to each intelligent terminal in the terminal pool.
Optionally, the data request list includes: the method comprises the steps of required power data information, public key fragments, private key fragments, key copies, preset threshold values and the required number of intelligent terminals.
Optionally, the obtaining unit includes: the first analysis module is used for analyzing an error value between the electric quantity of the electric meter data total meter and the corresponding electric quantity of the electric meter data branch meter based on a preset error evaluation rule, wherein the electric meter data total meter and the corresponding electric meter data branch meter are a data acquisition unit of the electric meter data outside the chain; and the first marking module is used for marking the electric meter data summary table with the error value more than or equal to a preset error value and the corresponding electric meter data sub-tables to obtain the processed out-of-chain electric meter data.
Optionally, the broadcasting unit includes: the first calculation module is used for carrying out digital signature on the off-link ammeter data based on the private key fragments, the key copies and a second preset signature algorithm, and calculating to obtain an initial signature result; and the first broadcasting module is used for broadcasting the initial signature result and the off-chain ammeter data to at least one other intelligent terminal in the terminal battery.
Optionally, the processing apparatus further comprises: and the second broadcasting module is used for broadcasting information of canceling submitting the initial signature result and waiting for receiving information of canceling submitting the initial signature result broadcasted by other intelligent terminals after broadcasting the initial signature result and the off-link ammeter data to at least one other intelligent terminal in the terminal pool, wherein the number of the received information of canceling submitting the initial signature result is greater than or equal to a preset threshold value.
Optionally, the processing apparatus further comprises: the first obtaining module is used for verifying the authenticity of the off-link ammeter data by adopting public key fragments and a preset signature verification algorithm, obtaining a verification result, and obtaining a consensus result based on a preset threshold signature consensus mechanism when the number of the obtained verification result is true is larger than or equal to a preset threshold value.
Optionally, the processing apparatus further comprises: the first evaluation module is used for evaluating each intelligent terminal through a credit contract in the intelligent contract module according to an initial signature result submitted by each intelligent terminal in the initial signature result set after the initial signature result set, the off-chain ammeter data and the digital signature result are uploaded to the power block chain, so that an evaluation result is obtained; and the first execution module is used for executing reward operation or punishment operation on each intelligent terminal according to the evaluation result.
Optionally, the reputation evaluation index of the reputation contract in the intelligent contract module for each intelligent terminal includes at least one of the following: task response time, broadcast result time, total number of data requests allocated, total number of data requests completed, and total number of feedback results accepted.
According to another aspect of the embodiments of the present invention, there is also provided an electronic device, including: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to perform any one of the data processing methods described above via execution of the executable instructions.
In this application, acquire the outer electric meter data of chain to according to presetting error evaluation rule, carry out analysis processes to outer electric meter data of chain, obtain the outer electric meter data of chain after handling, carry out initial digital signature to outer electric meter data of chain, and with initial signature result and outer electric meter data broadcast to at least one other intelligent terminal in the terminal cell of chain, wherein, the terminal cell includes: the intelligent terminal comprises a current intelligent terminal and other intelligent terminals participating in data acquisition, wherein the current intelligent terminal is elected as a polymerization intelligent terminal of a terminal pool, public key fragments and a preset signature verification algorithm are adopted, the authenticity of the off-link ammeter data is verified, a verification result is obtained, digital signature is carried out on the off-link ammeter data by adopting a complete private key, a system time stamp and a first preset signature algorithm, a digital signature result is obtained, and an initial signature result set, the off-link ammeter data and the digital signature result are uploaded to a power block chain. This application is verified through the authenticity of the out-of-chain ammeter data that each intelligent terminal acquireed in the terminal pool, reach the consensus back, elect an intelligent terminal (polymerization intelligent terminal) and unify all data of polymerization and upload to electric power block chain, the security and the reliability of data cochain process have not only been guaranteed, and effectively solved and used current on-chain polymerization scheme to lead to block chain network pressure big, the problem that operating efficiency is low, and then solved in the correlation technique every intelligent terminal and uploaded to block chain on alone the data that will acquire, lead to block chain network pressure to increase, the technical problem of operating efficiency reduction.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
FIG. 1 is a flow diagram of an alternative data processing method according to an embodiment of the invention;
FIG. 2 is a flow diagram of an alternative process for digital signature and signature verification between intelligent terminals according to an embodiment of the invention;
fig. 3 is a schematic diagram of an alternative distributed intelligent terminal consensus device facing the intelligent electric meter according to an embodiment of the present invention;
fig. 4 is a schematic diagram of a data processing apparatus according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
To facilitate understanding of the invention by those skilled in the art, some terms or nouns referred to in the embodiments of the invention are explained below:
intelligent contract: is a computer protocol aimed at propagating, verifying or executing contracts in an informative manner, allowing trusted transactions to be conducted without third parties, which transactions are traceable and irreversible.
Block chains: the system is a distributed shared account book and a database, and has the characteristics of decentralization, no tampering, trace retaining in the whole process, traceability, collective maintenance, openness and transparency and the like.
Prediction machine: the mechanism writes the blockchain information into the blockchain, and can write events, data and payment messages outside the blockchain into an intelligent contract of the blockchain. In the present application, the intelligent terminal is schematically illustrated as an execution carrier of the prediction machine.
The following embodiments of the present invention can be applied to a distributed intelligent terminal consensus device and system for an intelligent electric meter, where the intelligent terminal can be a terminal capable of writing data outside a blockchain onto the blockchain, such as a prediction machine.
The method comprises the steps of calling a data request intelligent contract according to a preset period, enabling the data request intelligent contract to send a data request list and call a terminal pool to obtain data outside a chain, carrying out accuracy analysis processing on the obtained data by each intelligent terminal, carrying out digital signature on the obtained data based on a threshold signature consensus mechanism, then carrying out broadcasting and signature verification, randomly electing a convergence intelligent terminal after consensus is achieved, collecting broadcasting results of each intelligent terminal under the chain, combining the convergence consensus, generating a complete data signature, uploading the data to an intelligent contract on a block chain, and executing reward or punishment operation according to data acquisition performance of each intelligent terminal by a credit contract. According to the method, the data acquisition mode, the data accuracy judgment algorithm and the heterogeneous terminal pool network structure oriented to the service scene of the intelligent electric meter are designed, and meanwhile, the consensus mechanism of the threshold signature algorithm is utilized, so that the accuracy, the efficiency and the reliability of the chain of the intelligent telegraph data are guaranteed, and the problems of high network pressure and low operation efficiency of the block chain are effectively solved.
Example one
In accordance with an embodiment of the present invention, there is provided a data processing method embodiment, it should be noted that the steps illustrated in the flowchart of the figure may be performed in a computer system such as a set of computer executable instructions, and that while a logical order is illustrated in the flowchart, in some cases the steps illustrated or described may be performed in an order different than here.
Fig. 1 is a flow chart of an alternative data processing method according to an embodiment of the present invention, as shown in fig. 1, the method including the steps of:
and S102, acquiring the data of the off-chain ammeter, and analyzing and processing the data of the off-chain ammeter according to a preset error evaluation rule to obtain the processed data of the off-chain ammeter.
Step S104, carrying out initial digital signature on the off-chain electric meter data, and broadcasting the initial signature result and the off-chain electric meter data to at least one other intelligent terminal in a terminal pool, wherein the terminal pool comprises: the current intelligent terminal and other intelligent terminals participating in data acquisition are elected as the aggregation intelligent terminal of the terminal pool.
And S106, verifying the authenticity of the off-chain ammeter data by adopting the public key fragments and a preset signature verification algorithm to obtain a verification result.
And S108, carrying out digital signature on the off-chain electric meter data by adopting a complete private key, a system time stamp and a first preset signature algorithm to obtain a digital signature result, wherein the complete private key is obtained by synthesizing private key fragments of the current intelligent terminal and private key fragments of other intelligent terminals.
Step S110, an initial signature result set, off-chain meter data, and a digital signature result are uploaded to the power block chain, where the initial signature result set is a set formed by integrating initial signature results submitted by the current intelligent terminals.
Through the above steps, the off-chain ammeter data can be obtained, and the off-chain ammeter data is analyzed and processed according to the preset error evaluation rule, so as to obtain the processed off-chain ammeter data, the off-chain ammeter data is subjected to initial digital signature, and the initial signature result and the off-chain ammeter data are broadcasted to at least one other intelligent terminal in the terminal battery, wherein the terminal battery comprises: the intelligent terminal comprises a current intelligent terminal and other intelligent terminals participating in data acquisition, wherein the current intelligent terminal is elected as a polymerization intelligent terminal of a terminal pool, public key fragments and a preset signature verification algorithm are adopted, the authenticity of the off-link ammeter data is verified, a verification result is obtained, digital signature is carried out on the off-link ammeter data by adopting a complete private key, a system time stamp and a first preset signature algorithm, a digital signature result is obtained, and an initial signature result set, the off-link ammeter data and the digital signature result are uploaded to a power block chain. According to the embodiment of the invention, the authenticity of the data of the off-link ammeter acquired by each intelligent terminal in the terminal pool is verified, and after the consensus is achieved, one intelligent terminal is selected to aggregate all the data uniformly and upload the data to the power block chain, so that the safety and reliability of the data chaining process are ensured, the problems of large network pressure and low operation efficiency of the block chain caused by the existing on-chain aggregation scheme are effectively solved, and the technical problems of increased network pressure and reduced operation efficiency of the block chain caused by the fact that each intelligent terminal uploads the acquired data to the block chain independently in the related art are solved.
The following will explain the embodiments of the present invention in detail with reference to the above steps.
The execution subject of the following steps can be a certain intelligent terminal in the terminal pool.
And S102, acquiring the data of the off-chain ammeter, and analyzing and processing the data of the off-chain ammeter according to a preset error evaluation rule to obtain the processed data of the off-chain ammeter.
In the embodiment of the invention, the off-chain ammeter data is acquired through the intelligent terminal, wherein the intelligent terminal can be a prediction machine, the off-chain ammeter data refers to the electric power data outside the electric power data block chain, the off-chain ammeter data can be acquired from the intelligent ammeter data storage node by taking the intelligent ammeter general table and the corresponding sub-table as a data acquisition unit, and then the acquired off-chain ammeter data is subjected to accuracy analysis processing according to a preset error evaluation rule (namely a preset error judgment algorithm), so that the processed off-chain ammeter data is obtained.
Optionally, according to a preset error evaluation rule, analyzing and processing the off-chain ammeter data to obtain processed off-chain ammeter data, including: analyzing an error value between the electric quantity of the electric meter data total meter and the electric quantity of the corresponding electric meter data branch meter based on a preset error evaluation rule, wherein the electric meter data total meter and the corresponding electric meter data branch meter are a data acquisition unit of the electric meter data outside the chain; and marking the electric meter data summary table with the error value more than or equal to the preset error value and the corresponding electric meter data sub-table to obtain the processed off-link electric meter data.
In the embodiment of the invention, the method can be implemented in a speaker pool (namely a terminal pool) through a built-in error judgment algorithm (namely a preset error evaluation rule)
Figure BDA0003243980330000091
Calculating intelligent electric meter general table BnElectric quantity and corresponding sub-meter CniAnd (3) judging errors of the electric quantity sum, and marking the general meter and the sub-meter data which exceed a specified error value (for example, 2% is taken as the specified error value for schematic analysis) according to the error judgment result to obtain the processed off-link electric meter data.
Optionally, before acquiring the off-chain ammeter data, the processing method further includes: receiving a data acquisition request through an intelligent contract module, wherein the data acquisition request is sent to a data request contract in the intelligent contract module by the data request module according to a preset period; generating a data request list based on the data acquisition request through an intelligent contract module; and sending the data request list to the terminal pool through the intelligent contract module so as to call each intelligent terminal in the terminal pool to acquire the data of the out-of-chain ammeter.
In the embodiment of the invention, the data request module Mi(i 1, 2.. n.) the data request contract in the intelligent contract module is called in a preset period, a data acquisition request is sent to the data request contract, and data information D to be acquired is formulatedj(j=M1,M2,...,Mn) Generating a data request list LiThen the data on the chain is requested by the contractRequest list LiSending the data to a speaker pool (namely a terminal pool), and calling each speaker node (namely an intelligent terminal) OiAnd acquiring data of the intelligent electric meter outside the chain (namely acquiring data of the electric meter outside the chain).
Optionally, before generating the data request list based on the data acquisition request by the intelligent contract module, the processing method further includes: generating a pair of public key and private key for the terminal pool based on a preset threshold signature consensus mechanism; based on the number of intelligent terminals in the terminal pool, performing fragment segmentation operation on the public key and the private key to obtain public key fragments and private key fragments; and distributing the public key fragments and the private key fragments to all intelligent terminals participating in acquiring the data of the off-chain ammeter in the terminal pool.
In this embodiment, the threshold signature consensus mechanism (t, n) generates a pair of public key PK and private key SK for a pool of talkers (i.e. a terminal pool) that obtains data, and distributes the public key PK and the private key SK to all talker nodes (i.e. intelligent terminals) participating in data acquisition in the pool of talkers after performing fragmentation operation on the public key and the private key, where each talker node obtains its own public key fragment PKiWith the private key shard skiWherein t represents a preset threshold value, and n represents the number of intelligent terminals required for acquiring data.
Optionally, before generating the data request list based on the data acquisition request by the intelligent contract module, the processing method further includes: generating a shared key based on a preset threshold signature consensus mechanism; a key copy of the shared key is distributed to each intelligent terminal in the pool of terminals.
In this embodiment, the threshold signature consensus mechanism (t, n) generates a global temporary shared key e, and each talker node (i.e. the smart terminal) receives a key copy e of ei
Optionally, the data request list includes: the method comprises the steps of required power data information, public key fragments, private key fragments, key copies, preset threshold values and the required number of intelligent terminals.
In the present embodiment, the data request list LiIncluding the required power data information DjAnd generating a public key fragment pk formed by (t, n) based on a threshold signature consensus mechanismiAnd fragments of private keysskiA threshold t for achieving consensus, and a number n of speakers required to acquire data.
Step S104, carrying out initial digital signature on the off-chain electric meter data, and broadcasting the initial signature result and the off-chain electric meter data to at least one other intelligent terminal in a terminal pool, wherein the terminal pool comprises: the current intelligent terminal and other intelligent terminals participating in data acquisition are elected as the aggregation intelligent terminal of the terminal pool.
In this embodiment, after the accuracy analysis processing is performed on the off-link ammeter data, each intelligent terminal can perform digital signature (i.e., initial digital signature) on the data, and finally broadcast the initial signature result and the off-link ammeter data to other intelligent terminals in the terminal battery.
Optionally, the step of performing an initial digital signature on the off-link electricity meter data, and broadcasting the initial signature result and the off-link electricity meter data to at least one other intelligent terminal in the terminal pool includes: performing digital signature on the off-chain ammeter data based on the private key fragments, the key copy and a second preset signature algorithm, and calculating to obtain an initial signature result; and broadcasting the initial signature result and the off-chain ammeter data to at least one other intelligent terminal in the terminal pool.
In this embodiment, each talker node uses the assigned private key fragments skiTemporary shared key copy eiAnd a built-in digital signature algorithm (namely a second preset signature algorithm) carries out digital signature on the data (namely the data of the off-link electric meter) of the intelligent electric meter, and part of the digital signature is calculated
Figure BDA0003243980330000111
And processing the results
Figure BDA0003243980330000112
(i.e., initial signature results) to all other talker nodes in the talker pool participating in data acquisition, and then broadcasting the prepared information (i.e., off-link meter data), wherein the resultscommiIncluding data A obtained by a prediction machineiPartial digital signature
Figure BDA0003243980330000113
And its number i.
Optionally, after broadcasting the initial signature result and the off-link meter data to at least one other intelligent terminal in the terminal pool, the processing method further includes: and broadcasting the information of canceling the submitted initial signature result, and waiting for receiving the information of canceling the submitted initial signature result broadcasted by other intelligent terminals, wherein the quantity of the received information of canceling the submitted initial signature result is more than or equal to a preset threshold value.
In the present embodiment, each talker node broadcasts a result commiThereafter, a "cancel commit comm" is broadcasti"i.e., the initial signature result information is submitted for cancellation, and waits for a set of information for canceling the submission legally, which is greater than or equal to a threshold value t (i.e., a preset threshold value), to be received.
And S106, verifying the authenticity of the off-chain ammeter data by adopting the public key fragments and a preset signature verification algorithm to obtain a verification result.
In the embodiment, each intelligent terminal utilizes the corresponding public key fragment pkiAnd built-in signature verification algorithm validii;(pkiAnd e)) (namely, a preset signature verification algorithm) verifies the authenticity of the broadcast data (namely, the off-link ammeter data) to obtain a verification result.
Fig. 2 is a flow chart of optional digital signature and signature verification between the intelligent terminals according to an embodiment of the present invention, and as shown in fig. 2, the flow chart is divided into a signer dialer (i.e., the intelligent terminal that signs data of an off-link power meter) and a verifier (i.e., the intelligent terminal that verifies data and a signature sent by the signer dialer), and a specific signature process of the signer dialer is as follows: temporary secret key e is used by each speaker of signature partyiFor data block AiSymmetric encryption is carried out to obtain symmetric encryption AiThen, the content hash calculation is carried out by using the MD5 algorithm to obtain a hash value H1Reuse the private key fragment skiPerforming asymmetric encryptionTo obtain Enc (H)1) (ii) a The specific verification process of the verifier prediction machine is as follows: receiving data block A sent by signer predictive playeriUsing temporary keys eiFor data block AiSymmetric encryption is carried out to obtain symmetric encryption AiThen, the content hash calculation is carried out by using the MD5 algorithm to obtain a hash value H2At the same time, receiving the data Enc (H) sent by the signer predictive speaker1) Using public key fragments pkiCarrying out asymmetric decryption to obtain a hash value H1Then, the obtained hash value H is obtained1And a hash value H2And comparing, and if the two are consistent, the digital signature is successfully authenticated, namely the verification is successful.
Optionally, after verifying the authenticity of the off-link ammeter data by using the public key fragment and the preset signature verification algorithm and obtaining a verification result, the processing method further includes: and when the number of the obtained verification results is more than or equal to the preset threshold value, obtaining a consensus result based on a preset threshold signature consensus mechanism.
In the present embodiment, the consensus result a is obtained through a threshold signature consensus mechanism (t, n), where a ═ Agg (a)i) Agg is a majority function, and in the threshold signature consensus mechanism, only a part of digital signatures reaching a preset threshold (for example, t threshold numbers) are signed for the same data value a
Figure BDA0003243980330000121
That is, when t intelligent terminals all acquire the same data value a, the consensus can be achieved (that is, when the number of the obtained verification results is true is greater than or equal to the preset threshold value, the consensus result is obtained).
And S108, carrying out digital signature on the off-chain electric meter data by adopting a complete private key, a system time stamp and a first preset signature algorithm to obtain a digital signature result, wherein the complete private key is obtained by synthesizing private key fragments of the current intelligent terminal and private key fragments of other intelligent terminals.
In this embodiment, a talker node is randomly selected from t talkers (i.e. intelligent terminals) which finally reach consensus according to a random number algorithm to serve as an aggregate talker
Figure BDA0003243980330000122
Integrating comm submitted by nodes of each propheteriForm a set CiReuse each private key fragment skiThe synthesized complete private key SK, the system timestamp TS and the digital signature algorithm (i.e. the first preset signature algorithm) obtain a digital signature sigma (i.e. a digital signature result) with complete data.
Step S110, an initial signature result set, off-chain meter data, and a digital signature result are uploaded to the power block chain, where the initial signature result set is a set formed by integrating initial signature results submitted by the current intelligent terminals.
In this example, the polymerization prophetic machine
Figure BDA0003243980330000123
(i.e., the current intelligent terminal can be elected as an aggregation intelligent terminal/aggregation prediction machine) integrating the comm submitted by each prediction machine node (i.e., the intelligent terminal)i(i.e., initial signature result) to form a set Ci(i.e., the initial signature result set) and then by the aggregation predictive engine
Figure BDA0003243980330000124
Submitting a set C to a power blockchainiData a and its complete digital signature sigma.
Optionally, after uploading the initial signature result set, the off-chain meter data, and the digital signature result to the power block chain, the processing method further includes: according to the initial signature result submitted by each intelligent terminal in the initial signature result set, evaluating each intelligent terminal through a credit contract in an intelligent contract module to obtain an evaluation result; and executing reward operation or punishment operation on each intelligent terminal according to the evaluation result.
In this embodiment, the reputation contract is based on set CiComm submitted by each preloader nodeiThe situation (i.e. the initial signature result submitted by each smart terminal in the initial signature result set) performs a reward or penalty for each predictor node (i.e. smart terminal).
Optionally, the reputation evaluation index of the reputation contract in the intelligent contract module for each intelligent terminal includes at least one of the following: task response time, broadcast result time, total number of data requests allocated, total number of data requests completed, and total number of feedback results accepted.
In this embodiment, the reputation evaluation indicators include: task response time: predicting the total time of the whole data request by the machine; broadcast result time: predicting machine broadcast legal result commiIf the prediction machine broadcasts the legal result comm after t timeiThe fact that the prophetic machine is a malicious node is proved to be suspected of directly copying the broadcast results of other prophetic machines, wherein the time t refers to the time for the first honest prophetic machine node to broadcast the cancel submission information; total number of data requests allocated: the total number of data requests that the node has been assigned in the past (including completed and incomplete); total number of completed data requests: the total number of data requests completed by the node in the past can be divided by the total number of the distributed requests to obtain a task completion rate; total number of accepted feedback results: the total number of feedback results that can be accepted is determined after the responses of all the prediction machines are compared, and the accuracy can be obtained by dividing the total number by the total number of the distributed data requests or the total number of the completed data requests.
According to the embodiment of the invention, for the service scene facing the intelligent electric meter, a data acquisition mode under the prophetic chain with the intelligent electric meter general table and the corresponding sub-tables as a data unit is designed, an error judgment algorithm is constructed to analyze the accuracy of the uplink data, the integrity problem of a data source is effectively solved, and meanwhile, by designing a prophetic machine consensus mechanism based on a threshold signature algorithm and by designing the processes of joint under-chain consensus, unified aggregation and uplink of all prophetic machine nodes, the problems of large network pressure and low operation efficiency of a block chain are effectively solved while the safety and reliability of the data uplink process are ensured.
Example two
Fig. 3 is a schematic diagram of an alternative distributed intelligent terminal consensus device facing a smart meter according to an embodiment of the present invention, as shown in fig. 3, including: the system comprises a power number block chain, a data request module, an intelligent contract module (comprising a credit contract and a data request contract), a prediction machine pool and an intelligent electric meter data storage node (comprising power terminal storage, power system storage, cloud storage and the like), and specifically comprises the following steps:
(1) invoking a data request contract: data request module Mi(i 1, 2.. n.) call a data request contract in a preset period, send a data acquisition requirement to the contract, and set data information D to be acquiredj(j=M1,M2,...,Mn);
(2) Sending a data request list: on-chain data request contract lists L data requestsiSending the data to a predictive speech machine pool, and calling each predictive speech machine node OiAcquiring data of the intelligent electric meter outside the chain, wherein the data request list LiIncluding the required power data information DjAnd a public key fragment pk generated based on a (t, n) threshold signature consensus mechanismiAnd private key shard skiA threshold value t for achieving consensus and the number n of prediction machines required for acquiring data;
(3) data acquisition and accuracy analysis:
1) and (3) data acquisition: each predicting machine node takes the intelligent electric meter general table and the corresponding sub-table as a data acquisition unit to carry out data retrieval operation on the intelligent electric meter data storage node so as to acquire the intelligent electric meter data outside the chain;
2) and (3) accuracy analysis: judging algorithm through built-in error in prophetic machine pool
Figure BDA0003243980330000131
Figure BDA0003243980330000132
Calculating intelligent electric meter general table BnElectric quantity and corresponding sub-meter CniThe electric quantity and the error value are used for carrying out error judgment on the electric meter data, and marking the total meter and the sub-meter data which exceed the specified error value according to the error judgment result;
(4) each talker node using the assigned private key fragments skiTemporary shared key copy eiAnd carrying out digital signature on the intelligent electric meter data by a built-in digital signature algorithm, and calculating partial digital signature
Figure BDA0003243980330000141
Figure BDA0003243980330000142
Then the result is processed
Figure BDA0003243980330000143
Broadcasting to all other nodes participating in data acquisition in the predictive machine pool, and then broadcasting prepared information;
(5) each talker node broadcasts a "cancel submit commi"and waits for the receipt of a set of legally unsubscribed submissions that is greater than or equal to a threshold t;
(6) each talker node receives the broadcasted commiThereafter, the corresponding public key fragment pk is utilizediAnd built-in signature verification algorithm validii;(pkiE)) verifying broadcast data authenticity, and obtaining a consensus result A through a (t, n) threshold signature consensus mechanism, wherein A is Agg (A)i) Agg is a majority function. In the (t, n) threshold signature consensus mechanism, only t partial digital signatures are obtained for the same data value A
Figure BDA0003243980330000144
When t prediction machines acquire the same data value A and achieve consensus on the same data value A, the next step of calculating the complete digital signature sigma of the data is started;
(7) randomly selecting a preloader node from t preloaders which finally achieve consensus according to a random number algorithm to serve as an aggregation preloader
Figure BDA0003243980330000145
Integrating comm submitted by nodes of each propheteriForm a set CiReuse each private key fragment skiThe synthesized complete private key SK, system time stamp TS and digital signature algorithm are obtainedDigital signature sigma with complete data, and final prediction by aggregation
Figure BDA0003243980330000146
Contract submission set C to on-chain data requestsiData a and its complete digital signature Σ (i.e., return data and digital signature to the data request contract);
(8) reputation contract on chain according to set CiComm submitted by each preloader nodeiCase (i.e. according to return set C)i) And executing reward or punishment on each prophetic node, wherein the reputation measurement indexes in the reputation contract comprise:
1) the task response time is as follows: predicting the total time of the whole data request by the machine;
2) broadcast result time: predicting machine broadcast legal result commiIf the prediction machine broadcasts the legal result comm after t timeiThe fact that the prophetic machine is a malicious node is proved to be suspected of directly copying the broadcast results of other prophetic machines, wherein the time t refers to the time for the first honest prophetic machine node to broadcast the cancel submission information;
3) the total number of data requests allocated: the total number of data requests that the node has been assigned in the past (including completed and incomplete);
4) total number of completed data requests: the total number of data requests completed by the node in the past can be divided by the total number of the distributed requests to obtain a task completion rate;
5) total number of accepted feedback results: the total number of the feedback results which can be accepted is judged after the responses of all the prediction machines are compared, and the accuracy can be obtained by dividing the total number by the total number of the distributed data requests or the total number of the completed data requests.
According to the embodiment of the invention, through designing a data acquisition mode oriented to a service scene of the intelligent electric meter, a data accuracy judgment algorithm and a heterogeneous predictive engine pool network structure, and simultaneously utilizing a predictive engine consensus mechanism based on a threshold signature algorithm, the accuracy, the efficiency and the reliability of the uplink of the intelligent telegraph data can be ensured, and meanwhile, the problems of large network pressure and low operation efficiency of a block chain can be effectively solved.
EXAMPLE III
The data processing apparatus provided in this embodiment includes a plurality of implementation units, and each implementation unit corresponds to a respective implementation step in the first embodiment.
Fig. 4 is a schematic diagram of a data processing apparatus according to an embodiment of the present invention, and as shown in fig. 4, the data processing apparatus may include: an acquisition unit 40, a broadcast unit 42, a verification unit 44, a signature unit 46, an upload unit 48, wherein,
the acquiring unit 40 is configured to acquire off-chain ammeter data, and analyze the off-chain ammeter data according to a preset error evaluation rule to obtain processed off-chain ammeter data;
a broadcasting unit 42, configured to perform an initial digital signature on the off-link ammeter data, and broadcast the initial signature result and the off-link ammeter data to at least one other intelligent terminal in a terminal pool, where the terminal pool includes: the current intelligent terminal and other intelligent terminals participating in data acquisition are elected as aggregation intelligent terminals of a terminal pool;
the verification unit 44 is configured to verify the authenticity of the off-link ammeter data by using the public key fragments and a preset signature verification algorithm to obtain a verification result;
the signature unit 46 is configured to digitally sign the off-link electric meter data by using a complete private key, a system timestamp and a first preset signature algorithm to obtain a digital signature result, where the complete private key is obtained by synthesizing a private key fragment of the current intelligent terminal and private key fragments of other intelligent terminals;
and an uploading unit 48, configured to upload an initial signature result set, off-chain meter data, and a digital signature result to the power block chain, where the initial signature result set is a set formed by integrating initial signature results submitted by the current intelligent terminals.
The processing apparatus may obtain the off-link ammeter data through the obtaining unit 40, analyze the off-link ammeter data according to the preset error evaluation rule, obtain the processed off-link ammeter data, perform the initial digital signature on the off-link ammeter data through the broadcasting unit 42, and broadcast the initial signature result and the off-link ammeter data to at least one other intelligent terminal in the terminal battery, where the terminal battery includes: the intelligent terminal comprises a current intelligent terminal and other intelligent terminals participating in data acquisition, wherein the current intelligent terminal is elected to be a converged intelligent terminal of a terminal pool, public key fragments and a preset signature verification algorithm are adopted by a verification unit 44, the authenticity of the off-link ammeter data is verified, a verification result is obtained, the off-link ammeter data is digitally signed by a complete private key, a system time stamp and a first preset signature algorithm through a signature unit 46, a digital signature result is obtained, and an initial signature result set, the off-link ammeter data and the digital signature result are uploaded to a power block chain through an uploading unit 48. According to the embodiment of the invention, the authenticity of the data of the off-link ammeter acquired by each intelligent terminal in the terminal pool is verified, and after the consensus is achieved, one intelligent terminal is selected to aggregate all the data uniformly and upload the data to the power block chain, so that the safety and reliability of the data chaining process are ensured, the problems of large network pressure and low operation efficiency of the block chain caused by the existing on-chain aggregation scheme are effectively solved, and the technical problems of increased network pressure and reduced operation efficiency of the block chain caused by the fact that each intelligent terminal uploads the acquired data to the block chain independently in the related art are solved.
Optionally, the processing device further includes: the intelligent contract management system comprises a first receiving module, a second receiving module and a third receiving module, wherein the first receiving module is used for receiving a data acquisition request through an intelligent contract module before acquiring data of the off-link electric meter, and the data acquisition request is sent to a data request contract in the intelligent contract module by the data request module according to a preset period; the first generation module is used for generating a data request list based on the data acquisition request through the intelligent contract module; and the first sending module is used for sending the data request list to the terminal pool through the intelligent contract module so as to call each intelligent terminal in the terminal pool to acquire the data of the out-of-chain ammeter.
Optionally, the processing device further includes: the second generation module is used for generating a pair of public key and private key for the terminal pool based on a preset threshold signature consensus mechanism before generating a data request list based on the data acquisition request through the intelligent contract module; the first segmentation module is used for carrying out fragment segmentation operation on the public key and the private key based on the number of the intelligent terminals in the terminal pool to obtain public key fragments and private key fragments; the first distribution module is used for distributing the public key fragments and the private key fragments to all intelligent terminals participating in acquiring the data of the off-link ammeter in the terminal pool.
Optionally, the processing device further includes: the third generation module is used for generating a shared key based on a preset threshold signature consensus mechanism before generating a data request list based on the data acquisition request through the intelligent contract module; and the second distribution module is used for distributing the key copy of the shared key to each intelligent terminal in the terminal pool.
Optionally, the data request list includes: the method comprises the steps of required power data information, public key fragments, private key fragments, key copies, preset threshold values and the required number of intelligent terminals.
Optionally, the obtaining unit includes: the first analysis module is used for analyzing an error value between the electric quantity of the electric meter data general table and the corresponding electric quantity of the electric meter data branch table based on a preset error evaluation rule, wherein the electric meter data general table and the corresponding electric meter data branch table are a data acquisition unit of the off-link electric meter data; and the first marking module is used for marking the electric meter data general table with the error value more than or equal to the preset error value and the corresponding electric meter data sub-table to obtain the processed out-of-chain electric meter data.
Optionally, the broadcasting unit includes: the first calculation module is used for carrying out digital signature on the off-chain ammeter data based on the private key fragments, the key copies and a second preset signature algorithm, and calculating to obtain an initial signature result; and the first broadcasting module is used for broadcasting the initial signature result and the off-chain ammeter data to at least one other intelligent terminal in the terminal pool.
Optionally, the processing device further includes: and the second broadcasting module is used for broadcasting the information of canceling and submitting the initial signature result after broadcasting the initial signature result and the off-link ammeter data to at least one other intelligent terminal in the terminal pool, and waiting for receiving the information of canceling and submitting the initial signature result broadcasted by other intelligent terminals, wherein the number of the received information of canceling and submitting the initial signature result is greater than or equal to a preset threshold value.
Optionally, the processing device further includes: the first obtaining module is used for verifying the authenticity of the off-chain ammeter data by adopting the public key fragments and a preset signature verification algorithm, obtaining a verification result, and obtaining a consensus result based on a preset threshold signature consensus mechanism when the number of the obtained verification results is true and is larger than or equal to a preset threshold value.
Optionally, the processing device further includes: the first evaluation module is used for evaluating each intelligent terminal through a credit contract in the intelligent contract module according to the initial signature result submitted by each intelligent terminal in the initial signature result set after uploading the initial signature result set, the off-chain ammeter data and the digital signature result to the power block chain, so as to obtain an evaluation result; and the first execution module is used for executing reward operation or punishment operation on each intelligent terminal according to the evaluation result.
Optionally, the reputation evaluation index of the reputation contract in the intelligent contract module for each intelligent terminal includes at least one of the following: task response time, broadcast result time, total number of data requests allocated, total number of data requests completed, and total number of feedback results accepted.
The processing device may further include a processor and a memory, the acquiring unit 40, the broadcasting unit 42, the verifying unit 44, the signing unit 46, the uploading unit 48, and the like are stored in the memory as program units, and the processor executes the program units stored in the memory to implement corresponding functions.
The processor comprises a kernel, and the kernel calls a corresponding program unit from the memory. The kernel may set one or more of the initial signature result set, the out-of-chain meter data, and the digital signature result to be uploaded to the power block chain by adjusting kernel parameters.
The memory may include volatile memory in a computer readable medium, Random Access Memory (RAM) and/or nonvolatile memory such as Read Only Memory (ROM) or flash memory (flash RAM), and the memory includes at least one memory chip.
The present application further provides a computer program product adapted to perform a program for initializing the following method steps when executed on a data processing device: acquiring off-chain ammeter data, analyzing the off-chain ammeter data according to a preset error evaluation rule, obtaining the processed off-chain ammeter data, performing initial digital signature on the off-chain ammeter data, broadcasting an initial signature result and the off-chain ammeter data to at least one other intelligent terminal in a terminal battery, wherein the terminal battery comprises: the intelligent terminal comprises a current intelligent terminal and other intelligent terminals participating in data acquisition, wherein the current intelligent terminal is elected as a polymerization intelligent terminal of a terminal pool, public key fragments and a preset signature verification algorithm are adopted, the authenticity of the off-link ammeter data is verified, a verification result is obtained, digital signature is carried out on the off-link ammeter data by adopting a complete private key, a system time stamp and a first preset signature algorithm, a digital signature result is obtained, and an initial signature result set, the off-link ammeter data and the digital signature result are uploaded to a power block chain.
According to another aspect of the embodiments of the present invention, there is also provided a data processing system, including: the intelligent terminal is used for verifying the authenticity of the off-link ammeter data by adopting a public key fragment and a preset signature verification algorithm after acquiring the off-link ammeter data to obtain a verification result, obtaining a consensus result by adopting a threshold signature consensus mechanism, and digitally signing the off-link ammeter data by adopting a complete private key, a system time stamp and a first preset signature algorithm to obtain a digital signature result; the intelligent contract module comprises a data request contract and a reputation contract, and uploads an initial signature result set, off-chain ammeter data and a digital signature result to the power block chain, wherein the data request contract interacts with the data request module and is used for receiving a data access request of the data request module, sending a data request list to a terminal battery, receiving off-chain ammeter data and a digital signature returned by the aggregated intelligent terminals, and the reputation contract is used for tracking, calculating and managing the reputation of the intelligent terminals, calculating the overall average reputation score of each intelligent terminal, selecting the highest-score intelligent terminal and returning the average reputation score of a given intelligent terminal address; the data request module is used for calling a data request contract according to a preset period and sending a data acquisition request to the data request contract; the data storage node comprises at least one of: the system comprises a data storage terminal, a system storage node and a cloud storage node.
According to another aspect of the embodiments of the present invention, there is also provided an electronic device, including: a processor; and a memory for storing executable instructions for the processor; wherein the processor is configured to perform the data processing method of any one of the above via execution of executable instructions.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed technology can be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units may be a logical division, and in actual implementation, there may be another division, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (14)

1. A data processing method, comprising:
acquiring off-chain ammeter data, and analyzing and processing the off-chain ammeter data according to a preset error evaluation rule to obtain processed off-chain ammeter data;
performing initial digital signature on the off-chain ammeter data, and broadcasting an initial signature result and the off-chain ammeter data to at least one other intelligent terminal in a terminal battery, wherein the terminal battery comprises: the current intelligent terminal and other intelligent terminals participating in data acquisition are elected as the aggregation intelligent terminal of the terminal pool;
verifying the authenticity of the off-link ammeter data by adopting a public key fragment and a preset signature verification algorithm to obtain a verification result;
performing digital signature on the off-chain ammeter data by adopting a complete private key, a system timestamp and a first preset signature algorithm to obtain a digital signature result, wherein the complete private key is obtained by synthesizing private key fragments of the current intelligent terminal and private key fragments of other intelligent terminals;
uploading an initial signature result set, the off-chain ammeter data and the digital signature result to a power block chain, wherein the initial signature result set is a set formed by integrating initial signature results submitted by the intelligent terminals at present.
2. The process of claim 1, wherein prior to obtaining off-chain meter data, the process further comprises:
receiving a data acquisition request through an intelligent contract module, wherein the data acquisition request is sent to a data request contract in the intelligent contract module by a data request module according to a preset period;
generating a data request list based on the data acquisition request through an intelligent contract module;
and sending the data request list to the terminal pool through an intelligent contract module so as to call each intelligent terminal in the terminal pool to acquire the data of the out-of-chain ammeter.
3. The processing method according to claim 2, wherein before generating, by the smart contract module, a data request list based on the data acquisition request, the processing method further comprises:
generating a pair of public key and private key for the terminal pool based on a preset threshold signature consensus mechanism;
based on the number of intelligent terminals in the terminal pool, performing fragment segmentation operation on the public key and the private key to obtain public key fragments and private key fragments;
and distributing the public key fragments and the private key fragments to all intelligent terminals participating in acquiring the data of the off-link ammeter in the terminal pool.
4. The processing method according to claim 2, wherein before generating, by the smart contract module, a data request list based on the data acquisition request, the processing method further comprises:
generating a shared key based on a preset threshold signature consensus mechanism;
and distributing a key copy of the shared key to each intelligent terminal in the terminal pool.
5. The processing method of claim 2, wherein the data request list comprises: the method comprises the steps of required power data information, public key fragments, private key fragments, key copies, preset threshold values and the required number of intelligent terminals.
6. The processing method of claim 1, wherein the step of analyzing and processing the off-chain ammeter data according to a preset error evaluation rule to obtain processed off-chain ammeter data comprises:
analyzing an error value between the total electric quantity of the electric meter data and the total electric quantity of the corresponding electric meter data sub-meters based on a preset error evaluation rule, wherein the total electric meter data and the corresponding electric meter data sub-meters are a data acquisition unit of the off-chain electric meter data;
and marking the electric meter data summary table with the error value more than or equal to a preset error value and the corresponding electric meter data branch table to obtain the processed off-link electric meter data.
7. The process of claim 1, wherein the step of performing an initial digital signature on the off-chain meter data and broadcasting the initial signature result and the off-chain meter data to at least one other intelligent terminal in the terminal battery comprises:
performing digital signature on the off-link ammeter data based on the private key fragments, the key copy and a second preset signature algorithm, and calculating to obtain an initial signature result;
broadcasting the initial signature result and the off-chain ammeter data to at least one other intelligent terminal in a terminal pool.
8. The process of claim 7, wherein after broadcasting the initial signature result and the off-chain meter data to at least one other intelligent terminal in a terminal pool, the process further comprises:
and broadcasting the information of canceling the submitted initial signature result, and waiting for receiving the information of canceling the submitted initial signature result broadcasted by other intelligent terminals, wherein the quantity of the received information of canceling the submitted initial signature result is more than or equal to a preset threshold value.
9. The processing method according to claim 1, wherein after verifying the authenticity of the off-link meter data by using a public key fragmentation and a preset signature verification algorithm and obtaining a verification result, the processing method further comprises:
and when the number of the obtained verification results is true is larger than or equal to a preset threshold value, obtaining a consensus result based on a preset threshold signature consensus mechanism.
10. The process of claim 1, wherein after uploading the initial signature result set, the out-of-chain meter data, and the digital signature result to a power block chain, the process further comprises:
according to the initial signature result submitted by each intelligent terminal in the initial signature result set, evaluating each intelligent terminal through a credit contract in an intelligent contract module to obtain an evaluation result;
and executing reward operation or punishment operation on each intelligent terminal according to the evaluation result.
11. The processing method according to claim 10, wherein the reputation evaluation index of the reputation contract in the intelligent contract module for each intelligent terminal comprises at least one of:
task response time, broadcast result time, total number of data requests allocated, total number of data requests completed, and total number of feedback results accepted.
12. A data processing system, comprising: heterogeneous terminal pool network, intelligent contract module, data request module, data storage node, wherein,
the heterogeneous terminal pool network comprises at least two terminal pools, wherein each terminal pool in the heterogeneous terminal pool network executes data acquisition commands of different data request intelligent contracts, each terminal pool comprises at least two intelligent terminals, and each intelligent terminal is used for verifying the authenticity of the off-chain ammeter data by adopting a public key fragment and a preset signature verification algorithm after acquiring the off-chain ammeter data to obtain a verification result, obtaining a consensus result by adopting a threshold signature consensus mechanism, and digitally signing the off-chain ammeter data by adopting a complete private key, a system time stamp and a first preset signature algorithm to obtain a digital signature result;
the intelligent contract module comprises a data request contract and a reputation contract, and uploads an initial signature result set, off-chain ammeter data and a digital signature result to the power block chain, wherein the data request contract is interactive with the data request module and is used for receiving a data access request of the data request module, sending a data request list to a terminal pool, receiving off-chain ammeter data returned by the aggregated intelligent terminals and the digital signature, and the reputation contract is used for tracking, calculating and managing the reputation of the intelligent terminals, calculating the overall average reputation score of each intelligent terminal, selecting the highest-score intelligent terminal and returning the average reputation score of a given intelligent terminal address;
the data request module calls the data request contract according to a preset period and sends a data acquisition request to the data request contract;
the data storage node comprises at least one of: the system comprises a data storage terminal, a system storage node and a cloud storage node.
13. A data processing apparatus, comprising:
the acquisition unit is used for acquiring the data of the off-chain ammeter, and analyzing and processing the data of the off-chain ammeter according to a preset error evaluation rule to obtain processed data of the off-chain ammeter;
a broadcasting unit, configured to perform an initial digital signature on the off-link ammeter data, and broadcast an initial signature result and the off-link ammeter data to at least one other intelligent terminal in a terminal pool, where the terminal pool includes: the current intelligent terminal and other intelligent terminals participating in data acquisition are elected as the aggregation intelligent terminal of the terminal pool;
the verification unit is used for verifying the authenticity of the off-link ammeter data by adopting a public key fragment and a preset signature verification algorithm to obtain a verification result;
the signature unit is used for digitally signing the off-link ammeter data by adopting a complete private key, a system timestamp and a first preset signature algorithm to obtain a digital signature result, wherein the complete private key is obtained by synthesizing private key fragments of the current intelligent terminal and private key fragments of other intelligent terminals;
and the uploading unit is used for uploading an initial signature result set, the off-chain ammeter data and the digital signature result to the power block chain, wherein the initial signature result set is a set formed by integrating initial signature results submitted by the intelligent terminals by the current intelligent terminals.
14. An electronic device, comprising:
a processor; and
a memory for storing executable instructions of the processor;
wherein the processor is configured to perform the data processing method of any one of claims 1 to 11 via execution of the executable instructions.
CN202111027793.2A 2021-09-02 Data processing method, device and system thereof, and electronic equipment Active CN113779642B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111027793.2A CN113779642B (en) 2021-09-02 Data processing method, device and system thereof, and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111027793.2A CN113779642B (en) 2021-09-02 Data processing method, device and system thereof, and electronic equipment

Publications (2)

Publication Number Publication Date
CN113779642A true CN113779642A (en) 2021-12-10
CN113779642B CN113779642B (en) 2024-05-28

Family

ID=

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114374704A (en) * 2021-12-29 2022-04-19 张海滨 Reliable broadcasting method, apparatus, system and medium
CN116032494A (en) * 2023-03-24 2023-04-28 深圳开鸿数字产业发展有限公司 Data interaction method, blockchain predictor, device and medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109379343A (en) * 2018-09-27 2019-02-22 福建福链科技有限公司 A kind of the isomery common recognition method and terminal of block chain
CN111241549A (en) * 2020-01-08 2020-06-05 广州中国科学院计算机网络信息中心 Credible analysis method under heterogeneous identification system
CN111639361A (en) * 2020-05-15 2020-09-08 中国科学院信息工程研究所 Block chain key management method, multi-person common signature method and electronic device
CN112102033A (en) * 2020-09-03 2020-12-18 西安电子科技大学 Electric power distributed transaction nested consensus method, system and application based on block chain
CN112507360A (en) * 2020-12-10 2021-03-16 浙商银行股份有限公司 Block chain data uplink method and device based on threshold signature and prediction machine
US20210083882A1 (en) * 2019-09-16 2021-03-18 Cisco Technology, Inc. Distributed certificate authority
WO2021093244A1 (en) * 2019-11-14 2021-05-20 深圳市网心科技有限公司 Random number generation method, blockchain node, system and medium
US20210209483A1 (en) * 2018-06-14 2021-07-08 Samsung Electronics Co., Ltd. Swarm control apparatus and method using dynamic rule-based blockchain
WO2021163960A1 (en) * 2020-02-20 2021-08-26 深圳市汇尊区块链技术有限公司 Blockchain-based random number generation method and system, and storage medium

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20210209483A1 (en) * 2018-06-14 2021-07-08 Samsung Electronics Co., Ltd. Swarm control apparatus and method using dynamic rule-based blockchain
CN109379343A (en) * 2018-09-27 2019-02-22 福建福链科技有限公司 A kind of the isomery common recognition method and terminal of block chain
CN112968884A (en) * 2018-09-27 2021-06-15 福建福链科技有限公司 Block chain heterogeneous consensus method and terminal for preventing hacker attack
CN112968883A (en) * 2018-09-27 2021-06-15 福建福链科技有限公司 Block chain heterogeneous consensus method with high safety and terminal
US20210083882A1 (en) * 2019-09-16 2021-03-18 Cisco Technology, Inc. Distributed certificate authority
WO2021093244A1 (en) * 2019-11-14 2021-05-20 深圳市网心科技有限公司 Random number generation method, blockchain node, system and medium
CN111241549A (en) * 2020-01-08 2020-06-05 广州中国科学院计算机网络信息中心 Credible analysis method under heterogeneous identification system
WO2021163960A1 (en) * 2020-02-20 2021-08-26 深圳市汇尊区块链技术有限公司 Blockchain-based random number generation method and system, and storage medium
CN111639361A (en) * 2020-05-15 2020-09-08 中国科学院信息工程研究所 Block chain key management method, multi-person common signature method and electronic device
CN112102033A (en) * 2020-09-03 2020-12-18 西安电子科技大学 Electric power distributed transaction nested consensus method, system and application based on block chain
CN112507360A (en) * 2020-12-10 2021-03-16 浙商银行股份有限公司 Block chain data uplink method and device based on threshold signature and prediction machine

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
刘永相;李彦斌;蒋炜;李香龙;邓春宇;惠富会;: "应用于物联网的区块链共识算法比较研究", 电力信息与通信技术, no. 06, 25 June 2020 (2020-06-25), pages 36 - 40 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114374704A (en) * 2021-12-29 2022-04-19 张海滨 Reliable broadcasting method, apparatus, system and medium
CN114374704B (en) * 2021-12-29 2023-07-07 张海滨 Reliable broadcasting method, device, system and medium
CN116032494A (en) * 2023-03-24 2023-04-28 深圳开鸿数字产业发展有限公司 Data interaction method, blockchain predictor, device and medium

Similar Documents

Publication Publication Date Title
WO2020088108A1 (en) Blockchain-based data attestation method and apparatus, and electronic device
CN111316615B (en) System and method for ensuring correct execution of a computer program using a mediator computer system
CN109034813B (en) Representative node device election method and device, computer device and storage medium
CN112868210B (en) Block chain timestamp protocol
TW202018571A (en) Data storage method and device based on block chain and electronic equipment
CN111801910A (en) System and method for authenticating off-chain data based on proof verification
TW202018557A (en) Data evidence saving method and device based on blockchain and electronic equipment
CN111427957A (en) Block chain voting information verification method, device, equipment and storage medium
CN111523890A (en) Data processing method and device based on block chain, storage medium and equipment
CN113256297B (en) Data processing method, device and equipment based on block chain and readable storage medium
CN112118253A (en) Cloud service log anonymization system and method based on block chain
CN111416709B (en) Voting method, device, equipment and storage medium based on block chain system
CN112448946A (en) Log auditing method and device based on block chain
CN113888164A (en) Block chain transaction pool implementation method and device, computer equipment and storage medium
CN112686763A (en) Policy verification method, client, server and storage medium
JP2023530594A (en) Permitted Event Processing in Distributed Databases
US20220294637A1 (en) System and Method of Establishing a Trusted Relationship in a Distributed System
CN114329290B (en) Capability open platform and authorized access method thereof
CN111475778A (en) Music data processing method and device based on block chain
CN110807209A (en) Data processing method, device and storage medium
US20200057871A1 (en) Apparatuses and methods for signing a legal document
CN110647553B (en) Block chain-based power transaction contract management method and system
CN109167665B (en) Robot competition rule management system
CN116452135A (en) Distributed anonymous voting method, device, equipment and medium based on Ethernet
Guo et al. Antitampering scheme of evidence transfer information in judicial system based on blockchain

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