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

Event prediction method and apparatus, and electronic device Download PDF

Info

Publication number
TW202008229A
TW202008229A TW108101994A TW108101994A TW202008229A TW 202008229 A TW202008229 A TW 202008229A TW 108101994 A TW108101994 A TW 108101994A TW 108101994 A TW108101994 A TW 108101994A TW 202008229 A TW202008229 A TW 202008229A
Authority
TW
Taiwan
Prior art keywords
result
chain
blockchain
certificate
equity
Prior art date
Application number
TW108101994A
Other languages
Chinese (zh)
Other versions
TWI718472B (en
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 TW202008229A publication Critical patent/TW202008229A/en
Application granted granted Critical
Publication of TWI718472B publication Critical patent/TWI718472B/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; releasing a corresponding comparison result to the blockchain by comparing the prediction result with the actual result; 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.

Description

事件預測方法及裝置、電子設備Event prediction method and device, electronic equipment

本說明書一個或多個實施例涉及區塊鏈技術領域,尤其涉及一種事件預測方法及裝置、電子設備。One or more embodiments of this specification relate to the field of blockchain technology, and in particular, to an event prediction method and device, and electronic equipment.

對於尚未完成的事件,往往需要等待該事件完成後,才能夠準確獲知該事件的結果。但是,一些場景下希望提前獲知事件的結果,比如基於該事件的結果來提前採取應對措施,再比如基於該事件的結果確定是否需要對關聯事件的處理方案進行調整等。 在相關技術中,可以通過多種方式對事件進行結果預測,比如根據歷史資料的預測分析,再比如通過樣本訓練出的預測模型進行預測分析等。由於使用的預測資料、採用的預測方式、所處的預測環境等存在差異,使得不同參與方在參與到針對同一事件的結果預測時,往往得到的預測結果也不盡相同,甚至存在較大偏差。For an event that has not been completed, it is often necessary to wait for the event to complete before it can accurately know the result of the event. However, in some scenarios, it is desirable to know the result of the event in advance, such as taking countermeasures in advance based on the result of the event, and then determining whether to adjust the processing scheme of the related event based on the result of the event. In the related art, the results of events can be predicted in various ways, such as predictive analysis based on historical data, and then predictive analysis based on a prediction model trained from samples. Due to the differences in the forecasting data used, the forecasting methods used, and the forecasting environment, etc., when different participants participate in the forecasting of the results of the same event, they often get different forecasting results, and even have large deviations. .

有鑑於此,本說明書一個或多個實施例提供一種 為實現上述目的,本說明書一個或多個實施例提供技術方案如下: 根據本說明書一個或多個實施例的第一態樣,提出了一種事件預測方法,應用於區塊鏈節點;所述方法包括: 獲取區塊鏈上發佈的由參與方針對指定事件輸入的預測結果,所述預測結果的輸入時刻早於所述指定事件的實際結果的發生時刻; 通過對所述預測結果與所述實際結果進行比較,向所述區塊鏈發佈相應的比較結果; 調用所述區塊鏈中用於資產分配的智慧合約,所述智慧合約用於讀取所述比較結果,以根據所述比較結果向鏈外對象發送分配指令,所述分配指令用於指示所述鏈外對象向所述參與方分配第一鏈外權益憑證。 根據本說明書一個或多個實施例的第二態樣,提出了一種事件預測裝置,應用於區塊鏈節點;所述裝置包括: 獲取單元,獲取區塊鏈上發佈的由參與方針對指定事件輸入的預測結果,所述預測結果的輸入時刻早於所述指定事件的實際結果的發生時刻; 比較單元,通過對所述預測結果與所述實際結果進行比較,向所述區塊鏈發佈相應的比較結果; 第一調用單元,調用所述區塊鏈中用於資產分配的智慧合約,所述智慧合約用於讀取所述比較結果,以根據所述比較結果向鏈外對象發送分配指令,所述分配指令用於指示所述鏈外對象向所述參與方分配第一鏈外權益憑證。 根據本說明書一個或多個實施例的第三態樣,提出了一種電子設備,包括: 處理器; 用於儲存處理器可執行指令的儲存器; 其中,所述處理器通過運行所述可執行指令以實現如上述實施例中任一所述的事件預測方法。In view of this, one or more embodiments of this specification provide a To achieve the above purpose, one or more embodiments of this specification provide technical solutions as follows: According to the first aspect of one or more embodiments of this specification, an event prediction method is proposed, which is applied to blockchain nodes; the method includes: Obtain the prediction result published by the participant for the specified event published on the blockchain, and the input time of the prediction result is earlier than the moment of the actual result of the specified event; Publish the corresponding comparison results to the blockchain by comparing the predicted results with the actual results; Invoke 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 indicate The off-chain object distributes the first off-chain equity certificate to the participant. According to a second aspect of one or more embodiments of this specification, an event prediction device is proposed, which is applied to a blockchain node; the device includes: The obtaining unit obtains the prediction result input by the participant for the specified event published on the blockchain, and the input time of the prediction result is earlier than the occurrence time of the actual result of the specified event; A comparison unit, by comparing the predicted result with the actual result, and publishing a corresponding comparison result to the blockchain; The first calling unit calls a smart contract for asset allocation in the blockchain, and the smart contract is used to read the comparison result to send an allocation instruction to an object outside the chain according to the comparison result, the allocation The instruction is used to instruct the off-chain object to allocate the first off-chain equity certificate to the participant. According to a third aspect of one or more embodiments of this specification, an electronic device is proposed, including: processor; A memory for storing executable instructions of the processor; Wherein, the processor executes the executable instruction to implement the event prediction method as described in any one of the above embodiments.

這裡將詳細地對示例性實施例進行說明,其示例表示在圖式中。下面的描述涉及圖式時,除非另有表示,不同圖式中的相同數字表示相同或相似的要素。以下示例性實施例中所描述的實施方式並不代表與本說明書一個或多個實施例相一致的所有實施方式。相反,它們僅是與如所附申請專利範圍中所詳述的、本說明書一個或多個實施例的一些態樣相一致的裝置和方法的例子。 需要說明的是:在其他實施例中並不一定按照本說明書示出和描述的順序來執行相應方法的步驟。在一些其他實施例中,其方法所包括的步驟可以比本說明書所描述的更多或更少。此外,本說明書中所描述的單個步驟,在其他實施例中可能被分解為多個步驟進行描述;而本說明書中所描述的多個步驟,在其他實施例中也可能被合併為單個步驟進行描述。 圖1是一示例性實施例提供的一種事件預測方法的流程圖。圖1所示,該方法應用於區塊鏈節點,可以包括以下步驟: 步驟102,獲取區塊鏈上發佈的由參與方針對指定事件輸入的預測結果,所述預測結果的輸入時刻早於所述指定事件的實際結果的發生時刻。 在一實施例中,通過在區塊鏈的客戶端上創建交易(transfer),可以通過該交易將參與方輸入的預測結果發佈至區塊鏈上,成為區塊鏈的分散式資料庫中的一筆資料。 需要指出的是:區塊鏈中的交易,存在狹義的交易以及廣義的交易之分。狹義的交易是指用戶向區塊鏈發佈的一筆價值轉移;例如,在傳統的比特幣區塊鏈網路中,交易可以是用戶在區塊鏈中發起的一筆轉帳。而廣義的交易是指用戶向區塊鏈發佈的一筆具有業務意圖的業務資料;例如,運營方可以基於實際的業務需求搭建一個聯盟鏈,依託於聯盟鏈部署一些與價值轉移無關的其它類型的線上業務(比如,事件預測、租房業務、車輛調度業務、保險理賠業務、信用服務、醫療服務等),而在這類聯盟鏈中,交易可以是用戶在聯盟鏈中發佈的一筆具有業務意圖的業務訊息或者業務請求。本說明書中的交易,應當傾向於理解為廣義上的交易。 在一實施例中,由於區塊鏈採用分散式資料庫,使得發佈至區塊鏈上的預測結果無法被篡改,可以確保預測結果真實、可靠。 在一實施例中,參與方輸入的預測結果可由上述的區塊鏈節點向區塊鏈發佈。在另一實施例中,參與方輸入的預測結果可由區別於上述區塊鏈節點的其他區塊鏈節點向區塊鏈發佈,而上述區塊鏈節點可以獲知與該預測結果相關的資訊,還可以將該預測結果(或該預測結果的哈希值)記錄在該區塊鏈節點維護的本地資料庫(即區塊鏈帳本)中。 在一實施例中,一個或多個參與方可以對同一事件進行預測,使得區塊鏈上可以存在分別對應於各個參與方的預測結果;其中,每一參與方可以存在對應的唯一標識,使得每一參與方發佈的預測結果可以與其唯一標識進行關聯,以便於對區塊鏈上發佈的各個預測結果進行有效區分。 在一實施例中,指定事件為被指明確定需要進行結果預測的任意事件,比如某一路口的交通狀況、某一地區的水稻收成、某一海域的颱風形成時間等,本說明書並不對此進行限制。 在一實施例中,預測結果的輸入時刻應當早於指定事件的實際結果的發生時刻,該輸入時刻可以被記錄在區塊鏈中包含該預測結果的交易中,或者可以直接將該交易的創建時刻作為該輸入時刻。在一種情況下,當該指定事件為瞬時事件時,即該指定事件從起始時刻至結束時刻之間的時間段很短,不足以使得參與方在該時間段內輸入預測結果,參與方可以在實際結果的發生時刻之前的任意時刻輸入預測結果。在另一種情況下,當該指定事件為非瞬時事件時,即參與方可以在該指定事件的起始時刻至結束時刻之間的時間段內輸入預測結果,可以限制參與方在該指定事件的起始時刻之後輸入預測結果。 步驟104,通過對所述預測結果與所述實際結果進行比較,向所述區塊鏈發佈相應的比較結果。 在一實施例中,由上述的區塊鏈節點對預測結果與實際結果進行比較,比較結果可以經共識後發佈至區塊鏈上。由於區塊鏈上記錄了參與方輸入的預測結果和指定事件的實際結果,因而任意區塊鏈節點均可以對上述的比較結果進行核驗,以確定該比較結果的有效性。 在一實施例中,比較結果包括預測結果與實際結果之間的匹配情況,例如完全一致、部分一致、完全不一致等。 步驟106,調用所述區塊鏈中用於資產分配的智慧合約,所述智慧合約用於讀取所述比較結果,以根據所述比較結果向鏈外對象發送分配指令,所述分配指令用於指示所述鏈外對象向所述參與方分配第一鏈外權益憑證。 在一實施例中,智慧合約中可以預先寫入基於比較結果對智慧資產憑證進行分配的處理邏輯,使得智慧合約可以基於比較結果而自動確定是否需要向相應的參與方分配第一鏈外權益憑證;其中,由於智慧合約上的處理邏輯為公開內容,並且整個處理過程由智慧合約自動完成、不存在人工干預,使得對鏈外權益憑證的分配能夠確保客觀、公正。 在一實施例中,當預測結果與實際結果相匹配時,表明提供該預測結果的參與方對於上述指定事件的結果預測具有一定的準確度。那麼,通過向參與方分配第一鏈外權益憑證,可以控制各個參與方對於鏈外權益憑證的持有量,從而在一定程度上對於各個參與方實現標記作用:持有鏈外權益憑證越多的參與方對於事件結果的預測能力越強,因而在後續的事件預測過程中,能夠據此快速篩選出預測能力強的參與方,以從這些參與方處獲得可能相對更加準確的預測結果。 在一實施例中,鏈外權益憑證用於表徵一定的權益,以實現對參與方準確預測上述指定事件的激勵,有助於該參與方繼續參與對後續事件的預測,從而實現良性循環。比如參與方在區塊鏈上實施預設操作時,譬如該預設操作可以包括發佈交易、發起共識(例如基於PBFT實用拜占庭容錯算法而發起)等,可以將鏈外權益憑證兌換為區塊鏈內等價的智慧資產憑證、並通過向各個區塊鏈節點分配一定量的智慧資產憑證,以促使該預設操作能夠儘快順利完成。 在一實施例中,鏈外權益憑證可以包括用於表徵任意類型的鏈外權益的憑證,譬如在會員系統內的會員積分、在交易平臺上的優惠券、兌換券、抵價券等,本說明書並不對此進行限制。 在一實施例中,上述的智慧合約可以在交易或另一智慧合約的驅動下被調用,以觸發其從區塊鏈上讀取上述的預測結果和實際結果等,從而進一步實施本說明書的事件預測方案。在一種情況下,指定事件的實際結果可以由所述區塊鏈中的預言機(Oracle)節點發佈至所述區塊鏈上,由於預言機節點提供的資料被認為絕對可靠,因而可以確保該實際結果的準確性。在另一種情況下,指定事件的實際結果可以為經共識後由所述區塊鏈中的任一區塊鏈節點發佈至所述區塊鏈上,譬如該任一區塊鏈節點可以在區塊鏈內發起共識、以針對該任一區塊鏈節點提供的實際結果進行確認,當該實際結果通過了各個區塊鏈節點的共識後,表明該實際結果具有足夠的準確度,可以被應用於與預測結果進行比較。 在一實施例中,所述指定事件包括一個或多個子事件,所述預測結果用於對所述一個或多個子事件進行結果預測;其中,所述智慧合約被用於在所述預測結果對所述一個或多個子事件的結果預測均正確的情況下,將所述第一鏈外權益憑證分配至所述參與方。換言之,當預測結果對指定事件的結果預測完全正確時,該預測結果被智慧合約判定為匹配於該指定事件的實際結果。 在一實施例中,所述指定事件包括多個子事件;當所述第一鏈外權益憑證被分配至所述參與方時,所述第一鏈外權益憑證所表徵的權益大小正相關於被所述預測結果準確預測的子事件在所述多個子事件中的占比。例如,當預測結果與實際結果完全相同時,即被所述預測結果準確預測的子事件在所述多個子事件中的占比為100%,第一鏈外權益憑證所表徵的權益大小可以為預設的最大值;當預測結果與實際結果完全不相同時,即被所述預測結果準確預測的子事件在所述多個子事件中的占比為0%,第一鏈外權益憑證所表徵的權益大小可以為預設的最小值(0或其他預設值)。 在一實施例中,第一鏈外權益憑證所表徵的權益大小可以採用線性變化,例如占比為30%時,權益大小為預設最大值的30%,又例如占比為80%時,權益大小為預設最大值的80%等。在另一實施例中,第一鏈外權益憑證所表徵的權益大小可以採用非線性變化,例如占比為30%時,權益大小為預設最大值的10%,再例如占比為80%時,權益大小為預設最大值的50%,又例如占比為95%時,權益大小為預設最大值的80%等。 在一實施例中,所述指定事件包括多個子事件,當預測結果與實際結果並非完全一致時,不論被所述預測結果準確預測的子事件在所述多個子事件中的占比為何,均可以判定為兩者不匹配,從而不會向參與方分配第一鏈外權益憑證。 在一實施例中,可以確定所述參與方持有的第二鏈外權益憑證被凍結,以作為用於擔保所述預測結果的有效性的擔保憑證;其中,所述智慧合約用於在所述預測結果不匹配於所述實際結果的情況下向所述擔保憑證的管理方發送扣除指令,以解除所述參與方對所述擔保憑證的持有關係。通過將參與方持有的第二鏈外權益憑證凍結為擔保憑證,使得該擔保憑證被用於對參與方提供的預測結果進行擔保,可以對參與方設置一定的參與門檻,避免隨意參與而影響對上述指定事件的準確預測。 在一實施例中,當擔保憑證表徵的權益越大時,表明參與方對自身提供的預測結果越自信,那麼當預測結果與實際結果相匹配時,在一定程度上表明參與方確實具備極強的預測能力,因而通過將第一鏈外權益憑證所表徵的權益大小設定為與所述擔保憑證表徵的權益大小呈正相關,可以對相應的參與方的預測能力進行更為準確地標記,以及對相應參與方進行更大程度的激勵。 在一實施例中,即便參與方並未凍結形成擔保憑證,仍然可以參與對指定事件的結果預測,並在預測結果與實際結果相匹配的情況下獲得上述的第一鏈外權益憑證。在另一實施例中,當參與方並未凍結形成擔保憑證時,參與方輸入的預測結果被判定為無效,使其無法真正參與到對指定事件的結果預測;或者,在預測結果與實際結果相匹配的情況下,雖然可以向該參與方分配第一鏈外權益憑證,但是該第一鏈外權益憑證無法表徵任何權益相當於未分配任何鏈外權益憑證,使得該參與方的參與無意義。 在一實施例中,所述智慧合約的調用條件可以包括:所述鏈外對象持有的第三鏈外權益憑證被凍結,且凍結的所述第三鏈外權益憑證足夠對所述分配指令進行響應。通過在調用智慧合約之前,對鏈外對象持有的第三鏈外權益憑證進行凍結,可以提前鎖定這部分鏈外權益憑證,使得即便鏈外對象在收到分配指令後拒絕向參與方分配第一鏈外權益憑證或者持有的鏈外權益憑證不足以完成分配,也可以基於凍結的該第三鏈外權益憑證順利實施分配操作。 在一實施例中,如果鏈外對象根據分配指令將第一鏈外權益憑證分配至參與方,則鏈外對象可以恢復對第三鏈外權益憑證的持有。如果所述鏈外對象未將所述第一鏈外權益憑證分配至所述參與方,用於分配鏈外權益憑證的智慧合約可以向所述第三鏈外權益憑證的管理方發送強制分配指令,以從被凍結的所述第三鏈外權益憑證中獲取所述第一鏈外權益憑證並分配至所述參與方。其中,可以由區塊鏈節點監控鏈外對象對分配指令的響應情況,例如該響應情況可以由上述的預言機節點傳入區塊鏈,從而確保其訊息的準確性;或者,預言機節點將上述的響應情況傳入區塊鏈後,用於分配鏈外權益憑證的智慧合約可以自動確定所述鏈外對象是否將所述第一鏈外權益憑證分配至所述參與方,以及自動發送上述的強制分配指令。 圖2是一示例性實施例提供的一種預測事件結果的示意圖。如圖2所示,假定用戶A希望參與針對事件B的結果預測,該用戶A可以通過安裝有客戶端的手機21輸入預測結果。該預測結果可以由用戶A通過任意方式獲得,比如由用戶A通過圖2中未示出的伺服器對歷史資料進行大數據分析得到,又比如由用戶A根據自身經驗而得到,本說明書並不對此進行限制。 設備22被配置為區塊鏈中的一個區塊鏈節點,該設備22可以接收手機21發送的預測結果;基於手機21運行的客戶端上的已登錄帳號,該預測結果可以被確定為來自用戶A。當然,手機21也可以將上述的預測結果發送至區塊鏈中的其他區塊鏈節點,這些區塊鏈節點的處理過程與設備22類似,可以參考本說明書中對於設備22的相關描述。而其他用戶也可以對事件B進行結果預測,並通過自身使用的手機或其他電子設備發送至設備22或其他區塊鏈節點處,這些用戶的處理過程與用戶A類似,可以參考本說明書中對於用戶A的相關描述。 設備22可以在區塊鏈中對用戶A輸入的預測結果進行共識,使得該預測結果在通過共識後被發佈至區塊鏈,以記錄至區塊鏈的分散式資料庫中,即“上鏈”。本說明書並不限定採用的共識算法的類型;例如,當設備22所處的區塊鏈為聯盟鏈或公有鏈時,該設備22可以基於諸如PBFT(Practical Byzantine Fault Tolerance,實用拜占庭容錯)算法向其他區塊鏈節點發起共識,並在通過共識後將該預測結果發佈至區塊鏈,使其被記錄至區塊鏈的分散式資料庫中;再例如,當設備22所處的區塊鏈為公有鏈時,該設備22可以與其他區塊鏈節點基於POW(Proof of Work,工作量證明)算法、POS(Proof of Stake,股權證明)算法或其他算法競爭記帳權,並由獲得記帳權的區塊鏈節點向相應區塊內記入交易資料,而當包含用戶A輸入的預測結果的交易被記入時,該預測結果可以被記錄至區塊鏈的分散式資料庫中。 區塊鏈中可以包括預言機節點23,該預言機節點23可以獲取鏈外(即區塊鏈之外)資料,並將鏈外資料傳入區塊鏈中。例如,該預言機節點23可以從鏈外獲取事件B的實際結果,並將該實際結果發佈至區塊鏈中,以記錄於區塊鏈的分散式資料庫中,即“上鏈”。 在實施事件預測的過程中,實際上包含兩個功能邏輯:第一是用於確定預測結果與實際結果之間的比較結果的功能邏輯1,第二是基於比較結果分配智慧資產憑證的功能邏輯2。 對於上述的功能邏輯1,設備22可以從區塊鏈上讀取用戶A輸入的預測結果與預言機節點23傳入的事件B的實際結果,並通過對預測結果與實際結果進行比較,以得到相應的比較結果。設備22可以將比較結果發佈至區塊鏈中,使得該比較結果經過共識後可以被記錄於區塊鏈的分散式資料庫中。由於預測結果和實際結果均被發佈至區塊鏈中,因而任一區塊鏈節點均可以通過查詢預測結果和實際結果,對設備22發佈的比較結果進行確認,確保比較結果真實有效。 對於上述的功能邏輯2,可以預先在區塊鏈上創建智慧合約,該智慧合約中定義有上述的功能邏輯2,使得該智慧合約被調用後可以自動根據設備22發佈的比較結果向用戶A分配鏈外權益憑證,並且該過程中可以避免涉及到人為干預、確保準確度和有效性,使得比較結果客觀、準確。 在一實施例中,智慧合約可以由區塊鏈上的交易或其他智慧合約進行調用,以觸發其自動實施相關功能邏輯,譬如上述用於確定預測結果與實際結果之間的匹配情況的功能邏輯等。設備22可以通過在區塊鏈中發佈交易或調用其他智慧合約,以實現對上述智慧合約的調用;或者,可以由其他區塊鏈節點對上述智慧合約進行調用,本說明書並不對此進行限制。在被調用後,上述的智慧合約可以在設備22上運行,以自動實施上述的功能邏輯。 為了便於理解,下面結合圖3和圖4,針對圖2所示實施例中提及的功能邏輯進行詳細描述。 圖3是一示例性實施例提供的一種針對事件實施預測的功能邏輯的流程圖。如圖3所示,步驟302~306對應於上述的功能邏輯1、該功能邏輯1可由作為區塊鏈節點的設備22實現,步驟308A~310C對應於上述的功能邏輯2、該功能邏輯2可由被調用的智慧合約實現;其中: 步驟302,從區塊鏈上獲取用戶A的預測結果。 在一實施例中,用戶A的預測結果被記錄於區塊鏈上的某一交易中,該交易可以被標記為與事件B相關,使得設備22可以據此從區塊鏈中查找到該交易,並獲取用戶A的預測結果。例如,設備22可以通過掃描特定位址的交易記錄或者特定流水號的交易記錄,即可獲得用戶A輸入的預測結果。 在一實施例中,區塊鏈上還記錄有其他用戶輸入的預測結果,設備22可以通過類似方式獲得這些預測結果,此處不再一一贅述。 步驟304,從區塊鏈上獲取實際結果。 在一實施例中,預言機節點23傳入的實際結果被記錄於區塊鏈上的某一交易中,該交易可以被標記為與事件B相關,使得設備22可以據此從區塊鏈中查找到該交易,並獲取該實際結果。例如,設備22可以通過掃描特定位址的交易記錄或者特定流水號的交易記錄,即可獲得該實際結果。 步驟306,比較用戶A的預測結果與事件B的實際結果,確定該預測結果與實際結果是否一致。 在一實施例中,假定事件B為唯一事件、未包含多個子事件,使得預測結果與實際結果僅存在兩種情況:結果一致或結果不一致。預測結果與實際結果應當具有相同的資料結構,以便於實現比較操作。例如,假定事件B為某一路口在上下班高峰期的交通狀況,預測結果、實際結果可以分別包含一字段m,當該字段m=0時表示擁擠堵塞、當該字段m=1時表示不擁擠堵塞。 步驟308A,當預測結果與實際結果一致時,確定用戶A是否存在擔保憑證。 步驟310A,當存在擔保憑證時,向機構C發送分配指令1。 步驟310B,當不存在擔保憑證時,向機構C發送分配指令2。 在一實施例中,用戶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所表徵的權益隨之越大/越多。 在一實施例中,為了避免用戶A隨意發佈對事件B的預測結果、確保該預測結果有意義,可以為參與用戶B的結果預測設置一定門檻,比如要求用戶A必須提供擔保憑證。因此,對於存在擔保憑證的情況下,可以向用戶A分配鏈外權益憑證S1、該鏈外權益憑證S1用於表徵一定權益;而當不存在擔保憑證的情況下,向用戶A分配的鏈外權益憑證S2無法表徵任何權益,相當於未分配任何鏈外權益憑證,那麼用戶A的參與將是無意義的。 步驟308B,當預測結果與實際結果不一致時,確定用戶A是否存在擔保憑證。 步驟310C,當存在擔保憑證時,扣除擔保憑證。 在一實施例中,當預測結果與實際結果不一致時,即用戶A對事件B的結果預測不準確或預測失敗,可以通過扣除擔保憑證使得用戶A終止持有該擔保憑證對應的鏈外權益憑證,那麼用戶A持有的鏈外權益憑證減少,以表明該用戶A的預測能力變弱或預測準確度降低。 在一實施例中,用戶A對應的擔保憑證可以具備一管理方,比如帳戶管理系統等,智慧合約可以通過向該管理方發送扣除指令,使得該管理方響應於該扣除指令而扣除相應的擔保憑證。 圖4是一示例性實施例提供的另一種針對事件實施預測的功能邏輯的流程圖。如圖4所示,步驟402~406對應於上述的功能邏輯1、該功能邏輯1可由作為區塊鏈節點的設備22實現,步驟408A~410D對應於上述的功能邏輯2、該功能邏輯2可由被調用的智慧合約實現;其中: 步驟402,從區塊鏈上獲取用戶A的預測結果。 步驟404,從區塊鏈上獲取實際結果。 在一實施例中,步驟402至404可以參考圖3所示的步驟302至304,此處不再贅述。 步驟406,比較用戶A的預測結果與事件B的實際結果,生成相應的比較結果。 在一實施例中,假定事件B包含多個子事件,如果用戶A的預測結果對所有的子事件均準確預測,則該預測結果與實際結果完全一致;而如果用戶A僅準確預測了部分子事件的結果,或者用戶A本身就僅針對部分子事件實施了預測,那麼預測結果與實際結果可能部分一致;當然,有可能用戶A對所有子事件的預測均不正確,則預測結果與實際結果完全不一致。 在一實施例中,預測結果與實際結果應當具有相同的資料結構,以便於實現比較操作。例如,假定事件B為某一路口在上下班高峰期的交通狀況,預測結果、實際結果可以分別包含字段m1和字段m2,m1字段代表早高峰期間的交通狀況、m2代表晚高峰期間的交通狀況,當該字段m1=0時表示早高峰期間擁擠堵塞、當該字段m1=1時表示早高峰期間不擁擠堵塞,當該字段m2=0時表示晚高峰期間擁擠堵塞、當該字段m2=1時表示晚高峰期間不擁擠堵塞。 步驟408A,當預測結果與實際結果完全一致時,確定用戶A是否存在擔保憑證。 步驟410A,當存在擔保憑證時,向機構C發送分配指令1。 步驟410B,當不存在擔保憑證時,向機構C發送分配指令2。 在一實施例中,步驟408A、步驟410A和步驟410B可以參考如圖3所示的步驟308A、步驟310A和步驟310B,此處不再贅述。 步驟408B,當預測結果與實際結果完全不一致時,若存在擔保憑證,則扣除擔保憑證。 在一實施例中,與圖3所示實施例相類似地,用戶A可以對自身輸入的預測結果配置相應的擔保憑證,以用於對該預測結果的有效性進行擔保。那麼,當預測結果與實際結果完全不一致時,即用戶A對事件B的結果預測不準確或預測失敗,可以通過扣除擔保憑證使得用戶A終止持有該擔保憑證對應的鏈外權益憑證,那麼用戶A持有的鏈外權益憑證減少,以表明該用戶A的預測能力變弱或預測準確度降低。 步驟408C,當預測結果與實際結果部分一致時,確定用戶A是否存在擔保憑證。 步驟410A,當存在擔保憑證時,向機構C發送分配指令3。 步驟410B,當不存在擔保憑證時,向機構C發送分配指令4。 在一實施例中,與步驟410A至410B相類似的,當預測結果與實際結果部分一致時,表明用戶A具有一定程度的預測能力,因而出於對這部分預測能力的標注,以及對於用戶A的激勵,可以向機構C發送分配指令3或分配指令4,使得機構C向用戶A分配一定的鏈外權益憑證。在該實施例中,該擔保憑證並非必要:如果存在擔保憑證,可以向用戶A分配鏈外權益憑證S3,如果不存在擔保憑證,可以向用戶A分配鏈外權益憑證S4;其中,在所表徵的權益大小態樣:S1>S3>S4、S1>S2>S4。 在一實施例中,鏈外權益憑證S1、S3所表徵的權益可以是分別對應的固定值,或者該鏈外權益憑證S1、S3所表徵的權益可以分別與擔保憑證所表徵的權益呈正相關,即擔保憑證所表徵的權益越大/越多時,該智慧資產憑證S1、S3所表徵的權益隨之越大/越多。 在一實施例中,為了避免用戶A隨意發佈對事件B的預測結果、確保該預測結果有意義,可以為參與用戶B的結果預測設置一定門檻,比如要求用戶A必須提供擔保憑證。因此,對於存在擔保憑證的情況下,可以向用戶A分配鏈外權益憑證S3、該鏈外權益憑證S3用於表徵一定權益;而當不存在擔保憑證的情況下,向用戶A分配的鏈外權益憑證S4無法表徵任何權益,相當於未分配任何鏈外權益憑證,那麼用戶A的參與將是無意義的。 在一實施例中,由於用戶A只有在預測結果與實際結果相匹配的情況下,才能夠分配到相應的鏈外權益憑證,因而用戶A所持有的鏈外權益憑證可以用於表徵其預測能力或預測準確度,即當持有的鏈外權益憑證越多或表徵的權益越大時,表明該用戶A的預測能力越強或預測準確度越高。 其中,用戶A還可以將鏈外權益憑證用於其他態樣。例如,區塊鏈中的部分區塊鏈節點可以扮演錨點的角色,可以將用戶A持有的鏈外權益憑證兌換為等價的智慧資產憑證,譬如該錨點發佈的房產憑證、證券憑證、股票憑證、存款憑證等,本說明書並不對此進行限制。當鏈外權益憑證用於表徵用戶的預測能力時,僅允許將鏈外權益憑證兌換為智慧資產憑證,而限制將智慧資產憑證兌換為鏈外權益憑證;當然,如果同時存在用於表徵用戶的預測能力的第一類鏈外權益憑證、不用於表徵用戶的預測能力的第二類鏈外權益憑證,可以限制將智慧資產憑證兌換為第一類鏈外權益憑證、而允許將鏈外權益憑證兌換為第二類鏈外權益憑證。 在如圖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所約束。 圖5是一示例性實施例提供的一種設備的示意結構圖。請參考圖5,在硬體層面,該設備包括處理器502、內部匯流排504、網路介面506、記憶體508以及非揮發性儲存器510,當然還可能包括其他業務所需要的硬體。處理器502從非揮發性儲存器510中讀取對應的電腦程式到記憶體508中然後運行,在邏輯層面上形成事件預測裝置。當然,除了軟體實現方式之外,本說明書一個或多個實施例並不排除其他實現方式,比如邏輯裝置抑或軟硬體結合的方式等,也就是說以下處理流程的執行主體並不限定於各個邏輯單元,也可以是硬體或邏輯裝置。 請參考圖6,在軟體實施方式中,該事件預測裝置應用於區塊鏈節點;該裝置可以包括: 獲取單元61,獲取區塊鏈上發佈的由參與方針對指定事件輸入的預測結果,所述預測結果的輸入時刻早於所述指定事件的實際結果的發生時刻; 比較單元62,通過對所述預測結果與所述實際結果進行比較,向所述區塊鏈發佈相應的比較結果; 第一調用單元63,調用所述區塊鏈中用於資產分配的智慧合約,所述智慧合約用於讀取所述比較結果,以根據所述比較結果向鏈外對象發送分配指令,所述分配指令用於指示所述鏈外對象向所述參與方分配第一鏈外權益憑證。 可選的, 所述實際結果由所述智慧合約從所述區塊鏈上讀取,所述實際結果由所述區塊鏈中的預言機節點發佈至所述區塊鏈上; 或者,所述實際結果由所述智慧合約從所述區塊鏈上讀取,所述實際結果經共識後由所述區塊鏈中的任一區塊鏈節點發佈至所述區塊鏈上。 可選的,所述指定事件包括一個或多個子事件,所述預測結果用於對所述一個或多個子事件分別進行結果預測;其中,所述智慧合約被用於在所述比較結果表明所述預測結果對所述一個或多個子事件的結果預測均正確的情況下,向所述鏈外對象發送所述分配指令。 可選的,所述指定事件包括多個子事件;所述第一鏈外權益憑證對應的權益大小正相關於被所述預測結果準確預測的子事件在所述多個子事件中的占比。 可選的,還包括: 確定單元64,確定所述參與方持有的第二鏈外權益憑證被凍結,以作為用於擔保所述預測結果的有效性的擔保憑證; 其中,所述智慧合約用於在所述預測結果不匹配於所述實際結果的情況下向所述擔保憑證的管理方發送扣除指令,以解除所述參與方對所述擔保憑證的持有關係。 可選的,所述第一鏈外權益憑證所表徵的權益大小與所述擔保憑證表徵的權益大小呈正相關。 可選的,所述智慧合約用於在所述參與方不存在對應的擔保憑證的情況下,判定所述參與方對應的預測結果無效。 可選的,所述鏈外權益憑證包括以下至少之一:會員積分、優惠券、兌換券、抵價券。 可選的,所述智慧合約的調用條件包括:所述鏈外對象持有的第三鏈外權益憑證被凍結,且凍結的鏈外權益憑證足夠對所述分配指令進行響應。 可選的,還包括: 第二調用單元65,調用用於分配鏈外權益憑證的智慧合約,所述用於分配鏈外權益憑證的智慧合約在所述鏈外對象未將所述第一鏈外權益憑證分配至所述參與方的情況下向所述第三鏈外權益憑證的管理方發送強制分配指令,以從被凍結的所述第三鏈外權益憑證中獲取所述第一鏈外權益憑證並分配至所述參與方。 上述實施例闡明的系統、裝置、模組或單元,具體可以由電腦晶片或實體實現,或者由具有某種功能的產品來實現。一種典型的實現設備為電腦,電腦的具體形式可以是個人電腦、膝上型電腦、蜂巢式電話、相機電話、智慧電話、個人數位助理、媒體播放器、導航設備、電子郵件收發設備、遊戲控制台、平板電腦、可穿戴設備或者這些設備中的任意幾種設備的組合。 在一個典型的配置中,電腦包括一個或多個處理器(CPU)、輸入/輸出介面、網路介面和記憶體。 記憶體可能包括電腦可讀媒體中的非永久性儲存器,隨機存取記憶體(RAM)和/或非揮發性記憶體等形式,如唯讀記憶體(ROM)或快閃記憶體(flash RAM)。記憶體是電腦可讀媒體的示例。 電腦可讀媒體包括永久性和非永久性、可行動和非可行動媒體可以由任何方法或技術來實現資訊儲存。資訊可以是電腦可讀指令、資料結構、程式的模組或其他資料。電腦的儲存媒體的例子包括,但不限於相變記憶體(PRAM)、靜態隨機存取記憶體(SRAM)、動態隨機存取記憶體(DRAM)、其他類型的隨機存取記憶體(RAM)、唯讀記憶體(ROM)、電可抹除可程式化唯讀記憶體(EEPROM)、快閃記憶體或其他記憶體技術、唯讀光碟唯讀記憶體(CD-ROM)、數位多功能光碟(DVD)或其他光學儲存、磁盒式磁帶、磁碟儲存、量子儲存器、基於石墨烯的儲存媒體或其他磁性儲存設備或任何其他非傳輸媒體,可用於儲存可以被計算設備存取的資訊。按照本文中的界定,電腦可讀媒體不包括暫存電腦可讀媒體(transitory media),如調變的資料訊號和載波。 還需要說明的是,術語“包括”、“包含”或者其任何其他變體意在涵蓋非排他性的包含,從而使得包括一系列要素的過程、方法、商品或者設備不僅包括那些要素,而且還包括沒有明確列出的其他要素,或者是還包括為這種過程、方法、商品或者設備所固有的要素。在沒有更多限制的情況下,由語句“包括一個……”限定的要素,並不排除在包括所述要素的過程、方法、商品或者設備中還存在另外的相同要素。 上述對本說明書特定實施例進行了描述。其它實施例在所附申請專利範圍的範圍內。在一些情況下,在申請專利範圍中記載的動作或步驟可以按照不同於實施例中的順序來執行並且仍然可以實現期望的結果。另外,在圖式中描繪的過程不一定要求示出的特定順序或者連續順序才能實現期望的結果。在某些實施方式中,多工處理和平行處理也是可以的或者可能是有利的。 在本說明書一個或多個實施例使用的術語是僅出於描述特定實施例的目的,而非旨在限制本說明書一個或多個實施例。在本說明書一個或多個實施例和所附申請專利範圍中所使用的單數形式的“一種”、“所述”和“該”也旨在包括多數形式,除非上下文清楚地表示其他含義。還應當理解,本文中使用的術語“和/或”是指並包含一個或多個相關聯的列出項目的任何或所有可能組合。 應當理解,儘管在本說明書一個或多個實施例可能採用術語第一、第二、第三等來描述各種資訊,但這些資訊不應限於這些術語。這些術語僅用來將同一類型的資訊彼此區分開。例如,在不脫離本說明書一個或多個實施例範圍的情況下,第一資訊也可以被稱為第二資訊,類似地,第二資訊也可以被稱為第一資訊。取決於語境,如在此所使用的詞語“如果”可以被解釋成為“在……時”或“當……時”或“響應於確定”。 以上所述僅為本說明書一個或多個實施例的較佳實施例而已,並不用以限制本說明書一個或多個實施例,凡在本說明書一個或多個實施例的精神和原則之內,所做的任何修改、等同替換、改進等,均應包含在本說明書一個或多個實施例保護的範圍之內。Exemplary embodiments will be described in detail here, examples of which are shown in the drawings. When the following description refers to drawings, unless otherwise indicated, the same numerals in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with one or more embodiments of this specification. Rather, they are merely examples of devices and methods that are consistent with some aspects of one or more embodiments of this specification, as detailed in the appended patent application. 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, the single step described in this specification may be decomposed into multiple steps for description in other embodiments; and the multiple steps described in this specification may also be combined into a single step in other embodiments. description. FIG. 1 is a flowchart of an event prediction method provided by an exemplary embodiment. As shown in Figure 1, this method is applied to blockchain nodes and can include the following steps: Step 102: Obtain a prediction result published on the blockchain by a participant for a specified event, and the input time of the prediction result is earlier than the occurrence time of the actual result of the specified event. In one embodiment, by creating a transaction on the client of the blockchain, the transaction can be used to publish the prediction results entered by the participants to the blockchain, becoming a distributed database in the blockchain. A piece of information. It should be pointed out that there are transactions in the narrow sense and transactions in the broad sense in the blockchain. A narrowly defined transaction refers to a value transfer issued by the user to the blockchain; for example, in the traditional Bitcoin blockchain network, the transaction can be a transfer initiated by the user in the blockchain. The generalized transaction refers to a piece of business data released by the user to the blockchain with business intent; for example, the operator can build an alliance chain based on actual business needs, relying on the alliance chain to deploy some other types of irrelevant value transfer Online business (for example, event prediction, rental business, vehicle scheduling business, insurance claims business, credit service, medical service, etc.), and in this type of alliance chain, the transaction can be a sum of business intention issued by the user in the alliance chain Business message or business request. The transactions in this manual should tend to be understood as transactions in a broad sense. In one embodiment, since the blockchain uses a decentralized database, the prediction results published on the blockchain cannot be tampered with, which can ensure that the prediction results are true and reliable. In an embodiment, the prediction result input by the participant may be published to the blockchain by the blockchain node described above. In another embodiment, the prediction result input by the participant can be published to the blockchain by other blockchain nodes that are different from the blockchain node, and the blockchain node can learn information related to the prediction result, and The prediction result (or the hash value of the prediction result) can be recorded in a local database (ie, blockchain ledger) maintained by the blockchain node. In an 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, so that The prediction results issued by each participant can be associated with its unique identifier, so as to effectively distinguish the prediction results released on the blockchain. In one embodiment, the designated event is any event that is indicated to determine the need to predict the outcome, such as the traffic condition of a certain intersection, the rice harvest in a certain area, the time of typhoon formation in a certain sea area, etc. 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 containing the prediction result in the blockchain, or the transaction can be directly created The time is regarded as the input time. In one case, when the specified event is a transient event, that is, the time period from the start time to the end time of the specified event is short, it is not enough for the participant to input the prediction result within the time period, the participant can Enter the prediction result at any time before the actual result occurs. In another case, when the specified event is a non-instantaneous event, that is, the participant can enter the prediction result within the time period from the start time to the end time of the specified event, which can restrict the participant’s Enter the prediction result after the start time. In step 104, by comparing the predicted result with the actual result, a corresponding comparison result is released to the blockchain. In an 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. Since the prediction results entered by the participants and the actual results of the specified events 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 match between the predicted result and the actual result, such as complete agreement, partial agreement, and complete inconsistency. 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. Instructing the off-chain object to allocate the first off-chain equity certificate to the participant. In an embodiment, the smart contract may be pre-written with processing logic for distributing the smart asset certificate based on the comparison result, so that the smart contract can automatically determine whether it is necessary to allocate the off-chain equity certificate to the corresponding participant 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 human intervention, so that the distribution of off-chain equity certificates can ensure objective and fair. In an embodiment, when the prediction result matches the actual result, it indicates that the party providing the prediction result has a certain accuracy in the prediction of the result of the specified event. Then, by distributing the first off-chain equity certificate to the participants, each participant can control the amount of off-chain equity certificates held, thereby achieving a mark 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 outcome of the event, so in the subsequent event prediction process, it is possible to quickly screen out the participants with strong prediction ability to obtain relatively more accurate prediction results from these participants. In one embodiment, the off-chain equity certificate is used to characterize certain rights and interests, so as to realize the incentive for the participant to accurately predict the above-mentioned designated 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 may include issuing a transaction, initiating consensus (for example, initiated based on the PBFT practical Byzantine fault tolerance algorithm), etc., and can convert the off-chain equity certificate into a blockchain Equivalent internal smart asset certificates, and by assigning a certain amount of smart asset certificates to each blockchain node, so that the preset operation can be successfully completed as soon as possible. In one embodiment, the off-chain equity certificate may include a certificate used to characterize any type of off-chain equity, such as membership points in the member system, coupons on the trading platform, exchange coupons, coupons, etc. The manual does not limit this. In one embodiment, the above smart contract can be called under the drive of a transaction or another smart contract to trigger it to read the above predicted and actual results from the blockchain, thereby further implementing the events of this specification Forecasting plan. In one case, the actual result of the specified event can be published on the blockchain by the Oracle node in the blockchain. Since the information provided by the Oracle node is considered to be absolutely reliable, it can ensure that The accuracy of actual results. In another case, the actual result of the specified event may be published by any blockchain node in the blockchain to the blockchain after consensus, for example, any blockchain node may be in the area Initiate consensus within the blockchain to confirm the actual result provided by any blockchain node. When the actual result passes the consensus of each blockchain node, it indicates that the actual result has sufficient accuracy and can be applied To compare with the predicted results. In an embodiment, the specified event includes one or more sub-events, and the prediction result is used to predict the result of the one or more sub-events; wherein, the smart contract is used to When the prediction of the result of the one or more sub-events is correct, the first off-chain equity certificate is distributed to the participants. In other words, when the prediction result completely predicts the result of the specified event, the prediction result is determined by the smart contract to match the actual result of the specified event. In an embodiment, the designated event includes multiple sub-events; when the first off-chain equity certificate is distributed to the participants, the size of the equity represented by the first off-chain equity certificate is positively related to the The proportion of sub-events accurately predicted by the prediction result in the plurality of sub-events. For example, when the prediction result is exactly the same as the actual result, that is, the proportion of sub-events accurately predicted by the prediction result in the plurality of sub-events is 100%, 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 sub-events accurately predicted by the prediction result in the plurality of 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). In an embodiment, the size of the equity represented by the first-chain equity certificate can be changed linearly, for example, when the ratio is 30%, the equity size is 30% of the preset maximum value, and for example, when the ratio is 80%, The equity size is 80% of the preset maximum, etc. In another embodiment, the size of the equity represented by the first-chain equity certificate can be changed nonlinearly, for example, when the ratio is 30%, the equity size is 10% of the preset maximum value, and for example, the ratio 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 predicted result is not completely consistent with the actual result, regardless of the proportion of the sub-events accurately predicted by the predicted result in the multiple sub-events, all It can be determined that the two do not match, so that 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 When the predicted 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 of 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 prediction results provided by the participant, and a certain participation threshold can be set for the participant to avoid the influence of random participation Accurate prediction of the above specified events. In an embodiment, when the equity represented by the security certificate is larger, 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 really has a very strong Prediction ability, so by setting the size of the equity represented by the equity certificate outside the first chain to be positively correlated with the size of the equity represented by the security certificate, the prediction capabilities of the corresponding participants can be marked more accurately, and the The corresponding participants are encouraged to a greater degree. In one embodiment, even if the participant does not freeze to form a guarantee certificate, 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 certificate, the prediction result entered by the participant is judged to be invalid, making it impossible to really participate in the prediction of the result of the specified event; or, between the prediction result and the actual result In the case of matching, although the first off-chain equity certificate can be allocated to the participant, the first off-chain equity certificate cannot represent any equity equivalent to not allocating any off-chain equity certificate, making the participation of the participant meaningless . In an embodiment, the calling condition of the smart contract may include: the third off-chain equity certificate held by the off-chain object is frozen, and the frozen third 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 the off-chain equity certificate can be locked in advance, so that even if the off-chain object refuses to allocate the first party to the participant after receiving the allocation instruction 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 implemented based on the frozen third off-chain equity certificate. In an embodiment, if the off-chain object distributes the first off-chain equity certificate to the participants according to the allocation instruction, the off-chain object may resume holding the third off-chain equity certificate. If the off-chain object does not allocate the first off-chain equity certificate to the participants, the smart contract used to allocate 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 frozen third off-chain equity certificate and distribute it to the participants. Among them, the blockchain node can monitor the response of the off-chain object to the allocation instruction, for example, the response can be passed into the blockchain by the aforementioned oracle node to ensure the accuracy of its message; or, the oracle node will After the above response is transferred to the blockchain, the smart contract used to distribute the off-chain equity certificate can automatically determine whether the off-chain object distributes the first off-chain equity certificate to the participant, and automatically sends the above Mandatory allocation instruction. FIG. 2 is a schematic diagram of a predicted event result provided by an exemplary embodiment. As shown in FIG. 2, assuming that user A wishes to participate in the prediction of the result for event B, the user A can input the prediction result through the mobile phone 21 with the client installed. This prediction result can be obtained by user A in any way, for example, user A performs big data analysis on historical data through a server not shown in FIG. 2, or for example, user A obtains it based on his own experience. This is restricted. 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 can also send the above prediction results to other blockchain nodes in the blockchain. The processing process of these blockchain nodes is similar to the device 22, and reference can be made to the relevant description of the device 22 in this specification. Other users can also predict the result of Event B and send it to device 22 or other blockchain nodes through their own 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 Relevant description of user A. The device 22 can agree on the prediction result input by 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 decentralized database, that is, "on the chain" ". This specification does not limit the type of consensus algorithm used; for example, when the blockchain where the device 22 is located is a consortium 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 publish the prediction results to the blockchain after passing the consensus, so that they are recorded in the blockchain's decentralized database; for example, when the device 22 is located on the blockchain When it is a public chain, the device 22 can compete with other blockchain nodes 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 accounting power Of the blockchain nodes record 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 distributed database of the blockchain. The oracle node 23 can be included in the blockchain, and the oracle node 23 can obtain the data outside the chain (ie, outside the blockchain) and transfer the data out of the chain into the blockchain. For example, the oracle node 23 can obtain the actual result of the event B from outside the chain, and publish the actual result to the blockchain to be recorded in the decentralized database of the blockchain, that is, “on the chain”. In the process of implementing event prediction, there are actually two functional logics: the first is the functional logic 1 used to determine the comparison between the predicted and actual results, and the second is the functional logic to assign the smart asset voucher based on the comparison results 2. For the above 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 in by the oracle node 23 from the blockchain, and compare the prediction result with the actual result to obtain The corresponding comparison results. The device 22 can publish the comparison result to the blockchain, so that the comparison result can be recorded in the decentralized database of the blockchain after consensus. Since both the prediction result and the actual result are published on the blockchain, any blockchain node can confirm the comparison result issued by the device 22 by querying the prediction result and the actual result to ensure that the comparison result is true and effective. For the above function logic 2, a smart contract can be created on the blockchain in advance, and the above function logic 2 is defined in the smart contract, so that after the smart contract is called, it can be automatically assigned to user A according to the comparison result issued by the device 22 Out-of-chain equity certificates, and in this process, human intervention can be avoided to ensure accuracy and validity, making the comparison results objective and accurate. In one embodiment, the smart contract can be invoked by transactions 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 match between the predicted result and the actual result Wait. The device 22 can implement the above smart contract by publishing transactions or calling other smart contracts in the blockchain; or, other smart chain nodes can call the above smart contract, which is not limited in this specification. After being called, the above smart contract can be run on the device 22 to automatically implement the above function logic. For ease of understanding, the functional logic mentioned in the embodiment shown in FIG. 2 will be described in detail in conjunction with FIGS. 3 and 4 below. FIG. 3 is a flowchart of a functional logic for performing prediction on events provided by an exemplary embodiment. As shown in FIG. 3, steps 302 to 306 correspond to the aforementioned functional logic 1, and the functional logic 1 can be realized by the device 22 as a blockchain node, and steps 308A to 310C correspond to the aforementioned functional logic 2, and the functional logic 2 can be Called smart contract implementation; of which: Step 302: Obtain the prediction result of user A from the blockchain. In an embodiment, the prediction result of user A is recorded in a transaction on the blockchain, and the transaction can be marked as related to event B, so that 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 the transaction record of the specific address or the transaction record of the specific serial number. In an embodiment, the prediction results entered by other users are also recorded on the blockchain, and the device 22 may obtain these prediction results in a similar manner, which will not be repeated here. Step 304: Obtain the actual results from the blockchain. In one embodiment, the actual results passed in by the oracle node 23 are recorded in a transaction on the blockchain, and the transaction can be marked as related to event B, so that the device 22 can accordingly extract from the blockchain Find the transaction and get the actual result. For example, the device 22 can obtain the actual result by scanning the transaction record of a specific address or the transaction record of a specific serial number. Step 306: Compare the prediction result of user A with the actual result of event B to determine whether the predicted result is consistent with the actual result. In an embodiment, assume that event B is the only event and does not contain multiple sub-events, so that there are only two cases in which the predicted result and the actual result are the same: the result is consistent or the result is inconsistent. The predicted result and the actual result should have the same data structure in order to facilitate the comparison operation. For example, suppose that event B is the traffic condition of a certain intersection during commuting rush hour. The predicted and actual results can contain a field m, when the field m=0 indicates congestion, when the field m=1 indicates no Crowded and blocked. Step 308A, when the predicted result is consistent with the actual result, it is determined whether the user A has a guarantee certificate. Step 310A, when there is a guarantee certificate, it sends an allocation instruction 1 to the institution C. Step 310B, when there is no guarantee certificate, it sends an allocation instruction 2 to the institution C. In an embodiment, the user A may configure corresponding guarantee vouchers for the prediction result input by himself to guarantee the validity of the prediction result. For example, user A may have a corresponding account a outside of the blockchain, and hold a certain off-chain equity certificate through the account a, by freezing at least a part of the off-chain equity certificate in the account a, as The above-mentioned guarantee certificate; for example, the account a can temporarily transfer the at least a part of the off-chain equity certificate to a dedicated certificate freezing account, or the account a can be added to the at least a part of the off-chain equity certificate with a frozen logo, etc., This manual does not limit this. In this embodiment, the guarantee certificate is not necessary: if there is a guarantee certificate, the allocation 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, if there is no guarantee certificate, the guarantee certificate can be sent to the institution C Send allocation instruction 2 to make the organization C allocate the off-chain equity certificate S2 to user A; where the equity represented by the off-chain equity certificate S1 should be greater than the equity represented by the off-chain equity certificate S2, to indicate that the user A is provided with a guarantee certificate Incentives, and makes user A hold more off-chain equity certificates, which indicates that user A's prediction ability becomes stronger or the prediction accuracy increases. Among them, the equity represented by the off-chain equity certificate S1, S2 can be a fixed value, or the equity represented by the off-chain equity certificate S1, S2 can be positively correlated with the equity represented by the security certificate, that is, the equity represented by the security certificate The larger/more, the larger/more the equity represented by the off-chain equity certificates S1, S2. In one embodiment, in order to prevent user A from randomly publishing the prediction result for event B and ensuring that the prediction result is meaningful, a certain threshold may be set for participating user B's result prediction, for example, requiring user A to provide a guarantee certificate. Therefore, in the case where there is a guarantee certificate, the off-chain equity certificate S1 can be allocated to user A to represent a certain interest; and when there is no guarantee certificate, the off-chain equity certificate allocated to user A The equity certificate S2 cannot represent any equity, which is equivalent to not allocating any off-chain equity certificate, so the participation of user A will be meaningless. Step 308B, when the predicted result is inconsistent with the actual result, it is determined whether the user A has a guarantee certificate. Step 310C, when there is a guarantee certificate, the guarantee certificate is deducted. In one 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 may be deducted from the guarantee certificate so that user A terminates holding the off-chain equity certificate corresponding to the guarantee certificate Then, the off-chain equity certificate held by user A decreases, indicating that the prediction ability of user A is weak or the prediction accuracy is reduced. In an embodiment, the guarantee voucher corresponding to user A may have a manager, such as an account management system, etc. The smart contract may send a deduction instruction to the manager so that the manager deducts the corresponding guarantee in response to the deduction instruction certificate. FIG. 4 is a flowchart of another functional logic for performing prediction on events provided by an exemplary embodiment. As shown in FIG. 4, steps 402 to 406 correspond to the aforementioned functional logic 1, and the functional logic 1 can be realized by the device 22 as a blockchain node, and steps 408A to 410D correspond to the aforementioned functional logic 2, and the functional logic 2 can be Called smart contract implementation; of which: Step 402: Obtain the prediction result of user A from the blockchain. Step 404: Obtain the actual result from the blockchain. In an embodiment, for steps 402 to 404, reference may be made to steps 302 to 304 shown in FIG. 3, which will not be repeated here. In step 406, the predicted result of user A is compared with the actual result of event B to generate a corresponding comparison result. In an embodiment, assume that event B contains multiple sub-events. If the prediction result of user A accurately predicts all sub-events, the prediction result is exactly the same as the actual result; and if user A only accurately predicts some sub-events Results, or User A itself has only implemented predictions for some sub-events, then the predicted 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, then the predicted results and the actual results are completely Not consistent. In an embodiment, the predicted result and the actual result should have the same data structure in order to facilitate the comparison operation. For example, assuming that event B is the traffic condition of a certain intersection during commuting rush hours, the predicted and actual results may contain fields m1 and m2, respectively, the m1 field represents the traffic condition during the morning rush hour, and m2 represents the traffic condition during the evening rush hour , When the field m1=0, it means congestion and congestion during the morning rush hour, when the field m1=1, it means there is no congestion and congestion during the morning rush hour, when the field m2=0, it means congestion and congestion during the evening rush hour, when the field m2=1 Shi indicates that there is no congestion during the peak night. Step 408A, when the prediction result is completely consistent with the actual result, it is determined whether the user A has a guarantee certificate. Step 410A, when there is a guarantee certificate, it sends an allocation instruction 1 to the institution C. Step 410B, when there is no guarantee certificate, it sends an allocation instruction 2 to the institution C. In an embodiment, for step 408A, step 410A and step 410B, reference may be made to step 308A, step 310A and step 310B shown in FIG. 3, which will not be repeated here. Step 408B, when the predicted result is completely inconsistent with the actual result, if there is a guarantee certificate, the guarantee certificate is deducted. In an embodiment, similar to the embodiment shown in FIG. 3, the user A may configure corresponding guarantee credentials for the prediction result input by himself 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, you can deduct the guarantee certificate to make user A terminate the holding of the off-chain equity certificate corresponding to the guarantee certificate, then the user The off-chain equity certificate held by A decreases, indicating that the prediction ability of the user A is weak or the prediction accuracy is reduced. Step 408C, when the predicted result is partially consistent with the actual result, it is determined whether the user A has a guarantee certificate. Step 410A, when there is a guarantee certificate, it sends an allocation instruction 3 to the institution C. Step 410B, when there is no guarantee certificate, it sends an allocation instruction 4 to the institution C. In an embodiment, similar to steps 410A to 410B, when the prediction result is partially consistent with the actual result, it indicates that user A has a certain degree of prediction ability, so out of the labeling of this part of prediction ability, and for user A Incentives can send allocation instruction 3 or allocation instruction 4 to institution C, so that institution C allocates a certain off-chain equity certificate to user A. In this embodiment, the guarantee certificate is not necessary: if there is a guarantee certificate, user A can be assigned an off-chain equity certificate S3, if there is no guarantee certificate, user A can be assigned an off-chain equity certificate S4; The size of the rights and interests: S1>S3>S4, S1>S2>S4. In an embodiment, the rights and interests represented by the off-chain equity certificates S1 and S3 can be fixed values corresponding to each, or the rights and interests represented by the off-chain equity certificates S1 and S3 can be positively correlated with the rights and interests represented by the guarantee certificate, respectively. That is, when the equity represented by the security certificate is larger/more, the equity represented by the smart asset certificates S1, S3 will be larger/more. In one embodiment, in order to prevent user A from randomly publishing the prediction result for event B and ensuring that the prediction result is meaningful, a certain threshold may be set for participating user B's result prediction, for example, requiring user A to provide a guarantee certificate. Therefore, in the case where there is a guarantee certificate, the off-chain equity certificate S3 can be allocated to user A, and the off-chain equity certificate S3 is used to characterize a certain interest; and when there is no guarantee certificate, the off-chain equity certificate allocated to user A The equity certificate S4 cannot represent any equity, which is equivalent to not allocating any off-chain equity certificate, so the participation of user A will be meaningless. In an embodiment, because 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 its prediction Ability or prediction accuracy, that is, when more off-chain equity certificates are held or the greater the equity represented, it indicates that the prediction ability of user A is stronger or the prediction accuracy is higher. Among them, user A can also use the off-chain equity certificate for other aspects. For example, some blockchain nodes in the blockchain can play the role of anchors, and can convert 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 , Stock certificates, deposit certificates, etc., this manual does not restrict this. When the off-chain equity certificate is used to characterize the user's predictive ability, only the off-chain equity certificate can be converted into a smart asset certificate, and the conversion of the smart asset certificate into an off-chain equity certificate is restricted; of course, if there are also The first type of off-chain equity certificates with predictive capabilities and the second type of off-chain equity certificates that are not used to characterize the user's predictive capabilities can restrict the conversion of smart asset certificates to the first type of off-chain equity certificates, while allowing the off-chain equity certificates Converted to the second type of off-chain equity certificate. In the embodiment shown in FIGS. 3 to 4, when the institution C receives the allocation instructions 1 to 4, it may not allocate the off-chain equity certificate S1 to S4 to the user A for various reasons, such as the institution C holds The off-chain equity certificate is not sufficient to respond to the allocation instructions 1~4 (that is, the out-of-chain equity certificate held by Institution C is less than/less than the off-chain equity certificate S1~S4) or other reasons. In order to avoid the above situation and ensure that user A can successfully obtain the off-chain equity certificates S1~S4, before initiating the prediction for event B, it can first be determined that at least a part of the off-chain equity certificates held by institution C will be frozen, for example, it can be frozen At the designated management party (such as a third-party financial platform), and the oracle node 23 can transfer the corresponding frozen result to the blockchain, then the above 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 distribution instructions 1~4 are sent to the institution C, the oracle node 23 can transfer the allocation of the institution C to the off-chain equity certificates S1~S4 to the blockchain, and the device 22 can call the off-chain equity certificate Assigned smart contract, the smart contract can send a mandatory distribution instruction to the above-mentioned manager, so that the manager unfreezes the frozen off-chain equity certificate, and assigns the corresponding off-chain equity certificate to user A. This process is not affected by the organization C bound. FIG. 5 is a schematic structural diagram of a device provided by 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 include hardware required for other businesses. 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 at 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 hardware and software, that is to say, the execution body of the following processing flow is not limited to each The logic unit may also be hardware or logic device. Please refer to FIG. 6, in the software implementation, the event prediction device is applied to the blockchain node; the device may include: The obtaining unit 61 obtains the prediction result input by the participant for the specified event published on the blockchain, and the input time of the prediction result is earlier than the occurrence time of the actual result of the specified event; The comparison unit 62 publishes the corresponding comparison result to the blockchain by comparing the predicted result with the actual result; The first calling unit 63 calls the smart contract used for asset allocation in the blockchain, and the smart contract is used to read the comparison result to send an allocation instruction to the off-chain object according to the comparison result. The allocation instruction is used to instruct the off-chain object to allocate the 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 the oracle node in the blockchain; Alternatively, the actual result is read from the blockchain by the smart contract, and the actual result is published on the blockchain by any blockchain node in the blockchain after consensus . Optionally, the specified 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 indicate When the prediction result predicts that the result of the one or more sub-events is correct, the allocation instruction is sent to the off-chain object. Optionally, the specified 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: 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 prediction result; Wherein, the smart contract is used to send a deduction instruction to the manager of the guarantee voucher when the predicted result does not match the actual result, so as to release the participant's holding of 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 there is no corresponding guarantee certificate for the participant. Optionally, the off-chain equity certificate includes at least one of the following: membership points, coupons, exchange coupons, and coupons. Optionally, the calling condition of the smart contract includes: 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: The second calling unit 65 calls a smart contract for distributing off-chain equity certificates. The smart contract for distributing off-chain equity certificates does not allocate the first off-chain equity certificate to the off-chain object In the case of the participant, 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 frozen third off-chain equity certificate and distribute it to the participants. The system, device, module or unit explained in the above embodiments may be implemented by a computer chip or entity, or by 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, wearable device, or any combination of these devices. In a typical configuration, a computer includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory. Memory may include non-permanent storage in computer-readable media, random access memory (RAM) and/or non-volatile memory, such as read only memory (ROM) or flash memory (flash) RAM). Memory is an example of computer-readable media. Computer-readable media, including permanent and non-permanent, removable and non-removable media, can store information by any method or technology. The information can be computer readable instructions, data structures, modules of programs, 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) , Read-only memory (ROM), electrically erasable and programmable read-only memory (EEPROM), flash memory or other memory technologies, read-only disc read-only memory (CD-ROM), digital multifunction Optical discs (DVD) or other optical storage, magnetic tape cassettes, magnetic disk storage, quantum storage, graphene-based storage media or other magnetic storage devices or any other non-transmission media can be used to store those that can be accessed by computing devices News. According to the definition in this article, computer-readable media does not include temporary computer-readable media (transitory media), such as modulated data signals and carrier waves. It should also be noted that the terms "include", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device that includes a series of elements includes not only those elements, but also includes Other elements not explicitly listed, or include elements inherent to this process, method, commodity, or equipment. Without more restrictions, the element defined by the sentence "include one..." does not exclude that there are other identical elements in the process, method, commodity, or equipment that includes the element. The foregoing describes specific embodiments of the present specification. Other embodiments are within the scope of the attached patent application. In some cases, the actions or steps described in the scope of the patent application may be performed in a different order than in the embodiment and still achieve the desired result. Additionally, the processes depicted in the drawings do not necessarily require the particular order shown or sequential order to achieve the desired results. In some embodiments, multiplexing 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", "said" and "the" used in the scope of one or more embodiments of the present specification and the appended patent applications are also intended to include most forms unless the context clearly indicates other meanings. 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 associated listed items. It should be understood that although one or more embodiments in this specification may use the terms first, second, third, etc. to describe various information, 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 this 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 may be interpreted as "when" or "when" or "in response to a determination". The above are only preferred embodiments of one or more embodiments of this specification, and are not intended to limit one or more embodiments of this specification. Anything within the spirit and principle of one or more embodiments of this specification, Any modifications, equivalent replacements, improvements, etc., should be included within the scope of protection of one or more embodiments of this specification.

21‧‧‧手機 22‧‧‧設備 23‧‧‧預言機節點 61‧‧‧獲取單元 62‧‧‧比較單元 63‧‧‧第一調用單元 64‧‧‧確定單元 65‧‧‧第二調用單元 102‧‧‧步驟 104‧‧‧步驟 106‧‧‧步驟 302‧‧‧步驟 304‧‧‧步驟 306‧‧‧步驟 308A‧‧‧步驟 308B‧‧‧步驟 310A‧‧‧步驟 310B‧‧‧步驟 310C‧‧‧步驟 402‧‧‧步驟 404‧‧‧步驟 406‧‧‧步驟 408A‧‧‧步驟 408C‧‧‧步驟 408D‧‧‧步驟 410A‧‧‧步驟 410B‧‧‧步驟 410C‧‧‧步驟 410D‧‧‧步驟 502‧‧‧處理器 504‧‧‧內部匯流排 506‧‧‧網路介面 508‧‧‧記憶體 510‧‧‧非揮發性儲存器21‧‧‧Mobile 22‧‧‧Equipment 23‧‧‧ Oracle node 61‧‧‧ acquisition unit 62‧‧‧Comparative unit 63‧‧‧First calling unit 64‧‧‧Determine unit 65‧‧‧Second calling unit 102‧‧‧Step 104‧‧‧Step 106‧‧‧Step 302‧‧‧Step 304‧‧‧Step 306‧‧‧Step 308A‧‧‧Step 308B‧‧‧Step 310A‧‧‧Step 310B‧‧‧Step 310C‧‧‧Step 402‧‧‧Step 404‧‧‧Step 406‧‧‧Step 408A‧‧‧Step 408C‧‧‧Step 408D‧‧‧Step 410A‧‧‧Step 410B‧‧‧Step 410C‧‧‧Step 410D‧‧‧Step 502‧‧‧ processor 504‧‧‧Internal bus 506‧‧‧Web interface 508‧‧‧Memory 510‧‧‧Non-volatile storage

圖1是一示例性實施例提供的一種事件預測方法的流程圖。 圖2是一示例性實施例提供的一種預測事件結果的示意圖。 圖3是一示例性實施例提供的一種針對事件實施預測的功能邏輯的流程圖。 圖4是一示例性實施例提供的另一種針對事件實施預測的功能邏輯的流程圖。 圖5是一示例性實施例提供的一種設備的結構示意圖。 圖6是一示例性實施例提供的一種事件預測裝置的方塊圖。FIG. 1 is a flowchart of an event prediction method provided by an exemplary embodiment. FIG. 2 is a schematic diagram of a predicted event result provided by an exemplary embodiment. FIG. 3 is a flowchart of a functional logic for performing prediction on events provided by an exemplary embodiment. FIG. 4 is a flowchart of another functional logic for performing prediction on events provided by an exemplary embodiment. FIG. 5 is a schematic structural diagram of an apparatus provided by an exemplary embodiment. 6 is a block diagram of an event prediction apparatus provided by an exemplary embodiment.

Claims (21)

一種事件預測方法,應用於區塊鏈節點;所述方法包括: 獲取區塊鏈上發佈的由參與方針對指定事件輸入的預測結果,所述預測結果的輸入時刻早於所述指定事件的實際結果的發生時刻; 通過對所述預測結果與所述實際結果進行比較,向所述區塊鏈發佈相應的比較結果; 調用所述區塊鏈中用於資產分配的智慧合約,所述智慧合約用於讀取所述比較結果,以根據所述比較結果向鏈外對象發送分配指令,所述分配指令用於指示所述鏈外對象向所述參與方分配第一鏈外權益憑證。An event prediction method applied to blockchain nodes; the method includes: Obtain the prediction result published by the participant for the specified event published on the blockchain, and the input time of the prediction result is earlier than the moment of the actual result of the specified event; Publish the corresponding comparison results to the blockchain by comparing the predicted results with the actual results; Invoke 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 indicate The off-chain object distributes the first off-chain equity certificate to the participant. 根據請求項1所述的方法, 所述實際結果由所述智慧合約從所述區塊鏈上讀取,所述實際結果由所述區塊鏈中的預言機節點發佈至所述區塊鏈上; 或者,所述實際結果由所述智慧合約從所述區塊鏈上讀取,所述實際結果經共識後由所述區塊鏈中的任一區塊鏈節點發佈至所述區塊鏈上。According to the method described in claim 1, The actual result is read from the blockchain by the smart contract, and the actual result is published on the blockchain by the oracle node in the blockchain; Alternatively, the actual result is read from the blockchain by the smart contract, and the actual result is published on the blockchain by any blockchain node in the blockchain after consensus . 根據請求項1所述的方法,所述指定事件包括一個或多個子事件,所述預測結果用於對所述一個或多個子事件分別進行結果預測;其中,所述智慧合約被用於在所述比較結果表明所述預測結果對所述一個或多個子事件的結果預測均正確的情況下,向所述鏈外對象發送所述分配指令。According to the method of claim 1, the specified 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 in all When the comparison result indicates that the prediction result predicts the result of the one or more sub-events to be correct, the allocation instruction is sent to the off-chain object. 根據請求項1所述的方法,所述指定事件包括多個子事件;所述第一鏈外權益憑證對應的權益大小正相關於被所述預測結果準確預測的子事件在所述多個子事件中的占比。According to the method of claim 1, 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 Of the proportion. 根據請求項1所述的方法,還包括: 確定所述參與方持有的第二鏈外權益憑證被凍結,以作為用於擔保所述預測結果的有效性的擔保憑證; 其中,所述智慧合約用於在所述預測結果不匹配於所述實際結果的情況下向所述擔保憑證的管理方發送扣除指令,以解除所述參與方對所述擔保憑證的持有關係。The method according to claim 1, further comprising: Determining 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 when the predicted result does not match the actual result, so as to release the participant's holding of the guarantee voucher . 根據請求項5所述的方法,所述第一鏈外權益憑證所表徵的權益大小與所述擔保憑證表徵的權益大小呈正相關。According to the method of claim 5, 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. 根據請求項5所述的方法,所述智慧合約用於在所述參與方不存在對應的擔保憑證的情況下,判定所述參與方對應的預測結果無效。According to the method of claim 5, the smart contract is used to determine that the prediction result corresponding to the participant is invalid if the participant does not have a corresponding guarantee certificate. 根據請求項1所述的方法,所述鏈外權益憑證包括以下至少之一:會員積分、優惠券、兌換券、抵價券。According to the method of claim 1, the off-chain equity certificate includes at least one of the following: member points, coupons, exchange coupons, and coupons. 根據請求項1所述的方法,所述智慧合約的調用條件包括:所述鏈外對象持有的第三鏈外權益憑證被凍結,且凍結的鏈外權益憑證足夠對所述分配指令進行響應。According to the method of claim 1, 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 . 根據請求項9所述的方法,還包括: 調用用於分配鏈外權益憑證的智慧合約,所述用於分配鏈外權益憑證的智慧合約在所述鏈外對象未將所述第一鏈外權益憑證分配至所述參與方的情況下向所述第三鏈外權益憑證的管理方發送強制分配指令,以從被凍結的所述第三鏈外權益憑證中獲取所述第一鏈外權益憑證並分配至所述參與方。The method according to claim 9, further comprising: Invoking a smart contract for distributing off-chain equity certificates. The smart contract for distributing off-chain equity certificates will be sent to the participant if the off-chain object does not allocate the first off-chain equity certificate to the participant. 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 off-chain equity certificate and distribute it to the participants. 一種事件預測裝置,應用於區塊鏈節點;所述裝置包括: 獲取單元,獲取區塊鏈上發佈的由參與方針對指定事件輸入的預測結果,所述預測結果的輸入時刻早於所述指定事件的實際結果的發生時刻; 比較單元,通過對所述預測結果與所述實際結果進行比較,向所述區塊鏈發佈相應的比較結果; 第一調用單元,調用所述區塊鏈中用於資產分配的智慧合約,所述智慧合約用於讀取所述比較結果,以根據所述比較結果向鏈外對象發送分配指令,所述分配指令用於指示所述鏈外對象向所述參與方分配第一鏈外權益憑證。An event prediction device applied to blockchain nodes; the device includes: The obtaining unit obtains the prediction result input by the participant for the specified event published on the blockchain, and the input time of the prediction result is earlier than the occurrence time of the actual result of the specified event; A comparison unit, by comparing the predicted result with the actual result, and publishing a corresponding comparison result to the blockchain; The first calling unit calls a smart contract for asset allocation in the blockchain, and the smart contract is used to read the comparison result to send an allocation instruction to an object outside the chain according to the comparison result, the allocation The instruction is used to instruct the off-chain object to allocate the first off-chain equity certificate to the participant. 根據請求項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 the oracle node in the blockchain; Alternatively, the actual result is read from the blockchain by the smart contract, and the actual result is published on the blockchain by any blockchain node in the blockchain after consensus . 根據請求項11所述的裝置,所述指定事件包括一個或多個子事件,所述預測結果用於對所述一個或多個子事件分別進行結果預測;其中,所述智慧合約被用於在所述比較結果表明所述預測結果對所述一個或多個子事件的結果預測均正確的情況下,向所述鏈外對象發送所述分配指令。The apparatus according to claim 11, the specified event includes one or more sub-events, and the prediction result is used to predict the result of the one or more sub-events respectively; wherein, the smart contract is used in all When the comparison result indicates that the prediction result predicts the result of the one or more sub-events to be correct, the allocation instruction is sent to the off-chain object. 根據請求項11所述的裝置,所述指定事件包括多個子事件;所述第一鏈外權益憑證對應的權益大小正相關於被所述預測結果準確預測的子事件在所述多個子事件中的占比。The apparatus according to claim 11, the specified event includes 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 in the plurality of sub-events Of the proportion. 根據請求項11所述的裝置,還包括: 確定單元,確定所述參與方持有的第二鏈外權益憑證被凍結,以作為用於擔保所述預測結果的有效性的擔保憑證; 其中,所述智慧合約用於在所述預測結果不匹配於所述實際結果的情況下向所述擔保憑證的管理方發送扣除指令,以解除所述參與方對所述擔保憑證的持有關係。The device according to claim 11, further comprising: The determining unit determines that the second off-chain equity certificate held by the participant is frozen as a guarantee certificate for guaranteeing the validity of the prediction result; Wherein, the smart contract is used to send a deduction instruction to the manager of the guarantee voucher when the predicted result does not match the actual result, so as to release the participant's holding of the guarantee voucher . 根據請求項15所述的裝置,所述第一鏈外權益憑證所表徵的權益大小與所述擔保憑證表徵的權益大小呈正相關。According to the apparatus of 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. 根據請求項15所述的裝置,所述智慧合約用於在所述參與方不存在對應的擔保憑證的情況下,判定所述參與方對應的預測結果無效。According to the apparatus of claim 15, the smart contract is used to determine that the prediction result corresponding to the participant is invalid if the participant does not have a corresponding guarantee certificate. 根據請求項11所述的裝置,所述鏈外權益憑證包括以下至少之一:會員積分、優惠券、兌換券、抵價券。According to the device of claim 11, the off-chain equity certificate includes at least one of the following: member points, coupons, exchange coupons, and coupons. 根據請求項11所述的裝置,所述智慧合約的調用條件包括:所述鏈外對象持有的第三鏈外權益憑證被凍結,且凍結的鏈外權益憑證足夠對所述分配指令進行響應。According to the device of claim 11, 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 . 根據請求項19所述的裝置,還包括: 第二調用單元,調用用於分配鏈外權益憑證的智慧合約,所述用於分配鏈外權益憑證的智慧合約在所述鏈外對象未將所述第一鏈外權益憑證分配至所述參與方的情況下向所述第三鏈外權益憑證的管理方發送強制分配指令,以從被凍結的所述第三鏈外權益憑證中獲取所述第一鏈外權益憑證並分配至所述參與方。The device according to claim 19, further comprising: The second calling unit calls a smart contract for distributing off-chain equity certificates, and the smart contract for distributing off-chain equity certificates does not allocate the first off-chain equity certificate to the participants in the off-chain object In the case of the third party, 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 frozen third-chain equity certificate and distribute it to the participants square. 一種電子設備,包括: 處理器; 用於儲存處理器可執行指令的儲存器; 其中,所述處理器通過運行所述可執行指令以實現如請求項1至10中任一項所述的事件預測方法。An electronic device, including: processor; A memory for storing executable instructions of the processor; Wherein, the processor executes the executable instruction to implement the event prediction method according to any one of request items 1 to 10.
TW108101994A 2018-07-27 2019-01-18 Event prediction method and device, electronic equipment TWI718472B (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 (2)

Publication Number Publication Date
TW202008229A true TW202008229A (en) 2020-02-16
TWI718472B TWI718472B (en) 2021-02-11

Family

ID=64847950

Family Applications (1)

Application Number Title Priority Date Filing Date
TW108101994A TWI718472B (en) 2018-07-27 2019-01-18 Event prediction method and device, electronic equipment

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

Family Cites Families (12)

* 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
CN105976231A (en) * 2016-06-24 2016-09-28 深圳前海微众银行股份有限公司 Asset management method based on intelligent block chain contracts and nodes
TWM543413U (en) * 2016-12-05 2017-06-11 Taiwan United Financial Technology Co Ltd Web lending platform using technology of blockchain for deal
US10318979B2 (en) * 2016-12-26 2019-06-11 International Business Machines Corporation Incentive-based crowdvoting using a blockchain
CN107038638A (en) * 2017-02-24 2017-08-11 杭州象链网络技术有限公司 A kind of equity registration transaction system construction method based on alliance's chain
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
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

Also Published As

Publication number Publication date
TWI718472B (en) 2021-02-11
WO2020019785A1 (en) 2020-01-30
CN109102113A (en) 2018-12-28

Similar Documents

Publication Publication Date Title
TWI718472B (en) Event prediction method and device, electronic equipment
US11087372B2 (en) Benefit allocation method, apparatus, and electronic device
TWI729345B (en) Event prediction method and device, electronic equipment
TWI706340B (en) Event prediction method and device, electronic equipment
US10678598B2 (en) Enforcing compute equity models in distributed blockchain
US11030681B2 (en) Intermediate blockchain system for managing transactions
TWI771618B (en) Method and device for distribution of copyright of works based on blockchain
US11057225B2 (en) Enforcing compute equity models in distributed blockchain
US10657526B2 (en) System and method to dynamically setup a private sub-blockchain based on agility of transaction processing
US11854405B2 (en) Performing vehicle logistics in a blockchain
CN110166442B (en) Data processing method and device based on block chain
US10609032B2 (en) Enforcing compute equity models in distributed blockchain
WO2020082873A1 (en) Object selection method and device and electronic device
WO2020125218A1 (en) Claim settlement method and apparatus employing blockchain technology
US11615078B2 (en) Blockchain-based transaction methods
US11489662B2 (en) Special relationships in a blockchain
CN113037817B (en) Method and device for starting intelligent contract, electronic equipment and storage medium
WO2020125233A1 (en) Field updating method and device and electronic apparatus
CN111078745A (en) Data uplink method and device based on block chain technology
WO2020119293A1 (en) Content pushing method and apparatus, and electronic device
WO2020108128A1 (en) Asset distribution method and device and electronic device
CN113821817B (en) Data processing method, device, equipment and system based on block chain
TWI706341B (en) Event prediction method and device, electronic equipment
TW202016807A (en) Event prediction method and device and electronic equipment
CN116595571A (en) Block chain-based carbon data management method, device and equipment