王晟典, 陈娥, 朱岩, 林映春, 刘国伟. 一种基于区块链智能合约的软件服务交易方法[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

一种基于区块链智能合约的软件服务交易方法

A software service transaction approach based on blockchain smart contracts

  • 摘要: 随着软件服务交易模式由提前付费向“先服务后结算”转变,软件即服务(SaaS)所依赖的订阅模式面临着软件服务金融化与法律化的挑战—既无法按实际使用量进行金融支付,也难以通过法律形式规范服务提供方、消费方、交易平台之间权利义务关系。据此,本文将智能法律合约(SLC)引入到服务计算平台中,提出一种服务即合约(SaaSC)架构。在法律化方面,SaaS+SaaSC的组合支持SLC软件订阅合约中设立服务注册、发现、定制化三种条款,从交互动作、服务状态、状态转移流程等方面规范了各方当事人在服务注册、发现与消费三阶段的交互行为;在金融化方面,将服务接口声明添加到智能法律合约中,借助智能合约自动执行和检查条款实现了细化到服务接口调用级别的精准计费模式。进一步,以天气预报服务作为案例实现了基于区块链智能合约的在线软件服务获取、交付及合约化支付,验证了SaaS+SaaSC方案的合理性和有效性,表明软件服务合约化是一种新的可行技术路线。

     

    Abstract: With software service transactions shifting from pay-before-use to pay-as-you-go, the Software as a Service (SaaS) subscription model is facing legalization and financialization challenges. This means that it does not accept financial payment on a pay-as-you-go basis, nor does it legally regulate the rights and obligations of service providers, consumers, and platforms. To address these issues, this paper introduces a new architecture called Smart Legal Contract (SLC), which is integrated into a service computing platform (SaaSC). To begin with, a contract-type service interface scheme is intended to handle the subscription process of service registration and publication on SaaS. In this scheme, we define six types of interactions, four kinds of microservice states, and their state transition procedures, and then establish the mapping from the general service interface following the OpenAPI Specification to the contract terms in the SLC-style SPESC language. To achieve a regularized interaction approach during service registration, a new term, called Service Registration Term (SRT), is proposed. Furthermore, the legal Negotiation-Acceptance mechanism is used to grant consumer rights to obtain software services. Second, in the process of service discovery and consumption, a payment mechanism for contracting demand is proposed. Specifically, based on the service matching approach with a three-level cache, other new terms, called Service Discovery Term (SDT) and Service Customization Term (SCT), are designed to specify the requests and responses of service discovery and invocation. A billing model driven by SRT, SDT, and SCT has been developed to implement fine-grained charging on the level of service interface calls and to evidence the preservation of service transactions in the blockchain. As a result, it provides a legal guarantee for the use of pay-as-you-go mode. From the aspect of service legalization, the SaaS+SaaSC architecture supports establishing three kinds of terms, including service registration, discovery, and customization terms, in an SLC-based software subscription contract so that a complete transaction procedure can be regulated among the three above parties based on their interactions, service states, and their transition process. In terms of service financialization, the interface declaration is appended to the SLC-based contract. By automatically executing smart contracts and checking the terms, the pay-as-you-go mode is implemented through fine-grained charging every time when calling the service interface. Furthermore, we take the weather forecast service as an example to implement and analyze the acquisition, delivery, and contractual payment of software services on blockchain smart contracts. The experimental results demonstrate the feasibility and effectiveness of the proposed SaaS+SaaSC architecture, which should be a practicable approach for contracting of software services.

     

/

返回文章
返回