CN114462730A - Reputation management framework of block chain prediction machine and data aggregation method thereof - Google Patents

Reputation management framework of block chain prediction machine and data aggregation method thereof Download PDF

Info

Publication number
CN114462730A
CN114462730A CN202011236146.8A CN202011236146A CN114462730A CN 114462730 A CN114462730 A CN 114462730A CN 202011236146 A CN202011236146 A CN 202011236146A CN 114462730 A CN114462730 A CN 114462730A
Authority
CN
China
Prior art keywords
data
contract
request
node
aggregation
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.)
Pending
Application number
CN202011236146.8A
Other languages
Chinese (zh)
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.)
Northeastern University Qinhuangdao Branch
Original Assignee
Northeastern University Qinhuangdao Branch
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 Northeastern University Qinhuangdao Branch filed Critical Northeastern University Qinhuangdao Branch
Priority to CN202011236146.8A priority Critical patent/CN114462730A/en
Publication of CN114462730A publication Critical patent/CN114462730A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • G06Q10/063Operations research, analysis or management
    • G06Q10/0639Performance analysis of employees; Performance analysis of enterprise or organisation operations
    • G06Q10/06393Score-carding, benchmarking or key performance indicator [KPI] analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • G06F16/215Improving data quality; Data cleansing, e.g. de-duplication, removing invalid entries or correcting typographical errors
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/18Complex mathematical operations for evaluating statistical data, e.g. average values, frequency distributions, probability functions, regression analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/548Queue

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Resources & Organizations (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Strategic Management (AREA)
  • Databases & Information Systems (AREA)
  • Software Systems (AREA)
  • Computational Mathematics (AREA)
  • Quality & Reliability (AREA)
  • Finance (AREA)
  • Pure & Applied Mathematics (AREA)
  • Accounting & Taxation (AREA)
  • Mathematical Physics (AREA)
  • Mathematical Optimization (AREA)
  • Mathematical Analysis (AREA)
  • General Business, Economics & Management (AREA)
  • Operations Research (AREA)
  • Educational Administration (AREA)
  • Marketing (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Game Theory and Decision Science (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Tourism & Hospitality (AREA)
  • Evolutionary Biology (AREA)
  • Algebra (AREA)
  • Probability & Statistics with Applications (AREA)
  • Technology Law (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention belongs to the technical field of block chains, in particular to a credit management framework of a block chain prediction machine and a data aggregation method thereof; the architecture includes: the system comprises a data user, a data demand contract, a prediction machine node and a data provider; the data aggregation method comprises the following steps: three stages of identity registration, data request and data response; according to the method, credit values of the nodes and the data sources are dynamically evaluated according to service quality standards such as response time, request completion conditions and complaint quantity of the nodes and the data sources, corresponding service time length is suspended when the credit values are lower than a certain threshold value, and the nodes are stimulated to provide high-quality service and keep honesty according to graded reward and punishment of the credit values; and when data are aggregated, the reputation value is used as a weight to improve the credibility of the aggregated result, and an abnormal value is removed through an algorithm to avoid the influence of excessively deviated data on the result.

Description

Reputation management framework of block chain prediction machine and data aggregation method thereof
Technical Field
The invention relates to the technical field of block chains, in particular to a credit management framework of a block chain prediction machine and a data aggregation method thereof.
Background
The block chain technology realizes the trusted storage of data in an incomplete trusted environment by means of a distributed technology and a cryptography technology, has the characteristics of decentralized architecture, data traceability in the whole process, non-tampering, non-repudiation and the like, and is regarded as a key technology for converting an information internet into a value internet.
The block chain system needs to expand the calculation and storage capacity through the system under the chain, and the existing system under the chain needs to be in butt joint with the block chain system to solve the problems of information isolated island, tamper resistance and the like. However, the blockchain is a closed system and cannot directly request the system data under the chain. Because the data stored in the block chain must be identified by a plurality of nodes, the intelligent contract is executed independently by each block chain node, if a request for calling data out of the chain is sent from the contract, the difference of the calling data can be caused due to network delay, data source fluctuation, node performance and the like, so that different results are generated when each block chain node executes the contract, the identification cannot be achieved, and the trust basis of the block chain is endangered. Town client provides a request event log generated by monitoring contracts deployed on a chain by using nodes outside the chain, acquires data according to the log requirement, and then pushes the data to an intelligent contract in an adaptive format. The active on-demand data request method establishes a data relay for the block chain and the world outside the chain, improves the data timeliness, and avoids the influence on a consensus mechanism, and is called as an Oracle (block chain predictor) in the industry later.
For the prediction machine technology, Oraclize and MakerDAO propose a centralized prediction machine, but the centralized architecture inevitably has the problems of single point of failure, performance bottleneck, centralized trust and the like. Chainlink and Augur propose a decentralized prediction machine, the same data is acquired from multiple data sources through multiple prediction machine nodes, and a single result is returned after data is aggregated to reduce the influence of possible deviation data of a single data source or prediction machine nodes, so that the data credibility is improved. Meanwhile, a credit and guarantee fund mechanism is introduced to stimulate the nodes of the speaker and the data source to keep integrity. However, the existing reputation mechanism is similar to a scoring system, can only generate subjective influence when a user selects a data source and a node, and cannot play a larger role. In addition, the data acquired by multiple nodes is generally only averaged when being aggregated, and abnormal values are not removed.
Disclosure of Invention
In order to solve the above problems, the present invention provides a reputation management framework of a block chain oracle machine and a data aggregation method thereof. The invention realizes that the preset credit value is dynamically adjusted according to the evaluation of the service quality of the node, the credit is brought into the data processing processes such as aggregation and the like, the abnormal value is removed during the data aggregation, and finally the credibility and the accuracy of the block chain prediction machine for acquiring the external data are improved.
A reputation management architecture for a blockchain oracle machine, comprising: the system comprises a data user, a data demand contract, a prediction machine node and a data provider;
the data user side: the prediction engine is invoked indirectly by invoking a data request contract or constructing a user-defined contract.
A data demand contract: a user-defined contract constructed for a data consumer or a deployed data request contract invoked by the data consumer that obtains data by invoking a predictive engine contract.
The predictive engine contract comprises: reputation management contracts, data aggregation contracts, other predictive machine contracts; the credit management contract is a part of a predictive contract and is mainly responsible for allocating default credit values, dynamically adjusting credit values and suspending service; the data aggregation contract: only exist when the aggregation is carried out on the chain, and data sent by the nodes of the prediction machine are aggregated into a single result; the other predictive engine contracts are about other predictive engine contracts other than the predictive engine contract described above.
Predicting machine nodes: a plurality of nodes deployed under the chain. It obtains the task parameters by monitoring the request log on the chain and obtains the data from the data provider. During the aggregation under the chain, the division work according to the monitoring, the execution and the aggregation corresponds to three prediction machine nodes of request adaptation, request execution and response adaptation, and only one request execution node in charge of the monitoring and the execution exists during the aggregation on the chain. Wherein the request adaptation node employs a preemptive message queue.
A data provider: an entity that can provide a data interface to respond to data requests.
A data aggregation method of a credit management framework of a block chain prediction machine comprises the following specific steps: the method mainly comprises three stages of identity registration, data request and data response.
The S1 identity registration phase mainly includes: registering a data user, registering a data provider and registering a speaker node.
S1.1 data consumer registration
Data user registration refers to the generation of respective public and private key pairs, blockchain addresses by the data users.
S1.2 the data provider registration
The data provider registration means that the data provider generates respective public and private key pairs and blockchain addresses, and submits the public keys, the blockchain addresses, the identity information and the guarantee fund to a credit management contract, and the credit management contract is about the set initial value of the credit management contract.
S1.3 predictive speaker node registration
The registration of the nodes of the predictive speakers refers to the steps that the nodes of the predictive speakers generate respective public and private key pairs and block chain addresses, and submit the public keys, the block chain addresses, the identity information and the guarantee fund to a credit management contract, and the credit management contract is about the set initial value of the credit management contract.
The data request stage of S2 is divided into: the method comprises four steps of contract calling, event generation, event monitoring and request execution.
S2.1 contract invocation
Contract invocation refers to a data consumer constructing a user-defined contract or directly invoking a deployed data request contract to invoke a president contract, issuing a request containing data requirements.
S2.2 event Generation
Event generation refers to the prediction engine contract storing task requirements generation event numbers and event logs on the blockchain while reporting event generation timestamps and other event information to the reputation management contract.
S2.3 event listening
Event monitoring refers to that if the event logs are aggregated under a chain, the adaptive prediction machine node is requested to monitor contract logs, when the event logs appointed to the adaptive prediction machine node are monitored, a task is read, the number of times of preemption is set, the task is put into a preemptive message queue, and a request execution node with idle resources preempts the task from the preemptive message queue; after waiting for the tasks of the same event, the propheter node reports the execution node information, the timestamp and the report signature of the preempted tasks to the response adaptation node; if the contract logs are aggregated, requesting to execute a prediction machine to monitor the contract logs, and reading a task when the contract logs are monitored and assigned to the prediction machine;
s2.4 request execution
The request execution means that if the link is aggregated, the predicting machine sends the validity of the request sent by the predicting machine node and the corresponding signature to the adaptation node, and acquires the data request from the data provider specified by the task. And if the data are aggregated on the chain, directly acquiring the data request from the data provider specified by the task.
The S3 data response is divided into: data aggregation, request response and reputation evaluation.
S3.1 data aggregation
The data aggregation refers to that an aggregation executive party carries out aggregation operation after receiving data from the request executive nodes and the data provider signs the data, and records the time stamp of the response of each request executive node. And if the aggregation is carried out under the chain, the aggregation executing party is a response adaptation node, and if the aggregation is carried out on the chain, the aggregation executing party is a data aggregation contract.
S3.2 request response
The request response refers to that the prediction engine contract returns an aggregation result to a user-defined contract or a data request contract which originally sends a request, and if the aggregation is performed under the chain, a timestamp of a received response adaptation node is further recorded.
S3.3 reputation assessment
And the reputation evaluation refers to the step that the reputation management contract calculates the response time of each prediction machine node and the data provider according to the difference value of the received several timestamps, and obtains the average response time from the historical records. Meanwhile, feedback and signature verification results provided by a data user are used as data validity evaluation, and the validity of the request, the data provider with large deviation and the address of the predictive speaker node are used as the basis, so that the credit values corresponding to the address with long response time, poor validity and large data deviation are reduced, and the credit values of the nodes with short response time, good validity and small data deviation are improved. When the credit value is lower than the warning threshold value, the service is suspended for a certain time and a certain guarantee fee is not received, and when the credit value is lower than the minimum threshold value, the service is suspended until the compliance is checked and all the guarantee fees are not received.
Further, the data execution algorithm of the data aggregation comprises: a numerical data execution algorithm and a non-numerical data execution algorithm;
the numerical data execution algorithm comprises the following steps:
(1) calculating the product of the prophetic machine reputation value corresponding to each data and the data provider reputation mean value;
(2) calculating the weight of each data multiplied by the sum of all products of the product in the step (1), and summing to obtain the weighted average value of the data;
(3) solving the mean square error of all the data pairs of the weighted average value;
(4) traversing data, removing data with the deviation larger than k times, wherein k has a default value and can be specified by a task, and simultaneously recording an address list of a data provider and a speaker node corresponding to the removed data;
(5) and finally, calculating the weight of the residual data multiplied by the sum of all the products in the step (1) to obtain the weighted average value of the residual data as the aggregation result.
The non-numerical data execution algorithm comprises the following steps:
(1) calculating the product of the prophetic machine reputation value corresponding to each data and the data provider reputation mean value;
(2) and sequentially adding each datum into a mapping list, wherein the key is data hash, the value is an address list of a data provider and a speaker node which send the datum, and the product of the corresponding speaker credit value and the data provider credit mean value. If the added data hash has mapping, accumulating the values, and adding the newly added node address of the prediction machine and the address of the data provider into an address list;
(3) and finally, taking the data corresponding to the mapping with the highest product accumulation of the reputation value of the prediction machine and the reputation mean value of the data provider as an aggregation result, recording a prediction machine node and a data provider address list corresponding to the aggregation result, and summarizing data provider and prediction machine node addresses corresponding to other data.
The invention has the beneficial effects that:
the credit value of the node and the data source is dynamically evaluated according to the service quality standards such as response time, request completion condition and complaint amount of the node and the data source, the corresponding service time length is suspended when the credit value is lower than a certain threshold value, and the node and the data source are stimulated to provide high-quality service and keep honesty according to the credit value in a grading manner. And when data are aggregated, the reputation value is used as a weight to improve the credibility of the aggregated result, and an abnormal value is removed through an algorithm to avoid the influence of excessively deviated data on the result.
Drawings
FIG. 1 is a flowchart illustrating a reputation management architecture of a blockchain prediction machine according to an embodiment of the present invention
FIG. 2 is a schematic diagram of a reputation management architecture of a block chain prediction machine and an overall structure of a data aggregation method thereof during under-chain aggregation according to an embodiment of the present invention
FIG. 3 is a schematic diagram of a reputation management architecture of a block chain prediction machine and an overall structure of a data aggregation method thereof during aggregation on a typical chain according to an embodiment of the present invention
FIG. 4 is a flowchart of a data aggregation algorithm of the reputation management framework of the blockchain talker and the data aggregation method thereof according to the present invention
Detailed Description
Example 1:
fig. 1 is a flowchart illustrating a reputation management architecture of a blockchain predictor according to an embodiment of the present invention. For a typical distributed blockchain predictive engine system, a data provider, a data consumer, and a predictive engine node first register their identities in the system. And then the data user sends a request for calling a predictive engine contract on a chain by constructing a self-defined user contract or calling a data request contract deployed by the system, and the predictive engine contract generates a corresponding event log according to the request. And the predicting machine node monitors the event log of the predicting machine contract on the chain in real time under the chain, and sends a data request to a specified data provider according to a task in the event log after monitoring the data call request. And the data provider responds the data to the node sending the request after receiving the request of the prediction machine node. And the nodes of the prediction machine receive the data and then simply process the data according to the requirements, and convert the results into a contract format. For the scheme of the predictive machine aggregated under the chain, the predictive machine node responsible for aggregating data aggregates the data under the chain into a result after receiving all responses of the predictive machine node responsible for requesting the data to the same event or overtime, sends the result to the contract of the predictive machine on the chain and returns the contract to be originally called. For the prediction machine scheme aggregated on the chain, a plurality of data prediction machine nodes send acquired data to a data aggregation contract appointed by a request, and the data aggregation contract aggregates the data on the chain and returns the aggregated data to the contract sending a data call request.
The reputation management architecture of the blockchain prediction machine of embodiment 1 includes: the system comprises a data user, a data demand contract, a prediction machine node and a data provider;
the data user: the prediction engine is invoked indirectly by invoking a data request contract or constructing a user-defined contract.
The data demand contract: a user-defined contract constructed for a data consumer or a deployed data request contract invoked by the data consumer that obtains data by invoking a predictive engine contract.
The predictive machine contract comprises: reputation management contracts, data aggregation contracts, other predictive machine contracts; the credit management contract is a part of a prediction machine contract and is mainly responsible for distributing a default credit value, dynamically adjusting the credit value and suspending service; the data aggregation contract: only exist when the aggregation is carried out on the chain, and data sent by the nodes of the prediction machine are aggregated into a single result; the other predictive engine contracts are about other predictive engine contracts other than the predictive engine contract described above.
The propheter node: a plurality of nodes deployed under the chain. It obtains the task parameters by monitoring the request log on the chain and obtains the data from the data provider. During the aggregation under the chain, the division work according to the monitoring, the execution and the aggregation corresponds to three prediction machine nodes of request adaptation, request execution and response adaptation, and only one request execution node in charge of the monitoring and the execution exists during the aggregation on the chain. Wherein the request adaptation node employs a preemptive message queue.
The data provider: an entity that can provide a data interface to respond to data requests.
The data aggregation method for the reputation management architecture of the blockchain prediction machine in embodiment 1 specifically includes the following steps:
s1 identity registration
S1.1 data consumer registration
The data user registration refers to the data user UiRespective public and private key pairs (Upk) are generatedi,Uski) Block chain address Uaddri
S1.2 data provider registration
Data provider registration refers to data provider PjGenerate respective public and private key pairs (Ppk)j,Pskj) Block chain address PaddrjAnd Ppk isj、PaddrjIdentity information PinfojAnd guarantee gold PdepojSubmitted to a reputation management contract ReupSC, which sets an initial reputation value Prepu for itj
S1.3 predictive speaker node registration
The registration of the nodes of the speakerphone refers to the nodes O of the speakerphonekRespective public and private key pairs are generated (Opk)k,Oskk) Block chain address OaddrkAnd will Opkk、OaddrkIdentity information OinfokGuaranteed gold OdepokSubmitted to a reputation management contract ReupSC, which sets an initial reputation value Orepu for itk
S2 data request
S2.1 contract invocation
Contract invocation refers to data consumer UiAnd constructing a user custom contract or directly calling a deployed data request contract to call a presupposition machine contract and sending a request containing data requirements.
S2.2 event Generation
Event generation refers to the fact that a president contract generates a task requirement into an event number EvIdiAnd event Log EvLogiStoring on block chain, and reporting event generation time stamp TS to ReupSCgen(EvIdi) And other event information.
S2.3 event listening
Event monitoring refers to that if the event is aggregated, the contract log is monitored by requesting to adapt the ReqOracle node, and when the EvLog appointed to the event is monitorediAnd reading the task, setting the preemption times, putting the task into a preemptive message queue PreemMQ, and preempting the task from the PreemMQ by a request execution node ExeOracle with idle resources. ExeOracle information Info of ReqOracle waiting for tasks of the same event to be preemptedtaskTime stamp TSlisten(EvIdi) And report signatures
Figure BDA0002766732810000111
Reported to the responding adaptation node ResOracle. If the collection is carried out on the chain, the execution of the ExeOracle of the prediction machine is requested to monitor the contract log, and when the EvLog appointed to the execution is monitorediThe task is read.
S2.4 request execution
The request execution means that the ExeOracle acquires one or more data from one or more data providers specified by the task and simply processes the data according to the task requirement to obtain data DdBut maintains a List of data providers List (Paddr) for the dataj) And D isdTo DdIs signed by
Figure BDA0002766732810000112
List(Paddrj) And sending the information to an aggregation executing party. If the chain is aggregated, ExeOracle also needs validity Valid of the request sent by ReqOraclereq(EvIdi||ReqOaddrk) And the corresponding signature is sent to ResOracle.
S3 data response
The data response stage comprises three steps of data aggregation, request response and reputation evaluation.
S3.1 data aggregation
The data aggregation refers to that an aggregation executive party performs aggregation operation after receiving data from the ExeOracle and records the time stamp TS of each ExeOracle responseexe(EvIdi). And if the aggregation is carried out on the chain, the aggregation executive party is a response adaptation node ResOracle, and if the aggregation is carried out on the chain, the aggregation executive party is a data aggregation contract.
S3.2 request response
The request response refers to that the prediction machine contract returns the aggregation result to the user-defined contract or the data request contract which originally sends the request, and if the user-defined contract or the data request contract is used for the offline aggregation, the timestamp TS of ResOracle is recordedres(EvIdi)。
S3.3 reputation assessment
And the reputation evaluation refers to that the reputation management contract ReupSC calculates the response time of each speaker node and the data provider according to the difference value of the received several timestamps, and obtains the average response time from the historical records. Meanwhile, feedback and signature verification results provided by a data user are used as data validity evaluation, and the validity of the request, the data provider with large deviation and the address of the predictive speaker node are used as the basis, so that the credit values corresponding to the address with long response time, poor validity and large data deviation are reduced, and the credit values of the nodes with short response time, good validity and small data deviation are improved. When the credit value is lower than the warning threshold value, the service is suspended for a certain time and a certain guarantee fee is not received, and when the credit value is lower than the minimum threshold value, the service is suspended until the compliance is checked and all the guarantee fees are not received.
As shown in fig. 4, a data execution algorithm of a data aggregation method of a reputation management framework of a blockchain oracle machine includes: a numerical data execution algorithm and a non-numerical data execution algorithm;
the following algorithm is performed on the numerical data:
(1) firstly, calculating the product of the reputation value of the prophetic machine corresponding to each data and the reputation mean value of the data provider
Figure BDA0002766732810000121
(2) Then calculate each data times
Figure BDA0002766732810000122
Weight of (2)
Figure BDA0002766732810000123
Obtaining a weighted average of the data
Figure BDA0002766732810000124
(3) Then, the mean square error of all the data pairs to the weighted average is calculated
Figure BDA0002766732810000131
(4) Then traversing the data to make the deviation larger than k times dxpWherein k has a default value and can be specified by the task, while recording a List of addresses (List) of data provider and talker nodes to which the removed data corresponds (Paddr)j)||Oaddrk);
(5) Finally, the remaining m data are calculated and multiplied by the corresponding data respectively
Figure BDA0002766732810000132
Weight of (2)
Figure BDA0002766732810000133
Obtaining a weighted average of the data
Figure BDA0002766732810000134
As a result of the polymerization.
The following algorithm is performed on non-numerical data:
(1) firstly, calculating the product of the reputation value of the prophetic machine corresponding to each data and the reputation mean value of the data provider
Figure BDA0002766732810000135
(2) Then, each data is added into a mapping list in sequence, and key is data hash
Figure BDA0002766732810000136
value is the List of addresses of data providers and talker nodes that send this data (List (Paddr)j)||Oaddrk) And their corresponding
Figure BDA0002766732810000137
If the post-added data hash has mapping, the post-added data hash will be added to the data hash
Figure BDA0002766732810000138
Accumulating and adding the newly added node address of the prediction machine and the address of the data provider into an address list;
(3) finally will be
Figure BDA0002766732810000139
Accumulating the data corresponding to the highest mapping as the aggregation result, and recording the List (List) corresponding to the aggregation resultj)||Oaddrk) And summarizing the data provider and the address of the predictive speaker node corresponding to other data.
Example 2
Fig. 2 is a schematic diagram of an overall structure of a reputation management and data aggregation method for a distributed blockchain predictive agent when aggregating under a chain according to an embodiment of the present invention, where in fig. 2, a predictive agent node performs work on three types of predictive agent nodes, i.e., adaptation to a corresponding request, execution of a request, and adaptation to a response, according to a snoop log, data acquisition, and aggregated data. The requesting adaptation node reports the node parameter of the executed task to the responding adaptation node, and the credit management contract dynamically adjusts the credit values of the prediction machine node and the data source according to the service quality.
This embodiment 2 assumes that, using the aggregation scheme under the chain, the data consumer requests numerical data from 5 data providers through a user-defined contract, and there are 3 requests to perform the predictive node providing services.
S1 identity registration phase
S1.1 data consumer registration:
data user U1Generating public and private key pair (Upk)1,Usk1) Block chain address Uaddr1
S1.2 data provider registration:
data provider PjGenerate respective public and private key pairs (Ppk)j,Pskj) Block chain address PaddrjAnd Ppk isj、PaddrjIdentity information PinfojAnd guarantee gold PdepojSubmitted to a reputation management contract ReupSC, which sets an initial reputation value Prepu for itj. Suppose U1Call 5 data providers P1、P2、P3、P4、P5The data of (1).
S1.3, registration of a predictive speaker node:
node O of prediction machinekRespective public and private key pairs are generated (Opk)k,Oskk) Block chain address OaddrkAnd will Opkk、OaddrkIdentity information OinfokGuaranteed gold OdepokSubmitted to a reputation management contract ReupSC, which sets an initial reputation value Orepu for itk. Suppose this call involves 1 request to adapt prolog machine node O10013 request execution propheter node O2001、O2002、O20031 response Adaptation Prodictator node O3001
S2 data request
S2.1 contract invocation:
data user U1And constructing a user-defined contract to call the president contract and sending a request containing the data requirement.
S2.2 event generation:
predicting machine contract generates task demand into event number EvIdiAnd event Log EvLogiStoring on a blockchain while reporting event generation timestamps TS to a reputation management contract ReupSCgen(EvIdi) And other event information. Suppose that the event number allocated by the request is EvId1An event log EvLog is generated1
S22.3 event listening:
requesting to adapt the previewer node ReqOracle to monitor the contract log, and when monitoring the event log EvLog assigned to the nodeiAnd reading the task, setting the preemption times, putting the task into a preemptive message queue PreemMQ, and preempting the task from the preemptive message queue PreemMQ by a request execution node ExeOracle with idle resources. ExeOracle information Info of request execution node for adapting to preloader node ReqOracle to preempt tasks of the same event after the tasks of waiting for the same event are preemptedtaskTime stamp TSlisten(EvIdi) And report signatures
Figure BDA0002766732810000151
Reported to the responding adaptation node ResOracle. 3 request execution propheter node O2001、O2002、O2003And preempting the event task.
S2.4 requests execution:
ExeOracle acquires a plurality of data from 5 data providers specified by the task, and simply processes the data according to the task requirement to obtain data DdBut maintains a List of data providers List (Paddr) for the dataj) And D isdTo DdIs signed
Figure BDA0002766732810000161
List(Paddrj) And sending the information to an aggregation executing party. ExeOracle validity Valid of request sent by ReqOraclereq(EvIdi||ReqOaddrk) And the corresponding signature is sent to resooracle.
S3 data response phase
S3.1 data aggregation:
the aggregation executor is a response adaptation node ResOracle, which performs aggregation operation after receiving data from ExeOracle and records the time stamp TS of each ExeOracle responseexe(EvIdi). The following algorithm is performed:
(1) firstly, calculating the product of the reputation value of the prophetic machine corresponding to each data and the reputation mean value of the data provider
Figure BDA0002766732810000162
(2) Then calculate each data times
Figure BDA0002766732810000163
Weight of (2)
Figure BDA0002766732810000164
Obtaining a weighted average of the data
Figure BDA0002766732810000165
(3) Then, the mean square error of all the data pairs to the weighted average is calculated
Figure BDA0002766732810000166
(4) Then traversing the data to make the deviation larger than k times dxpWherein k is designated by the task as 3, and simultaneously recording address lists (lists) of the data provider and talker nodes corresponding to the removed dataj)||Oaddrk);
(5) Finally, the remaining m data are calculated and multiplied by the corresponding data respectively
Figure BDA0002766732810000171
Weight of (2)
Figure BDA0002766732810000172
Obtaining a weighted average of the data
Figure BDA0002766732810000173
As a result of the polymerization. Suppose P in this request1More than three times the mean square error is removed and the others remain.
S3.2 request response:
the predictive engine contract returns the aggregated results to the originally requesting user-defined contract or numberRecording the time stamp TS of the receipt of ResOracle according to the request contractres(EvIdi)。
S3.3 reputation assessment:
and the reputation management contract ReupSC calculates the response time of each prediction machine node and the data provider according to the difference value of the received time stamps, and obtains the average response time from the historical records. Meanwhile, feedback and signature verification results provided by a data user are used as data validity evaluation, and the data provider and the node address of the prediction machine with large deviation recorded in the data aggregation process are used as evaluation basis together with the validity of the request. Because of P in the request1If the deviation of the data is more than triple mean square error, and the rest is normal, P is1Minus 5 and the reputation values of the other addresses plus 1. Meanwhile, the credit value is increased or decreased according to the service quality evaluation results such as response time and the like, and O is assumed1001、O3001Since the reputation value is reduced by 5 for too long a response time, P is finally obtained1Reputation value is lower than warning value, and service is suspended for 1 hour.
Example 3:
fig. 3 is a schematic diagram of an overall structure of a reputation management and data aggregation method for a distributed blockchain predictor in a typical chain aggregation according to an embodiment of the present invention, where in fig. 3, all predictor nodes listen to an on-chain log, request data from a data provider when listening to a task assigned to themselves, and return the data to a data aggregation contract on the chain.
This embodiment 3 assumes that, using the aggregation scheme on the chain, a data consumer requests non-numerical data from 5 data providers via a data request contract, and there are 3 requests to perform the predictive node providing services.
S1 identity registration
S1.1 data consumer registration:
data user U1Generate public and private key pair (Upk)1,Usk1) Block chain address Uaddr1
S1.2 data provider registration:
data provider PjGenerate respective public and private key pairs (Ppk)j,Pskj) Block chain addressPaddrjAnd Ppk is combinedj、PaddrjIdentity information PinfojAnd guarantee gold PdepojSubmitted to a reputation management contract ReupSC, which sets an initial reputation value Prepu for itj. Suppose U1Call 5 data providers P1、P2、P3、P4、P5The data of (1).
S1.3, registration of a predictive speaker node:
node O of prediction machinekRespective public and private key pairs are generated (Opk)k,Oskk) Block chain address OaddrkAnd will Opkk、OaddrkIdentity information OinfokEnsuring gold OdepokSubmitted to a reputation management contract RepuSC, for which the RepuSC sets an initial reputation value Orepuk. Suppose this call involves 3 requests to execute the predictive processor node O2001、O2002、O2003
S2 data request
S2.1 contract invocation:
data user U1And constructing a user-defined contract to call the president contract and sending a request containing the data requirement.
S2.2 event generation:
predicting machine contract generates task demand into event number EvIdiAnd event Log EvLogiStoring on block chain, and reporting event generation time stamp TS to ReupSCgen(EvIdi) And other event information. Suppose that the event number allocated by the request is EvId1An event log EvLog is generated1
S2.3 event monitoring:
s6, requesting to execute the ExeOracle of the president machine to monitor the contract log, and when monitoring the EvLog appointed to the clientiThe task is read.
S2.4 requests execution:
ExeOracle acquires one or more data from one or more data providers specified by the task, and simply processes the data according to the task requirement to obtain data Dd (data provider List) of the data, but retains the dataj) And D isdTo DdIs signed
Figure BDA0002766732810000191
List(Paddrj) To the data aggregation contract.
S3 data response phase
S3.1 data aggregation:
the data aggregation contract carries out aggregation operation after receiving data from the ExeOracle and records the time stamp TS of each ExeOracle responseexe(EvIdi). The following algorithm is performed:
(1) firstly, calculating the product of the reputation value of the prophetic machine corresponding to each data and the reputation mean value of the data provider
Figure BDA0002766732810000192
(2) Then, each datum is added into a mapping list in sequence, and key is data hash
Figure BDA0002766732810000193
value is the List of addresses of data providers and talker nodes that send this data (List (Paddr)j)||Oaddrk) And their corresponding
Figure BDA0002766732810000194
If the post-added data hash has mapping, the post-added data hash will be added to the data hash
Figure BDA0002766732810000201
Accumulating and adding the newly added node address of the prediction machine and the address of the data provider into an address list;
(3) finally will be
Figure BDA0002766732810000202
Accumulating the data corresponding to the highest mapping as the aggregation result, and recording the List (Paddrj) | Oaddr corresponding to the aggregation resultk) And summarizing the data provider and the address of the predictive speaker node corresponding to other data. Suppose P in this request1、P2、P3Is the same and the sum of the reputation value products is the highest, is selected as the aggregation result, and the execution node is O2001、O2002
S3.2 request response:
the predictive engine contract returns the aggregated results to the originally requesting user-defined contract or data request contract.
S3.3 reputation assessment:
and S10, calculating the response time of each speaker node and the data provider according to the difference value of the received time stamps by the reputation management contract ReupSC, and calculating the average response time with the historical record. Meanwhile, feedback and signature verification results provided by a data user are used as data validity evaluation, and the data provider and the node address of the prediction machine with large deviation recorded in the data aggregation process are used as evaluation basis together with the validity of the request. Depending on the polymerization, P1、P2、P3、O2001、O2002Add 1, P to the reputation value of4、P5、O2003Is subtracted by 5, assuming final O2003Reputation values below a minimum threshold are suspended from service until compliance is checked before service can be resumed.
It should be understood that the above-described embodiments of the present invention are merely examples for clearly illustrating the present invention, and are not intended to limit the embodiments of the present invention. Other variations and modifications will be apparent to persons skilled in the art upon reference to the above description. And are neither required nor exhaustive of all embodiments. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the claims of the present invention.

Claims (3)

1. A reputation management architecture of a blockchain oracle machine, comprising: the architecture includes: the system comprises a data user, a data demand contract, a prediction machine node and a data provider;
the data user: calling a prediction machine indirectly by calling a data request contract or constructing a user-defined contract;
the data demand contract: a user-defined contract constructed for a data consumer or a deployed data request contract invoked by the data consumer that obtains data by invoking a predictive engine contract;
the predictive machine contract comprising: reputation management contracts, data aggregation contracts, other predictive machine contracts; the credit management contract is a part of a predictive contract and is mainly responsible for allocating default credit values, dynamically adjusting credit values and suspending service; the data aggregation contract: only exist when the aggregation is carried out on the chain, and data sent by the nodes of the prediction machine are aggregated into a single result; the other forecast contracts are other forecast contracts except the forecast contract;
the propheter node: a plurality of nodes deployed for a link; the method comprises the steps of acquiring task parameters through a request log on a monitoring chain, and acquiring data from a data provider; during the under-chain aggregation, three prediction machine nodes of request adaptation, request execution and response adaptation are corresponding to the division work of monitoring, execution and aggregation, and only one request execution node in charge of monitoring and execution exists during the on-chain aggregation; wherein, the request adaptation node adopts a preemptive message queue;
the data provider: an entity that can provide a data interface to respond to data requests.
2. The method of claim 1, wherein the method comprises: the method comprises the following specific steps:
s1 identity registration
S1.1 data consumer registration
The data user registration refers to that the data user generates respective public and private key pairs and block chain addresses;
s1.2 data provider registration
The data provider registration means that the data provider generates respective public and private key pairs and block chain addresses, and submits the public keys, the block chain addresses, the identity information and the guarantee fund to a credit management contract which is about a set initial value thereof;
s1.3 predictive speaker node registration
The registration of the nodes of the prediction machines refers to that the nodes of the prediction machines generate respective public and private key pairs and block chain addresses, and submit the public keys, the block chain addresses, the identity information and the guarantee fund to a credit management contract, and the credit management contract is about the set initial value of the credit management contract;
s2 data request
S2.1 contract invocation
The contract calling refers to that a data user side constructs a user-defined contract or directly calls a deployed data request contract to call a presupposition machine contract and sends a request containing data requirements;
s2.2 event Generation
The event generation refers to storing a task requirement generation event number and an event log on a block chain by a prediction machine contract, and reporting an event generation timestamp and other event information to a reputation management contract;
s2.3 event listening
The event monitoring refers to that if the event logs are aggregated under the chain, the adaptive prediction machine node is requested to monitor contract logs, when the event logs appointed to the adaptive prediction machine node are monitored, a task is read, the number of times of preemption is set, the task is put into a preemptive message queue, and a request execution node with idle resources preempts the task from the preemptive message queue; after waiting for the tasks of the same event to be preempted, the propheter node reports the execution node information, the timestamp and the report signature of the preempted tasks to the response adaptation node; if the contract logs are aggregated, requesting to execute a prediction machine to monitor the contract logs, and reading a task when the contract logs are monitored and assigned to the prediction machine;
s2.4 request execution
The request execution means that if the request is aggregated under the link, the predicting machine sends the validity of the request sent by the predicting machine node and a corresponding signature to the adaptation node, and obtains a data request from a data provider specified by the task; if the data are aggregated on the chain, directly acquiring a data request from a data provider specified by the task;
s3 data response
S3.1 data aggregation
The data aggregation refers to that an aggregation executive party receives data from request executive nodes, and a data provider signs the data and then carries out aggregation operation, and records a timestamp for receiving the response of each request executive node; if the aggregation is carried out under the chain, the aggregation executive party is a response adaptation node, and if the aggregation is carried out on the chain, the aggregation executive party is a data aggregation contract;
s3.2 request response
The request response refers to that the prediction machine contract returns an aggregation result to a user self-defined contract or a data request contract which originally sends a request, and if the request response is the downlink aggregation, a timestamp of a received response adaptation node is also recorded;
s3.3 reputation assessment
The reputation evaluation refers to that the reputation management contract calculates the response time of each prediction machine node and the data provider according to the difference value of the received timestamps, and obtains the average response time with the historical record; meanwhile, feedback and signature verification results provided by a data user are used as data validity evaluation, and the validity of a request, data providers with large deviation and predictive machine node addresses recorded in the data aggregation process are used as bases, so that credit values corresponding to addresses with overlong response time, poor validity and large data deviation are reduced, and the credit values of nodes with short response time, good validity and small data deviation are improved; when the credit value is lower than the warning threshold value, the service is suspended for a certain time and a certain guarantee fee is not received, and when the credit value is lower than the minimum threshold value, the service is suspended until the compliance is checked and all the guarantee fees are not received.
3. The method of claim 2, wherein the method comprises: the data execution algorithm of the data aggregation comprises: a numerical data execution algorithm and a non-numerical data execution algorithm;
the numerical data execution algorithm comprises the following steps:
(1) calculating the product of the prophetic machine reputation value corresponding to each data and the data provider reputation mean value;
(2) calculating the weight of each data multiplied by the sum of all products of the product in the step (1), and summing to obtain the weighted average value of the data;
(3) solving the mean square error of all the data pairs of the weighted average value;
(4) traversing data, removing data with the deviation being more than k times, wherein k has a default value and can be specified by a task, and simultaneously recording an address list of a data provider and a predictive speaker node corresponding to the removed data;
(5) finally, calculating the weight of the residual data multiplied by the sum of all the products in the step (1) to obtain the weighted average value of the residual data as the aggregation result;
the non-numerical data execution algorithm comprises the following steps:
(1) calculating the product of the prophetic machine reputation value corresponding to each data and the data provider reputation mean value;
(2) sequentially adding each piece of data into a mapping list, wherein the key is data hash, the value is an address list of a data provider and a speaker node which send the data, and the product of the corresponding speaker credit value and the data provider credit mean value; if the added data hash has mapping, accumulating the values, and adding the newly added node address of the prediction machine and the address of the data provider into an address list;
(3) and finally, taking the data corresponding to the mapping with the highest product accumulation of the reputation value of the prediction machine and the reputation mean value of the data provider as an aggregation result, recording a prediction machine node and a data provider address list corresponding to the aggregation result, and summarizing data provider and prediction machine node addresses corresponding to other data.
CN202011236146.8A 2020-11-09 2020-11-09 Reputation management framework of block chain prediction machine and data aggregation method thereof Pending CN114462730A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011236146.8A CN114462730A (en) 2020-11-09 2020-11-09 Reputation management framework of block chain prediction machine and data aggregation method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011236146.8A CN114462730A (en) 2020-11-09 2020-11-09 Reputation management framework of block chain prediction machine and data aggregation method thereof

Publications (1)

Publication Number Publication Date
CN114462730A true CN114462730A (en) 2022-05-10

Family

ID=81404350

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011236146.8A Pending CN114462730A (en) 2020-11-09 2020-11-09 Reputation management framework of block chain prediction machine and data aggregation method thereof

Country Status (1)

Country Link
CN (1) CN114462730A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115206018A (en) * 2022-06-16 2022-10-18 湖南天河国云科技有限公司 Lottery drawing method and lottery drawing equipment based on block chain prediction machine
CN116029729A (en) * 2023-03-22 2023-04-28 安徽省大数据中心 Cross-link method and system based on dynamic access application link management contract mode
CN116049319A (en) * 2023-03-07 2023-05-02 天聚地合(苏州)科技股份有限公司 Method and device for acquiring out-of-chain data based on prestige reputation value
CN117176321A (en) * 2023-08-23 2023-12-05 南京理工大学 Distributed reputation management method based on blockchain technology
CN117176321B (en) * 2023-08-23 2024-06-07 南京理工大学 Distributed reputation management method based on blockchain technology

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115206018A (en) * 2022-06-16 2022-10-18 湖南天河国云科技有限公司 Lottery drawing method and lottery drawing equipment based on block chain prediction machine
CN116049319A (en) * 2023-03-07 2023-05-02 天聚地合(苏州)科技股份有限公司 Method and device for acquiring out-of-chain data based on prestige reputation value
CN116029729A (en) * 2023-03-22 2023-04-28 安徽省大数据中心 Cross-link method and system based on dynamic access application link management contract mode
CN116029729B (en) * 2023-03-22 2023-06-06 安徽省大数据中心 Cross-link method and system based on dynamic access application link management contract mode
CN117176321A (en) * 2023-08-23 2023-12-05 南京理工大学 Distributed reputation management method based on blockchain technology
CN117176321B (en) * 2023-08-23 2024-06-07 南京理工大学 Distributed reputation management method based on blockchain technology

Similar Documents

Publication Publication Date Title
CN112016105B (en) Chain uplink and downlink data sharing method based on distributed prediction machine and homomorphic encryption
CN114462730A (en) Reputation management framework of block chain prediction machine and data aggregation method thereof
CN112132447B (en) Block chain-based algorithm for evaluating and guaranteeing trust of computing power network
US10831530B2 (en) Secure consensus-based endorsement for self-monitoring blockchain
US10536537B1 (en) Multi-source deterministic oracle management
Khazaei et al. Performance of cloud centers with high degree of virtualization under batch task arrivals
CN108712464A (en) A kind of implementation method towards cluster micro services High Availabitity
US20110202645A1 (en) Methods and Apparatus to Test Network Elements
EP3085135A1 (en) System, method, and computer program for inter-module communication in a network based on network function virtualization (nfv)
TW201403480A (en) Method and apparatus for automatic migration of application service
CN113872828B (en) State monitoring method for block chain prediction machine
US11416819B2 (en) Connecting contact center resources using DLT for IOT solutions
JP2021520153A (en) Communication systems, methods, servers and programs
Wang et al. A node rating based sharding scheme for blockchain
CN115242798A (en) Task scheduling method based on edge cloud, electronic equipment and storage medium
Hussain et al. Effective third party auditing in cloud computing
WO2022068280A1 (en) Data processing method and apparatus, device, and storage medium
KR20230075456A (en) Operation of Distributed Deterministic Networks
CN115987858A (en) Pressure testing method of block chain network and related equipment
WO2016165471A1 (en) Method and apparatus for collecting index of hadoop trunking component
Zhu et al. Load balancing algorithm for web server based on weighted minimal connections
Hossfeld et al. Comparing the Scalability of Communication Networks and Systems
WO2010081891A1 (en) A method, device and computer program product for service balancing in an electronic communications system
TW202218380A (en) Reliability evaluation method of multi-state distributed network system
Kumar et al. SLA Framework and Management under Multi-Cloud Infrastructure

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