WO2020019785A1 - Event prediction method and apparatus, and electronic device - Google Patents

Event prediction method and apparatus, and electronic device Download PDF

Info

Publication number
WO2020019785A1
WO2020019785A1 PCT/CN2019/084132 CN2019084132W WO2020019785A1 WO 2020019785 A1 WO2020019785 A1 WO 2020019785A1 CN 2019084132 W CN2019084132 W CN 2019084132W WO 2020019785 A1 WO2020019785 A1 WO 2020019785A1
Authority
WO
WIPO (PCT)
Prior art keywords
result
blockchain
chain
certificate
prediction
Prior art date
Application number
PCT/CN2019/084132
Other languages
French (fr)
Chinese (zh)
Inventor
陆旭明
Original Assignee
阿里巴巴集团控股有限公司
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 阿里巴巴集团控股有限公司 filed Critical 阿里巴巴集团控股有限公司
Publication of WO2020019785A1 publication Critical patent/WO2020019785A1/en

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/04Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
    • 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
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3821Electronic credentials

Landscapes

  • Business, Economics & Management (AREA)
  • Engineering & Computer Science (AREA)
  • Strategic Management (AREA)
  • Human Resources & Organizations (AREA)
  • Accounting & Taxation (AREA)
  • Economics (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Development Economics (AREA)
  • Finance (AREA)
  • Game Theory and Decision Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Marketing (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Tourism & Hospitality (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

An event prediction method and apparatus, and an electronic device, which are applied to a blockchain node. The method comprises: acquiring a prediction result input by a participant for a specified event and released on a blockchain, wherein the input moment of the prediction result is earlier than the occurrence moment of an actual result of the specified event (102); releasing a corresponding comparison result to the blockchain by comparing the prediction result with the actual result (104); and invoking a smart contract for asset allocation in the blockchain, wherein the smart contract is used for reading the comparison result so as to send an allocation instruction to an off-chain object according to the comparison result, and the allocation instruction is used for instructing the off-chain object to allocate a first off-chain equity credential to the participant (106).

Description

事件预测方法及装置、电子设备Event prediction method and device, and electronic equipment 技术领域Technical field
本说明书一个或多个实施例涉及区块链技术领域,尤其涉及一种事件预测方法及装置、电子设备。One or more embodiments of the present specification relate to the field of blockchain technology, and in particular, to an event prediction method and device, and an electronic device.
背景技术Background technique
对于尚未完成的事件,往往需要等待该事件完成后,才能够准确获知该事件的结果。但是,一些场景下希望提前获知事件的结果,比如基于该事件的结果来提前采取应对措施,再比如基于该事件的结果确定是否需要对关联事件的处理方案进行调整等。For an unfinished event, it is often necessary to wait for the event to complete before accurately knowing the result of the event. However, in some scenarios, it is desirable to know the result of the event in advance, for example, to take measures in advance based on the result of the event, and then determine whether to adjust the processing plan of the associated event based on the result of the event.
在相关技术中,可以通过多种方式对事件进行结果预测,比如根据历史数据的预测分析,再比如通过样本训练出的预测模型进行预测分析等。由于使用的预测数据、采用的预测方式、所处的预测环境等存在差异,使得不同参与方在参与到针对同一事件的结果预测时,往往得到的预测结果也不尽相同,甚至存在较大偏差。In related technologies, event prediction can be performed in a variety of ways, such as predictive analysis based on historical data, and then predictive analysis based on a prediction model trained on samples. Due to the differences in the prediction data used, the prediction method used, and the prediction environment, the different participants often get different prediction results when they participate in the prediction of the results for the same event, even with large deviations. .
发明内容Summary of the Invention
有鉴于此,本说明书一个或多个实施例提供一种In view of this, one or more embodiments of the present specification provide a
为实现上述目的,本说明书一个或多个实施例提供技术方案如下:To achieve the above purpose, one or more embodiments of the present specification provide technical solutions as follows:
根据本说明书一个或多个实施例的第一方面,提出了一种事件预测方法,应用于区块链节点;所述方法包括:According to a first aspect of one or more embodiments of the present specification, an event prediction method is proposed, which is applied to a blockchain node; the method includes:
获取区块链上发布的由参与方针对指定事件输入的预测结果,所述预测结果的输入时刻早于所述指定事件的实际结果的发生时刻;Obtaining a prediction result input by a participant for a specified event published on the blockchain, where the input time of the prediction result is earlier than the occurrence time of the actual result of the specified event;
通过对所述预测结果与所述实际结果进行比较,向所述区块链发布相应的比较结果;By comparing the prediction result with the actual result, publishing a corresponding comparison result to the blockchain;
调用所述区块链中用于资产分配的智能合约,所述智能合约用于读取所述比较结果,以根据所述比较结果向链外对象发送分配指令,所述分配指令用于指示所述链外对象向所述参与方分配第一链外权益凭证。Invoking a smart contract for asset allocation in the blockchain, the smart contract is used to read the comparison result to send an allocation instruction to an off-chain object according to the comparison result, and the allocation instruction is used to instruct the The off-chain object allocates a first off-chain equity certificate to the participant.
根据本说明书一个或多个实施例的第二方面,提出了一种事件预测装置,应用于区 块链节点;所述装置包括:According to a second aspect of one or more embodiments of the present specification, an event prediction device is proposed, which is applied to a blockchain node; the device includes:
获取单元,获取区块链上发布的由参与方针对指定事件输入的预测结果,所述预测结果的输入时刻早于所述指定事件的实际结果的发生时刻;An obtaining unit, which obtains a prediction result input by a participant for a specified event published on the blockchain, and an input time of the prediction result is earlier than an occurrence time of an actual result of the specified event;
比较单元,通过对所述预测结果与所述实际结果进行比较,向所述区块链发布相应的比较结果;A comparison unit, by comparing the predicted result with the actual result, publishing a corresponding comparison result to the blockchain;
第一调用单元,调用所述区块链中用于资产分配的智能合约,所述智能合约用于读取所述比较结果,以根据所述比较结果向链外对象发送分配指令,所述分配指令用于指示所述链外对象向所述参与方分配第一链外权益凭证。The first calling unit calls a smart contract for asset allocation in the blockchain, the smart contract is used to read the comparison result to send an allocation instruction to an off-chain object according to the comparison result, the allocation The instruction is used to instruct the off-chain object to allocate a first off-chain equity certificate to the participant.
根据本说明书一个或多个实施例的第三方面,提出了一种电子设备,包括:According to a third aspect of one or more embodiments of the present specification, an electronic device is provided, including:
处理器;processor;
用于存储处理器可执行指令的存储器;Memory for storing processor-executable instructions;
其中,所述处理器通过运行所述可执行指令以实现如上述实施例中任一所述的事件预测方法。The processor executes the executable instruction to implement the event prediction method according to any one of the foregoing embodiments.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
图1是一示例性实施例提供的一种事件预测方法的流程图。FIG. 1 is a flowchart of an event prediction method according to an exemplary embodiment.
图2是一示例性实施例提供的一种预测事件结果的示意图。FIG. 2 is a schematic diagram of predicting an event result according to an exemplary embodiment.
图3是一示例性实施例提供的一种针对事件实施预测的功能逻辑的流程图。FIG. 3 is a flowchart of a function logic for performing prediction on an event according to an exemplary embodiment.
图4是一示例性实施例提供的另一种针对事件实施预测的功能逻辑的流程图。FIG. 4 is a flowchart of another function logic for performing prediction on an event according to an exemplary embodiment.
图5是一示例性实施例提供的一种设备的结构示意图。FIG. 5 is a schematic structural diagram of a device according to an exemplary embodiment.
图6是一示例性实施例提供的一种事件预测装置的框图。FIG. 6 is a block diagram of an event prediction apparatus according to an exemplary embodiment.
具体实施方式detailed description
这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本说明书一个或多个实施例相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本说明书一个或多个实施例的一些方 面相一致的装置和方法的例子。Exemplary embodiments will be described in detail herein, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with one or more embodiments of the present specification. Rather, they are merely examples of devices and methods consistent with some aspects of one or more embodiments of the specification, as detailed in the appended claims.
需要说明的是:在其他实施例中并不一定按照本说明书示出和描述的顺序来执行相应方法的步骤。在一些其他实施例中,其方法所包括的步骤可以比本说明书所描述的更多或更少。此外,本说明书中所描述的单个步骤,在其他实施例中可能被分解为多个步骤进行描述;而本说明书中所描述的多个步骤,在其他实施例中也可能被合并为单个步骤进行描述。It should be noted that, in other embodiments, the steps of the corresponding method are not necessarily performed in the order shown and described in this specification. In some other embodiments, the method may include more or fewer steps than described in this specification. In addition, a single step described in this specification may be divided into multiple steps for description in other embodiments; and multiple steps described in this specification may be combined into a single step for other embodiments. description.
图1是一示例性实施例提供的一种事件预测方法的流程图。图1所示,该方法应用于区块链节点,可以包括以下步骤:FIG. 1 is a flowchart of an event prediction method according to an exemplary embodiment. As shown in Figure 1, the method is applied to a blockchain node and can include the following steps:
步骤102,获取区块链上发布的由参与方针对指定事件输入的预测结果,所述预测结果的输入时刻早于所述指定事件的实际结果的发生时刻。Step 102: Obtain a prediction result input by a participant for a specified event published on the blockchain, and an input time of the prediction result is earlier than an occurrence time of an actual result of the specified event.
在一实施例中,通过在区块链的客户端上创建交易(transfer),可以通过该交易将参与方输入的预测结果发布至区块链上,成为区块链的分布式数据库中的一笔数据。In one embodiment, by creating a transaction on the blockchain client, the transaction can be used to publish the prediction results entered by the participants on the blockchain, becoming one of the distributed databases in the blockchain. Data.
需要指出的是:区块链中的交易,存在狭义的交易以及广义的交易之分。狭义的交易是指用户向区块链发布的一笔价值转移;例如,在传统的比特币区块链网络中,交易可以是用户在区块链中发起的一笔转账。而广义的交易是指用户向区块链发布的一笔具有业务意图的业务数据;例如,运营方可以基于实际的业务需求搭建一个联盟链,依托于联盟链部署一些与价值转移无关的其它类型的在线业务(比如,事件预测、租房业务、车辆调度业务、保险理赔业务、信用服务、医疗服务等),而在这类联盟链中,交易可以是用户在联盟链中发布的一笔具有业务意图的业务消息或者业务请求。本说明书中的交易,应当倾向于理解为广义上的交易。It should be noted that: transactions in the blockchain are divided into narrow transactions and broad transactions. A narrow transaction refers to a value transfer issued by a user to the blockchain; for example, in a traditional Bitcoin blockchain network, a transaction can be a transfer initiated by a user in the blockchain. The generalized transaction refers to a piece of business data with business intent issued by the user to the blockchain; for example, the operator can build an alliance chain based on actual business needs, and rely on the alliance chain to deploy other types that are not related to value transfer. Online business (such as event forecasting, renting business, vehicle dispatching business, insurance claims business, credit service, medical service, etc.), and in this type of alliance chain, the transaction can be a transaction issued by the user in the alliance chain. Intent business message or business request. Transactions in this description should be interpreted as transactions in a broad sense.
在一实施例中,由于区块链采用分布式数据库,使得发布至区块链上的预测结果无法被篡改,可以确保预测结果真实、可靠。In one embodiment, because the blockchain uses a distributed database, the prediction results published on the blockchain cannot be tampered with, and the prediction results can be ensured to be true and reliable.
在一实施例中,参与方输入的预测结果可由上述的区块链节点向区块链发布。在另一实施例中,参与方输入的预测结果可由区别于上述区块链节点的其他区块链节点向区块链发布,而上述区块链节点可以获知与该预测结果相关的信息,还可以将该预测结果(或该预测结果的哈希值)记录在该区块链节点维护的本地数据库(即区块链账本)中。In one embodiment, the prediction result input by the participant can be published to the blockchain by the aforementioned blockchain node. In another embodiment, the prediction result input by the participant may be published to the blockchain by other blockchain nodes different from the above-mentioned blockchain node, and the above-mentioned blockchain node may obtain information related to the prediction result, and The prediction result (or a hash value of the prediction result) can be recorded in a local database (ie, a blockchain ledger) maintained by the blockchain node.
在一实施例中,一个或多个参与方可以对同一事件进行预测,使得区块链上可以存在分别对应于各个参与方的预测结果;其中,每一参与方可以存在对应的唯一标识,使得每一参与方发布的预测结果可以与其唯一标识进行关联,以便于对区块链上发布的各 个预测结果进行有效区分。In one embodiment, one or more participants can predict the same event, so that there can be prediction results corresponding to each participant on the blockchain; wherein each participant can have a corresponding unique identifier, such that The prediction results released by each participant can be associated with its unique identification, so as to effectively distinguish the various prediction results released on the blockchain.
在一实施例中,指定事件为被指明确定需要进行结果预测的任意事件,比如某一路口的交通状况、某一地区的水稻收成、某一海域的台风形成时间等,本说明书并不对此进行限制。In an embodiment, the designated event is any event that is indicated to be determined to require result prediction, such as traffic conditions at an intersection, rice harvest in a certain area, typhoon formation time in a certain sea area, etc., which is not described in this specification. limit.
在一实施例中,预测结果的输入时刻应当早于指定事件的实际结果的发生时刻,该输入时刻可以被记录在区块链中包含该预测结果的交易中,或者可以直接将该交易的创建时刻作为该输入时刻。在一种情况下,当该指定事件为瞬时事件时,即该指定事件从起始时刻至结束时刻之间的时间段很短,不足以使得参与方在该时间段内输入预测结果,参与方可以在实际结果的发生时刻之前的任意时刻输入预测结果。在另一种情况下,当该指定事件为非瞬时事件时,即参与方可以在该指定事件的起始时刻至结束时刻之间的时间段内输入预测结果,可以限制参与方在该指定事件的起始时刻之后输入预测结果。In an embodiment, the input time of the prediction result should be earlier than the occurrence time of the actual result of the specified event. The input time can be recorded in the transaction that contains the prediction result in the blockchain, or the transaction can be created directly. The time is used as the input time. In one case, when the specified event is an instantaneous event, that is, the time period from the start time to the end time of the specified event is short, which is not enough for the participant to input the prediction result within the time period, and the participant The predicted result can be entered at any time before the actual result occurs. In another case, when the specified event is a non-transient event, that is, the participant can input the prediction result in a time period between the start time and the end time of the specified event, which can limit the participant in the specified event. Enter the prediction result after the start time of.
步骤104,通过对所述预测结果与所述实际结果进行比较,向所述区块链发布相应的比较结果。Step 104: Publish a corresponding comparison result to the blockchain by comparing the prediction result with the actual result.
在一实施例中,由上述的区块链节点对预测结果与实际结果进行比较,比较结果可以经共识后发布至区块链上。由于区块链上记录了参与方输入的预测结果和指定事件的实际结果,因而任意区块链节点均可以对上述的比较结果进行核验,以确定该比较结果的有效性。In one embodiment, the above-mentioned blockchain node compares the prediction result with the actual result, and the comparison result can be published on the blockchain after consensus. Because the predicted results input by the participants and the actual results of the specified event are recorded on the blockchain, any blockchain node can verify the above comparison results to determine the validity of the comparison results.
在一实施例中,比较结果包括预测结果与实际结果之间的匹配情况,例如完全一致、部分一致、完全不一致等。In an embodiment, the comparison result includes a matching situation between the predicted result and the actual result, such as complete agreement, partial agreement, and complete inconsistency.
步骤106,调用所述区块链中用于资产分配的智能合约,所述智能合约用于读取所述比较结果,以根据所述比较结果向链外对象发送分配指令,所述分配指令用于指示所述链外对象向所述参与方分配第一链外权益凭证。In step 106, a smart contract for asset allocation in the blockchain is called, and the smart contract is used to read the comparison result to send an allocation instruction to an off-chain object according to the comparison result. And instructing the off-chain object to allocate a first off-chain equity certificate to the participant.
在一实施例中,智能合约中可以预先写入基于比较结果对智能资产凭证进行分配的处理逻辑,使得智能合约可以基于比较结果而自动确定是否需要向相应的参与方分配第一链外权益凭证;其中,由于智能合约上的处理逻辑为公开内容,并且整个处理过程由智能合约自动完成、不存在人工干预,使得对链外权益凭证的分配能够确保客观、公正。In one embodiment, the smart contract can pre-write the processing logic for assigning smart asset credentials based on the comparison result, so that the smart contract can automatically determine whether the first off-chain equity certificate needs to be allocated to the corresponding participants based on the comparison result. Among them, because the processing logic on the smart contract is public content, and the entire processing process is automatically completed by the smart contract, there is no manual intervention, so that the distribution of off-chain equity credentials can ensure objectivity and fairness.
在一实施例中,当预测结果与实际结果相匹配时,表明提供该预测结果的参与方对于上述指定事件的结果预测具有一定的准确度。那么,通过向参与方分配第一链外权益凭证,可以控制各个参与方对于链外权益凭证的持有量,从而在一定程度上对于各个参 与方实现标记作用:持有链外权益凭证越多的参与方对于事件结果的预测能力越强,因而在后续的事件预测过程中,能够据此快速筛选出预测能力强的参与方,以从这些参与方处获得可能相对更加准确的预测结果。In one embodiment, when the prediction result matches the actual result, it indicates that the participant providing the prediction result has a certain accuracy for the result prediction of the specified event. Then, by allocating the first off-chain equity certificate to the participants, you can control the amount of off-chain equity certificates held by each participant, thereby achieving a marking effect for each participant to a certain extent: the more off-chain equity certificates are held The stronger the ability of the participants to predict the event result, so in the subsequent event prediction process, the participants with strong prediction ability can be quickly selected according to this, in order to obtain a relatively more accurate prediction result from these participants.
在一实施例中,链外权益凭证用于表征一定的权益,以实现对参与方准确预测上述指定事件的激励,有助于该参与方继续参与对后续事件的预测,从而实现良性循环。比如参与方在区块链上实施预设操作时,譬如该预设操作可以包括发布交易、发起共识(例如基于PBFT实用拜占庭容错算法而发起)等,可以将链外权益凭证兑换为区块链内等价的智能资产凭证、并通过向各个区块链节点分配一定量的智能资产凭证,以促使该预设操作能够尽快顺利完成。In one embodiment, the off-chain equity voucher is used to characterize certain rights and interests, so as to realize the incentive for the participant to accurately predict the specified event, which helps the participant to continue to participate in the prediction of subsequent events, thereby achieving a virtuous circle. For example, when a participant implements a preset operation on the blockchain, for example, the preset operation can include issuing transactions, initiating consensus (such as initiation based on PBFT's practical Byzantine fault tolerance algorithm), etc., and the off-chain equity credentials can be converted into a blockchain Equivalent smart asset vouchers are included, and a certain amount of smart asset vouchers are allocated to each blockchain node to facilitate the preset operation to be completed smoothly as soon as possible.
在一实施例中,链外权益凭证可以包括用于表征任意类型的链外权益的凭证,譬如在会员系统内的会员积分、在交易平台上的优惠券、兑换券、抵价券等,本说明书并不对此进行限制。In an embodiment, the off-chain equity voucher may include a voucher for characterizing any type of off-chain equity, such as membership points in a member system, coupons, exchange coupons, discount coupons, etc. on the trading platform. The manual does not limit this.
在一实施例中,上述的智能合约可以在交易或另一智能合约的驱动下被调用,以触发其从区块链上读取上述的预测结果和实际结果等,从而进一步实施本说明书的事件预测方案。在一种情况下,指定事件的实际结果可以由所述区块链中的预言机(Oracle)节点发布至所述区块链上,由于预言机节点提供的数据被认为绝对可靠,因而可以确保该实际结果的准确性。在另一种情况下,指定事件的实际结果可以为经共识后由所述区块链中的任一区块链节点发布至所述区块链上,譬如该任一区块链节点可以在区块链内发起共识、以针对该任一区块链节点提供的实际结果进行确认,当该实际结果通过了各个区块链节点的共识后,表明该实际结果具有足够的准确度,可以被应用于与预测结果进行比较。In an embodiment, the above-mentioned smart contract may be called under the driving of a transaction or another smart contract to trigger it to read the above-mentioned prediction result and actual result from the blockchain, thereby further implementing the events of this specification. Forecast scenario. In one case, the actual result of the specified event can be published by the Oracle node in the blockchain to the blockchain. Since the data provided by the Oracle node is considered absolutely reliable, it can be guaranteed The accuracy of this actual result. In another case, the actual result of the designated event may be published by any blockchain node in the blockchain to the blockchain after consensus. For example, any blockchain node may A consensus is initiated in the blockchain to confirm the actual results provided by any one of the blockchain nodes. When the actual result passes the consensus of each blockchain node, it shows that the actual result has sufficient accuracy and can be verified by It should be used for comparison with predicted results.
在一实施例中,所述指定事件包括一个或多个子事件,所述预测结果用于对所述一个或多个子事件进行结果预测;其中,所述智能合约被用于在所述预测结果对所述一个或多个子事件的结果预测均正确的情况下,将所述第一链外权益凭证分配至所述参与方。换言之,当预测结果对指定事件的结果预测完全正确时,该预测结果被智能合约判定为匹配于该指定事件的实际结果。In an embodiment, the specified event includes one or more sub-events, and the prediction result is used to perform result prediction on the one or more sub-events; wherein the smart contract is used to predict When the result predictions of the one or more sub-events are all correct, the first off-chain equity certificate is allocated to the participants. In other words, when the prediction result is completely correct for the result of the specified event, the prediction result is determined by the smart contract to match the actual result of the specified event.
在一实施例中,所述指定事件包括多个子事件;当所述第一链外权益凭证被分配至所述参与方时,所述第一链外权益凭证所表征的权益大小正相关于被所述预测结果准确预测的子事件在所述多个子事件中的占比。例如,当预测结果与实际结果完全相同时,即被所述预测结果准确预测的子事件在所述多个子事件中的占比为100%,第一链外权 益凭证所表征的权益大小可以为预设的最大值;当预测结果与实际结果完全不相同时,即被所述预测结果准确预测的子事件在所述多个子事件中的占比为0%,第一链外权益凭证所表征的权益大小可以为预设的最小值(0或其他预设值)。In an embodiment, the designated event includes multiple sub-events; when the first off-chain equity certificate is allocated to the participant, the size of the equity represented by the first off-chain equity certificate is positively related to the A proportion of the sub-events accurately predicted by the prediction result among the multiple sub-events. For example, when the prediction result is exactly the same as the actual result, that is, the proportion of the sub-events accurately predicted by the prediction result in the multiple sub-events is 100%, and the size of the equity represented by the first off-chain equity certificate can be The preset maximum value; when the prediction result is completely different from the actual result, that is, the proportion of the sub-events accurately predicted by the prediction result in the multiple sub-events is 0%, which is characterized by the first off-chain equity certificate The equity size can be a preset minimum value (0 or other preset value).
在一实施例中,第一链外权益凭证所表征的权益大小可以采用线性变化,例如占比为30%时,权益大小为预设最大值的30%,又例如占比为80%时,权益大小为预设最大值的80%等。在另一实施例中,第一链外权益凭证所表征的权益大小可以采用非线性变化,例如占比为30%时,权益大小为预设最大值的10%,再例如占比为80%时,权益大小为预设最大值的50%,,又例如占比为95%时,权益大小为预设最大值的80%等。In an embodiment, the size of the equity represented by the first off-chain equity certificate can be linearly changed. For example, when the proportion of equity is 30%, the magnitude of equity is 30% of a preset maximum value, and for example, when the proportion is 80%, The equity is 80% of the preset maximum. In another embodiment, the size of the equity represented by the first off-chain equity certificate can be changed non-linearly. For example, when the proportion is 30%, the equity is 10% of the preset maximum value, and for example, the proportion is 80%. When the equity size is 50% of the preset maximum value, for example, when the proportion is 95%, the equity size is 80% of the preset maximum value.
在一实施例中,所述指定事件包括多个子事件,当预测结果与实际结果并非完全一致时,不论被所述预测结果准确预测的子事件在所述多个子事件中的占比为何,均可以判定为两者不匹配,从而不会向参与方分配第一链外权益凭证。In an embodiment, the specified event includes multiple sub-events. When the prediction result is not completely consistent with the actual result, regardless of the proportion of the sub-events accurately predicted by the prediction result among the multiple sub-events, It can be determined that the two do not match, and thus the first off-chain equity certificate will not be distributed to the participants.
在一实施例中,可以确定所述参与方持有的第二链外权益凭证被冻结,以作为用于担保所述预测结果的有效性的担保凭证;其中,所述智能合约用于在所述预测结果不匹配于所述实际结果的情况下向所述担保凭证的管理方发送扣除指令,以解除所述参与方对所述担保凭证的持有关系。通过将参与方持有的第二链外权益凭证冻结为担保凭证,使得该担保凭证被用于对参与方提供的预测结果进行担保,可以对参与方设置一定的参与门槛,避免随意参与而影响对上述指定事件的准确预测。In an embodiment, it may be determined that the second off-chain equity certificate held by the participant is frozen as a guarantee certificate for guaranteeing the validity of the predicted result; wherein the smart contract is used for When the prediction result does not match the actual result, a deduction instruction is sent to the manager of the guarantee certificate to release the participant's holding relationship to the guarantee certificate. By freezing the second off-chain equity certificate held by the participant as a guarantee certificate, the guarantee certificate is used to guarantee the forecast results provided by the participant, which can set a certain threshold for the participant to avoid the impact of random participation Accurate predictions of the events specified above.
在一实施例中,当担保凭证表征的权益越大时,表明参与方对自身提供的预测结果越自信,那么当预测结果与实际结果相匹配时,在一定程度上表明参与方确实具备极强的预测能力,因而通过将第一链外权益凭证所表征的权益大小设定为与所述担保凭证表征的权益大小呈正相关,可以对相应的参与方的预测能力进行更为准确地标记,以及对相应参与方进行更大程度的激励。In an embodiment, when the equity represented by the security voucher is greater, it indicates that the participant is more confident in the prediction result provided by himself. Then, when the prediction result matches the actual result, it indicates to a certain extent that the participant does have a very strong Therefore, by setting the size of the equity represented by the first-chain equity certificate to be positively related to the size of the equity represented by the security certificate, the forecasting ability of the corresponding participant can be more accurately labeled, and Provide greater incentives for corresponding parties.
在一实施例中,即便参与方并未冻结形成担保凭证,仍然可以参与对指定事件的结果预测,并在预测结果与实际结果相匹配的情况下获得上述的第一链外权益凭证。在另一实施例中,当参与方并未冻结形成担保凭证时,参与方输入的预测结果被判定为无效,使其无法真正参与到对指定事件的结果预测;或者,在预测结果与实际结果相匹配的情况下,虽然可以向该参与方分配第一链外权益凭证,但是该第一链外权益凭证无法表征任何权益相当于未分配任何链外权益凭证,使得该参与方的参与无意义。In one embodiment, even if the participant does not freeze to form the security voucher, he can still participate in the prediction of the result of the specified event, and obtain the above-mentioned first off-chain equity certificate if the predicted result matches the actual result. In another embodiment, when the participant does not freeze to form the guarantee voucher, the prediction result entered by the participant is determined to be invalid, so that it cannot really participate in the prediction of the result of the specified event; or, between the predicted result and the actual result In the case of matching, although the first off-chain equity certificate can be assigned to the participant, the first off-chain equity certificate cannot represent any equity equivalent to no off-chain equity certificate assigned, making the participation of the participant meaningless .
在一实施例中,所述智能合约的调用条件可以包括:所述链外对象持有的第三链外 权益凭证被冻结,且冻结的所述第三链外权益凭证足够对所述分配指令进行响应。通过在调用智能合约之前,对链外对象持有的第三链外权益凭证进行冻结,可以提前锁定这部分链外权益凭证,使得即便链外对象在收到分配指令后拒绝向参与方分配第一链外权益凭证或者持有的链外权益凭证不足以完成分配,也可以基于冻结的该第三链外权益凭证顺利实施分配操作。In an embodiment, the calling conditions of the smart contract may include: a third off-chain equity certificate held by the off-chain object is frozen, and the frozen off-chain equity certificate is sufficient for the allocation instruction Respond. By freezing the third off-chain equity certificate held by the off-chain object before calling the smart contract, this part of off-chain equity certificate can be locked in advance, so that even if the off-chain object refuses to allocate the first The off-chain equity certificate or the off-chain equity certificate held is not enough to complete the distribution, and the distribution operation can also be smoothly performed based on the frozen third-chain off-chain equity certificate.
在一实施例中,如果链外对象根据分配指令将第一链外权益凭证分配至参与方,则链外对象可以恢复对第三链外权益凭证的持有。如果所述链外对象未将所述第一链外权益凭证分配至所述参与方,用于分配链外权益凭证的智能合约可以向所述第三链外权益凭证的管理方发送强制分配指令,以从被冻结的所述第三链外权益凭证中获取所述第一链外权益凭证并分配至所述参与方。其中,可以由区块链节点监控链外对象对分配指令的响应情况,例如该响应情况可以由上述的预言机节点传入区块链,从而确保其消息的准确性;或者,预言机节点将上述的响应情况传入区块链后,用于分配链外权益凭证的智能合约可以自动确定所述链外对象是否将所述第一链外权益凭证分配至所述参与方,以及自动发送上述的强制分配指令。In an embodiment, if the off-chain object distributes the first off-chain equity certificate to the participant according to the allocation instruction, the off-chain object may resume the holding of the third off-chain equity certificate. If the off-chain object does not assign the first off-chain equity certificate to the participant, the smart contract used to assign the off-chain equity certificate may send a mandatory allocation instruction to the manager of the third off-chain equity certificate To obtain the first off-chain equity certificate from the third off-chain equity certificate and distribute it to the participants. Among them, the response of the off-chain object to the allocation instruction can be monitored by the blockchain node. For example, the response can be transmitted to the blockchain by the aforementioned oracle machine node to ensure the accuracy of its message; or the oracle machine node will After the above response situation is transmitted to the blockchain, the smart contract for distributing off-chain equity vouchers can automatically determine whether the off-chain object allocates the first off-chain equity voucher to the participants, and automatically send the above Mandatory allocation instructions.
图2是一示例性实施例提供的一种预测事件结果的示意图。如图2所示,假定用户A希望参与针对事件B的结果预测,该用户A可以通过安装有客户端的手机21输入预测结果。该预测结果可以由用户A通过任意方式获得,比如由用户A通过图2中未示出的服务器对历史数据进行大数据分析得到,又比如由用户A根据自身经验而得到,本说明书并不对此进行限制。FIG. 2 is a schematic diagram of predicting an event result according to an exemplary embodiment. As shown in FIG. 2, it is assumed that the user A wishes to participate in the prediction of the result for the event B, and the user A can input the prediction result through the mobile phone 21 with the client installed. The prediction result can be obtained by user A in any way, for example, by user A performing big data analysis on historical data through a server not shown in FIG. 2, or for example, by user A based on his own experience, which is not described in this specification. Limitation.
设备22被配置为区块链中的一个区块链节点,该设备22可以接收手机21发送的预测结果;基于手机21运行的客户端上的已登录账号,该预测结果可以被确定为来自用户A。当然,手机21也可以将上述的预测结果发送至区块链中的其他区块链节点,这些区块链节点的处理过程与设备22类似,可以参考本说明书中对于设备22的相关描述。而其他用户也可以对事件B进行结果预测,并通过自身使用的手机或其他电子设备发送至设备22或其他区块链节点处,这些用户的处理过程与用户A类似,可以参考本说明书中对于用户A的相关描述。The device 22 is configured as a blockchain node in the blockchain, and the device 22 can receive the prediction result sent by the mobile phone 21; based on the logged-in account on the client running the mobile phone 21, the prediction result can be determined as coming from the user A. Of course, the mobile phone 21 may also send the above prediction results to other blockchain nodes in the blockchain. The processing process of these blockchain nodes is similar to that of the device 22, and reference may be made to the description of the device 22 in this specification. And other users can also predict the result of Event B and send it to device 22 or other blockchain nodes through their mobile phones or other electronic devices. The processing process of these users is similar to that of User A. You can refer to this manual for details. A description of user A.
设备22可以在区块链中对用户A输入的预测结果进行共识,使得该预测结果在通过共识后被发布至区块链,以记录至区块链的分布式数据库中,即“上链”。本说明书并不限定采用的共识算法的类型;例如,当设备22所处的区块链为联盟链或公有链时,该设备22可以基于诸如PBFT(Practical Byzantine Fault Tolerance,实用拜占庭容错) 算法向其他区块链节点发起共识,并在通过共识后将该预测结果发布至区块链,使其被记录至区块链的分布式数据库中;再例如,当设备22所处的区块链为公有链时,该设备22可以与其他区块链节点基于POW(Proof of Work,工作量证明)算法、POS(Proof of Stake,股权证明)算法或其他算法竞争记账权,并由获得记账权的区块链节点向相应区块内记入交易数据,而当包含用户A输入的预测结果的交易被记入时,该预测结果可以被记录至区块链的分布式数据库中。The device 22 can agree on the prediction result input by the user A in the blockchain, so that the prediction result is released to the blockchain after passing the consensus to be recorded in the blockchain's distributed database, that is, "on-chain" . This specification does not limit the type of consensus algorithm used; for example, when the block chain where the device 22 is located is an alliance chain or a public chain, the device 22 may be based on algorithms such as PBFT (Practical Byzantine Fault Tolerance). Other blockchain nodes initiate consensus, and after the consensus is passed, the prediction result is published to the blockchain, so that it is recorded in the blockchain's distributed database; for another example, when the blockchain where device 22 is located is In the public chain, the device 22 can compete with other blockchain nodes for bookkeeping rights based on the POW (Proof of Work, Proof of Work) algorithm, POS (Proof of Stake, Proof of Stake) algorithm, or other algorithms, and obtain the bookkeeping by The right blockchain node records transaction data into the corresponding block, and when the transaction containing the prediction result input by user A is recorded, the prediction result can be recorded in the blockchain's distributed database.
区块链中可以包括预言机节点23,该预言机节点23可以获取链外(即区块链之外)数据,并将链外数据传入区块链中。例如,该预言机节点23可以从链外获取事件B的实际结果,并将该实际结果发布至区块链中,以记录于区块链的分布式数据库中,即“上链”。The blockchain can include a predictor node 23, which can obtain data off-chain (that is, outside the blockchain) and transfer the data off-chain into the blockchain. For example, the oracle node 23 can obtain the actual result of event B from the off-chain, and publish the actual result to the blockchain for recording in the blockchain's distributed database, that is, "on-chain".
在实施事件预测的过程中,实际上包含两个功能逻辑:第一是用于确定预测结果与实际结果之间的比较结果的功能逻辑1,第二是基于比较结果分配智能资产凭证的功能逻辑2。In the process of implementing event prediction, it actually contains two functional logics: the first is the functional logic 1 for determining the comparison result between the predicted result and the actual result, and the second is the functional logic for assigning smart asset credentials based on the comparison result 2.
对于上述的功能逻辑1,设备22可以从区块链上读取用户A输入的预测结果与预言机节点23传入的事件B的实际结果,并通过对预测结果与实际结果进行比较,以得到相应的比较结果。设备22可以将比较结果发布至区块链中,使得该比较结果经过共识后可以被记录于区块链的分布式数据库中。由于预测结果和实际结果均被发布至区块链中,因而任一区块链节点均可以通过查询预测结果和实际结果,对设备22发布的比较结果进行确认,确保比较结果真实有效。For the above-mentioned functional logic 1, the device 22 can read the prediction result input by the user A and the actual result of the event B passed by the oracle node 23 from the blockchain, and compare the prediction result with the actual result to obtain Corresponding comparison results. The device 22 can publish the comparison result to the blockchain, so that the comparison result can be recorded in the distributed database of the blockchain after consensus. Since the prediction results and actual results are all published to the blockchain, any blockchain node can confirm the comparison results issued by the device 22 by querying the prediction results and actual results to ensure that the comparison results are true and valid.
对于上述的功能逻辑2,可以预先在区块链上创建智能合约,该智能合约中定义有上述的功能逻辑2,使得该智能合约被调用后可以自动根据设备22发布的比较结果向用户A分配链外权益凭证,并且该过程中可以避免涉及到人为干预、确保准确度和有效性,使得比较结果客观、准确。For the above-mentioned functional logic 2, a smart contract can be created on the blockchain in advance, and the above-mentioned functional logic 2 is defined in the smart contract, so that the smart contract can be automatically allocated to user A according to the comparison result issued by the device 22 after being called. The off-chain equity certificate, and in the process can avoid human intervention, ensure accuracy and effectiveness, and make the comparison results objective and accurate.
在一实施例中,智能合约可以由区块链上的交易或其他智能合约进行调用,以触发其自动实施相关功能逻辑,譬如上述用于确定预测结果与实际结果之间的匹配情况的功能逻辑等。设备22可以通过在区块链中发布交易或调用其他智能合约,以实现对上述智能合约的调用;或者,可以由其他区块链节点对上述智能合约进行调用,本说明书并不对此进行限制。在被调用后,上述的智能合约可以在设备22上运行,以自动实施上述的功能逻辑。In one embodiment, a smart contract can be called by a transaction on the blockchain or other smart contracts to trigger its automatic implementation of related functional logic, such as the functional logic described above for determining the matching between predicted results and actual results. Wait. The device 22 may issue a transaction in the blockchain or call other smart contracts to implement the above-mentioned smart contract; or, it may call the above-mentioned smart contract by other blockchain nodes, and this specification does not limit this. After being called, the above-mentioned smart contract can be run on the device 22 to automatically implement the above-mentioned functional logic.
为了便于理解,下面结合图3和图4,针对图2所示实施例中提及的功能逻辑进行详细描述。In order to facilitate understanding, the functional logic mentioned in the embodiment shown in FIG. 2 will be described in detail below with reference to FIGS. 3 and 4.
图3是一示例性实施例提供的一种针对事件实施预测的功能逻辑的流程图。如图3所示,步骤302~306对应于上述的功能逻辑1、该功能逻辑1可由作为区块链节点的设备22实现,步骤308A~310C对应于上述的功能逻辑2、该功能逻辑2可由被调用的智能合约实现;其中:FIG. 3 is a flowchart of a function logic for performing prediction on an event according to an exemplary embodiment. As shown in FIG. 3, steps 302 to 306 correspond to the above-mentioned functional logic 1. The functional logic 1 may be implemented by the device 22 as a blockchain node, and steps 308A to 310C correspond to the aforementioned functional logic 2. The functional logic 2 may be Called smart contract implementation; where:
步骤302,从区块链上获取用户A的预测结果。Step 302: Obtain the prediction result of user A from the blockchain.
在一实施例中,用户A的预测结果被记录于区块链上的某一交易中,该交易可以被标记为与事件B相关,使得设备22可以据此从区块链中查找到该交易,并获取用户A的预测结果。例如,设备22可以通过扫描特定地址的交易记录或者特定流水号的交易记录,即可获得用户A输入的预测结果。In one embodiment, the prediction result of user A is recorded in a transaction on the blockchain. The transaction can be marked as related to event B, so that the device 22 can find the transaction from the blockchain accordingly. And obtain the prediction result of user A. For example, the device 22 may obtain the prediction result input by the user A by scanning a transaction record of a specific address or a transaction record of a specific serial number.
在一实施例中,区块链上还记录有其他用户输入的预测结果,设备22可以通过类似方式获得这些预测结果,此处不再一一赘述。In one embodiment, the prediction results input by other users are also recorded on the blockchain. The device 22 can obtain these prediction results in a similar manner, which will not be described in detail here.
步骤304,从区块链上获取实际结果。Step 304: Obtain actual results from the blockchain.
在一实施例中,预言机节点23传入的实际结果被记录于区块链上的某一交易中,该交易可以被标记为与事件B相关,使得设备22可以据此从区块链中查找到该交易,并获取该实际结果。例如,设备22可以通过扫描特定地址的交易记录或者特定流水号的交易记录,即可获得该实际结果。In an embodiment, the actual result passed in by the oracle node 23 is recorded in a transaction on the blockchain, and the transaction can be marked as related to event B, so that the device 22 can be retrieved from the blockchain accordingly. Find the transaction and get the actual result. For example, the device 22 may obtain the actual result by scanning a transaction record of a specific address or a transaction record of a specific serial number.
步骤306,比较用户A的预测结果与事件B的实际结果,确定该预测结果与实际结果是否一致。Step 306: Compare the prediction result of the user A with the actual result of the event B, and determine whether the prediction result is consistent with the actual result.
在一实施例中,假定事件B为唯一事件、未包含多个子事件,使得预测结果与实际结果仅存在两种情况:结果一致或结果不一致。预测结果与实际结果应当具有相同的数据结构,以便于实现比较操作。例如,假定事件B为某一路口在上下班高峰期的交通状况,预测结果、实际结果可以分别包含一字段m,当该字段m=0时表示拥堵、当该字段m=1时表示不拥堵。In an embodiment, it is assumed that event B is the only event and does not include multiple sub-events, so that there are only two cases of the predicted result and the actual result: the result is consistent or the result is not consistent. The predicted results should have the same data structure as the actual results to facilitate comparison operations. For example, suppose event B is the traffic condition of a certain intersection during the rush hour. The predicted result and the actual result can include a field m. When the field m = 0, it means congestion, and when the field m = 1, it means no congestion. .
步骤308A,当预测结果与实际结果一致时,确定用户A是否存在担保凭证。In step 308A, when the prediction result is consistent with the actual result, it is determined whether a guarantee certificate exists for the user A.
步骤310A,当存在担保凭证时,向机构C发送分配指令1。In step 310A, when a guarantee certificate exists, an allocation instruction 1 is sent to the institution C.
步骤310B,当不存在担保凭证时,向机构C发送分配指令2。In step 310B, when there is no guarantee certificate, an allocation instruction 2 is sent to the institution C.
在一实施例中,用户A可以对自身输入的预测结果配置相应的担保凭证,以用于对该预测结果的有效性进行担保。例如,用户A在区块链之外可以存在对应的账户a,并通过该账户a持有一定的链外权益凭证,可以通过对该账户a中的至少一部分链外权益凭证进行冻结,以作为上述的担保凭证;比如,可以由该账户a将该至少一部分链外权益凭证暂时转入专用的凭证冻结账户中,或者可以在该账户a中对该至少一部分链外权益凭证添加冻结标识等,本说明书并不对此进行限制。在该实施例中,该担保凭证并非必要:如果存在担保凭证,可以向机构C发送分配指令1,使得该机构C向用户A分配链外权益凭证S1,如果不存在担保凭证,可以向机构C发送分配指令2,使得该机构C向用户A分配链外权益凭证S2;其中,链外权益凭证S1所表征的权益应当大于链外权益凭证S2所表征的权益,以表明对用户A提供担保凭证的激励,并使得用户A持有的链外权益凭证更多,从而表明该用户A的预测能力变强或预测准确度增加。其中,链外权益凭证S1、S2所表征的权益可以是固定值,或者该链外权益凭证S1、S2所表征的权益可以与担保凭证所表征的权益呈正相关,即担保凭证所表征的权益越大/越多时,该链外权益凭证S1、S2所表征的权益随之越大/越多。In an embodiment, the user A may configure a corresponding guarantee credential on the prediction result input by the user A, so as to guarantee the validity of the prediction result. For example, user A may have a corresponding account a outside the blockchain, and through the account a holds certain off-chain equity credentials, at least part of the off-chain equity credentials in the account a may be frozen as The above-mentioned security certificate; for example, the account a may temporarily transfer at least a part of the off-chain equity certificate into a dedicated voucher freezing account, or may add a frozen logo to the at least a part of the off-chain equity certificate in the account a, This specification does not limit this. In this embodiment, the guarantee certificate is not necessary: if there is a guarantee certificate, the distribution instruction 1 can be sent to the institution C, so that the institution C allocates the off-chain equity certificate S1 to the user A, and if there is no guarantee certificate, it can be distributed to the institution C Send distribution instruction 2 so that the institution C assigns off-chain equity certificate S2 to user A; of which, the equity represented by off-chain equity certificate S1 should be greater than the equity represented by off-chain equity certificate S2 to indicate that the security certificate is provided to user A , And makes user A more off-chain equity credentials, which indicates that the user A's forecasting ability becomes stronger or the prediction accuracy increases. Among them, the interests represented by the off-chain equity certificates S1 and S2 can be fixed values, or the interests represented by the off-chain equity certificates S1 and S2 can be positively correlated with the interests represented by the security certificates, that is, the equity represented by the guarantee certificates The greater / more, the greater / more equity is represented by the off-chain equity certificates S1, S2.
在一实施例中,为了避免用户A随意发布对事件B的预测结果、确保该预测结果有意义,可以为参与用户B的结果预测设置一定门槛,比如要求用户A必须提供担保凭证。因此,对于存在担保凭证的情况下,可以向用户A分配链外权益凭证S1、该链外权益凭证S1用于表征一定权益;而当不存在担保凭证的情况下,向用户A分配的链外权益凭证S2无法表征任何权益,相当于未分配任何链外权益凭证,那么用户A的参与将是无意义的。In an embodiment, in order to prevent user A from publishing the prediction result of event B at random and ensuring that the prediction result is meaningful, a certain threshold may be set for participating user B's result prediction, such as requiring user A to provide a guarantee certificate. Therefore, in the case where there is a security certificate, the off-chain equity certificate S1 can be assigned to the user A. The off-chain equity certificate S1 is used to characterize a certain interest; and when the security certificate does not exist, the off-chain distribution to the user A The equity certificate S2 cannot characterize any equity, which is equivalent to not assigning any off-chain equity certificates, so the participation of user A will be meaningless.
步骤308B,当预测结果与实际结果不一致时,确定用户A是否存在担保凭证。In step 308B, when the prediction result is inconsistent with the actual result, it is determined whether a guarantee certificate exists for the user A.
步骤310C,当存在担保凭证时,扣除担保凭证。 Step 310C: When a security certificate exists, the security certificate is deducted.
在一实施例中,当预测结果与实际结果不一致时,即用户A对事件B的结果预测不准确或预测失败,可以通过扣除担保凭证使得用户A终止持有该担保凭证对应的链外权益凭证,那么用户A持有的链外权益凭证减少,以表明该用户A的预测能力变弱或预测准确度降低。In an embodiment, when the prediction result is inconsistent with the actual result, that is, user A's prediction of the result of event B is inaccurate or the prediction fails, user A can terminate holding the off-chain equity certificate corresponding to the guarantee certificate by deducting the guarantee certificate , Then the off-chain equity certificate held by user A is reduced to indicate that the prediction ability of user A is weakened or the prediction accuracy is reduced.
在一实施例中,用户A对应的担保凭证可以具备一管理方,比如账户管理系统等,智能合约可以通过向该管理方发送扣除指令,使得该管理方响应于该扣除指令而扣除相应的担保凭证。In an embodiment, the guarantee voucher corresponding to user A may have a management party, such as an account management system, and the smart contract may send a deduction instruction to the management party, so that the management party deducts the corresponding guarantee in response to the deduction instruction. certificate.
图4是一示例性实施例提供的另一种针对事件实施预测的功能逻辑的流程图。如图4所示,步骤402~406对应于上述的功能逻辑1、该功能逻辑1可由作为区块链节点的设备22实现,步骤408A~410D对应于上述的功能逻辑2、该功能逻辑2可由被调用的智能合约实现;其中:FIG. 4 is a flowchart of another function logic for performing prediction on an event according to an exemplary embodiment. As shown in FIG. 4, steps 402 to 406 correspond to the above-mentioned functional logic 1. The functional logic 1 can be implemented by the device 22 as a blockchain node, and steps 408A to 410D correspond to the aforementioned functional logic 2. The functional logic 2 can be Called smart contract implementation; where:
步骤402,从区块链上获取用户A的预测结果。Step 402: Obtain the prediction result of user A from the blockchain.
步骤404,从区块链上获取实际结果。Step 404: Obtain actual results from the blockchain.
在一实施例中,步骤402-404可以参考图3所示的步骤302-304,此处不再赘述。In an embodiment, steps 402 to 404 may refer to steps 302 to 304 shown in FIG. 3, and details are not described herein again.
步骤406,比较用户A的预测结果与事件B的实际结果,生成相应的比较结果。Step 406: Compare the prediction result of the user A with the actual result of the event B, and generate a corresponding comparison result.
在一实施例中,假定事件B包含多个子事件,如果用户A的预测结果对所有的子事件均准确预测,则该预测结果与实际结果完全一致;而如果用户A仅准确预测了部分子事件的结果,或者用户A本身就仅针对部分子事件实施了预测,那么预测结果与实际结果可能部分一致;当然,有可能用户A对所有子事件的预测均不正确,则预测结果与实际结果完全不一致。In an embodiment, it is assumed that the event B includes multiple sub-events. If the prediction result of the user A accurately predicts all the sub-events, the prediction result is completely consistent with the actual result; and if the user A only accurately predicts part of the sub-events Result, or user A has only implemented predictions for some sub-events, then the prediction results may be partially consistent with the actual results; of course, it is possible that user A's predictions for all sub-events are incorrect, and the prediction results and the actual results are completely Not consistent.
在一实施例中,预测结果与实际结果应当具有相同的数据结构,以便于实现比较操作。例如,假定事件B为某一路口在上下班高峰期的交通状况,预测结果、实际结果可以分别包含字段m1和字段m2,m1字段代表早高峰期间的交通状况、m2代表晚高峰期间的交通状况,当该字段m1=0时表示早高峰期间拥堵、当该字段m1=1时表示早高峰期间不拥堵,当该字段m2=0时表示晚高峰期间拥堵、当该字段m2=1时表示晚高峰期间不拥堵。In an embodiment, the predicted result and the actual result should have the same data structure, so as to facilitate the comparison operation. For example, suppose event B is the traffic condition of an intersection during the commute rush hour. The predicted results and actual results can include the fields m1 and m2 respectively. The m1 field represents the traffic conditions during the morning rush hour and m2 represents the traffic conditions during the evening rush hour , When the field m1 = 0 indicates congestion during the morning peak, when the field m1 = 1 indicates no congestion during the morning peak, when the field m2 = 0 indicates congestion during the late peak, and when the field m2 = 1, it indicates late No congestion during peak hours.
步骤408A,当预测结果与实际结果完全一致时,确定用户A是否存在担保凭证。In step 408A, when the prediction result is completely consistent with the actual result, it is determined whether the user A has a guarantee certificate.
步骤410A,当存在担保凭证时,向机构C发送分配指令1。In step 410A, when a guarantee certificate exists, an allocation instruction 1 is sent to the institution C.
步骤410B,当不存在担保凭证时,向机构C发送分配指令2。In step 410B, when there is no guarantee certificate, an allocation instruction 2 is sent to the institution C.
在一实施例中,步骤408A、步骤410A和步骤410B可以参考如图3所示的步骤308A、步骤310A和步骤310B,此处不再赘述。In an embodiment, step 408A, step 410A, and step 410B may refer to step 308A, step 310A, and step 310B shown in FIG. 3, and details are not described herein again.
步骤408B,当预测结果与实际结果完全不一致时,若存在担保凭证,则扣除担保凭证。Step 408B, when the predicted result is completely inconsistent with the actual result, if there is a guarantee certificate, the guarantee certificate is deducted.
在一实施例中,与图3所示实施例相类似地,用户A可以对自身输入的预测结果配置相应的担保凭证,以用于对该预测结果的有效性进行担保。那么,当预测结果与实际 结果完全不一致时,即用户A对事件B的结果预测不准确或预测失败,可以通过扣除担保凭证使得用户A终止持有该担保凭证对应的链外权益凭证,那么用户A持有的链外权益凭证减少,以表明该用户A的预测能力变弱或预测准确度降低。In an embodiment, similar to the embodiment shown in FIG. 3, the user A may configure a corresponding guarantee credential for the prediction result input by the user A to guarantee the validity of the prediction result. Then, when the prediction result is completely inconsistent with the actual result, that is, user A's prediction of the result of event B is inaccurate or the prediction fails, user A can be deducted from the security certificate by deducting the security certificate. The number of off-chain equity certificates held by A is reduced to indicate that the user A's prediction ability is weakened or the prediction accuracy is reduced.
步骤408C,当预测结果与实际结果部分一致时,确定用户A是否存在担保凭证。In step 408C, when the prediction result is consistent with the actual result, it is determined whether a guarantee certificate exists for the user A.
步骤410A,当存在担保凭证时,向机构C发送分配指令3。In step 410A, when a guarantee certificate exists, an allocation instruction 3 is sent to the institution C.
步骤410B,当不存在担保凭证时,向机构C发送分配指令4。In step 410B, when there is no guarantee certificate, an allocation instruction 4 is sent to the institution C.
在一实施例中,与步骤410A-410B相类似的,当预测结果与实际结果部分一致时,表明用户A具有一定程度的预测能力,因而出于对这部分预测能力的标注,以及对于用户A的激励,可以向机构C发送分配指令3或分配指令4,使得机构C向用户A分配一定的链外权益凭证。在该实施例中,该担保凭证并非必要:如果存在担保凭证,可以向用户A分配链外权益凭证S3,如果不存在担保凭证,可以向用户A分配链外权益凭证S4;其中,在所表征的权益大小方面:S1>S3>S4、S1>S2>S4。In an embodiment, similar to steps 410A-410B, when the prediction result is consistent with the actual result, it indicates that the user A has a certain degree of prediction ability. Therefore, for the labeling of this part of the prediction ability, and for the user A Incentive, you can send distribution instruction 3 or distribution instruction 4 to institution C, so that institution C allocates certain off-chain equity credentials to user A. In this embodiment, the guarantee certificate is not necessary: if a guarantee certificate exists, the off-chain equity certificate S3 can be assigned to the user A, and if there is no guarantee certificate, the off-chain equity certificate S4 can be assigned to the user A; In terms of equity, S1> S3> S4, S1> S2> S4.
在一实施例中,链外权益凭证S1、S3所表征的权益可以是分别对应的固定值,或者该链外权益凭证S1、S3所表征的权益可以分别与担保凭证所表征的权益呈正相关,即担保凭证所表征的权益越大/越多时,该智能资产凭证S1、S3所表征的权益随之越大/越多。In an embodiment, the rights and interests represented by the off-chain equity vouchers S1 and S3 may be corresponding fixed values, or the rights and interests represented by the off-chain equity vouchers S1 and S3 may be positively related to the rights and interests represented by the security vouchers, respectively. That is, when the equity represented by the security certificate is larger / more, the equity represented by the smart asset certificate S1, S3 is larger / more.
在一实施例中,为了避免用户A随意发布对事件B的预测结果、确保该预测结果有意义,可以为参与用户B的结果预测设置一定门槛,比如要求用户A必须提供担保凭证。因此,对于存在担保凭证的情况下,可以向用户A分配链外权益凭证S3、该链外权益凭证S3用于表征一定权益;而当不存在担保凭证的情况下,向用户A分配的链外权益凭证S4无法表征任何权益,相当于未分配任何链外权益凭证,那么用户A的参与将是无意义的。In an embodiment, in order to prevent user A from publishing the prediction result of event B at random and ensuring that the prediction result is meaningful, a certain threshold may be set for participating user B's result prediction, such as requiring user A to provide a guarantee certificate. Therefore, in the case where there is a security certificate, the off-chain equity certificate S3 can be assigned to the user A, and the off-chain equity certificate S3 is used to characterize a certain interest; and when there is no security certificate, the off-chain distribution to the user A The equity certificate S4 cannot characterize any equity, which is equivalent to not assigning any off-chain equity certificates, so the participation of user A will be meaningless.
在一实施例中,由于用户A只有在预测结果与实际结果相匹配的情况下,才能够分配到相应的链外权益凭证,因而用户A所持有的链外权益凭证可以用于表征其预测能力或预测准确度,即当持有的链外权益凭证越多或表征的权益越大时,表明该用户A的预测能力越强或预测准确度越高。In one embodiment, since user A can only be assigned to the corresponding off-chain equity certificate if the predicted result matches the actual result, the off-chain equity certificate held by user A can be used to characterize his forecast Ability or prediction accuracy, that is, when more off-chain equity certificates are held or the represented equity is greater, it indicates that the user A has a stronger prediction ability or a higher prediction accuracy.
其中,用户A还可以将链外权益凭证用于其他方面。例如,区块链中的部分区块链节点可以扮演锚点的角色,可以将用户A持有的链外权益凭证兑换为等价的智能资产凭证,譬如该锚点发布的房产凭证、证券凭证、股票凭证、存款凭证等,本说明书并不对 此进行限制。当链外权益凭证用于表征用户的预测能力时,仅允许将链外权益凭证兑换为智能资产凭证,而限制将智能资产凭证兑换为链外权益凭证;当然,如果同时存在用于表征用户的预测能力的第一类链外权益凭证、不用于表征用户的预测能力的第二类链外权益凭证,可以限制将智能资产凭证兑换为第一类链外权益凭证、而允许将链外权益凭证兑换为第二类链外权益凭证。Among them, user A can also use off-chain equity credentials for other purposes. For example, some blockchain nodes in the blockchain can play the role of anchor points, and can exchange the off-chain equity certificates held by user A into equivalent smart asset certificates, such as real estate certificates and securities certificates issued by the anchor point. , Stock certificates, deposit certificates, etc., this manual does not limit this. When the off-chain equity certificate is used to characterize the user's predictive ability, only the off-chain equity certificate is allowed to be converted into a smart asset certificate, and the smart asset certificate is restricted to be exchanged to an off-chain equity certificate; of course, if there is also a The first type of off-chain equity vouchers for prediction capabilities and the second type of off-chain equity vouchers that are not used to characterize the user's prediction capabilities can limit the conversion of smart asset vouchers to the first type of off-chain equity vouchers and allow off-chain equity vouchers Converted to the second type of off-chain equity certificate.
在如图3-4所示的实施例中,当机构C收到分配指令1~4时,可能出于各种原因而未将链外权益凭证S1~S4分配至用户A,譬如机构C持有的链外权益凭证不足以响应分配指令1~4(即机构C持有的链外权益凭证少于/小于链外权益凭证S1~S4)或者其他原因。为了避免上述情况的发生,确保用户A能够顺利获得链外权益凭证S1~S4,在发起针对事件B的预测之前,可以首先确定机构C将持有的至少一部分链外权益凭证冻结,譬如可以冻结于指定的管理方(如某第三方金融平台)处,而预言机节点23可以将相应的冻结结果传入区块链,那么上述的智能合约可以在扫描到该冻结结果后执行如图3或图4所示的处理逻辑,否则可以不执行。而在分配指令1~4被发送至机构C之后,预言机节点23可以将机构C对链外权益凭证S1~S4的分配情况传入区块链,而设备22可以调用用于链外权益凭证分配的智能合约,该智能合约可以通过向上述的管理方发送强制分配指令,使得该管理方将冻结的链外权益凭证解冻,并向用户A分配相应的链外权益凭证,该过程不受机构C所约束。In the embodiment shown in Figure 3-4, when institution C receives the allocation instructions 1 to 4, the off-chain equity certificates S1 to S4 may not be allocated to user A for various reasons. For example, institution C holds Some off-chain equity certificates are insufficient to respond to distribution instructions 1 to 4 (ie, the off-chain equity certificates held by Institution C are less / less than the off-chain equity certificates S1 to S4) or other reasons. In order to avoid the above situation, to ensure that user A can obtain the off-chain equity vouchers S1 to S4 smoothly, before initiating the prediction for event B, it can first determine that institution C will freeze at least part of the off-chain equity vouchers held, for example, it can freeze At a designated management party (such as a third-party financial platform), and the oracle node 23 can transfer the corresponding frozen result into the blockchain, the above-mentioned smart contract can be executed after scanning the frozen result as shown in Figure 3 or The processing logic shown in FIG. 4 may not be executed otherwise. After the allocation instructions 1 to 4 are sent to the institution C, the oracle node 23 can transfer the allocation of the off-chain equity certificates S1 to S4 by the institution C to the blockchain, and the device 22 can call the off-chain equity certificates Assigned smart contract. The smart contract can send a mandatory allocation instruction to the above-mentioned management party, so that the management party can unfreeze the frozen off-chain equity certificate and assign the corresponding off-chain equity certificate to user A. This process is not subject to the organization. C bound.
图5是一示例性实施例提供的一种设备的示意结构图。请参考图5,在硬件层面,该设备包括处理器502、内部总线504、网络接口506、内存508以及非易失性存储器510,当然还可能包括其他业务所需要的硬件。处理器502从非易失性存储器510中读取对应的计算机程序到内存508中然后运行,在逻辑层面上形成事件预测装置。当然,除了软件实现方式之外,本说明书一个或多个实施例并不排除其他实现方式,比如逻辑器件抑或软硬件结合的方式等等,也就是说以下处理流程的执行主体并不限定于各个逻辑单元,也可以是硬件或逻辑器件。FIG. 5 is a schematic structural diagram of a device according to an exemplary embodiment. Please refer to FIG. 5. At the hardware level, the device includes a processor 502, an internal bus 504, a network interface 506, a memory 508, and a non-volatile memory 510. Of course, it may also include hardware required by other services. The processor 502 reads the corresponding computer program from the non-volatile memory 510 into the memory 508 and then runs it to form an event prediction device on a logical level. Of course, in addition to the software implementation, one or more embodiments of this specification do not exclude other implementations, such as a logic device or a combination of software and hardware, etc. That is to say, the execution body of the following processing flow is not limited to each A logic unit can also be a hardware or logic device.
请参考图6,在软件实施方式中,该事件预测装置应用于区块链节点;该装置可以包括:Please refer to FIG. 6. In a software implementation, the event prediction device is applied to a blockchain node; the device may include:
获取单元61,获取区块链上发布的由参与方针对指定事件输入的预测结果,所述预测结果的输入时刻早于所述指定事件的实际结果的发生时刻;The obtaining unit 61 obtains a prediction result input by a participant for a specified event published on the blockchain, and an input time of the prediction result is earlier than an occurrence time of an actual result of the specified event;
比较单元62,通过对所述预测结果与所述实际结果进行比较,向所述区块链发布相应的比较结果;The comparison unit 62 publishes a corresponding comparison result to the blockchain by comparing the prediction result with the actual result;
第一调用单元63,调用所述区块链中用于资产分配的智能合约,所述智能合约用于读取所述比较结果,以根据所述比较结果向链外对象发送分配指令,所述分配指令用于指示所述链外对象向所述参与方分配第一链外权益凭证。A first calling unit 63 calls a smart contract for asset allocation in the blockchain, where the smart contract is used to read the comparison result to send an allocation instruction to an off-chain object according to the comparison result. The allocation instruction is used to instruct the off-chain object to allocate a first off-chain equity certificate to the participant.
可选的,Optional,
所述实际结果由所述智能合约从所述区块链上读取,所述实际结果由所述区块链中的预言机节点发布至所述区块链上;The actual result is read from the blockchain by the smart contract, and the actual result is published on the blockchain by a oracle node in the blockchain;
或者,所述实际结果由所述智能合约从所述区块链上读取,所述实际结果经共识后由所述区块链中的任一区块链节点发布至所述区块链上。Alternatively, the actual result is read from the blockchain by the smart contract, and the actual result is published by any blockchain node in the blockchain to the blockchain after consensus .
可选的,所述指定事件包括一个或多个子事件,所述预测结果用于对所述一个或多个子事件分别进行结果预测;其中,所述智能合约被用于在所述比较结果表明所述预测结果对所述一个或多个子事件的结果预测均正确的情况下,向所述链外对象发送所述分配指令。Optionally, the specified event includes one or more sub-events, and the prediction result is used to separately predict the results of the one or more sub-events; wherein the smart contract is used to indicate that When the prediction result is correct for the result prediction of the one or more sub-events, the allocation instruction is sent to the off-chain object.
可选的,所述指定事件包括多个子事件;所述第一链外权益凭证对应的权益大小正相关于被所述预测结果准确预测的子事件在所述多个子事件中的占比。Optionally, the designated event includes multiple sub-events; the size of the equity corresponding to the first off-chain equity certificate is positively related to the proportion of the sub-events accurately predicted by the prediction result in the multiple sub-events.
可选的,还包括:Optional, also includes:
确定单元64,确定所述参与方持有的第二链外权益凭证被冻结,以作为用于担保所述预测结果的有效性的担保凭证;The determining unit 64 determines that the second off-chain equity certificate held by the participant is frozen as a guarantee certificate for guaranteeing the validity of the predicted result;
其中,所述智能合约用于在所述预测结果不匹配于所述实际结果的情况下向所述担保凭证的管理方发送扣除指令,以解除所述参与方对所述担保凭证的持有关系。Wherein, the smart contract is used to send a deduction instruction to the manager of the guarantee voucher if the predicted result does not match the actual result, so as to release the participant's holding relationship to the guarantee voucher .
可选的,所述第一链外权益凭证所表征的权益大小与所述担保凭证表征的权益大小呈正相关。Optionally, the size of the equity represented by the first off-chain equity certificate is positively related to the size of the equity represented by the security certificate.
可选的,所述智能合约用于在所述参与方不存在对应的担保凭证的情况下,判定所述参与方对应的预测结果无效。Optionally, the smart contract is used to determine that the prediction result corresponding to the participant is invalid when the participant does not have corresponding guarantee credentials.
可选的,所述链外权益凭证包括以下至少之一:会员积分、优惠券、兑换券、抵价券。Optionally, the off-chain equity certificate includes at least one of the following: member points, coupons, exchange coupons, and discount coupons.
可选的,所述智能合约的调用条件包括:所述链外对象持有的第三链外权益凭证被冻结,且冻结的链外权益凭证足够对所述分配指令进行响应。Optionally, the calling conditions of the smart contract include: the third off-chain equity certificate held by the off-chain object is frozen, and the frozen off-chain equity certificate is sufficient to respond to the allocation instruction.
可选的,还包括:Optional, also includes:
第二调用单元65,调用用于分配链外权益凭证的智能合约,所述用于分配链外权益凭证的智能合约在所述链外对象未将所述第一链外权益凭证分配至所述参与方的情况下向所述第三链外权益凭证的管理方发送强制分配指令,以从被冻结的所述第三链外权益凭证中获取所述第一链外权益凭证并分配至所述参与方。The second calling unit 65 calls a smart contract for distributing off-chain equity credentials, and the smart contract for distributing off-chain equity credentials does not assign the first off-chain equity credentials to the off-chain object In the case of a participant, a mandatory allocation instruction is sent to the manager of the third off-chain equity certificate to obtain the first off-chain equity certificate from the frozen third-chain equity certificate and allocate it to the participants.
上述实施例阐明的系统、装置、模块或单元,具体可以由计算机芯片或实体实现,或者由具有某种功能的产品来实现。一种典型的实现设备为计算机,计算机的具体形式可以是个人计算机、膝上型计算机、蜂窝电话、相机电话、智能电话、个人数字助理、媒体播放器、导航设备、电子邮件收发设备、游戏控制台、平板计算机、可穿戴设备或者这些设备中的任意几种设备的组合。The system, device, module, or unit described in the foregoing embodiments may be specifically implemented by a computer chip or entity, or a product with a certain function. A typical implementation device is a computer, and the specific form of the computer may be a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email sending and receiving device, and a game control Desk, tablet computer, wearable device, or a combination of any of these devices.
在一个典型的配置中,计算机包括一个或多个处理器(CPU)、输入/输出接口、网络接口和内存。In a typical configuration, a computer includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.
内存可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM)。内存是计算机可读介质的示例。Memory may include non-persistent memory, random access memory (RAM), and / or non-volatile memory in computer-readable media, such as read-only memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带、磁盘存储、量子存储器、基于石墨烯的存储介质或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括暂存电脑可读媒体(transitory media),如调制的数据信号和载波。Computer-readable media includes both permanent and non-persistent, removable and non-removable media. Information can be stored by any method or technology. Information may be computer-readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), and read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, read-only disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, Magnetic tape cartridges, magnetic disk storage, quantum memory, graphene-based storage media, or other magnetic storage devices or any other non-transmission media can be used to store information that can be accessed by computing devices. As defined herein, computer-readable media does not include temporary computer-readable media, such as modulated data signals and carrier waves.
还需要说明的是,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、商品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、商品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、商品或者设备中还存在另外的相同要素。It should also be noted that the terms "including," "including," or any other variation thereof are intended to encompass non-exclusive inclusion, so that a process, method, product, or device that includes a series of elements includes not only those elements but also Other elements not explicitly listed, or those that are inherent to such a process, method, product, or device. Without more restrictions, the elements defined by the sentence "including a ..." do not exclude the existence of other identical elements in the process, method, product or equipment including the elements.
上述对本说明书特定实施例进行了描述。其它实施例在所附权利要求书的范围 内。在一些情况下,在权利要求书中记载的动作或步骤可以按照不同于实施例中的顺序来执行并且仍然可以实现期望的结果。另外,在附图中描绘的过程不一定要求示出的特定顺序或者连续顺序才能实现期望的结果。在某些实施方式中,多任务处理和并行处理也是可以的或者可能是有利的。The specific embodiments of the present specification have been described above. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and the desired result may still be achieved. In addition, the processes depicted in the figures do not necessarily require the particular order shown or sequential order to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
在本说明书一个或多个实施例使用的术语是仅仅出于描述特定实施例的目的,而非旨在限制本说明书一个或多个实施例。在本说明书一个或多个实施例和所附权利要求书中所使用的单数形式的“一种”、“所述”和“该”也旨在包括多数形式,除非上下文清楚地表示其他含义。还应当理解,本文中使用的术语“和/或”是指并包含一个或多个相关联的列出项目的任何或所有可能组合。The terminology used in one or more embodiments of this specification is for the purpose of describing particular embodiments only, and is not intended to limit one or more embodiments of this specification. The singular forms "a," "the," and "the" used in one or more embodiments of this specification and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" as used herein refers to and includes any or all possible combinations of one or more of the associated listed items.
应当理解,尽管在本说明书一个或多个实施例可能采用术语第一、第二、第三等来描述各种信息,但这些信息不应限于这些术语。这些术语仅用来将同一类型的信息彼此区分开。例如,在不脱离本说明书一个或多个实施例范围的情况下,第一信息也可以被称为第二信息,类似地,第二信息也可以被称为第一信息。取决于语境,如在此所使用的词语“如果”可以被解释成为“在……时”或“当……时”或“响应于确定”。It should be understood that although the terms first, second, third, etc. may be used to describe various information in one or more embodiments of the present specification, the information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of the present specification, the first information may also be referred to as second information, and similarly, the second information may also be referred to as first information. Depending on the context, the word "if" as used herein can be interpreted as "at" or "when" or "in response to determination".
以上所述仅为本说明书一个或多个实施例的较佳实施例而已,并不用以限制本说明书一个或多个实施例,凡在本说明书一个或多个实施例的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本说明书一个或多个实施例保护的范围之内。The above descriptions are merely preferred embodiments of one or more embodiments of the present specification, and are not intended to limit one or more embodiments of the present specification. Wherever within the spirit and principle of one or more embodiments of the present specification, Any modification, equivalent replacement, improvement, etc. should be included in the protection scope of one or more embodiments of this specification.

Claims (21)

  1. 一种事件预测方法,应用于区块链节点;所述方法包括:An event prediction method applied to a blockchain node; the method includes:
    获取区块链上发布的由参与方针对指定事件输入的预测结果,所述预测结果的输入时刻早于所述指定事件的实际结果的发生时刻;Obtaining a prediction result input by a participant for a specified event published on the blockchain, where the input time of the prediction result is earlier than the occurrence time of the actual result of the specified event;
    通过对所述预测结果与所述实际结果进行比较,向所述区块链发布相应的比较结果;By comparing the prediction result with the actual result, publishing a corresponding comparison result to the blockchain;
    调用所述区块链中用于资产分配的智能合约,所述智能合约用于读取所述比较结果,以根据所述比较结果向链外对象发送分配指令,所述分配指令用于指示所述链外对象向所述参与方分配第一链外权益凭证。Invoking a smart contract for asset allocation in the blockchain, the smart contract is used to read the comparison result to send an allocation instruction to an off-chain object according to the comparison result, and the allocation instruction is used to instruct the The off-chain object allocates a first off-chain equity certificate to the participant.
  2. 根据权利要求1所述的方法,The method according to claim 1,
    所述实际结果由所述智能合约从所述区块链上读取,所述实际结果由所述区块链中的预言机节点发布至所述区块链上;The actual result is read from the blockchain by the smart contract, and the actual result is published on the blockchain by a oracle node in the blockchain;
    或者,所述实际结果由所述智能合约从所述区块链上读取,所述实际结果经共识后由所述区块链中的任一区块链节点发布至所述区块链上。Alternatively, the actual result is read from the blockchain by the smart contract, and the actual result is published by any blockchain node in the blockchain to the blockchain after consensus .
  3. 根据权利要求1所述的方法,所述指定事件包括一个或多个子事件,所述预测结果用于对所述一个或多个子事件分别进行结果预测;其中,所述智能合约被用于在所述比较结果表明所述预测结果对所述一个或多个子事件的结果预测均正确的情况下,向所述链外对象发送所述分配指令。The method according to claim 1, wherein the designated event includes one or more sub-events, and the prediction result is used to separately predict the result of the one or more sub-events; wherein the smart contract is used to When the comparison result indicates that the prediction result is correct for the result prediction of the one or more sub-events, the allocation instruction is sent to the out-of-chain object.
  4. 根据权利要求1所述的方法,所述指定事件包括多个子事件;所述第一链外权益凭证对应的权益大小正相关于被所述预测结果准确预测的子事件在所述多个子事件中的占比。The method according to claim 1, wherein the designated event comprises a plurality of sub-events; the size of the equity corresponding to the first off-chain equity certificate is positively related to the sub-event accurately predicted by the prediction result among the plurality of sub-events Proportion.
  5. 根据权利要求1所述的方法,还包括:The method of claim 1, further comprising:
    确定所述参与方持有的第二链外权益凭证被冻结,以作为用于担保所述预测结果的有效性的担保凭证;Determining that the second off-chain equity certificate held by the participant is frozen as a guarantee certificate used to guarantee the validity of the predicted result;
    其中,所述智能合约用于在所述预测结果不匹配于所述实际结果的情况下向所述担保凭证的管理方发送扣除指令,以解除所述参与方对所述担保凭证的持有关系。Wherein, the smart contract is used to send a deduction instruction to the manager of the guarantee voucher if the predicted result does not match the actual result, so as to release the participant's holding relationship to the guarantee voucher .
  6. 根据权利要求5所述的方法,所述第一链外权益凭证所表征的权益大小与所述担保凭证表征的权益大小呈正相关。The method according to claim 5, wherein the size of the equity represented by the first off-chain equity certificate is positively correlated with the size of the equity represented by the security certificate.
  7. 根据权利要求5所述的方法,所述智能合约用于在所述参与方不存在对应的担保凭证的情况下,判定所述参与方对应的预测结果无效。The method according to claim 5, wherein the smart contract is used to determine that the prediction result corresponding to the participant is invalid when the participant does not have a corresponding guarantee certificate.
  8. 根据权利要求1所述的方法,所述链外权益凭证包括以下至少之一:会员积分、优惠券、兑换券、抵价券。The method according to claim 1, wherein the off-chain equity certificate comprises at least one of the following: member points, coupons, exchange coupons, and discount coupons.
  9. 根据权利要求1所述的方法,所述智能合约的调用条件包括:所述链外对象持有的第三链外权益凭证被冻结,且冻结的链外权益凭证足够对所述分配指令进行响应。The method according to claim 1, wherein the calling conditions of the smart contract include: a third off-chain equity certificate held by the off-chain object is frozen, and the frozen off-chain equity certificate is sufficient to respond to the allocation instruction .
  10. 根据权利要求9所述的方法,还包括:The method according to claim 9, further comprising:
    调用用于分配链外权益凭证的智能合约,所述用于分配链外权益凭证的智能合约在所述链外对象未将所述第一链外权益凭证分配至所述参与方的情况下向所述第三链外权益凭证的管理方发送强制分配指令,以从被冻结的所述第三链外权益凭证中获取所述第一链外权益凭证并分配至所述参与方。Invoking a smart contract for allocating off-chain equity vouchers, said smart contract for allocating off-chain equity vouchers The manager of the third off-chain equity certificate sends a mandatory allocation instruction to obtain the first off-chain equity certificate from the frozen third-chain equity certificate and allocate it to the participant.
  11. 一种事件预测装置,应用于区块链节点;所述装置包括:An event prediction device is applied to a blockchain node; the device includes:
    获取单元,获取区块链上发布的由参与方针对指定事件输入的预测结果,所述预测结果的输入时刻早于所述指定事件的实际结果的发生时刻;An obtaining unit, which obtains a prediction result input by a participant for a specified event published on the blockchain, and an input time of the prediction result is earlier than an occurrence time of an actual result of the specified event;
    比较单元,通过对所述预测结果与所述实际结果进行比较,向所述区块链发布相应的比较结果;A comparison unit, by comparing the predicted result with the actual result, publishing a corresponding comparison result to the blockchain;
    第一调用单元,调用所述区块链中用于资产分配的智能合约,所述智能合约用于读取所述比较结果,以根据所述比较结果向链外对象发送分配指令,所述分配指令用于指示所述链外对象向所述参与方分配第一链外权益凭证。The first calling unit calls a smart contract for asset allocation in the blockchain, the smart contract is used to read the comparison result to send an allocation instruction to an off-chain object according to the comparison result, the allocation The instruction is used to instruct the off-chain object to allocate a first off-chain equity certificate to the participant.
  12. 根据权利要求11所述的装置,The device according to claim 11,
    所述实际结果由所述智能合约从所述区块链上读取,所述实际结果由所述区块链中的预言机节点发布至所述区块链上;The actual result is read from the blockchain by the smart contract, and the actual result is published on the blockchain by a oracle node in the blockchain;
    或者,所述实际结果由所述智能合约从所述区块链上读取,所述实际结果经共识后由所述区块链中的任一区块链节点发布至所述区块链上。Alternatively, the actual result is read from the blockchain by the smart contract, and the actual result is published by any blockchain node in the blockchain to the blockchain after consensus .
  13. 根据权利要求11所述的装置,所述指定事件包括一个或多个子事件,所述预测结果用于对所述一个或多个子事件分别进行结果预测;其中,所述智能合约被用于在所述比较结果表明所述预测结果对所述一个或多个子事件的结果预测均正确的情况下,向所述链外对象发送所述分配指令。The device according to claim 11, wherein the specified event comprises one or more sub-events, and the prediction result is used to separately perform result prediction on the one or more sub-events; wherein the smart contract is used to When the comparison result indicates that the prediction result is correct for the result prediction of the one or more sub-events, the allocation instruction is sent to the out-of-chain object.
  14. 根据权利要求11所述的装置,所述指定事件包括多个子事件;所述第一链外权益凭证对应的权益大小正相关于被所述预测结果准确预测的子事件在所述多个子事件中的占比。The device according to claim 11, wherein the designated event includes multiple sub-events; the size of the equity corresponding to the first off-chain equity certificate is positively related to the sub-event accurately predicted by the prediction result among the multiple sub-events Proportion.
  15. 根据权利要求11所述的装置,还包括:The apparatus according to claim 11, further comprising:
    确定单元,确定所述参与方持有的第二链外权益凭证被冻结,以作为用于担保所述预测结果的有效性的担保凭证;A determining unit that determines that the second off-chain equity certificate held by the participant is frozen as a guarantee certificate for guaranteeing the validity of the predicted result;
    其中,所述智能合约用于在所述预测结果不匹配于所述实际结果的情况下向所述担 保凭证的管理方发送扣除指令,以解除所述参与方对所述担保凭证的持有关系。Wherein, the smart contract is used to send a deduction instruction to the manager of the guarantee voucher if the predicted result does not match the actual result, so as to release the participant's holding relationship to the guarantee voucher .
  16. 根据权利要求15所述的装置,所述第一链外权益凭证所表征的权益大小与所述担保凭证表征的权益大小呈正相关。The device according to claim 15, the size of the equity represented by the first off-chain equity certificate is positively related to the size of the equity represented by the security certificate.
  17. 根据权利要求15所述的装置,所述智能合约用于在所述参与方不存在对应的担保凭证的情况下,判定所述参与方对应的预测结果无效。The device according to claim 15, wherein the smart contract is used to determine that the prediction result corresponding to the participant is invalid when the participant does not have a corresponding guarantee certificate.
  18. 根据权利要求11所述的装置,所述链外权益凭证包括以下至少之一:会员积分、优惠券、兑换券、抵价券。The device according to claim 11, wherein the off-chain equity certificate comprises at least one of the following: member points, coupons, exchange coupons, and discount coupons.
  19. 根据权利要求11所述的装置,所述智能合约的调用条件包括:所述链外对象持有的第三链外权益凭证被冻结,且冻结的链外权益凭证足够对所述分配指令进行响应。The device according to claim 11, the calling condition of the smart contract comprises: a third off-chain equity certificate held by the off-chain object is frozen, and the frozen off-chain equity certificate is sufficient to respond to the allocation instruction .
  20. 根据权利要求19所述的装置,还包括:The apparatus according to claim 19, further comprising:
    第二调用单元,调用用于分配链外权益凭证的智能合约,所述用于分配链外权益凭证的智能合约在所述链外对象未将所述第一链外权益凭证分配至所述参与方的情况下向所述第三链外权益凭证的管理方发送强制分配指令,以从被冻结的所述第三链外权益凭证中获取所述第一链外权益凭证并分配至所述参与方。The second calling unit invokes a smart contract for distributing off-chain equity vouchers. The smart contract for distributing off-chain equity vouchers does not assign the first off-chain equity voucher to the participant in the off-chain object. In the case of the party, a mandatory allocation instruction is sent to the manager of the third off-chain equity certificate to obtain the first off-chain equity certificate from the frozen third-chain equity certificate and allocate it to the participant square.
  21. 一种电子设备,包括:An electronic device includes:
    处理器;processor;
    用于存储处理器可执行指令的存储器;Memory for storing processor-executable instructions;
    其中,所述处理器通过运行所述可执行指令以实现如权利要求1-10中任一项所述的事件预测方法。The processor executes the executable instruction to implement the event prediction method according to any one of claims 1-10.
PCT/CN2019/084132 2018-07-27 2019-04-24 Event prediction method and apparatus, and electronic device WO2020019785A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810848407.8A CN109102113A (en) 2018-07-27 2018-07-27 Event prediction method and device, electronic equipment
CN201810848407.8 2018-07-27

Publications (1)

Publication Number Publication Date
WO2020019785A1 true WO2020019785A1 (en) 2020-01-30

Family

ID=64847950

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/084132 WO2020019785A1 (en) 2018-07-27 2019-04-24 Event prediction method and apparatus, and electronic device

Country Status (3)

Country Link
CN (1) CN109102113A (en)
TW (1) TWI718472B (en)
WO (1) WO2020019785A1 (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109146147A (en) * 2018-07-27 2019-01-04 阿里巴巴集团控股有限公司 Event prediction method and device, electronic equipment
CN109117994B (en) * 2018-07-27 2020-04-14 阿里巴巴集团控股有限公司 Event prediction method and device and electronic equipment
CN109102113A (en) * 2018-07-27 2018-12-28 阿里巴巴集团控股有限公司 Event prediction method and device, electronic equipment
CN109981679B (en) * 2019-04-08 2021-08-10 上海点融信息科技有限责任公司 Method and apparatus for performing transactions in a blockchain network
CN110548293B (en) * 2019-09-02 2021-09-21 腾讯科技(深圳)有限公司 Information verification method and related device
CN110796399B (en) * 2020-01-03 2020-05-26 支付宝(杭州)信息技术有限公司 Resource allocation method and device based on block chain

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105976231A (en) * 2016-06-24 2016-09-28 深圳前海微众银行股份有限公司 Asset management method based on intelligent block chain contracts and nodes
CN107346482A (en) * 2017-05-12 2017-11-14 深圳蜂链科技有限公司 The method and device that block chain is docked, verifies, known together with the outer data of chain
US20180181979A1 (en) * 2016-12-26 2018-06-28 International Business Machines Corporation Incentive-based crowdvoting using a blockchain
CN108229940A (en) * 2018-02-13 2018-06-29 中国联合网络通信集团有限公司 Method of commerce and transaction system
CN109102113A (en) * 2018-07-27 2018-12-28 阿里巴巴集团控股有限公司 Event prediction method and device, electronic equipment
CN109117994A (en) * 2018-07-27 2019-01-01 阿里巴巴集团控股有限公司 Event prediction method and device, electronic equipment

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9785442B2 (en) * 2014-12-24 2017-10-10 Intel Corporation Systems, apparatuses, and methods for data speculation execution
WO2017147696A1 (en) * 2016-02-29 2017-09-08 Troy Jacob Ronda Systems and methods for distributed identity verification
CN105913174A (en) * 2016-04-07 2016-08-31 彭军红 Lottery issuing method based on block chains
WO2017222030A1 (en) * 2016-06-22 2017-12-28 真実 梶田 Event prediction device and event prediction method
TWM543413U (en) * 2016-12-05 2017-06-11 Taiwan United Financial Technology Co Ltd Web lending platform using technology of blockchain for deal
CN107038638A (en) * 2017-02-24 2017-08-11 杭州象链网络技术有限公司 A kind of equity registration transaction system construction method based on alliance's chain

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105976231A (en) * 2016-06-24 2016-09-28 深圳前海微众银行股份有限公司 Asset management method based on intelligent block chain contracts and nodes
US20180181979A1 (en) * 2016-12-26 2018-06-28 International Business Machines Corporation Incentive-based crowdvoting using a blockchain
CN107346482A (en) * 2017-05-12 2017-11-14 深圳蜂链科技有限公司 The method and device that block chain is docked, verifies, known together with the outer data of chain
CN108229940A (en) * 2018-02-13 2018-06-29 中国联合网络通信集团有限公司 Method of commerce and transaction system
CN109102113A (en) * 2018-07-27 2018-12-28 阿里巴巴集团控股有限公司 Event prediction method and device, electronic equipment
CN109117994A (en) * 2018-07-27 2019-01-01 阿里巴巴集团控股有限公司 Event prediction method and device, electronic equipment

Also Published As

Publication number Publication date
TW202008229A (en) 2020-02-16
TWI718472B (en) 2021-02-11
CN109102113A (en) 2018-12-28

Similar Documents

Publication Publication Date Title
WO2020019785A1 (en) Event prediction method and apparatus, and electronic device
US11087372B2 (en) Benefit allocation method, apparatus, and electronic device
TWI729345B (en) Event prediction method and device, electronic equipment
WO2020019791A1 (en) Event prediction method and apparatus and electronic device
US11854405B2 (en) Performing vehicle logistics in a blockchain
US10678598B2 (en) Enforcing compute equity models in distributed blockchain
US11030681B2 (en) Intermediate blockchain system for managing transactions
US11057225B2 (en) Enforcing compute equity models in distributed blockchain
US11386405B2 (en) Dynamic blockchain transactional policy management
WO2020063175A1 (en) Method and apparatus for allocating virtual resources
US20190182254A1 (en) Enforcing compute equity models in distributed blockchain
US20190108519A1 (en) Transaction scheduling for block space on a blockchain
US11615078B2 (en) Blockchain-based transaction methods
US11489662B2 (en) Special relationships in a blockchain
WO2020019799A1 (en) Object selection method and device and electronic device
WO2020119293A1 (en) Content pushing method and apparatus, and electronic device
TW202008270A (en) Block release method and apparatus, and electronic device
WO2020019780A1 (en) Event prediction method and apparatus, and electronic device
TW202016807A (en) Event prediction method and device and electronic equipment
CN113535335B (en) Virtual resource allocation method and device based on block chain and electronic equipment
CN114298817A (en) Training method and device of personal loan amount evaluation model based on block chain
US20200175502A1 (en) Confidential transaction in a blockchain network
US20200186566A1 (en) Synthetic identity signal network
CN107194712B (en) Method and device for recording change information of shared account and method and system for supplementing account of internal account
CN112215602B (en) Data query method, device and system and electronic equipment

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19841679

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19841679

Country of ref document: EP

Kind code of ref document: A1