TWI706340B - Event prediction method and device, electronic equipment - Google Patents

Event prediction method and device, electronic equipment Download PDF

Info

Publication number
TWI706340B
TWI706340B TW108101992A TW108101992A TWI706340B TW I706340 B TWI706340 B TW I706340B TW 108101992 A TW108101992 A TW 108101992A TW 108101992 A TW108101992 A TW 108101992A TW I706340 B TWI706340 B TW I706340B
Authority
TW
Taiwan
Prior art keywords
chain
result
equity
certificate
blockchain
Prior art date
Application number
TW108101992A
Other languages
Chinese (zh)
Other versions
TW202008228A (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 TW202008228A publication Critical patent/TW202008228A/en
Application granted granted Critical
Publication of TWI706340B publication Critical patent/TWI706340B/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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange

Landscapes

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

Abstract

本說明書一個或多個實施例提供一種事件預測方法及裝置、電子設備,應用於區塊鏈節點;所述方法包括:確定參與方針對指定事件輸入的預測結果被發佈至區塊鏈,所述預測結果的輸入時刻早於所述指定事件的實際結果的發生時刻;調用用於評價預測情況的智慧合約,所述智慧合約被用於讀取所述預測結果和所述實際結果,並對所述預測結果與所述實際結果進行比較,以根據比較結果向鏈外對象發送分配指令,所述分配指令用於指示所述鏈外對象向所述參與方分配第一鏈外權益憑證。One or more embodiments of this specification provide an event prediction method and device, and electronic equipment, applied to a blockchain node; the method includes: determining that the prediction result input by a participant for a specified event is published to the blockchain, the The input time of the prediction result is earlier than the time when the actual result of the specified event occurs; the smart contract for evaluating the prediction situation is called, and the smart contract is used to read the prediction result and the actual result, and to The prediction result is compared with the actual result to send an allocation instruction to the off-chain object according to the comparison result, and the allocation instruction is used to instruct the off-chain object to allocate the first off-chain equity certificate 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 unfinished event, it is often necessary to wait for the completion of the event before the result of the event can be accurately known. 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, or determining whether the processing plan of the associated event needs to be adjusted based on the result of the event. In related technologies, event results can be predicted in a variety of ways, such as predictive analysis based on historical data, and predictive analysis based on a predictive model trained on samples. Due to differences in the prediction data used, the prediction method used, the prediction environment, etc., different participants often get different prediction results when participating in the result prediction for the same event, and even large deviations. .

有鑑於此,本說明書一個或多個實施例提供一種事件預測方法及裝置、電子設備。 為實現上述目的,本說明書一個或多個實施例提供技術方案如下: 根據本說明書一個或多個實施例的第一態樣,提出了一種事件預測方法,應用於區塊鏈節點;所述方法包括: 確定參與方針對指定事件輸入的預測結果被發佈至區塊鏈,所述預測結果的輸入時刻早於所述指定事件的實際結果的發生時刻; 調用用於評價預測情況的智慧合約,所述智慧合約被用於讀取所述預測結果和所述實際結果,並對所述預測結果與所述實際結果進行比較,以根據比較結果向鏈外對象發送分配指令,所述分配指令用於指示所述鏈外對象向所述參與方分配第一鏈外權益憑證。 根據本說明書一個或多個實施例的第二態樣,提出了一種事件預測裝置,應用於區塊鏈節點;所述裝置包括: 發佈確定單元,確定參與方針對指定事件輸入的預測結果被發佈至區塊鏈,所述預測結果的輸入時刻早於所述指定事件的實際結果的發生時刻; 合約調用單元,調用用於評價預測情況的智慧合約,所述智慧合約被用於讀取所述預測結果和所述實際結果,並對所述預測結果與所述實際結果進行比較,以根據比較結果向鏈外對象發送分配指令,所述分配指令用於指示所述鏈外對象向所述參與方分配第一鏈外權益憑證。 根據本說明書一個或多個實施例的第三態樣,提出了一種電子設備,包括: 處理器; 用於儲存處理器可執行指令的儲存器; 其中,所述處理器通過運行所述可執行指令以實現如上述實施例中任一所述的事件預測方法。In view of this, one or more embodiments of this specification provide an event prediction method and device, and electronic equipment. To achieve the foregoing objectives, 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: It is determined that the prediction result input by the participant for the specified event is published to the blockchain, and the input time of the prediction result is earlier than the occurrence time of the actual result of the specified event; Invoke a smart contract used to evaluate the prediction situation, the smart contract is used to read the prediction result and the actual result, and compare the prediction result with the actual result, so as to send out the chain according to the comparison result The object sends an allocation instruction, where the allocation instruction is used to instruct the off-chain object to allocate the first off-chain equity certificate to the participant. According to the 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: A release determination unit, which determines that the prediction result input by the participant for a specified event is released to 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 contract calling unit calls a smart contract used to evaluate the prediction situation, the smart contract is used to read the prediction result and the actual result, and compare the prediction result with the actual result to compare As a result, an allocation instruction is sent to the off-chain object, where the allocation 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 storage for storing processor executable instructions; Wherein, the processor executes the executable instruction to implement the event prediction method as described in any of the foregoing embodiments.

這裡將詳細地對示例性實施例進行說明,其示例表示在圖式中。下面的描述涉及圖式時,除非另有表示,不同圖式中的相同數字表示相同或相似的要素。以下示例性實施例中所描述的實施方式並不代表與本說明書一個或多個實施例相一致的所有實施方式。相反,它們僅是與如所附申請專利範圍中所詳述的、本說明書一個或多個實施例的一些態樣相一致的裝置和方法的例子。 需要說明的是:在其他實施例中並不一定按照本說明書示出和描述的順序來執行相應方法的步驟。在一些其他實施例中,其方法所包括的步驟可以比本說明書所描述的更多或更少。此外,本說明書中所描述的單個步驟,在其他實施例中可能被分解為多個步驟進行描述;而本說明書中所描述的多個步驟,在其他實施例中也可能被合併為單個步驟進行描述。 圖1是一示例性實施例提供的一種事件預測方法的流程圖。圖1所示,該方法應用於區塊鏈節點,可以包括以下步驟: 步驟102,確定參與方針對指定事件輸入的預測結果被發佈至區塊鏈,所述預測結果的輸入時刻早於所述指定事件的實際結果的發生時刻。 在一實施例中,通過在區塊鏈的客戶端上創建交易(transfer),可以通過該交易將參與方輸入的預測結果發佈至區塊鏈上,成為區塊鏈的分散式資料庫中的一筆資料。 需要指出的是:區塊鏈中的交易,存在狹義的交易以及廣義的交易之分。狹義的交易是指用戶向區塊鏈發佈的一筆價值轉移;例如,在傳統的比特幣區塊鏈網路中,交易可以是用戶在區塊鏈中發起的一筆轉帳。而廣義的交易是指用戶向區塊鏈發佈的一筆具有業務意圖的業務資料;例如,運營方可以基於實際的業務需求搭建一個聯盟鏈,依託於聯盟鏈部署一些與價值轉移無關的其它類型的線上業務(比如,事件預測、租房業務、車輛調度業務、保險理賠業務、信用服務、醫療服務等),而在這類聯盟鏈中,交易可以是用戶在聯盟鏈中發佈的一筆具有業務意圖的業務訊息或者業務請求。本說明書中的交易,應當傾向於理解為廣義上的交易。 在一實施例中,由於區塊鏈採用分散式資料庫,使得發佈至區塊鏈上的預測結果無法被篡改,可以確保預測結果真實、可靠。 在一實施例中,參與方輸入的預測結果可由上述的區塊鏈節點向區塊鏈發佈。在另一實施例中,參與方輸入的預測結果可由區別於上述區塊鏈節點的其他區塊鏈節點向區塊鏈發佈,而上述區塊鏈節點可以獲知與該預測結果相關的資訊,還可以將該預測結果(或該預測結果的哈希值)記錄在該區塊鏈節點維護的本地資料庫(即區塊鏈帳本)中。 在一實施例中,一個或多個參與方可以對同一事件進行預測,使得區塊鏈上可以存在分別對應於各個參與方的預測結果;其中,每一參與方可以存在對應的唯一標識,使得每一參與方發佈的預測結果可以與其唯一標識進行關聯,以便於對區塊鏈上發佈的各個預測結果進行有效區分。 在一實施例中,指定事件為被指明確定需要進行結果預測的任意事件,比如某一路口的交通狀況、某一地區的水稻收成、某一海域的颱風形成時間等,本說明書並不對此進行限制。 在一實施例中,預測結果的輸入時刻應當早於指定事件的實際結果的發生時刻,該輸入時刻可以被記錄在區塊鏈中包含該預測結果的交易中,或者可以直接將該交易的創建時刻作為該輸入時刻。在一種情況下,當該指定事件為瞬時事件時,即該指定事件從起始時刻至結束時刻之間的時間段很短,不足以使得參與方在該時間段內輸入預測結果,參與方可以在實際結果的發生時刻之前的任意時刻輸入預測結果。在另一種情況下,當該指定事件為非瞬時事件時,即參與方可以在該指定事件的起始時刻至結束時刻之間的時間段內輸入預測結果,可以限制參與方在該指定事件的起始時刻之後輸入預測結果。 步驟104,調用用於評價預測情況的智慧合約,所述智慧合約被用於讀取所述預測結果和所述實際結果,並對所述預測結果與所述實際結果進行比較,以根據比較結果向鏈外對象發送分配指令,所述分配指令用於指示所述鏈外對象向所述參與方分配第一鏈外權益憑證。 在一實施例中,智慧合約中可以預先寫入對預測結果與實際結果進行比較的處理邏輯,以及基於比較結果發送分配指令的處理邏輯,使得智慧合約可以基於讀取的預測結果和實際結果而自動確定是否需要發送分配指令;其中,由於智慧合約上的處理邏輯為公開內容,並且整個處理過程由智慧合約自動完成、不存在人工干預,使得無論是對預測結果和實際結果的比較還是對分配指令的發送,都能夠確保客觀、公正。 在一實施例中,當預測結果與實際結果相匹配時,表明提供該預測結果的參與方對於上述指定事件的結果預測具有一定的準確度。那麼,通過向鏈外對象發送分配指令、使得該鏈外對象向參與方分配第一鏈外權益憑證,可以控制各個參與方對於鏈外權益憑證的持有量,從而在一定程度上對於各個參與方實現標記作用:持有鏈外權益憑證越多的參與方對於事件結果的預測能力越強,因而在後續的事件預測過程中,能夠據此快速篩選出預測能力強的參與方,以從這些參與方處獲得可能相對更加準確的預測結果。 在一實施例中,鏈外權益憑證用於表徵一定的權益,以實現對參與方準確預測上述指定事件的激勵,有助於該參與方繼續參與對後續事件的預測,從而實現良性循環。比如參與方在區塊鏈上實施預設操作時,譬如該預設操作可以包括發佈交易、發起共識(例如基於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的實際結果,並將該實際結果發佈至區塊鏈中,以記錄於區塊鏈的分散式資料庫中,即“上鏈”。 為了確定用戶A輸入的預測結果與實際結果是否相匹配,尤其是為了避免在處理過程中涉及到人為干預、確保準確度和有效性,可以預先在區塊鏈上創建智慧合約,該智慧合約中定義有用於確定預測結果與實際結果之間的匹配情況的功能邏輯,該功能邏輯可以自動對用戶A輸入的預測結果與預言機節點23傳入的事件B的實際結果進行比較,使得比較結果客觀、準確。 在一實施例中,智慧合約可以由區塊鏈上的交易或其他智慧合約進行調用,以觸發其自動實施相關功能邏輯,譬如上述用於確定預測結果與實際結果之間的匹配情況的功能邏輯等。設備22可以通過在區塊鏈中發佈交易或調用其他智慧合約,以實現對上述智慧合約的調用;或者,可以由其他區塊鏈節點對上述智慧合約進行調用,本說明書並不對此進行限制。在被調用後,上述的智慧合約可以在設備22上運行,以自動實施上述的功能邏輯。 為了便於理解,下面結合圖3和圖4,針對圖2所示實施例中提及的智慧合約所實施的功能邏輯進行詳細描述。 圖3是一示例性實施例提供的一種智慧合約實施的功能邏輯的流程圖。如圖3所示,該功能邏輯可以包括以下步驟: 步驟302,從區塊鏈上獲取用戶A的預測結果。 在一實施例中,用戶A的預測結果被記錄於區塊鏈上的某一交易中,該交易可以被標記為與事件B相關,使得智慧合約可以據此從區塊鏈中查找到該交易,並獲取用戶A的預測結果。例如,智慧合約可以通過掃描特定位址的交易記錄或者特定流水號的交易記錄,即可獲得用戶A輸入的預測結果。 在一實施例中,區塊鏈上還記錄有其他用戶輸入的預測結果,智慧合約可以通過類似方式獲得這些預測結果,此處不再一一贅述。 步驟304,從區塊鏈上獲取實際結果。 在一實施例中,預言機節點23傳入的實際結果被記錄於區塊鏈上的某一交易中,該交易可以被標記為與事件B相關,使得智慧合約可以據此從區塊鏈中查找到該交易,並獲取該實際結果。例如,智慧合約可以通過掃描特定位址的交易記錄或者特定流水號的交易記錄,即可獲得該實際結果。 步驟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,從區塊鏈上獲取用戶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,當預測結果與實際結果並非完全一致時,確定預測結果與實際結果是否部分一致。 步驟410C,當預測結果與實際結果完全不一致時,若存在擔保憑證,則扣除擔保憑證。 在一實施例中,與圖3所示實施例相類似地,用戶A可以對自身輸入的預測結果配置相應的擔保憑證,以用於對該預測結果的有效性進行擔保。那麼,當預測結果與實際結果完全不一致時,即用戶A對事件B的結果預測不準確或預測失敗,可以通過扣除擔保憑證使得用戶A終止持有該擔保憑證對應的鏈外權益憑證,那麼用戶A持有的鏈外權益憑證減少,以表明該用戶A的預測能力變弱或預測準確度降低。 The exemplary embodiments will be described in detail here, and examples thereof are shown in the drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements. The implementation manners described in the following exemplary embodiments do not represent all implementation manners consistent with one or more embodiments of this specification. On the contrary, they are only examples of devices and methods consistent with some aspects of one or more embodiments of this specification as detailed in the scope of the appended application. It should be noted that in other embodiments, the steps of the corresponding method may not be executed in the order shown and described in this specification. In some other embodiments, the method includes more or fewer steps than described in this specification. In addition, a single step described in this specification may be decomposed into multiple steps for description in other embodiments; and 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, the method is applied to blockchain nodes and can include the following steps: Step 102: Determine that the prediction result input by the participant for a specified event is published to the blockchain, 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 (transfer) on the client of the blockchain, the prediction results input by the participants can be published to the blockchain through the transaction, which becomes the distributed database of the blockchain. A piece of information. It should be pointed out that there are narrow transactions and broad transactions in transactions in the blockchain. A narrowly defined transaction refers to a transfer of value issued by a user to the blockchain; for example, in a traditional Bitcoin blockchain network, a transaction can be a transfer initiated by the user in the blockchain. In a broad sense, a transaction refers to a piece of business data with business intentions released by a user to the blockchain; for example, an operator can build a consortium chain based on actual business needs, and rely on the consortium chain to deploy some other types that are not related to value transfer Online business (for example, event prediction, rental business, vehicle dispatch business, insurance claims business, credit service, medical service, etc.), and in this type of alliance chain, a transaction can be a transaction with business intent 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 distributed database, the prediction result published on the blockchain cannot be tampered with, which can ensure that the prediction result is true and reliable. In an embodiment, the prediction result input by the participant may be released to the blockchain by the above-mentioned blockchain node. 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 above-mentioned blockchain node, and the above-mentioned 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 the local database maintained by the blockchain node (ie, the blockchain ledger). 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 published by each participant can be associated with its unique identifier, so as to effectively distinguish the prediction results published on the blockchain. In one embodiment, the designated event is any event that is specified to be determined to require result prediction, such as traffic conditions at a certain intersection, rice harvest in a certain area, typhoon formation time in a certain sea area, etc. This specification does not describe this limit. In one embodiment, the input time of the predicted result should be earlier than the actual result of the specified event. The input time can be recorded in the transaction containing the predicted result in the blockchain, or the transaction can be created directly The time is the input time. In one case, when the designated event is an instantaneous event, that is, the time period from the start time to the end time of the designated event is very short, which is not enough for the participant to input the prediction result in the time period, and the participant can Enter the prediction result at any time before the actual result. In another case, when the designated event is a non-transient event, that is, the participant can input the prediction result within the time period from the start time to the end time of the designated event, and the participants can be restricted to the specified event. Enter the prediction result after the start time. Step 104: Invoke a smart contract for evaluating the prediction situation. The smart contract is used to read the prediction result and the actual result, and compare the prediction result with the actual result, so as to compare the result according to the comparison result. Send an allocation instruction to the off-chain object, where the allocation instruction is used to instruct the off-chain object to allocate the first off-chain equity certificate to the participant. In one embodiment, the smart contract can be pre-written in the processing logic for comparing the predicted result with the actual result, and the processing logic for sending the allocation instruction based on the comparison result, so that the smart contract can be based on the predicted result and the actual result read. Automatically determine whether it is necessary to send allocation instructions; 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 whether it is a comparison between the predicted result and the actual result or the allocation The sending of instructions can ensure objectivity and fairness. In an embodiment, when the predicted result matches the actual result, it indicates that the participant who provided the predicted result has a certain degree of accuracy in predicting the result of the aforementioned specified event. Then, by sending an allocation instruction to an off-chain object to make the off-chain object distribute the first off-chain equity certificate to the participants, it is possible to control the holdings of each participant’s off-chain equity vouchers, so as to a certain extent for each participant Party realizes the marking function: the participants who hold more off-chain equity vouchers have stronger ability to predict the outcome of the event. Therefore, in the subsequent event prediction process, the participants with strong predictive ability can be quickly screened out from these Participants may obtain relatively more accurate prediction results. In one embodiment, the off-chain equity voucher is used to represent a certain equity, so as to achieve an incentive for the participant to accurately predict the above-mentioned specified event, which helps the participant continue to participate in the prediction of subsequent events, thereby realizing a virtuous circle. For example, when participants implement preset operations on the blockchain, for example, the preset operations may include issuing transactions, initiating consensus (for example, based on the PBFT practical Byzantine fault-tolerant algorithm), etc., and the off-chain equity certificates can be converted into the blockchain Within the equivalent smart asset certificate, and by assigning a certain amount of smart asset certificate to each blockchain node, the preset operation can be successfully completed as soon as possible. In an embodiment, the off-chain equity vouchers may include vouchers used to characterize any type of off-chain equity, such as membership points in the membership system, coupons on the trading platform, redemption coupons, discount coupons, etc. The instructions do not limit this. In one embodiment, the aforementioned smart contract can be invoked under the drive of a transaction or another smart contract to trigger it to read the aforementioned predicted results and actual results from the blockchain, so as to further implement the events of this specification Forecast scheme. In one case, the actual result of the specified event can be published on the blockchain by an Oracle node in the blockchain. Since the information provided by the Oracle node is considered absolutely reliable, it can be guaranteed 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 district. A consensus is initiated in 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 compare the prediction results In the case that the result prediction of the one or more sub-events is correct, the distribution instruction is sent to the off-chain platform, so that the off-chain object distributes the first off-chain equity certificate to the participant. 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 as matching the actual result of the specified event. In an embodiment, the specified event includes multiple sub-events; the equity size corresponding to the first off-chain equity certificate is positively correlated with the proportion of the sub-events accurately predicted by the prediction result in 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-chain equity certificate may be The preset maximum value; when the predicted result is completely different from the actual result, that is, the sub-event accurately predicted by the predicted result accounts for 0% of the multiple sub-events, which is represented by the first off-chain equity certificate The equity size can be a preset minimum value (0 or other preset values). In one embodiment, the equity size represented by the first-chain equity certificate can be linearly changed. For example, when the proportion is 30%, the equity size is 30% of the preset maximum value, and for example, when the proportion is 80%, The equity size is 80% of the preset maximum value, etc. In another embodiment, the equity size represented by the first-chain off-chain equity certificate can be changed non-linearly. For example, when the proportion is 30%, the equity size is 10% of the preset maximum value, and 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 one 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, It can be determined that the two do not match, so that the smart contract does not need to send distribution instructions to off-chain objects, so that the first off-chain equity certificate will not be distributed to participants. In one embodiment, it may be determined that the second off-chain equity certificate held by the participant is frozen, as a guarantee certificate used to guarantee the validity of the prediction result; wherein, the smart contract is used in all In the case that the predicted result does not match the actual result, a deduction instruction is sent to the management party of the guarantee certificate to release the holding relationship of the participant to the guarantee certificate. By freezing the off-chain equity certificates held by the participants as guarantee certificates, the guarantee certificates can be used to guarantee the predicted results provided by the participants, and certain participation thresholds can be set for the participants to avoid the influence of random participation Accurate prediction of the above specified events. In one embodiment, when the equity represented by the guarantee certificate is larger, it indicates that the participant is more confident in the prediction result provided by itself. When the prediction result matches the actual result, it indicates to a certain extent that the participant does have a strong Therefore, by setting the size of the equity represented by the first-chain off-chain equity certificate to be positively correlated with the size of the equity represented by the guarantee certificate, the predictive ability of the corresponding participants can be marked more accurately, and Corresponding parties have a greater degree of incentives. In one embodiment, even if the participant does not freeze the formation of the guarantee certificate, it can still participate in the prediction of the result of the specified event, and obtain the above-mentioned first off-chain equity certificate when the predicted result matches the actual result. In another embodiment, when the participant has not frozen the formation of the guarantee voucher, the prediction result input by the participant is determined to be invalid, so that it cannot actually participate in the prediction of the result of the specified event; or, 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 inability of the first off-chain equity certificate to represent any equity is equivalent to not assigning any off-chain equity certificate, making the participant’s participation meaningless . In an embodiment, the invocation 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-chain equity certificates held by off-chain objects before invoking the smart contract, this part of the off-chain equity certificates can be locked in advance, so that even if the off-chain objects refuse to allocate the The first-chain out-of-chain equity certificates or the held out-of-chain equity certificates are not enough to complete the distribution, and the distribution operation can be smoothly implemented based on the frozen third-chain equity certificates. In one 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 can resume holding the third off-chain equity certificate. If the off-chain object does not allocate the first off-chain equity certificate to the participant, the smart contract for allocating off-chain equity certificates can send a mandatory distribution instruction to the management party of the third off-chain equity certificate , In order to obtain the first off-chain equity certificate from the frozen third-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 node to ensure the accuracy of its message; or, the oracle node will After the above response is transmitted to the blockchain, the smart contract for distributing off-chain equity certificates can automatically determine whether the off-chain object distributes the first off-chain equity certificates to the participants, and automatically send the above Mandatory allocation instructions. Fig. 2 is a schematic diagram of predicting event results provided by an exemplary embodiment. As shown in FIG. 2, suppose that user A wants to participate in the result prediction for 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 manner, for example, by user A through big data analysis of historical data through a server not shown in Figure 2, or by user A based on his own experience. This specification is not correct. This is limited. 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 on the mobile phone 21, the prediction result can be determined to be from the user A. Of course, the mobile phone 21 can also send the aforementioned prediction results to other blockchain nodes in the blockchain, and the processing process of these blockchain nodes is similar to that of the device 22. You can refer to the related description of the device 22 in this specification. Other users can also predict the outcome 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 Description of user A. The device 22 can make a consensus on the prediction result input by user A in the blockchain, so that the prediction result will be published to the blockchain after the consensus is passed, so as to be recorded in the distributed database of the blockchain, that is, "on-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 can be based on algorithms such as PBFT (Practical Byzantine Fault Tolerance). Other blockchain nodes initiate a consensus, and after passing the consensus, publish the prediction result to the blockchain so that it will be recorded in the distributed database of the blockchain; for another example, when the device 22 is located in the blockchain When it is a public chain, the device 22 can compete with other blockchain nodes based on POW (Proof of Work) algorithm, POS (Proof of Stake) algorithm or other algorithms for the accounting right, and obtain the accounting right. The blockchain node of, enters the transaction data into the corresponding block, and when the transaction containing the prediction result input by user A is entered, the prediction result can be recorded in the distributed database of the blockchain. The blockchain may include an oracle node 23, which can obtain off-chain (that is, off-chain) data, and transfer the off-chain data to the blockchain. For example, the oracle node 23 may 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 distributed database of the blockchain, that is, "on the chain". In order to determine whether the predicted result input by user A matches the actual result, especially to avoid human intervention in the processing process and ensure accuracy and effectiveness, a smart contract can be created on the blockchain in advance. A functional logic is defined to determine the match between the predicted result and the actual result. The functional logic can automatically compare the predicted result input by user A with the actual result of event B passed in by the oracle node 23, making the comparison result objective ,accurate. In one embodiment, the smart contract can be invoked by a transaction on the blockchain or other smart contract to trigger its automatic implementation of related functional logic, such as the aforementioned functional logic for determining the match between the predicted result and the actual result Wait. The device 22 can implement the invocation of the above-mentioned smart contract by issuing transactions in the blockchain or invoking other smart contracts; or, the above-mentioned smart contract can be invoked by other blockchain nodes, which is not limited in this specification. After being called, the aforementioned smart contract can run on the device 22 to automatically implement the aforementioned functional logic. For ease of understanding, the functional logic implemented by the smart contract mentioned in the embodiment shown in FIG. 2 will be described in detail below in conjunction with FIG. 3 and FIG. 4. Fig. 3 is a flow chart of the functional logic of a smart contract implementation provided by an exemplary embodiment. As shown in Figure 3, the functional logic can include the following steps: Step 302: Obtain user A's prediction result from the blockchain. In one 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 the smart contract can find the transaction from the blockchain accordingly , And get the prediction result of user A. For example, the smart contract can scan the transaction record of a specific address or the transaction record of a specific serial number to obtain the prediction result input by the user A. In one embodiment, the prediction results input by other users are also recorded on the blockchain, and the smart contract can obtain these prediction results in a similar manner, which will not be repeated here. Step 304: Obtain the actual result from the blockchain. In one embodiment, the actual result passed in by the oracle node 23 is recorded in a transaction on the blockchain. The transaction can be marked as related to event B, so that the smart contract can be retrieved from the blockchain accordingly. Find the transaction and get the actual result. For example, a smart contract 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 predicted result of user A with the actual result of event B, and determine whether the predicted result is consistent with the actual result. In one embodiment, it is assumed that event B is the only event and does not contain multiple sub-events, so that there are only two situations between the predicted result and the actual result: the result is consistent or the result is inconsistent. The predicted result and the actual result should have the same data structure to facilitate comparison operations. For example, suppose that event B is the traffic condition at a certain intersection during the rush hour. The predicted result and actual result can include a field m respectively. When the field m=0, it means congestion, and when the field m=1, it means not. Crowded. In step 308A, when the predicted result is consistent with the actual result, it is determined whether the user A has a guarantee certificate. In step 310A, when there is a guarantee certificate, the distribution instruction 1 is sent to the institution C. In step 310B, when there is no guarantee certificate, the distribution instruction 2 is sent to the institution C. In an embodiment, user A can configure corresponding guarantee credentials for the predicted result input by himself, so as to guarantee the validity of the predicted result. For example, user A may have a corresponding account a outside the blockchain, and hold certain off-chain equity certificates through account a, and may freeze at least part of the off-chain equity certificates in account a as The aforementioned guarantee certificate; for example, the account a can temporarily transfer the at least part of the off-chain equity certificates to a dedicated certificate freezing account, or the account a can add a freezing mark to the at least part of the off-chain equity certificates, etc., This manual does not limit this. In this embodiment, the guarantee certificate is not necessary: if there is a guarantee certificate, an allocation instruction 1 can be sent to institution C, so that institution C can allocate an out-of-chain equity certificate S1 to user A. If there is no guarantee certificate, it can send to institution C Send distribution instruction 2 so that institution C distributes the off-chain equity certificate S2 to user A; among them, 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 it provides guarantee certificates for user A Incentives, and make user A hold more off-chain equity certificates, which indicates that user A’s predictive ability has become stronger or its prediction accuracy has increased. Among them, the equity represented by the off-chain equity certificates S1 and S2 can be a fixed value, or the equity represented by the off-chain equity certificates S1 and S2 can be positively correlated with the equity represented by the guarantee certificate, that is, the equity represented by the guarantee certificate is more When the value is larger/more, the equity represented by the off-chain equity certificates S1 and S2 will be larger/more. In one embodiment, in order to prevent the user A from publishing the prediction result of the event B at will, and to ensure that the prediction result is meaningful, a certain threshold may be set for the result prediction of the participating user B, such as requiring the user A to provide guarantee credentials. Therefore, in the case of the existence of a guarantee certificate, the out-of-chain equity certificate S1 can be allocated to user A, and the out-of-chain equity certificate S1 is used to represent a certain interest; and when there is no guarantee certificate, the out-of-chain equity certificate S1 allocated to user A The equity certificate S2 cannot represent any equity, which is equivalent to not assigning any off-chain equity certificates, so the participation of user A will be meaningless. In step 308B, when the predicted result is inconsistent with the actual result, it is determined whether the user A has a guarantee certificate. In step 310C, when there is a guarantee certificate, the guarantee certificate is deducted. In one embodiment, when the predicted result is inconsistent with the actual result, that is, user A's prediction of the outcome of event B is inaccurate or the prediction fails, the guarantee certificate can be deducted 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 is reduced to indicate that user A’s predictive ability is weakened or the prediction accuracy is reduced. In one embodiment, the guarantee certificate 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 flow chart of the functional logic of another smart contract implementation provided by an exemplary embodiment. As shown in Figure 4, the functional logic can include the following steps: Step 402: Obtain user A's prediction result from the blockchain. Step 404: Obtain the actual result from the blockchain. In an embodiment, steps 402 to 404 may refer to steps 302 to 304 shown in FIG. 3, which will not be repeated here. Step 406: Compare the predicted result of user A with the actual result of event B, and determine whether the predicted result is completely consistent with the actual result. In one embodiment, it is assumed that event B contains multiple sub-events. If user A's prediction result accurately predicts all sub-events, the prediction result is completely consistent with the actual result; and if user A only accurately predicts some sub-events If user A has only made 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, and the predicted results are completely consistent with the actual results Inconsistent. In an embodiment, the predicted result and the actual result should have the same data structure to facilitate the comparison operation. For example, suppose that event B is the traffic condition of a certain intersection during the rush hour. The predicted result and actual result can contain fields m1 and m2 respectively. The field m1 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 peak; when the field m1=1, it means no congestion and congestion during the morning peak; when the field m2=0, it means congestion and congestion during the evening peak; when the field m2=1 Time means that there is no congestion during the evening peak. In step 408A, when the predicted 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, send the distribution instruction 1 to the institution C. Step 410B, when there is no guarantee certificate, send the distribution instruction 2 to the institution C. In an embodiment, step 408A, step 410A, and step 410B can refer to step 308A, step 310A, and step 310B as shown in FIG. 3, which will not be repeated here. In step 408B, when the predicted result is not completely consistent with the actual result, it is determined whether the predicted result is partially consistent with the actual result. Step 410C, 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 can configure the corresponding guarantee voucher for the predicted result input by himself, so as to guarantee the validity of the predicted result. Then, when the predicted result is completely inconsistent with the actual result, that is, user A’s prediction of event B’s result is inaccurate or the prediction fails, the guarantee certificate can be deducted so that user A terminates holding the off-chain equity certificate corresponding to the guarantee certificate, then the user The off-chain equity certificates held by A are reduced to indicate that the predictive ability of user A is weakened or the prediction accuracy is reduced.

步驟410D,當預測結果與實際結果部分一致時,確定用戶A是否存在擔保憑證。 In step 410D, when the predicted result is partially consistent with the actual result, it is determined whether the user A has a guarantee certificate.

步驟412A,當存在擔保憑證時,向機構C發送分配指令3。 Step 412A, when there is a guarantee certificate, send the distribution instruction 3 to the institution C.

步驟412B,當不存在擔保憑證時,向機構C發送分配指令4。 Step 412B, when there is no guarantee certificate, send the distribution instruction 4 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 to 410B, when the predicted result is partially consistent with the actual result, it indicates that user A has a certain degree of predictive ability. Therefore, for the purpose of labeling this part of the predictive ability, and for user A Incentives, you can send allocation instruction 3 or allocation instruction 4 to institution C, so that institution C can allocate certain out-of-chain equity certificates to user A. In this embodiment, the guarantee certificate is not necessary: if there is a guarantee certificate, the out-of-chain equity certificate S3 can be assigned to user A, and if there is no guarantee certificate, the out-of-chain equity certificate S4 can be assigned to user A; The size of the equity: S1>S3>S4, S1>S2>S4.

在一實施例中,鏈外權益憑證S1、S3所表徵的權益可以是分別對應的固定值,或者該鏈外權益憑證S1、S3所表徵的權益可以分別與擔保憑證所表徵的權益呈正相關,即擔保憑證所表徵的權益越大/越多時,該鏈外權益憑證S1、S3所表徵的權益隨之越大/越多。 In one embodiment, the rights and interests represented by the off-chain equity certificates S1 and S3 may be corresponding fixed values respectively, or the rights and interests represented by the off-chain equity certificates S1 and S3 may be positively correlated with the rights and interests represented by the guarantee certificate, respectively. That is to say, the larger/more the equity represented by the guarantee certificate, the larger/more the equity represented by the off-chain equity certificates S1 and S3.

在一實施例中,為了避免用戶A隨意發佈對事件B的預測結果、確保該預測結果有意義,可以為參與用戶B的結果預測設置一定門檻,比如要求用戶A必須提供擔保憑證。因此,對於存在擔保憑證的情況下,可以向用戶A分配鏈外權益憑證S3、該鏈外權益憑證S3用於表徵一定權益;而當不存在擔保憑證的情況下,向用戶A分配的鏈外權益憑證S4無法表徵任何權益,相當於未分配任何鏈外權益憑證,那麼用戶A的參與將是無意義的。 In one embodiment, in order to prevent the user A from publishing the prediction result of the event B at will, and to ensure that the prediction result is meaningful, a certain threshold may be set for the result prediction of the participating user B, such as requiring the user A to provide guarantee credentials. Therefore, when there is a guarantee certificate, the out-of-chain equity certificate S3 can be allocated to user A, and the out-of-chain equity certificate S3 is used to represent a certain interest; and when there is no guarantee certificate, the out-of-chain equity certificate S3 allocated to user A The equity certificate S4 cannot represent 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 prediction Ability or prediction accuracy, that is, the more off-chain equity certificates held or the greater the equity represented, it indicates that the user A's prediction ability is stronger or the prediction accuracy is higher.

其中,用戶A還可以將鏈外權益憑證用於其他態樣。例如,區塊鏈中的部分區塊鏈節點可以扮演錨點的角色,可以將用戶A持有的鏈外權益憑證兌換為等價的智慧資產憑證,譬如該錨點發佈的房產憑證、證券憑證、股票憑證、存款憑證等,本說明書並不對此進行限制。當鏈外權益憑證用於表徵用戶的預測能力時,僅允許將鏈外權益憑證兌換為智慧資產憑證,而限制將智慧資產憑證兌換為鏈外權益憑證;當然,如果同時存在用於表徵用戶的預測能力的第一類鏈外權益憑證、不用於表徵用戶的預測能力的第二類鏈外權益憑證,可以限制將智慧資產憑證兌換為第 一類鏈外權益憑證、而允許將鏈外權益憑證兌換為第二類鏈外權益憑證。 Among them, user A can also use the off-chain equity certificate for other aspects. For example, some of the blockchain nodes in the blockchain can play the role of anchors, and the off-chain equity certificates held by user A can be exchanged for 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 limit this. When off-chain equity vouchers are used to characterize the user’s predictive ability, only off-chain equity vouchers are allowed to be exchanged for smart asset vouchers, and smart asset vouchers are restricted to be exchanged for off-chain equity vouchers; of course, if there is also a user’s The first type of off-chain equity vouchers with predictive capabilities, and the second type of off-chain equity vouchers that are not used to characterize users’ predictive capabilities, can restrict the conversion of smart asset certificates to the first The first type of off-chain equity vouchers are allowed to be exchanged for the second type of off-chain equity vouchers.

在如圖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 Figures 3 to 4, when institution C receives the allocation instructions 1 to 4, it may not allocate the off-chain equity certificates S1 to S4 to user A for various reasons. For example, institution C holds Some off-chain equity certificates are not sufficient to respond to the allocation instructions 1~4 (that is, the off-chain equity certificates held by Institution C are less than/less than the off-chain equity certificates 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 be determined that institution C will freeze at least part of the off-chain equity certificates held by it, for example, it can be frozen At the designated management party (such as a third-party financial platform), and the oracle node 23 can transmit the corresponding frozen result to 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 Figure 4 may not be executed otherwise. After the distribution instructions 1 to 4 are sent to the institution C, the oracle node 23 can transfer the distribution of the institution C to the off-chain equity certificates S1 to S4 to the blockchain, and the device 22 can call for the off-chain equity certificates Assigned smart contract, the smart contract can send a mandatory distribution instruction to the above-mentioned management party, so that the management party will unfreeze the frozen off-chain equity certificate and assign the corresponding off-chain equity certificate to user A. This process is not affected by the institution C is bound by.

圖5是一示例性實施例提供的一種設備的示意結構圖。請參考圖5,在硬體層面,該設備包括處理器502、內部匯流排504、網路介面506、記憶體508以及非揮發性記憶體510,當然還可能包括其他業務所需要的硬體。處理 器502從非揮發性記憶體510中讀取對應的電腦程式到記憶體508中然後運行,在邏輯層面上形成事件預測裝置。當然,除了軟體實現方式之外,本說明書一個或多個實施例並不排除其他實現方式,比如邏輯裝置抑或軟硬體結合的方式等,也就是說以下處理流程的執行主體並不限定於各個邏輯單元,也可以是硬體或邏輯裝置。 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 also include hardware required for other services. deal with The device 502 reads the corresponding computer program from the non-volatile memory 510 to the memory 508 and then runs, forming 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 logic devices or a combination of software and hardware, which means that the execution body of the following processing flow is not limited to each The logical unit can also be a hardware or a logical device.

請參考圖6,在軟體實施方式中,該事件預測裝置應用於區塊鏈節點;該裝置可以包括:發佈確定單元61,確定參與方針對指定事件輸入的預測結果被發佈至區塊鏈,所述預測結果的輸入時刻早於所述指定事件的實際結果的發生時刻;第一合約調用單元62,調用用於評價預測情況的智慧合約,所述智慧合約被用於讀取所述預測結果和所述實際結果,並對所述預測結果與所述實際結果進行比較,以根據比較結果向鏈外對象發送分配指令,所述分配指令用於指示所述鏈外對象向所述參與方分配第一鏈外權益憑證。 Please refer to Figure 6, in the software implementation, the event prediction device is applied to a blockchain node; the device may include: a release determination unit 61, which determines that the prediction result input by the participant for a specified event is released to the blockchain, so The input time of the prediction result is earlier than the occurrence time of the actual result of the specified event; the first contract calling unit 62 calls a smart contract for evaluating the prediction situation, and the smart contract is used to read the prediction result and The actual result, and compare the predicted result with the actual result, so as 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 second party to the participant. Out-of-chain equity certificates.

可選的,所述實際結果由所述智慧合約從所述區塊鏈上讀取,所述實際結果由所述區塊鏈中的預言機節點發佈至所述區塊鏈上;或者,所述實際結果由所述智慧合約從所述區塊鏈上讀取,所述實際結果經共識後由所述區塊鏈中的任一區塊鏈節點發佈至所述區塊鏈上。 Optionally, the actual result is read from the blockchain by the smart contract, and the actual result is published to the blockchain by an oracle node in the blockchain; or The actual result is read from the blockchain by the smart contract, and the actual result is published to the blockchain by any blockchain node in the blockchain after consensus.

可選的,所述指定事件包括一個或多個子事件,所述預測結果用於對所述一個或多個子事件分別進行結果預測;其中,所述智慧合約被用於在所述預測結果對所述一個或多個子事件的結果預測均正確的情況下,向所述鏈外平臺發送所述分配指令。 可選的,所述指定事件包括多個子事件;所述第一鏈外權益憑證對應的權益大小正相關於被所述預測結果準確預測的子事件在所述多個子事件中的占比。 可選的,還包括: 凍結確定單元63,確定所述參與方持有的第二鏈外權益憑證被凍結,以作為用於擔保所述預測結果的有效性的擔保憑證; 其中,所述智慧合約用於在所述預測結果不匹配於所述實際結果的情況下向所述擔保憑證的管理方發送扣除指令,以解除所述參與方對所述擔保憑證的持有關係。 可選的,所述第一鏈外權益憑證所表徵的權益大小與所述擔保憑證表徵的權益大小呈正相關。 可選的,所述智慧合約用於在所述參與方不存在對應的擔保憑證的情況下,判定所述參與方對應的預測結果無效。 可選的,所述第一鏈外權益憑證包括以下至少之一:會員積分、優惠券、兌換券、抵價券。 可選的,所述智慧合約的調用條件包括:所述鏈外對象持有的第三鏈外權益憑證被凍結,且凍結的所述第三鏈外權益憑證足夠對所述分配指令進行響應。 可選的,還包括: 第二合約調用單元64,在所述鏈外對象未將所述第一鏈外權益憑證分配至所述參與方的情況下,調用用於分配鏈外權益憑證的智慧合約,使所述用於分配鏈外權益憑證的智慧合約向所述第三鏈外權益憑證的管理方發送強制分配指令,以從被凍結的所述第三鏈外權益憑證中獲取所述第一鏈外權益憑證並分配至所述參與方。 上述實施例闡明的系統、裝置、模組或單元,具體可以由電腦晶片或實體實現,或者由具有某種功能的產品來實現。一種典型的實現設備為電腦,電腦的具體形式可以是個人電腦、膝上型電腦、蜂巢式電話、相機電話、智慧電話、個人數位助理、媒體播放器、導航設備、電子郵件收發設備、遊戲控制台、平板電腦、可穿戴設備或者這些設備中的任意幾種設備的組合。 在一個典型的配置中,電腦包括一個或多個處理器 (CPU)、輸入/輸出介面、網路介面和記憶體。 記憶體可能包括電腦可讀媒體中的非永久性儲存器,隨機存取記憶體(RAM)和/或非揮發性記憶體等形式,如唯讀記憶體(ROM)或快閃記憶體(flash RAM)。記憶體是電腦可讀媒體的示例。 電腦可讀媒體包括永久性和非永久性、可行動和非可行動媒體可以由任何方法或技術來實現資訊儲存。資訊可以是電腦可讀指令、資料結構、程式的模組或其他資料。電腦的儲存媒體的例子包括,但不限於相變記憶體 (PRAM)、靜態隨機存取記憶體(SRAM)、動態隨機存取記憶體(DRAM)、其他類型的隨機存取記憶體(RAM)、唯讀記憶體(ROM)、電可抹除可程式化唯讀記憶體(EEPROM)、快閃記憶體或其他記憶體技術、唯讀光碟唯讀記憶體 (CD-ROM)、數位多功能光碟(DVD)或其他光學儲存、磁盒式磁帶、磁碟儲存、量子儲存器、基於石墨烯的儲存媒體或其他磁性儲存設備或任何其他非傳輸媒體,可用於儲存可以被計算設備存取的資訊。按照本文中的界定,電腦可讀媒體不包括暫存電腦可讀媒體(transitory media),如調變的資料訊號和載波。 還需要說明的是,術語“包括”、“包含”或者其任何其他變體意在涵蓋非排他性的包含,從而使得包括一系列要素的過程、方法、商品或者設備不僅包括那些要素,而且還包括沒有明確列出的其他要素,或者是還包括為這種過程、方法、商品或者設備所固有的要素。在沒有更多限制的情況下,由語句“包括一個……”限定的要素,並不排除在包括所述要素的過程、方法、商品或者設備中還存在另外的相同要素。 上述對本說明書特定實施例進行了描述。其它實施例在所附申請專利範圍的範圍內。在一些情況下,在申請專利範圍中記載的動作或步驟可以按照不同於實施例中的順序來執行並且仍然可以實現期望的結果。另外,在圖式中描繪的過程不一定要求示出的特定順序或者連續順序才能實現期望的結果。在某些實施方式中,多工處理和平行處理也是可以的或者可能是有利的。 在本說明書一個或多個實施例使用的術語是僅出於描述特定實施例的目的,而非旨在限制本說明書一個或多個實施例。在本說明書一個或多個實施例和所附申請專利範圍中所使用的單數形式的“一種”、“所述”和“該”也旨在包括多數形式,除非上下文清楚地表示其他含義。還應當理解,本文中使用的術語“和/或”是指並包含一個或多個相關聯的列出項目的任何或所有可能組合。 應當理解,儘管在本說明書一個或多個實施例可能採用術語第一、第二、第三等來描述各種資訊,但這些資訊不應限於這些術語。這些術語僅用來將同一類型的資訊彼此區分開。例如,在不脫離本說明書一個或多個實施例範圍的情況下,第一資訊也可以被稱為第二資訊,類似地,第二資訊也可以被稱為第一資訊。取決於語境,如在此所使用的詞語“如果”可以被解釋成為“在……時”或“當……時”或“響應於確定”。 以上所述僅為本說明書一個或多個實施例的較佳實施例而已,並不用以限制本說明書一個或多個實施例,凡在本說明書一個或多個實施例的精神和原則之內,所做的任何修改、等同替換、改進等,均應包含在本說明書一個或多個實施例保護的範圍之內。Optionally, the specified event includes one or more sub-events, and the prediction results are used to predict the results of the one or more sub-events respectively; wherein, the smart contract is used to predict the results of the prediction results. If the result prediction of the one or more sub-events is correct, the distribution instruction is sent to the off-chain platform. Optionally, the designated event includes multiple sub-events; the equity size corresponding to the first off-chain equity certificate is positively correlated with the proportion of the sub-events accurately predicted by the prediction result in the multiple sub-events. Optional, also includes: The freezing determination unit 63 determines 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 management party of the guarantee voucher in the case that the predicted result does not match the actual result, so as to release the participant’s holding relationship of the guarantee voucher . Optionally, 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 guarantee 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 a corresponding guarantee certificate. Optionally, the first off-chain equity certificate includes at least one of the following: member points, coupons, redemption coupons, and redemption coupons. Optionally, the invocation condition of the smart contract includes: a third off-chain equity certificate held by the off-chain object is frozen, and the frozen third off-chain equity certificate is sufficient to respond to the allocation instruction. Optional, also includes: The second contract invoking unit 64, when the off-chain object does not allocate the first off-chain equity certificate to the participant, invokes the smart contract for allocating the off-chain equity certificate, so that the The smart contract for distributing off-chain equity certificates sends a mandatory distribution instruction to the management party of the third-chain off-chain equity certificates to obtain and distribute the first off-chain equity certificates from the frozen third-chain equity certificates To the participant. The systems, devices, modules or units explained in the above embodiments may be implemented by computer chips or entities, or implemented by products with certain functions. A typical implementation device is a computer. The specific form of the computer can 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 receiving and sending device, and a game control A console, a tablet, a wearable device, or a combination of any 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 include permanent and non-permanent, movable and non-movable media, and information storage can be realized by any method or technology. Information can be computer-readable instructions, data structures, program modules, 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), and other types of random access memory (RAM) , Read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only CD-ROM, digital multi-function Optical disc (DVD) or other optical storage, magnetic cassette tape, magnetic disk storage, quantum storage, graphene-based storage media or other magnetic storage devices or any other non-transmission media, which can be used to store data that can be accessed by computing devices Information. According to the definition in this article, computer-readable media does not include transitory media, such as modulated data signals and carrier waves. It should also be noted that the terms "include", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, product or equipment including a series of elements not only includes those elements, but also includes Other elements that are not explicitly listed, or include elements inherent to this process, method, commodity, or equipment. If there are no more restrictions, the element defined by the sentence "including a..." does not exclude the existence of other identical elements in the process, method, commodity, or equipment that includes the element. The foregoing describes specific embodiments of this 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 from the embodiment and still achieve desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or sequential order shown in order to achieve the desired result. In some embodiments, multiplexing and parallel processing are also possible or may be advantageous. The terms used in one or more embodiments of this specification are only for the purpose of describing specific embodiments, and are 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 scope of the appended patent application are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and/or" used herein refers to and includes any or all possible combinations of one or more 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 this 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 this specification, the first information can also be referred to as second information, and similarly, the second information can also be referred to as first information. Depending on the context, the word "if" as used herein can be interpreted as "when" or "when" or "in response to determination". The above descriptions are only preferred embodiments of one or more embodiments of this specification, and are not used to limit one or more embodiments of this specification. All within the spirit and principle of one or more embodiments of this specification, Any modification, equivalent replacement, improvement, etc. made should be included in the protection scope of one or more embodiments of this specification.

21‧‧‧手機 22‧‧‧設備 23‧‧‧預言機節點 61‧‧‧發佈確定單元 62‧‧‧第一合約調用單元 63‧‧‧凍結確定單元 64‧‧‧第二合約調用單元 102‧‧‧步驟 104‧‧‧步驟 302‧‧‧步驟 304‧‧‧步驟 306‧‧‧步驟 308A‧‧‧步驟 308B‧‧‧步驟 310A‧‧‧步驟 310B‧‧‧步驟 310C‧‧‧步驟 402‧‧‧步驟 404‧‧‧步驟 406‧‧‧步驟 408A‧‧‧步驟 408B‧‧‧步驟 410A‧‧‧步驟 410B‧‧‧步驟 410C‧‧‧步驟 410D‧‧‧步驟 412A‧‧‧步驟 412B‧‧‧步驟 502‧‧‧處理器 504‧‧‧內部匯流排 506‧‧‧網路介面 508‧‧‧記憶體 510‧‧‧非揮發性記憶體21‧‧‧Mobile 22‧‧‧Equipment 23‧‧‧Oracle Node 61‧‧‧Release Confirmation Unit 62‧‧‧The first contract call unit 63‧‧‧Freeze determination unit 64‧‧‧The second contract call unit 102‧‧‧Step 104‧‧‧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 408B‧‧‧Step 410A‧‧‧Step 410B‧‧‧Step 410C‧‧‧Step 410D‧‧‧Step 412A‧‧‧Step 412B‧‧‧Step 502‧‧‧Processor 504‧‧‧Internal bus 506‧‧‧Network Interface 508‧‧‧Memory 510‧‧‧Non-volatile memory

圖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 predicting event results provided by an exemplary embodiment. Fig. 3 is a flow chart of the functional logic of a smart contract implementation provided by an exemplary embodiment. Fig. 4 is a flow chart of the functional logic of another smart contract implementation provided by an exemplary embodiment. Fig. 5 is a schematic structural diagram of a device provided by an exemplary embodiment. Fig. 6 is a block diagram of an event prediction device provided by an exemplary embodiment.

Claims (19)

一種事件預測方法,應用於區塊鏈節點;所述方法包括:確定參與方針對指定事件輸入的預測結果被發佈至區塊鏈,所述預測結果的輸入時刻早於所述指定事件的實際結果的發生時刻;調用用於評價預測情況的智慧合約,所述智慧合約被用於讀取所述預測結果和所述實際結果,並對所述預測結果與所述實際結果進行比較,以根據比較結果向鏈外對象發送分配指令,所述分配指令用於指示所述鏈外對象向所述參與方分配第一鏈外權益憑證,其中,所述實際結果由所述智慧合約從所述區塊鏈上讀取,所述實際結果由所述區塊鏈中的預言機節點發佈至所述區塊鏈上;或者,所述實際結果由所述智慧合約從所述區塊鏈上讀取,所述實際結果經共識後由所述區塊鏈中的任一區塊鏈節點發佈至所述區塊鏈上。 An event prediction method, applied to a blockchain node; the method includes: determining that a prediction result input by a participant for a specified event is published to the blockchain, and the input time of the prediction result is earlier than the actual result of the specified event The moment of occurrence; call a smart contract used to evaluate the prediction situation, the smart contract is used to read the prediction result and the actual result, and compare the prediction result with the actual result to compare As a result, an allocation instruction is sent to the off-chain object, the allocation instruction is used to instruct the off-chain object to allocate the first off-chain equity certificate to the participant, wherein the actual result is obtained from the block by the smart contract Read on the chain, the actual result is published by the oracle node in the blockchain to the blockchain; or, the actual result is read from the blockchain by the smart contract, The actual result is released to 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 predict the results of the one or more sub-events respectively; wherein, the smart contract is used in all If the prediction result is correct for the result prediction of the one or more sub-events, the distribution instruction is sent to the off-chain platform. 根據請求項1所述的方法,所述指定事件包括多個子事件;所述第一鏈外權益憑證對應的權益大小正相關於被所述預測結果準確預測的子事件在所述多個子事件中的占比。 According to the method of claim 1, the specified event includes multiple sub-events; the equity size corresponding to the first off-chain equity certificate is positively correlated with the sub-event accurately predicted by the prediction result among the multiple sub-events % Of. 根據請求項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 prediction result; wherein, the wisdom The contract is used to send a deduction instruction to the management party of the guarantee voucher when the predicted result does not match the actual result, so as to release the holding relationship of the guarantee voucher by the participant. 根據請求項4所述的方法,所述第一鏈外權益憑證所表徵的權益大小與所述擔保憑證表徵的權益大小呈正相關。 According to the method described in claim 4, 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 guarantee certificate. 根據請求項4所述的方法,所述智慧合約用於在所述參與方不存在對應的擔保憑證的情況下,判定所述參與方對應的預測結果無效。 According to the method described in claim 4, 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. 根據請求項1所述的方法,所述第一鏈外權益憑證包括以下至少之一:會員積分、優惠券、兌換券、抵價券。 According to the method of claim 1, the first off-chain equity certificate includes at least one of the following: member points, coupons, redemption coupons, and discount coupons. 根據請求項1所述的方法,所述智慧合約的調用條件包括:所述鏈外對象持有的第三鏈外權益憑證被凍結,且凍結的所述第三鏈外權益憑證足夠對所述分配指令進行響應。 According to the method of claim 1, the invocation condition of the smart contract includes: 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 The allocation command responds. 根據請求項8所述的方法,還包括:調用用於分配鏈外權益憑證的智慧合約,所述用於分配鏈外權益憑證的智慧合約在所述鏈外對象未將所述第一鏈外權益憑證分配至所述參與方的情況下向所述第三鏈外權益憑證的管理方發送強制分配指令,以從被凍結的所述第三鏈外權益憑證中獲取所述第一鏈外權益憑證並分配至所述參與方。 The method according to claim 8, further comprising: invoking a smart contract for distributing off-chain equity vouchers, where the smart contract for distributing off-chain equity vouchers does not transfer the first chain off-chain When equity certificates are distributed to the participants, a mandatory distribution instruction is sent to the management party of the third-chain equity certificates to obtain the first off-chain equity from the frozen third-chain equity certificates Vouchers are distributed to the participants. 一種事件預測裝置,應用於區塊鏈節點;所述裝置包括:發佈確定單元,確定參與方針對指定事件輸入的預測結果被發佈至區塊鏈,所述預測結果的輸入時刻早於所述指定事件的實際結果的發生時刻;第一合約調用單元,調用用於評價預測情況的智慧合約,所述智慧合約被用於讀取所述預測結果和所述實際結果,並對所述預測結果與所述實際結果進行比較,以根據比較結果向鏈外對象發送分配指令,所述分配指令用於指示所述鏈外對象向所述參與方分配第一鏈外權益憑證,其中,所述實際結果由所述智慧合約從所述區塊鏈上 讀取,所述實際結果由所述區塊鏈中的預言機節點發佈至所述區塊鏈上;或者,所述實際結果由所述智慧合約從所述區塊鏈上讀取,所述實際結果經共識後由所述區塊鏈中的任一區塊鏈節點發佈至所述區塊鏈上。 An event prediction device, applied to a blockchain node; the device includes: a release determination unit, which determines that a prediction result input by a participant for a specified event is released to the blockchain, and the input time of the prediction result is earlier than the specified The moment when the actual result of the event occurs; the first contract calling unit calls a smart contract for evaluating the forecast situation, the smart contract is used to read the forecast result and the actual result, and compare the forecast result with the actual result. The actual result is compared 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, wherein the actual result From the blockchain by the smart contract Read, the actual result is published by the oracle node in the blockchain to the blockchain; or, the actual result is read from the blockchain by the smart contract, the The actual result is released to the blockchain by any blockchain node in the blockchain after consensus. 根據請求項10所述的裝置,所述指定事件包括一個或多個子事件,所述預測結果用於對所述一個或多個子事件分別進行結果預測;其中,所述智慧合約被用於在所述預測結果對所述一個或多個子事件的結果預測均正確的情況下,向鏈外平臺發送所述分配指令。 According to the device of claim 10, the specified event includes one or more sub-events, and the prediction result is used to predict the results of the one or more sub-events respectively; wherein, the smart contract is used in all If the prediction result is correct for the result prediction of the one or more sub-events, the distribution instruction is sent to the off-chain platform. 根據請求項10所述的裝置,所述指定事件包括多個子事件;所述第一鏈外權益憑證對應的權益大小正相關於被所述預測結果準確預測的子事件在所述多個子事件中的占比。 According to the device of claim 10, the specified event includes multiple sub-events; the equity size corresponding to the first off-chain equity certificate is positively correlated with the sub-event accurately predicted by the prediction result among the multiple sub-events % Of. 根據請求項10所述的裝置,還包括:凍結確定單元,確定所述參與方持有的第二鏈外權益憑證被凍結,以作為用於擔保所述預測結果的有效性的擔保憑證;其中,所述智慧合約用於在所述預測結果不匹配於所述實際結果的情況下向所述擔保憑證的管理方發送扣除指令,以解除所述參與方對所述擔保憑證的持有關係。 The device according to claim 10, further comprising: a freezing determination unit, which 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 management party of the guarantee voucher in the case that the predicted result does not match the actual result, so as to release the holding relationship of the guarantee voucher by the participant. 根據請求項13所述的裝置,所述第一鏈外權益憑證所表徵的權益大小與所述擔保憑證表徵的權益大小呈正相關。 According to the device of claim 13, 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 guarantee certificate. 根據請求項13所述的裝置,所述智慧合約用於在所述參與方不存在對應的擔保憑證的情況下,判定所述參與方對應的預測結果無效。 According to the device of claim 13, 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. 根據請求項10所述的裝置,所述第一鏈外權益憑證包括以下至少之一:會員積分、優惠券、兌換券、抵價券。 According to the device of claim 10, the first off-chain equity certificate includes at least one of the following: member points, coupons, redemption coupons, and redemption coupons. 根據請求項10所述的裝置,所述智慧合約的調用條件包括:所述鏈外對象持有的第三鏈外權益憑證被凍結,且凍結的所述第三鏈外權益憑證足夠對所述分配指令進行響應。 According to the device of claim 10, the invocation condition of the smart contract includes: 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 The allocation command responds. 根據請求項17所述的裝置,還包括:第二合約調用單元,在所述鏈外對象未將所述第一鏈外權益憑證分配至所述參與方的情況下,調用用於分配鏈外權益憑證的智慧合約,使所述用於分配鏈外權益憑證的智慧合約向所述第三鏈外權益憑證的管理方發送強制分配指令,以從被凍結的所述第三鏈外權益憑證中獲取所述第一鏈外權益憑證並分配至所述參與方。 The device according to claim 17, further comprising: a second contract invoking unit, in the case that the off-chain object does not allocate the first off-chain equity certificate to the participant, invoke the The smart contract of the equity certificate enables the smart contract for distributing the off-chain equity certificate to send a mandatory distribution instruction to the management party of the third-chain off-chain equity certificate to remove the frozen third-chain equity certificate from the Obtain the first off-chain equity certificate and distribute it to the participants. 一種電子設備,包括:處理器;用於儲存處理器可執行指令的儲存器;其中,所述處理器通過運行所述可執行指令以實現如請求項1至9中任一項所述的事件預測方法。 An electronic device, comprising: a processor; a memory for storing executable instructions of the processor; wherein the processor executes the executable instructions to implement the event as described in any one of claims 1 to 9 method of prediction.
TW108101992A 2018-07-27 2019-01-18 Event prediction method and device, electronic equipment TWI706340B (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810848251.3A CN109117994B (en) 2018-07-27 2018-07-27 Event prediction method and device and electronic equipment
CN201810848251.3 2018-07-27

Publications (2)

Publication Number Publication Date
TW202008228A TW202008228A (en) 2020-02-16
TWI706340B true TWI706340B (en) 2020-10-01

Family

ID=64863499

Family Applications (1)

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

Country Status (3)

Country Link
CN (1) CN109117994B (en)
TW (1) TWI706340B (en)
WO (1) WO2020019791A1 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
CN109146147A (en) * 2018-07-27 2019-01-04 阿里巴巴集团控股有限公司 Event prediction method and device, electronic equipment
CN109727040B (en) * 2019-01-28 2020-09-15 杭州复杂美科技有限公司 Data publishing method, data calling method, device and storage medium
CN112153124B (en) * 2020-09-11 2021-05-25 北京天德科技有限公司 Block chain and intelligent contract system cooperation layer design

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030187772A1 (en) * 2002-01-18 2003-10-02 Ron Papka System and method for predicting security price movements using financial news
CN102270333A (en) * 2010-06-02 2011-12-07 兆雅股份有限公司 Decision making system for stock bull and bear dealing
US20130138577A1 (en) * 2011-11-30 2013-05-30 Jacob Sisk Methods and systems for predicting market behavior based on news and sentiment analysis
TWI559249B (en) * 2016-02-24 2016-11-21 車慧中 Computer implemented method and computer system for forecasting stock performance based on patent big data
CN106611373A (en) * 2015-10-27 2017-05-03 兆雅股份有限公司 Stock right transfer buying and selling analysis system
TWM553462U (en) * 2017-09-25 2017-12-21 First Commercial Bank Marketing target forecasting system
TWM560648U (en) * 2017-12-26 2018-05-21 Systex Corp Deep-learning turning point prediction system based on historical track of price rise and drop for financial products

Family Cites Families (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107784474A (en) * 2016-08-24 2018-03-09 深圳市图灵奇点智能科技有限公司 A kind of novel electron contract and its method performed automatically
CN106504174A (en) * 2016-09-27 2017-03-15 布比(北京)网络技术有限公司 Lottery industry publishing system and device based on block chain
CN106530072A (en) * 2016-11-22 2017-03-22 天津米游科技有限公司 Block chain consensus mechanism
CN106682980A (en) * 2017-01-18 2017-05-17 北京云知科技有限公司 Method for designing probability generator
CN106897878A (en) * 2017-02-27 2017-06-27 钱德君 A kind of intelligent contract type implementation of quantum catenary system
CN107274186A (en) * 2017-05-11 2017-10-20 上海点融信息科技有限责任公司 The method and apparatus that intelligent contract-defined interface is obtained in block chain
CN107292536A (en) * 2017-07-20 2017-10-24 北京汇通金财信息科技有限公司 A kind of financial risk management method and system
CN108038954A (en) * 2017-12-01 2018-05-15 中国联合网络通信集团有限公司 Transaction operation method and digging ore deposit node based on block chain
CN108282459B (en) * 2017-12-18 2020-12-15 中国银联股份有限公司 Data transmission method and system based on intelligent contract
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
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
CN109146146A (en) * 2018-07-27 2019-01-04 阿里巴巴集团控股有限公司 Event prediction method and device, electronic equipment

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030187772A1 (en) * 2002-01-18 2003-10-02 Ron Papka System and method for predicting security price movements using financial news
CN102270333A (en) * 2010-06-02 2011-12-07 兆雅股份有限公司 Decision making system for stock bull and bear dealing
US20130138577A1 (en) * 2011-11-30 2013-05-30 Jacob Sisk Methods and systems for predicting market behavior based on news and sentiment analysis
CN106611373A (en) * 2015-10-27 2017-05-03 兆雅股份有限公司 Stock right transfer buying and selling analysis system
TWI559249B (en) * 2016-02-24 2016-11-21 車慧中 Computer implemented method and computer system for forecasting stock performance based on patent big data
TWM553462U (en) * 2017-09-25 2017-12-21 First Commercial Bank Marketing target forecasting system
TWM560648U (en) * 2017-12-26 2018-05-21 Systex Corp Deep-learning turning point prediction system based on historical track of price rise and drop for financial products

Also Published As

Publication number Publication date
WO2020019791A1 (en) 2020-01-30
CN109117994B (en) 2020-04-14
CN109117994A (en) 2019-01-01
TW202008228A (en) 2020-02-16

Similar Documents

Publication Publication Date Title
TWI706340B (en) Event prediction method and device, electronic equipment
TWI718472B (en) Event prediction method and device, electronic equipment
TWI729345B (en) Event prediction method and device, electronic equipment
WO2020019798A1 (en) Rights and interests distribution method and device and electronic device
US11057225B2 (en) Enforcing compute equity models in distributed blockchain
US11030681B2 (en) Intermediate blockchain system for managing transactions
CN108829350B (en) Data migration method and device based on block chain
US10657526B2 (en) System and method to dynamically setup a private sub-blockchain based on agility of transaction processing
US10609032B2 (en) Enforcing compute equity models in distributed blockchain
US11854405B2 (en) Performing vehicle logistics in a blockchain
US20190179672A1 (en) Enforcing compute equity models in distributed blockchain
WO2020125218A1 (en) Claim settlement method and apparatus employing blockchain technology
US20200013025A1 (en) Conditional deferred transactions for blockchain
WO2020082873A1 (en) Object selection method and device and electronic device
US11615078B2 (en) Blockchain-based transaction methods
WO2020119293A1 (en) Content pushing method and apparatus, and electronic device
WO2021259149A1 (en) Pressure testing method, apparatus and system for blockchain network
TW200813869A (en) System, method and program product for providing policy hierarchy in an enterprise data processing system
TW202008291A (en) Object selection method and device and electronic device
TW202025057A (en) Field updating method and device and electronic equipment
TWI699728B (en) Block publishing method and device, and electronic equipment
CN109711840B (en) Transaction data processing method and device and storage medium
WO2020108128A1 (en) Asset distribution method and device and electronic device
TWI686758B (en) Data request processing, inquiry message processing method, device and equipment
TWI706341B (en) Event prediction method and device, electronic equipment