<span id="fpn9h"><noframes id="fpn9h"><span id="fpn9h"></span>
<span id="fpn9h"><noframes id="fpn9h">
<th id="fpn9h"></th>
<strike id="fpn9h"><noframes id="fpn9h"><strike id="fpn9h"></strike>
<th id="fpn9h"><noframes id="fpn9h">
<span id="fpn9h"><video id="fpn9h"></video></span>
<ruby id="fpn9h"></ruby>
<strike id="fpn9h"><noframes id="fpn9h"><span id="fpn9h"></span>
  • 《工程索引》(EI)刊源期刊
  • 中文核心期刊
  • 中國科技論文統計源期刊
  • 中國科學引文數據庫來源期刊

留言板

尊敬的讀者、作者、審稿人, 關于本刊的投稿、審稿、編輯和出版的任何問題, 您可以本頁添加留言。我們將盡快給您答復。謝謝您的支持!

姓名
郵箱
手機號碼
標題
留言內容
驗證碼

一種基于區塊鏈智能合約的軟件服務交易方法

王晟典 陳娥 朱巖 林映春 劉國偉

王晟典, 陳娥, 朱巖, 林映春, 劉國偉. 一種基于區塊鏈智能合約的軟件服務交易方法[J]. 工程科學學報, 2023, 45(3): 475-488. doi: 10.13374/j.issn2095-9389.2021.11.25.009
引用本文: 王晟典, 陳娥, 朱巖, 林映春, 劉國偉. 一種基于區塊鏈智能合約的軟件服務交易方法[J]. 工程科學學報, 2023, 45(3): 475-488. doi: 10.13374/j.issn2095-9389.2021.11.25.009
WANG Sheng-dian, CHEN E, ZHU Yan, LIN Ying-chun, LIU Guo-wei. A software service transaction approach based on blockchain smart contracts[J]. Chinese Journal of Engineering, 2023, 45(3): 475-488. doi: 10.13374/j.issn2095-9389.2021.11.25.009
Citation: WANG Sheng-dian, CHEN E, ZHU Yan, LIN Ying-chun, LIU Guo-wei. A software service transaction approach based on blockchain smart contracts[J]. Chinese Journal of Engineering, 2023, 45(3): 475-488. doi: 10.13374/j.issn2095-9389.2021.11.25.009

一種基于區塊鏈智能合約的軟件服務交易方法

doi: 10.13374/j.issn2095-9389.2021.11.25.009
基金項目: 國家科技部重點研發計劃資助項目(2018YFB1402702)
詳細信息
    通訊作者:

    E-mail: chene@ustb.edu.cn

  • 中圖分類號: TP319

A software service transaction approach based on blockchain smart contracts

More Information
  • 摘要: 隨著軟件服務交易模式由提前付費向“先服務后結算”轉變,軟件即服務(SaaS)所依賴的訂閱模式面臨著軟件服務金融化與法律化的挑戰—既無法按實際使用量進行金融支付,也難以通過法律形式規范服務提供方、消費方、交易平臺之間權利義務關系。據此,本文將智能法律合約(SLC)引入到服務計算平臺中,提出一種服務即合約(SaaSC)架構。在法律化方面,SaaS+SaaSC的組合支持SLC軟件訂閱合約中設立服務注冊、發現、定制化三種條款,從交互動作、服務狀態、狀態轉移流程等方面規范了各方當事人在服務注冊、發現與消費三階段的交互行為;在金融化方面,將服務接口聲明添加到智能法律合約中,借助智能合約自動執行和檢查條款實現了細化到服務接口調用級別的精準計費模式。進一步,以天氣預報服務作為案例實現了基于區塊鏈智能合約的在線軟件服務獲取、交付及合約化支付,驗證了SaaS+SaaSC方案的合理性和有效性,表明軟件服務合約化是一種新的可行技術路線。

     

  • 圖  1  SaaS+SaaSC架構示意圖

    Figure  1.  Architecture of SaaS+SaaSC system

    圖  2  SaaSC系統主要實體間關系

    Figure  2.  Relationships among essential entities in SaaSC system

    圖  3  合約當事人描述與關系結構. (a)SPESC合約當事人描述; (b)微服務、當事人與智能合約的UML模型

    Figure  3.  Contract party’s description and relation model: (a) example of parties’ description in a SPESC contract; (b) UML relation model among microservices, parties and contracts

    圖  4  服務接口與智能法律合約中服務聲明對應圖

    Figure  4.  Mapping from service interfaces to service declarations in Smart Legal Contract

    圖  5  服務注冊條款

    Figure  5.  Term of service registration

    圖  6  微服務注冊狀態轉移示意圖. (a)原有Eureka注冊中心狀態轉移; (b)合約化注冊狀態轉移

    Figure  6.  State transfer in microservice registration: (a) state transfer in original Eureka center; (b) state transfer in contract based registration

    圖  7  服務發現條款

    Figure  7.  Term of service discovery

    圖  8  三級緩存同步機制示意圖

    Figure  8.  Three levels of cache mechanism for replication

    圖  9  服務接口聲明請求綁定至HTTP報文示意圖

    Figure  9.  Mapping from service interface to HTTP package

    圖  10  服務消費定制化條款

    Figure  10.  Term of service customized consumption

    圖  11  SPESC智能法律合約天氣預報服務案例

    Figure  11.  Complete example of SPESC Smart Legal Contract for weather forecast service

    圖  12  接口用時測試圖. (a)條款1測試; (b)條款2測試; (c)條款3測試; (d)接口用時比較

    Figure  12.  Tests of interface time cost: (a)test of term 1; (b)test of term 2; (c)test of term 3; (d)comparison of interface time cost

    表  1  合約交易存儲結構

    Table  1.   Structure of the transaction storage in contract

    ItemFieldDescription
    Contract inputlastTxidThe transaction ID of the last one
    partySigSignature of current action from the party
    actionTypeType of current action
    contentName and parameters of current action
    Contract outputtxidCurrent Transaction ID
    contractDataStoring data of the latest contract state
    partyPubListPublic key list from the parties
    下載: 導出CSV

    表  2  參與方動作任務請求列表

    Table  2.   Request list of parties’ action task

    Requested tasksInvoked termsResponsed actions
    Provider commit
    (Register)
    no1_1, no1_2Platform Register
    (party, service)
    Customer request
    (Discover)
    no2_1, no2_2Platform Discover( )
    Customer request
    (Forecast)
    no3_1, no3_2Provider Forecast
    (time, location)
    下載: 導出CSV

    表  3  智能法律合約編譯實驗

    Table  3.   Compiling experiment of the Smart Legal Contract

    Input Compilation Output
    Number of bytesLines of codeNumber of tokensAverage compiling time/msNumber of bytes
    9941181875702754
    下載: 導出CSV

    表  4  接口調用測試表

    Table  4.   Tests of interface time cost

    Term No.Service interfaceBefore executing terms After executing terms
    Average time/msConfidential interval/msAverage time/msConfidential interval/ms
    1Commit/Register3.80[0.87, 6.73] 5.35[0.91, 9.79]
    2Request/Discover11.40[10.71,12.09]13.00[12.06, 13.94]
    3Request/Forecast9.60[7.6, 11.6]11.20[9.12, 13.28]
    下載: 導出CSV
    <span id="fpn9h"><noframes id="fpn9h"><span id="fpn9h"></span>
    <span id="fpn9h"><noframes id="fpn9h">
    <th id="fpn9h"></th>
    <strike id="fpn9h"><noframes id="fpn9h"><strike id="fpn9h"></strike>
    <th id="fpn9h"><noframes id="fpn9h">
    <span id="fpn9h"><video id="fpn9h"></video></span>
    <ruby id="fpn9h"></ruby>
    <strike id="fpn9h"><noframes id="fpn9h"><span id="fpn9h"></span>
    www.77susu.com
  • [1] Varghese B, Buyya R. Next generation cloud computing: New trends and research directions. Future Gener Comput Syst, 2018, 79: 849 doi: 10.1016/j.future.2017.09.020
    [2] Bibi S, Katsaros D, Bozanis P. Business application acquisition: On-premise or SaaS-based solutions? IEEE Softw, 2012, 29(3): 86
    [3] Chai Z G. Thoughts on contract law of smart contracts under blockchain. Soc Sci Guangdong, 2019(4): 236 doi: 10.3969/j.issn.1000-114X.2019.04.024

    柴振國. 區塊鏈下智能合約的合同法思考. 廣東社會科學, 2019(4):236 doi: 10.3969/j.issn.1000-114X.2019.04.024
    [4] Li R X. Research on the application and governance of smart contract in financial field. Lanzhou Acad J, 2020(6): 85 doi: 10.3969/j.issn.1005-3492.2020.06.009

    李瑞雪. 智能合約在金融領域的應用及其治理研究. 蘭州學刊, 2020(6):85 doi: 10.3969/j.issn.1005-3492.2020.06.009
    [5] Raskin M. The law and legality of smart contracts. 1 Georgetown Law Technology Review, 2017, 1(2): 305
    [6] Wang D, Zhu Y, Chen E, et al. Smart legal contract and its research progress. Chin J Eng, 2022, 44(1): 68 doi: 10.3321/j.issn.1001-053X.2022.1.bjkjdxxb202201007

    王迪, 朱巖, 陳娥, 等. 智能法律合約及其研究進展. 工程科學學報, 2022, 44(1):68 doi: 10.3321/j.issn.1001-053X.2022.1.bjkjdxxb202201007
    [7] Chinese Institute of Electronics, People’s Republic of China. T/CIE 159—2020 Formal Expression of Blockchain Smart Contract. Beijing: Standards Press of China, 2021

    中國電子學會. T/CIE 159-2020區塊鏈智能合約形式化表達. 北京: 中國標準出版社, 2021
    [8] Jamshidi P, Pahl C, Mendon?a N C, et al. Microservices: The journey so far and challenges ahead. IEEE Softw, 2018, 35(3): 24 doi: 10.1109/MS.2018.2141039
    [9] Taibi D, Spillner J, Wawruch K. Serverless computing-where are we now, and where are we heading? IEEE Softw, 2021, 38(1): 25
    [10] Zhu Y, Wang Q S, Qin B H, et al. Survey of blockchain technology and its advances. Chin J Eng, 2019, 41(11): 1361

    朱巖, 王巧石, 秦博涵, 等. 區塊鏈技術及其研究進展. 工程科學學報, 2019, 41(11):1361
    [11] Qing S H. TTP roles in electronic commerce protocols. J Softw, 2003, 14(11): 1936 doi: 10.13328/j.cnki.jos.2003.11.017

    卿斯漢. 電子商務協議中的可信第三方角色. 軟件學報, 2003, 14(11):1936 doi: 10.13328/j.cnki.jos.2003.11.017
    [12] Das D, Sahoo L, Datta S. A survey on recommendation system. Int J Comput Appl, 2017, 160(7): 6
    [13] Clack C D. Smart Contract Templates: Legal semantics and code validation. J Digit Bank, 2018, 2(4): 338
    [14] Grigg I. The ricardian contract // Proceedings of First IEEE International Workshop on Electronic Contracting. San Diego, 2004: 25
    [15] Hendriksen E S, van Breda M F. Accounting Theory [M/OL]. ACADEMIA (1991) [2021-11-25].https://www.academia.edu/36746420/Accounting_Theory_Eldon_Hendriksen
    [16] Cao H Y, Falleri J R, Blanc X. Automated generation of REST API specification from plain HTML documentation // International Conference on Service-Oriented Computing. Malaga, 2017: 453
    [17] Chen J D. The legal structure of smart contract. Orient Law, 2019(3): 18 doi: 10.3969/j.issn.1007-1466.2019.03.002

    陳吉棟. 智能合約的法律構造. 東方法學, 2019(3):18 doi: 10.3969/j.issn.1007-1466.2019.03.002
    [18] Zhu Y, Qin B H, Chen E, et al. An advanced smart contract conversion and its design and implementation for auction contract. Chin J Comput, 2021, 44(3): 652 doi: 10.11897/SP.J.1016.2021.00652

    朱巖, 秦博涵, 陳娥, 等. 一種高級智能合約轉化方法及競買合約設計與實現. 計算機學報, 2021, 44(3):652 doi: 10.11897/SP.J.1016.2021.00652
  • 加載中
圖(12) / 表(4)
計量
  • 文章訪問數:  694
  • HTML全文瀏覽量:  208
  • PDF下載量:  79
  • 被引次數: 0
出版歷程
  • 收稿日期:  2021-11-25
  • 網絡出版日期:  2022-02-10
  • 刊出日期:  2023-03-01

目錄

    /

    返回文章
    返回